aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog6
-rwxr-xr-xpbuilder-checkparams6
-rw-r--r--pbuilder-modules5
-rw-r--r--pbuilder.89
-rw-r--r--pbuilderrc3
-rw-r--r--pbuilderrc.58
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;
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