diff options
author | Tino Keitel <tino.keitel+debbugs@tikei.de> | 2011-11-22 19:30:55 +0100 |
---|---|---|
committer | Junichi Uekawa <dancer@netfort.gr.jp> | 2011-11-29 21:32:46 +0900 |
commit | 28aad3ad8a1ca425664a91e9371fa24f8c308a37 (patch) | |
tree | 936287a28b36f3b8498da8a4180e5cd23afe0c47 | |
parent | 415d4e1991f33b7c08571255cbedb42741440047 (diff) | |
download | pbuilder-28aad3ad8a1ca425664a91e9371fa24f8c308a37.tar pbuilder-28aad3ad8a1ca425664a91e9371fa24f8c308a37.tar.gz |
Bug#569917: Support base.tar.xz/bz2 as well as tgz
Package: pbuilder
Version: 0.203
Followup-For: Bug #569917
I cooked a little patch that adds a --compressprog command line option and
COMPRESSPROG option in pbuilderrc.
Tested with pigz, to get multithreaded, and therefore much faster
compression/decompression, and xz.
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.1.0-00002-g5eeb7f9 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages pbuilder depends on:
ii cdebootstrap 0.5.8+b1
ii coreutils 8.13-3
ii debconf [debconf-2.0] 1.5.41
ii debianutils 4.0.4
ii debootstrap 1.0.38
ii wget 1.13.4-1
Versions of packages pbuilder recommends:
ii devscripts 2.11.2
ii fakeroot 1.18.1-1
ii sudo 1.8.3p1-2
Versions of packages pbuilder suggests:
pn cowdancer 0.65
pn gdebi-core <none>
pn pbuilder-uml <none>
-- debconf information:
pbuilder/mirrorsite: http://ftp.de.debian.org/debian/
pbuilder/nomirror:
pbuilder/rewrite: false
-rw-r--r-- | debian/changelog | 6 | ||||
-rwxr-xr-x | pbuilder-checkparams | 6 | ||||
-rw-r--r-- | pbuilder-modules | 5 | ||||
-rw-r--r-- | pbuilder.8 | 9 | ||||
-rw-r--r-- | pbuilderrc | 3 | ||||
-rw-r--r-- | pbuilderrc.5 | 8 |
6 files changed, 35 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index 12de1ce..af85cf2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +pbuilder (0.204~) unstable; urgency=low + + * add --compressprog option + + -- Tino Keitel <tino+debian@tikei.de> Mon, 21 Nov 2011 21:10:11 +0100 + pbuilder (0.203) unstable; urgency=low * lighttpd test fails with cowdancer loaded. (closes: #640684) diff --git a/pbuilder-checkparams b/pbuilder-checkparams index 2e350d0..c031f18 100755 --- a/pbuilder-checkparams +++ b/pbuilder-checkparams @@ -105,6 +105,12 @@ while [ -n "$1" ]; do fi shift; shift; ;; + --compressprog) + if [ -n "$2" ]; then + COMPRESSPROG="$2" + fi + shift; shift; + ;; --aptcache) if [ -n "$2" ]; then if [ -d "$2" ]; then diff --git a/pbuilder-modules b/pbuilder-modules index 3e55153..b596d5d 100644 --- a/pbuilder-modules +++ b/pbuilder-modules @@ -75,6 +75,7 @@ pbuilder-options: --debug --twice --autocleanaptcache + --compressprog [program] --debootstrapopts [debootstrap options] --save-after-login/--save-after-exec --debootstrap [debootstrap|cdebootstrap] @@ -434,7 +435,7 @@ function extractbuildplace () { log "E: failed to find $BASETGZ, have you done <pbuilder create> to create your base tarball yet?" exit 1 fi - if ! (cd "$BUILDPLACE" && tar xfzp "$BASETGZ"); then + if ! (cd "$BUILDPLACE" && tar -x --use-compress-program "$COMPRESSPROG" -p -f "$BASETGZ"); then log "E: failed to extract $BASETGZ to $BUILDPLACE" exit 1 fi @@ -508,7 +509,7 @@ function create_basetgz() { sleep 10s done log "I: creating base tarball [${BASETGZ}]" - if ! tar cfz "${BASETGZ}.tmp" * ; then + if ! tar -c --use-compress-program "$COMPRESSPROG" -f "${BASETGZ}.tmp" * ; then log "E: failed building base tarball" rm -f "${BASETGZ}.tmp" exit 1; @@ -502,6 +502,15 @@ of .B "pbuilder." .TP +.BI "\-\-compressprog" +Program to use for compression and decompression of the base.tgz. +The default is to use gzip, and any program that can be used for +the --use-compress-program option of tar can be given. + +If set to "pigz", compression and decompression is gzip compatible +but will use all available CPUs. + +.TP .BI "\-\-twice" Build the package twice in a row. Useful to ensure the package cleans up properly. The resulting packages are the ones from the second build. @@ -99,3 +99,6 @@ PKGNAME_LOGFILE="" # default AUTOCLEANAPTCACHE AUTOCLEANAPTCACHE="" + +#default COMPRESSPROG +COMPRESSPROG="gzip" diff --git a/pbuilderrc.5 b/pbuilderrc.5 index 301b007..14fde73 100644 --- a/pbuilderrc.5 +++ b/pbuilderrc.5 @@ -153,6 +153,14 @@ is specified for .B "pbuilder update" option. .TP +.BI "COMPRESSPROG=" "gzip" +Program to use for compression and decompression of the base.tgz. +The default is to use gzip, and any program that can be used for +the --use-compress-program option of tar can be given. + +If set to "pigz", compression and decompression is gzip compatible +but will use all available CPUs. +.TP .BI "export http_proxy=" "http://your-proxy:8080/" Defines the proxy for http connection. .TP |