mirror of
https://github.com/theupriser/steamify-cachyos-dev.git
synced 2026-10-14 15:44:50 +02:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
17ae88a4ad | ||
|
|
a9f20d69bf | ||
|
|
9a351ae639 |
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: steam-machine-iso
|
name: steam-machine-iso
|
||||||
description: Use when working on the Steam Machine CachyOS ISO (repo steammachine-cachyos-live-iso) or Steamify's install-time mode (steamify.sh --defaults, --first-login) - building the ISO in podman (in the test VM, or on the Steam Machine), the Calamares Steamify step, simulating the installer in the test VM, and testing the first desktop login.
|
description: Use when working on the Steam Machine CachyOS ISO (repo steamify-cachyos-live-iso) or Steamify's install-time mode (steamify.sh --defaults, --first-login) - building the ISO in podman (in the test VM, or on the Steam Machine), the Calamares Steamify step, simulating the installer in the test VM, and testing the first desktop login.
|
||||||
---
|
---
|
||||||
|
|
||||||
# Steam Machine ISO and Steamify's install-time mode
|
# Steam Machine ISO and Steamify's install-time mode
|
||||||
@@ -18,7 +18,7 @@ setup during the install. Two repos:
|
|||||||
first login, and `lib/first-login.sh` leaves a one-time autostart
|
first login, and `lib/first-login.sh` leaves a one-time autostart
|
||||||
(`--first-login`: single user's launcher on the new layout, then the app,
|
(`--first-login`: single user's launcher on the new layout, then the app,
|
||||||
next to CachyOS Hello). See AGENTS.md there.
|
next to CachyOS Hello). See AGENTS.md there.
|
||||||
- `steammachine-cachyos-live-iso` (fork of CachyOS-Live-ISO), branch work
|
- `steamify-cachyos-live-iso` (fork of CachyOS-Live-ISO), branch work
|
||||||
never on master:
|
never on master:
|
||||||
- `archiso/airootfs/usr/local/bin/calamares-online.sh` (the installer
|
- `archiso/airootfs/usr/local/bin/calamares-online.sh` (the installer
|
||||||
launcher) copies CachyOS's `settings_online.conf` over
|
launcher) copies CachyOS's `settings_online.conf` over
|
||||||
@@ -114,14 +114,14 @@ VM: note what differs here. In the VM (`vm_ssh`, visibly in a Konsole there):
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo pacman -S --needed --noconfirm podman git
|
sudo pacman -S --needed --noconfirm podman git
|
||||||
git clone https://github.com/theupriser/steammachine-cachyos-live-iso ~/projects/steammachine-cachyos-live-iso
|
git clone https://github.com/theupriser/steamify-cachyos-live-iso ~/projects/steamify-cachyos-live-iso
|
||||||
sudo mount -t 9p -o trans=virtio,version=9p2000.L repo /mnt # the Steamify checkout (REPO)
|
sudo mount -t 9p -o trans=virtio,version=9p2000.L repo /mnt # the Steamify checkout (REPO)
|
||||||
cd ~/projects/steammachine-cachyos-live-iso && git checkout feat/steamify && ./steamify-prepare.sh /mnt
|
cd ~/projects/steamify-cachyos-live-iso && git checkout feat/steamify && ./steamify-prepare.sh /mnt
|
||||||
```
|
```
|
||||||
|
|
||||||
then the same `podman run` as below (paths in the VM; `~/projects/iso-build.log`).
|
then the same `podman run` as below (paths in the VM; `~/projects/iso-build.log`).
|
||||||
The ISO (~3.2 GB) fits the 60G disk; copy it out with
|
The ISO (~3.2 GB) fits the 60G disk; copy it out with
|
||||||
`vm_scp "$VM_USER@$VM_HOST:~/projects/steammachine-cachyos-live-iso/out/desktop/*.iso" .`
|
`vm_scp "$VM_USER@$VM_HOST:~/projects/steamify-cachyos-live-iso/out/desktop/*.iso" .`
|
||||||
(`scripts/common.sh`), then install it with `scripts/vminstall.sh --iso`.
|
(`scripts/common.sh`), then install it with `scripts/vminstall.sh --iso`.
|
||||||
Give the VM more room with a bigger disk if `out/`, `build/` and the package
|
Give the VM more room with a bigger disk if `out/`, `build/` and the package
|
||||||
cache grow over several builds (`sudo rm -rf build out` between builds).
|
cache grow over several builds (`sudo rm -rf build out` between builds).
|
||||||
@@ -130,10 +130,10 @@ cache grow over several builds (`sudo rm -rf build out` between builds).
|
|||||||
|
|
||||||
Only podman is installed on the Steam Machine itself; the build tools live in
|
Only podman is installed on the Steam Machine itself; the build tools live in
|
||||||
the container. Rootful (loop devices, mounts), so `sudo podman ps` shows it,
|
the container. Rootful (loop devices, mounts), so `sudo podman ps` shows it,
|
||||||
not a rootless podman GUI. Clone: `~/projects/steammachine-cachyos-live-iso`.
|
not a rootless podman GUI. Clone: `~/projects/steamify-cachyos-live-iso`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ~/projects/steammachine-cachyos-live-iso
|
cd ~/projects/steamify-cachyos-live-iso
|
||||||
git checkout feat/steamify && ./steamify-prepare.sh ~/projects/steamify-cachyos
|
git checkout feat/steamify && ./steamify-prepare.sh ~/projects/steamify-cachyos
|
||||||
sudo rm -rf build out
|
sudo rm -rf build out
|
||||||
systemd-run --user --collect -q -u isobuild-$(date +%s) --working-directory=$PWD bash -c \
|
systemd-run --user --collect -q -u isobuild-$(date +%s) --working-directory=$PWD bash -c \
|
||||||
|
|||||||
@@ -10,19 +10,19 @@ on git.upriser.nl, GitHub's link to it answers 200.
|
|||||||
|
|
||||||
## The flow (one tag names everything)
|
## The flow (one tag names everything)
|
||||||
|
|
||||||
1. **GitHub, `iso-release.yml`** (ISO repo `theupriser/steammachine-cachyos-live-iso`, `workflow_dispatch` only):
|
1. **GitHub, `iso-1-github-tag.yml`** (ISO repo `theupriser/steamify-cachyos-live-iso`, `workflow_dispatch` only):
|
||||||
takes Steamify's newest release (`X.Y.Z`), the time **now in UTC** and makes an **annotated tag**
|
takes Steamify's newest release (`X.Y.Z`), the time **now in UTC** and makes an **annotated tag**
|
||||||
`vX.Y.Z-[dev.]YYYY.MM.DD-HHMM` plus a GitHub release with the changelog notes and the *direct* download link
|
`vX.Y.Z-[dev.]YYYY.MM.DD-HHMM` plus a GitHub release with the changelog notes and the *direct* download link
|
||||||
on Gitea. `dev.` and a pre-release on `feat/steamify` (test build), none on `master` (a release).
|
on Gitea. `dev.` and a pre-release on `feat/steamify` (test build), none on `master` (a release).
|
||||||
GitHub is the only place that reads a clock.
|
GitHub is the only place that reads a clock.
|
||||||
2. **The mirror syncs** (git.upriser.nl is a pull mirror of GitHub, every 10 minutes): the tag arrives.
|
2. **The mirror syncs** (git.upriser.nl is a pull mirror of GitHub, every 10 minutes): the tag arrives.
|
||||||
3. **Gitea, `steamify-iso.yml`** (`on: push: tags: ['v*']`, skipped on GitHub by `github.server_url`): parses the
|
3. **Gitea, `iso-2-gitea-build.yml`** (`on: push: tags: ['v*']`, skipped on GitHub by `github.server_url`): parses the
|
||||||
tag, builds the ISO on the runner with exactly that Steamify (`STEAMIFY_VERSION`), the tag's time (label) and
|
tag, builds the ISO on the runner with exactly that Steamify (`STEAMIFY_VERSION`), the tag's time (label) and
|
||||||
the tag without its `v` (`STEAMIFY_ISO_VERSION`: file name, boot menu, `/etc/steammachine-iso-build`), then
|
the tag without its `v` (`STEAMIFY_ISO_VERSION`: file name, boot menu, `/etc/steammachine-iso-build`), then
|
||||||
attaches ISO + `.sha256` + `.sha1` + `.pkgs.txt` to the mirror's release for that tag
|
attaches ISO + `.sha256` + `.sha1` + `.pkgs.txt` to the mirror's release for that tag
|
||||||
(`akkuman/gitea-release-action`, the run's own token). Never overwrites a release that already has its ISO.
|
(`akkuman/gitea-release-action`, the run's own token). Never overwrites a release that already has its ISO.
|
||||||
4. **Trigger:** by hand (*Actions -> Steamify ISO release (tag) -> Run workflow*, or
|
4. **Trigger:** by hand (*Actions -> ISO 1/2 · Tag and release (GitHub) -> Run workflow*, or
|
||||||
`gh workflow run iso-release.yml -R theupriser/steammachine-cachyos-live-iso --ref feat/steamify`), or by a
|
`gh workflow run iso-1-github-tag.yml -R theupriser/steamify-cachyos-live-iso --ref feat/steamify`), or by a
|
||||||
new Steamify release: `steamify-cachyos`' `bundle.yml` step "Start the Steamify ISO's release" (secret
|
new Steamify release: `steamify-cachyos`' `bundle.yml` step "Start the Steamify ISO's release" (secret
|
||||||
`ISO_DISPATCH_TOKEN` there: fine-grained token, only the ISO repo, *Actions: read and write*; without it the
|
`ISO_DISPATCH_TOKEN` there: fine-grained token, only the ISO repo, *Actions: read and write*; without it the
|
||||||
step is skipped). A push does **not** release (a build is 20 minutes and 3.2 GB).
|
step is skipped). A push does **not** release (a build is 20 minutes and 3.2 GB).
|
||||||
@@ -56,7 +56,7 @@ Total from a Steamify release to the ISO on Gitea: about 30 minutes (release, ta
|
|||||||
- Logs of a public repo's run are readable without login: `.../actions/runs/<run>/jobs/<job>/logs` (job numbers
|
- Logs of a public repo's run are readable without login: `.../actions/runs/<run>/jobs/<job>/logs` (job numbers
|
||||||
count up; re-runs get a new job number). Good for a monitor; no `gh` for Gitea.
|
count up; re-runs get a new job number). Good for a monitor; no `gh` for Gitea.
|
||||||
- Mirror sync is set to 10 min by the user with their own token; "Synchronize Now" or the API
|
- Mirror sync is set to 10 min by the user with their own token; "Synchronize Now" or the API
|
||||||
(`POST /api/v1/repos/<repo>/mirror-sync`) for now. `GITEA_TOKEN` (secret in the ISO repo) would make GitHub
|
(`POST /api/v1/repos/<repo>/mirror-sync`) for now. `GIT_UPRISER_TOKEN` (secret in the ISO repo) would make GitHub
|
||||||
trigger it; not needed.
|
trigger it; not needed.
|
||||||
- **Build traps in the container:** `sudo mkarchiso` in `util-iso.sh` **drops environment variables**:
|
- **Build traps in the container:** `sudo mkarchiso` in `util-iso.sh` **drops environment variables**:
|
||||||
it needs `sudo --preserve-env=STEAMIFY_ISO_VERSION,STEAMIFY_BUILD_STAMP` (the first Gitea ISO came out as
|
it needs `sudo --preserve-env=STEAMIFY_ISO_VERSION,STEAMIFY_BUILD_STAMP` (the first Gitea ISO came out as
|
||||||
@@ -94,7 +94,7 @@ if it ever vanishes, ship the file with Steamify.
|
|||||||
## Checklist for a release
|
## Checklist for a release
|
||||||
|
|
||||||
1. Steamify released? (`gh release list -R theupriser/steamify-cachyos`). The ISO gets the newest.
|
1. Steamify released? (`gh release list -R theupriser/steamify-cachyos`). The ISO gets the newest.
|
||||||
2. `gh workflow run iso-release.yml ... --ref feat/steamify` (test) or `--ref master` (release; master must have
|
2. `gh workflow run iso-1-github-tag.yml ... --ref feat/steamify` (test) or `--ref master` (release; master must have
|
||||||
the workflows: it doesn't yet, `feat/steamify` is the ISO repo's working branch).
|
the workflows: it doesn't yet, `feat/steamify` is the ISO repo's working branch).
|
||||||
3. Watch: tag on Gitea (`.../api/v1/repos/theupriser/steamify-cachyos-live-iso/tags`), the run's log (above),
|
3. Watch: tag on Gitea (`.../api/v1/repos/theupriser/steamify-cachyos-live-iso/tags`), the run's log (above),
|
||||||
then `curl -I -L` the GitHub link. Old test releases: delete on GitHub (`gh release delete <tag>
|
then `curl -I -L` the GitHub link. Old test releases: delete on GitHub (`gh release delete <tag>
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ pulls the pushed branch on the remote, so it needs a GitHub key there first
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ~/Projects && rsync -az --exclude out --exclude build \
|
cd ~/Projects && rsync -az --exclude out --exclude build \
|
||||||
steammachine-cachyos-live-iso steamify-cachyos steamify-cachyos-dev wsl:projects/
|
steamify-cachyos-live-iso steamify-cachyos steamify-cachyos-dev wsl:projects/
|
||||||
ssh wsl 'find ~/projects -name __pycache__ -prune -exec rm -rf {} +; chown -R root: ~/projects'
|
ssh wsl 'find ~/projects -name __pycache__ -prune -exec rm -rf {} +; chown -R root: ~/projects'
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -63,16 +63,16 @@ Both fixups are needed: rsync keeps the laptop's uid (git then refuses with
|
|||||||
## Building the ISO (~8 minutes)
|
## Building the ISO (~8 minutes)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
ssh wsl 'cd ~/projects/steammachine-cachyos-live-iso && ./steamify-prepare.sh ~/projects/steamify-cachyos'
|
ssh wsl 'cd ~/projects/steamify-cachyos-live-iso && ./steamify-prepare.sh ~/projects/steamify-cachyos'
|
||||||
ssh wsl 'cd ~/projects/steammachine-cachyos-live-iso && rm -rf build out && systemd-run --collect -q -u isobuild-$(date +%s) --working-directory=$PWD bash -c "podman run --rm -t --pids-limit=-1 --ulimit nofile=65536:65536 --privileged --network=host -v /root/projects/iso-cache:/var/cache/pacman/pkg -v $PWD:/iso -w /iso docker.io/cachyos/cachyos:latest bash -c '\''pacman-key --init && pacman-key --populate && pacman -Syu --noconfirm --needed archiso mkinitcpio-archiso git squashfs-tools grub sudo && ./build-live-modules.sh && ./build-calamares-modules.sh && { ./buildiso.sh -p desktop -w || ./buildiso.sh -p desktop -c -w; }'\'' > /root/projects/iso-build.log 2>&1"'
|
ssh wsl 'cd ~/projects/steamify-cachyos-live-iso && rm -rf build out && systemd-run --collect -q -u isobuild-$(date +%s) --working-directory=$PWD bash -c "podman run --rm -t --pids-limit=-1 --ulimit nofile=65536:65536 --privileged --network=host -v /root/projects/iso-cache:/var/cache/pacman/pkg -v $PWD:/iso -w /iso docker.io/cachyos/cachyos:latest bash -c '\''pacman-key --init && pacman-key --populate && pacman -Syu --noconfirm --needed archiso mkinitcpio-archiso git squashfs-tools grub sudo && ./build-live-modules.sh && ./build-calamares-modules.sh && { ./buildiso.sh -p desktop -w || ./buildiso.sh -p desktop -c -w; }'\'' > /root/projects/iso-build.log 2>&1"'
|
||||||
```
|
```
|
||||||
|
|
||||||
Wait in one background command, not a polling loop:
|
Wait in one background command, not a polling loop:
|
||||||
`ssh wsl 'until ! podman ps -q | grep -q .; do sleep 20; done; tail -c 1500 ~/projects/iso-build.log; ls -la ~/projects/steammachine-cachyos-live-iso/out/desktop/'`.
|
`ssh wsl 'until ! podman ps -q | grep -q .; do sleep 20; done; tail -c 1500 ~/projects/iso-build.log; ls -la ~/projects/steamify-cachyos-live-iso/out/desktop/'`.
|
||||||
Never start a build while `podman ps` shows one. Output:
|
Never start a build while `podman ps` shows one. Output:
|
||||||
`/root/projects/steammachine-cachyos-live-iso/out/desktop/steamify-cachyos-local-x86_64.iso` (a build by hand
|
`/root/projects/steamify-cachyos-live-iso/out/desktop/steamify-cachyos-local-x86_64.iso` (a build by hand
|
||||||
has no release tag, so it's named `local`, label `STEAMIFY_<version>_LOCAL`; releases are built on the Gitea
|
has no release tag, so it's named `local`, label `STEAMIFY_<version>_LOCAL`; releases are built on the Gitea
|
||||||
mirror from a GitHub tag, see the ISO repo's `iso-release.yml`) (from
|
mirror from a GitHub tag, see the ISO repo's `iso-1-github-tag.yml`) (from
|
||||||
Windows Explorer: `\\wsl$\<distro>\root\projects\...`). The trailing
|
Windows Explorer: `\\wsl$\<distro>\root\projects\...`). The trailing
|
||||||
`chown: missing operand` / "unknown error" is harmless. mksquashfs shows no
|
`chown: missing operand` / "unknown error" is harmless. mksquashfs shows no
|
||||||
progress in the log; the growing `build/iso/arch/x86_64/airootfs.sfs`
|
progress in the log; the growing `build/iso/arch/x86_64/airootfs.sfs`
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
name: Sync git.upriser.nl mirror
|
||||||
|
|
||||||
|
# Trigger the Gitea pull-mirror immediately instead of waiting for its interval,
|
||||||
|
# so Gitea builds/releases the ISO right after main or a tag lands on GitHub.
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
tags: ['*']
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
sync:
|
||||||
|
# Gitea also reads .github/workflows on the mirror; only run on GitHub
|
||||||
|
if: github.server_url == 'https://github.com'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Trigger mirror-sync
|
||||||
|
env:
|
||||||
|
GITEA_URL: ${{ secrets.GIT_UPRISER_URL }}
|
||||||
|
GIT_UPRISER_TOKEN: ${{ secrets.GIT_UPRISER_TOKEN }}
|
||||||
|
# Gitea "owner/repo"; defaults to the same path as on GitHub
|
||||||
|
GITEA_REPO: ${{ vars.GITEA_REPO || github.repository }}
|
||||||
|
run: |
|
||||||
|
curl --fail-with-body -sS --retry 5 --retry-delay 10 --retry-all-errors -X POST \
|
||||||
|
-H "Authorization: token ${GIT_UPRISER_TOKEN}" \
|
||||||
|
"${GITEA_URL%/}/api/v1/repos/${GITEA_REPO}/mirror-sync"
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# steamify-cachyos-dev: how to work here
|
# steamify-cachyos-dev: how to work here
|
||||||
|
|
||||||
Test tooling for Steamify (`../steamify-cachyos`) and the Steam Machine ISO (`../steammachine-cachyos-live-iso`):
|
Test tooling for Steamify (`../steamify-cachyos`) and the Steam Machine ISO (`../steamify-cachyos-live-iso`):
|
||||||
VM scripts (`scripts/`, `run.sh`), the automated test (`scripts/vmtest.sh`, checks in `share/vmtest/` and
|
VM scripts (`scripts/`, `run.sh`), the automated test (`scripts/vmtest.sh`, checks in `share/vmtest/` and
|
||||||
`share/bootloader-test/`), `TESTPLAN.md` (keep it current: rows and a results line after every run) and the
|
`share/bootloader-test/`), `TESTPLAN.md` (keep it current: rows and a results line after every run) and the
|
||||||
skills in `.claude/skills/` (vm-install, cachyos-vm-testing, steam-machine-testing, steam-machine-iso,
|
skills in `.claude/skills/` (vm-install, cachyos-vm-testing, steam-machine-testing, steam-machine-iso,
|
||||||
@@ -22,7 +22,7 @@ wsl-build-host, progress-report, steamify-iso-release, steamify-branch-cleanup).
|
|||||||
- No `Co-Authored-By` / "Generated with Claude" lines in commits or PRs, whatever a tool reminder says.
|
- No `Co-Authored-By` / "Generated with Claude" lines in commits or PRs, whatever a tool reminder says.
|
||||||
- Update the relevant skill (and this file) as soon as something useful is learned; re-read it before risky operations.
|
- Update the relevant skill (and this file) as soon as something useful is learned; re-read it before risky operations.
|
||||||
- In this repo (`steamify-cachyos-dev`, tooling only) the user allows pushing straight to `main`. Elsewhere never commit to `main`. `steamify-cachyos`: `release/X.Y.Z` branches, feature/bugfix branches merged into the release
|
- In this repo (`steamify-cachyos-dev`, tooling only) the user allows pushing straight to `main`. Elsewhere never commit to `main`. `steamify-cachyos`: `release/X.Y.Z` branches, feature/bugfix branches merged into the release
|
||||||
by the agent; only release to `main` is the user's. `steammachine-cachyos-live-iso`: PRs always target `feat/steamify`.
|
by the agent; only release to `main` is the user's. `steamify-cachyos-live-iso`: PRs always target `feat/steamify`.
|
||||||
Branch cleanup: the `steamify-branch-cleanup` skill in `.claude/skills/`.
|
Branch cleanup: the `steamify-branch-cleanup` skill in `.claude/skills/`.
|
||||||
- Follow and update `TESTPLAN.md`; every check in `share/vmtest/` says which row it covers.
|
- Follow and update `TESTPLAN.md`; every check in `share/vmtest/` says which row it covers.
|
||||||
- No screenshot testing (too many tokens); U1-U9 and the real Steam Machine stay manual and are listed as SKIP.
|
- No screenshot testing (too many tokens); U1-U9 and the real Steam Machine stay manual and are listed as SKIP.
|
||||||
@@ -51,7 +51,7 @@ The tests run on the user's PC (Ryzen 9800X3D, 64 GB, **WSL2**), started from a
|
|||||||
down, syncing from the laptop, the podman ISO build, VM windows through WSLg, output in the user's WSL terminal, no GPU
|
down, syncing from the laptop, the podman ISO build, VM windows through WSLg, output in the user's WSL terminal, no GPU
|
||||||
passthrough): `.claude/skills/wsl-build-host/SKILL.md`. `vminstall.sh` works there without udisks (losetup as root).
|
passthrough): `.claude/skills/wsl-build-host/SKILL.md`. `vminstall.sh` works there without udisks (losetup as root).
|
||||||
|
|
||||||
## Problems found in the Steamify ISO (fix in `steammachine-cachyos-live-iso`, PRs into `feat/steamify`)
|
## Problems found in the Steamify ISO (fix in `steamify-cachyos-live-iso`, PRs into `feat/steamify`)
|
||||||
- Fixed (PR #2): cachyos-installer's `bootctl install` runs in a chroot and writes no EFI boot entry, so systemd-boot
|
- Fixed (PR #2): cachyos-installer's `bootctl install` runs in a chroot and writes no EFI boot entry, so systemd-boot
|
||||||
only booted through the disk's fallback path (in OVMF after 4-5 minutes of network boot, every boot).
|
only booted through the disk's fallback path (in OVMF after 4-5 minutes of network boot, every boot).
|
||||||
`steamify-install` now registers it with efibootmgr from the live system.
|
`steamify-install` now registers it with efibootmgr from the live system.
|
||||||
|
|||||||
@@ -10,8 +10,9 @@ PR into the release branch. Tick items off as they're done.
|
|||||||
- [x] 1. `run.sh`: headless mode (`VM_HEADLESS=1` -> `-display none`, plain virtio-vga); still to do: make `vmtest.sh` and `vmbootloadertest.sh` headless by default (`--window` opts out, a log Konsole opens on a desktop, CI opens none) and copy the repo's run.sh into `$VM_DIR` before starting
|
- [x] 1. `run.sh`: headless mode (`VM_HEADLESS=1` -> `-display none`, plain virtio-vga); still to do: make `vmtest.sh` and `vmbootloadertest.sh` headless by default (`--window` opts out, a log Konsole opens on a desktop, CI opens none) and copy the repo's run.sh into `$VM_DIR` before starting
|
||||||
- [ ] 2. `vminstall.sh`: read the ISO's kernel/initramfs without `udisksctl` (bsdtar/7z when there is no session)
|
- [ ] 2. `vminstall.sh`: read the ISO's kernel/initramfs without `udisksctl` (bsdtar/7z when there is no session)
|
||||||
- [ ] 3. `vminstall.sh` / `vmbootloadertest.sh`: no `/dev/tty` prompts and no `pgrep` on the whole host in CI (`CI=1`)
|
- [ ] 3. `vminstall.sh` / `vmbootloadertest.sh`: no `/dev/tty` prompts and no `pgrep` on the whole host in CI (`CI=1`)
|
||||||
- [ ] 4. Where the ISO comes from: newest artifact of `steammachine-cachyos-live-iso`'s `build.yml`
|
- [ ] 4. Where the ISO comes from: the newest ISO release on git.upriser.nl (the Gitea mirror of
|
||||||
(`gh run download -R theupriser/steammachine-cachyos-live-iso`), or a `workflow_dispatch` input (run id / URL)
|
`theupriser/steamify-cachyos-live-iso` builds it and attaches it to the tag's release, see the
|
||||||
|
`steamify-iso-release` skill; GitHub's release links to it), or a `workflow_dispatch` input (release tag / URL)
|
||||||
- [ ] 5. `.github/workflows/bootloader-test.yml`: matrix over `limine, systemd-boot, grub`; steps: install
|
- [ ] 5. `.github/workflows/bootloader-test.yml`: matrix over `limine, systemd-boot, grub`; steps: install
|
||||||
qemu + ovmf, enable /dev/kvm, fetch the ISO, run the script, upload `~/vms/bl-<loader>.test.log` as an artifact
|
qemu + ovmf, enable /dev/kvm, fetch the ISO, run the script, upload `~/vms/bl-<loader>.test.log` as an artifact
|
||||||
- [ ] 6. Runner limits: disk (sparse 60 GB qcow2, free space check), RAM (8 GB VM on a 16 GB runner), timeout (60 min)
|
- [ ] 6. Runner limits: disk (sparse 60 GB qcow2, free space check), RAM (8 GB VM on a 16 GB runner), timeout (60 min)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
# --install first install the VM (scripts/vminstall.sh, from the Steamify ISO)
|
# --install first install the VM (scripts/vminstall.sh, from the Steamify ISO)
|
||||||
# --window show the VM's window (default: headless, with a Konsole on the log when there is a desktop)
|
# --window show the VM's window (default: headless, with a Konsole on the log when there is a desktop)
|
||||||
# Env: VM_DIR (default ~/vms/bl-<loader>), VM_ISO (default: the newest ISO in
|
# Env: VM_DIR (default ~/vms/bl-<loader>), VM_ISO (default: the newest ISO in
|
||||||
# ../steammachine-cachyos-live-iso/out/desktop), REPO (steamify-cachyos, 9p `repo`).
|
# ../steamify-cachyos-live-iso/out/desktop), REPO (steamify-cachyos, 9p `repo`).
|
||||||
# Exit status: the number of failed checks. Only one VM runs at a time (port 2222).
|
# Exit status: the number of failed checks. Only one VM runs at a time (port 2222).
|
||||||
set -uo pipefail
|
set -uo pipefail
|
||||||
here="$(cd "$(dirname "$0")" && pwd)"
|
here="$(cd "$(dirname "$0")" && pwd)"
|
||||||
@@ -54,7 +54,7 @@ printf '\n===== vmbootloadertest.sh %s (%s) =====\n' "$loader" "$(date +%T)"
|
|||||||
if $install; then
|
if $install; then
|
||||||
step "install $loader VM in $VM_DIR"
|
step "install $loader VM in $VM_DIR"
|
||||||
stop_vm
|
stop_vm
|
||||||
iso="${VM_ISO:-$(ls -t "$repo"/../steammachine-cachyos-live-iso/out/desktop/*.iso 2>/dev/null | head -n 1)}"
|
iso="${VM_ISO:-$(ls -t "$repo"/../steamify-cachyos-live-iso/out/desktop/*.iso 2>/dev/null | head -n 1)}"
|
||||||
[[ -f "$iso" ]] || { echo "No ISO: set VM_ISO"; exit 2; }
|
[[ -f "$iso" ]] || { echo "No ISO: set VM_ISO"; exit 2; }
|
||||||
if [[ -f "$VM_DIR/disk.qcow2" ]]; then
|
if [[ -f "$VM_DIR/disk.qcow2" ]]; then
|
||||||
[[ -t 0 ]] || { echo "$VM_DIR has a disk; run this from a terminal to replace it"; exit 2; }
|
[[ -t 0 ]] || { echo "$VM_DIR has a disk; run this from a terminal to replace it"; exit 2; }
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
# --fresh a new, empty disk (else the existing one: e.g. boot the
|
# --fresh a new, empty disk (else the existing one: e.g. boot the
|
||||||
# installed system with `./run.sh` in $VM_DIR afterwards)
|
# installed system with `./run.sh` in $VM_DIR afterwards)
|
||||||
# --iso <file> default: the newest out/desktop/*.iso of the host's
|
# --iso <file> default: the newest out/desktop/*.iso of the host's
|
||||||
# steammachine-cachyos-live-iso checkout
|
# steamify-cachyos-live-iso checkout
|
||||||
# Env: ISO_VM_DIR (~/vms/iso-vm), ISO_VM_PORT (2223: runs next to the test
|
# Env: ISO_VM_DIR (~/vms/iso-vm), ISO_VM_PORT (2223: runs next to the test
|
||||||
# VM on 2222).
|
# VM on 2222).
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
@@ -26,8 +26,8 @@ while [[ $# -gt 0 ]]; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
if [[ -z "$iso" ]]; then
|
if [[ -z "$iso" ]]; then
|
||||||
iso="$(ls -t "$(dirname "$repo")"/steammachine-cachyos-live-iso/out/desktop/*.iso 2>/dev/null | head -1)"
|
iso="$(ls -t "$(dirname "$repo")"/steamify-cachyos-live-iso/out/desktop/*.iso 2>/dev/null | head -1)"
|
||||||
[[ -n "$iso" ]] || { echo "No ISO in steammachine-cachyos-live-iso/out/desktop: build one (vmisobuild.sh) or pass --iso." >&2; exit 1; }
|
[[ -n "$iso" ]] || { echo "No ISO in steamify-cachyos-live-iso/out/desktop: build one (vmisobuild.sh) or pass --iso." >&2; exit 1; }
|
||||||
fi
|
fi
|
||||||
iso="$(cd "$(dirname "$iso")" && pwd)/$(basename "$iso")"
|
iso="$(cd "$(dirname "$iso")" && pwd)/$(basename "$iso")"
|
||||||
mkdir -p "$dir"
|
mkdir -p "$dir"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Build the Steam Machine ISO (steammachine-cachyos-live-iso) in the test VM
|
# Build the Steam Machine ISO (steamify-cachyos-live-iso) in the test VM
|
||||||
# (directly, no container: build-live-modules.sh and build-calamares-modules.sh with sudo, buildiso.sh as
|
# (directly, no container: build-live-modules.sh and build-calamares-modules.sh with sudo, buildiso.sh as
|
||||||
# the user, it sudos itself),
|
# the user, it sudos itself),
|
||||||
# visibly (a Konsole on the VM's desktop follows the log), with the package
|
# visibly (a Konsole on the VM's desktop follows the log), with the package
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
# gets all host cores but 2 for the build: start it with
|
# gets all host cores but 2 for the build: start it with
|
||||||
# VM_CACHE=$VM_DIR/iso-cache VM_CPUS=$(( $(nproc) * 3 / 4 )) scripts/vmreset.sh --fremont
|
# VM_CACHE=$VM_DIR/iso-cache VM_CPUS=$(( $(nproc) * 3 / 4 )) scripts/vmreset.sh --fremont
|
||||||
# Env: VM_DIR (see common.sh), ISO_BRANCH (feat/steamify), ISO_OUT (the host's
|
# Env: VM_DIR (see common.sh), ISO_BRANCH (feat/steamify), ISO_OUT (the host's
|
||||||
# steammachine-cachyos-live-iso/out/desktop).
|
# steamify-cachyos-live-iso/out/desktop).
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
here="$(cd "$(dirname "$0")" && pwd)"
|
here="$(cd "$(dirname "$0")" && pwd)"
|
||||||
. "$here/common.sh"
|
. "$here/common.sh"
|
||||||
@@ -20,7 +20,7 @@ steamify=""
|
|||||||
branch="${ISO_BRANCH:-feat/steamify}"
|
branch="${ISO_BRANCH:-feat/steamify}"
|
||||||
# Where the ISO lands: out/desktop of the host's live-ISO checkout (next to
|
# Where the ISO lands: out/desktop of the host's live-ISO checkout (next to
|
||||||
# this repo), where a local build would put it.
|
# this repo), where a local build would put it.
|
||||||
out="${ISO_OUT:-$(dirname "$(cd "$here/.." && pwd)")/steammachine-cachyos-live-iso/out/desktop}"
|
out="${ISO_OUT:-$(dirname "$(cd "$here/.." && pwd)")/steamify-cachyos-live-iso/out/desktop}"
|
||||||
mkdir -p "$out"
|
mkdir -p "$out"
|
||||||
|
|
||||||
{ printf 'branch=%q steamify=%q\n' "$branch" "$steamify"; cat << 'REMOTE'
|
{ printf 'branch=%q steamify=%q\n' "$branch" "$steamify"; cat << 'REMOTE'
|
||||||
@@ -41,9 +41,9 @@ mountpoint -q /var/cache/pacman/pkg || sudo mount --bind /var/cache/steamify-iso
|
|||||||
# build fails. mkarchiso uses this mirrorlist, so skip it here.
|
# build fails. mkarchiso uses this mirrorlist, so skip it here.
|
||||||
sudo sed -i '/archlinux\.cachyos\.org/s/^Server/#Server/' /etc/pacman.d/mirrorlist
|
sudo sed -i '/archlinux\.cachyos\.org/s/^Server/#Server/' /etc/pacman.d/mirrorlist
|
||||||
sudo pacman -Sy --needed --noconfirm archiso mkinitcpio-archiso git squashfs-tools grub >/dev/null
|
sudo pacman -Sy --needed --noconfirm archiso mkinitcpio-archiso git squashfs-tools grub >/dev/null
|
||||||
iso=~/projects/steammachine-cachyos-live-iso
|
iso=~/projects/steamify-cachyos-live-iso
|
||||||
if [ -d "$iso/.git" ]; then git -C "$iso" fetch -q && git -C "$iso" checkout -q "$branch" && git -C "$iso" reset -q --hard "origin/$branch"
|
if [ -d "$iso/.git" ]; then git -C "$iso" fetch -q && git -C "$iso" checkout -q "$branch" && git -C "$iso" reset -q --hard "origin/$branch"
|
||||||
else mkdir -p ~/projects && git clone -q -b "$branch" https://github.com/theupriser/steammachine-cachyos-live-iso "$iso"; fi
|
else mkdir -p ~/projects && git clone -q -b "$branch" https://github.com/theupriser/steamify-cachyos-live-iso "$iso"; fi
|
||||||
cd "$iso" && echo "ISO repo: $(git log --oneline -1)"
|
cd "$iso" && echo "ISO repo: $(git log --oneline -1)"
|
||||||
./steamify-prepare.sh $steamify | tail -1
|
./steamify-prepare.sh $steamify | tail -1
|
||||||
sudo rm -rf build out
|
sudo rm -rf build out
|
||||||
@@ -61,7 +61,7 @@ REMOTE
|
|||||||
} | vm_ssh bash -s
|
} | vm_ssh bash -s
|
||||||
echo "Building in the VM (its Konsole shows the log)..."
|
echo "Building in the VM (its Konsole shows the log)..."
|
||||||
until vm_ssh 'grep -q "^== BUILD EXIT" ~/projects/iso-build.log'; do sleep 30; done
|
until vm_ssh 'grep -q "^== BUILD EXIT" ~/projects/iso-build.log'; do sleep 30; done
|
||||||
iso="$(vm_ssh "bash -c 'ls -t ~/projects/steammachine-cachyos-live-iso/out/desktop/*.iso 2>/dev/null | head -1'")"
|
iso="$(vm_ssh "bash -c 'ls -t ~/projects/steamify-cachyos-live-iso/out/desktop/*.iso 2>/dev/null | head -1'")"
|
||||||
[[ -n "$iso" ]] || { echo "No ISO was built; see ~/projects/iso-build.log in the VM." >&2; exit 1; }
|
[[ -n "$iso" ]] || { echo "No ISO was built; see ~/projects/iso-build.log in the VM." >&2; exit 1; }
|
||||||
vm_scp "$VM_USER@$VM_HOST:$iso" "$out/"
|
vm_scp "$VM_USER@$VM_HOST:$iso" "$out/"
|
||||||
echo "ISO: $out/$(basename "$iso") (cache: $VM_DIR/iso-cache)"
|
echo "ISO: $out/$(basename "$iso") (cache: $VM_DIR/iso-cache)"
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
# update the repo there, start scripts/vmtest.sh in a detached `screen`, wait for the summary, print it.
|
# update the repo there, start scripts/vmtest.sh in a detached `screen`, wait for the summary, print it.
|
||||||
# scripts/vmtest-remote.sh <ssh-host> [--no-wait] [vmtest.sh args...] e.g. scripts/vmtest-remote.sh pc cli hw
|
# scripts/vmtest-remote.sh <ssh-host> [--no-wait] [vmtest.sh args...] e.g. scripts/vmtest-remote.sh pc cli hw
|
||||||
# The branch you are on must be pushed (the remote pulls it). The remote needs this repo, ../steamify-cachyos,
|
# The branch you are on must be pushed (the remote pulls it). The remote needs this repo, ../steamify-cachyos,
|
||||||
# ../steammachine-cachyos-live-iso (for the loader list and the ISO), qemu + OVMF + screen, KVM, and the VMs in
|
# ../steamify-cachyos-live-iso (for the loader list and the ISO), qemu + OVMF + screen, KVM, and the VMs in
|
||||||
# ~/vms (see the vm-install skill). Env: REMOTE_REPO (default ~/projects/steamify/steamify-cachyos-dev).
|
# ~/vms (see the vm-install skill). Env: REMOTE_REPO (default ~/projects/steamify/steamify-cachyos-dev).
|
||||||
set -uo pipefail
|
set -uo pipefail
|
||||||
host="${1:?usage: $0 <ssh-host> [--no-wait] [vmtest.sh args...]}"; shift
|
host="${1:?usage: $0 <ssh-host> [--no-wait] [vmtest.sh args...]}"; shift
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@
|
|||||||
set -uo pipefail
|
set -uo pipefail
|
||||||
here="$(cd "$(dirname "$0")" && pwd)"
|
here="$(cd "$(dirname "$0")" && pwd)"
|
||||||
repo="$(cd "$here/.." && pwd)"
|
repo="$(cd "$here/.." && pwd)"
|
||||||
iso_repo="$repo/../steammachine-cachyos-live-iso"
|
iso_repo="$repo/../steamify-cachyos-live-iso"
|
||||||
args=("$@")
|
args=("$@")
|
||||||
install=""; window=""; screen=false; loaders=(); suites=(); want_boot=false
|
install=""; window=""; screen=false; loaders=(); suites=(); want_boot=false
|
||||||
for a in "$@"; do
|
for a in "$@"; do
|
||||||
|
|||||||
Reference in new issue
Block a user