From 21547dd7bcc10db878c74720e2f4ccc1ffbccecf Mon Sep 17 00:00:00 2001 From: rickpeters Date: Sun, 27 Sep 2026 22:00:32 +0200 Subject: [PATCH] docs: steam-machine-iso: one build at a time; vminstallsim.sh passes --defaults options --- .claude/skills/steam-machine-iso/SKILL.md | 3 ++- scripts/vminstallsim.sh | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.claude/skills/steam-machine-iso/SKILL.md b/.claude/skills/steam-machine-iso/SKILL.md index 2b021a8..93e2895 100644 --- a/.claude/skills/steam-machine-iso/SKILL.md +++ b/.claude/skills/steam-machine-iso/SKILL.md @@ -87,7 +87,8 @@ chowns to `$SUDO_USER`, unset as root; the ISO is already written. Each flag fix - `pacman-key --init/--populate`: the image's keyring isn't initialised. - The retry with `-c` keeps the work dir and cache for a flaky pass. -Don't stop a running build to try something else without checking its log +Never start a build while one runs (`sudo podman ps`): both use `build/` +and `out/`, and `rm -rf build out` breaks the running one. Don't stop a running build to try something else without checking its log first (`grep -ac GPGME ~/projects/iso-build.log`). The repo's CI recipe (`archlinux:base-devel`, `.github/workflows/build.yml`) works too but pulls from one slow mirror. diff --git a/scripts/vminstallsim.sh b/scripts/vminstallsim.sh index 016ecfe..81eca4e 100755 --- a/scripts/vminstallsim.sh +++ b/scripts/vminstallsim.sh @@ -3,12 +3,14 @@ # who never logged in (no session bus, user systemd or plasmashell) gets # `steamify.sh --defaults` from /mnt, visibly in a Konsole on the VM's # desktop. Prints the per-component result lines. -# scripts/vminstallsim.sh [--fresh] --fresh: delete and recreate the user first +# scripts/vminstallsim.sh [--fresh] [--defaults options...] +# --fresh: delete and recreate the user first; the rest goes to +# --defaults (e.g. --skip cec,theme --boot desktop) # Env: VM_USER / VM_PORT / VM_HOST, SIM_USER (isotest), GUEST_UID (1000). set -euo pipefail . "$(dirname "$0")/common.sh" -fresh=""; [[ "${1:-}" == --fresh ]] && fresh=1 -{ printf 'u=%q fresh=%q uid=%q\n' "${SIM_USER:-isotest}" "$fresh" "${GUEST_UID:-1000}"; cat << 'REMOTE' +fresh=""; [[ "${1:-}" == --fresh ]] && { fresh=1; shift; } +{ printf 'u=%q fresh=%q uid=%q opts=%q\n' "${SIM_USER:-isotest}" "$fresh" "${GUEST_UID:-1000}" "$*"; cat << 'REMOTE' mountpoint -q /mnt || sudo mount -t 9p -o trans=virtio,version=9p2000.L repo /mnt [ -n "$fresh" ] && sudo userdel -r "$u" 2>/dev/null cat > /tmp/install-sim.sh << SIM @@ -16,7 +18,7 @@ cat > /tmp/install-sim.sh << SIM id $u >/dev/null 2>&1 || { sudo useradd -m -G wheel -s /bin/bash $u; echo "$u:$u" | sudo chpasswd; } echo "$u ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/10-steamify-install-sim >/dev/null sudo -u $u env -i HOME=/home/$u USER=$u LOGNAME=$u PATH=/usr/local/bin:/usr/bin TERM=xterm \ - bash -c 'cd ~ && /mnt/steamify.sh --defaults < /dev/null' 2>&1 | tee /tmp/install-sim.log + bash -c 'cd ~ && /mnt/steamify.sh --defaults $opts < /dev/null' 2>&1 | tee /tmp/install-sim.log echo "exit: \${PIPESTATUS[0]}" | tee -a /tmp/install-sim.log sudo rm -f /etc/sudoers.d/10-steamify-install-sim touch /tmp/install-sim.done