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.
|
||||
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
|
||||
if ! MOUNT_ERR="$("${SUDO[@]}" mount -t tmpfs tmpfs "${MP}" 2>&1)"; then
|
||||
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
|
||||
fi
|
||||
"${SUDO[@]}" umount "${MP}" && rmdir "${MP}"
|
||||
|
||||
- name: Dépendances de l'hôte (mkarchiso)
|
||||
if: steps.check.outputs.publish == 'true' || inputs.build_only
|
||||
|
||||
Reference in new issue
Block a user