aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTino Keitel <tino.keitel+debbugs@tikei.de>2011-11-22 19:30:55 +0100
committerJunichi Uekawa <dancer@netfort.gr.jp>2011-11-29 21:48:55 +0900
commita8144e96463a46854f6e305fa2fb1fbcd19f62d9 (patch)
tree35f9cfc649acbb4c45b3e918afdf6ba7a8440df9
parent415d4e1991f33b7c08571255cbedb42741440047 (diff)
downloadpbuilder-a8144e96463a46854f6e305fa2fb1fbcd19f62d9.tar
pbuilder-a8144e96463a46854f6e305fa2fb1fbcd19f62d9.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
-rwxr-xr-xpbuilder-checkparams6
-rw-r--r--pbuilder-modules5
-rw-r--r--pbuilder.89
-rw-r--r--pbuilderrc3
-rw-r--r--pbuilderrc.58
5 files changed, 29 insertions, 2 deletions
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;
diff --git a/pbuilder.8 b/pbuilder.8
index eda054d..24c589b 100644
--- a/pbuilder.8
+++ b/pbuilder.8
@@ -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.
diff --git a/pbuilderrc b/pbuilderrc
index 350028a..2ee51e6 100644
--- a/pbuilderrc
+++ b/pbuilderrc
@@ -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