On 10/16/14 00:46, Michal Trojnara wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Anthony G. Basile wrote:
We hit a bug in stunnel-5.05 and it continues in 5.06.  The
problem comes from systemd which moved sd_listen_fds() form
libsystemd-daemon.so to libsystemd.so.

Not really a bug, but rather missing support for systemd 209 or later:
http://lists.freedesktop.org/archives/systemd-devel/2014-February/017146.html
We merged libsystemd-journal.so, libsystemd-id128.so,
libsystemd-login and libsystemd-daemon into a a single
libsystemd.so to reduce code duplication and avoid cyclic
dependencies (see below).

Please try:
https://www.stunnel.org/downloads/beta/stunnel-5.07b2.tar.gz

Mike
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlQ/TcMACgkQ/NU+nXTHMtE0oACeNbCPKzPZ7T5RiL6d8Cyff/u0
hqsAn1w2GEGxEv39NZEUTf6ZKltRx9Ls
=AM7Z
-----END PGP SIGNATURE-----
_______________________________________________
stunnel-users mailing list
[email protected]
https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users


Hi Michal,

That patch works, but we prefer in Gentoo to have a configuration switch to avoid automatic dependencies [1]. I've attached a patch against configure.ac that would --enable/disable-systemd socket activation. It applies against 5.07b2.

Ref.
[1] https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Automagic_dependencies

--
Anthony G. Basile, Ph. D.
Chair of Information Technology
D'Youville College
Buffalo, NY 14201
(716) 829-8197
diff -Naur stunnel-5.07.orig/configure.ac stunnel-5.07/configure.ac
--- stunnel-5.07.orig/configure.ac	2014-10-16 00:38:32.000000000 -0400
+++ stunnel-5.07/configure.ac	2014-10-17 21:44:52.768542403 -0400
@@ -168,7 +168,6 @@
 # AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS([malloc.h ucontext.h pthread.h poll.h tcpd.h stropts.h grp.h unistd.h util.h libutil.h pty.h])
 AC_CHECK_HEADERS([sys/types.h sys/select.h sys/poll.h sys/socket.h sys/un.h sys/ioctl.h sys/filio.h sys/resource.h sys/uio.h sys/syscall.h])
-AC_CHECK_HEADERS([systemd/sd-daemon.h])
 AC_CHECK_MEMBERS([struct msghdr.msg_control],
     [AC_DEFINE([HAVE_MSGHDR_MSG_CONTROL], [1],
     [Define to 1 if you have 'msghdr.msg_control' structure.])], [], [
@@ -193,8 +192,6 @@
 AC_SEARCH_LIBS([dlopen], [dl])
 AC_SEARCH_LIBS([shl_load], [dld])
 AC_SEARCH_LIBS([inflateEnd], [z])
-# the library name has changed to -lsystemd in systemd 209
-AC_SEARCH_LIBS([sd_listen_fds], [systemd systemd-daemon])
 
 # Add BeOS libraries
 if test "$host_os" = "beos"; then
@@ -418,6 +415,34 @@
     ]
 )
 
+# Systemd
+AC_MSG_CHECKING([whether to enable systemd socket activation])
+AC_ARG_ENABLE(systemd,
+[  --enable-systemd        Enable systemd socket activation],
+    [
+        case "$enableval" in
+            yes) AC_MSG_RESULT([yes])
+                 AC_CHECK_HEADERS([systemd/sd-daemon.h])
+                 # the library name has changed to -lsystemd in systemd 209
+                 AC_SEARCH_LIBS([sd_listen_fds], [systemd systemd-daemon])
+                 if test $ac_cv_search_sd_listen_fds = "no"; then
+                     AC_MSG_ERROR([systemd socket activation requested but no systemd library found])
+                 fi
+                 ;;
+            no)  AC_MSG_RESULT([no])
+                 ;;
+            *)   AC_MSG_RESULT([error])
+                 AC_MSG_ERROR([bad value \"${enableval}\"])
+                 ;;
+        esac
+    ],
+    [
+        # We revert to autodetection if no enable/disable flag was given
+        AC_CHECK_HEADERS([systemd/sd-daemon.h])
+        AC_SEARCH_LIBS([sd_listen_fds], [systemd systemd-daemon])
+    ]
+)
+
 AC_MSG_NOTICE([**************************************** SSL])
 check_ssl_dir() { :
     SSLDIR="$1"
_______________________________________________
stunnel-users mailing list
[email protected]
https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users

Reply via email to