--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: buster-pu: package avahi/0.7-4
- From: Sjoerd Simons <sjoerd@debian.org>
- Date: Sun, 14 Feb 2021 15:18:50 +0100
- Message-id: <161331233010.973010.1740973194702438397.reportbug@beast>
Package: release.debian.org
Severity: normal
Tags: buster
User: release.debian.org@packages.debian.org
Usertags: pu
X-Debbugs-Cc: Salvatore Bonaccorso <carnil@debian.org>
[ Reason ]
Avahi's detection of .local on unicast dns servers can cause issues and is no
longer needed with versions of libnss-mdns present in buster and newer.
[ Tests ]
Tested fresh installation and upgrade from current buster version in docker
container as well as upgrade from current buster version on personal servers.
[ Risks ]
Low risk; Removed hooks code for resolvconf/ifupdown which is no longer
necessary with versions of libnss-mdns present in buster and newer.
[ Changes ]
Hook script for if-up.d/if-down.d and update-libc.d are removed on upgrade
diff -Nru avahi-0.7/debian/avahi-daemon-check-dns.sh avahi-0.7/debian/avahi-daemon-check-dns.sh
--- avahi-0.7/debian/avahi-daemon-check-dns.sh 2018-04-27 12:59:11.000000000 +0200
+++ avahi-0.7/debian/avahi-daemon-check-dns.sh 1970-01-01 01:00:00.000000000 +0100
@@ -1,159 +0,0 @@
-#!/bin/sh
-#
-# If we have an unicast .local domain, we immediately disable avahi to avoid
-# conflicts with the multicast IP4LL .local domain
-
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
-
-RUNDIR="/var/run/avahi-daemon/"
-DISABLE_TAG="$RUNDIR/disabled-for-unicast-local"
-NS_CACHE="$RUNDIR/checked_nameservers"
-
-AVAHI_DAEMON_DETECT_LOCAL=1
-
-test -f /etc/default/avahi-daemon && . /etc/default/avahi-daemon
-
-if [ "$AVAHI_DAEMON_DETECT_LOCAL" != "1" ]; then
- exit 0
-fi
-
-ensure_rundir() {
- if [ ! -d ${RUNDIR} ] ; then
- mkdir -m 0755 -p ${RUNDIR}
- chown avahi:avahi ${RUNDIR}
- fi
-}
-
-log_disable_warning() {
- if [ -x /usr/bin/logger ]; then
- logger -p daemon.warning -t avahi <<EOF
-Avahi detected that your currently configured local DNS server serves
-a domain .local. This is inherently incompatible with Avahi and thus
-Avahi stopped itself. If you want to use Avahi in this network, please
-contact your administrator and convince him to use a different DNS domain,
-since .local should be used exclusively for Zeroconf technology.
-For more information, see http://avahi.org/wiki/AvahiAndUnicastDotLocal
-EOF
- fi
-}
-
-dns_reachable() {
- # If there are no nameserver entries in resolv.conf there is no dns reachable
- $(grep -q nameserver /etc/resolv.conf) || return 1;
-
- # 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
- 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
- fi
-
- return 0
-}
-
-dns_has_local() {
- # Some magic to do tests
- if [ -n "${FAKE_HOST_RETURN}" ] ; then
- if [ "${FAKE_HOST_RETURN}" = "true" ]; then
- return 0;
- else
- return 1;
- fi
- fi
-
- OUT=`LC_ALL=C host -t soa local. 2>&1`
- if [ $? -eq 0 ] ; then
- if echo "$OUT" | egrep -vq 'has no|not found'; then
- return 0
- fi
- else
- # Checking the dns servers failed. Assuming no .local unicast dns, but
- # remove the nameserver cache so we recheck the next time we're triggered
- rm -f ${NS_CACHE}
- fi
- return 1
-}
-
-dns_needs_check() {
- TMP_CACHE="${NS_CACHE}.$$"
- RET=0
-
- ensure_rundir
- cat /etc/resolv.conf | grep "nameserver" | sort > ${TMP_CACHE} || return 0
-
- if [ -e ${NS_CACHE} ]; then
- DIFFERENCE=$(diff -w ${NS_CACHE} ${TMP_CACHE})
- echo "${DIFFERENCE}" | grep -q '^>'
- ADDED=$?
- echo "${DIFFERENCE}" | grep -q '^<'
- REMOVED=$?
- # Avahi was disabled and no servers were removed, no need to recheck
- [ -e ${DISABLE_TAG} ] && [ ${REMOVED} -ne 0 ] && RET=1
- # Avahi was enabled and no servers were added, no need to recheck
- [ ! -e ${DISABLE_TAG} ] && [ ${ADDED} -ne 0 ] && RET=1
- fi
-
- mv ${TMP_CACHE} ${NS_CACHE}
- return ${RET};
-}
-
-
-enable_avahi () {
- # no unicast .local conflict, so remove the tag and start avahi again
- if [ -e ${DISABLE_TAG} ]; then
- rm -f ${DISABLE_TAG}
- if [ -d /run/systemd/system ]; then
- systemctl start avahi-daemon.socket avahi-daemon.service || true
- elif [ -x "/etc/init.d/avahi-daemon" ]; then
- /etc/init.d/avahi-daemon start || true
- fi
- fi
-}
-
-disable_avahi () {
- [ -e ${DISABLE_TAG} ] && return
-
- if [ -d /run/systemd/system ]; then
- systemctl stop avahi-daemon.socket avahi-daemon.service || true
- log_disable_warning
- elif [ -x "/etc/init.d/avahi-daemon" ]; then
- /etc/init.d/avahi-daemon stop || true
- log_disable_warning
- fi
- ensure_rundir
- touch ${DISABLE_TAG}
-}
-
-if ! dns_reachable ; then
- # No unicast dns server reachable, so enable avahi
- enable_avahi
- # And blow away the dns cache, so we force a recheck when the interface comes
- # up again
- rm -f ${NS_CACHE}
- exit 0
-fi
-
-# Check if the dns needs checking..
-dns_needs_check || exit 0
-
-if dns_has_local ; then
- # .local from dns server, disabling avahi
- disable_avahi
-else
- # no .local from dns server, enabling avahi
- enable_avahi
-fi
-
-exit 0
diff -Nru avahi-0.7/debian/avahi-daemon.if-up avahi-0.7/debian/avahi-daemon.if-up
--- avahi-0.7/debian/avahi-daemon.if-up 2018-04-27 12:59:11.000000000 +0200
+++ avahi-0.7/debian/avahi-daemon.if-up 1970-01-01 01:00:00.000000000 +0100
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-# Don't run the avahi-daemon unicast local check while bringing up
-# the loopback device; it's not necessary until we bring up a real network
-# device
-[ "$IFACE" != "lo" ] || exit 0
-case "$ADDRFAM" in
- inet|inet6) ;;
- *) exit 0 ;;
-esac
-
-# If we have an unicast .local domain, we immediately disable avahi to avoid
-# conflicts with the multicast IP4LL .local domain
-if [ -x /usr/lib/avahi/avahi-daemon-check-dns.sh ] ; then
- exec /usr/lib/avahi/avahi-daemon-check-dns.sh
-fi
diff -Nru avahi-0.7/debian/avahi-daemon.links avahi-0.7/debian/avahi-daemon.links
--- avahi-0.7/debian/avahi-daemon.links 2018-04-27 12:59:11.000000000 +0200
+++ avahi-0.7/debian/avahi-daemon.links 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-etc/network/if-up.d/avahi-daemon etc/network/if-post-down.d/avahi-daemon
diff -Nru avahi-0.7/debian/avahi-daemon.maintscript avahi-0.7/debian/avahi-daemon.maintscript
--- avahi-0.7/debian/avahi-daemon.maintscript 1970-01-01 01:00:00.000000000 +0100
+++ avahi-0.7/debian/avahi-daemon.maintscript 2021-02-13 20:35:49.000000000 +0100
@@ -0,0 +1,2 @@
+rm_conffile /etc/network/if-up.d/avahi-daemon 0.7-4+deb10u1~ avahi-daemon
+rm_conffile /etc/resolvconf/update-libc.d/avahi-daemon 0.7.-4+deb10u1~ avahi-daemon
diff -Nru avahi-0.7/debian/avahi-daemon.resolvconf avahi-0.7/debian/avahi-daemon.resolvconf
--- avahi-0.7/debian/avahi-daemon.resolvconf 2018-04-27 12:59:11.000000000 +0200
+++ avahi-0.7/debian/avahi-daemon.resolvconf 1970-01-01 01:00:00.000000000 +0100
@@ -1,8 +0,0 @@
-#!/bin/sh
-#
-# If we have an unicast .local domain, we immediately disable avahi to avoid
-# conflicts with the multicast IP4LL .local domain
-
-if [ -x /usr/lib/avahi/avahi-daemon-check-dns.sh ]; then
- exec /usr/lib/avahi/avahi-daemon-check-dns.sh
-fi
diff -Nru avahi-0.7/debian/changelog avahi-0.7/debian/changelog
--- avahi-0.7/debian/changelog 2018-04-27 12:59:11.000000000 +0200
+++ avahi-0.7/debian/changelog 2021-02-13 20:35:49.000000000 +0100
@@ -1,3 +1,15 @@
+avahi (0.7-4+deb10u1) buster; urgency=medium
+
+ [ Simon McVittie ]
+ * Remove avahi-daemon-check-dns mechanism, no longer needed.
+ Thanks to Trent Lloyd, Sebastien Bacher (LP: #1870824)
+ (Closes: #433945, #559927, #629509, #747895, #878586, #898038, #929010)
+
+ [ Sjoerd Simons ]
+ * Don't remove avahi-daemon postdown symlink in maintscript
+
+ -- Sjoerd Simons <sjoerd@debian.org> Sat, 13 Feb 2021 20:35:49 +0100
+
avahi (0.7-4) unstable; urgency=medium
* Team upload
diff -Nru avahi-0.7/debian/control avahi-0.7/debian/control
--- avahi-0.7/debian/control 2018-04-27 12:59:11.000000000 +0200
+++ avahi-0.7/debian/control 2021-02-13 20:35:49.000000000 +0100
@@ -38,7 +38,7 @@
dbus (>= 0.60),
lsb-base (>= 3.0-6),
bind9-host | host
-Recommends: libnss-mdns
+Recommends: libnss-mdns (>= 0.11),
Suggests: avahi-autoipd
Multi-Arch: foreign
Description: Avahi mDNS/DNS-SD daemon
@@ -350,7 +350,7 @@
Architecture: any
Depends: ${shlibs:Depends},
${misc:Depends}
-Recommends: libnss-mdns
+Recommends: libnss-mdns (>= 0.11),
Pre-Depends: ${misc:Pre-Depends}
Multi-Arch: same
Description: Avahi Apple Bonjour compatibility library
diff -Nru avahi-0.7/debian/gbp.conf avahi-0.7/debian/gbp.conf
--- avahi-0.7/debian/gbp.conf 2018-04-27 12:59:11.000000000 +0200
+++ avahi-0.7/debian/gbp.conf 2021-02-13 20:35:49.000000000 +0100
@@ -1,5 +1,5 @@
[DEFAULT]
pristine-tar = True
-debian-branch = debian/master
+debian-branch = debian/buster
upstream-branch = upstream/latest
patch-numbers = False
diff -Nru avahi-0.7/debian/rules avahi-0.7/debian/rules
--- avahi-0.7/debian/rules 2018-04-27 12:59:11.000000000 +0200
+++ avahi-0.7/debian/rules 2021-02-13 20:35:49.000000000 +0100
@@ -47,10 +47,6 @@
override_dh_auto_install:
dh_auto_install
- install -D -o root -g root -m 755 debian/avahi-daemon.resolvconf \
- debian/avahi-daemon/etc/resolvconf/update-libc.d/avahi-daemon
- install -D -o root -g root -m 755 debian/avahi-daemon-check-dns.sh \
- debian/avahi-daemon/usr/lib/avahi/avahi-daemon-check-dns.sh
ifeq (linux,$(DEB_HOST_ARCH_OS))
mv debian/tmp/etc/dhcp/dhclient-exit-hooks.d/avahi-autoipd \
debian/tmp/etc/dhcp/dhclient-exit-hooks.d/zzz_avahi-autoipd
--- End Message ---