From 95aabdf668dd6b486ba7c49dde7248c9c6f4017a Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Fri, 25 Aug 2017 15:30:05 -0700 Subject: [PATCH] live-build/ubuntu-cpc/functions: mount tmpfs on /var/cache/apt and /var/lib/apt, so we don't have to leave empty space in our derivative images for packages that have been downloaded/installed/removed. This normally isn't relevant for the installed system, since the root filesystem will auto-expand in place on the target disk, but lets us ship smaller images. --- debian/changelog | 8 ++++++++ live-build/ubuntu-cpc/functions | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index fc848acf..93fb6400 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,14 @@ livecd-rootfs (2.408.15) UNRELEASED; urgency=medium * Drop preloading of grub modules that are built into the grub signed image. This is functionally a no-op, changed only to clean up the code. + [ Steve Langasek ] + * live-build/ubuntu-cpc/functions: mount tmpfs on /var/cache/apt and + /var/lib/apt, so we don't have to leave empty space in our derivative + images for packages that have been downloaded/installed/removed. This + normally isn't relevant for the installed system, since the root + filesystem will auto-expand in place on the target disk, but lets us + ship smaller images. + -- Steve Langasek Wed, 23 Aug 2017 17:35:40 -0700 livecd-rootfs (2.408.14) xenial; urgency=medium diff --git a/live-build/ubuntu-cpc/functions b/live-build/ubuntu-cpc/functions index 7ed46906..3e935cad 100644 --- a/live-build/ubuntu-cpc/functions +++ b/live-build/ubuntu-cpc/functions @@ -87,6 +87,8 @@ setup_mountpoint() { mount proc-live -t proc "$mountpoint/proc" mount sysfs-live -t sysfs "$mountpoint/sys" mount -t tmpfs none "$mountpoint/tmp" + mount -t tmpfs none "$mountpoint/var/lib/apt" + mount -t tmpfs none "$mountpoint/var/cache/apt" mv "$mountpoint/etc/resolv.conf" resolv.conf.tmp cp /etc/resolv.conf "$mountpoint/etc/resolv.conf" @@ -134,7 +136,7 @@ umount_settle() { umount_partition() { local mountpoint=${1} mv resolv.conf.tmp "$mountpoint/etc/resolv.conf" - for submnt in proc sys dev/pts dev tmp; + for submnt in var/cache/apt var/lib/apt proc sys dev/pts dev tmp; do umount_settle $mountpoint/$submnt done