From 527a7b165e1b15b7bbce14dd051a7c1e71dbe4fc Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Thu, 28 Sep 2017 09:34:31 -0400 Subject: [PATCH 01/28] Begin adding support for a project-independent 'minimize' subproject, which (ironically) omits ubuntu-minimal in favor of using only the minbase package set. --- live-build/auto/config | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/live-build/auto/config b/live-build/auto/config index cbdeea85..a28b6bc6 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -196,6 +196,10 @@ HWE_X_PACKAGES="xserver-xorg-hwe-16.04 xserver-xorg-video-all-hwe-16.04 xserver- HWE_KERNEL_FLAVOUR="generic-hwe-16.04" HWE_SIGNED_KERNEL_PACKAGE="linux-signed-$HWE_KERNEL_FLAVOUR" +if [ "$SUBPROJECT" = minimize ]; then + OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal" +fi + case $PROJECT in ubuntu|ubuntu-dvd) HWE_BUILD="yes" @@ -495,8 +499,12 @@ case $PROJECT in ;; ubuntu-cpc) - add_task install minimal standard cloud-image - add_package install ubuntu-minimal + if [ "$SUBPROJECT" = minimize ]; then + add_task install cloud-image + else + add_task install minimal standard cloud-image + add_package install ubuntu-minimal + fi BINARY_REMOVE_LINUX=false OPTS="${OPTS:+$OPTS }--initramfs=none" From 95b06ff341c9b25e8ef52379f331a900c3ddda59 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Thu, 28 Sep 2017 09:34:31 -0400 Subject: [PATCH 02/28] Export the subproject into config/chroot and config/binary, so that this information is available to per-project hooks that need to be subproject-aware (e.g., to skip steps when SUBPROJECT=minimize) --- live-build/auto/config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/live-build/auto/config b/live-build/auto/config index a28b6bc6..fbafaa76 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -664,8 +664,10 @@ lb config noauto \ "$@" echo "LB_CHROOT_HOOKS=\"$CHROOT_HOOKS\"" >> config/chroot +echo "SUBPROJECT=\"$SUBPROJECT\"" >> config/chroot echo "LB_BINARY_HOOKS=\"$BINARY_HOOKS\"" >> config/binary echo "BUILDSTAMP=\"$NOW\"" >> config/binary +echo "SUBPROJECT=\"$SUBPROJECT\"" >> config/binary case $ARCH+$SUBARCH in armhf+raspi2) From 86108d69d968fd0f3308c5cd5fac1f8cb7ecbdfd Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Thu, 28 Sep 2017 09:34:31 -0400 Subject: [PATCH 03/28] Make the 999-cpc-fixes.chroot subproject-aware, so we don't try to locale-gen --- live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot b/live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot index cf6b6bdb..efbd7193 100755 --- a/live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot +++ b/live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot @@ -3,6 +3,8 @@ rootd="${1:-/}" root_fs_label=cloudimg-rootfs set -ex +. /root/config/chroot + CLOUD_IMG_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process" LANG=C @@ -87,7 +89,9 @@ _xchroot "${rootd}" sh -c 'sed -i "/^127.0.1.1/d" /etc/hosts' _xchroot "${rootd}" sh -c 'rm -f /etc/ssh/ssh_host_[rd]sa_key*' ## -------------- -_xchroot "${rootd}" locale-gen en_US.utf8 +if [ "${SUBPROJECT:-}" != minimize ]; then + _xchroot "${rootd}" locale-gen en_US.utf8 +fi ## -------------- # set cloud-init to be on From 5a6f68a1a91e29535eccb1318bb063b449e67ec0 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Thu, 28 Sep 2017 09:34:31 -0400 Subject: [PATCH 04/28] We probably still want sudo, even in a minimal image. --- live-build/auto/config | 1 + 1 file changed, 1 insertion(+) diff --git a/live-build/auto/config b/live-build/auto/config index fbafaa76..26d0e967 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -501,6 +501,7 @@ case $PROJECT in ubuntu-cpc) if [ "$SUBPROJECT" = minimize ]; then add_task install cloud-image + add_package install sudo else add_task install minimal standard cloud-image add_package install ubuntu-minimal From cd15b730f748e791af795fcc0632cd548dc8b91c Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Thu, 28 Sep 2017 09:38:21 -0400 Subject: [PATCH 05/28] In a cloud environment, we can rely on the kernel being able to boot the root filesystem directly, without an initramfs; enable this when building minimized. --- live-build/ubuntu-cpc/functions | 4 ++++ .../ubuntu-cpc/hooks/032-disk-image.binary | 23 +++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/live-build/ubuntu-cpc/functions b/live-build/ubuntu-cpc/functions index 1cde487a..9e340149 100644 --- a/live-build/ubuntu-cpc/functions +++ b/live-build/ubuntu-cpc/functions @@ -273,6 +273,10 @@ replace_grub_root_with_label() { # Instead, we want grub to use the cloudimg-rootfs labelled disk CHROOT_ROOT="$1" + # If boot by partuuid has been requested, don't override. + if grep -q ^GRUB_FORCE_PARTUUID= $CHROOT_ROOT/etc/default/grub; then + return 0 + fi sed -i -e "s,root=[^ ]\+,root=LABEL=cloudimg-rootfs," \ "$CHROOT_ROOT/boot/grub/grub.cfg" } diff --git a/live-build/ubuntu-cpc/hooks/032-disk-image.binary b/live-build/ubuntu-cpc/hooks/032-disk-image.binary index 9c7d42ea..4e00649e 100755 --- a/live-build/ubuntu-cpc/hooks/032-disk-image.binary +++ b/live-build/ubuntu-cpc/hooks/032-disk-image.binary @@ -2,6 +2,8 @@ . config/functions +. /build/config/binary + BOOTPART_START= BOOTPART_END= BOOT_MOUNTPOINT= @@ -64,6 +66,8 @@ create_empty_partition "${disk_image}" "$ROOTPART" "$ROOTPART_START" -1 ext2 "$R mount_image "${disk_image}" "$ROOTPART" +partuuid=$(blkid -s PARTUUID -o value "$rootfs_dev_mapper") + # Copy the chroot in to the disk make_ext4_partition "${rootfs_dev_mapper}" mkdir mountpoint @@ -111,6 +115,25 @@ if [ "${should_install_grub}" -eq 1 ]; then ${loop_device} rm mountpoint/tmp/device.map + + if [ "$SUBPROJECT" = minimize ] && [ -n "$partuuid" ]; then + echo "partuuid found for root device; omitting initrd" + chroot mountpoint dpkg-divert --add \ + --divert /usr/sbin/update-initramfs.divert-minimize \ + --rename /usr/sbin/update-initramfs + cat > mountpoint/usr/sbin/update-initramfs <<'EOF' +#! /bin/sh +echo "initramfs disabled on this system. To reenable, run:" >&2 +echo " sudo rm -f /usr/sbin/update-initramfs" >&2 +echo " sudo dpkg-divert --remove --rename /usr/sbin/update-initramfs" >&2 +exit 0 +EOF + chmod +x mountpoint/usr/sbin/update-initramfs + rm -f mountpoint/boot/initrd.img-* + + echo "GRUB_FORCE_PARTUUID=$partuuid" >> mountpoint/etc/default/grub + chroot mountpoint update-grub + fi fi if [ "$ARCH" = "s390x" ]; then From bd2a11774f6490d45157e7cfe16773eaabad0d3c Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Thu, 28 Sep 2017 09:38:23 -0400 Subject: [PATCH 06/28] if we're using SUBPROJECT=minimize, and tzdata is not installed, remove files that have been left behind. This is a workaround for a bug that should be fixed in tzdata. --- live-build/auto/build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/live-build/auto/build b/live-build/auto/build index 9e96dd0f..6307d283 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -31,6 +31,12 @@ Expire-Date: 0 lb bootstrap "$@" + if [ "$SUBPROJECT" = minimize ] \ + && ! Chroot chroot dpkg -l tzdata 2>&1 |grep -q ^ii; then + # workaround for tzdata purge not removing these files + rm -f chroot/etc/localtime chroot/etc/timezone + fi + Chroot chroot "dpkg-divert --quiet --add \ --divert /usr/sbin/update-initramfs.REAL --rename \ /usr/sbin/update-initramfs" From c2d66c7d96d89419af9a3c89f87631b3b07e1b1b Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Thu, 28 Sep 2017 09:38:23 -0400 Subject: [PATCH 07/28] Source config/binary instead of /build/config/binary which may not exist --- live-build/ubuntu-cpc/hooks/032-disk-image.binary | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/live-build/ubuntu-cpc/hooks/032-disk-image.binary b/live-build/ubuntu-cpc/hooks/032-disk-image.binary index 4e00649e..9a3e7ff0 100755 --- a/live-build/ubuntu-cpc/hooks/032-disk-image.binary +++ b/live-build/ubuntu-cpc/hooks/032-disk-image.binary @@ -2,7 +2,7 @@ . config/functions -. /build/config/binary +. config/binary BOOTPART_START= BOOTPART_END= From 9dd178a0e5bf0a3d5f544aef83a840b02d6b1aa6 Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Thu, 28 Sep 2017 09:38:23 -0400 Subject: [PATCH 08/28] Drop man pages and most of the documentation from minimized images /usr/share/doc/*/copyright and changelog.Debian.gz files are still kept --- live-build/auto/build | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/live-build/auto/build b/live-build/auto/build index 6307d283..a1a6b81f 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -37,6 +37,27 @@ Expire-Date: 0 rm -f chroot/etc/localtime chroot/etc/timezone fi + if [ "$SUBPROJECT" = minimize ]; then + # set up dpkg filters to skip installing docs on minimized system + mkdir -p chroot/etc/dpkg/dpkg.cfg.d + cat > chroot/etc/dpkg/dpkg.cfg.d/excludes < Date: Thu, 28 Sep 2017 09:38:23 -0400 Subject: [PATCH 09/28] Add unminimize script for reverting minimization on running system --- live-build/auto/build | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/live-build/auto/build b/live-build/auto/build index a1a6b81f..4342721d 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -56,6 +56,36 @@ EOF # Remove docs installed by bootstrap Chroot chroot dpkg-query -f '${binary:Package}\n' -W | Chroot chroot xargs apt-get install --reinstall + + # Add unminimizer script which restores default image behavior + mkdir -p chroot/usr/local/sbin + cat > chroot/usr/local/sbin/unminimize <<'EOF' +#!/bin/sh + +set -e + +if [ -f /etc/dpkg/dpkg.cfg.d/excludes ] || [ -f /etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp ]; then + echo "Re-enabling installation of all documentation in dpkg..." + if [ -f /etc/dpkg/dpkg.cfg.d/excludes ]; then + mv /etc/dpkg/dpkg.cfg.d/excludes /etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp + fi + echo "Updating package list and upgrading packages..." + apt-get update + # apt-get upgrade asks for confirmation before upgrading packages to let the user stop here + apt-get upgrade + echo "Restoring system documentation..." + echo "Reinstalling packages with files in /usr/share/man/ ..." + dpkg -S /usr/share/man/ |sed 's|, |\n|g;s|: [^:]*$||' | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y + echo "Reinstalling packages with system documentaion in /usr/share/doc/ .." + dpkg --verify | awk '/..5...... \/usr\/share\/doc/ {print $2}' | sed 's|/[^/]*$||' | sort |uniq \ + | xargs dpkg -S | sed 's|, |\n|g;s|: [^:]*$||' | uniq | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y + if dpkg --verify > /dev/null; then + echo "Documentation has been restored successfully." + rm /etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp + fi +fi +EOF + chmod +x chroot/usr/local/sbin/unminimize fi Chroot chroot "dpkg-divert --quiet --add \ From e9fc1d8c9fe38e10ff49a2f8c1229dbad1a7e24e Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Thu, 28 Sep 2017 09:38:23 -0400 Subject: [PATCH 10/28] Install ubuntu-minimal while unminimizing the system --- live-build/auto/build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/live-build/auto/build b/live-build/auto/build index 4342721d..46bc6e84 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -84,6 +84,12 @@ if [ -f /etc/dpkg/dpkg.cfg.d/excludes ] || [ -f /etc/dpkg/dpkg.cfg.d/excludes.dp rm /etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp fi fi + +if ! dpkg-query --show --showformat='${db:Status-Status}\n' ubuntu-minimal 2> /dev/null | grep -q '^installed$'; then + echo "Installing ubuntu-minimal package to provide the familiar Ubuntu minimal system..." + DEBIAN_FRONTEND=noninteractive apt-get install -y ubuntu-minimal +fi + EOF chmod +x chroot/usr/local/sbin/unminimize fi From 98f27745b7fb6e65e0eb672a944a49b1def1d43c Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Thu, 28 Sep 2017 09:38:23 -0400 Subject: [PATCH 11/28] Drop initramfs-tools diversion Kernels which are able to boot without initramfs now dropped dependency on initramfs-tools thus initramfs-tools can be removed from the image instead of having to divert it to avoid initramfs generation. --- live-build/ubuntu-cpc/hooks/032-disk-image.binary | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/live-build/ubuntu-cpc/hooks/032-disk-image.binary b/live-build/ubuntu-cpc/hooks/032-disk-image.binary index 9a3e7ff0..d2c405de 100755 --- a/live-build/ubuntu-cpc/hooks/032-disk-image.binary +++ b/live-build/ubuntu-cpc/hooks/032-disk-image.binary @@ -117,20 +117,7 @@ if [ "${should_install_grub}" -eq 1 ]; then rm mountpoint/tmp/device.map if [ "$SUBPROJECT" = minimize ] && [ -n "$partuuid" ]; then - echo "partuuid found for root device; omitting initrd" - chroot mountpoint dpkg-divert --add \ - --divert /usr/sbin/update-initramfs.divert-minimize \ - --rename /usr/sbin/update-initramfs - cat > mountpoint/usr/sbin/update-initramfs <<'EOF' -#! /bin/sh -echo "initramfs disabled on this system. To reenable, run:" >&2 -echo " sudo rm -f /usr/sbin/update-initramfs" >&2 -echo " sudo dpkg-divert --remove --rename /usr/sbin/update-initramfs" >&2 -exit 0 -EOF - chmod +x mountpoint/usr/sbin/update-initramfs - rm -f mountpoint/boot/initrd.img-* - + echo "partuuid found for root device; forcing it in Grub" echo "GRUB_FORCE_PARTUUID=$partuuid" >> mountpoint/etc/default/grub chroot mountpoint update-grub fi From e5cbd2384a4a477730957451dfc84306c9c2f982 Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Thu, 28 Sep 2017 09:38:23 -0400 Subject: [PATCH 12/28] Fix typo --- live-build/auto/build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/live-build/auto/build b/live-build/auto/build index 46bc6e84..5cb025d2 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -76,7 +76,7 @@ if [ -f /etc/dpkg/dpkg.cfg.d/excludes ] || [ -f /etc/dpkg/dpkg.cfg.d/excludes.dp echo "Restoring system documentation..." echo "Reinstalling packages with files in /usr/share/man/ ..." dpkg -S /usr/share/man/ |sed 's|, |\n|g;s|: [^:]*$||' | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y - echo "Reinstalling packages with system documentaion in /usr/share/doc/ .." + echo "Reinstalling packages with system documentation in /usr/share/doc/ .." dpkg --verify | awk '/..5...... \/usr\/share\/doc/ {print $2}' | sed 's|/[^/]*$||' | sort |uniq \ | xargs dpkg -S | sed 's|, |\n|g;s|: [^:]*$||' | uniq | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y if dpkg --verify > /dev/null; then From 93fc7c56f26474b3274ff40c6a5b207780c68827 Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Thu, 28 Sep 2017 09:38:23 -0400 Subject: [PATCH 13/28] Use "dpkg --verify-format rpm" explicitly to be safe when the default changes --- live-build/auto/build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/live-build/auto/build b/live-build/auto/build index 5cb025d2..2f855e81 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -77,9 +77,9 @@ if [ -f /etc/dpkg/dpkg.cfg.d/excludes ] || [ -f /etc/dpkg/dpkg.cfg.d/excludes.dp echo "Reinstalling packages with files in /usr/share/man/ ..." dpkg -S /usr/share/man/ |sed 's|, |\n|g;s|: [^:]*$||' | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y echo "Reinstalling packages with system documentation in /usr/share/doc/ .." - dpkg --verify | awk '/..5...... \/usr\/share\/doc/ {print $2}' | sed 's|/[^/]*$||' | sort |uniq \ + dpkg --verify --verify-format rpm | awk '/..5...... \/usr\/share\/doc/ {print $2}' | sed 's|/[^/]*$||' | sort |uniq \ | xargs dpkg -S | sed 's|, |\n|g;s|: [^:]*$||' | uniq | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y - if dpkg --verify > /dev/null; then + if dpkg --verify --verify-format rpm> /dev/null; then echo "Documentation has been restored successfully." rm /etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp fi From 8244beb6d1786fa16cd988ad6213ccd807820784 Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Thu, 28 Sep 2017 09:38:23 -0400 Subject: [PATCH 14/28] Verify only documentation that should have been restored after unminimization --- live-build/auto/build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/live-build/auto/build b/live-build/auto/build index 2f855e81..81305a51 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -79,7 +79,7 @@ if [ -f /etc/dpkg/dpkg.cfg.d/excludes ] || [ -f /etc/dpkg/dpkg.cfg.d/excludes.dp echo "Reinstalling packages with system documentation in /usr/share/doc/ .." dpkg --verify --verify-format rpm | awk '/..5...... \/usr\/share\/doc/ {print $2}' | sed 's|/[^/]*$||' | sort |uniq \ | xargs dpkg -S | sed 's|, |\n|g;s|: [^:]*$||' | uniq | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y - if dpkg --verify --verify-format rpm> /dev/null; then + if dpkg --verify --verify-format rpm | awk '/..5...... \/usr\/share\/doc/ {exit 1}'; then echo "Documentation has been restored successfully." rm /etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp fi From a40bd1d55b4fb68b04f59229e4e04a989b159f7b Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Thu, 28 Sep 2017 09:38:23 -0400 Subject: [PATCH 15/28] Explain why unminimization script is a bit complicated --- live-build/auto/build | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/live-build/auto/build b/live-build/auto/build index 81305a51..a97dd2f1 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -75,8 +75,13 @@ if [ -f /etc/dpkg/dpkg.cfg.d/excludes ] || [ -f /etc/dpkg/dpkg.cfg.d/excludes.dp apt-get upgrade echo "Restoring system documentation..." echo "Reinstalling packages with files in /usr/share/man/ ..." + # Reinstallation takes place in two steps because a single dpkg --verified + # command generates very long parameter list for "xargs dpkg -S" and may go + # over ARG_MAX. Since many packages have man pages the second download + # handles a much smaller amount of packages. dpkg -S /usr/share/man/ |sed 's|, |\n|g;s|: [^:]*$||' | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y echo "Reinstalling packages with system documentation in /usr/share/doc/ .." + # This step processes the packages which still have missing documentation dpkg --verify --verify-format rpm | awk '/..5...... \/usr\/share\/doc/ {print $2}' | sed 's|/[^/]*$||' | sort |uniq \ | xargs dpkg -S | sed 's|, |\n|g;s|: [^:]*$||' | uniq | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y if dpkg --verify --verify-format rpm | awk '/..5...... \/usr\/share\/doc/ {exit 1}'; then From 1ca59f1c3a73ece73c24f63e5de74e65145cbb40 Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Thu, 28 Sep 2017 09:38:23 -0400 Subject: [PATCH 16/28] Print the documentation files which could not be restored by unminimize --- live-build/auto/build | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/live-build/auto/build b/live-build/auto/build index a97dd2f1..893aeb4e 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -85,8 +85,13 @@ if [ -f /etc/dpkg/dpkg.cfg.d/excludes ] || [ -f /etc/dpkg/dpkg.cfg.d/excludes.dp dpkg --verify --verify-format rpm | awk '/..5...... \/usr\/share\/doc/ {print $2}' | sed 's|/[^/]*$||' | sort |uniq \ | xargs dpkg -S | sed 's|, |\n|g;s|: [^:]*$||' | uniq | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y if dpkg --verify --verify-format rpm | awk '/..5...... \/usr\/share\/doc/ {exit 1}'; then - echo "Documentation has been restored successfully." - rm /etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp + echo "Documentation has been restored successfully." + rm /etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp + else + echo "There are still files missing from /usr/share/doc/:" + dpkg --verify --verify-format rpm | awk '/..5...... \/usr\/share\/doc/ {print " " $2}' + echo "You may want to try running this script again or you can remove" + echo "/etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp and restore the files manually." fi fi From b32298ede12bf9264b59bf1d797a734ba044d24c Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Thu, 28 Sep 2017 09:38:23 -0400 Subject: [PATCH 17/28] minimization handling for UEFI disk images --- live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 dadadb16..87c6de6a 100755 --- a/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary +++ b/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary @@ -61,6 +61,14 @@ install_grub() { efi_boot_dir="/boot/efi/EFI/BOOT" chroot mountpoint mkdir -p "${efi_boot_dir}" + if [ "$SUBPROJECT" = minimize ] && [ -n "$partuuid" ]; then + # FIXME: code duplicated between 032-disk-image.binary + # and 033-disk-image-uefi.binary. We want to fix this to not + # have initramfs-tools installed at all on these images. + echo "partuuid found for root device; omitting initrd" + echo "GRUB_FORCE_PARTUUID=$partuuid" >> mountpoint/etc/default/grub + fi + chroot mountpoint apt-get -y update # The modules below only make sense on non-Secure Boot UEFI systems. @@ -132,6 +140,8 @@ create_empty_disk_image "${disk_image}" create_partitions "${disk_image}" mount_image "${disk_image}" 1 +partuuid=$(blkid -s PARTUUID -o value "$rootfs_dev_mapper") + # Copy the chroot in to the disk make_ext4_partition "${rootfs_dev_mapper}" mkdir mountpoint From 86ed851b5af510e1a6aaf0d99d9e912d16223b27 Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Thu, 28 Sep 2017 09:38:23 -0400 Subject: [PATCH 18/28] Force partuuid in /etc/default/grub.d/* instead of in /etc/default/grub This prevents ucf questions upon installation of changed /etc/default/grub --- live-build/ubuntu-cpc/functions | 3 ++- live-build/ubuntu-cpc/hooks/032-disk-image.binary | 3 ++- live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/live-build/ubuntu-cpc/functions b/live-build/ubuntu-cpc/functions index 9e340149..6e2cd034 100644 --- a/live-build/ubuntu-cpc/functions +++ b/live-build/ubuntu-cpc/functions @@ -274,7 +274,8 @@ replace_grub_root_with_label() { CHROOT_ROOT="$1" # If boot by partuuid has been requested, don't override. - if grep -q ^GRUB_FORCE_PARTUUID= $CHROOT_ROOT/etc/default/grub; then + if [ -f $CHROOT_ROOT/etc/default/grub.d/40-partuuid ] && \ + grep -q ^GRUB_FORCE_PARTUUID= $CHROOT_ROOT/etc/default/grub.d/40-partuuid; then return 0 fi sed -i -e "s,root=[^ ]\+,root=LABEL=cloudimg-rootfs," \ diff --git a/live-build/ubuntu-cpc/hooks/032-disk-image.binary b/live-build/ubuntu-cpc/hooks/032-disk-image.binary index d2c405de..7c7790dc 100755 --- a/live-build/ubuntu-cpc/hooks/032-disk-image.binary +++ b/live-build/ubuntu-cpc/hooks/032-disk-image.binary @@ -118,7 +118,8 @@ if [ "${should_install_grub}" -eq 1 ]; then if [ "$SUBPROJECT" = minimize ] && [ -n "$partuuid" ]; then echo "partuuid found for root device; forcing it in Grub" - echo "GRUB_FORCE_PARTUUID=$partuuid" >> mountpoint/etc/default/grub + mkdir -p mountpoint/etc/default/grub.d + echo "GRUB_FORCE_PARTUUID=$partuuid" >> mountpoint/etc/default/grub.d/40-force-partuuid chroot mountpoint update-grub fi fi 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 87c6de6a..85b17880 100755 --- a/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary +++ b/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary @@ -66,7 +66,7 @@ install_grub() { # and 033-disk-image-uefi.binary. We want to fix this to not # have initramfs-tools installed at all on these images. echo "partuuid found for root device; omitting initrd" - echo "GRUB_FORCE_PARTUUID=$partuuid" >> mountpoint/etc/default/grub + echo "GRUB_FORCE_PARTUUID=$partuuid" >> mountpoint/etc/default/grub.d/40-force-partuuid fi chroot mountpoint apt-get -y update From 3f9753b2c0211affef594f70f311916e00b04d9a Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Thu, 28 Sep 2017 09:41:13 -0400 Subject: [PATCH 19/28] Update changelog --- debian/changelog | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/debian/changelog b/debian/changelog index 266c6d42..d753a243 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,9 +12,27 @@ livecd-rootfs (2.408.19) UNRELEASED; urgency=medium downstream. * Also nuke the sleep / udevadm settle calls in the process, which should never be required and slow down the builds. + * Begin adding support for a project-independent 'minimize' subproject, which + (ironically) omits ubuntu-minimal in favor of using only the minbase + package set. + * Export the subproject into config/chroot and config/binary, so that this + information is available to per-project hooks that need to be + subproject-aware (e.g., to skip steps when SUBPROJECT=minimize) + * Make the 999-cpc-fixes.chroot subproject-aware, so we don't try to + locale-gen + * In a cloud environment, we can rely on the kernel being able to boot the + root filesystem directly, without an initramfs; enable this when building + minimized. + * If we're using SUBPROJECT=minimize, and tzdata is not installed, remove + files that have been left behind. This is a workaround for a bug that + should be fixed in tzdata. [ Balint Reczey ] * Mount using --make-rslave to ensure safe unmounts for rbind mounts + * Drop man pages and most of the documentation from minimized images + /usr/share/doc/*/copyright and changelog.Debian.gz files are still kept + * Add unminimize script for reverting minimization on running system + * Install ubuntu-minimal while unminimizing the system -- Victor Tapia Tue, 19 Sep 2017 10:55:11 +0200 From 4d7509f570693af1083cb3c96948fbd6bf4e8b90 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Tue, 3 Oct 2017 17:31:16 +0200 Subject: [PATCH 20/28] Fix a reference to an undefined variable in a script that's set -u. --- debian/changelog | 1 + live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index d753a243..e5defa4f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -26,6 +26,7 @@ livecd-rootfs (2.408.19) UNRELEASED; urgency=medium * If we're using SUBPROJECT=minimize, and tzdata is not installed, remove files that have been left behind. This is a workaround for a bug that should be fixed in tzdata. + * Fix a reference to an undefined variable in a script that's set -u. [ Balint Reczey ] * Mount using --make-rslave to ensure safe unmounts for rbind mounts 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 85b17880..0ac9da59 100755 --- a/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary +++ b/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary @@ -61,7 +61,7 @@ install_grub() { efi_boot_dir="/boot/efi/EFI/BOOT" chroot mountpoint mkdir -p "${efi_boot_dir}" - if [ "$SUBPROJECT" = minimize ] && [ -n "$partuuid" ]; then + if [ "${SUBPROJECT:-}" = minimize ] && [ -n "$partuuid" ]; then # FIXME: code duplicated between 032-disk-image.binary # and 033-disk-image-uefi.binary. We want to fix this to not # have initramfs-tools installed at all on these images. From febe06642cf6feacca0fb2302c9ba6651ebe199a Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Tue, 3 Oct 2017 17:31:26 +0200 Subject: [PATCH 21/28] Bump needed live-build version which can build images without initrd --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index d9a7e581..de508def 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Vcs-Bzr: lp:~ubuntu-core-dev/livecd-rootfs/xenial-proposed/ Package: livecd-rootfs Architecture: any -Depends: ${misc:Depends}, debootstrap, rsync, python-minimal | python, procps, squashfs-tools (>= 1:3.3-1), grep-dctrl, lsb-release, lzma, e2fsprogs, germinate (>= 1.25.1), apt-utils, gnupg, live-build (>= 3.0~a57-1ubuntu12~), android-tools-fsutils [armhf], python3-software-properties +Depends: ${misc:Depends}, debootstrap, rsync, python-minimal | python, procps, squashfs-tools (>= 1:3.3-1), grep-dctrl, lsb-release, lzma, e2fsprogs, germinate (>= 1.25.1), apt-utils, gnupg, live-build (>= 3.0~a57-1ubuntu25.5~), android-tools-fsutils [armhf], python3-software-properties Suggests: partimage Breaks: ubuntu-defaults-builder (<< 0.32) Description: construction script for the livecd rootfs From d33ab3825f8f6acaa53261c596ba1b155188f6d7 Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Tue, 3 Oct 2017 17:31:26 +0200 Subject: [PATCH 22/28] Mention unminimize script in motd --- live-build/auto/build | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/live-build/auto/build b/live-build/auto/build index 893aeb4e..f1092a9b 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -100,10 +100,26 @@ if ! dpkg-query --show --showformat='${db:Status-Status}\n' ubuntu-minimal 2> /d DEBIAN_FRONTEND=noninteractive apt-get install -y ubuntu-minimal fi +# unminimization succeeded, there is no need to mention it in motd +rm -f /etc/update-motd.d/60-unminimize + EOF chmod +x chroot/usr/local/sbin/unminimize fi + # inform users about the unminimize script + cat > "chroot/etc/update-motd.d/60-unminimize" << EOF +#!/bin/sh +# +# This file is not managed by a package. If you no longer want to +# see this message you can safely remove the file. +echo "" +echo "This system does not provide part of the tools and documentation" +echo "which are available on standard Ubuntu systems." +echo "To make them available please run the "unminimize" command." +EOF + + chmod +x chroot/etc/update-motd.d/60-unminimize Chroot chroot "dpkg-divert --quiet --add \ --divert /usr/sbin/update-initramfs.REAL --rename \ /usr/sbin/update-initramfs" From b90b04a7b7c1d205272b9d8e70450713409129ef Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Tue, 3 Oct 2017 17:31:26 +0200 Subject: [PATCH 23/28] Warn users that unminimize may fail reinstalling packages --- live-build/auto/build | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/live-build/auto/build b/live-build/auto/build index f1092a9b..2bcbf1de 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -64,6 +64,22 @@ EOF set -e +echo "This system was optimized for smaller footprint by reducing the available" +echo "installed documentation, removal of rarely used tools, and by other means." +echo "" +echo "This script reverts part of the optimization and makes documentation and" +echo "tools available again to match the familiar Ubuntu minimial system." +echo "" +echo "Be warned that reinstallation of packages may fail due to changes to the" +echo "system configuration, due to installation of 3rd party packages, or for" +echo "other reasons." +read -p "Would you like to continue? [y/N]" REPLY +echo # (optional) move to a new line +if [ "$REPLY" != "y" ] && [ "$REPLY" != "Y" ] +then + exit 1 +fi + if [ -f /etc/dpkg/dpkg.cfg.d/excludes ] || [ -f /etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp ]; then echo "Re-enabling installation of all documentation in dpkg..." if [ -f /etc/dpkg/dpkg.cfg.d/excludes ]; then From 88d854ffb5ad6c2079beabf8c6c03167234c6ba0 Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Tue, 3 Oct 2017 17:31:26 +0200 Subject: [PATCH 24/28] Use SUBPROJECT=minimized name instead of SUBPROJECT=minimize for consistency --- live-build/auto/build | 6 +++--- live-build/auto/config | 4 ++-- live-build/ubuntu-cpc/hooks/032-disk-image.binary | 2 +- live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary | 2 +- live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/live-build/auto/build b/live-build/auto/build index 2bcbf1de..6fc4459d 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -31,14 +31,14 @@ Expire-Date: 0 lb bootstrap "$@" - if [ "$SUBPROJECT" = minimize ] \ + if [ "$SUBPROJECT" = minimized ] \ && ! Chroot chroot dpkg -l tzdata 2>&1 |grep -q ^ii; then # workaround for tzdata purge not removing these files rm -f chroot/etc/localtime chroot/etc/timezone fi - if [ "$SUBPROJECT" = minimize ]; then - # set up dpkg filters to skip installing docs on minimized system + if [ "$SUBPROJECT" = minimized ]; then + # set up dpkg filters to skip installing docs on minimizedd system mkdir -p chroot/etc/dpkg/dpkg.cfg.d cat > chroot/etc/dpkg/dpkg.cfg.d/excludes <> mountpoint/etc/default/grub.d/40-force-partuuid 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 0ac9da59..2e98e356 100755 --- a/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary +++ b/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary @@ -61,7 +61,7 @@ install_grub() { efi_boot_dir="/boot/efi/EFI/BOOT" chroot mountpoint mkdir -p "${efi_boot_dir}" - if [ "${SUBPROJECT:-}" = minimize ] && [ -n "$partuuid" ]; then + if [ "${SUBPROJECT:-}" = minimized ] && [ -n "$partuuid" ]; then # FIXME: code duplicated between 032-disk-image.binary # and 033-disk-image-uefi.binary. We want to fix this to not # have initramfs-tools installed at all on these images. diff --git a/live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot b/live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot index efbd7193..4a2df66e 100755 --- a/live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot +++ b/live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot @@ -89,7 +89,7 @@ _xchroot "${rootd}" sh -c 'sed -i "/^127.0.1.1/d" /etc/hosts' _xchroot "${rootd}" sh -c 'rm -f /etc/ssh/ssh_host_[rd]sa_key*' ## -------------- -if [ "${SUBPROJECT:-}" != minimize ]; then +if [ "${SUBPROJECT:-}" != minimized ]; then _xchroot "${rootd}" locale-gen en_US.utf8 fi From 0900d202658c7ca2d0923198637ed90927ce8c1a Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Tue, 3 Oct 2017 17:31:26 +0200 Subject: [PATCH 25/28] Run autopkgtest for SUBPROJECT=minimized --- debian/tests/control | 4 ++++ debian/tests/default-bootstraps | 1 + debian/tests/minimized | 3 +++ 3 files changed, 8 insertions(+) create mode 100644 debian/tests/minimized diff --git a/debian/tests/control b/debian/tests/control index b40640f9..671e49e9 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,3 +1,7 @@ Tests: default-bootstraps Depends: @, lsb-release Restrictions: needs-root isolation-machine + +Tests: minimized +Depends: @, lsb-release +Restrictions: needs-root isolation-machine diff --git a/debian/tests/default-bootstraps b/debian/tests/default-bootstraps index 23631d4c..53e5a3bb 100755 --- a/debian/tests/default-bootstraps +++ b/debian/tests/default-bootstraps @@ -30,6 +30,7 @@ ALL_TRIPLETS=" ubuntu-budgie-live:: ubuntu-core:system-image:ubuntu-core ubuntu-cpc::ubuntu-cpc + ubuntu-cpc:minimized:ubuntu-cpc ubuntu-desktop-next:system-image:ubuntu-desktop-next ubuntu-desktop-next::ubuntu-desktop-next ubuntu-dvd:: diff --git a/debian/tests/minimized b/debian/tests/minimized new file mode 100644 index 00000000..a78a95fa --- /dev/null +++ b/debian/tests/minimized @@ -0,0 +1,3 @@ +#!/bin/bash + +env SELECTED_TRIPLETS=ubuntu-cpc:minimized:ubuntu-cpc debian/tests/default-bootstraps From 413a53d4825c5600c66efcec4fa8a710cee5857f Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Tue, 3 Oct 2017 17:31:27 +0200 Subject: [PATCH 26/28] When SUBPROJECT environment variable is not set assume it to be "" --- live-build/auto/build | 8 ++++---- live-build/auto/config | 20 +++++++++---------- .../ubuntu-cpc/hooks/032-disk-image.binary | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/live-build/auto/build b/live-build/auto/build index 6fc4459d..443482e3 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -31,13 +31,13 @@ Expire-Date: 0 lb bootstrap "$@" - if [ "$SUBPROJECT" = minimized ] \ + if [ "${SUBPROJECT:-}" = minimized ] \ && ! Chroot chroot dpkg -l tzdata 2>&1 |grep -q ^ii; then # workaround for tzdata purge not removing these files rm -f chroot/etc/localtime chroot/etc/timezone fi - if [ "$SUBPROJECT" = minimized ]; then + if [ "${SUBPROJECT:-}" = minimized ]; then # set up dpkg filters to skip installing docs on minimizedd system mkdir -p chroot/etc/dpkg/dpkg.cfg.d cat > chroot/etc/dpkg/dpkg.cfg.d/excludes <> config/chroot -echo "SUBPROJECT=\"$SUBPROJECT\"" >> config/chroot +echo "SUBPROJECT=\"${SUBPROJECT:-}\"" >> config/chroot echo "LB_BINARY_HOOKS=\"$BINARY_HOOKS\"" >> config/binary echo "BUILDSTAMP=\"$NOW\"" >> config/binary -echo "SUBPROJECT=\"$SUBPROJECT\"" >> config/binary +echo "SUBPROJECT=\"${SUBPROJECT:-}\"" >> config/binary case $ARCH+$SUBARCH in armhf+raspi2) @@ -783,7 +783,7 @@ EOF config/archives/proposed.list.binary fi -case $PROJECT:$SUBPROJECT in +case $PROJECT:${SUBPROJECT:-} in *-dvd:*) . config/bootstrap @@ -869,7 +869,7 @@ EOF fi fi -case $SUBPROJECT in +case ${SUBPROJECT:-} in ubuntu-rtm|ubuntu-rtm/*) # debootstrap doesn't know about ubuntu-rtm series directly. Rather # than having to teach it, we employ a few hacks to make it use the diff --git a/live-build/ubuntu-cpc/hooks/032-disk-image.binary b/live-build/ubuntu-cpc/hooks/032-disk-image.binary index a6e5d9bb..7cde62f6 100755 --- a/live-build/ubuntu-cpc/hooks/032-disk-image.binary +++ b/live-build/ubuntu-cpc/hooks/032-disk-image.binary @@ -116,7 +116,7 @@ if [ "${should_install_grub}" -eq 1 ]; then rm mountpoint/tmp/device.map - if [ "$SUBPROJECT" = minimized ] && [ -n "$partuuid" ]; then + if [ "${SUBPROJECT:-}" = minimized ] && [ -n "$partuuid" ]; then echo "partuuid found for root device; forcing it in Grub" mkdir -p mountpoint/etc/default/grub.d echo "GRUB_FORCE_PARTUUID=$partuuid" >> mountpoint/etc/default/grub.d/40-force-partuuid From 06cdc3f46d1034adf5cda3ffe40691125c13ad72 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Tue, 3 Oct 2017 17:34:52 +0200 Subject: [PATCH 27/28] Use /bin/sh, not /bin/bash, for autopkgtest. --- debian/tests/minimized | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/tests/minimized b/debian/tests/minimized index a78a95fa..c5da93ee 100644 --- a/debian/tests/minimized +++ b/debian/tests/minimized @@ -1,3 +1,3 @@ -#!/bin/bash +#!/bin/sh env SELECTED_TRIPLETS=ubuntu-cpc:minimized:ubuntu-cpc debian/tests/default-bootstraps From 53f5c1c79c259cf31ddf9a518744792ab91d1554 Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Tue, 3 Oct 2017 17:38:29 +0200 Subject: [PATCH 28/28] Update changelog --- debian/changelog | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index e5defa4f..546f681e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,21 +12,22 @@ livecd-rootfs (2.408.19) UNRELEASED; urgency=medium downstream. * Also nuke the sleep / udevadm settle calls in the process, which should never be required and slow down the builds. - * Begin adding support for a project-independent 'minimize' subproject, which - (ironically) omits ubuntu-minimal in favor of using only the minbase + * Begin adding support for a project-independent 'minimized' subproject, + which (ironically) omits ubuntu-minimal in favor of using only the minbase package set. * Export the subproject into config/chroot and config/binary, so that this information is available to per-project hooks that need to be - subproject-aware (e.g., to skip steps when SUBPROJECT=minimize) + subproject-aware (e.g., to skip steps when SUBPROJECT=minimized) * Make the 999-cpc-fixes.chroot subproject-aware, so we don't try to locale-gen * In a cloud environment, we can rely on the kernel being able to boot the root filesystem directly, without an initramfs; enable this when building minimized. - * If we're using SUBPROJECT=minimize, and tzdata is not installed, remove + * If we're using SUBPROJECT=minimized, and tzdata is not installed, remove files that have been left behind. This is a workaround for a bug that should be fixed in tzdata. * Fix a reference to an undefined variable in a script that's set -u. + * Use /bin/sh, not /bin/bash, for autopkgtest. [ Balint Reczey ] * Mount using --make-rslave to ensure safe unmounts for rbind mounts @@ -34,8 +35,13 @@ livecd-rootfs (2.408.19) UNRELEASED; urgency=medium /usr/share/doc/*/copyright and changelog.Debian.gz files are still kept * Add unminimize script for reverting minimization on running system * Install ubuntu-minimal while unminimizing the system + * Bump needed live-build version which can build images without initrd + * Mention unminimize script in motd + * Warn users that unminimize may fail reinstalling packages + * Run autopkgtest for SUBPROJECT=minimized + * When SUBPROJECT environment variable is not set assume it to be "" - -- Victor Tapia Tue, 19 Sep 2017 10:55:11 +0200 + -- Balint Reczey Tue, 03 Oct 2017 17:35:04 +0200 livecd-rootfs (2.408.18) xenial; urgency=medium