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

Bug#771981: marked as done (unblock: clamav/0.98.5+dfsg-2)



Your message dated Thu, 04 Dec 2014 05:49:57 +0000
with message-id <1417672197.10998.25.camel@adam-barratt.org.uk>
and subject line Re: Bug#771981: unblock: clamav/0.98.5+dfsg-2
has caused the Debian Bug report #771981,
regarding unblock: clamav/0.98.5+dfsg-2
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
771981: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771981
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package clamav

RC bug fix.  The two changes in this upload are likely to save us a
bunch of upgrade bugs later.

unblock clamav/0.98.5+dfsg-2
diff -Nru clamav-0.98.5+dfsg/debian/changelog clamav-0.98.5+dfsg/debian/changelog
--- clamav-0.98.5+dfsg/debian/changelog	2014-11-20 01:02:46.000000000 -0500
+++ clamav-0.98.5+dfsg/debian/changelog	2014-12-03 23:09:13.000000000 -0500
@@ -1,3 +1,12 @@
+clamav (0.98.5+dfsg-2) unstable; urgency=medium
+
+  * Automatically extend the clamav-daemon.socket systemd unit to create the
+    TCP socket, when clamd is configured to use TCP. (Closes: #771911)
+  * Also accept AF_INET6 sockets in clamd, as they are now supported.
+    Systemd uses AF_INET6 for TCP sockets without specified address.
+
+ -- Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>  Wed, 03 Dec 2014 23:26:21 +0100
+
 clamav (0.98.5+dfsg-1) unstable; urgency=medium
 
   [ Sebastian Andrzej Siewior ]
diff -Nru clamav-0.98.5+dfsg/debian/clamav-daemon.postinst.in clamav-0.98.5+dfsg/debian/clamav-daemon.postinst.in
--- clamav-0.98.5+dfsg/debian/clamav-daemon.postinst.in	2014-11-20 00:44:11.000000000 -0500
+++ clamav-0.98.5+dfsg/debian/clamav-daemon.postinst.in	2014-12-03 16:31:08.000000000 -0500
@@ -36,6 +36,8 @@
   CLAMAVCONF=/etc/clamav/clamd.conf
   DEBROTATEFILE=/var/lib/clamav/clamdrotate.debconf
   CLAMAVROTATEFILE=/etc/logrotate.d/clamav-daemon
+  DEBSYSTEMDLISTENCONF=/var/lib/clamav/extend.conf
+  CLAMAVSYSTEMDLISTENCONF=/etc/systemd/system/clamav-daemon.socket.d/extend.conf
 
   # Update the configuration file
   db_get clamav-daemon/debconf || true
@@ -234,12 +236,32 @@
     echo "#Please read /usr/share/doc/clamav-daemon/README.Debian.gz for details" >> $DEBCONFFILE
     if [ "$sock" = "tcp" ]; then
       echo "TCPSocket $TCPSocket" >> $DEBCONFFILE
-      [ "$TCPAddr" = "any" ] || echo "TCPAddr $TCPAddr" >> $DEBCONFFILE
+      echo "[Socket]" > "$DEBSYSTEMDLISTENCONF"
+      if [ "$TCPAddr" = "any" ]; then
+        echo "ListenStream=$TCPSocket" >> "$DEBSYSTEMDLISTENCONF"
+      else
+        echo "TCPAddr $TCPAddr" >> $DEBCONFFILE
+        echo "ListenStream=$TCPAddr:$TCPSocket" >> "$DEBSYSTEMDLISTENCONF"
+      fi
+      # Finish the configuration file update, by applying changes to the real configuration file.
+      mkdir -p `dirname $CLAMAVSYSTEMDLISTENCONF` 2>/dev/null || true
+      ucf_cleanup "$CLAMAVSYSTEMDLISTENCONF"
+      ucf_upgrade_check "$CLAMAVSYSTEMDLISTENCONF" "$DEBSYSTEMDLISTENCONF" /var/lib/ucf/cache/:etc:systemd:system:clamav-daemon.socket.d:extend.conf
+      rm -f "$DEBSYSTEMDLISTENCONF"
+      if [ -e "$CLAMAVSYSTEMDLISTENCONF".dpkg-old ]; then
+        echo "Removing old systemd ListenStream override for clamav-daemon"
+        rm -f "$CLAMAVSYSTEMDLISTENCONF".dpkg-old
+      fi
     else
       echo "LocalSocket $LocalSocket" >> $DEBCONFFILE
       echo "FixStaleSocket $FixStaleSocket" >> $DEBCONFFILE
       echo "LocalSocketGroup $LocalSocketGroup" >> $DEBCONFFILE
       echo "LocalSocketMode $LocalSocketMode" >> $DEBCONFFILE
+      if [ -e "$CLAMAVSYSTEMDLISTENCONF" ]; then
+        echo "Disabling old systemd ListenStream override for clamav-daemon"
+        mv "$CLAMAVSYSTEMDLISTENCONF" "$CLAMAVSYSTEMDLISTENCONF".dpkg-old
+        ucf -p "$CLAMAVSYSTEMDLISTENCONF"
+      fi
     fi
 
     if [ -n "$TemporaryDirectory" ]; then
diff -Nru clamav-0.98.5+dfsg/debian/clamav-daemon.postrm clamav-0.98.5+dfsg/debian/clamav-daemon.postrm
--- clamav-0.98.5+dfsg/debian/clamav-daemon.postrm	2014-11-20 00:44:11.000000000 -0500
+++ clamav-0.98.5+dfsg/debian/clamav-daemon.postrm	2014-12-03 16:31:08.000000000 -0500
@@ -31,7 +31,8 @@
 case "$1" in
   purge)
   UCFLIST="/etc/logrotate.d/clamav-daemon \
-    /etc/clamav/clamd.conf"
+    /etc/clamav/clamd.conf \
+    /etc/systemd/system/clamav-daemon.socket.d/extend.conf"
   for i in $UCFLIST; do
     if [ -x "/usr/bin/ucf" ]; then
       ucf -p $i || true
@@ -40,7 +41,8 @@
       rm -f $i
     fi
   done
-  rm -f /etc/clamav/clamd.conf.dpkg-old /etc/clamav/clamd.conf.ucf*
+  rm -f /etc/clamav/clamd.conf.dpkg-old /etc/clamav/clamd.conf.ucf* /etc/systemd/system/clamav-daemon.socket.d/extend.conf.dpkg-old /etc/systemd/system/clamav-daemon.socket.d/extend.conf.ucf*
+  rmdir --ignore-fail-on-non-empty /etc/systemd/system/clamav-daemon.socket.d/
   ;;
   remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
   ;;
diff -Nru clamav-0.98.5+dfsg/debian/patches/0008-Add-upstream-systemd-support-for-clamav-daemon-and-c.patch clamav-0.98.5+dfsg/debian/patches/0008-Add-upstream-systemd-support-for-clamav-daemon-and-c.patch
--- clamav-0.98.5+dfsg/debian/patches/0008-Add-upstream-systemd-support-for-clamav-daemon-and-c.patch	2014-11-20 00:44:11.000000000 -0500
+++ clamav-0.98.5+dfsg/debian/patches/0008-Add-upstream-systemd-support-for-clamav-daemon-and-c.patch	2014-12-03 18:33:29.000000000 -0500
@@ -1,4 +1,4 @@
-From 0d230e144dfdd5a73d12db3f34449b429164985d Mon Sep 17 00:00:00 2001
+From d2564db5d3f50adc67474ffb22b0ee7027a82828 Mon Sep 17 00:00:00 2001
 From: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
 Date: Mon, 11 Aug 2014 23:22:05 +0200
 Subject: Add upstream systemd support for clamav-daemon and clamav-freshclam.
@@ -11,7 +11,7 @@
  clamd/clamd.c                         | 102 +++++++++++++++++++++++++++-------
  clamd/localserver.c                   |  34 ++++++++++++
  clamd/server-th.c                     |  55 +++++++++++-------
- clamd/tcpserver.c                     |  44 +++++++++++++++
+ clamd/tcpserver.c                     |  50 +++++++++++++++++
  configure.ac                          |   3 +
  freshclam/Makefile.am                 |   4 ++
  freshclam/clamav-freshclam.service.in |  12 ++++
@@ -19,7 +19,7 @@
  m4/reorganization/libs/systemd.m4     |  18 ++++++
  shared/misc.h                         |   8 +++
  shared/optparser.c                    |   2 +-
- 15 files changed, 312 insertions(+), 44 deletions(-)
+ 15 files changed, 318 insertions(+), 44 deletions(-)
  create mode 100644 clamd/clamav-daemon.service.in
  create mode 100644 clamd/clamav-daemon.socket
  create mode 100644 freshclam/clamav-freshclam.service.in
@@ -402,10 +402,10 @@
      if((opt = optget(opts, "PidFile"))->enabled) {
  	if(unlink(opt->strarg) == -1)
 diff --git a/clamd/tcpserver.c b/clamd/tcpserver.c
-index c3027a85c1f4..5cbac4d3f590 100644
+index c3027a85c1f4..81387b3c8512 100644
 --- a/clamd/tcpserver.c
 +++ b/clamd/tcpserver.c
-@@ -60,6 +60,50 @@ int tcpserver(int **lsockets, unsigned int *nlsockets, char *ipaddr, const struc
+@@ -60,6 +60,56 @@ int tcpserver(int **lsockets, unsigned int *nlsockets, char *ipaddr, const struc
  
      sockets = *lsockets;
  
@@ -425,6 +425,13 @@
 +            if (sd_is_socket(sockfd, AF_INET, SOCK_STREAM, 1) == 1)
 +            {
 +                /* correct socket */
++                logg("#TCP: Received AF_INET SOCK_STREAM socket from systemd.\n");
++                break;
++            }
++            else if (sd_is_socket(sockfd, AF_INET6, SOCK_STREAM, 1) == 1)
++            {
++                /* correct socket */
++                logg("#TCP: Received AF_INET6 SOCK_STREAM socket from systemd.\n");
 +                break;
 +            }
 +            else
@@ -435,10 +442,9 @@
 +        }
 +        if (sockfd == -2)
 +        {
-+            logg("#TCP: No tcp AF_INET SOCK_STREAM socket received from systemd.\n");
++            logg("#TCP: No tcp AF_INET/AF_INET6 SOCK_STREAM socket received from systemd.\n");
 +            return -2;
 +        }
-+        logg("#TCP: Received AF_INET SOCK_STREAM socket from systemd.\n");
 +
 +        t = realloc(sockets, sizeof(int) * (*nlsockets + 1));
 +        if (!(t)) {

--- End Message ---
--- Begin Message ---
On Wed, 2014-12-03 at 23:21 -0500, Scott Kitterman wrote:
> Please unblock package clamav
> 
> RC bug fix.  The two changes in this upload are likely to save us a
> bunch of upgrade bugs later.

Unblocked, thanks.

Regards,

Adam

--- End Message ---

Reply to: