diff --git a/debian/changelog b/debian/changelog index b2d103b3..ce30ba43 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,18 @@ +livecd-rootfs (2.485) bionic; urgency=medium + + [ Michael Hudson-Doyle ] + * Automount a partition of fixed UUID for giving subiquity canned answers. + + [ Balint Reczey ] + * Use default xz compression (-6) for raspi2 image. + Xz with -0 generated ~35% bigger compressed image. (LP: #1732681) + * Zero fill space in UEFI partitions, too + * Set LB_ISO_PREPARER to livecd-rootfs to avoid unbound variable in + default string + * Build minimized images in a 1GiB image + + -- Michael Hudson-Doyle Mon, 04 Dec 2017 10:51:13 +1300 + livecd-rootfs (2.484) bionic; urgency=medium [ Balint Reczey ] diff --git a/live-build/auto/config b/live-build/auto/config index 8c749ec6..4f3304b2 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -694,6 +694,7 @@ esac lb config noauto \ --mode ubuntu \ --distribution "$SUITE" \ + --iso-preparer "livecd-rootfs" \ --bootstrap-keyring ubuntu-keyring \ --binary-images "$BINARY_IMAGES" \ --memtest "$MEMTEST" \ @@ -716,6 +717,11 @@ echo "SUBPROJECT=\"${SUBPROJECT:-}\"" >> config/chroot echo "LB_BINARY_HOOKS=\"$BINARY_HOOKS\"" >> config/binary echo "BUILDSTAMP=\"$NOW\"" >> config/binary echo "SUBPROJECT=\"${SUBPROJECT:-}\"" >> config/binary +if [ "${SUBPROJECT:-}" = minimized ]; then + # try building minimized images in a 1GiB image but still allow overriding + # IMAGE_SIZE in lb build + echo 'IMAGE_SIZE=${IMAGE_SIZE:-'$((1024*1024*1024))'}' >> config/binary +fi case $ARCH+$SUBARCH in armhf+raspi2) diff --git a/live-build/functions b/live-build/functions index 549f3be3..04397fdb 100644 --- a/live-build/functions +++ b/live-build/functions @@ -171,6 +171,9 @@ umount_disk_image() { local uefi_dev="/dev/mapper${loop_device///dev/}p15" if [ -e "$mountpoint/boot/efi" -a -b "$uefi_dev" ]; then + # zero fill free space in UEFI partition + cat < /dev/zero > "$mountpoint/boot/efi/bloat_file" 2> /dev/null || true + rm "$mountpoint/boot/efi/bloat_file" umount --detach-loop "$mountpoint/boot/efi" fi diff --git a/live-build/ubuntu-cpc/hooks/032-disk-image.binary b/live-build/ubuntu-cpc/hooks/032-disk-image.binary index 7989ff6a..71db6d24 100755 --- a/live-build/ubuntu-cpc/hooks/032-disk-image.binary +++ b/live-build/ubuntu-cpc/hooks/032-disk-image.binary @@ -3,10 +3,10 @@ IMAGE_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process" FS_LABEL="cloudimg-rootfs" -. config/functions - . config/binary +. config/functions + BOOTPART_START= BOOTPART_END= BOOT_MOUNTPOINT= 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 8e8b0070..1dece0a3 100755 --- a/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary +++ b/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary @@ -12,6 +12,8 @@ esac IMAGE_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process" FS_LABEL="cloudimg-rootfs" +. config/binary + . config/functions create_partitions() { 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 649843e4..b97ef55b 100755 --- a/live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary +++ b/live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary @@ -10,6 +10,8 @@ esac IMAGE_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process" FS_LABEL="cloudimg-rootfs" +. config/binary + . config/functions create_partitions() { diff --git a/live-build/ubuntu-cpc/hooks/040-qcow2-image.binary b/live-build/ubuntu-cpc/hooks/040-qcow2-image.binary index 981f7bce..b9c40a88 100755 --- a/live-build/ubuntu-cpc/hooks/040-qcow2-image.binary +++ b/live-build/ubuntu-cpc/hooks/040-qcow2-image.binary @@ -13,7 +13,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) - xz -0 -T4 -c binary/boot/disk.ext4 > livecd.ubuntu-cpc.disk1.img.xz + xz -T4 -c binary/boot/disk.ext4 > livecd.ubuntu-cpc.disk1.img.xz exit 0 ;; esac diff --git a/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/local-fs.target.wants/subiquity_config.mount b/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/local-fs.target.wants/subiquity_config.mount new file mode 120000 index 00000000..9c22c100 --- /dev/null +++ b/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/local-fs.target.wants/subiquity_config.mount @@ -0,0 +1 @@ +../subiquity_config.mount \ No newline at end of file diff --git a/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/subiquity_config.mount b/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/subiquity_config.mount new file mode 100644 index 00000000..af33494b --- /dev/null +++ b/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/subiquity_config.mount @@ -0,0 +1,4 @@ +[Mount] +What=/dev/disk/by-uuid/00c629d6-06ab-4dfd-b21e-c3186f34105d +Where=/subiquity_config +Type=ext4