From 7798e70d8f6045777ba0e537a5d0526434139b26 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Tue, 10 Oct 2017 10:52:06 -0400 Subject: [PATCH 1/3] Purge initramfs-tools from minimized images. --- debian/changelog | 4 ++++ live-build/auto/build | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7d43da42..57bcd08d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,11 @@ livecd-rootfs (2.472) UNRELEASED; urgency=medium + [ Michael Hudson-Doyle ] * Add snap.subiquity.started.service to subiquity.service's Requires=. + [ Steve Langasek ] + * Purge initramfs-tools from minimized images. + -- Michael Hudson-Doyle Mon, 09 Oct 2017 15:09:56 +1300 livecd-rootfs (2.471) artful; urgency=medium diff --git a/live-build/auto/build b/live-build/auto/build index 41c21337..5e00e6cf 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -210,6 +210,20 @@ EOF lb chroot "$@" + if [ "${SUBPROJECT:-}" = minimized ]; then + # force removal of initramfs-tools, which we assert is not + # required for any minimized images but is still pulled in by + # default + Chroot chroot "env DEBIAN_FRONTEND=noninteractive \ + apt-get -y purge initramfs-tools" + # temporary workaround: don't remove linux-base which + # may have no other reverse-depends currently + Chroot chroot "env DEBIAN_FRONTEND=noninteractive \ + apt-mark manual linux-base" + Chroot chroot "env DEBIAN_FRONTEND=noninteractive \ + apt-get -y --purge autoremove" + fi + if [ -f config/oem-config-preinstalled ]; then # This is cargo-culted almost verbatim (with some syntax changes for From 56a85e74c949fce446818aea534a36f3f8b47d53 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Fri, 13 Oct 2017 17:11:24 -0400 Subject: [PATCH 2/3] Also mark busybox-{initramfs,static} as automatically installed, so they can be removed again --- live-build/auto/build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/live-build/auto/build b/live-build/auto/build index 5e00e6cf..e34a64e8 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -216,6 +216,8 @@ EOF # default Chroot chroot "env DEBIAN_FRONTEND=noninteractive \ apt-get -y purge initramfs-tools" + Chroot chroot "env DEBIAN_FRONTEND=noninteractive \ + apt-mark auto busybox-initramfs busybox-static" # temporary workaround: don't remove linux-base which # may have no other reverse-depends currently Chroot chroot "env DEBIAN_FRONTEND=noninteractive \ From e99636027fa208a4b46bad77c7246f0cee6b27d1 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Fri, 13 Oct 2017 23:27:07 -0400 Subject: [PATCH 3/3] busybox-initramfs and busybox-static have reverse-recommends, so it's not enough to use apt-mark auto; remove these packages by name. --- live-build/auto/build | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/live-build/auto/build b/live-build/auto/build index e34a64e8..97d7c2b3 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -215,9 +215,8 @@ EOF # required for any minimized images but is still pulled in by # default Chroot chroot "env DEBIAN_FRONTEND=noninteractive \ - apt-get -y purge initramfs-tools" - Chroot chroot "env DEBIAN_FRONTEND=noninteractive \ - apt-mark auto busybox-initramfs busybox-static" + apt-get -y purge initramfs-tools busybox-initramfs \ + busybox-static" # temporary workaround: don't remove linux-base which # may have no other reverse-depends currently Chroot chroot "env DEBIAN_FRONTEND=noninteractive \