From 6c2b6668dc17f02a801cf6228c7a36da70a39ad2 Mon Sep 17 00:00:00 2001 From: archipelago Date: Fri, 31 Jul 2026 19:46:12 -0400 Subject: [PATCH] fix(iso): honor TMPDIR for the QEMU boot-test disk/serial log MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both the 20G sparse qcow2 test disk and the serial console log were hardcoded to /tmp regardless of $TMPDIR, so pointing the ISO release build at a disk-backed scratch dir (to avoid tmpfs space pressure) would not have covered this stage. Falls back to /tmp when TMPDIR is unset — no behavior change for existing callers. Co-Authored-By: Claude Opus 5 (1M context) --- image-recipe/_archived/test-iso-qemu.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/image-recipe/_archived/test-iso-qemu.sh b/image-recipe/_archived/test-iso-qemu.sh index f44521e1..ec2d6f8a 100755 --- a/image-recipe/_archived/test-iso-qemu.sh +++ b/image-recipe/_archived/test-iso-qemu.sh @@ -8,10 +8,14 @@ # --bios Force legacy BIOS mode (default: UEFI) # --nographic No GUI window, serial console only (great for logging) # -# Serial log is always written to /tmp/archipelago-qemu-serial.log +# Serial log and the 20G test disk are written under ${TMPDIR:-/tmp} — set +# TMPDIR to a disk-backed directory if /tmp is space-constrained (both were +# previously hardcoded to /tmp, which could ENOSPC a tmpfs-backed /tmp on a +# 20G sparse qcow2 regardless of what the caller set TMPDIR to). SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" -SERIAL_LOG="/tmp/archipelago-qemu-serial.log" +QEMU_TMPDIR="${TMPDIR:-/tmp}" +SERIAL_LOG="$QEMU_TMPDIR/archipelago-qemu-serial.log" FORCE_BIOS=false NOGRAPHIC=false TIMEOUT=0 @@ -64,7 +68,7 @@ echo " Serial: $SERIAL_LOG" echo "" # Create test disk if it doesn't exist -DISK="/tmp/archipelago-test-disk.qcow2" +DISK="$QEMU_TMPDIR/archipelago-test-disk.qcow2" if [ ! -f "$DISK" ]; then echo "Creating 20GB test disk..." qemu-img create -f qcow2 "$DISK" 20G