From 62cc84825d1e261f4f7ddff609b0043679aa99aa Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Wed, 13 Sep 2017 22:35:03 -0700 Subject: [PATCH] Import patches-unapplied version 2.456 to ubuntu/artful-proposed Imported using git-ubuntu import. Changelog parent: 3adf9af2a9d022af3323c328c130ca95842f1181 New changelog entries: * Improve teardown_mountpoint to recursively find all submounts and unmount them, instead of working from a hard-coded list. This makes the code resilient against other submounts being added later, including downstream. * Also nuke the sleep / udevadm settle calls in the process, which should never be required and slow down the builds. [ Michael Hudson-Doyle ] * set a default netplan config of dhcp-on-ethernet for the server live image --- debian/changelog | 14 ++++++++++++++ live-build/functions | 15 +++++++-------- .../ubuntu-cpc/hooks/033-disk-image-uefi.binary | 2 -- .../etc/netplan/00-installer-config.yaml | 13 +++++++++++++ 4 files changed, 34 insertions(+), 10 deletions(-) create mode 100644 live-build/ubuntu-server/includes.binary/etc/netplan/00-installer-config.yaml diff --git a/debian/changelog b/debian/changelog index aca89594..3d43209f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +livecd-rootfs (2.456) artful; urgency=medium + + * Improve teardown_mountpoint to recursively find all submounts and + unmount them, instead of working from a hard-coded list. This makes + the code resilient against other submounts being added later, including + downstream. + * Also nuke the sleep / udevadm settle calls in the process, which should + never be required and slow down the builds. + + [ Michael Hudson-Doyle ] + * set a default netplan config of dhcp-on-ethernet for the server live image + + -- Steve Langasek Wed, 13 Sep 2017 22:35:03 -0700 + livecd-rootfs (2.455) artful; urgency=medium * Restore the call to 'umount -R $mountpoint' from umount_partition, diff --git a/live-build/functions b/live-build/functions index ee5a4f3d..4c3049ec 100644 --- a/live-build/functions +++ b/live-build/functions @@ -95,14 +95,13 @@ 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 + # ensure we have exactly one trailing slash, and escape all slashes for awk + mountpoint_match=$(echo "$mountpoint" | sed -e's,/$,,; s,/,\\/,g;')'\/' + # sort -r ensures that deeper mountpoints are unmounted first + for submount in $(awk