Source: libselinux
Version: 2.0.98-1
Severity: wishlist
Tags: patch
Usertags: multiarch

Hi Manoj (and Russell),

Attached please find the patch for the libselinux NMU we discussed,
converting this library package over to use multiarch.  This patch has been
heavily tested against libselinux 2.0.96 in Ubuntu, so I don't expect there
to be any problems introduced by this change in Debian.

I'll upload this change to unstable shortly.

Thanks,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
diff -u libselinux-2.0.98/debian/changelog libselinux-2.0.98/debian/changelog
--- libselinux-2.0.98/debian/changelog
+++ libselinux-2.0.98/debian/changelog
@@ -1,3 +1,14 @@
+libselinux (2.0.98-1.1) unstable; urgency=low
+
+  * Non-maintainer upload with permission of the maintainer.
+  * Build for multiarch, setting Pre-Depends multiarch-support in our shared
+    lib package.
+  * Always use -n with gzip, to avoid encoding timestamps in the gzip file;
+    this ensures compressed docs and other files are identical across
+    multiple builds, required for multiarch.
+
+ -- Steve Langasek <vor...@debian.org>  Tue, 21 Jun 2011 07:24:02 +0000
+
 libselinux (2.0.98-1) unstable; urgency=low
 
   * New upstream release
diff -u libselinux-2.0.98/debian/local-vars.mk libselinux-2.0.98/debian/local-vars.mk
--- libselinux-2.0.98/debian/local-vars.mk
+++ libselinux-2.0.98/debian/local-vars.mk
@@ -27,7 +27,7 @@
 
 PREFIX  = /usr
 BINDIR  = $(TMPTOP)$(PREFIX)/bin
-LIBDIR  = $(TMPTOP)/lib
+LIBDIR  = $(TMPTOP)/lib/$(DEB_HOST_MULTIARCH)
 INCLUDE = $(TMPTOP)$(PREFIX)/include
 INCDIR  = $(INCLUDE)/selinux
 
diff -u libselinux-2.0.98/debian/control libselinux-2.0.98/debian/control
--- libselinux-2.0.98/debian/control
+++ libselinux-2.0.98/debian/control
@@ -7,7 +7,7 @@
 Uploaders: Russell Coker <russ...@coker.com.au>
 Standards-Version: 3.8.4.0
 Build-Depends: file, libsepol1-dev (>= 2.0.40), python-all-dev (>= 2.3.5-11),
-               swig, ruby1.8-dev, ruby, pkg-config
+               swig, ruby1.8-dev, ruby, pkg-config, dpkg-dev (>= 1.16.0)
 XS-Python-Version: >= 2.4
 
 Package: selinux-utils
@@ -25,6 +25,8 @@
 Package: libselinux1
 Architecture: any
 Priority: required
+Multi-Arch: same
+Pre-Depends: multiarch-support
 Depends: ${shlibs:Depends}
 Description: SELinux runtime shared libraries
  This package provides the shared libraries for Security-enhanced
diff -u libselinux-2.0.98/debian/local.mk libselinux-2.0.98/debian/local.mk
--- libselinux-2.0.98/debian/local.mk
+++ libselinux-2.0.98/debian/local.mk
@@ -96,14 +96,14 @@
 	$(make_directory)   $(LIBDIR)
 	$(make_directory)   $(TMPTOP)/DEBIAN
 	$(install_file)	    debian/shlibs	     $(TMPTOP)/DEBIAN
-	$(MAKE)		    DESTDIR=$(TMPTOP) -C src install
+	$(MAKE)		    DESTDIR=$(TMPTOP) SHLIBDIR=$(LIBDIR) -C src install
 	rm -f		    $(LIBDIR)/libselinux.a
 	rm -f		    $(LIBDIR)/libselinux.so
 	rm -rf		    $(TMPTOP)/usr/lib/
 	chmod 0644          $(LIBDIR)/libselinux.so.1
 	$(install_file)	    debian/changelog	     $(DOCDIR)/changelog.Debian
 	$(install_file)	    ChangeLog		     $(DOCDIR)/changelog
-	gzip -9fqr	    $(DOCDIR)/
+	gzip -9fqrn	    $(DOCDIR)/
 # Make sure the copyright file is not compressed
 	$(install_file)	     debian/copyright	     $(DOCDIR)/copyright
 	$(install_file)	     debian/lintian.overrides $(LINTIANDIR)/$(package)
@@ -127,15 +127,15 @@
 	rm -rf		    $(MAN5DIR)
 	rm -rf		    $(MAN8DIR)
 	$(MAKE)		    DESTDIR=$(TMPTOP) -C include install
-	$(MAKE)		    DESTDIR=$(TMPTOP) -C src install
-	rm -fr		    $(LIBDIR)
-	rm -f		    $(TMPTOP)/usr/lib/libselinux.so
-	ln -s               /lib/libselinux.so.1     $(TMPTOP)/usr/lib/libselinux.so
+	$(MAKE)		    DESTDIR=$(TMPTOP) LIBDIR=$(TMPTOP)/usr/lib/$(DEB_HOST_MULTIARCH) SHLIBDIR=$(LIBDIR) -C src install
+	rm -fr		    $(TMPTOP)/lib
+	rm -f		    $(TMPTOP)/usr/lib/$(DEB_HOST_MULTIARCH)/libselinux.so
+	ln -s               /lib/$(DEB_HOST_MULTIARCH)/libselinux.so.1     $(TMPTOP)/usr/lib/$(DEB_HOST_MULTIARCH)/libselinux.so
 	rm -rf              $(TMPTOP)/usr/lib/python2.4/
 	$(install_file)	    debian/changelog 	     $(DOCDIR)/changelog.Debian
 	$(install_file)	    ChangeLog		     $(DOCDIR)/changelog
-	gzip -9fqr	    $(DOCDIR)/
-	gzip -9fqr	    $(MANDIR)/
+	gzip -9fqrn	    $(DOCDIR)/
+	gzip -9fqrn	    $(MANDIR)/
 # Make sure the copyright file is not compressed
 	$(install_file)	     debian/copyright	     $(DOCDIR)/copyright
 	$(strip-lib)
@@ -174,7 +174,7 @@
         done; echo "$$versions" > $(MODULES_DIR)/.version
 	$(install_file)	    debian/changelog 	     $(DOCDIR)/changelog.Debian
 	$(install_file)	    ChangeLog		     $(DOCDIR)/changelog
-	gzip -9fqr	    $(DOCDIR)/
+	gzip -9fqrn	    $(DOCDIR)/
 # Make sure the copyright file is not compressed
 	$(install_file)	     debian/copyright	     $(DOCDIR)/copyright
 	$(strip-lib)
@@ -193,7 +193,7 @@
 	$(MAKE)             DESTDIR=$(TMPTOP) RUBYINSTALL=$(RUBYINSTALL) install-rubywrap;
 	$(install_file)	    debian/changelog 	     $(DOCDIR)/changelog.Debian
 	$(install_file)	    ChangeLog		     $(DOCDIR)/changelog
-	gzip -9fqr	    $(DOCDIR)/
+	gzip -9fqrn	    $(DOCDIR)/
 # Make sure the copyright file is not compressed
 	$(install_file)	     debian/copyright	     $(DOCDIR)/copyright
 	$(strip-lib)
@@ -221,8 +221,8 @@
 	$(MAKE) DESTDIR=$(TMPTOP) -C utils install
 	$(install_file)	     debian/changelog	     $(DOCDIR)/changelog.Debian
 	$(install_file)	    ChangeLog		     $(DOCDIR)/changelog
-	gzip -9fqr	    $(DOCDIR)/
-	gzip -9fqr	    $(MANDIR)/
+	gzip -9fqrn	    $(DOCDIR)/
+	gzip -9fqrn	    $(MANDIR)/
 # Make sure the copyright file is not compressed
 	$(install_file)	     debian/copyright	     $(DOCDIR)/copyright
 	$(strip-exec)
diff -u libselinux-2.0.98/debian/common/archvars.mk libselinux-2.0.98/debian/common/archvars.mk
--- libselinux-2.0.98/debian/common/archvars.mk
+++ libselinux-2.0.98/debian/common/archvars.mk
@@ -80,6 +80,7 @@
 export DEB_HOST_GNU_CPU    := $(shell $(DPKG_ARCH) $(ha) -qDEB_HOST_GNU_CPU)
 export DEB_HOST_GNU_SYSTEM := $(shell $(DPKG_ARCH) $(ha) -qDEB_HOST_GNU_SYSTEM)
 export DEB_HOST_GNU_TYPE   := $(shell $(DPKG_ARCH) $(ha) -qDEB_HOST_GNU_TYPE)
+export DEB_HOST_MULTIARCH  := $(shell $(DPKG_ARCH) $(ha) -qDEB_HOST_MULTIARCH)
 
 # arrgh. future proofing
 ifeq ($(DEB_HOST_GNU_SYSTEM), linux)

Reply via email to