From 646a88b5eeb677bfa84629e0a6f6a8b7347409b6 Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Tue, 5 Dec 2017 22:40:35 +0100 Subject: [PATCH] Use xz -T4 -0 instead of pxz Test showed very little difference in file-size between -0 and -9 while both compression and decompression need much less memory and compression needs less CPU time for -0. Supported xz versions before 5.2 also accept the -T4 option but ignore it. Also depend on xz-utils instead of downloading pxz. LP: #1701132 --- debian/control | 1 + live-build/ubuntu-cpc/hooks/040-qcow2-image.binary | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index b97db435..fd7f72f1 100644 --- a/debian/control +++ b/debian/control @@ -31,6 +31,7 @@ Depends: ${misc:Depends}, rsync, squashfs-tools (>= 1:3.3-1), vmdk-stream-converter [amd64 i386], + xz-utils, zerofree Suggests: partimage Breaks: ubuntu-defaults-builder (<< 0.32) diff --git a/live-build/ubuntu-cpc/hooks/040-qcow2-image.binary b/live-build/ubuntu-cpc/hooks/040-qcow2-image.binary index 8d7086bb..5f02ad53 100755 --- a/live-build/ubuntu-cpc/hooks/040-qcow2-image.binary +++ b/live-build/ubuntu-cpc/hooks/040-qcow2-image.binary @@ -4,8 +4,7 @@ case $ARCH:$SUBARCH in # Not sure if any other cloud images use subarch for something that # should take qcow2 format, so only skipping this on raspi2 for now. armhf:raspi2) - apt-get install -qqy pxz - pxz -T4 -c binary/boot/disk.ext4 > livecd.ubuntu-cpc.disk1.img.xz + xz -0 -T4 -c binary/boot/disk.ext4 > livecd.ubuntu-cpc.disk1.img.xz exit 0 ;; esac