fix: root podman D-Bus cgroup issue in ISO build
All checks were successful
Build Archipelago ISO (dev) / build-iso (push) Successful in 37m2s

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) <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-03-28 21:01:10 +00:00
parent 4f90cf39cf
commit 6be30b99fa

View File

@@ -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