From sugimura@jp.FreeBSD.org  Thu Mar 27 05:54:56 2003
Return-Path: <sugimura@jp.FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 9845037B404
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 27 Mar 2003 05:54:56 -0800 (PST)
Received: from t-mta2.odn.ne.jp (mfep2.odn.ne.jp [143.90.131.180])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 962BF43F85
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 27 Mar 2003 05:54:55 -0800 (PST)
	(envelope-from sugimura@jp.FreeBSD.org)
Received: from localhost ([210.197.240.201]) by t-mta2.odn.ne.jp with ESMTP
          id <20030327135454625.XOTJ.1543.t-mta2.odn.ne.jp@mta2.odn.ne.jp>
          for <FreeBSD-gnats-submit@freebsd.org>;
          Thu, 27 Mar 2003 22:54:54 +0900
Message-Id: <20030327.225744.521602681.sugimura@jp.FreeBSD.org>
Date: Thu, 27 Mar 2003 22:57:44 +0900 (JST)
From: SUGIMURA Takashi =?iso-2022-jp?B?GyRCP3lCPBsoQiAbJEI1LjtOGyhC?= <sugimura@jp.FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [PATCH] sysutils/syslog-ng, fixed missing template() feature
X-Send-Pr-Version: 3.113

>Number:         50346
>Category:       ports
>Synopsis:       [PATCH] sysutils/syslog-ng, fixed missing template() feature
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    nork
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 27 06:00:29 PST 2003
>Closed-Date:    Thu Mar 27 08:31:24 PST 2003
>Last-Modified:  Thu Mar 27 08:31:24 PST 2003
>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@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:
Responsible-Changed-From-To: freebsd-ports-bugs->nork 
Responsible-Changed-By: nork 
Responsible-Changed-When: Thu Mar 27 07:49:01 PST 2003 
Responsible-Changed-Why:  
I'll handle this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=50346 

From: Vince Valenti <vince@blue-box.net>
To: freebsd-gnats-submit@FreeBSD.org, sugimura@jp.FreeBSD.org
Cc:  
Subject: Re: ports/50346: [PATCH] sysutils/syslog-ng, fixed missing template()
 feature
Date: Thu, 27 Mar 2003 08:06:49 -0800 (PST)

 I have reviewed this patch and it looks good to me.  Please go ahead and
 commit it.
 
 Thanks,
 
 -Vince
State-Changed-From-To: open->closed 
State-Changed-By: nork 
State-Changed-When: Thu Mar 27 08:31:15 PST 2003 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=50346 
>Unformatted:
