From 4b57b7896073830419bfdc41a2f4f00584b38e82 Mon Sep 17 00:00:00 2001 From: castrojo Date: Mon, 14 Sep 2026 20:43:51 -0400 Subject: [PATCH] fix(ci): support repart on hosted runners Fall back to passwordless sudo when unprivileged user namespaces are unavailable and update the shared workflow pin for reliable failure evidence. Assisted-by: GPT-5.6 Sol via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- Justfile | 11 +++++++++-- docs/skills/ddi-installer-build.md | 2 ++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 20a0533..4437fea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -177,7 +177,7 @@ jobs: permissions: actions: read contents: read - uses: projectbluefin/actions/.github/workflows/server-installer-test.yml@6b4accef9cf5b79e68100d6c8d50b397640ba208 # v1 + uses: projectbluefin/actions/.github/workflows/server-installer-test.yml@4d220f3f5448dd5f4a8f64a0ec1fad042b1dc85e # v1 with: artifact-name: server-installer-test diff --git a/Justfile b/Justfile index 7e62d4d..932ebfc 100644 --- a/Justfile +++ b/Justfile @@ -342,8 +342,15 @@ test-installer-artifact: > "$REPART_DIR/30-var.conf" echo "==> Refreshing target /var partition using systemd-repart..." - # systemd-repart operates on the target image directly without loopback/sudo when passed as the target operand. - unshare -r systemd-repart \ + REPART=(unshare -r systemd-repart) + if ! unshare -r true 2>/dev/null; then + if ! sudo -n true 2>/dev/null; then + echo "ERROR: systemd-repart needs unprivileged user namespaces or passwordless sudo" >&2 + exit 1 + fi + REPART=(sudo systemd-repart) + fi + "${REPART[@]}" \ --factory-reset=yes \ --dry-run=no \ --definitions="$REPART_DIR" \ diff --git a/docs/skills/ddi-installer-build.md b/docs/skills/ddi-installer-build.md index 0916d10..1b9dd14 100644 --- a/docs/skills/ddi-installer-build.md +++ b/docs/skills/ddi-installer-build.md @@ -34,6 +34,8 @@ just test-installer-artifact # test already-exported artifacts in QEMU without r just tags # show FSDK-derived version tags ``` +`test-installer-artifact` uses an unprivileged user namespace for host-side `systemd-repart` when available. GitHub-hosted runners disable that facility, so the recipe falls back to passwordless `sudo` for `systemd-repart` only; QEMU remains rootless. + ## Mandatory build path: ghost cluster This project MUST always build on the ghost cluster using distributed BuildStream: