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
diff -ru pbuilder-0.203/debian/changelog pbuilder-0.204~/debian/changelog --- pbuilder-0.203/debian/changelog 2011-09-22 04:31:08.000000000 +0200 +++ pbuilder-0.204~/debian/changelog 2011-11-22 13:22:59.198920940 +0100 @@ -1,3 +1,9 @@ +pbuilder (0.204~) unstable; urgency=low + + * add --compressprog option + + -- Tino Keitel <tino+deb...@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 -ru pbuilder-0.203/pbuilder-checkparams pbuilder-0.204~/pbuilder-checkparams --- pbuilder-0.203/pbuilder-checkparams 2010-01-03 03:38:09.000000000 +0100 +++ pbuilder-0.204~/pbuilder-checkparams 2011-11-22 14:02:22.892153288 +0100 @@ -105,6 +105,12 @@ fi shift; shift; ;; + --compressprog) + if [ -n "$2" ]; then + COMPRESSPROG="$2" + fi + shift; shift; + ;; --aptcache) if [ -n "$2" ]; then if [ -d "$2" ]; then diff -ru pbuilder-0.203/pbuilder-modules pbuilder-0.204~/pbuilder-modules --- pbuilder-0.203/pbuilder-modules 2011-06-25 01:06:40.000000000 +0200 +++ pbuilder-0.204~/pbuilder-modules 2011-11-22 10:12:11.429410023 +0100 @@ -75,6 +75,7 @@ --debug --twice --autocleanaptcache + --compressprog [program] --debootstrapopts [debootstrap options] --save-after-login/--save-after-exec --debootstrap [debootstrap|cdebootstrap] @@ -434,7 +435,7 @@ 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 @@ 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; diff -ru pbuilder-0.203/pbuilder.8 pbuilder-0.204~/pbuilder.8 --- pbuilder-0.203/pbuilder.8 2010-01-31 04:52:57.000000000 +0100 +++ pbuilder-0.204~/pbuilder.8 2011-11-22 10:27:24.246037691 +0100 @@ -502,6 +502,15 @@ .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. diff -ru pbuilder-0.203/pbuilderrc pbuilder-0.204~/pbuilderrc --- pbuilder-0.203/pbuilderrc 2010-07-05 15:06:08.000000000 +0200 +++ pbuilder-0.204~/pbuilderrc 2011-11-22 10:02:44.436100912 +0100 @@ -99,3 +99,6 @@ # default AUTOCLEANAPTCACHE AUTOCLEANAPTCACHE="" + +#default COMPRESSPROG +COMPRESSPROG="gzip" diff -ru pbuilder-0.203/pbuilderrc.5 pbuilder-0.204~/pbuilderrc.5 --- pbuilder-0.203/pbuilderrc.5 2011-06-25 01:06:40.000000000 +0200 +++ pbuilder-0.204~/pbuilderrc.5 2011-11-22 10:27:09.436038322 +0100 @@ -153,6 +153,14 @@ .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