mirror of
https://github.com/theupriser/steamify-cachyos-dev.git
synced 2026-10-05 12:45:56 +02:00
docs: steam-machine-iso: one build at a time; vminstallsim.sh passes --defaults options
This commit is contained in:
1 parent
46e039809e
commit
0f57d86bae
2 files changed
+8
-5
No files matched your search
@@ -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.
|
- `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.
|
- 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
|
first (`grep -ac GPGME ~/projects/iso-build.log`). The repo's CI recipe
|
||||||
(`archlinux:base-devel`, `.github/workflows/build.yml`) works too but pulls
|
(`archlinux:base-devel`, `.github/workflows/build.yml`) works too but pulls
|
||||||
from one slow mirror.
|
from one slow mirror.
|
||||||
|
|||||||
@@ -3,12 +3,14 @@
|
|||||||
# who never logged in (no session bus, user systemd or plasmashell) gets
|
# 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
|
# `steamify.sh --defaults` from /mnt, visibly in a Konsole on the VM's
|
||||||
# desktop. Prints the per-component result lines.
|
# 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).
|
# Env: VM_USER / VM_PORT / VM_HOST, SIM_USER (isotest), GUEST_UID (1000).
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
. "$(dirname "$0")/common.sh"
|
. "$(dirname "$0")/common.sh"
|
||||||
fresh=""; [[ "${1:-}" == --fresh ]] && fresh=1
|
fresh=""; [[ "${1:-}" == --fresh ]] && { fresh=1; shift; }
|
||||||
{ printf 'u=%q fresh=%q uid=%q\n' "${SIM_USER:-isotest}" "$fresh" "${GUEST_UID:-1000}"; cat << 'REMOTE'
|
{ 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
|
mountpoint -q /mnt || sudo mount -t 9p -o trans=virtio,version=9p2000.L repo /mnt
|
||||||
[ -n "$fresh" ] && sudo userdel -r "$u" 2>/dev/null
|
[ -n "$fresh" ] && sudo userdel -r "$u" 2>/dev/null
|
||||||
cat > /tmp/install-sim.sh << SIM
|
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; }
|
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
|
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 \
|
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
|
echo "exit: \${PIPESTATUS[0]}" | tee -a /tmp/install-sim.log
|
||||||
sudo rm -f /etc/sudoers.d/10-steamify-install-sim
|
sudo rm -f /etc/sudoers.d/10-steamify-install-sim
|
||||||
touch /tmp/install-sim.done
|
touch /tmp/install-sim.done
|
||||||
|
|||||||
Reference in new issue
Block a user