ports/50346: [PATCH] sysutils/syslog-ng, fixed missing template() feature

SUGIMURA Takashi 杉村 貴士 sugimura at jp.FreeBSD.org
Thu Mar 27 14:00:33 UTC 2003


>Number:         50346
>Category:       ports
>Synopsis:       [PATCH] sysutils/syslog-ng, fixed missing template() feature
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 27 06:00:29 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     SUGIMURA Takashi
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
FreeBSD kei.yasudakei.info 5.0-CURRENT FreeBSD 5.0-CURRENT #9: Tue Mar 4 22:57:04 JST 2003 root at kei.yasudakei.info:/usr/obj/usr/src/sys/KEI i386

>Description:

When setting template() option on file() on syslog-ng.conf,
but it fails to be parsed.

Since the original source code has a compilation error,
the maintainer cut this feature for success to compile,
but I've found this original problem of the code.


>How-To-Repeat:

For example,

destination template_sample {
  file("/var/log/template_log" template("$MSG\n"));
};

This description is right for this configuration file,
but after patched by ports it makes to be a bad description.


>Fix:

Please apply the following patch.


diff -aurN syslog-ng.orig/files/patch-cfg-grammer.h syslog-ng/files/patch-cfg-grammer.h
--- syslog-ng.orig/files/patch-cfg-grammer.h	Thu Jan  1 09:00:00 1970
+++ syslog-ng/files/patch-cfg-grammer.h	Thu Mar 27 22:43:16 2003
@@ -0,0 +1,11 @@
+--- src/cfg-grammar.h.orig	Thu Mar 27 22:41:34 2003
++++ src/cfg-grammar.h	Thu Mar 27 22:41:47 2003
+@@ -53,7 +53,7 @@
+ # define	KW_DIR_OWNER	296
+ # define	KW_DIR_GROUP	297
+ # define	KW_DIR_PERM	298
+-# define	KW_TEMPLATE	299
++# define	KW_FILE_TEMPLATE	299
+ # define	KW_TEMPLATE_ESCAPE	300
+ # define	KW_OWNER	301
+ # define	KW_GROUP	302
diff -aurN syslog-ng.orig/files/patch-cfg-lex.l syslog-ng/files/patch-cfg-lex.l
--- syslog-ng.orig/files/patch-cfg-lex.l	Fri Mar  7 00:00:05 2003
+++ syslog-ng/files/patch-cfg-lex.l	Thu Jan  1 09:00:00 1970
@@ -1,11 +0,0 @@
---- src/cfg-lex.l.orig	Wed Mar  5 13:14:04 2003
-+++ src/cfg-lex.l	Wed Mar  5 13:14:13 2003
-@@ -80,7 +80,7 @@
- 	{ "dir_owner",		KW_DIR_OWNER },
- 	{ "dir_group",		KW_DIR_GROUP },
-         { "dir_perm",           KW_DIR_PERM },
--        { "template",           KW_FILE_TEMPLATE },
-+/*        { "template",           KW_FILE_TEMPLATE },*/
-         { "template-escape",	KW_TEMPLATE_ESCAPE },
-         { "template_escape",	KW_TEMPLATE_ESCAPE },
-  	{ "keep-alive",         KW_KEEP_ALIVE },

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list