From eb687ee18dc9fed806b5ed987b99405f4a06cdc8 Mon Sep 17 00:00:00 2001 From: Ihor Aleksandrychiev Date: Wed, 1 Jul 2026 16:17:53 +0300 Subject: [PATCH] Fixed systemctl stub for uutils coreutils on Ubuntu 26 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The systemctl → echo symlink breaks on Ubuntu 26 because echo is now just an alias into the coreutils multicall binary, which dispatches on argv[0] — invoked as systemctl, it doesn't match, so it fails. Fix: use a no-op stub script that exits 0 instead. Ticket: ENT-14191 Signed-off-by: Ihor Aleksandrychiev --- ci/setup-cfengine-build-host.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ci/setup-cfengine-build-host.sh b/ci/setup-cfengine-build-host.sh index ef279f745..03626ff02 100755 --- a/ci/setup-cfengine-build-host.sh +++ b/ci/setup-cfengine-build-host.sh @@ -28,8 +28,13 @@ function cleanup() { set -e if command -v apt >/dev/null 2>&1; then # workaround for CFE-4544, remove scriptlets call systemctl even when systemctl is-system-running returns false - rm /bin/systemctl - ln -s /bin/echo /bin/systemctl + # Replace systemctl with a no-op stub that always succeeds. We can't + # symlink to /bin/echo (or /bin/true): on Ubuntu 26 coreutils is the + # single multi-call uutils binary that dispatches on argv[0], so it + # would fail with "coreutils: unknown program 'systemctl'". + rm -f /bin/systemctl + printf '#!/bin/sh\nexit 0\n' > /bin/systemctl + chmod +x /bin/systemctl apt remove -y cfengine-nova || true elif command -v yum >/dev/null 2>&1; then yum erase -y cfengine-nova || true