No description
- Shell 65.8%
- Makefile 23.9%
- Python 10.3%
| .mise/tasks | ||
| ports/www/forgejo | ||
| vm | ||
| .gitignore | ||
| mise.toml | ||
| README.md | ||
ports
Local OpenBSD ports overlay + a throwaway build VM that turns them into
installable .tgz packages. Runs on the dev box.
OpenBSD packages must be built on matching version+arch and can't be built on Linux, so a qemu VM running OpenBSD does the building. The VM is autoinstalled from scratch (rebuildable artifact, never committed).
Layout
ports/<cat>/<port>/ overlay tree; mounts to /usr/ports/mystuff/<cat>/<port> in the VM
vm/ autoinstall inputs (committed) + image/cache (gitignored)
install.conf autoinstall response file
disklabel partition template (big /usr + /usr/obj)
install.site provisions the builder (pkg_add, ports tree, user.list)
boot.conf serial + boot bsd.rd
feed-console.py answers the one prompt autoinstall can't reach (see Notes)
keys/openbsd-NN-base.pub signify pubkey for verifying sets (committed)
dist/ built .tgz output (gitignored)
.mise/tasks/ vm:{fetch,create,up,ssh,down}, build
Host prereqs (portage — not mise-providable)
app-emulation/qemu net-misc/socat app-crypt/signify
KVM: load kvm-intel/kvm-amd, add yourself to the kvm group, relogin.
Workflow
# one-time per OpenBSD release:
scp <obsd-host>:/etc/signify/openbsd-79-base.pub vm/keys/ # trust anchor for sets
mise run vm:fetch # download + signify-verify the install sets
mise run vm:create # autoinstall -> vm/openbsd.qcow2 (build-ready, hands-off)
# per package:
mise run build www/forgejo # boot VM, rsync port in, make package, -> dist/forgejo-*.tgz
mise run vm:{up,ssh,down} # operate the VM directly
Install the result on the target box with doas pkg_add ./forgejo-*.tgz.
Publishing to a private mirror (a Forgejo release) is a separate step, TBD.
Notes — how the VM build is wired, and the OpenBSD-isms behind it
- The response-file prompt. qemu user-net (slirp) serves DHCP/TFTP on the
gateway
10.0.2.2, and autoinstall fetchesinstall.conffrom there — but qemu won't let aguestfwdhttp server bind the gateway, so our http lives at10.0.2.1instead. autoinstall can't find the file at.2, drops toResponse file location?, andfeed-console.py(watching the serial socket) types the.1URL. Everything else (sets, disklabel, site) is served from.1. - Disklabel. The OpenBSD default carves a ~2.7G
/usr, too small for the ports tree + build cache.vm/disklabelgives/usrand/usr/objthe bulk;install.sitesetsWRKOBJDIR=/usr/objso Go's build cache stays off/usr. - X sets are mandatory.
bsd.port.mkrefuses to build any port without the X sets installed ("requires correctly installed X11"), even headless ones like forgejo — soinstall.confkeepsx*and only dropsgame*. builderuser. The build/ssh user isbuilder, notbuild—buildis in the installer's reserved-loginname list and is silently rejected.rsync--.pkg_add rsyncis ambiguous (minimal vs full flavor); the build task needs rsync in the VM, soinstall.sitepinsrsync--(the full flavor).- Unsigned site set.
site79.tgzisn't in the releaseSHA256.sig, so the installer prompts twice (Checksum test for ... Continue anyway?andContinue without verification?); both are answeredyesininstall.conf.