diff --git a/debian/changelog b/debian/changelog index 239d5aa5..5dca7427 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +livecd-rootfs (2.454) UNRELEASED; urgency=medium + + * live-build/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. + * live-build/functions: also call 'apt-get update' after mounting the + blank /var/lib/apt. + + -- Steve Langasek Tue, 12 Sep 2017 14:33:02 -0700 + livecd-rootfs (2.453) artful; urgency=medium [ Chris Glass ] diff --git a/live-build/functions b/live-build/functions index d0bda550..868fcdb2 100644 --- a/live-build/functions +++ b/live-build/functions @@ -83,8 +83,11 @@ 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" + chroot "$mountpoint" apt-get update } diff --git a/live-build/ubuntu-cpc/hooks/032-root-squashfs.binary b/live-build/ubuntu-cpc/hooks/032-root-squashfs.binary index 8c1580ea..703b2b15 100755 --- a/live-build/ubuntu-cpc/hooks/032-root-squashfs.binary +++ b/live-build/ubuntu-cpc/hooks/032-root-squashfs.binary @@ -41,6 +41,8 @@ umount "binary/boot/squashfs.dir/proc" umount "binary/boot/squashfs.dir/sys" umount -R "binary/boot/squashfs.dir/dev" umount "binary/boot/squashfs.dir/tmp" +umount "binary/boot/squashfs.dir/var/lib/apt" +umount "binary/boot/squashfs.dir/var/cache/apt" squashfs_f="${PWD}/livecd.ubuntu-cpc.squashfs" squashfs_f_manifest="${squashfs_f}.manifest"