build-local: make WORK dir overridable (avoid /tmp tmpfs exhaustion)
All checks were successful
Mirror to GitHub / mirror (push) Successful in 5s

On hermes /tmp is a 16 GB tmpfs; a full xz build can exhaust it mid-run. WORK now
honours an env override (matching OUT) so it can be pointed at the NVMe.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Breadway 2026-06-17 09:03:45 +08:00
parent db5728c0b3
commit 7761dd0ff5

View file

@ -14,7 +14,10 @@
set -euo pipefail set -euo pipefail
REPO="$(cd "$(dirname "$0")" && pwd)" REPO="$(cd "$(dirname "$0")" && pwd)"
WORK=/tmp/bos-work # WORK defaults to /tmp, but on hermes /tmp is a 16 GB tmpfs — a full xz build
# (uncompressed rootfs + squashfs + work copies) can exhaust it mid-build. Allow
# pointing it at the NVMe instead: WORK=/home/.../bos-work sudo ./build-local.sh
WORK="${WORK:-/tmp/bos-work}"
OUT="${OUT:-$REPO/out}" OUT="${OUT:-$REPO/out}"
# Build against a throwaway copy of the profile so the working tree stays clean # Build against a throwaway copy of the profile so the working tree stays clean