diff mbox series

[1/2] syslog-ng: bump version header in conf file to 3.10

Message ID 20180419191418.28285-1-ricardo.martincoski@gmail.com
State Accepted
Headers show
Series [1/2] syslog-ng: bump version header in conf file to 3.10 | expand

Commit Message

Ricardo Martincoski April 19, 2018, 7:14 p.m. UTC
From: Ricardo Martincoski <ricardo.martincoski@datacom.ind.br>

Remove a runtime warning message about configuration file being too old.

Do the same as commit 3dad25466d "syslog-ng: Bump version header in conf
file to 3.9". Package version of syslog-ng is 3.10.1, so bump version
number in syslog-ng.conf to 3.10.

Also add a comment to avoid the same warning message reappears when the
package is bumped.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@datacom.ind.br>
Cc: Chris Packham <judge.packham@gmail.com>
---
Wrapped version of the warning message that shows at every boot:
  Starting syslog-ng daemon: WARNING: Configuration file format is too
  old, syslog-ng is running in compatibility mode Please update it to
  use the syslog-ng 3.10 format at your time of convenience,
  compatibility mode can operate less efficiently in some cases. To
  upgrade the configuration, please review the warnings about
  incompatible changes printed by syslog-ng, and once completed change
  the @version header at the top of the configuration file.;
---
 package/syslog-ng/syslog-ng.conf | 2 +-
 package/syslog-ng/syslog-ng.mk   | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

Comments

Thomas Petazzoni April 19, 2018, 9:17 p.m. UTC | #1
Hello,

On Thu, 19 Apr 2018 16:14:17 -0300, Ricardo Martincoski wrote:
> From: Ricardo Martincoski <ricardo.martincoski@datacom.ind.br>
> 
> Remove a runtime warning message about configuration file being too old.
> 
> Do the same as commit 3dad25466d "syslog-ng: Bump version header in conf
> file to 3.9". Package version of syslog-ng is 3.10.1, so bump version
> number in syslog-ng.conf to 3.10.
> 
> Also add a comment to avoid the same warning message reappears when the
> package is bumped.
> 
> Signed-off-by: Ricardo Martincoski <ricardo.martincoski@datacom.ind.br>
> Cc: Chris Packham <judge.packham@gmail.com>

I've applied, thanks. A suggestion below, though.

> diff --git a/package/syslog-ng/syslog-ng.conf b/package/syslog-ng/syslog-ng.conf
> index a3384eebc3..e767255d71 100644
> --- a/package/syslog-ng/syslog-ng.conf
> +++ b/package/syslog-ng/syslog-ng.conf
> @@ -1,4 +1,4 @@
> -@version: 3.9
> +@version: 3.10

Why don't we replace this by:

@version: VERSION_MAJOR

> +# When updating the version, please check at runtime if version at
> +# syslog-ng.conf header needs to be updated
>  SYSLOG_NG_VERSION = 3.10.1

And then:

SYSLOG_NG_VERSION_MAJOR = 3.10
SYSLOG_NG_VERSION = $(SYSLOG_NG_VERSION_MAJOR).1

and do some $(SED) logic when installing syslog-ng.conf ?

This would avoid the need to manually sync this stupid version
number :-)

Thanks!

Thomas
Chris Packham April 20, 2018, 8:28 a.m. UTC | #2
On Fri, 20 Apr 2018, 9:18 AM Thomas Petazzoni, <thomas.petazzoni@bootlin.com>
wrote:

> Hello,
>
> On Thu, 19 Apr 2018 16:14:17 -0300, Ricardo Martincoski wrote:
> > From: Ricardo Martincoski <ricardo.martincoski@datacom.ind.br>
> >
> > Remove a runtime warning message about configuration file being too old.
> >
> > Do the same as commit 3dad25466d "syslog-ng: Bump version header in conf
> > file to 3.9". Package version of syslog-ng is 3.10.1, so bump version
> > number in syslog-ng.conf to 3.10.
> >
> > Also add a comment to avoid the same warning message reappears when the
> > package is bumped.
> >
> > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@datacom.ind.br>
> > Cc: Chris Packham <judge.packham@gmail.com>
>
> I've applied, thanks. A suggestion below, though.
>
> > diff --git a/package/syslog-ng/syslog-ng.conf
> b/package/syslog-ng/syslog-ng.conf
> > index a3384eebc3..e767255d71 100644
> > --- a/package/syslog-ng/syslog-ng.conf
> > +++ b/package/syslog-ng/syslog-ng.conf
> > @@ -1,4 +1,4 @@
> > -@version: 3.9
> > +@version: 3.10
>
> Why don't we replace this by:
>
> @version: VERSION_MAJOR
>
> > +# When updating the version, please check at runtime if version at
> > +# syslog-ng.conf header needs to be updated
> >  SYSLOG_NG_VERSION = 3.10.1
>
> And then:
>
> SYSLOG_NG_VERSION_MAJOR = 3.10
> SYSLOG_NG_VERSION = $(SYSLOG_NG_VERSION_MAJOR).1
>
> and do some $(SED) logic when installing syslog-ng.conf ?
>
> This would avoid the need to manually sync this stupid version
> number :-)
>

That'd work until there is an actual meaningful change in syntax.

Ideally syslog-ng would have a separate config version number. Even then
the default buildroot syslog-ng is so simple that it's more than likely it
won't be affected by most syntax changes. Last time I looked there wasn't a
simple enough default config in the syslog-ng repo that could just be used
without enabling optional features.

Realistically anyone wanting to use syslog-ng in anger will want to supply
their own config file(s), possibly with a local commit rebased on top of a
buildroot release. My only concern would be that the sed thing masks the
real error from such users. Given that buildroot has other mechanisms for
customising the root fs and no-one has asked for a "don't install the
default syslog-ng.conf" option I'm guessing that such a user doesn't yet
exist. If/when such a user appears we can tweak the seding to suit.
<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr">On Fri, 20 Apr 2018, 9:18 AM Thomas Petazzoni, &lt;<a href="mailto:thomas.petazzoni@bootlin.com">thomas.petazzoni@bootlin.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
On Thu, 19 Apr 2018 16:14:17 -0300, Ricardo Martincoski wrote:<br>
&gt; From: Ricardo Martincoski &lt;<a href="mailto:ricardo.martincoski@datacom.ind.br" target="_blank" rel="noreferrer">ricardo.martincoski@datacom.ind.br</a>&gt;<br>
&gt; <br>
&gt; Remove a runtime warning message about configuration file being too old.<br>
&gt; <br>
&gt; Do the same as commit 3dad25466d &quot;syslog-ng: Bump version header in conf<br>
&gt; file to 3.9&quot;. Package version of syslog-ng is 3.10.1, so bump version<br>
&gt; number in syslog-ng.conf to 3.10.<br>
&gt; <br>
&gt; Also add a comment to avoid the same warning message reappears when the<br>
&gt; package is bumped.<br>
&gt; <br>
&gt; Signed-off-by: Ricardo Martincoski &lt;<a href="mailto:ricardo.martincoski@datacom.ind.br" target="_blank" rel="noreferrer">ricardo.martincoski@datacom.ind.br</a>&gt;<br>
&gt; Cc: Chris Packham &lt;<a href="mailto:judge.packham@gmail.com" target="_blank" rel="noreferrer">judge.packham@gmail.com</a>&gt;<br>
<br>
I&#39;ve applied, thanks. A suggestion below, though.<br>
<br>
&gt; diff --git a/package/syslog-ng/syslog-ng.conf b/package/syslog-ng/syslog-ng.conf<br>
&gt; index a3384eebc3..e767255d71 100644<br>
&gt; --- a/package/syslog-ng/syslog-ng.conf<br>
&gt; +++ b/package/syslog-ng/syslog-ng.conf<br>
&gt; @@ -1,4 +1,4 @@<br>
&gt; -@version: 3.9<br>
&gt; +@version: 3.10<br>
<br>
Why don&#39;t we replace this by:<br>
<br>
@version: VERSION_MAJOR<br>
<br>
&gt; +# When updating the version, please check at runtime if version at<br>
&gt; +# syslog-ng.conf header needs to be updated<br>
&gt;  SYSLOG_NG_VERSION = 3.10.1<br>
<br>
And then:<br>
<br>
SYSLOG_NG_VERSION_MAJOR = 3.10<br>
SYSLOG_NG_VERSION = $(SYSLOG_NG_VERSION_MAJOR).1<br>
<br>
and do some $(SED) logic when installing syslog-ng.conf ?<br>
<br>
This would avoid the need to manually sync this stupid version<br>
number :-)<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">That&#39;d work until there is an actual meaningful change in syntax.</div><div dir="auto"><br></div><div dir="auto">Ideally syslog-ng would have a separate config version number. Even then the default buildroot syslog-ng is so simple that it&#39;s more than likely it won&#39;t be affected by most syntax changes. Last time I looked there wasn&#39;t a simple enough default config in the syslog-ng repo that could just be used without enabling optional features.</div><div dir="auto"><br></div><div dir="auto">Realistically anyone wanting to use syslog-ng in anger will want to supply their own config file(s), possibly with a local commit rebased on top of a buildroot release. My only concern would be that the sed thing masks the real error from such users. Given that buildroot has other mechanisms for customising the root fs and no-one has asked for a &quot;don&#39;t install the default syslog-ng.conf&quot; option I&#39;m guessing that such a user doesn&#39;t yet exist. If/when such a user appears we can tweak the seding to suit.</div><div dir="auto"><br></div><div dir="auto"><br></div></div>
Peter Korsgaard May 1, 2018, 6:54 a.m. UTC | #3
>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > From: Ricardo Martincoski <ricardo.martincoski@datacom.ind.br>
 > Remove a runtime warning message about configuration file being too old.

 > Do the same as commit 3dad25466d "syslog-ng: Bump version header in conf
 > file to 3.9". Package version of syslog-ng is 3.10.1, so bump version
 > number in syslog-ng.conf to 3.10.

 > Also add a comment to avoid the same warning message reappears when the
 > package is bumped.

 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@datacom.ind.br>
 > Cc: Chris Packham <judge.packham@gmail.com>
 > ---
 > Wrapped version of the warning message that shows at every boot:
 >   Starting syslog-ng daemon: WARNING: Configuration file format is too
 >   old, syslog-ng is running in compatibility mode Please update it to
 >   use the syslog-ng 3.10 format at your time of convenience,
 >   compatibility mode can operate less efficiently in some cases. To
 >   upgrade the configuration, please review the warnings about
 >   incompatible changes printed by syslog-ng, and once completed change
 >   the @version header at the top of the configuration file.;

Committed to 2018.02.x, thanks.
diff mbox series

Patch

diff --git a/package/syslog-ng/syslog-ng.conf b/package/syslog-ng/syslog-ng.conf
index a3384eebc3..e767255d71 100644
--- a/package/syslog-ng/syslog-ng.conf
+++ b/package/syslog-ng/syslog-ng.conf
@@ -1,4 +1,4 @@ 
-@version: 3.9
+@version: 3.10
 
 source s_sys {
 	file("/proc/kmsg" program_override("kernel"));
diff --git a/package/syslog-ng/syslog-ng.mk b/package/syslog-ng/syslog-ng.mk
index 325fac5842..d82f9a1aa4 100644
--- a/package/syslog-ng/syslog-ng.mk
+++ b/package/syslog-ng/syslog-ng.mk
@@ -4,6 +4,8 @@ 
 #
 ################################################################################
 
+# When updating the version, please check at runtime if version at
+# syslog-ng.conf header needs to be updated
 SYSLOG_NG_VERSION = 3.10.1
 SYSLOG_NG_SITE = https://github.com/balabit/syslog-ng/releases/download/syslog-ng-$(SYSLOG_NG_VERSION)
 SYSLOG_NG_LICENSE = LGPL-2.1+ (syslog-ng core), GPL-2.0+ (modules)