From: Joerg Jaspert Date: Thu, 29 Oct 2009 09:16:16 +0000 (+0100) Subject: rsyncable X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8154d2b22cb56511e95f9b7e2a61a94bfb3e905f;p=dak rsyncable use --rsyncable for most of our gzip compressions. For Packages.gz ... 2% bigger, 1/8th of the transfer For Contents-lala.gz ... ~4% bigger, 1/4th of the transfer Signed-off-by: Joerg Jaspert --- diff --git a/config/debian/cron.dinstall b/config/debian/cron.dinstall index 1c9fa5af..96001838 100755 --- a/config/debian/cron.dinstall +++ b/config/debian/cron.dinstall @@ -252,6 +252,7 @@ function mpfm() { function packages() { log "Generating Packages and Sources files" cd $configdir + GZIP='--rsyncable' ; export GZIP apt-ftparchive generate apt.conf } diff --git a/dak/generate_index_diffs.py b/dak/generate_index_diffs.py index 4222c0cf..7e4b0058 100755 --- a/dak/generate_index_diffs.py +++ b/dak/generate_index_diffs.py @@ -254,7 +254,7 @@ def genchanges(Options, outdir, oldfile, origfile, maxdiffs = 14): if not os.path.isdir(outdir): os.mkdir(outdir) - w = os.popen("diff --ed - %s | gzip -c -9 > %s.gz" % + w = os.popen("diff --ed - %s | gzip --rsyncable -c -9 > %s.gz" % (newfile, difffile), "w") pipe_file(oldf, w) oldf.close() diff --git a/scripts/debian/mkfilesindices b/scripts/debian/mkfilesindices index b9d31a02..c16fde6a 100755 --- a/scripts/debian/mkfilesindices +++ b/scripts/debian/mkfilesindices @@ -27,7 +27,7 @@ echo "Generating sources list..." cd $base/ftp find ./dists -maxdepth 1 \! -type d find ./dists \! -type d | grep "/source/" -) | sort -u | gzip -9 > source.list.gz +) | sort -u | gzip --rsyncable -9 > source.list.gz echo "Generating arch lists..." @@ -39,7 +39,7 @@ for a in $ARCHES; do cd $base/ftp find ./dists -maxdepth 1 \! -type d find ./dists \! -type d | grep -E "(proposed-updates.*_$a.changes$|/main/disks-$a/|/main/installer-$a/|/Contents-$a|/binary-$a/)" - ) | sort -u | gzip -9 > arch-$a.list.gz + ) | sort -u | gzip --rsyncable -9 > arch-$a.list.gz done echo "Generating suite lists..." @@ -62,7 +62,7 @@ printf 'SELECT id, suite_name FROM suite\n' | psql -F' ' -At projectb | done ) suite_list $id | tr -d ' ' | sed 's,^/srv/ftp.debian.org/ftp,.,' - ) | sort -u | gzip -9 > suite-${suite}.list.gz + ) | sort -u | gzip --rsyncable -9 > suite-${suite}.list.gz done echo "Finding everything on the ftp site to generate sundries $(date +"%X")..." @@ -83,7 +83,7 @@ done (cd $base/ftp/ for dist in sid squeeze; do - find ./dists/$dist/main/i18n/ \! -type d | sort -u | gzip -9 > $base/ftp/indices/files/components/translation-$dist.list.gz + find ./dists/$dist/main/i18n/ \! -type d | sort -u | gzip --rsyncable -9 > $base/ftp/indices/files/components/translation-$dist.list.gz done ) diff --git a/scripts/debian/mklslar b/scripts/debian/mklslar index 19363f1f..231f7f8c 100755 --- a/scripts/debian/mklslar +++ b/scripts/debian/mklslar @@ -26,11 +26,11 @@ if [ -r ${filename}.gz ] ; then mv -f ${filename}.gz $filename.old.gz mv -f .$filename.new $filename rm -f $filename.patch.gz - zcat $filename.old.gz | diff -u - $filename | gzip -9cfn - >$filename.patch.gz + zcat $filename.old.gz | diff -u - $filename | gzip --rsyncable -9cfn - >$filename.patch.gz rm -f $filename.old.gz else mv -f .$filename.new $filename fi -gzip -9cfN $filename >$filename.gz +gzip --rsyncable -9cfN $filename >$filename.gz rm -f $filename diff --git a/scripts/debian/mkmaintainers b/scripts/debian/mkmaintainers index a0abaa1f..41e8727c 100755 --- a/scripts/debian/mkmaintainers +++ b/scripts/debian/mkmaintainers @@ -17,7 +17,7 @@ set -e if [ $rc = 1 ] || [ ! -f Maintainers ] ; then echo -n "installing Maintainers ... " mv -f .new-maintainers Maintainers - gzip -9v .new-maintainers.gz + gzip --rsyncable -9v .new-maintainers.gz mv -f .new-maintainers.gz Maintainers.gz elif [ $rc = 0 ] ; then echo '(same as before)'