Bug#569917: Support base.tar.xz/bz2 as well as tgz

Junichi Uekawa dancer at netfort.gr.jp
Tue Nov 29 12:32:24 UTC 2011


Hi,

Heh, thanks for the patch.
I don't know how really it makes things fast, but it probably doesn't hurt.

I assume --use-compress-program has been available for tar since forever?

At Tue, 22 Nov 2011 19:30:55 +0100,
Tino Keitel wrote:
> 
> 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+debian at 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





More information about the Pbuilder-maint mailing list