From patchwork Tue Aug 16 15:07:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 3473 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id CB64423F3E for ; Tue, 16 Aug 2011 15:07:06 +0000 (UTC) Received: from mail-ew0-f52.google.com (mail-ew0-f52.google.com [209.85.215.52]) by fiordland.canonical.com (Postfix) with ESMTP id B872AA180C3 for ; Tue, 16 Aug 2011 15:07:06 +0000 (UTC) Received: by ewy28 with SMTP id 28so3153623ewy.11 for ; Tue, 16 Aug 2011 08:07:06 -0700 (PDT) Received: by 10.213.29.147 with SMTP id q19mr876017ebc.132.1313507226415; Tue, 16 Aug 2011 08:07:06 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.213.102.5 with SMTP id e5cs158178ebo; Tue, 16 Aug 2011 08:07:06 -0700 (PDT) Received: from mr.google.com ([10.52.23.198]) by 10.52.23.198 with SMTP id o6mr7222928vdf.269.1313507226154 (num_hops = 1); Tue, 16 Aug 2011 08:07:06 -0700 (PDT) Received: by 10.52.23.198 with SMTP id o6mr5194366vdf.269.1313507225651; Tue, 16 Aug 2011 08:07:05 -0700 (PDT) Received: from afflict.kos.to (afflict.kos.to [92.243.29.197]) by mx.google.com with ESMTPS id c14si93681vcc.21.2011.08.16.08.07.03 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 16 Aug 2011 08:07:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of nchip@afflict.kos.to designates 92.243.29.197 as permitted sender) client-ip=92.243.29.197; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of nchip@afflict.kos.to designates 92.243.29.197 as permitted sender) smtp.mail=nchip@afflict.kos.to Received: by afflict.kos.to (Postfix, from userid 1000) id D23822669C; Tue, 16 Aug 2011 15:07:01 +0000 (UTC) Date: Tue, 16 Aug 2011 18:07:01 +0300 From: Riku Voipio To: submit@bugs.debian.org Subject: please add multi-arch support like in libselinux Message-ID: <20110816150701.GA17979@afflict.kos.to> MIME-Version: 1.0 Content-Disposition: inline X-message-flag: Warning: message not sent with a DRM-Certified client User-Agent: Mutt/1.5.18 (2008-05-17) Package: libsepol Version: 2.0.42-1 Severity: wishlist User: debian-dpkg@lists.debian.org Usertags: multiarch Tags: patch Hi, Libselinux was already updated to multi-arch. This patch is almost identical, except for libsepol. In case you don't have time, I can also NMU it and take care of any possible fallout. Hence the optimistic "NMU with maintainer approval" changelog entry ;) Riku diff -u libsepol-2.0.42/debian/changelog libsepol-2.0.42/debian/changelog --- libsepol-2.0.42/debian/changelog +++ libsepol-2.0.42/debian/changelog @@ -1,3 +1,14 @@ +libsepol (2.0.42-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. + + -- Riku Voipio Tue, 16 Aug 2011 17:29:52 +0300 + libsepol (2.0.42-1) unstable; urgency=low * New Upstream ver: Fix compliation under GCC 4.6 by Justin Mattock diff -u libsepol-2.0.42/debian/local-vars.mk libsepol-2.0.42/debian/local-vars.mk --- libsepol-2.0.42/debian/local-vars.mk +++ libsepol-2.0.42/debian/local-vars.mk @@ -26,7 +26,7 @@ PREFIX = /usr BINDIR = $(TMPTOP)$(PREFIX)/bin -LIBDIR = $(TMPTOP)/lib +LIBDIR = $(TMPTOP)/lib/$(DEB_HOST_MULTIARCH) INCLUDE = $(TMPTOP)$(PREFIX)/include INCDIR = $(INCLUDE)/sepol diff -u libsepol-2.0.42/debian/control libsepol-2.0.42/debian/control --- libsepol-2.0.42/debian/control +++ libsepol-2.0.42/debian/control @@ -6,12 +6,13 @@ Maintainer: Manoj Srivastava Uploaders: Russell Coker Standards-Version: 3.8.3.0 -Build-Depends: file +Build-Depends: file, dpkg-dev (>= 1.16.0) Package: sepol-utils Section: admin Architecture: any Depends: ${shlibs:Depends} +Multi-Arch: foreign Conflicts: checkpolicy (<= 1.20) Description: Security Enhanced Linux policy utility programs This package provides a utility for a Security-enhanced @@ -28,6 +29,8 @@ Priority: required Architecture: any Depends: ${shlibs:Depends} +Pre-Depends: multiarch-support +Multi-Arch: same Description: SELinux library for manipulating binary security policies Security-enhanced Linux is a patch of the Linux kernel and a number of utilities with enhanced security functionality designed to add @@ -50,6 +53,7 @@ Provides: libsepol-dev Conflicts: libsepol-dev Depends: ${shlibs:Depends}, libsepol1 (= ${binary:Version}) +Multi-Arch: same Description: SELinux binary policy maniulation library and development files libsepol allows programs to easily modify SELinux binary policies. This means changing the default values for booleans, or reading the policy for diff -u libsepol-2.0.42/debian/local.mk libsepol-2.0.42/debian/local.mk --- libsepol-2.0.42/debian/local.mk +++ libsepol-2.0.42/debian/local.mk @@ -81,7 +81,7 @@ $(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)/libsepol.a rm -f $(LIBDIR)/libsepol.so test ! -e $(LIBDIR)/libsepol.pc || rm -f $(LIBDIR)/libsepol.pc @@ -89,7 +89,7 @@ chmod 0644 $(LIBDIR)/libsepol.so.1 $(install_file) debian/changelog $(DOCDIR)/changelog.Debian $(install_file) ChangeLog $(DOCDIR)/changelog - gzip -9fqr $(DOCDIR)/ + gzip -9fnqr $(DOCDIR)/ # Make sure the copyright file is not compressed $(install_file) debian/copyright $(DOCDIR)/copyright $(strip-lib) @@ -111,14 +111,14 @@ $(MAKE) DESTDIR=$(TMPTOP) -C man install rm -rf $(MAN8DIR) $(MAKE) DESTDIR=$(TMPTOP) -C include install - $(MAKE) DESTDIR=$(TMPTOP) -C src install - rm -rf $(LIBDIR) - rm -f $(TMPTOP)/usr/lib/libsepol.so - ln -s /lib/libsepol.so.1 $(TMPTOP)/usr/lib/libsepol.so + $(MAKE) DESTDIR=$(TMPTOP) LIBDIR=$(TMPTOP)/usr/lib/$(DEB_HOST_MULTIARCH) SHLIBDIR=$(LIBDIR) -C src install + rm -rf $(TMPTOP)/lib + rm -f $(TMPTOP)/usr/lib/$(DEB_HOST_MULTIARCH)/libsepol.so + ln -s /lib/$(DEB_HOST_MULTIARCH)/libsepol.so.1 $(TMPTOP)/usr/lib/$(DEB_HOST_MULTIARCH)/libsepol.so $(install_file) debian/changelog $(DOCDIR)/changelog.Debian $(install_file) ChangeLog $(DOCDIR)/changelog - gzip -9fqr $(DOCDIR)/ - gzip -9fqr $(MANDIR)/ + gzip -9fqnr $(DOCDIR)/ + gzip -9fqnr $(MANDIR)/ # Make sure the copyright file is not compressed $(install_file) debian/copyright $(DOCDIR)/copyright $(strip-lib) @@ -139,8 +139,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 -9fnqr $(DOCDIR)/ + gzip -9fnqr $(MANDIR)/ # Make sure the copyright file is not compressed $(install_file) debian/copyright $(DOCDIR)/copyright $(strip-exec) diff -u libsepol-2.0.42/debian/common/archvars.mk libsepol-2.0.42/debian/common/archvars.mk --- libsepol-2.0.42/debian/common/archvars.mk +++ libsepol-2.0.42/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)