From 7d801f5e33938cc37e8d16aab8355730066845c0 Mon Sep 17 00:00:00 2001 From: Nick Anderson Date: Sat, 15 Aug 2026 10:48:43 -0500 Subject: [PATCH] Fixed /tmp remount running on build hosts that have no /tmp mount have_tmp_mount matched any mount path containing /tmp, so the /tmp/snap.rootfs_XXXXXX left behind by a failed snap install hook set the class and the remount aborted setup-cfengine-build-host.sh with "mount point not mounted". Ticket: None Changelog: none Co-Authored-By: Claude Opus 5 (1M context) --- ci/cfengine-build-host-setup.cf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ci/cfengine-build-host-setup.cf b/ci/cfengine-build-host-setup.cf index a8205af36..ceb93eb10 100644 --- a/ci/cfengine-build-host-setup.cf +++ b/ci/cfengine-build-host-setup.cf @@ -299,7 +299,10 @@ bundle agent cfengine_build_host_setup linux:: "have_tmp_mount" - expression => returnszero("mount | grep '/tmp'", "useshell"); + comment => "Match the mount point exactly, an unqualified '/tmp' also matches + mounts below it like the '/tmp/snap.rootfs_XXXXXX' that a failed + snap install hook leaves behind.", + expression => returnszero("mount | grep -E ' on /tmp '", "useshell"); "have_coredumpctl" expression => returnszero("command -v coredumpctl", "useshell");