From 3dad95c4a10cb050a064523a759d6d66cb959119 Mon Sep 17 00:00:00 2001 From: Jorijn van der Graaf Date: Sat, 8 Aug 2026 20:11:03 +0200 Subject: [PATCH] build.sh: document host loop requirement; dump pmbootstrap log on failure Co-Authored-By: Claude Fable 5 --- build.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/build.sh b/build.sh index 5150c1c..87b465f 100755 --- a/build.sh +++ b/build.sh @@ -10,6 +10,11 @@ set -eu +# HOST REQUIREMENT: the loop driver must be loaded on the host kernel +# (modprobe loop + modules-load.d entry). Containers cannot load host +# modules, and on some kernels opening /dev/loop-control from a container +# does not autoload the driver either. + KERNEL_REPO=https://forgejo.catcrafts.net/Catcrafts/milos-linux.git KERNEL_BRANCH=combined-stable PMAPORTS_REPO=https://gitlab.postmarketos.org/postmarketOS/pmaports.git @@ -57,6 +62,14 @@ fi WORK=${FP6IMG_WORK:-$HOME/fp6img-work} mkdir -p "$WORK" +# pmbootstrap swallows its subcommands' stderr into its own log; surface it +# whenever this script dies so failures are diagnosable from the CI/console +# output alone. +trap 'rc=$?; if [ $rc -ne 0 ]; then + echo "=== build.sh failed (exit $rc); pmbootstrap log tail ===" + tail -60 "$HOME/.local/var/pmbootstrap/log.txt" 2>/dev/null || true +fi' EXIT + # --- 1. pmaports with our aports copied over --------------------------------- # pmbootstrap hard-errors when a pkgname exists in more than one aports dir, # so "overlay" means: clone upstream, delete the upstream aport, drop ours in.