On Wed, May 16, 2012 at 02:47:54PM +0200, Goswin von Brederlow wrote:
> Can someone set the default to xz and recompile all of Debian or at
> least base and create a repository from that for install tests?
There's no need to recompile anything. You can recompress existing packages
using the attached script.
--
“This is gonna be as easy as cheating on an ethics exam!”
-Cerise Brightmoon
#!/bin/sh
set -e
if [ $# -eq 0 ]
then
cat >&2 <<END
Usage: $0 foo.deb [bar.deb ...]
If there's more than one package, almost always you'd want instead:
parallel $0 -- foo.deb bar.deb
Packages already using xz are blindly repacked anyway; this ensures they can
be decompressed using 10MB memory (as opposed to 65MB for xz -9), but is
otherwise a waste of time.
END
exit 1
fi
for F in "$@"
do
[ -f "$F" ] || (echo >&2 "No such file: $F" && exit 1)
DIR=".$F$"
rm -rf "$DIR"
mkdir "$DIR"
cd "$DIR"
ar x "../$F" debian-binary control.tar.gz
dpkg-deb --fsys-tarfile "../$F"|xz >data.tar.xz
rm "../$F"
ar rcD "../$F" debian-binary control.tar.gz data.tar.xz
cd ..
rm -rf "$DIR"
done
Attachment:
signature.asc
Description: Digital signature