From d99f489fd880bb2d1f52346f413e2c171d5fc867 Mon Sep 17 00:00:00 2001 From: BlackAngelTVdev Date: Fri, 4 Dec 2026 12:38:05 +0100 Subject: [PATCH] ci(release): fail fast when the runner cannot mount The org runner executes jobs in an unprivileged container, where mount() is denied even as root, so mkarchiso died at pacstrap after a couple of minutes. A tmpfs mount probe in the preflight now reports the missing capability immediately instead of leaving a raw mount error next to the package setup. --- .gitea/workflows/release.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 1e49f50..e60d847 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -75,6 +75,19 @@ jobs: [ "$(id -u)" -eq 0 ] || sudo -n true 2>/dev/null \ || { echo "::error::mkarchiso exige root (job root ou sudo sans mot de passe)"; exit 1; } + # mkarchiso bind-mounts /proc and /dev inside the chroot and loops the + # squashfs. In a non-privileged container mount() is denied even as + # root, and the build only dies at pacstrap minutes later: check now. + SUDO=(); [ "$(id -u)" -eq 0 ] || SUDO=(sudo) + MP="$(mktemp -d)" + if "${SUDO[@]}" mount -t tmpfs tmpfs "${MP}" 2>/dev/null; then + "${SUDO[@]}" umount "${MP}" && rmdir "${MP}" + else + rmdir "${MP}" 2>/dev/null || true + echo "::error::le runner refuse mount() : mkarchiso ne peut pas builder dans un conteneur non privilégié (il faut CAP_SYS_ADMIN + accès aux loop devices)." + exit 1 + fi + - name: Dépendances de l'hôte (mkarchiso) if: steps.check.outputs.publish == 'true' || inputs.build_only run: |