From 9899b25b051dfb6476aa26d552283d484f625c88 Mon Sep 17 00:00:00 2001 From: CloudBuilder Date: Wed, 30 Aug 2023 02:51:09 +0000 Subject: [PATCH] Imported 23.10.27 from mantic-release pocket. No reason for CPC update specified. --- debian/changelog | 9 +++++++++ debian/tests/default-bootstraps | 7 ++++++- live-build/lb_chroot_layered | 8 +++++++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 94d6501c..0537d7b9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +livecd-rootfs (23.10.27) mantic; urgency=medium + + * Add ubuntu to the list of targets we autopkgtest for on amd64, to ensure + coverage of the lb_chroot_layered behavior. + * lb_chroot_layered: if the unmount of the chroot mountpoint fails, dump + mount information for debugging. + + -- Steve Langasek Tue, 29 Aug 2023 10:39:23 -0700 + livecd-rootfs (23.10.26) mantic; urgency=medium [ Ɓukasz 'sil2100' Zemczak ] diff --git a/debian/tests/default-bootstraps b/debian/tests/default-bootstraps index 9d63d7a0..4c0d396f 100755 --- a/debian/tests/default-bootstraps +++ b/debian/tests/default-bootstraps @@ -43,11 +43,17 @@ ALL_TRIPLETS=" xubuntu:: xubuntu:minimal:" +ARCH=$(dpkg --print-architecture) + if [ -z "$SELECTED_TRIPLETS" ]; then SELECTED_TRIPLETS=" ubuntu-base:: ubuntu-cpc::ubuntu-cpc " + if [ "$ARCH" = amd64 ]; then + SELECTED_TRIPLETS="$SELECTED_TRIPLETS +ubuntu::" + fi fi live_build_rootfs() { @@ -55,7 +61,6 @@ live_build_rootfs() { local SUBPROJECT_TMP=${1%:*} SUBPROJECT=${SUBPROJECT_TMP#*:} TEMPLATE=${1##*:} - ARCH=$(dpkg --print-architecture) echo "Building rootfs for project: '$PROJECT' subproject: '$SUBPROJECT' template: '$TEMPLATE' in $PWD" cp -a /usr/share/livecd-rootfs/live-build/auto . if [ -n "$TEMPLATE" ]; then diff --git a/live-build/lb_chroot_layered b/live-build/lb_chroot_layered index eb55131f..a48dce71 100755 --- a/live-build/lb_chroot_layered +++ b/live-build/lb_chroot_layered @@ -268,7 +268,13 @@ create_chroot_pass () { lb chroot_devpts remove ${*} if [ -n "$lowerdirs" ]; then - umount chroot + res=0 + umount chroot || res=$? + if [ $res -ne 0 ]; then + Echo_message "Unmount failed, current mounts: " + cat /proc/$$/mounts + exit $res + fi rmdir chroot else rm chroot