From 36bbe72b62e9ef8fb524677e22631f81a84621c3 Mon Sep 17 00:00:00 2001 From: CloudBuilder Date: Tue, 14 May 2019 09:47:04 +0000 Subject: [PATCH] Imported 2.525.23 No reason for CPC update specified. --- debian/changelog | 17 +++++++++++++++++ live-build/auto/build | 11 +++++++++++ .../hooks/032-installer-squashfs.binary | 1 + .../ubuntu-server/hooks/033-kernel-bits.binary | 2 +- .../subiquity_config.mount | 1 - .../systemd/system/serial-subiquity@.service | 4 ++-- 6 files changed, 32 insertions(+), 4 deletions(-) delete mode 120000 live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/local-fs.target.wants/subiquity_config.mount diff --git a/debian/changelog b/debian/changelog index bbd5b6e9..a0d7b61d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,20 @@ +livecd-rootfs (2.525.23) bionic; urgency=medium + + * Backport two minimizations for the docker images: remove apt lists that + are removed downstream anyway, and remove device nodes from the image. + (LP: #1828118) + + -- Michael Hudson-Doyle Wed, 08 May 2019 10:48:39 +1200 + +livecd-rootfs (2.525.22) bionic; urgency=medium + + * Subiquity specific changes SRU LP: #1827357 + - subiquity: make subiquity_config.mount optional + - Make serial-subiquity@ use the same codepath as tty1 subiquity. + - Fix ubuntu-server-live images to generate initrd with casper UUID. + + -- Dimitri John Ledkov Thu, 02 May 2019 11:34:34 +0100 + livecd-rootfs (2.525.21) bionic; urgency=medium * Remove crufty files after minimize-manual (LP: #1826377) diff --git a/live-build/auto/build b/live-build/auto/build index 19175cd8..a6fc4af1 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -436,6 +436,17 @@ EOF # remove crufty files that shouldn't be left in an image rm -f chroot/var/cache/debconf/*-old chroot/var/lib/dpkg/*-old Chroot chroot apt clean + # For the docker images we remove even more stuff. + if [ "${PROJECT}:${SUBPROJECT:-}" = "ubuntu-base:minimized" ]; then + # Remove apt lists (that are currently removed downstream + # anyway) + rm -rf chroot/var/lib/apt/lists/* + # Having device nodes in the docker image can cause problems + # (https://github.com/tianon/docker-brew-ubuntu-core/issues/62) + # so remove them. We only do this for docker out of an + # abundance of caution. + rm -rf chroot/dev/* + fi lb binary "$@" touch binary.success diff --git a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary index 518fc724..cff32321 100755 --- a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary +++ b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary @@ -45,6 +45,7 @@ mkdir -p "$INSTALLER_ROOT/etc/systemd/system/$DEVICE_UNIT_NAME.d" cat > "$INSTALLER_ROOT/etc/systemd/system/$DEVICE_UNIT_NAME.d/override.conf" < "$KERNEL_BITS_ROOT"/etc/initramfs-tools/conf.d/livecd-rootfs.conf fi - echo "CASPER_GENERATE_UUID=1" > "$KERNEL_BITS_ROOT"/etc/initramfs-tools/conf.d/casper.conf + echo "export CASPER_GENERATE_UUID=1" > "$KERNEL_BITS_ROOT"/etc/initramfs-tools/conf.d/casper.conf # Add a hook to record which kernel was booted and mount the # modules.squashfs created below. 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 deleted file mode 120000 index 9c22c100..00000000 --- a/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/local-fs.target.wants/subiquity_config.mount +++ /dev/null @@ -1 +0,0 @@ -../subiquity_config.mount \ No newline at end of file diff --git a/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/serial-subiquity@.service b/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/serial-subiquity@.service index d5d588ad..c291c3d2 100644 --- a/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/serial-subiquity@.service +++ b/live-build/ubuntu-server/includes.binary/overlay/lib/systemd/system/serial-subiquity@.service @@ -7,9 +7,9 @@ ConditionPathExists=!/run/subiquity/complete StartLimitInterval=0 [Service] -Environment=PYTHONPATH=/usr/share/subiquity +Environment=SNAP_REEXEC=0 ExecStartPre=/bin/systemctl stop serial-getty@%I -ExecStart=/sbin/agetty -n --keep-baud -l /snap/bin/subiquity --login-options "--serial" 115200,38400,9600 %I $TERM +ExecStart=/usr/bin/snap run subiquity.subiquity-service %I ExecStopPost=/bin/systemctl start serial-getty@%I Type=idle Restart=always