Skip to content

v0.1.6

Choose a tag to compare

@snonux snonux released this 17 Sep 05:35
· 613 commits to main since this release

Release v0.1.6

BSD Package and Service Support

This release extends gonf beyond Linux and the first set of BSDs. The two flagship resources — Package and Service — now work across OpenBSD, FreeBSD, and NetBSD, with the backend detected automatically. If you manage a mixed fleet of BSDs (or a NetBSD arm64 box), you can now declare the same intent in your config and let gonf talk to the right tool on each host.

Features

NetBSD package and service support

The most significant addition. Both resources now understand NetBSD:

  • Package uses pkgin for install/remove/upgrade and pkg_info -e to check current state.
  • Service uses service(8) to start/stop/reload/restart and manages boot-time enablement by writing /etc/rc.conf.d/NAME with YES/NO, which is the standard NetBSD override mechanism.

Why this matters: NetBSD hosts (including 32-/64-bit arm64 boards) were previously unsupported. You can now converge a NetBSD machine with the same declarative style you already use on Linux and the other BSDs, with no per-OS branching in your config.

New docs/package.md reference

A dedicated page documents the Package / NoPackage API, the auto-detected backends per OS, and the root/doas requirement. This makes the resource self-documenting alongside the existing service docs.

Why this matters: Users no longer have to read source to learn which backends exist or how to require the latest version of a package.

Improvements

Cleaner, unified package backend dispatch

detectPackageManager now switches on runtime.GOOS first and only falls back to release-file sniffing on Linux. A shared runOrErr helper and notePkg status helper were extracted so each backend stays small and consistent.

Why this matters: Adding another OS backend (e.g. a different Linux family or another BSD variant) is now a single new file plus one case, with no duplicated plumbing. This is the kind of structure that keeps the codebase maintainable as it grows.

Test coverage for every new backend

Each new backend ships with unit tests using a faked command runner (no root required) plus opt-in live tests gated behind environment variables:

  • GONF_RUN_BSD_PACKAGE_TESTS=1 for real package probes.
  • GONF_RUN_BSD_SERVICE_TESTS=1 for real service probes.
  • The live service test now picks an appropriate daemon per host (bozohttpd on the NetBSD test box, uptimed elsewhere).

Why this matters: The new code is verified on the actual operating systems it targets, not just on a Linux laptop. The opt-in gate keeps normal CI fast and non-rooted while still letting you run the real checks on your fleet.

Cross-compile test instructions consolidated

The service docs now list a single table of test hosts (FreeBSD f0.lan, OpenBSD fishfinger.buetow.org, NetBSD pi0.lan) with the exact GOOS/GOARCH, user, and daemon under test, instead of per-OS scattered snippets.

Why this matters: Contributing or verifying on a BSD host is now copy-paste instead of archaeology.

Updated conf-rex gap tracker

The gap analysis was refreshed to reflect the new backends: pkg now covers OpenBSD pkg_add, FreeBSD pkg, and NetBSD pkgin (custom PKG_PATH is still manual), and service lists NetBSD alongside the others.

Why this matters: Anyone planning a port of an existing conf setup gets an accurate picture of what gonf covers today versus what remains.

Documentation

  • README links now point to both the package and service docs, with the service line updated to mention NetBSD.
  • Service docs add the NetBSD row and the consolidated cross-compile table.

No breaking changes

This is a pure addition release. Existing Linux/systemd, OpenBSD, and FreeBSD configurations work unchanged. There is nothing to migrate.

If you have a NetBSD (or additional OpenBSD/FreeBSD) host you'd like to bring under management, this is the release to reach for — declare your packages and services once, and gonf handles the rest.