diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-19 12:07:27 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-19 12:07:27 -0500 |
| commit | e2eb958c4fab1d61263b724eebd861489af73359 (patch) | |
| tree | a26b216d4258236bf0864f9555569b715f2c28e3 /scripts | |
| parent | db851ffba560272f1e813dd13d09fb9f88d0faff (diff) | |
| download | archangel-e2eb958c4fab1d61263b724eebd861489af73359.tar.gz archangel-e2eb958c4fab1d61263b724eebd861489af73359.zip | |
feat(build): route pacstrap through pacoloco when available
build.sh now checks for a pacoloco caching proxy on localhost:9129 before mkarchiso runs. When pacoloco is up, build.sh rewrites the build profile's pacman.conf to point [core], [extra], and [archzfs] at the proxy. When it isn't, the build falls back to the upstream mirrors and the GitHub-releases URL it always used.
The motivation is the recurring archzfs corruption that's hit ~2 of 3 builds. The earlier cache-hygiene step (db851ff) clears the host's pacman cache so pacstrap can't reuse a corrupted package between builds. Pacoloco is the next layer. It caches successful fetches, so once a known-good copy of zfs-dkms or zfs-utils lands, future builds skip the GitHub roundtrip entirely. Pacoloco doesn't validate checksums itself, so a corrupted upstream fetch still fails the build at pacstrap. Once a clean copy lands, the cache stays clean.
Detection uses bash /dev/tcp (no external dependency on nc or netcat). Two sed lines rewrite the URLs in the freshly-copied profile pacman.conf. The fallback prints an info message so the operator knows which mode the build ran in.
README's "Build Host Requirements" section now lists pacoloco as an optional dependency with install + enable steps. Pacoloco is from AUR (~yay -S pacoloco~). The config in /etc/pacoloco.yaml needs an archzfs repo entry, documented in the README block.
I verified end-to-end: installed pacoloco, configured /etc/pacoloco.yaml for archlinux (host mirrorlist) + archzfs (GitHub releases URL), enabled the systemd service, smoke-tested with curl (archzfs.db and core.db both served 200), then ran a full build. The build completed in ~4 minutes. The info message confirmed pacoloco routing. Pacoloco's cache filled with the freshly-fetched archzfs packages (zfs-dkms-2.4.2-1, zfs-utils-2.4.2-2) plus the Arch packages that weren't already in the host pacman cache. Build log and ISO landed at the expected paired names.
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
