@@ -7,7 +7,7 @@ delete images/base.qcow2 first.
77
88 State lives in ~/.local/share/conveyor. Sockets live in /tmp/cv-*, because unix socket paths max out at 108 bytes.
99 """
10-import base64, json, socket, subprocess, sys, time
10+import base64, json, signal, socket, subprocess, sys, time
1111 from pathlib import Path
1212
1313 DATA = Path.home() / ".local/share/conveyor"
@@ -17,7 +17,8 @@ VMS = DATA / "vms"
1717 KEY = DATA / "id_ed25519"
1818 ISO = max(Path.home().glob("s/cachyos-desktop-linux*.iso"), default=None)
1919 USER, PASS = "sacenox", "zzzz"
20-DEV_PKGS = "starship fzf tree-sitter-cli zig rustup nodejs npm go python python-pip xdotool wmctrl maim xorg-xwininfo kitty nvim git openssh claude-code qemu-guest-agent vulkan-swrast ttf-jetbrains-mono ttf-jetbrains-mono-nerd".split()
20+# nodejs from extra, beside the simdjson it links: [cachyos] shadows it with a build that can lag simdjson's soname.
21+DEV_PKGS = "starship fzf tree-sitter-cli zig rustup extra/nodejs npm go python python-pip xdotool wmctrl maim xorg-xwininfo kitty nvim git openssh claude-code qemu-guest-agent vulkan-swrast ttf-jetbrains-mono ttf-jetbrains-mono-nerd".split()
2122 XORG_PKGS = "libwnck3 mesa-utils xorg-xdpyinfo xorg-server xorg-xinit xorg-xinput xorg-xkill xorg-xrandr".split()
2223 DE_PKGS = """blueman file-roller galculator gvfs lightdm lightdm-gtk-greeter network-manager-applet ristretto
2324 thunar-archive-plugin xdg-user-dirs-gtk xed xfce4 xfce4-notifyd xfce4-pulseaudio-plugin xfce4-screenshooter
@@ -273,7 +274,10 @@ def bake():
273274 log(f"installed after {time.monotonic() - t0:.0f} s; provisioning")
274275 guest_put("bake", PROVISION.encode(), "/root/provision.sh")
275276 guest_put("bake", KEY.with_suffix(".pub").read_bytes(), "/root/host_key.pub")
277+ # The host's repos: the installer leaves the v3 ones out, so the upgrade would downgrade it all to generic builds.
278+ guest_put("bake", Path("/etc/pacman.conf").read_bytes(), "/root/pacman.conf")
276279 rc, out, err = guest_exec("bake", "mount /dev/vda1 /mnt && install -m700 /root/provision.sh /root/host_key.pub /mnt/root/ "
280+ "&& install -m644 /root/pacman.conf /mnt/etc/pacman.conf "
277281 "&& cp --dereference /etc/resolv.conf /mnt/etc/resolv.conf "
278282 "&& arch-chroot /mnt /root/provision.sh > /root/provision.log 2>&1; rc=$?; "
279283 "tail -n 40 /root/provision.log; umount -R /mnt 2>/dev/null; sync; exit $rc")
@@ -307,4 +311,12 @@ def bake():
307311
308312
309313 if __name__ == "__main__":
310- bake() if sys.argv[1:] == ["bake"] else print(__doc__)
314+ if sys.argv[1:] != ["bake"]:
315+ sys.exit(print(__doc__))
316+ # A killed or closed bake exits like Ctrl+C, so the VM below never outlives it.
317+ for s in (signal.SIGTERM, signal.SIGHUP):
318+ signal.signal(s, lambda n, _: sys.exit(128 + n))
319+ try:
320+ bake()
321+ finally:
322+ poweroff("bake", 0)