Control: tags -1 fixed-upstream Control: tags -1 patch Please note that this is now in the master branch. Please find the Debian part attached which I have tried successfully with the upstream commit applied.
>From 563cd79c77296f8bf8827be301077ead785d18ed Mon Sep 17 00:00:00 2001 From: Bastian Germann <[email protected]> Date: Mon, 31 Aug 2026 16:26:59 +0200 Subject: [PATCH] Build with libzmq-ffi-perl
--- debian/NEWS | 10 ---------- debian/README.Debian | 9 ++++----- debian/amavisd-new.amavisd-snmp-subagent.init | 4 ++-- debian/amavisd-new.amavisd-snmp-subagent.service | 2 +- debian/changelog | 4 ++++ debian/control | 4 ++-- debian/etc/conf.d/20-debian_defaults | 5 +++-- debian/patches/series | 1 - debian/rules | 7 +++++++ 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/debian/NEWS b/debian/NEWS index 0b32c00..6c6c871 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -1,13 +1,3 @@ -amavisd-new (1:2.13.0-1) unstable; urgency=medium - - ZMQ support has been removed as it was broken since wheezy - due to removed libzeromq-perl. - Users who have installed ZMQ Perl modules from CPAN or otherwise will - nevertheless not be able to use amavisd-snmp-subagent-zmq or amavisd-status - any more. - - -- Damian Lukowski <[email protected]> Fri, 03 Feb 2023 12:01:14 +0100 - amavisd-new (1:2.11.0-4) unstable; urgency=medium /etc/default/amavis-mc and /etc/default/amavisd-snmp-subagent are no longer diff --git a/debian/README.Debian b/debian/README.Debian index 4f58e0d..1bdf801 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -106,7 +106,7 @@ amavisd-status 2.9.0-1 introduced support for the amavisd-status script. The amavisd-status script gets notified via zeromq about the current state of the amavis children and displays it. If you want -to use this feature you have to install libzeromq-perl and enable +to use this feature you have to enable the amavis-mc service in /etc/default/amavis-mc amavisd-snmp-subagent @@ -123,10 +123,9 @@ should do the trick. You also have to enable the snmp-subagent service via /etc/default/amavisd-snmp-subagent. -The subagent can either use zeromq or bdb for fetching the data from amavis. -If you want to use zeromq the amavic-mc service has to be enabled via -/etc/default/amavis-mc and libzeromq-perl needs to be installed on your -system. +The subagent uses zeromq (ZMQ::LibZMQ3) for fetching the data from amavis. +If you want to use zeromq the amavis-mc service has to be enabled via +/etc/default/amavis-mc. You can change the backend in /etc/default/amavisd-snmp-subagent. diff --git a/debian/amavisd-new.amavisd-snmp-subagent.init b/debian/amavisd-new.amavisd-snmp-subagent.init index c3495b1..82ef6cb 100644 --- a/debian/amavisd-new.amavisd-snmp-subagent.init +++ b/debian/amavisd-new.amavisd-snmp-subagent.init @@ -16,12 +16,12 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="amavis snmp subagent" -NAME=amavisd-snmp-subagent +NAME=amavisd-snmp-subagent-zmq DAEMON=/usr/sbin/$NAME DAEMON_ARGS="-P /var/run/$NAME.pid" PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME -AGENT_BACKEND="bdb" +AGENT_BACKEND="zmq" # Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 diff --git a/debian/amavisd-new.amavisd-snmp-subagent.service b/debian/amavisd-new.amavisd-snmp-subagent.service index 6c32537..10cd183 100644 --- a/debian/amavisd-new.amavisd-snmp-subagent.service +++ b/debian/amavisd-new.amavisd-snmp-subagent.service @@ -6,7 +6,7 @@ After=network.target amavis.service [Service] User=amavis Group=amavis -ExecStart=/usr/sbin/amavisd-snmp-subagent -f +ExecStart=/usr/sbin/amavisd-snmp-subagent-zmq -f Restart=on-failure PrivateTmp=true CapabilityBoundingSet= diff --git a/debian/changelog b/debian/changelog index 1f29121..4abef36 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,10 @@ amavisd-new (1:2.13.0-8) UNRELEASED; urgency=medium * Remove dspam from suggests. Closes: #1117157. + * Build with ZeroMQ (libzmq3-perl) instead of BerkeleyDB + (libberkeleydb-perl): re-enable ZMQ support, disable $enable_db in the + default configuration, and switch the SNMP subagent to the ZeroMQ + backend (amavisd-snmp-subagent-zmq). Closes: #1124321 -- Brian May <[email protected]> Sun, 05 Oct 2025 08:38:03 +1100 diff --git a/debian/control b/debian/control index bb18327..3973375 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Build-Depends: debhelper-compat (= 13), dh-dist-zilla, dh-exec, - libberkeleydb-perl, + libzmq-ffi-perl, libdbi-perl, libmail-dkim-perl, libmime-tools-perl, @@ -33,7 +33,7 @@ Depends: debconf | debconf-2.0, file, libarchive-tar-perl, libarchive-zip-perl, - libberkeleydb-perl, + libzmq-ffi-perl, libconvert-tnef-perl, libconvert-uulib-perl, libdigest-md5-perl, diff --git a/debian/etc/conf.d/20-debian_defaults b/debian/etc/conf.d/20-debian_defaults index e1c6756..34edda5 100644 --- a/debian/etc/conf.d/20-debian_defaults +++ b/debian/etc/conf.d/20-debian_defaults @@ -27,8 +27,9 @@ $syslog_ident = 'amavis'; # syslog ident tag, prepended to all messages $syslog_facility = 'mail'; $syslog_priority = 'debug'; # switch to info to drop debug output, etc -$enable_db = 1; # enable use of BerkeleyDB/libdb (SNMP and nanny) -$enable_global_cache = 1; # enable use of libdb-based cache if $enable_db=1 +$enable_db = 0; # disable use of BerkeleyDB/libdb (SNMP and nanny) +$enable_zmq = 1; # enable ZeroMQ (ZMQ::LibZMQ3) instead of BerkeleyDB +$enable_global_cache = 0; # enable use of libdb-based cache if $enable_db=1 $inet_socket_port = 10024; # default listening socket diff --git a/debian/patches/series b/debian/patches/series index e31e68b..6d8beef 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -01_remove_zmq_support.patch 20_safe_path_at_init.patch 30_conf.d_support_builtin.patch 40_fix_paths.patch diff --git a/debian/rules b/debian/rules index 7d229a0..af33c30 100755 --- a/debian/rules +++ b/debian/rules @@ -6,6 +6,13 @@ %: dh $@ --with dist-zilla +execute_after_dh_dzil_build: + # BerkeleyDB is no longer a build dependency; drop the BDB-only tests + rm -f .build/debian-build/t/Amavis/DBTest.t \ + .build/debian-build/t/Amavis/DB/SNMPTest.t \ + .build/debian-build/t/Amavis/DBTest.pm \ + .build/debian-build/t/Amavis/DB/SNMPTest.pm + execute_after_dh_installinit: dh_installsysusers

