diff --git a/debian/changelog b/debian/changelog index 7536549b..9e866ce3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +livecd-rootfs (2.408.17) UNRELEASED; urgency=medium + + [ Robert C Jennings ] + * live-build/ubuntu-cpc/functions: Add a function, teardown_mountpoint, + to reverse the work done in setup_mountpoint. Lack of this function + has forced users of setup_mountpoint to implement this separately + and the implementations have diverged. (LP: #1716992) + * live-build/ubuntu-cpc/functions: Remove umount_settle function. + The was only used where teardown_mountpoint was lacking. + -- Robert C Jennings Wed, 13 Sep 2017 12:00:59 -0500 + livecd-rootfs (2.408.16) xenial; urgency=medium * live-build/ubuntu-cpc/functions: call apt-get update in the chroot diff --git a/live-build/ubuntu-cpc/functions b/live-build/ubuntu-cpc/functions index d6dfa128..2e05a441 100644 --- a/live-build/ubuntu-cpc/functions +++ b/live-build/ubuntu-cpc/functions @@ -94,6 +94,21 @@ setup_mountpoint() { } +teardown_mountpoint() { + # Reverse the operations from setup_mountpoint + local mountpoint="$1" + + umount "$mountpoint/var/cache/apt" + umount "$mountpoint/var/lib/apt" + umount "$mountpoint/tmp" + umount "$mountpoint/sys" + umount "$mountpoint/proc" + umount -R "$mountpoint/dev" + udevadm settle + sleep 3 + mv resolv.conf.tmp "$mountpoint/etc/resolv.conf" +} + mount_partition() { partition="$1" mountpoint="$2" @@ -126,16 +141,9 @@ EOF } -umount_settle() { - # Unmount device, and let it settle - umount $1 - udevadm settle - sleep 3 -} - umount_partition() { local mountpoint=${1} - mv resolv.conf.tmp "$mountpoint/etc/resolv.conf" + teardown_mountpoint $mountpoint umount -R $mountpoint udevadm settle diff --git a/live-build/ubuntu-cpc/hooks/030-root-tarball.binary b/live-build/ubuntu-cpc/hooks/030-root-tarball.binary index 60d2bf62..30a70d02 100755 --- a/live-build/ubuntu-cpc/hooks/030-root-tarball.binary +++ b/live-build/ubuntu-cpc/hooks/030-root-tarball.binary @@ -24,8 +24,4 @@ chroot binary/boot/filesystem.dir mkdir /lib/modules chroot binary/boot/filesystem.dir rm /usr/sbin/grub-probe chroot binary/boot/filesystem.dir dpkg-divert --remove --local --rename /usr/sbin/grub-probe -mv resolv.conf.tmp "binary/boot/filesystem.dir/etc/resolv.conf" -umount "binary/boot/filesystem.dir/proc" -umount "binary/boot/filesystem.dir/sys" -umount -R "binary/boot/filesystem.dir/dev" -umount "binary/boot/filesystem.dir/tmp" +teardown_mountpoint binary/boot/filesystem.dir