From bdd9578bf8afa44e355c0fce9c490e67ba16f729 Mon Sep 17 00:00:00 2001 From: Dorian Date: Sat, 28 Mar 2026 21:01:10 +0000 Subject: [PATCH] fix: root podman D-Bus cgroup issue in ISO build When running as sudo, root podman can't reach the systemd D-Bus session, causing "Transport endpoint is not connected" errors. Auto-detect and fall back to cgroupfs cgroup manager. Co-Authored-By: Claude Opus 4.6 (1M context) --- image-recipe/build-auto-installer-iso.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/image-recipe/build-auto-installer-iso.sh b/image-recipe/build-auto-installer-iso.sh index 7ea62e48..7ceb6571 100755 --- a/image-recipe/build-auto-installer-iso.sh +++ b/image-recipe/build-auto-installer-iso.sh @@ -186,6 +186,15 @@ check_tools() { echo "Using container runtime: $CONTAINER_CMD" + # Fix root podman D-Bus issue (sd-bus: Transport endpoint is not connected) + # When running as sudo, systemd cgroup manager can't reach the user D-Bus session. + if [ "$CONTAINER_CMD" = "podman" ] && [ "$(id -u)" = "0" ]; then + if ! $CONTAINER_CMD run --rm debian:bookworm true 2>/dev/null; then + echo " Root podman D-Bus issue detected, using cgroupfs manager" + CONTAINER_CMD="podman --cgroup-manager=cgroupfs" + fi + fi + # Ensure insecure registry config for Archipelago app registry (HTTP) if [ "$CONTAINER_CMD" = "podman" ]; then mkdir -p /etc/containers/registries.conf.d