Changelog
Notable changes to gtcnsl, newest first. Format follows Keep a Changelog; versions follow Semantic Versioning.
Keep a Changelog · SemVer
v2.1.1
2026-10-02
Fixed
- **`runner reconfigure --admin-token` now really deletes the old runner registration.** Since it was added, the cleanup called a Gitea API route that has never existed (`/api/v1/admin/runners`) and matched runners by a UUID the API never returns, so every cleanup ended in a warning and the orphan stayed in Site Admin. It now uses `/api/v1/admin/actions/runners` and identifies the old registration by the numeric id stored in its `.runner` file, guarded by name and instance address. Needs Gitea ≥ 1.24 and a site-admin token with `write:admin`; failures remain warnings, as before.
v2.1.0
2026-10-02
Added
- **Gitea 28 support.** Gitea 28.0.0 (the successor of 1.27 — upstream dropped the `1.` prefix) is validated across install, upgrade (including the consented 1.27 → 28 crossing), config, serving and backup/restore. `gtcnsl gitea install` without `--to` now installs the newest 28.x.
- **Gitea Runner 4.x support.** Runner 4.1.0 is validated across the matrix (host, docker, dind-rootless); `runner install` without `--to` now installs the newest 4.x.
- **SECRET_KEY re-encryption covers Gitea 28.0.** Its crypto was swept against the 28.0.0 source and is unchanged.
Changed
- **`gitea enable-https` takes the domain from `ROOT_URL` first.** Gitea 28 no longer reads `[server] DOMAIN`, so without `--domain` the host now comes from the live `ROOT_URL`, then `DOMAIN`.
- **Domain advice points at `ROOT_URL`.** Quickstart, configuration docs and `config set` help now set `server.ROOT_URL`; on Gitea 1.x set `DOMAIN` too.
- **The re-encryption envelope is an explicit list of verified Gitea lines** (`1.24–1.27, 28.0`), not a range, so versions Gitea never released (1.28, 2.x–27.x) can never count as verified (ADR 0047).
v2.0.0
2026-10-02
Changed
- **Upgrades stay within the major version by default.** `gitea install/upgrade`, `runner install/upgrade` and `self-update` without `--to` pick the newest release in the installed major (a fresh host: the newest major validated by this gtcnsl release — Gitea 1.x, runner 3.x) and print a warning when a newer major exists. The TUI version pickers now label this default "(recommended)" instead of "(latest stable)".
- **Breaking: crossing a major needs consent.** An explicit `--to` into a newer major than the installed one is refused before anything changes, unless you confirm on a terminal (gtcnsl names both versions and asks) or pass the new `--allow-major-upgrade` flag. `--yes` is not consent: a script that ran `upgrade --to <newer major> --yes` must add `--allow-major-upgrade`. The TUI shows a separate confirmation step. `self-update --dry-run` reports a major crossing without needing consent.
v1.6.0
2026-08-10
Changed
- Baseline `config.yaml` generation (`runner register`/`reconfigure` first run, `gtcnsl runner config generate`) calls the runner's `config generate` subcommand on binaries ≥ 3.1.0, falling back to the deprecated `generate-config` on older ones — same version-gate pattern as `--token-file`.
Fixed
- `runner register --force` over a live daemon now stops the service before dropping the old `.runner` registration. Against runner ≥ 3.0.0 the previous ordering destroyed the old registration and then failed on the daemon's `.runner.lock`, leaving the host unregistered; the stop-first ordering (mirroring `reconfigure`) works on both systemd and OpenRC.
v1.5.0
2026-08-06
Added
- **openSUSE Leap 16 joins the supported matrix — the first zypper-based family.** `internal/pkgmgr` gained `FamilySUSE`/`DistroOpenSUSE`: `Install` runs `zypper --non-interactive refresh` then `zypper --non-interactive install` (unlike RHEL-family's implicit dnf refresh, openSUSE's default repos ship `autorefresh=0`, so the explicit refresh step is required, not optional), `IsInstalled` shares RHEL-family's `rpm -q` (both are RPM-based), and an unrecognised SUSE derivative whose `/etc/os-release` `ID_LIKE` contains `suse` now resolves to the right family via the same fallback Rocky/AlmaLinux clones already use. Docker installs straight from Leap's default repo (`docker`, no third-party repo needed, unlike RHEL-family's Docker CE repo dance); Podman is in the same whitelist as Debian/Ubuntu/Rocky/AlmaLinux; docker-rootless is refused on this family too, symmetric with the RHEL-family refusal (ADR 0040) — an implementation would need SUSE's own rootless-extras package, out of scope here. `gtcnsl doctor`'s CA-bundle probe gained `/etc/ssl/ca-bundle.pem` (SUSE family) as a third candidate path alongside the existing Debian and RHEL ones. See ADR 0043.
- **Alpine Linux joins the supported matrix — host-mode only.** gtcnsl now runs on Alpine via a second, honest `service.Manager` backend (the init-agnostic abstraction described under Changed, below): `internal/openrc` drives `rc-service`/`rc-update` and deploys supervise-daemon-based `/etc/init.d` scripts gtcnsl renders itself (`internal/gitea`/`internal/runner` gained `RenderOpenRCUnit` alongside their existing systemd templates). `internal/app` picks the backend automatically via `service.Detect()` — no flag, no config. `internal/pkgmgr` gained `FamilyAlpine` (`apk update` + `apk add`, `apk info -e` for install checks); `internal/osuser` gained a BusyBox `adduser`/`addgroup` branch for hosts with no `useradd`/`usermod`. `gtcnsl doctor` is init-aware: an OpenRC host now PASSes the init-system check instead of hard-failing as "systemd not running". **MVP scope, by design (ADR 0020/0045): host-mode Gitea and host-mode runner only.** The `docker`, `docker-rootless`, `podman`, and `dind-rootless` runner executors all refuse cleanly on Alpine with an explanation (no systemd-logind session manager for the rootless/dind-rootless setups those executors need) rather than failing unpredictably partway through. See ADR 0020/0044/0045.
- **Downloads now recover from a stalled connection instead of hanging forever.** Every download path — Gitea install/upgrade, gitea-runner install/upgrade, and gtcnsl's own self-update, all of which share `internal/download`'s single implementation — now watches for a response that stops producing bytes and, after 30s of silence, aborts that attempt and retries (up to 3 attempts total) with a fresh connection, resuming via `Range` when the server supports it instead of starting over. A download that ultimately can't be recovered now fails with a clear "giving up after N attempts" error instead of hanging. Version listing requests (available Gitea/runner versions, the self-update manifest) now also carry a 15s timeout, so a stalled connection can no longer hang the "loading available versions" screen either. See ADR 0041.
- **The TUI's operation screen now shows whether anything is actually happening.** A live spinner runs next to the active stage for the whole operation (not just before the first event), Progress events render a percentage plus human-readable volumes when the size is known (`download: 46% (19.9 MiB / 42.7 MiB)`), and the download-resilience retry notice above ("retrying (attempt 2/3) from byte 307200…") now reads as a warning instead of blending into the log.
- **Esc on a running TUI operation is honest about what it does.** Pressing Esc once now shows `operation still running (holds the gtcnsl lock): c cancel · esc hide` instead of silently leaving while the operation keeps running underneath — the exact confusion behind a production incident where the operator saw "another gtcnsl operation is already in progress" with no idea why. `c` cancels: the download stage stops immediately (built on the per-attempt cancellable context the download-resilience entry above introduced, ADR 0041), other stages stop at the next safe boundary between stages, and an already-started mutating stage (binary swap, unit restart) always finishes atomically rather than being torn mid-way. A second Esc hides the screen and returns to the dashboard, which shows an "operation in progress…" indicator until the hidden operation finishes. Cancelling never crashes the TUI — the screen reads "Cancelled", not a raw error. See ADR 0042.
- **The TUI's version picker recovers from a failed/timed-out version list instead of spinning forever.** On an error it now offers `r` to retry the load in addition to the existing manual-entry fallback.
Changed
- **Internal refactor: service management now goes through an init-agnostic `internal/service.Manager` instead of `systemd.Manager` directly.** `internal/core` used to call `internal/systemd` for every service operation, unconditionally. It now programs against `service.Manager` — the operations any init system can do (start/stop/ restart/enable/deploy unit/reload) — plus three optional capability interfaces (`DropInCapable`, `LingerCapable`, `UnitInspector`) for the systemd-only features (drop-in overlays, session lingering, live unit introspection), gated by an honest refusal when a backend lacks one. `internal/systemd` is unmoved and unrenamed — it is simply, now, the (only, still) backend implementing this abstraction. **No behaviour changes**: this is preparation for Alpine/OpenRC support, not the Alpine support itself — every existing test passes unmodified. See ADR 0044 (refines ADR 0020).
Fixed
- **A stalled Gitea/CDN connection could hang an upgrade indefinitely.** Traced to a production incident where Go's HTTP/2 client wedged against a Cloudflare-fronted `dl.gitea.com` download: the connection stayed established with zero throughput and no error, so nothing ever timed out. gtcnsl's download and version-discovery clients now force HTTP/1.1, which reproducibly avoided the wedge in the incident and, per ADR 0041, is dedicated to just these clients — the Gitea admin API and health-check clients are unaffected. (The Range-resume above covers the remaining "sometimes networks just blip" case on top of this.)
- An interrupted download (e.g. `SIGTERM` mid-transfer) could leave a `gtcnsl-download-*` temp file behind; download now always removes it on any non-success outcome, including a cancelled context.
v1.4.0
2026-08-04
Added
- **The TUI's start screen is now a live dashboard.** SERVICES (Gitea and gitea-runner: install status — not installed / inactive / active / unknown — plus binary version) and CONFIG (`app.ini` path + presence, `secrets.ini` managed-key count) render above the same six ACTIONS entries the menu always had. All data is read live from the host (no root required) and degrades honestly: nothing guessed, "unknown" when a probe itself fails, never a false "in sync" claim for config. Status refreshes on `r`; the first frame never blocks on the underlying `systemctl`/`exec` calls.
- **Golden byte-for-byte TUI dashboard snapshots, plus a deterministic screenshot renderer, guard against the TUI and the marketing site drifting apart again.** `test/integration/scenarios/tui-golden.sh` captures the fresh-host dashboard from a real pty (tmux, ANSI codes included) and compares it byte-for-byte against a committed fixture (`test/integration/golden/dashboard-fresh.ans`); a plain-text sibling keeps failures human-readable, and `GOLDEN_UPDATE=1` refreshes both after a deliberate change. `test/integration/render-tui.sh` turns any such `.ans` capture into a reproducible PNG via the new `cmd/tui-render` (a pure-Go renderer, `golang.org/x/image`, with a pinned/sha256-verified monospace font) — the canonical way to produce TUI screenshots for the site going forward. See ADR 0039.
- **AlmaLinux 9/10 and Rocky 10 join the supported matrix**, alongside a `pkgmgr.Family` refactor (`FamilyDebian` / `FamilyRHEL`) that dispatches every package-manager command by family instead of by individual distro — adding a distro to an existing family is now one `Distro` constant plus one `Family` mapping entry. Docker/Podman install and the docker-rootless refusal in `internal/core` now dispatch the same way; the docker-rootless refusal wording generalises from "on Rocky 9" to "on the RHEL family (Rocky, AlmaLinux)" — it remains unimplemented by design (ADR 0040). Existing Debian/Ubuntu/Rocky behaviour is unchanged byte-for-byte.
- **Ubuntu 22.04 LTS and 26.04 LTS join the supported matrix**, riding the same `pkgmgr.Family` dispatch the AlmaLinux/Rocky work above introduced: no product-code change was needed, since the Debian-family apt path covers both releases as-is. The two new test images follow the existing ubuntu-24.04 pattern (official multi-arch bases, self-built systemd per ADR 0023). With this release the tested container matrix reaches eight images across four distro families (ADR 0040's "core on features, full matrix on release-prep" run policy, `docs/RELEASING.md`). Note the horizon: 22.04's standard support ends 2027-04 — it becomes a removal candidate then.
Changed
- `GiteaInspection`/`RunnerInspection` (used internally by install/upgrade/register/reconfigure) gained an `Active *bool` field reporting the live unit's `IsActive` state.
v1.3.2
2026-07-23
Fixed
- **HTTPS installs now set `[server] LOCAL_ROOT_URL`, fixing ssh pushes on Gitea 1.27+.** `gitea serv` (spawned per SSH request) calls Gitea's internal API through `LOCAL_ROOT_URL`; left unset it defaults to `https://localhost:<port>/`, and an https-acme or https-manual certificate is bound to the real domain, not `localhost` — that internal TLS handshake then fails and `git push`/`pull` over SSH die with "Internal Server Connection Error" (Gitea 1.26 tolerated the mismatch; 1.27 tightened the internal TLS path). Found live in production after a 1.26.4 → 1.27.0 upgrade on an https-direct/ACME host. `gitea install --serving https-acme|https-manual` and `gitea enable-https` now write `LOCAL_ROOT_URL` equal to `ROOT_URL` automatically; `behind-proxy` installs are untouched (Gitea's own `http://localhost:3000` default there is already correct). `gtcnsl doctor` gained a WARN-level probe (never FAIL) for existing https installs it did not touch, naming the fix: `gtcnsl config set server.LOCAL_ROOT_URL <ROOT_URL> --yes`.
- **`gtcnsl backup` no longer fails outright on a runner-only host.** A host that only carries `gitea-runner` (no Gitea installed at all — a real, common shape for a dedicated runner box) used to fail with "core: /usr/local/bin/gitea is required for a backup but is missing". The Gitea binary and `app.ini` are now required only when a live Gitea install is actually detected on this host; if it is not, they are skipped with a warning, the same way runner items already were when Gitea was present but the runner was not. A host where neither Gitea nor a runner is detected still fails, with a clear "nothing to back up on this host" message, instead of writing an empty backup. `gtcnsl restore` gained the symmetric fix: restoring a runner-only backup no longer stops, starts, or health-checks `gitea.service` — on a runner-only host that unit is typically not even installed.
v1.3.1
2026-07-23
Changed
- README's install snippet points at the current release instead of v1.2.1.
Fixed
- **The release workflow now guards its own inputs.** A release published with a tag missing the leading `v` (the way the first v1.3.0 attempt was) used to sail through the build and die at the mirror step with an opaque `405` — it now fails in seconds, before anything is published, with a message that spells out the recovery (delete the release and tag, re-create with `vX.Y.Z`; re-running the job cannot fix a bad tag). A YAML syntax slip in that very guard, which briefly rendered the workflow file invalid, is fixed too.
v1.3.0
2026-07-18