From aa54a130c3923c5bf2fc04e98ef1ad873173cba2 Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Wed, 14 Jun 2017 18:25:11 +0200 Subject: [PATCH 1/3] Depend on packages in main instead of installing them at runtime --- debian/control | 9 ++++++++- live-build/functions | 8 +------- live-build/ubuntu-cpc/hooks/032-disk-image.binary | 2 -- live-build/ubuntu-cpc/hooks/032-root-squashfs.binary | 2 -- live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary | 2 -- .../ubuntu-cpc/hooks/034-disk-image-ppc64el.binary | 1 - live-build/ubuntu-cpc/hooks/040-qcow2-image.binary | 2 -- live-build/ubuntu-cpc/hooks/042-vagrant.binary | 3 --- live-build/ubuntu-server/hooks/030-root-squashfs.binary | 2 -- .../ubuntu-server/hooks/032-installer-squashfs.binary | 2 -- 10 files changed, 9 insertions(+), 24 deletions(-) diff --git a/debian/control b/debian/control index 9ecc7dbe..6107cbb6 100644 --- a/debian/control +++ b/debian/control @@ -12,21 +12,28 @@ Depends: ${misc:Depends}, android-tools-fsutils [armhf], apt-utils, debootstrap, + dosfstools, e2fsprogs, + gdisk, + genisoimage, germinate (>= 1.25.1), gnupg, grep-dctrl, + kpartx, live-build (>= 3.0~a57-1ubuntu12~), lsb-release, lzma, + parted, procps, python-minimal | python, python3-software-properties, + qemu-utils, rsync, snapd, squashfs-tools (>= 1:3.3-1), sudo, - ubuntu-image + ubuntu-image, + zerofree Suggests: partimage Breaks: ubuntu-defaults-builder (<< 0.32) Description: construction script for the livecd rootfs diff --git a/live-build/functions b/live-build/functions index c72c59a2..f89d22f9 100644 --- a/live-build/functions +++ b/live-build/functions @@ -8,8 +8,6 @@ loop_device= loop_raw= backing_img= -apt-get -qqy install dosfstools gdisk - clean_loops() { local kpartx_ret local kpartx_stdout @@ -51,7 +49,6 @@ make_ext4_partition() { } mount_image() { - apt-get install -qqy kpartx trap clean_loops EXIT backing_img="$1" local rootpart="$2" @@ -158,7 +155,6 @@ umount_partition() { # both of these are likely overkill, but it does result in slightly # smaller ext4 filesystem - apt-get -qqy install zerofree e2fsck -y -E discard ${rootfs_dev_mapper} zerofree ${rootfs_dev_mapper} fi @@ -230,7 +226,7 @@ create_vmdk() { destination="$2" size="${3:-10240}" - apt-get install -qqy qemu-utils vmdk-stream-converter + apt-get install -qqy vmdk-stream-converter streamconverter="/usr/share/pyshared/VMDKstream.py" scratch_d=$(mktemp -d) cp ${src} ${scratch_d}/resize.img @@ -263,8 +259,6 @@ create_derivative() { } convert_to_qcow2() { - apt-get install -qqy qemu-utils - src="$1" destination="$2" qemu-img convert -c -O qcow2 -o compat=0.10 "$src" "$destination" diff --git a/live-build/ubuntu-cpc/hooks/032-disk-image.binary b/live-build/ubuntu-cpc/hooks/032-disk-image.binary index a54ac8dd..81e8339e 100755 --- a/live-build/ubuntu-cpc/hooks/032-disk-image.binary +++ b/live-build/ubuntu-cpc/hooks/032-disk-image.binary @@ -32,8 +32,6 @@ case $ARCH:$SUBARCH in esac create_empty_partition_table() { - apt-get install -qqy parted - parted "$1" --script -- mklabel msdos } diff --git a/live-build/ubuntu-cpc/hooks/032-root-squashfs.binary b/live-build/ubuntu-cpc/hooks/032-root-squashfs.binary index 0a1d51ce..84c19920 100755 --- a/live-build/ubuntu-cpc/hooks/032-root-squashfs.binary +++ b/live-build/ubuntu-cpc/hooks/032-root-squashfs.binary @@ -43,8 +43,6 @@ umount "binary/boot/squashfs.dir/dev/pts" umount "binary/boot/squashfs.dir/dev" umount "binary/boot/squashfs.dir/tmp" -apt-get -qqy install squashfs-tools - squashfs_f="${PWD}/livecd.ubuntu-cpc.squashfs" squashfs_f_manifest="${squashfs_f}.manifest" diff --git a/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary b/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary index 3cf55ed1..3ceb7cd0 100755 --- a/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary +++ b/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary @@ -14,8 +14,6 @@ FS_LABEL="cloudimg-rootfs" . config/functions -apt-get -qqy install dosfstools gdisk - create_partitions() { disk_image="$1" sgdisk "${disk_image}" --zap-all diff --git a/live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary b/live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary index bad7297d..62a02094 100755 --- a/live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary +++ b/live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary @@ -14,7 +14,6 @@ FS_LABEL="cloudimg-rootfs" create_partitions() { disk_image="$1" - apt-get install -qqy gdisk sgdisk "${disk_image}" \ --zap-all sgdisk "${disk_image}" \ diff --git a/live-build/ubuntu-cpc/hooks/040-qcow2-image.binary b/live-build/ubuntu-cpc/hooks/040-qcow2-image.binary index d2a00b11..a1233dfd 100755 --- a/live-build/ubuntu-cpc/hooks/040-qcow2-image.binary +++ b/live-build/ubuntu-cpc/hooks/040-qcow2-image.binary @@ -19,8 +19,6 @@ case $ARCH:$SUBARCH in ;; esac -apt-get install -qqy qemu-utils - . config/functions if [ -f binary/boot/disk-uefi.ext4 ]; then diff --git a/live-build/ubuntu-cpc/hooks/042-vagrant.binary b/live-build/ubuntu-cpc/hooks/042-vagrant.binary index 382ac547..ed45e44c 100755 --- a/live-build/ubuntu-cpc/hooks/042-vagrant.binary +++ b/live-build/ubuntu-cpc/hooks/042-vagrant.binary @@ -46,9 +46,6 @@ esac . config/functions -# Virtualbox is needed for making a small VMDK -apt-get -qqy install genisoimage qemu-utils - # Lets be safe about this box_d=$(mktemp -d) seed_d=$(mktemp -d) diff --git a/live-build/ubuntu-server/hooks/030-root-squashfs.binary b/live-build/ubuntu-server/hooks/030-root-squashfs.binary index dad337d0..ad34e76a 100755 --- a/live-build/ubuntu-server/hooks/030-root-squashfs.binary +++ b/live-build/ubuntu-server/hooks/030-root-squashfs.binary @@ -25,8 +25,6 @@ fi mkdir binary/boot/squashfs.dir cp -a chroot/* binary/boot/squashfs.dir -apt-get -qqy install squashfs-tools - squashfs_f="${PWD}/livecd.${PROJECT}.squashfs" squashfs_f_manifest="${squashfs_f}.manifest" diff --git a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary index 32e57ca6..943eb2ab 100755 --- a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary +++ b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary @@ -159,8 +159,6 @@ umount "binary/boot/squashfs.dir/dev/pts" umount "binary/boot/squashfs.dir/dev" umount "binary/boot/squashfs.dir/tmp" -apt-get -qqy install squashfs-tools - squashfs_f="${PWD}/livecd.${PROJECT}.installer.squashfs" (cd "$OVERLAY_ROOT/" && From 6c9cf10d7214a57ee41de98f4b3d7ea9d1306d37 Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Wed, 14 Jun 2017 18:25:15 +0200 Subject: [PATCH 2/3] Depend on pxz and vmdk-stream-converter instead of installing them at runtime --- debian/control | 2 ++ live-build/auto/build | 2 -- live-build/functions | 1 - live-build/ubuntu-cpc/hooks/040-qcow2-image.binary | 1 - 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/debian/control b/debian/control index 6107cbb6..b2715e32 100644 --- a/debian/control +++ b/debian/control @@ -25,6 +25,7 @@ Depends: ${misc:Depends}, lzma, parted, procps, + pxz, python-minimal | python, python3-software-properties, qemu-utils, @@ -33,6 +34,7 @@ Depends: ${misc:Depends}, squashfs-tools (>= 1:3.3-1), sudo, ubuntu-image, + vmdk-stream-converter [amd64 i386], zerofree Suggests: partimage Breaks: ubuntu-defaults-builder (<< 0.32) diff --git a/live-build/auto/build b/live-build/auto/build index 50bc8333..e909a00a 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -17,8 +17,6 @@ fi if [ "${IMAGEFORMAT:-}" = "ubuntu-image" ]; then # Use ubuntu-image instead of live-build - apt-get install -qqy pxz - env SNAPPY_STORE_NO_CDN=1 \ ubuntu-image -c edge \ -o livecd."$PROJECT".img livecd."$PROJECT".model-assertion diff --git a/live-build/functions b/live-build/functions index f89d22f9..58810fb7 100644 --- a/live-build/functions +++ b/live-build/functions @@ -226,7 +226,6 @@ create_vmdk() { destination="$2" size="${3:-10240}" - apt-get install -qqy vmdk-stream-converter streamconverter="/usr/share/pyshared/VMDKstream.py" scratch_d=$(mktemp -d) cp ${src} ${scratch_d}/resize.img diff --git a/live-build/ubuntu-cpc/hooks/040-qcow2-image.binary b/live-build/ubuntu-cpc/hooks/040-qcow2-image.binary index a1233dfd..e98999c4 100755 --- a/live-build/ubuntu-cpc/hooks/040-qcow2-image.binary +++ b/live-build/ubuntu-cpc/hooks/040-qcow2-image.binary @@ -13,7 +13,6 @@ 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 exit 0 ;; From 0bee1ec424d9cd111ce342df416c9f6be9f23422 Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Wed, 14 Jun 2017 18:26:22 +0200 Subject: [PATCH 3/3] Update changelog --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index a17697fb..60d90c6b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +livecd-rootfs (2.447) UNRELEASED; urgency=medium + + * Depend on packages in main instead of installing them at runtime + * Depend on pxz and vmdk-stream-converter instead of installing them + at run time + + -- Balint Reczey Wed, 14 Jun 2017 18:25:32 +0200 + livecd-rootfs (2.446) artful; urgency=medium * Build ubuntu back with tasks. The metapackage switch was due to g++