Merge lp:~lool/linaro-image-tools/setup-py-rework into lp:linaro-image-tools/11.11
- setup-py-rework
- Merge into trunk
Proposed by
Loïc Minier
Status: | Merged |
---|---|
Merged at revision: | 268 |
Proposed branch: | lp:~lool/linaro-image-tools/setup-py-rework |
Merge into: | lp:linaro-image-tools/11.11 |
Diff against target: |
385 lines (+84/-243) 11 files modified
.bzr-builddeb/default.conf (+0/-2) debian/changelog (+0/-111) debian/compat (+0/-1) debian/control (+0/-67) debian/copyright (+0/-26) debian/linaro-image-tools.install (+0/-3) debian/python-hwpack.install (+0/-1) debian/python-linaro-media-create.install (+0/-1) debian/rules (+0/-9) do-release (+67/-0) setup.py (+17/-22) |
To merge this branch: | bzr merge lp:~lool/linaro-image-tools/setup-py-rework |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Guilherme Salgado (community) | Approve | ||
Review via email:
|
Commit message
Description of the change
This is a rework of our setup.py and should help with rolling tarball releases
To post a comment you must log in.
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Loïc Minier (lool) wrote : | # |
I think setup.py is meant to capture high level license information; if the resulting work is only GPLv3+ in practice, then we should put that
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Loïc Minier (lool) wrote : | # |
Pushed one rev to bump to GPLv3+
- 280. By Loïc Minier
-
GPLv3+, not v2+ as some bits are only v3+.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === removed directory '.bzr-builddeb' |
2 | === removed file '.bzr-builddeb/default.conf' |
3 | --- .bzr-builddeb/default.conf 2010-09-24 20:37:48 +0000 |
4 | +++ .bzr-builddeb/default.conf 1970-01-01 00:00:00 +0000 |
5 | @@ -1,2 +0,0 @@ |
6 | -[BUILDDEB] |
7 | -native=True |
8 | |
9 | === removed directory 'debian' |
10 | === removed file 'debian/changelog' |
11 | --- debian/changelog 2011-01-19 19:00:48 +0000 |
12 | +++ debian/changelog 1970-01-01 00:00:00 +0000 |
13 | @@ -1,111 +0,0 @@ |
14 | -linaro-image-tools (0.4.1) natty; urgency=low |
15 | - |
16 | - * Brown paperbag release. |
17 | - * Sort files in commands ran by linaro_media_create.rootfs.move_contents() |
18 | - as this breaks the testsuite on some filesystems. |
19 | - * Disable pkgbinarymangler when running the testsuite as it might cause some |
20 | - stderr output which confuses it. |
21 | - * Uppercase Python in python-linaro-media-create long description. |
22 | - * Drop util-linux from Depends as it's Essential. |
23 | - * Update Build-Deps for testsuite requirements (qemu-kvm for qemu-img, |
24 | - u-boot | uboot-mkimage for mkimage and command-not-found for |
25 | - CommandNotFound) and recommend command-not-found to locate the package of |
26 | - missing commands. |
27 | - |
28 | - -- Loïc Minier <loic.minier@linaro.org> Wed, 19 Jan 2011 19:32:38 +0100 |
29 | - |
30 | -linaro-image-tools (0.4) natty; urgency=low |
31 | - |
32 | - IMPORTANT: this version of linaro-image-tools breaks support for 10.05 |
33 | - images; we hope to restore this support really soon but it was more |
34 | - important to release this update and have support for linaro-n images. |
35 | - |
36 | - * New major release |
37 | - - Large parts rewritten in Python (Michael Hudson, Guilherme Salgado, |
38 | - James Westby, Martin Ohlsson). |
39 | - - Various bug fixes. |
40 | - - Notify users that apt-get will be run in target rootfs (Martin Ohlsson); |
41 | - LP: #651906 |
42 | - - Use fdisk -l for output rather than sfdisk -l (Martin Ohlsson); |
43 | - LP: #673410. |
44 | - - Allow passing multiple --hwpack when creating an image (Michael Hudson). |
45 | - - Add --hwpack-force-yes to linaro-media-create to forcibly install |
46 | - unauthenticated packages (Michael Hudson). |
47 | - - hwpack-create now has a --debug option (James Westby). |
48 | - - hwpack creation now outputs a manifest external to the hwpack as well |
49 | - (Michael Hudson). |
50 | - - Add ability to add local .debs to the hwpack with --local-deb |
51 | - (Michael Hudson). |
52 | - - Update dependencies; new deps on python-testtools, python-parted, |
53 | - python-dbus and more, drop obsolete deps. |
54 | - * Fix support of space in pathnames (Paul Larson). |
55 | - * Update Depends to cope with mkimage moving from uboot-mkimage to |
56 | - u-boot-tools. |
57 | - * Fix empty Vcs-Bzr. |
58 | - * Strict >= ${source:Version} dependency on python-hwpack. |
59 | - * Use python2 dh sequence instead of python-support; add a python >= |
60 | - 2.6.5-1~ build-dep. |
61 | - * Uppercase Python in description (lintian). |
62 | - * Various cleanups. |
63 | - * Drop omapfb.debug=y from kernel cmdlines as DSS2 is stable nowadays. |
64 | - |
65 | - -- Loïc Minier <loic.minier@linaro.org> Thu, 23 Dec 2010 14:41:29 +0100 |
66 | - |
67 | -linaro-image-tools (0.3) maverick-proposed; urgency=low |
68 | - |
69 | - [ Steve Langasek ] |
70 | - * no longer using the 'omap' uboot flavor support in live-helper; instead, |
71 | - run the mkimage commands directly for omap. |
72 | - * fix the paths used for looking up x-loader and u-boot binaries in the |
73 | - tarball; these don't belong in /boot at all, pull them from /usr/lib. |
74 | - * only enforce the presence of commands we're actually using; this lets |
75 | - us automatically pull in btrfs-tools when btrfs is specified. |
76 | - * add sudo to a couple more commands in linaro-media-create, so the script |
77 | - itself can run as non-root as intended. |
78 | - |
79 | - [ James Westby ] |
80 | - * Add a linaro-hwpack-create script for the creation of hardware packs. |
81 | - |
82 | - [ Steve Langasek ] |
83 | - * Fix lookup of linaro-hwpack-install to work correctly when l-m-c is on |
84 | - the path. Closes: #652669. |
85 | - |
86 | - [ Loïc Minier ] |
87 | - * Drop spurious single quote character in boot_args_options for beagle|igep; |
88 | - thanks Peter Maydell; LP: #667400. |
89 | - * Set LC_ALL=C when entering the chroot as it has no locales. LP: #651905. |
90 | - |
91 | - [ Tom Gall ] |
92 | - * Use --numeric-owner argument to tar when unpacking, so that files get |
93 | - the right owner on boot of the image. LP: #652121. |
94 | - |
95 | - [ Dave Martin ] |
96 | - * Implement proper cleanup handling on signal / exit, so that we don't |
97 | - leave clutter behind on error. This also fixes the message at the end of |
98 | - a successful install about being unable to unmount proc. LP: #616385, |
99 | - #660196, #667394, #643601, #627383. |
100 | - |
101 | - -- Steve Langasek <steve.langasek@ubuntu.com> Tue, 09 Nov 2010 12:50:26 -0800 |
102 | - |
103 | -linaro-image-tools (0.2) maverick; urgency=low |
104 | - |
105 | - [ James Westby ] |
106 | - * Add a module that provides some improvements to tarfile. |
107 | - * Add some matchers for testing the content of tarfiles. |
108 | - * Add the skeleton code to create empty hardware packs. |
109 | - |
110 | - [ Torez Smith ] |
111 | - * Add IGEP support; LP: #627611. |
112 | - |
113 | - [ Loïc Minier ] |
114 | - * Fix deps in control as well: depend on uuid-runtime rather than |
115 | - uuidgen-runtime and do not depend on util-linux, e2fsprogs and coreutils |
116 | - as these are Essential: yes; thanks Colin Watson. |
117 | - |
118 | - -- Loïc Minier <loic.minier@linaro.org> Sun, 05 Sep 2010 10:26:20 +0200 |
119 | - |
120 | -linaro-image-tools (0.1) maverick; urgency=low |
121 | - |
122 | - * Initial packaging |
123 | - |
124 | - -- Loïc Minier <loic.minier@linaro.org> Tue, 31 Aug 2010 22:32:49 +0200 |
125 | |
126 | === removed file 'debian/compat' |
127 | --- debian/compat 2010-08-31 20:50:14 +0000 |
128 | +++ debian/compat 1970-01-01 00:00:00 +0000 |
129 | @@ -1,1 +0,0 @@ |
130 | -7 |
131 | |
132 | === removed file 'debian/control' |
133 | --- debian/control 2011-01-26 00:39:33 +0000 |
134 | +++ debian/control 1970-01-01 00:00:00 +0000 |
135 | @@ -1,67 +0,0 @@ |
136 | -Source: linaro-image-tools |
137 | -Section: devel |
138 | -Priority: optional |
139 | -Build-Depends: debhelper (>= 7.0.50~), |
140 | - python (>= 2.6.5-1~), |
141 | - python-all, |
142 | - python-debian (>= 0.1.16ubuntu1), |
143 | - python-dbus, |
144 | - python-apt, |
145 | - python-parted, |
146 | - python-testtools (>> 0.9.5), |
147 | - python-argparse, |
148 | - qemu-kvm, |
149 | - command-not-found, |
150 | - u-boot-tools | uboot-mkimage |
151 | -Standards-Version: 3.9.1 |
152 | -Maintainer: Linaro Developers <linaro-dev@lists.linaro.org> |
153 | -Vcs-Bzr: http://bazaar.launchpad.net/~linaro-maintainers/linaro-image-tools/linaro-image-tools |
154 | -XS-Python-Version: >= 2.5 |
155 | - |
156 | -Package: linaro-image-tools |
157 | -Architecture: all |
158 | -Depends: ${misc:Depends}, |
159 | - parted, |
160 | - dosfstools, |
161 | - u-boot-tools | uboot-mkimage, |
162 | - python, |
163 | - python-hwpack (>= ${source:Version}), |
164 | - python-argparse, |
165 | - python-dbus, |
166 | - python-debian (>= 0.1.16ubuntu1), |
167 | - python-linaro-media-create (>= ${source:Version}), |
168 | - python-parted |
169 | -Recommends: qemu-kvm-extras-static, |
170 | - qemu-kvm, |
171 | - btrfs-tools, |
172 | - command-not-found |
173 | -Description: collection of tools to work with Linaro images |
174 | - This package offers a set of tools for use with Linaro images. |
175 | - . |
176 | - The provided linaro-media-create command allows writing Linaro images |
177 | - to a SD card, or generating an image file which you can boot in QEMU. |
178 | - |
179 | -Package: python-hwpack |
180 | -Architecture: all |
181 | -Section: python |
182 | -Depends: ${python:Depends}, |
183 | - ${misc:Depends}, |
184 | - python-apt |
185 | -Description: Python library for the creation of hardware packs |
186 | - Hardware packs allow for the distribution of packages to be combined with |
187 | - an image to create a root filesystem at a later date. |
188 | - . |
189 | - This package provides a Python library to aid with the creation of hardware |
190 | - packs. |
191 | - |
192 | -Package: python-linaro-media-create |
193 | -Architecture: all |
194 | -Section: python |
195 | -Depends: ${python:Depends}, |
196 | - ${misc:Depends} |
197 | -Description: Python library for the creation of Linaro bootable media |
198 | - Linaro images are generated by combining generic tarballs with |
199 | - hardware-specific packs (hwpacks). |
200 | - . |
201 | - This package provides a Python library to generate Linaro images and write |
202 | - them to SD cards or image files that you can be boot in QEMU. |
203 | |
204 | === removed file 'debian/copyright' |
205 | --- debian/copyright 2010-09-01 12:34:06 +0000 |
206 | +++ debian/copyright 1970-01-01 00:00:00 +0000 |
207 | @@ -1,26 +0,0 @@ |
208 | -Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135 |
209 | -Name: Linaro Image Tools |
210 | -Source: https://code.launchpad.net/linaro-image-tools |
211 | - |
212 | -Copyright: 2010, Robert Nelson <robertcnelson@gmail.com> |
213 | - 2010, Linaro |
214 | -License: GPL-3+ |
215 | - This program is free software; you can redistribute it and/or |
216 | - modify it under the terms of the GNU General Public License |
217 | - version 3 as published by the Free Software Foundation. |
218 | - . |
219 | - This program is distributed in the hope that it will be |
220 | - useful, but WITHOUT ANY WARRANTY; without even the implied |
221 | - warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
222 | - PURPOSE. See the GNU General Public License for more |
223 | - details. |
224 | - . |
225 | - You should have received a copy of the GNU General Public |
226 | - License along with this package; if not, write to the Free |
227 | - Software Foundation, Inc., 51 Franklin St, Fifth Floor, |
228 | - Boston, MA 02110-1301 USA |
229 | - . |
230 | - On Debian and Ubuntu systems, the full text of the GNU General |
231 | - Public License version 3 can be found in the file |
232 | - `/usr/share/common-licenses/GPL-3'. |
233 | - |
234 | |
235 | === removed file 'debian/linaro-image-tools.install' |
236 | --- debian/linaro-image-tools.install 2010-09-24 20:37:48 +0000 |
237 | +++ debian/linaro-image-tools.install 1970-01-01 00:00:00 +0000 |
238 | @@ -1,3 +0,0 @@ |
239 | -linaro-media-create usr/bin |
240 | -linaro-hwpack-install usr/bin |
241 | -linaro-hwpack-create usr/bin |
242 | |
243 | === removed file 'debian/python-hwpack.install' |
244 | --- debian/python-hwpack.install 2010-09-24 20:37:48 +0000 |
245 | +++ debian/python-hwpack.install 1970-01-01 00:00:00 +0000 |
246 | @@ -1,1 +0,0 @@ |
247 | -usr/lib/python*/dist-packages/hwpack |
248 | |
249 | === removed file 'debian/python-linaro-media-create.install' |
250 | --- debian/python-linaro-media-create.install 2011-01-11 21:26:54 +0000 |
251 | +++ debian/python-linaro-media-create.install 1970-01-01 00:00:00 +0000 |
252 | @@ -1,1 +0,0 @@ |
253 | -usr/lib/python*/dist-packages/linaro_media_create |
254 | |
255 | === removed file 'debian/rules' |
256 | --- debian/rules 2011-01-22 00:20:14 +0000 |
257 | +++ debian/rules 1970-01-01 00:00:00 +0000 |
258 | @@ -1,9 +0,0 @@ |
259 | -#!/usr/bin/make -f |
260 | - |
261 | -%: |
262 | - dh --buildsystem=python_distutils --with-addon=python2 $* |
263 | - |
264 | -override_dh_auto_test: |
265 | - # XXX: The test-suite currently fails on Lucid. What can we do about |
266 | - # it? |
267 | - python -m testtools.run tests.test_suite |
268 | |
269 | === added file 'do-release' |
270 | --- do-release 1970-01-01 00:00:00 +0000 |
271 | +++ do-release 2011-01-28 16:27:36 +0000 |
272 | @@ -0,0 +1,67 @@ |
273 | +#!/bin/sh |
274 | +# tag tree, generate ChangeLog and roll a release tarball |
275 | + |
276 | +set -e |
277 | + |
278 | +self="$(basename "$0")" |
279 | + |
280 | +usage() { |
281 | + echo "Usage: $self <version>" |
282 | +} |
283 | + |
284 | +log() { |
285 | + echo "$*" >&2 |
286 | +} |
287 | + |
288 | +log_i() { |
289 | + log "I:" "$@" |
290 | +} |
291 | + |
292 | +die() { |
293 | + log "E:" "$@" |
294 | + exit 1 |
295 | +} |
296 | + |
297 | +version="$1" |
298 | + |
299 | +if [ -z "$version" ]; then |
300 | + usage >&2 |
301 | + exit 1 |
302 | +fi |
303 | + |
304 | +log_i "Checking tree status" |
305 | +status=`bzr status` |
306 | +if [ -n "$status" ]; then |
307 | + die "Tree is dirty according to bzr status" |
308 | +fi |
309 | + |
310 | +log_i "Running tests" |
311 | +if ! python -m testtools.run tests.test_suite; then |
312 | + die "Testsuite doesn't pass" |
313 | +fi |
314 | + |
315 | +if bzr tags | awk '{print $1}' | grep -qFx "$version"; then |
316 | + die "Tag $version already exists" |
317 | +fi |
318 | + |
319 | +log_i "Setting version to $version in setup.py" |
320 | +sed -i "s/^\\([[:space:]]*version=\"\\)[^\"]*\",\$/\1$version\",/" setup.py |
321 | + |
322 | +log_i "Committing $version" |
323 | +bzr commit -m "Release $version" |
324 | + |
325 | +log_i "Creating tag $version" |
326 | +bzr tag "$version" |
327 | + |
328 | +log_i "Generating ChangeLog" |
329 | +bzr log -v --gnu-changelog >ChangeLog |
330 | + |
331 | +log_i "Creating release tarball in parent directory" |
332 | +./setup.py sdist -d .. |
333 | + |
334 | +log_i "Cleaning up" |
335 | +rm -f ChangeLog MANIFEST |
336 | + |
337 | +log_i "Signing tarball" |
338 | +gpg --armor --sign --detach-sig "../linaro-image-tools-$version.tar.gz" |
339 | + |
340 | |
341 | === modified file 'setup.py' (properties changed: -x to +x) |
342 | --- setup.py 2011-01-11 21:26:54 +0000 |
343 | +++ setup.py 2011-01-28 16:27:36 +0000 |
344 | @@ -1,24 +1,19 @@ |
345 | +#!/usr/bin/env python |
346 | + |
347 | from distutils.core import setup |
348 | -import os |
349 | -import subprocess |
350 | - |
351 | - |
352 | -def get_version(): |
353 | - proc = subprocess.Popen( |
354 | - ["dpkg-parsechangelog"], |
355 | - cwd=os.path.abspath(os.path.dirname(__file__)), |
356 | - stdout=subprocess.PIPE) |
357 | - output, _ = proc.communicate() |
358 | - version = None |
359 | - for line in output.split("\n"): |
360 | - if line.startswith("Version: "): |
361 | - version = line.split(" ", 1)[1].strip() |
362 | - assert version is not None, ( |
363 | - "Couldn't determine version number from debian changelog") |
364 | - |
365 | - |
366 | -setup( |
367 | - name="hwpack", |
368 | - version=get_version(), |
369 | - packages=["hwpack", "linaro_media_create"], |
370 | +# https://launchpad.net/python-distutils-extra |
371 | +import DistUtilsExtra.auto |
372 | + |
373 | +DistUtilsExtra.auto.setup( |
374 | + name="linaro-image-tools", |
375 | + version="0.4.1.1", |
376 | + description="Tools to create and write Linaro images", |
377 | + url="https://launchpad.net/linaro-image-tools", |
378 | + license="GPL v3 or later", |
379 | + author='Linaro Infrastructure team', |
380 | + author_email="linaro-dev@lists.linaro.org", |
381 | + |
382 | + scripts=[ |
383 | + "linaro-hwpack-create", "linaro-hwpack-install", |
384 | + "linaro-media-create"], |
385 | ) |
Looks good to me. The only question I have is about the license, because not all bits are GPLv2+ (l-m-c is GPLv3+), but I guess the license specified in the files themselves (which I'm about to add) will, in practice, override the one in setup.py?