diff --git a/debian/changelog b/debian/changelog index 71705174..0bc5e189 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +livecd-rootfs (2.581) UNRELEASED; urgency=medium + + * Remove device nodes later for ubuntu-base:minimized (i.e. docker) builds. + (LP: #1828118) + + -- Michael Hudson-Doyle Wed, 08 May 2019 09:59:35 +1200 + livecd-rootfs (2.580) eoan; urgency=medium * Run clean_debian_chroot after minimize_manual (LP: #1826377) diff --git a/live-build/auto/build b/live-build/auto/build index 8238b8bb..b07caad7 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -308,17 +308,6 @@ EOF apt-get -y --purge autoremove" fi - if [ "${PROJECT}:${SUBPROJECT:-}" = "ubuntu-base:minimized" ]; then - # Save even more size by removing apt lists (that are currently removed - # downstream anyway) - rm -rf chroot/var/lib/apt/lists/* - # Having device notes 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 - configure_universe if [ -d chroot/var/lib/preinstalled-pool ]; then diff --git a/live-build/functions b/live-build/functions index 7908900c..72fdb056 100644 --- a/live-build/functions +++ b/live-build/functions @@ -717,7 +717,18 @@ subtract_package_lists() { clean_debian_chroot() { # 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 + 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 } configure_universe() {