fix(ci): report the real mount error and how to fix the runner
The preflight swallowed the reason mount() failed, so a refused tmpfs mount looked like a generic privilege problem. Print the command's own error and name the two fixes: container.privileged in the act_runner config, or a label registered in host mode.
This commit is contained in:
1 file changed
+4
-4
@@ -86,13 +86,13 @@ jobs:
|
|||||||
# root, and the build only dies at pacstrap minutes later: check now.
|
# root, and the build only dies at pacstrap minutes later: check now.
|
||||||
SUDO=(); [ "$(id -u)" -eq 0 ] || SUDO=(sudo)
|
SUDO=(); [ "$(id -u)" -eq 0 ] || SUDO=(sudo)
|
||||||
MP="$(mktemp -d)"
|
MP="$(mktemp -d)"
|
||||||
if "${SUDO[@]}" mount -t tmpfs tmpfs "${MP}" 2>/dev/null; then
|
if ! MOUNT_ERR="$("${SUDO[@]}" mount -t tmpfs tmpfs "${MP}" 2>&1)"; then
|
||||||
"${SUDO[@]}" umount "${MP}" && rmdir "${MP}"
|
|
||||||
else
|
|
||||||
rmdir "${MP}" 2>/dev/null || true
|
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)."
|
echo "::error::le runner refuse mount() : ${MOUNT_ERR}"
|
||||||
|
echo "::error::mkarchiso a besoin de CAP_SYS_ADMIN + des loop devices. Config act_runner : container.privileged: true puis redémarrer le daemon, ou enregistrer le label arch-host en mode host."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
"${SUDO[@]}" umount "${MP}" && rmdir "${MP}"
|
||||||
|
|
||||||
- name: Dépendances de l'hôte (mkarchiso)
|
- name: Dépendances de l'hôte (mkarchiso)
|
||||||
if: steps.check.outputs.publish == 'true' || inputs.build_only
|
if: steps.check.outputs.publish == 'true' || inputs.build_only
|
||||||
|
|||||||
Reference in new issue
Block a user