diff --git a/debian/changelog b/debian/changelog index bb0893d8..586f99d8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +livecd-rootfs (2.522) UNRELEASED; urgency=medium + + * Remove landscape-common from minimal image, and handle restoring it in + unminimize script. LP: #1763182. + + -- Steve Langasek Wed, 11 Apr 2018 14:26:14 -0700 + livecd-rootfs (2.521) bionic; urgency=medium * In subiquity image, mount additional squashfs in /media. diff --git a/live-build/auto/build b/live-build/auto/build index 8689bcf1..01dcc182 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -158,6 +158,12 @@ if ! dpkg-query --show --showformat='${db:Status-Status}\n' ubuntu-minimal 2> /d DEBIAN_FRONTEND=noninteractive apt-get install -y ubuntu-minimal fi +if dpkg-query --show --showformat='${db:Status-Status}\n' ubuntu-server 2> /dev/null | grep -q '^installed$' \ + && ! dpkg-query --show --showformat='${db:Status-Status}\n' landscape-common 2> /dev/null | grep -q '^installed$'; then + echo "Installing ubuntu-server recommends..." + DEBIAN_FRONTEND=noninteractive apt-get install -y landscape-common +fi + # unminimization succeeded, there is no need to mention it in motd rm -f /etc/update-motd.d/60-unminimize @@ -203,9 +209,12 @@ EOF # force removal of initramfs-tools, which we assert is not # required for any minimized images but is still pulled in by # default + # also remove landscape-common, which is heavyweight and + # in the server seed only to provide /etc/motd content which + # would only be seen by humans Chroot chroot "env DEBIAN_FRONTEND=noninteractive \ apt-get -y purge initramfs-tools busybox-initramfs \ - busybox-static" + busybox-static landscape-common" # and if initramfs-tools was configured before our kernel, # /etc/kernel/postinst.d/initramfs-tools will have created # an initramfs despite the generic dpkg-divert; so remove it