Package: release.debian.org Severity: normal Tags: bullseye User: [email protected] Usertags: pu X-Debbugs-Cc: [email protected] Control: affects -1 + src:zeromq3
Hi RMs, [ Reason ] I got a bug report that fork() is not detected correctly for zeromq3 when GCC 7 or 8 is used [1]. [ Impact ] For some workflows it causes an assertion which was reported upstream [2] and fixed [3]. The fix is applied and a package update is prepared, debdiff is attached to this email. [ Tests ] Upstream testsuite still works. The build log now contains the positive changelog message that fork() is now detected correctly. [ Risks ] Very little as the change is not a source change but a configure check fix. With newer GCC versions (ie Bookworm and later) the configure check works and fork() is used as expected. [ Checklist ] [x] *all* changes are documents in the d/changelog [x] I reviewed all changes and I approve them [x] attach debdiff against the package in bullseye [x] the issue is verified as fixed in unstable Thanks for considering, Laszlo/GCS [1] https://bugs.debian.org/1053448 [2] https://github.com/zeromq/libzmq/issues/3313 [3] https://github.com/zeromq/libzmq/commit/5a9c174dab9f8f7cd675360db2af302cb48d961a
diff -Nru zeromq3-4.3.4/debian/changelog zeromq3-4.3.4/debian/changelog --- zeromq3-4.3.4/debian/changelog 2021-02-03 08:46:36.000000000 +0100 +++ zeromq3-4.3.4/debian/changelog 2023-10-07 11:22:30.000000000 +0200 @@ -1,3 +1,9 @@ +zeromq3 (4.3.4-1+deb11u1) bullseye; urgency=medium + + * Apply fix for fork() detection on GCC 7 (closes: #1053448). + + -- Laszlo Boszormenyi (GCS) <[email protected]> Sat, 07 Oct 2023 11:22:30 +0200 + zeromq3 (4.3.4-1) unstable; urgency=medium * New upstream release. diff -Nru zeromq3-4.3.4/debian/patches/fix_fork_detection_with_gcc_7.patch zeromq3-4.3.4/debian/patches/fix_fork_detection_with_gcc_7.patch --- zeromq3-4.3.4/debian/patches/fix_fork_detection_with_gcc_7.patch 1970-01-01 01:00:00.000000000 +0100 +++ zeromq3-4.3.4/debian/patches/fix_fork_detection_with_gcc_7.patch 2023-10-07 11:22:30.000000000 +0200 @@ -0,0 +1,85 @@ +From 240e36af4e0300a529c99b0a05c4bf391bbcd6f5 Mon Sep 17 00:00:00 2001 +From: David Gloe <[email protected]> +Date: Tue, 23 Nov 2021 15:39:42 +0000 +Subject: [PATCH 1/2] Problem: Fix fork detection on gcc 7 + +Solution: When compiling with gcc 7 and newer, the program produced by +AC_CHECK_FUNCS(fork) produces a warning, which results in configure +incorrectly disabling fork support. Fix the issue by using an +AC_COMPILE_IFELSE which correctly detects fork availability. +Tested by running configure and make check on a system with gcc 7 +installed, and verifying that HAVE_FORK was defined correctly. + +See issue #3313. +--- + configure.ac | 19 ++++++++++++++++--- + 1 file changed, 16 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 227e37b488..1a571291eb 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -771,9 +771,24 @@ AC_LANG_POP([C++]) + + # Checks for library functions. + AC_TYPE_SIGNAL +-AC_CHECK_FUNCS(perror gettimeofday clock_gettime memset socket getifaddrs freeifaddrs fork mkdtemp accept4) ++AC_CHECK_FUNCS(perror gettimeofday clock_gettime memset socket getifaddrs freeifaddrs mkdtemp accept4) + AC_CHECK_HEADERS([alloca.h]) + ++# AC_CHECK_FUNCS(fork) fails on gcc 7 ++AC_MSG_CHECKING([whether fork is available]) ++AC_COMPILE_IFELSE( ++ [AC_LANG_PROGRAM( ++ [[#include <unistd.h>]], ++ [[return fork();]]) ++ ],[ ++ AC_MSG_RESULT([yes]) ++ AC_DEFINE(HAVE_FORK, [1], [fork is available]) ++ AM_CONDITIONAL(HAVE_FORK, true) ++ ],[ ++ AC_MSG_RESULT([no]) ++ AM_CONDITIONAL(HAVE_FORK, false) ++]) ++ + # string.h doesn't seem to be included by default in Fedora 30 + AC_MSG_CHECKING([whether strnlen is available]) + AC_COMPILE_IFELSE( +@@ -971,8 +986,6 @@ LIBZMQ_CHECK_GETRANDOM([ + [Whether getrandom is supported.]) + ]) + +-AM_CONDITIONAL(HAVE_FORK, test "x$ac_cv_func_fork" = "xyes") +- + if test "x$cross_compiling" = "xyes"; then + # Enable draft by default when cross-compiling + defaultval=yes + +From 72b5359049664458e117f2609d174dc5213fc19b Mon Sep 17 00:00:00 2001 +From: David Gloe <[email protected]> +Date: Tue, 23 Nov 2021 16:27:52 +0000 +Subject: [PATCH 2/2] Problem: Missing relicense statement for dgloe-hpe + +Solution: Add new author to the existing HPE relicense statement. +--- + RELICENSE/hewlett_packard_enterprise.md | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/RELICENSE/hewlett_packard_enterprise.md b/RELICENSE/hewlett_packard_enterprise.md +index 9a0741984d..067ce39cbc 100644 +--- a/RELICENSE/hewlett_packard_enterprise.md ++++ b/RELICENSE/hewlett_packard_enterprise.md +@@ -5,9 +5,11 @@ that grants permission to relicense its copyrights in the libzmq C++ + library (ZeroMQ) under the Mozilla Public License v2 (MPLv2). + + A portion of the commits made by the Github handle "brc859844", with +-commit author "Brett Cameron <[email protected]>", are copyright of Hewlett Packard Enterprise. ++commit author "Brett Cameron <[email protected]>", and the commits made ++by the Github handle "dgloe-hpe", with commit author ++"David Gloe <[email protected]>", are copyright of Hewlett Packard Enterprise. + This document hereby grants the libzmq project team to relicense libzmq, +-including all past, present and future contributions of the author listed above. ++including all past, present and future contributions of the authors listed above. + + Hewlett Packard Enterprise + 2019/03/12 diff -Nru zeromq3-4.3.4/debian/patches/series zeromq3-4.3.4/debian/patches/series --- zeromq3-4.3.4/debian/patches/series 2021-02-03 08:46:36.000000000 +0100 +++ zeromq3-4.3.4/debian/patches/series 2023-10-07 11:22:30.000000000 +0200 @@ -2,3 +2,4 @@ tests_testutil.cpp.patch test_hwm_pubsub-tcp-fix.patch fix-maybe-uninitialized.patch +fix_fork_detection_with_gcc_7.patch

