Re: UPDATE: sysutils/syslog-ng 3.32.1

2021-05-17 Thread Todd C . Miller
On Mon, 17 May 2021 13:36:42 -0600, "Todd C. Miller" wrote:

> Newer versions of syslog-ng have an "openbsd" module that supports
> sendsyslog() and /dev/klog.  This makes it possible to use syslog-ng
> as a replacement for the stock OpenBSD syslog daemon.
>
> I've also upstreamed some OpenBSD compilation fixes that landed in
> version 3.32.1.  As a result, we can drop all of our patches except
> for a few minor tweaks to Makefile.in.  I had a problem with our
> libtool linking in the old libsyslog-ng version at build time if
> an old package was installed.  Removing a hack from Makefile.in
> that wasn't using libtool for linking syslog-ng fixed that.

Updated diff that syncs the installed syslog-ng.conf with our current
syslog.conf.

 - todd

Index: sysutils/syslog-ng/Makefile
===
RCS file: /cvs/ports/sysutils/syslog-ng/Makefile,v
retrieving revision 1.70
diff -u -p -u -r1.70 Makefile
--- sysutils/syslog-ng/Makefile 14 May 2021 20:49:05 -  1.70
+++ sysutils/syslog-ng/Makefile 16 May 2021 12:22:26 -
@@ -2,11 +2,10 @@
 
 COMMENT=   log management solution
 
-V =3.12.1
-REL =  3.12
+V =3.32.1
+REL =  3.32.1
 DISTNAME = syslog-ng-$V
 CATEGORIES =   sysutils
-REVISION = 9
 
 MAINTAINER =   Steven Mestdagh 
 
@@ -21,15 +20,21 @@ WANTLIB += ssl z
 
 MASTER_SITES = 
http://github.com/balabit/syslog-ng/releases/download/${DISTNAME}/
 
-SHARED_LIBS =  evtlog  2.0 \
-   evtlog-${REL}   2.0 \
-   syslog-ng   5.0 \
-   syslog-ng-${REL}5.0
+SHARED_LIBS =  evtlog  3.0 \
+   evtlog-3.32 3.0 \
+   syslog-ng   6.0 \
+   syslog-ng-3.32  6.0 \
+   loggen_helper   1.0 \
+   loggen_helper-3.32  1.0 \
+   loggen_plugin   1.0 \
+   loggen_plugin-3.32  1.0 \
+   secret-storage  1.0
 
 # needs a newer compiler due to libmaxminddb header
 COMPILER = base-clang ports-gcc
 COMPILER_LANGS = c
 
+BUILD_DEPENDS= devel/bison>=3.4.2
 LIB_DEPENDS =  devel/glib2 \
devel/json-c \
devel/libivykis \
@@ -58,12 +63,9 @@ CONFIGURE_ARGS +=--disable-tcp-wrapper 
--enable-sql \
--enable-manpages
 
-CONFIGURE_ENV +=   OPENSSL_CFLAGS="-I/usr/include/openssl" \
-   OPENSSL_LIBS="-lssl -lcrypto" \
-   LDFLAGS="-L${LOCALBASE}/lib"
-# json-c only installs libjson-c.pc; syslog-ng checks for libjson.pc
-CONFIGURE_ENV +=   JSON_C_CFLAGS="`pkg-config json-c --cflags`" \
-   JSON_C_LIBS="`pkg-config json-c --libs`"
+CONFIGURE_ENV +=   LDFLAGS="-L${LOCALBASE}/lib"
+
+YACC = bison -y
 
 USE_GMAKE =Yes
 
Index: sysutils/syslog-ng/distinfo
===
RCS file: /cvs/ports/sysutils/syslog-ng/distinfo,v
retrieving revision 1.26
diff -u -p -u -r1.26 distinfo
--- sysutils/syslog-ng/distinfo 10 Nov 2017 21:58:26 -  1.26
+++ sysutils/syslog-ng/distinfo 10 May 2021 14:39:50 -
@@ -1,2 +1,2 @@
-SHA256 (syslog-ng-3.12.1.tar.gz) = EtKsuOKS0WBo3rrn+aaZ55HKSXVA0ogzppSpoczXj0M=
-SIZE (syslog-ng-3.12.1.tar.gz) = 8905646
+SHA256 (syslog-ng-3.32.1.tar.gz) = GeO3ZVLYLHHAQjBSaSVALJ8F+l5uoZuRKwYYUJKbcS0=
+SIZE (syslog-ng-3.32.1.tar.gz) = 5782744
Index: sysutils/syslog-ng/files/syslog-ng.conf
===
RCS file: /cvs/ports/sysutils/syslog-ng/files/syslog-ng.conf,v
retrieving revision 1.11
diff -u -p -u -r1.11 syslog-ng.conf
--- sysutils/syslog-ng/files/syslog-ng.conf 10 Nov 2017 21:58:26 -  
1.11
+++ sysutils/syslog-ng/files/syslog-ng.conf 17 May 2021 20:10:11 -
@@ -1,15 +1,18 @@
 # syslog-ng configuration file for OpenBSD.
 # This should provide behavior similar to OpenBSD's syslog.conf(5).
 
-@version: 3.12
+@version: 3.32
+@requires openbsd
 
 options { 
use_dns(no);
+   dns_cache(no);
create_dirs(no);
keep_hostname(yes);
 };
 
 source s_local {
+   openbsd();
unix-dgram ("/dev/log");
internal();
 };
@@ -27,7 +30,6 @@ destination d_daemon  { file("/var/log/da
 destination d_xferlog  { file("/var/log/xferlog" owner(root) group(wheel) 
perm(0640)); };
 destination d_lpderrs  { file("/var/log/lpd-errs" owner(root) group(wheel) 
perm(0640));};
 destination d_maillog  { file("/var/log/maillog" owner(root) group(wheel) 
perm(0600)); };
-destination d_uucplog  { file("/var/log/uucp" owner(uucp) group(dialer) 
perm(0660));   };
 destination d_doaslog  { file("/var/log/doas");};
 destination d_ttyall   { usertty("*"); };
 destination d_ttyroot  { usertty("root");  };
@@ -64,9 +66,6 @@ filter f_lprdebug {
 

UPDATE: sysutils/syslog-ng 3.32.1

2021-05-17 Thread Todd C . Miller
Newer versions of syslog-ng have an "openbsd" module that supports
sendsyslog() and /dev/klog.  This makes it possible to use syslog-ng
as a replacement for the stock OpenBSD syslog daemon.

I've also upstreamed some OpenBSD compilation fixes that landed in
version 3.32.1.  As a result, we can drop all of our patches except
for a few minor tweaks to Makefile.in.  I had a problem with our
libtool linking in the old libsyslog-ng version at build time if
an old package was installed.  Removing a hack from Makefile.in
that wasn't using libtool for linking syslog-ng fixed that.

I'm not normally a syslog-ng user so this has only been lightly
tested but I did verify that the sendsyslog() support is working.

 - todd

Index: sysutils/syslog-ng/Makefile
===
RCS file: /cvs/ports/sysutils/syslog-ng/Makefile,v
retrieving revision 1.70
diff -u -p -u -r1.70 Makefile
--- sysutils/syslog-ng/Makefile 14 May 2021 20:49:05 -  1.70
+++ sysutils/syslog-ng/Makefile 16 May 2021 12:22:26 -
@@ -2,11 +2,10 @@
 
 COMMENT=   log management solution
 
-V =3.12.1
-REL =  3.12
+V =3.32.1
+REL =  3.32.1
 DISTNAME = syslog-ng-$V
 CATEGORIES =   sysutils
-REVISION = 9
 
 MAINTAINER =   Steven Mestdagh 
 
@@ -21,15 +20,21 @@ WANTLIB += ssl z
 
 MASTER_SITES = 
http://github.com/balabit/syslog-ng/releases/download/${DISTNAME}/
 
-SHARED_LIBS =  evtlog  2.0 \
-   evtlog-${REL}   2.0 \
-   syslog-ng   5.0 \
-   syslog-ng-${REL}5.0
+SHARED_LIBS =  evtlog  3.0 \
+   evtlog-3.32 3.0 \
+   syslog-ng   6.0 \
+   syslog-ng-3.32  6.0 \
+   loggen_helper   1.0 \
+   loggen_helper-3.32  1.0 \
+   loggen_plugin   1.0 \
+   loggen_plugin-3.32  1.0 \
+   secret-storage  1.0
 
 # needs a newer compiler due to libmaxminddb header
 COMPILER = base-clang ports-gcc
 COMPILER_LANGS = c
 
+BUILD_DEPENDS= devel/bison>=3.4.2
 LIB_DEPENDS =  devel/glib2 \
devel/json-c \
devel/libivykis \
@@ -58,12 +63,9 @@ CONFIGURE_ARGS +=--disable-tcp-wrapper 
--enable-sql \
--enable-manpages
 
-CONFIGURE_ENV +=   OPENSSL_CFLAGS="-I/usr/include/openssl" \
-   OPENSSL_LIBS="-lssl -lcrypto" \
-   LDFLAGS="-L${LOCALBASE}/lib"
-# json-c only installs libjson-c.pc; syslog-ng checks for libjson.pc
-CONFIGURE_ENV +=   JSON_C_CFLAGS="`pkg-config json-c --cflags`" \
-   JSON_C_LIBS="`pkg-config json-c --libs`"
+CONFIGURE_ENV +=   LDFLAGS="-L${LOCALBASE}/lib"
+
+YACC = bison -y
 
 USE_GMAKE =Yes
 
Index: sysutils/syslog-ng/distinfo
===
RCS file: /cvs/ports/sysutils/syslog-ng/distinfo,v
retrieving revision 1.26
diff -u -p -u -r1.26 distinfo
--- sysutils/syslog-ng/distinfo 10 Nov 2017 21:58:26 -  1.26
+++ sysutils/syslog-ng/distinfo 10 May 2021 14:39:50 -
@@ -1,2 +1,2 @@
-SHA256 (syslog-ng-3.12.1.tar.gz) = EtKsuOKS0WBo3rrn+aaZ55HKSXVA0ogzppSpoczXj0M=
-SIZE (syslog-ng-3.12.1.tar.gz) = 8905646
+SHA256 (syslog-ng-3.32.1.tar.gz) = GeO3ZVLYLHHAQjBSaSVALJ8F+l5uoZuRKwYYUJKbcS0=
+SIZE (syslog-ng-3.32.1.tar.gz) = 5782744
Index: sysutils/syslog-ng/files/syslog-ng.conf
===
RCS file: /cvs/ports/sysutils/syslog-ng/files/syslog-ng.conf,v
retrieving revision 1.11
diff -u -p -u -r1.11 syslog-ng.conf
--- sysutils/syslog-ng/files/syslog-ng.conf 10 Nov 2017 21:58:26 -  
1.11
+++ sysutils/syslog-ng/files/syslog-ng.conf 17 May 2021 19:23:23 -
@@ -1,15 +1,18 @@
 # syslog-ng configuration file for OpenBSD.
 # This should provide behavior similar to OpenBSD's syslog.conf(5).
 
-@version: 3.12
+@version: 3.32
+@requires openbsd
 
 options { 
use_dns(no);
+   dns_cache(no);
create_dirs(no);
keep_hostname(yes);
 };
 
 source s_local {
+   openbsd();
unix-dgram ("/dev/log");
internal();
 };
Index: sysutils/syslog-ng/patches/patch-Makefile_in
===
RCS file: /cvs/ports/sysutils/syslog-ng/patches/patch-Makefile_in,v
retrieving revision 1.12
diff -u -p -u -r1.12 patch-Makefile_in
--- sysutils/syslog-ng/patches/patch-Makefile_in30 Apr 2021 17:14:50 
-  1.12
+++ sysutils/syslog-ng/patches/patch-Makefile_in10 May 2021 14:48:30 
-
@@ -1,38 +1,29 @@
-$OpenBSD: patch-Makefile_in,v 1.12 2021/04/30 17:14:50 millert Exp $
+$OpenBSD: patch-Makefile_in,v 1.11 2017/11/10 21:58:26 steven Exp $
 - temporary hack until libtool is fixed.
-- work around different getent API, adapted from