> Hmm, why's that? I mean, it would make a lot of sense to include the
> submitter in all CCs regarding the bug.

That depends on whether the submitter has anything valuable to
contribute technically. BTW, you forgot to CC me again..

> BTW, did Anand react in any way on your and Sjoerds NMUs? Or did he
> vanish without a trace?

I'm still waiting to hear from him. My NMU will arrive in the archive in
a day or 2. I've attached an updated diff of my changes.

-- 
see shy jo
diff --new-file -ur old/nss-mdns-0.8/debian/README.Debian 
nss-mdns-0.8/debian/README.Debian
--- old/nss-mdns-0.8/debian/README.Debian       2006-09-22 21:25:56.000000000 
-0400
+++ nss-mdns-0.8/debian/README.Debian   2006-10-04 18:45:03.000000000 -0400
@@ -2,43 +2,23 @@
 MODIFYING /etc/nsswitch.conf
 ----------------------------
 
-Previously the base-files package shipped /etc/nsswitch.conf and specified:
+/etc/nsswitch.conf is modified when this package is installed, to make mdns
+be used. The hosts line is changed to look like this:
 
-hosts:          files dns mdns
+hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
 
-However, due to bug#351990, this is no longer the case. /etc/nsswitch.conf
-is now generated post-installation. At this time this package does not
-modify /etc/nsswitch.conf (it will in future -- patches welcome).
-
-This means that, for now, you should modify /etc/nsswitch.conf yourself
-and set the hosts: line to be:
-
-hosts: files mdns_minimal dns mdns
-
-WHAT ABOUT UPSTREAM?
---------------------
-
-Upstream recommends a slightly different line, which make mDNS authoriative
-for both the .local, 169.254.0.0/16 and fe80::/16 zones. This means that
-local administrators do not have the opprotunity to insert entries into
-any of those zones (unlikely but possible).
-
-Additionally, using the recommended upstream line can cause interaction
-issues with whois and incorrectly configured Windows installations (not
-surprisingly many "enterprises" use .local for their internal servers).
+If you prefer a different setup, you can modify this line, and your changes
+will be preserved. If this package is purged, the mdns items will be
+removed from the hosts line.
 
 WHAT ABOUT IPv6?
 ----------------
 
-mDNS (multicast DNS) has been widely deployed within the Apple
-community (since Mac OS X 10.1) and by many printer manufacturers.
-
-Initially the mDNS entries only contained IPv4 addresses, however,
-since Mac OS X 10.3 onwards, mDNS entries have also been populated with
-IPv6 addresses.
+To support ipv6, edit /etc/nsswitch.conf and change it to a line such as
+this:
 
-Therefore Debian, once again, differs from upstream by recommending
-an entry which looks up addresses via both IPv4 and IPv6.
+hosts: files mdns_minimal [NOTFOUND=return] dns mdns
 
--- Anand Kumria <[EMAIL PROTECTED]>, Sun, 2 Jul 2006 21:36:18 +1000
+Note that this can result in delays when resolving mDNS names.
 
+ -- Joey Hess <[EMAIL PROTECTED]>  Wed,  4 Oct 2006 18:42:48 -0400
diff --new-file -ur old/nss-mdns-0.8/debian/changelog 
nss-mdns-0.8/debian/changelog
--- old/nss-mdns-0.8/debian/changelog   2006-09-22 21:25:56.000000000 -0400
+++ nss-mdns-0.8/debian/changelog       2006-10-04 19:00:47.000000000 -0400
@@ -1,3 +1,19 @@
+nss-mdns (0.8-4.2) unstable; urgency=low
+
+  * NMU
+  * Add postinst that will add mdns entries to /etc/nsswitch.conf on new
+    installs and on upgrades from the previous version.
+    Closes: #388864, #351990
+  * Add postrm to remove mdns entries from /etc/nsswitch.conf when the package
+    is removed.
+  * Local modifications to the file will be preserved accross upgrades.
+  * Depend on base-files 3.1.10 or higher to get a nsswitch.conf that is not a
+    conffile and that doesn't have mdns entries from base-files in it.
+  * Switch to nsswitch line recommended by upstream in #388864.
+  * 
+
+ -- Joey Hess <[EMAIL PROTECTED]>  Fri, 22 Sep 2006 21:10:25 -0400
+
 nss-mdns (0.8-4.1) unstable; urgency=low
 
   * NMU
diff --new-file -ur old/nss-mdns-0.8/debian/control nss-mdns-0.8/debian/control
--- old/nss-mdns-0.8/debian/control     2006-09-22 21:25:56.000000000 -0400
+++ nss-mdns-0.8/debian/control 2006-10-04 18:52:25.000000000 -0400
@@ -7,10 +7,9 @@
 
 Package: libnss-mdns
 Section: admin
-Recommends: zeroconf
 Suggests: avahi-daemon
 Architecture: any
-Depends: ${shlibs:Depends}
+Depends: ${shlibs:Depends}, base-files (>= 3.1.10)
 Description: NSS module for Multicast DNS name resolution
  nss-mdns is a plugin for the GNU Name Service Switch (NSS) functionality
  of the GNU C Library (glibc) providing host name resolution via Multicast
diff --new-file -ur old/nss-mdns-0.8/debian/postinst 
nss-mdns-0.8/debian/postinst
--- old/nss-mdns-0.8/debian/postinst    1969-12-31 19:00:00.000000000 -0500
+++ nss-mdns-0.8/debian/postinst        2006-10-04 18:58:41.000000000 -0400
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -e
+#DEBHELPER#
+
+if [ "$1" = configure ] && [ -e /etc/nsswitch.conf ]; then
+       if [ -z "$2" ] || dpkg --compare-versions "$2" le 0.8-4.1; then
+               perl -i -pe '
+                       sub insert {
+                               my @bits=split(" ", shift);
+                               if (grep { $_ eq "mdns4_minimal" || $_ eq 
"mdns4"
+                                       || $_ eq "mdns" || $_ eq "mdns_minimal" 
} @bits) {
+                                       return join " ", @bits;
+                               }
+                               @bits = map {
+                                       $_ eq "files" ? 
($_,"mdns4_minimal","[NOTFOUND=return]") : $_
+                               } @bits;
+                               push @bits, "mdns4";
+                               return join " ", @bits;
+                       }
+                       s/^(hosts:\s+)(.*)/$1.insert($2)/e;
+               ' /etc/nsswitch.conf
+       fi
+fi
diff --new-file -ur old/nss-mdns-0.8/debian/postrm nss-mdns-0.8/debian/postrm
--- old/nss-mdns-0.8/debian/postrm      1969-12-31 19:00:00.000000000 -0500
+++ nss-mdns-0.8/debian/postrm  2006-10-04 18:56:45.000000000 -0400
@@ -0,0 +1,18 @@
+#!/bin/sh
+set -e
+#DEBHELPER#
+
+if [ "$1" = purge ] && [ -e /etc/nsswitch.conf ]; then
+       perl -i -pe '
+               sub remove {
+                       my @bits=grep { $_ ne "mdns4_minimal" &&
+                                       $_ ne "mdns4" &&
+                                       $_ ne "mdns_minimal" &&
+                                       $_ ne "mdns" &&
+                                       $_ ne "[NOTFOUND=return]" }
+                               split(" ", shift);
+                       return join " ", @bits;
+               }
+               s/^(hosts:\s+)(.*)/$1.remove($2)/e;
+       ' /etc/nsswitch.conf
+fi

Attachment: signature.asc
Description: Digital signature

Reply via email to