Package: libnss-mdns
Version: 0.10-3.2
Severity: wishlist
Tags: patch

lib32nss-mdns was my last lib32* package, and it was annoying me, so
I've imported nss-mdns into git, updated the packaging and multiarched it.
I'm not going to upload just yet, to give its current uploaders a chance to
check it (and I'll probably also go via experimental).

I also intend to move it to /git/pkg-utopia/, add Vcs-* headers, and add the
same git-buildpackage goo as in dbus (gbp.conf etc.).

I imported from snapshots.debian.org rather than converting pkg-utopia SVN,
since this package seems to have had more NMUs than MUs...

gitweb: http://anonscm.debian.org/gitweb/?p=users/smcv/nss-mdns.git
git: git+ssh://git.debian.org/git/users/smcv/nss-mdns.git

The attached patch is the difference between the current source in
unstable, and the git repo *with patches applied* (in the git repo,
they're not).

    smcv
diff --git a/debian/changelog b/debian/changelog
index bea02d6..5be6ec9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,26 @@
+nss-mdns (0.10-4) UNRELEASED; urgency=low
+
+  * Add myself to Uploaders
+  * Acknowledge NMUs
+  * Remove 00_dns_unaligned_access.patch, already applied upstream in 0.10
+  * Convert to 3.0 (quilt) format, with 01_ia64_alignment.patch applied
+    as a patch by dpkg
+  * Bring debhelper compat up to 9
+  * Use dpkg's default.mk for architecture and hardening flags
+  * Use dh
+  * Make libnss-mdns Multi-arch: same (Closes: #686984)
+  * Switch lib32nss-mdns from a biarch package built on amd64 to a
+    transitional package built on i386: this means users of wheezy's
+    multiarch Wine packages, who already have i386 as a foreign
+    architecture, should automatically get cross-graded from
+    lib32nss-mdns:amd64 to lib32nss-mdns:i386 and hence to libnss-mdns:i386
+  * Simplify build system now that there is only one "flavour"
+  * debian/control: remove duplicate Section
+  * Standards-Version: 3.9.4 (no further changes)
+  * Run dh_install with --list-missing
+
+ -- Simon McVittie <s...@debian.org>  Wed, 29 May 2013 08:35:55 +0100
+
 nss-mdns (0.10-3.2) unstable; urgency=low
 
   * NMU.
diff --git a/debian/compat b/debian/compat
index 7ed6ff8..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-5
+9
diff --git a/debian/control b/debian/control
index 4933881..0b954dd 100644
--- a/debian/control
+++ b/debian/control
@@ -3,20 +3,24 @@ Section: admin
 Priority: optional
 Maintainer: Utopia Maintenance Team <pkg-utopia-maintain...@lists.alioth.debian.org>
 Uploaders: Loic Minier <l...@dooz.org>,
-           Sjoerd Simons <sjo...@debian.org>
-Build-Depends: debhelper (>= 5),
-               lynx,
-               gcc-multilib [amd64]
-Standards-Version: 3.8.2
+           Sjoerd Simons <sjo...@debian.org>,
+           Simon McVittie <s...@debian.org>
+Build-Depends: debhelper (>= 9),
+               dpkg-dev (>= 1.16.1~),
+               lynx
+Standards-Version: 3.9.4
 
 Package: libnss-mdns
-Section: admin
+Pre-Depends: ${misc:Pre-Depends}
 Depends: ${shlibs:Depends},
          ${misc:Depends},
          base-files (>= 3.1.10),
          avahi-daemon (>= 0.6.16-1)
 Suggests: avahi-autoipd | zeroconf
+Breaks: lib32nss-mdns (<< ${source:Version})
+Replaces: lib32nss-mdns (<< ${source:Version})
 Architecture: any
+Multi-Arch: same
 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
@@ -25,19 +29,17 @@ Description: NSS module for Multicast DNS name resolution
  domain .local.
 
 Package: lib32nss-mdns
-Section: admin
-Depends: ${shlibs:Depends},
-         ${misc:Depends},
-         base-files (>= 3.1.10),
-         avahi-daemon (>= 0.6.16-1)
-Suggests: avahi-autoipd | zeroconf
-Conflicts: libc6-i386 (<= 2.9-18)
-Architecture: amd64
-Description: NSS module for Multicast DNS name resolution (32-bits version)
+Section: oldlibs
+Priority: extra
+Pre-Depends: ${misc:Pre-Depends}
+Depends: libnss-mdns (= ${binary:Version}),
+         ${misc:Depends}
+Architecture: i386
+Multi-Arch: foreign
+Description: NSS module for mDNS name resolution (transitional package)
  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
- DNS (using Zeroconf, aka Apple Bonjour / Apple Rendezvous ), effectively
- allowing name resolution by common Unix/Linux programs in the ad-hoc mDNS
- domain .local.
+ DNS.
  .
- This package is built for 32-bits environments.
+ This transitional package exists to upgrade amd64 systems from
+ lib32nss-mdns:amd64 to libnss-mdns:i386.
diff --git a/debian/lib32nss-mdns.install b/debian/lib32nss-mdns.install
deleted file mode 100644
index e2352ee..0000000
--- a/debian/lib32nss-mdns.install
+++ /dev/null
@@ -1,2 +0,0 @@
-# from the m32 flavor
-debian/install/m32/lib/*.so.* usr/lib32
diff --git a/debian/libnss-mdns.docs b/debian/libnss-mdns.docs
index b359c69..080d8d3 100644
--- a/debian/libnss-mdns.docs
+++ b/debian/libnss-mdns.docs
@@ -1,2 +1,2 @@
 doc/style.css
-debian/build/main/doc/README.html
+doc/README.html
diff --git a/debian/libnss-mdns.install b/debian/libnss-mdns.install
index b0afb36..8171246 100644
--- a/debian/libnss-mdns.install
+++ b/debian/libnss-mdns.install
@@ -1,2 +1 @@
-# from the main flavor
-debian/install/main/lib/*.so.* lib
+lib/*/*.so.*
diff --git a/debian/patches/00_dns_unaligned_access.patch b/debian/patches/00_dns_unaligned_access.patch
deleted file mode 100644
index 9b9c7b5..0000000
--- a/debian/patches/00_dns_unaligned_access.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-Index: src/dns.c
-===================================================================
---- src/dns.c	(revision 102)
-+++ src/dns.c	(working copy)
-@@ -32,6 +32,33 @@
- 
- #include "dns.h"
- 
-+#define SET_16_P(data, value)                              \
-+  do {                                                     \
-+    uint16_t __value = value;                              \
-+    memcpy(data, &__value, sizeof(uint16_t));              \
-+  } while(0)
-+
-+#define SET_16(data, idx, value)                         \
-+  SET_16_P(((uint8_t *)data) + idx * sizeof(uint16_t)/sizeof(uint8_t), value) 
-+
-+#define GET_16_P(data, value)                   \
-+  do {                                          \
-+    uint8_t *__value = ((uint8_t *)&value);     \
-+    memcpy(__value, data, sizeof(uint16_t));    \
-+  } while(0)
-+    
-+#define GET_16(data, idx, value) \
-+  GET_16_P(((uint8_t *)data) + idx * sizeof(uint16_t)/sizeof(uint8_t), value) 
-+
-+#define GET_32_P(data, value)                   \
-+  do {                                          \
-+    uint8_t *__value = ((uint8_t *)&value);     \
-+    memcpy(__value, data, sizeof(uint32_t));    \
-+  } while(0)
-+    
-+#define GET_32(data, idx, value) \
-+  GET_32_P(((uint8_t *)data) + idx * sizeof(uint32_t)/sizeof(uint8_t), value) 
-+
- struct dns_packet* dns_packet_new(void) {
-     struct dns_packet *p;
- 
-@@ -51,15 +78,19 @@
- void dns_packet_set_field(struct dns_packet *p, unsigned idx, uint16_t v) {
-     assert(p);
-     assert(idx < 2*6);
-+
-     
--    ((uint16_t*) p->data)[idx] = htons(v);
-+    SET_16(p->data, idx, htons(v));
- }
- 
- uint16_t dns_packet_get_field(struct dns_packet *p, unsigned idx) {
-     assert(p);
-     assert(idx < 2*6);
-+    uint16_t r;
- 
--    return ntohs(((uint16_t*) p->data)[idx]);
-+    GET_16(p->data, idx, r);
-+
-+    return ntohs(r);
- }
- 
- uint8_t* dns_packet_append_name(struct dns_packet *p, const char *name) {
-@@ -102,7 +133,7 @@
-     assert(p);
-     
-     d = dns_packet_extend(p, sizeof(uint16_t));
--    *((uint16_t*) d) = htons(v);
-+    SET_16_P(d, htons(v));
-     
-     return d;
- }
-@@ -120,7 +151,7 @@
- }
- 
- uint8_t *dns_packet_append_name_compressed(struct dns_packet *p, const char *name, uint8_t *prev) {
--    int16_t *d;
-+    uint8_t *d;
-     signed long k;
-     assert(p);
- 
-@@ -131,8 +162,8 @@
-     if (k < 0 || k >= 0x4000 || (size_t) k >= p->size)
-         return dns_packet_append_name(p, name);
- 
--    d = (int16_t*) dns_packet_extend(p, sizeof(uint16_t));
--    *d = htons((0xC000 | k));
-+    d = dns_packet_extend(p, sizeof(uint16_t));
-+    SET_16_P(d, htons((0xC000 | k)));
-     
-     return prev;
- }
-@@ -246,11 +277,13 @@
- 
- int dns_packet_consume_uint16(struct dns_packet *p, uint16_t *ret_v) {
-     assert(p && ret_v);
-+    uint16_t r;
- 
-     if (p->rindex + sizeof(uint16_t) > p->size)
-         return -1;
--
--    *ret_v = ntohs(*((uint16_t*) (p->data + p->rindex)));
-+    
-+    GET_16_P(p->data + p->rindex, r);
-+    *ret_v =  ntohs(r);
-     p->rindex += sizeof(uint16_t);
- 
-     return 0;
-@@ -258,11 +291,13 @@
- 
- int dns_packet_consume_uint32(struct dns_packet *p, uint32_t *ret_v) {
-     assert(p && ret_v);
-+    uint32_t r;
- 
-     if (p->rindex + sizeof(uint32_t) > p->size)
-         return -1;
- 
--    *ret_v = ntohl(*((uint32_t*) (p->data + p->rindex)));
-+    GET_32_P(p->data + p->rindex, r);
-+    *ret_v = ntohl(r);
-     p->rindex += sizeof(uint32_t);
-     
-     return 0;
diff --git a/debian/patches/01_ia64_alignment.patch b/debian/patches/01_ia64_alignment.patch
index 7f1cbae..f8db76e 100644
--- a/debian/patches/01_ia64_alignment.patch
+++ b/debian/patches/01_ia64_alignment.patch
@@ -1,5 +1,13 @@
---- src/nss.c	2007-05-13 00:43:48.000000000 +1000
-+++ src/nss.c	2009-03-26 02:08:57.944206926 +1100
+From: Steve Kowalik <stev...@debian.org>
+Date: Sat, 10 Sep 2011 17:04:29 +1000
+Subject: Fix unaligned access on successful lookups on interesting 64-bit systems
+  
+Origin: vendor, Debian
+Bug-Debian: http://bugs.debian.org/521184
+Forwarded: no
+
+--- a/src/nss.c	2007-05-13 00:43:48.000000000 +1000
++++ b/src/nss.c	2009-03-26 02:08:57.944206926 +1100
 @@ -69,7 +69,7 @@
  
  #define ALIGN(idx) do { \
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..8bef99b
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+01_ia64_alignment.patch
diff --git a/debian/rules b/debian/rules
index 3ab2947..5336909 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,33 +1,15 @@
 #!/usr/bin/make -f
 
-STAMP_DIR := debian/stampdir
+export DEB_CFLAGS_MAINT_APPEND=-Wall
+export DEB_LDFLAGS_MAINT_APPEND=-Wl,-z,defs
 
-DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
-DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+include /usr/share/dpkg/default.mk
 
-# list of flavors we build; each gets a builddir, a configure pass (configure
-# args are defined below), a build pass, and an install pass (in two steps)
-# Note: the main flavor is required
-FLAVORS := main
+%:
+	dh $@
 
-# 32-bits flavor for 32-bits programs such as Sun's Java; see #410052
-ifeq (amd64,$(DEB_HOST_ARCH))
-FLAVORS += m32
-endif
-
-# build dir for the current flavor; this is only expanded in flavor specific
-# targets
-# Note: dh_clean will rm -rf debian/tmp, hence all builds
-builddir = $(buildbasedir)/$*
-buildbasedir = $(CURDIR)/debian/build
-
-# install dir for the current flavor; this is only expanded in flavor specific
-# targets
-installdir = $(installbasedir)/$*
-installbasedir = $(CURDIR)/debian/install
-
-configure_flags += \
+override_dh_auto_configure:
+	dh_auto_configure -- \
 		--prefix=/ \
 		--mandir=/usr/share/man \
 		--infodir=/usr/share/info \
@@ -35,70 +17,7 @@ configure_flags += \
 		--localstatedir=/var \
 		--libexecdir=/lib/nss-mdns \
 		--disable-legacy \
-		--build=$(DEB_BUILD_GNU_TYPE)
-ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
-	configure_flags += --host=$(DEB_HOST_GNU_TYPE)
-endif
-
-common_cflags := -Wall -g -O$(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),0,2)
-main_cflags := $(common_cflags)
-m32_cflags := $(common_cflags) -m32
-
-LDFLAGS += -Wl,-z,defs
-
-$(STAMP_DIR)/configure-stamp-%:
-	dh_testdir
-	mkdir -p $(builddir)
-	cd $(builddir) && \
-		CFLAGS="$($*_cflags)" LDFLAGS="$(LDFLAGS)" \
-			$(CURDIR)/configure $(configure_flags)
-	-mkdir -p $(STAMP_DIR)
-	touch $@
-
-configure: $(addprefix $(STAMP_DIR)/configure-stamp-, $(FLAVORS))
-
-$(STAMP_DIR)/build-stamp-%: $(STAMP_DIR)/configure-stamp-%
-	dh_testdir
-	$(MAKE) -C $(builddir)
-	touch $@
-
-build: $(addprefix $(STAMP_DIR)/build-stamp-, $(FLAVORS))
-
-$(STAMP_DIR)/install-stamp-%: $(STAMP_DIR)/build-stamp-%
-	mkdir -p $(installdir)
-	$(MAKE) -C $(builddir) install DESTDIR=$(installdir)
-	touch $@
-
-install: $(addprefix $(STAMP_DIR)/install-stamp-, $(FLAVORS))
-
-clean:
-	dh_testdir
-	dh_testroot
-	# remove install and build dirs
-	rm -rf $(installbasedir)
-	rm -rf $(buildbasedir)
-	-rm -rf $(STAMP_DIR)
-	dh_clean
-
-binary-indep: build install
-
-binary-arch: build install
-	dh_testdir
-	dh_testroot
-	dh_installchangelogs -s
-	dh_installdocs -s
-	dh_install -s
-	dh_installman -s
-	dh_link -s
-	dh_strip -s
-	dh_compress -s
-	dh_fixperms -s
-	dh_makeshlibs -s
-	dh_installdeb -s
-	dh_shlibdeps -s
-	dh_gencontrol -s
-	dh_md5sums -s
-	dh_builddeb -s
+		$(NULL)
 
-binary: binary-indep binary-arch
-.PHONY: configure build install clean binary-indep binary-arch binary
+override_dh_install:
+	dh_install --list-missing
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)

Reply via email to