From 14064e08a10da7131ba2d50ad3cf277df696a7c3 Mon Sep 17 00:00:00 2001 From: Cyril Brulebois Date: Mon, 23 Jan 2023 19:30:35 +0100 Subject: [PATCH] Replace all gzip -9 calls with pigz -9nm ones. Some gzip calls have --no-name, which disables both the original name and timestamp; use -n (disables original name) and -m (disables original timestamp) for pigz, for all calls. --- contrib/mklist | 2 +- tools/boot/bookworm/boot-x86 | 2 +- tools/boot/bookworm/common.sh | 2 +- tools/boot/bullseye/boot-x86 | 2 +- tools/boot/buster/boot-x86 | 2 +- tools/boot/jessie/boot-x86 | 2 +- tools/boot/stretch/boot-x86 | 2 +- tools/make-firmware-image | 2 +- tools/make_disc_trees.pl | 4 ++-- tools/make_image | 2 +- update-cd | 4 ++-- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/contrib/mklist b/contrib/mklist index 644b8efd..fa06918b 100755 --- a/contrib/mklist +++ b/contrib/mklist @@ -14,7 +14,7 @@ for FILE in $@; do isoinfo -fR -i $FILE | perl -e ' while (<>) { chomp;m,^/pool/[^/]+/[^/]+/[^/]+/(.*), and print "$1\n"; - }' | sort | gzip -9 > $LISTFILE + }' | sort | pigz -9nm > $LISTFILE mv $LISTFILE $LISTDIR fi done diff --git a/tools/boot/bookworm/boot-x86 b/tools/boot/bookworm/boot-x86 index 56b7369a..1ded5bc0 100644 --- a/tools/boot/bookworm/boot-x86 +++ b/tools/boot/bookworm/boot-x86 @@ -380,7 +380,7 @@ if [ "$LOGOPNG" ] ; then cp $LOGOPNG $INITRDDIR/usr/share/graphics/logo_debian.png echo usr/share/graphics/logo_debian.png | \ cpio -oA -H newc -F $GTKINITRD - gzip -9 $GTKINITRD + pigz -9nm $GTKINITRD ) rm -rf $INITRDDIR fi diff --git a/tools/boot/bookworm/common.sh b/tools/boot/bookworm/common.sh index b9fbd046..cfad8d1a 100644 --- a/tools/boot/bookworm/common.sh +++ b/tools/boot/bookworm/common.sh @@ -241,7 +241,7 @@ install_firmwares_initrd () { dpkg -x "${MIRROR}/${FILE}" ${FWDIR} done (cd ${FWDIR} ; find lib/firmware | cpio -oA -H newc -F $initrd) - gzip -9 $initrd + pigz -9nm $initrd rm -fr $FWDIR else echo " WARNING: Could not find firmware package(s) matching $regex" diff --git a/tools/boot/bullseye/boot-x86 b/tools/boot/bullseye/boot-x86 index 610202f9..312e5dee 100644 --- a/tools/boot/bullseye/boot-x86 +++ b/tools/boot/bullseye/boot-x86 @@ -402,7 +402,7 @@ if [ "$LOGOPNG" ] ; then cp $LOGOPNG $INITRDDIR/usr/share/graphics/logo_debian.png echo usr/share/graphics/logo_debian.png | \ cpio -oA -H newc -F $GTKINITRD - gzip -9 $GTKINITRD + pigz -9nm $GTKINITRD ) rm -rf $INITRDDIR fi diff --git a/tools/boot/buster/boot-x86 b/tools/boot/buster/boot-x86 index 9110dcdb..feaaa818 100644 --- a/tools/boot/buster/boot-x86 +++ b/tools/boot/buster/boot-x86 @@ -428,7 +428,7 @@ if [ "$LOGOPNG" ] ; then cp $LOGOPNG $INITRDDIR/usr/share/graphics/logo_debian.png echo usr/share/graphics/logo_debian.png | \ cpio -oA -H newc -F $GTKINITRD - gzip -9 $GTKINITRD + pigz -9nm $GTKINITRD ) rm -rf $INITRDDIR fi diff --git a/tools/boot/jessie/boot-x86 b/tools/boot/jessie/boot-x86 index a7162dc3..32a25f8c 100644 --- a/tools/boot/jessie/boot-x86 +++ b/tools/boot/jessie/boot-x86 @@ -406,7 +406,7 @@ if [ "$LOGOPNG" ] ; then cp $LOGOPNG $INITRDDIR/usr/share/graphics/logo_debian.png echo usr/share/graphics/logo_debian.png | \ cpio -oA -H newc -F $GTKINITRD - gzip -9 $GTKINITRD + pigz -9nm $GTKINITRD ) rm -rf $INITRDDIR fi diff --git a/tools/boot/stretch/boot-x86 b/tools/boot/stretch/boot-x86 index 03e11816..460c85c6 100644 --- a/tools/boot/stretch/boot-x86 +++ b/tools/boot/stretch/boot-x86 @@ -426,7 +426,7 @@ if [ "$LOGOPNG" ] ; then cp $LOGOPNG $INITRDDIR/usr/share/graphics/logo_debian.png echo usr/share/graphics/logo_debian.png | \ cpio -oA -H newc -F $GTKINITRD - gzip -9 $GTKINITRD + pigz -9nm $GTKINITRD ) rm -rf $INITRDDIR fi diff --git a/tools/make-firmware-image b/tools/make-firmware-image index e5d7438b..94f06859 100755 --- a/tools/make-firmware-image +++ b/tools/make-firmware-image @@ -39,7 +39,7 @@ cd $TMPDIR/firmware tar czf ../firmware.tar.gz . zip -9rq ../firmware.zip . cd .. -find firmware | cpio --quiet -o -H newc | gzip -9 > firmware.cpio.gz +find firmware | cpio --quiet -o -H newc | pigz -9nm > firmware.cpio.gz ls -l $PWD/firmware.cpio.gz $PWD/firmware.tar.gz $PWD/firmware.zip sha256sum firmware.* > SHA256SUMS diff --git a/tools/make_disc_trees.pl b/tools/make_disc_trees.pl index 8716b5db..0574aab8 100755 --- a/tools/make_disc_trees.pl +++ b/tools/make_disc_trees.pl @@ -662,13 +662,13 @@ sub recompress { # Packages and Sources files; workaround for bug #402482 if ($filename =~ m/\/.*\/(Packages|Sources)$/o) { system("rm -f $_.gz"); - system("gzip --no-name -9c < $_ >$_.gz"); + system("pigz -9nmc < $_ >$_.gz"); } # Translation files need to be compressed in .gz format on CD? if ($filename =~ m/\/.*\/i18n\/(Translation.*)$/o && ! ($filename =~ m/\/.*\/i18n\/(Translation.*gz)$/o)) { system("rm -f $_.gz"); - system("gzip --no-name -9c < $_ >$_.gz"); + system("pigz -9nmc < $_ >$_.gz"); system("rm -f $_"); } } diff --git a/tools/make_image b/tools/make_image index c99a4214..234c8ce0 100755 --- a/tools/make_image +++ b/tools/make_image @@ -151,7 +151,7 @@ do fi # Generate our listfile while we have the information to hand easily - find CD$n/pool -type f | sed 's?^.*/??g' | gzip -9 > $OUT/$OUTFILE.list.gz + find CD$n/pool -type f | sed 's?^.*/??g' | pigz -9nm > $OUT/$OUTFILE.list.gz fi # If we've made jigdo files, tweak them with extra info now diff --git a/update-cd b/update-cd index d35277ca..06e3c1fb 100755 --- a/update-cd +++ b/update-cd @@ -183,7 +183,7 @@ make_cd () { echo $SNAPSHOT >> ${JIGDODIR}/${BASENAME}.jigdo # Make sure we compres the jigdo file *before* we checksum it - gzip -9 ${JIGDODIR}/${BASENAME}.jigdo + pigz -9nm ${JIGDODIR}/${BASENAME}.jigdo mv ${JIGDODIR}/${BASENAME}.jigdo.gz ${JIGDODIR}/${BASENAME}.jigdo for SHA_SIZE in 256 512; do @@ -215,7 +215,7 @@ make_cd () { fi set -e fi - find $UPD/CD$CDNUM/pool -type f | sed 's?^.*/??g' | gzip -9 > ${LISTDIR}/${BASENAME}.list.gz + find $UPD/CD$CDNUM/pool -type f | sed 's?^.*/??g' | pigz -9nm > ${LISTDIR}/${BASENAME}.list.gz } add_file () {