pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/syslog-ng syslog-ng overloads sigaction() wit...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3dc6d7183467
branches:  trunk
changeset: 393240:3dc6d7183467
user:      bouyer <bouyer%pkgsrc.org@localhost>
date:      Fri Mar 15 10:04:00 2019 +0000

description:
syslog-ng overloads sigaction() with its own version, and calls the libc
sigaction() with a dlsym call. On NetBSD this ends up calling the compatibility
sigaction() which fails with ENOSYS if COMPAT_13 is not in the kernel.
Even with COMPAT_13 it would be incorrect because we call the compat
sigaction() with the non-compat arguments.

On NetBSD, fix this by calling explicitely __libc_sigaction14().
Bump PKGREVISION

diffstat:

 sysutils/syslog-ng/Makefile                           |   4 ++-
 sysutils/syslog-ng/distinfo                           |   3 +-
 sysutils/syslog-ng/patches/patch-lib_signal-handler.c |  23 +++++++++++++++++++
 3 files changed, 28 insertions(+), 2 deletions(-)

diffs (56 lines):

diff -r fd4c7b40d56b -r 3dc6d7183467 sysutils/syslog-ng/Makefile
--- a/sysutils/syslog-ng/Makefile       Fri Mar 15 09:59:26 2019 +0000
+++ b/sysutils/syslog-ng/Makefile       Fri Mar 15 10:04:00 2019 +0000
@@ -1,7 +1,9 @@
-# $NetBSD: Makefile,v 1.33 2018/02/28 13:26:08 fhajny Exp $
+# $NetBSD: Makefile,v 1.34 2019/03/15 10:04:00 bouyer Exp $
 
 .include "../../sysutils/syslog-ng/Makefile.common"
 
+PKGREVISION=           1
+
 CONFIGURE_ARGS+=       --enable-ssl
 CONFIGURE_ARGS+=       --enable-stomp
 CONFIGURE_ARGS+=       --enable-tcp-wrapper
diff -r fd4c7b40d56b -r 3dc6d7183467 sysutils/syslog-ng/distinfo
--- a/sysutils/syslog-ng/distinfo       Fri Mar 15 09:59:26 2019 +0000
+++ b/sysutils/syslog-ng/distinfo       Fri Mar 15 10:04:00 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.15 2018/08/15 13:08:21 fhajny Exp $
+$NetBSD: distinfo,v 1.16 2019/03/15 10:04:00 bouyer Exp $
 
 SHA1 (syslog-ng-3.17.2.tar.gz) = 75d7881d2cf258017c3b98fd37ceb3322c1855ad
 RMD160 (syslog-ng-3.17.2.tar.gz) = 6464dd3fd20662e69e3056d090bcce470be90e93
@@ -6,4 +6,5 @@
 Size (syslog-ng-3.17.2.tar.gz) = 9119227 bytes
 SHA1 (patch-ac) = 7d48f689b6ff69c68697baf729fba8be9aec5ce8
 SHA1 (patch-configure) = 2d8ef2285de44de016f44e51be47cd4c1178dfdb
+SHA1 (patch-lib_signal-handler.c) = dd59ad8dba34139da6233aa65ded757f3268ac5c
 SHA1 (patch-modules_system-source_system-source.c) = 14c2bb4b6681766da1330b43965da9547cf73b12
diff -r fd4c7b40d56b -r 3dc6d7183467 sysutils/syslog-ng/patches/patch-lib_signal-handler.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/syslog-ng/patches/patch-lib_signal-handler.c     Fri Mar 15 10:04:00 2019 +0000
@@ -0,0 +1,23 @@
+$NetBSD: patch-lib_signal-handler.c,v 1.1 2019/03/15 10:04:00 bouyer Exp $
+sigaction() is the old, compat syscall. On NetBSD call the up to date one.
+
+--- lib/signal-handler.c.orig  2019-03-15 09:25:35.669181384 +0100
++++ lib/signal-handler.c       2019-03-15 09:29:02.023178726 +0100
+@@ -45,6 +45,9 @@
+ static int
+ call_original_sigaction(int signum, const struct sigaction *act, struct sigaction *oldact)
+ {
++#ifdef __NetBSD__
++  __libc_sigaction14(signum, act, oldact);
++#else
+   static int (*real_sa)(int, const struct sigaction *, struct sigaction *);
+ 
+   if (real_sa == NULL)
+@@ -52,6 +55,7 @@
+       real_sa = dlsym(RTLD_NEXT, "sigaction");
+     }
+   return real_sa(signum, act, oldact);
++#endif
+ }
+ 
+ static gboolean



Home | Main Index | Thread Index | Old Index