[pkg-apparmor] Ubuntu/Debian apparmor package maintenance in bzr

Steve Beattie steve at nxnw.org
Fri May 8 05:17:03 UTC 2015


Hey,

I've been looking at the recent changes to
https://alioth.debian.org/scm/loggerhead/collab-maint/apparmor-experimental ,
and one thing I noticed is that in
https://alioth.debian.org/scm/loggerhead/collab-maint/apparmor-experimental/revision/1552
the so version of the libapparmor library is hardcoded in the
debian/rule file, with a test to make sure that it doesn't need to be
changed.

While it accomplished the purpose of putting the unversioned so symlink
under /usr while the actual library is under /lib, I think this leads to
needless version churn in debian/rules when new releases that touch
libapparmor are incorporated into the packaging. Based on looking at
xz-utils packaging, I think it would be an improvement to modify
debian/rules like so:

=== modified file 'debian/libapparmor-dev.install'
--- a/debian/libapparmor-dev.install	2014-12-01 21:35:16 +0000
+++ b/debian/libapparmor-dev.install	2015-05-07 22:42:24 +0000
@@ -1,5 +1,5 @@
 /lib/*/libapparmor.a
 /lib/*/libapparmor.la
-/lib/*/libapparmor.so
+usr/lib/*/libapparmor.so
 usr/lib/*/pkgconfig/libapparmor*
 usr/include/*

=== modified file 'debian/rules'
--- a/debian/rules	2015-05-06 19:40:07 +0000
+++ b/debian/rules	2015-05-07 23:42:50 +0000
@@ -148,6 +148,10 @@
 	# Build debhelper documentation.
 	pod2man -c Debhelper -r "$(DEB_VERSION)" $(CURDIR)/debian/debhelper/dh_apparmor $(CURDIR)/debian/debhelper/dh_apparmor.1
 
+	# Create unversioned link in /usr to the shared library
+	MY_DSO=$$(basename $$(readlink $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/libapparmor.so)); \
+	ln -sf /lib/$(DEB_HOST_MULTIARCH)/$${MY_DSO} \
+	    $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libapparmor.so
 
 override_dh_installinit:
 	dh_installinit --update-rcd-params='start 37 S .' --no-start --no-restart-on-upgrade --error-handler=true

This way the target of the symlink can be derived from what's build,
rather than based on a manual version string in the debian/rules file.
Thoughts?

-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-apparmor-team/attachments/20150507/fa551bda/attachment.sig>


More information about the pkg-apparmor-team mailing list