Merge lp:~vorlon/apparmor/dh9 into lp:~ubuntu-core-dev/apparmor/master

Proposed by Steve Langasek
Status: Merged
Merged at revision: 1488
Proposed branch: lp:~vorlon/apparmor/dh9
Merge into: lp:~ubuntu-core-dev/apparmor/master
Diff against target: 269 lines (+57/-116)
6 files modified
debian/changelog (+8/-0)
debian/compat (+1/-1)
debian/control (+2/-0)
debian/libapparmor-dev.install (+4/-4)
debian/libapparmor1.install (+1/-1)
debian/rules (+41/-110)
To merge this branch: bzr merge lp:~vorlon/apparmor/dh9
Reviewer Review Type Date Requested Status
Tyler Hicks Approve
Review via email: mp+193340@code.launchpad.net

Description of the change

This is a change to uplift the Debian packaging to dh(1) and debhelper
compat 9, making debian/rules quite a bit shorter/simpler and getting us
multiarch support for libapparmor. I've build-tested it to make sure the
package contents remain correct, but would appreciate if someone with more
apparmor expertise kicked the tires on this before upload.

To post a comment you must log in.
lp:~vorlon/apparmor/dh9 updated
1487. By Steve Langasek

Document bug closure

1488. By Steve Langasek

Revert wrongheaded change to drop global variables, which are used in the
base build and affect apparmor-easyprof

Revision history for this message
Tyler Hicks (tyhicks) wrote :

Upstream doesn't support a fully parallelized build at this moment, so --parallel needs to be dropped from dh. After that change, this gets my ack and you are free to upload.

We'll get those issues fixed upstream and then enable --parallel soon.

Three of the QRT test-apparmor.py tests from now fail. I've determined them all to be issues with test-apparmor.py itself. I'll fix those issues.

Thanks for the packaging changes, Steve!

review: Needs Fixing
Revision history for this message
Tyler Hicks (tyhicks) wrote :

--parallel was dropped prior to merging - everything looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-10-21 20:35:13 +0000
3+++ debian/changelog 2013-10-31 17:26:43 +0000
4@@ -1,3 +1,11 @@
5+apparmor (2.8.0-0ubuntu33) UNRELEASED; urgency=low
6+
7+ * Convert to dh.
8+ * Bump to debhelper compat level 9 for multiarch support.
9+ * Mark libapparmor1, libapparmor-dev Multi-Arch: same. LP: #1246067.
10+
11+ -- Steve Langasek <steve.langasek@ubuntu.com> Wed, 30 Oct 2013 05:13:31 +0000
12+
13 apparmor (2.8.0-0ubuntu32) trusty; urgency=low
14
15 * no change rebuild for perl 5.18
16
17=== modified file 'debian/compat'
18--- debian/compat 2010-11-04 19:11:13 +0000
19+++ debian/compat 2013-10-31 17:26:43 +0000
20@@ -1,1 +1,1 @@
21-8
22+9
23
24=== modified file 'debian/control'
25--- debian/control 2013-10-08 21:30:52 +0000
26+++ debian/control 2013-10-31 17:26:43 +0000
27@@ -52,6 +52,7 @@
28 Package: libapparmor-dev
29 Section: libdevel
30 Architecture: any
31+Multi-Arch: same
32 Depends: libapparmor1 (= ${binary:Version}), ${misc:Depends}
33 Description: AppArmor development libraries and header files
34 This package provides the develpment libraries and header files needed to
35@@ -61,6 +62,7 @@
36 Package: libapparmor1
37 Section: libs
38 Architecture: any
39+Multi-Arch: same
40 Depends: ${shlibs:Depends}, ${misc:Depends}
41 Description: changehat AppArmor library
42 This package provides the shared library used for making use of the
43
44=== modified file 'debian/libapparmor-dev.install'
45--- debian/libapparmor-dev.install 2013-10-08 21:30:52 +0000
46+++ debian/libapparmor-dev.install 2013-10-31 17:26:43 +0000
47@@ -1,5 +1,5 @@
48-usr/lib/libapparmor.a
49-usr/lib/libapparmor.la
50-usr/lib/libapparmor.so
51-usr/lib/pkgconfig/libapparmor*
52+usr/lib/*/libapparmor.a
53+usr/lib/*/libapparmor.la
54+usr/lib/*/libapparmor.so
55+usr/lib/*/pkgconfig/libapparmor*
56 usr/include/*
57
58=== modified file 'debian/libapparmor1.install'
59--- debian/libapparmor1.install 2010-11-04 06:54:03 +0000
60+++ debian/libapparmor1.install 2013-10-31 17:26:43 +0000
61@@ -1,1 +1,1 @@
62-usr/lib/libapparmor.so.1*
63+usr/lib/*/libapparmor.so.1*
64
65=== modified file 'debian/rules'
66--- debian/rules 2013-07-05 14:53:33 +0000
67+++ debian/rules 2013-10-31 17:26:43 +0000
68@@ -1,66 +1,30 @@
69 #!/usr/bin/make -f
70-# -*- makefile -*-
71-# Sample debian/rules that uses debhelper.
72-# This file was originally written by Joey Hess and Craig Small.
73-# As a special exception, when this file is copied by dh-make into a
74-# dh-make output file, you may use that output file without restriction.
75-# This special exception was added by Craig Small in version 0.37 of dh-make.
76-
77-# Uncomment this to turn on verbose mode.
78-#export DH_VERBOSE=1
79-
80-# Uncomment to turn on verbose build-time test output
81-#export VERBOSE=1
82-
83-# libapparmor uses autotools
84-export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
85-export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
86+
87 export DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
88
89-CONFFLAGS = --prefix=/usr --with-perl
90-ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
91- CONFFLAGS += --build $(DEB_HOST_GNU_TYPE)
92-else
93- CONFFLAGS += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
94-endif
95-
96 export PYTHON=/usr/bin/python3
97 export PYTHON_VERSION=3
98 export PYTHON_VERSIONS=python3
99
100-CFLAGS := -Wall -g
101-CXXFLAGS := -Wall -g
102-
103-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
104- CFLAGS += -O0
105- CXXFLAGS += -O0
106-else
107- CFLAGS += -O2
108- CXXFLAGS += -O2
109-endif
110-
111-configure: configure-stamp
112-configure-stamp:
113- dh_testdir
114- cd libraries/libapparmor && \
115- sh autogen.sh && \
116- sh configure $(CONFFLAGS)
117- touch $@
118-
119-build: build-arch build-indep
120-build-arch: build-stamp
121-build-indep: build-stamp
122-build-stamp: configure-stamp
123- dh_testdir
124+%:
125+ dh $@ --with=python2,python3,apache2 --parallel
126+
127+
128+override_dh_auto_configure:
129+ cd libraries/libapparmor && sh ./autogen.sh
130+ dh_auto_configure -D libraries/libapparmor -- --with-perl
131+
132+
133+override_dh_auto_build:
134 # Build perl
135- $(MAKE) -C $(CURDIR)/libraries/libapparmor
136+ dh_auto_build -D libraries/libapparmor
137 # Build pythons
138 for py in $(shell pyversions -s) $(shell py3versions -s) ; do \
139 cp -a $(CURDIR)/libraries/libapparmor $(CURDIR)/libraries/libapparmor.$$py && \
140- cd $(CURDIR)/libraries/libapparmor.$$py && \
141- PYTHON=/usr/bin/$$py sh configure \
142- $(CONFFLAGS) --with-python && \
143- PYTHON=/usr/bin/$$py $(MAKE); \
144+ PYTHON=/usr/bin/$$py dh_auto_configure \
145+ -D libraries/libapparmor.$$py -- --with-python && \
146+ PYTHON=/usr/bin/$$py dh_auto_build \
147+ -D libraries/libapparmor.$$py; \
148 done
149
150 # Don't run '$(MAKE) check' because of too many perl dependencies
151@@ -68,18 +32,19 @@
152 cd utils && $(MAKE)
153 ifneq (,$(filter $(DEB_HOST_ARCH_OS), kfreebsd knetbsd hurd ))
154 cd parser && $(MAKE) indep
155-else ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
156- cd parser && $(MAKE) V=1 && $(MAKE) check V=1
157 else
158 cd parser && $(MAKE) V=1
159 endif
160 cd profiles && $(MAKE)
161- touch $@
162-
163-clean:
164- dh_testdir
165- dh_testroot
166- rm -f build-stamp configure-stamp
167+
168+
169+override_dh_auto_test:
170+ifeq (,$(filter $(DEB_HOST_ARCH_OS), kfreebsd knetbsd hurd ))
171+ dh_auto_test -Dparser -- V=1
172+endif
173+
174+
175+override_dh_auto_clean:
176 for i in utils parser profiles changehat/mod_apparmor \
177 changehat/pam_apparmor ; do \
178 [ ! -f $$i/Makefile ] || $(MAKE) -C $$i clean; \
179@@ -91,14 +56,9 @@
180 cd libraries/libapparmor && [ ! -f Makefile ] || $(MAKE) distclean
181 # Remove generated debhelper documentation.
182 rm -f $(CURDIR)/debian/debhelper/dh_apparmor.1
183- dh_clean
184-
185-install: build
186- dh_testdir
187- dh_testroot
188- dh_prep
189- dh_installdirs
190-
191+
192+
193+override_dh_auto_install:
194 # Utils
195 cd utils; $(MAKE) \
196 DESTDIR=$(CURDIR)/debian/tmp \
197@@ -157,59 +117,30 @@
198 # Build debhelper documentation.
199 pod2man -c Debhelper -r "$(DEB_VERSION)" $(CURDIR)/debian/debhelper/dh_apparmor $(CURDIR)/debian/debhelper/dh_apparmor.1
200
201- dh_install
202
203-# Must not depend on anything. This is to be called by
204-# binary-arch/binary-indep
205-# in another 'make' thread.
206-binary-common:
207- dh_testdir
208- dh_testroot
209- dh_installchangelogs
210- dh_installdocs
211- dh_installexamples
212-# dh_installmenu
213- dh_installdebconf -papparmor
214-# dh_installlogrotate
215-# dh_installemacsen
216-# dh_installpam
217-# dh_installmime
218+override_dh_installinit:
219 dh_installinit --update-rcd-params='start 37 S .' --no-restart-on-upgrade --error-handler=true
220-# dh_installcron
221-# dh_installinfo
222- dh_installman
223- dh_link
224- dh_strip
225+
226+override_dh_compress:
227 dh_compress -Xextras
228- dh_fixperms
229+
230+override_dh_perl:
231 dh_perl -p libapparmor-perl -d
232 dh_perl --no-package=libapparmor-perl
233- dh_python2 -p python-libapparmor
234- dh_python3 -p python3-libapparmor -p apparmor -p apparmor-utils -p apparmor-easyprof
235- dh_apache2 --noenable -p libapache2-mod-apparmor
236- dh_makeshlibs
237- dh_installdeb
238- dh_shlibdeps
239- dh_gencontrol
240- dh_md5sums
241- dh_builddeb
242-
243-# Build architecture independant packages using the common target.
244-binary-indep: build install
245+
246+override_dh_apache2:
247+ dh_apache2 --noenable
248+
249+
250+override_dh_install:
251 for profile in $(shell grep ^etc/apparmor.d/ $(CURDIR)/debian/apparmor-profiles.install | \
252 cut -d/ -f3- | grep -v /); do \
253 if [ -x /usr/bin/dh_apparmor ]; then \
254 dh_apparmor --profile-name=$$profile -papparmor-profiles; \
255 fi; \
256 done
257- $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
258-
259-# Build architecture dependant packages using the common target.
260-binary-arch: build install
261- $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
262-
263-binary: binary-arch binary-indep
264-.PHONY: build clean binary-indep binary-arch binary install configure
265+ dh_install
266+
267
268 VERSION_SEP=+
269 VERSION=$(shell dpkg-parsechangelog | grep ^Version | cut -d$(VERSION_SEP) -f1 | cut -d\ -f2)

Subscribers

People subscribed via source and target branches

to all changes: