Merge lp:~sylvain-pineau/checkbox/all-in-one into lp:~checkbox-dev/checkbox/checkbox-packaging

Proposed by Sylvain Pineau
Status: Merged
Approved by: Zygmunt Krynicki
Approved revision: 43
Merged at revision: 23
Proposed branch: lp:~sylvain-pineau/checkbox/all-in-one
Merge into: lp:~checkbox-dev/checkbox/checkbox-packaging
Diff against target: 573 lines (+337/-43)
20 files modified
debian/changelog (+14/-2)
debian/checkbox-urwid.postinst (+0/-7)
debian/control (+118/-6)
debian/extras/ihv-demo-config/plainbox.conf (+8/-0)
debian/plainbox-autostart-desktop.install (+1/-0)
debian/plainbox-autostart-server.install (+1/-0)
debian/plainbox-ci-mailer.install (+1/-0)
debian/plainbox-ihv-demo-config.install (+1/-0)
debian/plainbox-insecure-policy.install (+1/-0)
debian/plainbox-secure-policy.install (+1/-0)
debian/plainbox-service.install (+2/-0)
debian/plainbox.changelog (+86/-0)
debian/plainbox.install (+1/-0)
debian/python3-plainbox.install (+2/-0)
debian/python3-plainbox.links (+1/-0)
debian/python3-plainbox.lintian-overrides (+8/-0)
debian/python3-pyremove (+2/-0)
debian/rules (+72/-28)
debian/tests/control (+2/-0)
debian/tests/unit-tests (+15/-0)
To merge this branch: bzr merge lp:~sylvain-pineau/checkbox/all-in-one
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Approve
Sylvain Pineau (community) Needs Resubmitting
Review via email: mp+192227@code.launchpad.net

Description of the change

The goal of this MR is to have only one packaging branch to build all our checkbox/plainbox binaries.

The tricky part is the versioning of plainbox packages coming from plainbox-packaging because they followed
the versions of the plainbox changelog.
To work around this issue, we override dh_installchangelogs to provide the original plainbox changelog.
But this changelog must not contains the plainbox package name to avoid a conflict with the source package name, so every occurences of plainbox have been replaced by checkbox but at least the versioning works as expected.

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Thanks, immense work! There are some conflicts but I'll review this proposal first thing tomorrow. Ping me on IRC when you prepare another respin of this patchset.

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

ok, just rebased to avoid the conflicts in debian/rules. Ready for review now.

23. By Sylvain Pineau

remove unused checkbox-urwid.postinst

24. By Sylvain Pineau

Updated changelog

25. By Sylvain Pineau

Added .install and .links files from plainbox-packaging

26. By Sylvain Pineau

Added autopkgtest test directory from plainbox-packaging

27. By Sylvain Pineau

Added python3-pyremove from plainbox-packaging

28. By Sylvain Pineau

Added extras/ihv-demo-config/plainbox.conf from plainbox-packaging

29. By Sylvain Pineau

Added the plainbox changelog (as plainbox.changelog)

But renamed to plainbox.changelog to not conflict with the checkbox one.
To be used by dh_installchangelogs, all plainbox entries must be renamed
to checkbox in order to avoid the following error:

dpkg-gencontrol: error: source package has two conflicting values -
checkbox and plainbox

30. By Sylvain Pineau

debian:control: Update source package definition with plainbox requirements

31. By Sylvain Pineau

debian:control: Put python3-plainbox-doc before the rest of binaries

dh_installdirs installs stuff to the first package in debian/control,
ensure that's the -doc package.

32. By Sylvain Pineau

debian:control: Added all the plainbox* binaries from plainbox-packaging

33. By Sylvain Pineau

debian:control: clean up python related dependencies

- Removes unused ${python:Depends}
- Adds ${python3:Depends} to checkbox-cli and checkbox-qt
- Adds python3 (>= 3.2) to plainbox providers instead of ${python3:Depends}
  as dh_python3 does not replace this variable for packages not installing
  python modules/scripts in standard locations.

34. By Sylvain Pineau

Added lintian overrides for python3-plainbox

35. By Sylvain Pineau

debian:rules: merge plainbox-packaging settings

36. By Sylvain Pineau

debian:rules: Merge plainbox-packaging override_dh_auto_test

Note: both checkbox and plainbox "./setup.py test" are run with -vv.

37. By Sylvain Pineau

debian:rules: merge plainbox-packaging override_dh_auto_build

38. By Sylvain Pineau

debian:rules: merge plainbox-packaging override_dh_auto_install

39. By Sylvain Pineau

debian:rules: merge plainbox-packaging override_dh_installdocs

40. By Sylvain Pineau

debian:rules: override_dh_python3 to include the plainbox binary package

Run dh_python3 with --ignore-shebangs and --no-shebang-rewrite all other
packages to avoid warnings about bash shebang of provider scripts.

41. By Sylvain Pineau

debian:rules: Keep plainbox changelog

First make a copy of plainbox.changelog per packages coming from the
plainbox-packaging branch making them non native packages.

Then clean the native ones from all changelog.Debian.gz to avoid a lintian
error.

42. By Sylvain Pineau

debian rules: Only keep one build rule for python3

43. By Sylvain Pineau

debian:rules: Reorder dh overrides the way they are executed

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

Resubmitted with a better solution for keeping the plainbox changelog without the need of calling dh_installchangelogs. Copying the plainbox.changelog for every binaries from plainbox-packaging is enough.
But we need in that case to remove all changelog.Debian.gz from the build tree of all binaries coming from checkbox-packaging as those are considered native.

Important lines are:

find $(CURDIR)/debian -path "*usr/share/doc/*checkbox*" -iname "changelog*.gz" -exec rename "s/Debian\.gz/gz/" {} \;
find $(CURDIR)/debian -path "*usr/share/doc/plainbox-provider*" -iname "changelog*.gz" -exec rename "s/Debian\.gz/gz/" {} \;

And only keep one build rule for python3.

review: Needs Resubmitting
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

+1, great work :-)

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-18 20:40:55 +0000
3+++ debian/changelog 2013-10-24 15:36:40 +0000
4@@ -1,7 +1,19 @@
5-checkbox (0.16.13) UNRELEASED; urgency=low
6+checkbox (0.16.14) UNRELEASED; urgency=low
7+
8+ [ Chris Gregan ]
9+ * jobs/wireless.txt.in - added tests for checking 80211 modules loaded and a
10+ script to scripts to execute that check named wireless_ext.
11+ Test added to run iwconfig query against all devices found on the system.
12+
13+ * jobs/ethernet.txt.in - added test for running ethtool queries against all
14+ devices found on the system.
15+
16+ -- Sylvain Pineau <sylvain.pineau@canonical.com> Fri, 18 Oct 2013 15:36:53 -0400
17+
18+checkbox (0.16.13) saucy; urgency=low
19
20 [ Po-Hsu Lin ]
21- * jobs/keys.txt.in - adde keys/microphone-mute to test the mute key for
22+ * jobs/keys.txt.in - added keys/microphone-mute to test the mute key for
23 microphone.
24
25 [ Brendan Donegan ]
26
27=== removed file 'debian/checkbox-urwid.postinst'
28--- debian/checkbox-urwid.postinst 2013-06-01 14:18:12 +0000
29+++ debian/checkbox-urwid.postinst 1970-01-01 00:00:00 +0000
30@@ -1,7 +0,0 @@
31-#! /bin/sh -e
32-
33-base_package="checkbox"
34-. /usr/share/debconf/confmodule
35-. /usr/share/checkbox/install/postinst
36-
37-#DEBHELPER#
38
39=== modified file 'debian/control'
40--- debian/control 2013-10-21 13:38:57 +0000
41+++ debian/control 2013-10-24 15:36:40 +0000
42@@ -4,6 +4,7 @@
43 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
44 Standards-Version: 3.9.3
45 X-Python3-Version: >= 3.2
46+XS-Testsuite: autopkgtest
47 Build-Depends: debhelper (>= 9.2),
48 dh-translations,
49 libqt4-dev,
50@@ -11,15 +12,34 @@
51 python,
52 python-distutils-extra,
53 python-setuptools,
54- python3-all,
55+ python3-all (>= 3.2),
56+ python3-dbus,
57 python3-distutils-extra,
58 python3-gi,
59 python3-lxml,
60 python3-pkg-resources,
61+ python3-requests ( >= 1.0),
62 python3-setuptools,
63+ python3-sphinx,
64 qt4-qmake
65 Vcs-Bzr: https://code.launchpad.net/~checkbox-dev/checkbox/checkbox-packaging
66
67+Package: python3-plainbox-doc
68+Architecture: all
69+Section: doc
70+Depends: ${misc:Depends}, ${sphinxdoc:Depends}
71+Description: Simple replacement for CheckBox
72+ PlainBox is a hardware testing tool useful for certifying laptops, desktops
73+ and servers with Ubuntu. It is a replacement for the current certification
74+ tool, CheckBox.
75+ .
76+ PlainBox complements CheckBox. It uses all the hardware test definitions,
77+ scripts and libraries from CheckBox. PlainBox is currently in alpha stages,
78+ having mostly but not entirely complete core and a developer-centric command
79+ line interface.
80+ .
81+ This package contains the documentation for the plainbox python3 library
82+
83 Package: checkbox
84 Section: python
85 Architecture: any
86@@ -68,14 +88,13 @@
87 wmctrl,
88 wodim,
89 python (>= 2.7),
90- ${python:Depends}
91 Description: System testing application
92 This project provides an extensible interface for system testing. The
93 results can then be sent to Launchpad.
94
95 Package: checkbox-cli
96 Architecture: all
97-Depends: checkbox (>= ${source:Version}), ${misc:Depends}
98+Depends: checkbox (>= ${source:Version}), ${misc:Depends}, ${python3:Depends}
99 Description: Command line interface for checkbox
100 This project provides an extensible interface for system testing. The
101 results can then be sent to Launchpad.
102@@ -89,6 +108,7 @@
103 libqtgui4,
104 python3-dbus,
105 ${misc:Depends},
106+ ${python3:Depends},
107 ${shlibs:Depends}
108 Description: QT4 interface for checkbox
109 This project provides an extensible interface for system testing. The
110@@ -118,7 +138,7 @@
111
112 Package: plainbox-provider-resource-generic
113 Architecture: all
114-Depends: python3-checkbox, ${misc:Depends}, ${python3:Depends}
115+Depends: python3-checkbox, ${misc:Depends}, python3 (>= 3.2)
116 Recommends: dmidecode, dpkg (>= 1.13), lsb-release, wodim
117 Description: CheckBox generic resource jobs provider
118 This package provides the generic resource jobs.
119@@ -134,7 +154,7 @@
120 Architecture: any
121 Depends: plainbox-provider-resource-generic,
122 ${misc:Depends},
123- ${python3:Depends},
124+ python3 (>= 3.2),
125 ${shlibs:Depends}
126 Recommends: gir1.2-gst-plugins-base-1.0,
127 gir1.2-gstreamer-1.0,
128@@ -166,7 +186,6 @@
129 sysstat,
130 wmctrl,
131 python (>= 2.7),
132- ${python:Depends}
133 Description: CheckBox jobs
134 This package provides the CheckBox jobs collection.
135
136@@ -190,3 +209,96 @@
137 Recommends: apache2, bind9, cups, dnsutils, ipmitool, iperf, libapache2-mod-php5, mysql-server, php5-mysql, samba, ssh, tomcat6, winbind, cpu-checker, qemu-kvm, qemu-utils
138 Description: SoC Certification
139 This package provides the Server SoC Certification whitelists.
140+
141+Package: python3-plainbox
142+Architecture: all
143+Section: python
144+Depends: plainbox-policy,
145+ python3-lxml,
146+ python3-pkg-resources,
147+ python3-requests (>= 1.0),
148+ ${misc:Depends},
149+ ${python3:Depends}
150+Suggests: python3-plainbox-doc
151+Description: Simple replacement for CheckBox
152+ PlainBox is a hardware testing tool useful for certifying laptops, desktops
153+ and servers with Ubuntu. It is a replacement for the current certification
154+ tool, CheckBox.
155+ .
156+ PlainBox complements CheckBox. It uses all the hardware test definitions,
157+ scripts and libraries from CheckBox. PlainBox is currently in alpha stages,
158+ having mostly but not entirely complete core and a developer-centric command
159+ line interface.
160+ .
161+ This package contains the plainbox python3 library
162+
163+Package: plainbox
164+Architecture: all
165+Depends: checkbox,
166+ python3-plainbox (>= 0.3+bzr2359),
167+ ${misc:Depends},
168+ ${python3:Depends}
169+Description: Simple replacement for CheckBox
170+ PlainBox is a hardware testing tool useful for certifying laptops, desktops
171+ and servers with Ubuntu. It is a replacement for the current certification
172+ tool, CheckBox.
173+ .
174+ PlainBox complements CheckBox. It uses all the hardware test definitions,
175+ scripts and libraries from CheckBox. PlainBox is currently in alpha stages,
176+ having mostly but not entirely complete core and a developer-centric command
177+ line interface.
178+ .
179+ This package contains the plainbox executable
180+
181+Package: plainbox-service
182+Architecture: all
183+Depends: plainbox (>= 0.3+bzr2359), python3-gi, python3-dbus
184+Description: PlainBox D-Bus service
185+ File(s) needed for auto-starting PlainBox D-Bus service on demand.
186+
187+Package: plainbox-autostart-desktop
188+Architecture: all
189+Depends: plainbox, plainbox-insecure-policy
190+Description: PlainBox autostart for desktop install
191+ File(s) needed for starting PlainBox automatically after login on a desktop
192+ install.
193+
194+Package: plainbox-autostart-server
195+Architecture: all
196+Depends: plainbox, plainbox-insecure-policy
197+Description: PlainBox autostart for server install
198+ File(s) needed for starting PlainBox automatically after boot on a server
199+ install.
200+
201+Package: plainbox-secure-policy
202+Architecture: all
203+Provides: plainbox-policy
204+Description: Secure PolicyKit action file for PlainBox
205+ PolicyKit action file needed by PlainBox for prompting the password once.
206+
207+Package: plainbox-insecure-policy
208+Architecture: all
209+Provides: plainbox-policy
210+Conflicts: plainbox-policy
211+Replaces: plainbox-policy
212+Description: Insecure PolicyKit action file for PlainBox
213+ PolicyKit action file needed by PlainBox for running in headless mode without
214+ authentication.
215+
216+Package: plainbox-ci-mailer
217+Architecture: all
218+Depends: curl, plainbox-autostart-server | plainbox-autostart-desktop
219+Description: PlainBox CI mailer
220+ Helper that e-mails PlainBox output from autostart packages when run is
221+ finished.
222+
223+Package: plainbox-ihv-demo-config
224+Architecture: all
225+Provides: plainbox-demo-config
226+Conflicts: plainbox-demo-config
227+Replaces: plainbox-demo-config
228+Description: Configuration file that selects the 'ihv' provider by default.
229+ You do not want to install this package outside of special circumstances
230+ such as showing a demonstration of plainbox technology in a canned
231+ environment. Normally the configuration file shipped by this package should
232+ not be packaged
233
234=== added directory 'debian/extras'
235=== added directory 'debian/extras/ihv-demo-config'
236=== added file 'debian/extras/ihv-demo-config/plainbox.conf'
237--- debian/extras/ihv-demo-config/plainbox.conf 1970-01-01 00:00:00 +0000
238+++ debian/extras/ihv-demo-config/plainbox.conf 2013-10-24 15:36:40 +0000
239@@ -0,0 +1,8 @@
240+; This configuration file is coming from the
241+; plainbox-ihv-demo-config package.
242+;
243+; Do not edit it, it is not a conffile, it WILL
244+; be automatically upgraded without asking.
245+; You have been warned.
246+[common]
247+default_provider=ihv
248
249=== added file 'debian/plainbox-autostart-desktop.install'
250--- debian/plainbox-autostart-desktop.install 1970-01-01 00:00:00 +0000
251+++ debian/plainbox-autostart-desktop.install 2013-10-24 15:36:40 +0000
252@@ -0,0 +1,1 @@
253+plainbox/plainbox/data/plainbox.desktop etc/xdg/autostart
254
255=== added file 'debian/plainbox-autostart-server.install'
256--- debian/plainbox-autostart-server.install 1970-01-01 00:00:00 +0000
257+++ debian/plainbox-autostart-server.install 2013-10-24 15:36:40 +0000
258@@ -0,0 +1,1 @@
259+plainbox/plainbox/data/plainbox.conf etc/init
260
261=== added file 'debian/plainbox-ci-mailer.install'
262--- debian/plainbox-ci-mailer.install 1970-01-01 00:00:00 +0000
263+++ debian/plainbox-ci-mailer.install 2013-10-24 15:36:40 +0000
264@@ -0,0 +1,1 @@
265+plainbox/plainbox/data/plainbox-ci-mailer.conf etc/init
266
267=== added file 'debian/plainbox-ihv-demo-config.install'
268--- debian/plainbox-ihv-demo-config.install 1970-01-01 00:00:00 +0000
269+++ debian/plainbox-ihv-demo-config.install 2013-10-24 15:36:40 +0000
270@@ -0,0 +1,1 @@
271+debian/extras/ihv-demo-config/plainbox.conf /etc/xdg
272
273=== added file 'debian/plainbox-insecure-policy.install'
274--- debian/plainbox-insecure-policy.install 1970-01-01 00:00:00 +0000
275+++ debian/plainbox-insecure-policy.install 2013-10-24 15:36:40 +0000
276@@ -0,0 +1,1 @@
277+plainbox/contrib/policykit_yes/org.freedesktop.policykit.pkexec.policy usr/share/polkit-1/actions/
278
279=== added file 'debian/plainbox-secure-policy.install'
280--- debian/plainbox-secure-policy.install 1970-01-01 00:00:00 +0000
281+++ debian/plainbox-secure-policy.install 2013-10-24 15:36:40 +0000
282@@ -0,0 +1,1 @@
283+plainbox/contrib/policykit_auth_admin_keep/org.freedesktop.policykit.pkexec.policy usr/share/polkit-1/actions/
284
285=== added file 'debian/plainbox-service.install'
286--- debian/plainbox-service.install 1970-01-01 00:00:00 +0000
287+++ debian/plainbox-service.install 2013-10-24 15:36:40 +0000
288@@ -0,0 +1,2 @@
289+plainbox/contrib/com.canonical.certification.PlainBox1.service usr/share/dbus-1/services/
290+
291
292=== added file 'debian/plainbox.changelog'
293--- debian/plainbox.changelog 1970-01-01 00:00:00 +0000
294+++ debian/plainbox.changelog 2013-10-24 15:36:40 +0000
295@@ -0,0 +1,86 @@
296+checkbox (0.3-2) precise; urgency=low
297+
298+ * Add plainbox-ihv-demo-config package that ships a configuration file
299+ (/etc/xdg/plainbox.conf) suitable for doing IHV demos
300+
301+ -- Zygmunt Krynicki <zygmunt.krynicki@canonical.com> Mon, 09 Sep 2013 16:48:56 +0200
302+
303+checkbox (0.3-1) raring; urgency=low
304+
305+ * Added plainbox-service package to ensure dbus dependencies and
306+ install service auto-start file.
307+
308+ -- Daniel Manrique <roadmr@ubuntu.com> Tue, 16 Jul 2013 11:27:13 -0400
309+
310+checkbox (0.2-7) raring; urgency=low
311+
312+ [ Zygmunt Krynicki ]
313+ * Add missing dependency on python3-lxml for python3-plainbox and
314+ build-depends
315+
316+ [ Brendan Donegan ]
317+ * Add binary package plainbox-autostart which installs files necessary to
318+ have plainbox run automatically when the system starts up.
319+
320+ [ Daniel Manrique ]
321+ * Add binary package: plainbox-ci-mailer which installs an upstart job
322+ which posts the log files to an e-mailer CGI when the plainbox
323+ jobs report they are finished.
324+
325+ [ Sylvain Pineau]
326+ * Adds the checkbox-trusted-launcher in /usr/bin and provides the virtual
327+ policy packages.
328+
329+ -- Sylvain Pineau <sylvain.pineau@canonical.com> Fri, 10 May 2013 14:54:24 +0200
330+
331+checkbox (0.2-6) raring; urgency=low
332+
333+ * Add missing dependency on python3-pkg-resources to python3-plainbox
334+
335+ -- Zygmunt Krynicki <zygmunt.krynicki@canonical.com> Mon, 11 Mar 2013 11:05:57 +0100
336+
337+checkbox (0.2-5) raring; urgency=low
338+
339+ * Re-did packaging from scratch.
340+ * Added python3-plainbox-doc package with sphinx docs
341+ * Added python3-plainbox package
342+
343+ -- Zygmunt Krynicki <zygmunt.krynicki@canonical.com> Fri, 08 Mar 2013 22:05:16 +0100
344+
345+checkbox (0.2-4) quantal; urgency=low
346+
347+ * Rename debian/test to debian/tests, makes autopkgtests work again
348+
349+ -- Zygmunt Krynicki <zygmunt.krynicki@canonical.com> Wed, 05 Dec 2012 12:23:53 +0100
350+
351+checkbox (0.2-3) quantal; urgency=low
352+
353+ * Add dependency on python3-pkg-resources to plainbox
354+ * Use python3 as plainbox interpreter (replacing python3.2)
355+ * Don't build plainbox for multiple python3 versions
356+ * Use autopkgtests to run unit tests
357+
358+ -- Zygmunt Krynicki <zygmunt.krynicki@canonical.com> Wed, 05 Dec 2012 12:05:55 +0100
359+
360+checkbox (0.2-2) quantal; urgency=low
361+
362+ * Split the package into plainbox and python3-plainbox
363+ * Move the plainbox package to the utils section
364+ * Update debian/copyright to refer to common-licenses
365+
366+ -- Zygmunt Krynicki <zygmunt.krynicki@canonical.com> Tue, 04 Dec 2012 14:26:49 +0100
367+
368+checkbox (0.2-1) quantal; urgency=low
369+
370+ * Remove useless whitespace
371+ * Imported Upstream version 0.2
372+ * Ship README.md as docs
373+
374+ -- Zygmunt Krynicki <zygmunt.krynicki@canonical.com> Tue, 04 Dec 2012 10:20:05 +0100
375+
376+checkbox (0.1-1) quantal; urgency=low
377+
378+ * Initial release
379+
380+ -- Zygmunt Krynicki <zygmunt.krynicki@canonical.com> Wed, 14 Nov 2012 19:36:19 +0000
381+
382
383=== added file 'debian/plainbox.install'
384--- debian/plainbox.install 1970-01-01 00:00:00 +0000
385+++ debian/plainbox.install 2013-10-24 15:36:40 +0000
386@@ -0,0 +1,1 @@
387+usr/bin/plainbox
388
389=== added file 'debian/python3-plainbox.install'
390--- debian/python3-plainbox.install 1970-01-01 00:00:00 +0000
391+++ debian/python3-plainbox.install 2013-10-24 15:36:40 +0000
392@@ -0,0 +1,2 @@
393+usr/lib/python3
394+usr/bin/checkbox-trusted-launcher
395
396=== added file 'debian/python3-plainbox.links'
397--- debian/python3-plainbox.links 1970-01-01 00:00:00 +0000
398+++ debian/python3-plainbox.links 2013-10-24 15:36:40 +0000
399@@ -0,0 +1,1 @@
400+usr/share/doc/python3-plainbox/html/_sources usr/share/doc/python3-plainbox/rst
401
402=== added file 'debian/python3-plainbox.lintian-overrides'
403--- debian/python3-plainbox.lintian-overrides 1970-01-01 00:00:00 +0000
404+++ debian/python3-plainbox.lintian-overrides 2013-10-24 15:36:40 +0000
405@@ -0,0 +1,8 @@
406+# image files are very specific to the application, they don't belong in /usr/share
407+python3-plainbox binary: image-file-in-usr-lib
408+
409+# PlainBox has to keep a copy of vendorized library licenses
410+python3-plainbox binary: extra-license-file
411+
412+# trusted launchers are very specific to the application, see plainbox doc instead
413+python3-plainbox binary: binary-without-manpage
414
415=== added file 'debian/python3-pyremove'
416--- debian/python3-pyremove 1970-01-01 00:00:00 +0000
417+++ debian/python3-pyremove 2013-10-24 15:36:40 +0000
418@@ -0,0 +1,2 @@
419+README.md
420+plainbox*.egg-info/SOURCES.txt
421
422=== modified file 'debian/rules'
423--- debian/rules 2013-10-22 07:16:59 +0000
424+++ debian/rules 2013-10-24 15:36:40 +0000
425@@ -1,17 +1,60 @@
426 #!/usr/bin/make -f
427
428+# Prevent setuptools/distribute from accessing the internet.
429+export http_proxy=http://127.0.9.1:9
430+
431 %:
432- dh "$@" --with python3,translations
433+ dh "$@" --with python3,sphinxdoc,translations
434+
435+override_dh_clean:
436+ dh_auto_clean
437+ -rm -f $(CURDIR)/debian/plainbox-autostart-desktop.changelog
438+ -rm -f $(CURDIR)/debian/plainbox-autostart-server.changelog
439+ -rm -f $(CURDIR)/debian/plainbox-ci-mailer.changelog
440+ -rm -f $(CURDIR)/debian/plainbox-ihv-demo-config.changelog
441+ -rm -f $(CURDIR)/debian/plainbox-insecure-policy.changelog
442+ -rm -f $(CURDIR)/debian/plainbox-secure-policy.changelog
443+ -rm -f $(CURDIR)/debian/plainbox-service.changelog
444+ -rm -f $(CURDIR)/debian/python3-plainbox.changelog
445+ -rm -f $(CURDIR)/debian/python3-plainbox-doc.changelog
446+ rm -rf $(CURDIR)/plainbox/build
447+ rm -rf $(CURDIR)/plainbox/*.egg-info
448+ -find . -name \*.mo -exec rm {} \;
449+ -rm -f debian/checkbox-cli.postrm debian/checkbox-qt.postrm debian/checkbox-hw-collection.postrm
450+ debconf-updatepo
451+ dh_clean
452
453 override_dh_auto_build:
454- set -ex; for python in $(shell py3versions -r); do \
455- ( cd checkbox-old && $$python setup.py build; ) \
456- done;
457+ cd $(CURDIR)/plainbox && ./setup.py build
458+ cd $(CURDIR)/checkbox-old && ./setup.py build
459+ dh_auto_build
460+
461+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
462+override_dh_auto_test:
463+ # drop LD_PRELOAD to avoid running under fakeroot; drop TMPDIR to work
464+ # around LP#972324 (set by autopkgtest)
465+ cd $(CURDIR)/checkbox-old && env -u LD_PRELOAD -u TMPDIR CHECKBOX_PACKAGING=1 ./setup.py test -vv
466+ rm -rf $(CURDIR)/checkbox-old/scripts/__pycache__
467+ cd $(CURDIR)/plainbox && ./setup.py test -vv
468+endif
469
470 override_dh_auto_install:
471- set -ex; for python in $(shell py3versions -r); do \
472- ( cd checkbox-old && $$python setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; ) \
473- done;
474+ # This is tricky, but plainbox versioning has to be different from
475+ # checkbox as it used to be built separately.
476+ # But to work correctly, plainbox.changelog has to mention checkbox instead
477+ # of plainbox to have a match with the source package name and avoid:
478+ # dpkg-gencontrol: error: source package has two conflicting values - checkbox and plainbox
479+ cp $(CURDIR)/debian/plainbox.changelog $(CURDIR)/debian/plainbox-autostart-desktop.changelog
480+ cp $(CURDIR)/debian/plainbox.changelog $(CURDIR)/debian/plainbox-autostart-server.changelog
481+ cp $(CURDIR)/debian/plainbox.changelog $(CURDIR)/debian/plainbox-ci-mailer.changelog
482+ cp $(CURDIR)/debian/plainbox.changelog $(CURDIR)/debian/plainbox-ihv-demo-config.changelog
483+ cp $(CURDIR)/debian/plainbox.changelog $(CURDIR)/debian/plainbox-insecure-policy.changelog
484+ cp $(CURDIR)/debian/plainbox.changelog $(CURDIR)/debian/plainbox-secure-policy.changelog
485+ cp $(CURDIR)/debian/plainbox.changelog $(CURDIR)/debian/plainbox-service.changelog
486+ cp $(CURDIR)/debian/plainbox.changelog $(CURDIR)/debian/python3-plainbox-doc.changelog
487+ cp $(CURDIR)/debian/plainbox.changelog $(CURDIR)/debian/python3-plainbox.changelog
488+ cd $(CURDIR)/plainbox && ./setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb
489+ cd $(CURDIR)/checkbox-old && ./setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb
490 mkdir -p $(CURDIR)/debian/tmp/usr/lib/checkbox/bin/
491 cp -R $(CURDIR)/debian/tmp/usr/share/checkbox/scripts/* $(CURDIR)/debian/tmp/usr/lib/checkbox/bin/
492 # Move the providers files to a new location
493@@ -35,30 +78,31 @@
494 find $(CURDIR)/debian/tmp/usr/share/checkbox/jobs -type f -not -iname "resource.txt*" -execdir cp {} $(CURDIR)/debian/tmp/usr/lib/plainbox-providers-1/checkbox/jobs/ \;
495 cp -R $(CURDIR)/debian/tmp/usr/share/checkbox/data $(CURDIR)/debian/tmp/usr/lib/plainbox-providers-1/checkbox/
496 mv $(CURDIR)/debian/tmp/usr/lib/plainbox-providers-1/checkbox/data/whitelists $(CURDIR)/debian/tmp/usr/lib/plainbox-providers-1/checkbox
497-
498-override_dh_auto_test:
499-ifeq (, $(findstring nocheck, $(DEB_BUILD_OPTIONS)))
500- # drop LD_PRELOAD to avoid running under fakeroot; drop TMPDIR to work
501- # around LP#972324 (set by autopkgtest)
502- ( cd checkbox-old && env -u LD_PRELOAD -u TMPDIR CHECKBOX_PACKAGING=1 ./setup.py test )
503- rm -rf checkbox-old/scripts/__pycache__
504-endif
505+ dh_auto_install
506+
507+override_dh_installdocs:
508+ # This is tricky (again), dh_installdirs installs stuff to the first
509+ # package in debian/control, ensure that's the -doc package.
510+ cd $(CURDIR)/plainbox && ./setup.py build_sphinx
511+ dh_installdocs $(CURDIR)/plainbox/build/sphinx/html/
512+ dh_installdocs -pcheckbox ./checkbox-old/README
513+ dh_installdocs -pcheckbox-cli ./checkbox-old/README
514+ dh_installdocs -pcheckbox-qt ./checkbox-old/README
515+ dh_installdocs -pcheckbox-hw-collection ./checkbox-old/README
516+ dh_installdocs
517+
518+override_dh_python3:
519+ # dh_python3 runs automatically on packages with the python3- prefix
520+ # let's not forget plainbox
521+ dh_python3 --package=plainbox
522+ # Provider packages not only ship python scripts but bash as well.
523+ dh_python3 --ignore-shebangs --no-shebang-rewrite
524
525 override_dh_installdeb:
526 cp debian/checkbox.postrm debian/checkbox-cli.postrm
527 cp debian/checkbox.postrm debian/checkbox-qt.postrm
528 cp debian/checkbox.postrm debian/checkbox-hw-collection.postrm
529+ # Keep original checkbox packages native
530+ find $(CURDIR)/debian -path "*usr/share/doc/*checkbox*" -iname "changelog*.gz" -exec rename "s/Debian\.gz/gz/" {} \;
531+ find $(CURDIR)/debian -path "*usr/share/doc/plainbox-provider*" -iname "changelog*.gz" -exec rename "s/Debian\.gz/gz/" {} \;
532 dh_installdeb
533-
534-override_dh_installdocs:
535- dh_installdocs -pcheckbox checkbox-old/README
536- dh_installdocs -pcheckbox-cli checkbox-old/README
537- dh_installdocs -pcheckbox-qt checkbox-old/README
538- dh_installdocs -pcheckbox-hw-collection checkbox-old/README
539- dh_installdocs
540-
541-override_dh_clean:
542- -find . -name \*.mo -exec rm {} \;
543- -rm -f debian/checkbox-cli.postrm debian/checkbox-qt.postrm debian/checkbox-hw-collection.postrm
544- debconf-updatepo
545- dh_clean
546
547=== added directory 'debian/tests'
548=== added file 'debian/tests/control'
549--- debian/tests/control 1970-01-01 00:00:00 +0000
550+++ debian/tests/control 2013-10-24 15:36:40 +0000
551@@ -0,0 +1,2 @@
552+Tests: unit-tests
553+Depends: @
554
555=== added file 'debian/tests/unit-tests'
556--- debian/tests/unit-tests 1970-01-01 00:00:00 +0000
557+++ debian/tests/unit-tests 2013-10-24 15:36:40 +0000
558@@ -0,0 +1,15 @@
559+#!/bin/sh
560+# autopkgtest check: Run the unit tests against the installed copy of plainbox
561+# (C) 2012 Canonical Ltd.
562+# Author: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
563+#
564+# Because each test program is executed inside unpacked source package and
565+# python search path is likely to pick up the plainbox module directly from the
566+# source we should relocate somewhere else. The intent of autopkgtest is to
567+# verify the _installed_ software.
568+
569+set -e
570+WORKDIR=$(mktemp -d)
571+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
572+cd $WORKDIR
573+python3 -m unittest --quiet plainbox.tests.test_suite 2>/dev/null && echo "unit-test: OK"

Subscribers

People subscribed via source and target branches