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

Bug#782566: unblock: avahi/0.6.31-5



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package avahi

It fixed two RC bugs and one important bug. Apologies for the last
minute upload.

|  [ Andreas Henriksson ]
|    * Recommend iproute2 instead of transitional package iproute.

http://anonscm.debian.org/cgit/pkg-utopia/avahi.git/commit/?id=02868de81213966f429c5e4f688d0e0b9225710a

This change was done quite a while ago in alioth's Git repo. I didn't
see a good reason to revert it for the upload


|  * Update avahi-daemon support scripts to use iproute2 tools if available
|    with a fallback to net-tools and graceful degradation if neither is
|    installed. (Closes: #762326)

http://anonscm.debian.org/cgit/pkg-utopia/avahi.git/commit/?id=9449a8cb797f64ae0aa96f7aea8088774084f38c

We were previously using legacy net-tools withoug explicitly depending
on it. This wasn't a problem since ifupdown depended on net-tools. It
prefers iproute2 nowadays, so change the hooks accordingly.

http://anonscm.debian.org/cgit/pkg-utopia/avahi.git/commit/?id=93c6fb830b075d55d177e21c55a561db7174c8d8

While looking at this particular file, I found a few inconsistencies,
which are fixed by this commit

|  * Don't run the avahi-autoipd ifupdown hook scripts if the package has
|    been removed but not purged. (Closes: #780872)

http://anonscm.debian.org/cgit/pkg-utopia/avahi.git/commit/?id=7951a19ec1f0c4a413d2ec86a14a381a4079dfd1

Rather self-explanatory two-line fix.

|  * Use --restart-after-upgrade for avahi-daemon and avahi-dnsconfd to
|    minimise downtime and avoid avahi-daemon being triggered via socket or
|    D-Bus activation during upgrades. (Closes: #768620)
|  * Mask avahi-daemon.service on remove to avoid the stop request being
|    cancelled via socket or D-Bus activation.

http://anonscm.debian.org/cgit/pkg-utopia/avahi.git/commit/?id=4a67d2cb50cab9d10c8fba0391c08db717fdcfb0
http://anonscm.debian.org/cgit/pkg-utopia/avahi.git/commit/?id=156908b9acccf8cc77a70b254e8200a70dd3ca40

Those two commits improve the systemd support by dealing with the fact
that avahi-daemon uses socket and D-Bus activation. So we need to apply
special care on upgrades and remove.

Full debdiff is attached.

Thanks for considering.

Michael


unblock avahi/0.6.31-5

-- System Information:
Debian Release: 8.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff --git a/debian/avahi-autoipd.if-down b/debian/avahi-autoipd.if-down
index 4ce959f..d60097b 100755
--- a/debian/avahi-autoipd.if-down
+++ b/debian/avahi-autoipd.if-down
@@ -10,6 +10,7 @@ set -e
 #                   See http://developer.apple.com/qa/qa2004/qa1357.html for
 #                   more information.
 
+[ -x /usr/sbin/avahi-autoipd ] || exit 0
 
 [ "$IFACE" != "lo" ] || exit 0
 case "$ADDRFAM" in
diff --git a/debian/avahi-autoipd.if-up b/debian/avahi-autoipd.if-up
index 4a57051..9e3a5e7 100755
--- a/debian/avahi-autoipd.if-up
+++ b/debian/avahi-autoipd.if-up
@@ -9,6 +9,8 @@ set -e
 #                   See http://developer.apple.com/qa/qa2004/qa1357.html for
 #                   more information.
 
+[ -x /usr/sbin/avahi-autoipd ] || exit 0
+
 [ "$IFACE" != "lo" ] || exit 0
 case "$ADDRFAM" in
 	inet) ;;
diff --git a/debian/avahi-daemon-check-dns.sh b/debian/avahi-daemon-check-dns.sh
index a163563..8f7893b 100755
--- a/debian/avahi-daemon-check-dns.sh
+++ b/debian/avahi-daemon-check-dns.sh
@@ -31,12 +31,17 @@ dns_reachable() {
   # If there is no local nameserver and no we have no global ip addresses
   # then we can't reach any nameservers
   if ! $(egrep -q "nameserver 127.0.0.1|::1" /etc/resolv.conf); then 
-    # Get addresses of all running interfaces
-    ADDRS=$(LC_ALL=C ifconfig | grep ' addr:')
-    # Filter out all local addresses
-    ADDRS=$(echo "${ADDRS}" | egrep -v ':127|Scope:Host|Scope:Link')
-    # Check we have a default route
-    ROUTES=$(route -n | grep '^0.0.0.0 ')
+    if [ -x "$(which ip)" ]; then
+      ADDRS=$(ip addr show scope global | grep inet)
+      ROUTES=$(ip route show 0.0.0.0/0)
+    elif [ -x "$(which ifconfig)" -a -x "$(which route)" ]; then
+      # Get addresses of all running interfaces
+      ADDRS=$(LC_ALL=C ifconfig | grep ' addr:')
+      # Filter out all local addresses
+      ADDRS=$(echo "${ADDRS}" | egrep -v ':127|Scope:Host|Scope:Link')
+      # Check we have a default route
+      ROUTES=$(route -n | grep '^0.0.0.0 ')
+    fi
     if [ -z "${ADDRS}" -o -z "${ROUTES}" ] ; then
       return 1;
     fi
@@ -96,10 +101,10 @@ enable_avahi () {
   # no unicast .local conflict, so remove the tag and start avahi again
   if [ -e ${DISABLE_TAG} ]; then
     rm -f ${DISABLE_TAG}
-    if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
-      invoke-rc.d avahi-daemon start || true
-    else
-      if [ -x "/etc/init.d/avahi-daemon" ]; then
+    if [ -x "/etc/init.d/avahi-daemon" ]; then
+      if [ -x "$(which invoke-rc.d 2>/dev/null)" ]; then
+        invoke-rc.d avahi-daemon start || true
+      else
         /etc/init.d/avahi-daemon start || true
       fi
     fi
@@ -110,12 +115,10 @@ disable_avahi () {
   [ -e ${DISABLE_TAG} ] && return
 
   if [ -x /etc/init.d/avahi-daemon ]; then
-    if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+    if [ -x "$(which invoke-rc.d 2>/dev/null)" ]; then
       invoke-rc.d --force avahi-daemon stop || true
     else
-      if [ -x "/etc/init.d/avahi-daemon" ]; then
-        /etc/init.d/avahi-daemon stop || true
-      fi
+      /etc/init.d/avahi-daemon stop || true
     fi
     if [ -x /usr/bin/logger ]; then
       logger -p daemon.warning -t avahi <<EOF
diff --git a/debian/avahi-daemon.postrm b/debian/avahi-daemon.postrm
index f79073a..4e7c220 100644
--- a/debian/avahi-daemon.postrm
+++ b/debian/avahi-daemon.postrm
@@ -2,6 +2,11 @@
 
 set -e
 
+# drop the temporary mask from prerm
+if [ -d /run/systemd/system ] && [ "$1" = remove ]; then
+    systemctl unmask --runtime avahi-daemon.service
+fi
+
 #DEBHELPER#
 
 if [ "$1" = "purge" ] ; then
diff --git a/debian/avahi-daemon.prerm b/debian/avahi-daemon.prerm
new file mode 100644
index 0000000..de0602e
--- /dev/null
+++ b/debian/avahi-daemon.prerm
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+# avoid cancelling of "stop" via socket or D-Bus activation
+if [ -d /run/systemd/system ] && [ "$1" = remove ]; then
+    systemctl mask --runtime avahi-daemon.service
+    # stop avahi-daemon manually since invoke-rc.d currently doesn't
+    # deal with masked services (see Bug #717109)
+    systemctl stop avahi-daemon.service || true
+fi
+
+#DEBHELPER#
diff --git a/debian/changelog b/debian/changelog
index 2d0b623..0ca3d47 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,22 @@
+avahi (0.6.31-5) unstable; urgency=medium
+
+  [ Andreas Henriksson ]
+  * Recommend iproute2 instead of transitional package iproute.
+  * Update avahi-daemon support scripts to use iproute2 tools if available
+    with a fallback to net-tools and graceful degradation if neither is
+    installed. (Closes: #762326)
+
+  [ Michael Biebl ]
+  * Don't run the avahi-autoipd ifupdown hook scripts if the package has been
+    removed but not purged. (Closes: #780872)
+  * Use --restart-after-upgrade for avahi-daemon and avahi-dnsconfd to
+    minimise downtime and avoid avahi-daemon being triggered via socket or
+    D-Bus activation during upgrades. (Closes: #768620)
+  * Mask avahi-daemon.service on remove to avoid the stop request being
+    cancelled via socket or D-Bus activation.
+
+ -- Michael Biebl <biebl@debian.org>  Mon, 13 Apr 2015 21:51:24 +0200
+
 avahi (0.6.31-4) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/control b/debian/control
index 4638b99..85ce4c0 100644
--- a/debian/control
+++ b/debian/control
@@ -80,7 +80,7 @@ Depends: ${shlibs:Depends},
          ${misc:Depends},
          adduser
 Recommends: isc-dhcp-client,
-            iproute
+            iproute2
 Conflicts: zeroconf
 Description: Avahi IPv4LL network address configuration daemon
  Avahi is a fully LGPL framework for Multicast DNS Service Discovery.
diff --git a/debian/rules b/debian/rules
index d41bf1d..3c23f40 100755
--- a/debian/rules
+++ b/debian/rules
@@ -47,8 +47,8 @@ override_dh_install:
 	dh_install --list-missing
 
 override_dh_installinit:
-	dh_installinit -pavahi-daemon -- start 14 2 3 4 5 . stop 86 0 1 6 .
-	dh_installinit -pavahi-dnsconfd -- start 16 2 3 4 5 . stop 84 0 1 6 .
+	dh_installinit -pavahi-daemon --restart-after-upgrade
+	dh_installinit -pavahi-dnsconfd --restart-after-upgrade
 
 override_dh_installdocs:
 	dh_installdocs --all docs/NEWS docs/README

Reply to: