vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
| 1 | # Releasing Vole |
| 2 | |
| 3 | This maintainer guide describes how Vole's own binaries, packages, package |
| 4 | repositories, signatures, checksums, and SBOM are produced. For creating a |
| 5 | release in a repository hosted by Vole, see [Releases](docs/releases.md). For |
| 6 | development setup and verification, see [DEVELOPMENT.md](DEVELOPMENT.md). |
| 7 | |
| 8 | ## How the release is built |
| 9 | |
| 10 | `.vole/workflows/release.yaml` runs on annotated `v*` tags. It tests and scans |
| 11 | the tagged source, cross-compiles Linux binaries for both architectures, builds |
| 12 | Debian, RPM, and Arch packages with [nfpm](https://nfpm.goreleaser.com), signs |
| 13 | the RPMs and Arch packages, writes the apt, yum, and per-architecture pacman |
| 14 | repositories those packages need, signs the repository metadata and the |
| 15 | checksum list, generates an SBOM, and attaches the results to the tag's release. |
| 16 | |
| 17 | Arch's `pkgver` cannot carry a semver hyphen, so the workflow passes |
| 18 | `0.1.0rc2` to the Arch packager where Debian and RPM receive `0.1.0-rc2`. The |
| 19 | resulting package is `vole-0.1.0rc2-1-x86_64.pkg.tar.zst`. |
| 20 | |
| 21 | The job requires bridge networking to download Go modules and pinned build |
| 22 | tools, and the `RELEASE_GPG_KEY` repository secret. Cross-compilation means any |
| 23 | trusted Linux runner with the required image can produce both architectures. |
| 24 | |
| 25 | Reproduce the commands from a tagged checkout: |
| 26 | |
| 27 | ```sh |
| 28 | git switch --detach v0.2.0 |
| 29 | go run ./cmd/vole workflow run release |
| 30 | ``` |
| 31 | |
| 32 | A local workflow run checks the build in the defined container but does not |
| 33 | publish artifacts. It reads `RELEASE_GPG_KEY` from the instance like a runner |
| 34 | does; when the secret is not available it leaves the tree unsigned and says so. |
| 35 | A pushed tag without the secret fails rather than publishing an unsigned |
| 36 | release. The version comes from `git describe --tags --exact-match`; an untagged |
| 37 | checkout stops before building. A build from an untagged checkout reports the |
| 38 | commit Go recorded instead of claiming a release. Build outputs use the tag |
| 39 | commit time to support byte-for-byte reproduction. |
| 40 | |
| 41 | To build and sign the package repositories from packages you already have: |
| 42 | |
| 43 | ```sh |
| 44 | epoch="$(git log -1 --format=%ct)" |
| 45 | python3 scripts/sign-release.py packages --dist dist --epoch "$epoch" |
| 46 | python3 scripts/build-package-repos.py --dist dist --version 0.2.0 --epoch "$epoch" |
| 47 | python3 scripts/sign-release.py repositories --dist dist --epoch "$epoch" |
| 48 | ( cd dist && find . -type f ! -name SHA256SUMS ! -name SHA256SUMS.asc \ |
| 49 | -printf '%P\0' | sort -z | xargs -0 sha256sum > SHA256SUMS ) |
| 50 | python3 scripts/sign-release.py sums --dist dist --epoch "$epoch" |
| 51 | ``` |
| 52 | |
| 53 | `sign-release.py` reads the armored private key from `RELEASE_GPG_KEY`, or from |
| 54 | `--key-file` for a local test. It needs GnuPG and `rpm`/`rpmsign`; |
| 55 | `build-package-repos.py` needs `dpkg-scanpackages` from dpkg-dev and |
| 56 | `createrepo_c` from createrepo-c. Both workflow images carry them. |
| 57 | |
| 58 | ## The release key |
| 59 | |
| 60 | The private key is a repository secret named `RELEASE_GPG_KEY`. The public half |
| 61 | is committed at `packaging/keys/vole-release.asc`; the signing script refuses to |
| 62 | sign when that file is missing or does not match the secret's fingerprint. That |
| 63 | check makes a stale or uncommitted key a failure instead of a release that |
| 64 | verifies against nothing. |
| 65 | |
| 66 | Create the key once, on a trusted machine: |
| 67 | |
| 68 | ```sh |
| 69 | export GNUPGHOME="$(mktemp -d)" |
| 70 | chmod 700 "$GNUPGHOME" |
| 71 | gpg --batch --passphrase '' --quick-generate-key \ |
| 72 | 'Vole Release <release@rodent.software>' rsa4096 sign 5y |
| 73 | gpg --batch --armor --export > vole-release.asc |
| 74 | gpg --batch --armor --export-secret-keys > vole-release.private.asc |
| 75 | gpg --list-keys --with-fingerprint |
| 76 | ``` |
| 77 | |
| 78 | Store the private key on the instance, where a job reads it through the secret |
| 79 | named in its workflow: |
| 80 | |
| 81 | ```sh |
| 82 | vole secret set vole RELEASE_GPG_KEY --from-file vole-release.private.asc |
| 83 | ``` |
| 84 | |
| 85 | Keep an offline copy of `vole-release.private.asc`; `vole secret get vole |
| 86 | RELEASE_GPG_KEY` can read the stored copy as a maintainer, but a single copy is |
| 87 | not a backup. Remove the temporary file and GnuPG home afterwards, then commit |
| 88 | the public half: |
| 89 | |
| 90 | ```sh |
| 91 | shred -u vole-release.private.asc |
| 92 | rm -rf "$GNUPGHOME" |
| 93 | install -D -m 0644 vole-release.asc packaging/keys/vole-release.asc |
| 94 | ``` |
| 95 | |
| 96 | The key has no passphrase. The secret store is the only protection a build job |
| 97 | can use, and a passphrase stored in the same instance would be delivered to the |
| 98 | same job, so it would protect nothing against a compromised runner or instance. |
| 99 | A passphrase would only help an offline copy, so protect the backup instead. |
| 100 | Anyone who can control a trusted runner or read this repository's secrets can |
| 101 | sign a release; that is the same trust the rest of CI already requires. |
| 102 | |
| 103 | Rotation is a change of its own: generate a new key, commit its public half in |
| 104 | the same change that replaces the secret, and tell clients to replace their |
| 105 | keyring. A release rebuilt from an old tag after a rotation carries the new |
| 106 | signature, not the old one. The key recipe above expires after five years; sign |
| 107 | before then, and rotate before expiry. An expired key fails in the signing |
| 108 | script rather than producing a release that clients reject. |
| 109 | |
| 110 | ## Release contents and SBOM |
| 111 | |
| 112 | A Vole release includes: |
| 113 | |
| 114 | - `vole-linux-amd64` and `vole-linux-arm64`, `vole-darwin-amd64` and |
| 115 | `vole-darwin-arm64`, and `vole-windows-amd64.exe`; |
| 116 | - `vole-windows-amd64.msi`, the Windows package, for stable tags only: an MSI |
| 117 | version cannot carry a pre-release suffix, and `wixl` cannot express the |
| 118 | same-version upgrade a pre-release needs. Pre-release tags ship the Windows |
| 119 | binary alone, and `install.ps1` says so; |
| 120 | - `install.sh` and `install.ps1`, the one-command installers, and |
| 121 | `vole-darwin-sshd.conf`, the macOS front-door drop-in; |
| 122 | - Debian, RPM, and Arch packages for both architectures, at the release root; |
| 123 | - `apt/` — a flat Debian repository: the packages, `Packages`, |
| 124 | `Packages.gz`, `Release`, `InRelease`, and `Release.gpg`; |
| 125 | - `apt/vole.gpg` — the public key as a binary keyring for `signed-by=`; |
| 126 | - `yum/` — an RPM repository: the packages, `repodata/`, and |
| 127 | `repodata/repomd.xml.asc`; |
| 128 | - `yum/RPM-GPG-KEY-vole` — the public key for `rpm --import`; |
| 129 | - `pacman/x86_64/` and `pacman/aarch64/` — one Arch repository per |
| 130 | architecture: the package, its `.sig`, `vole.db`, `vole.files`, and the two |
| 131 | database signatures; |
| 132 | - `vole-release-key.asc` and `vole-release-key.fingerprint` at the release root; |
| 133 | - `vole-<version>.sbom.cdx.json` in CycloneDX JSON; |
| 134 | - `SHA256SUMS` and its detached signature `SHA256SUMS.asc`. |
| 135 | |
| 136 | `SHA256SUMS` covers every other attached file, including all three repository |
| 137 | trees, the public key, and the signatures. It cannot cover its own signature, so |
| 138 | `SHA256SUMS.asc` is written after the list and excluded from it. |
| 139 | |
| 140 | The SBOM lists linked Go modules, their versions and `go.sum` hashes, the Go |
| 141 | toolchain, and detected license evidence. One SBOM covers every architecture and |
| 142 | both operating systems, because they share a module graph. SQLite is part of |
| 143 | that graph: the driver compiles it in, so the SBOM names the engine version the |
| 144 | binaries actually run, and no part of the database comes from the host. |
| 145 | |
| 146 | To regenerate the SBOM from a tag: |
| 147 | |
| 148 | ```sh |
| 149 | go run github.com/CycloneDX/cyclonedx-gomod/cmd/cyclonedx-gomod@v1.9.0 \ |
| 150 | app -json -noserial -std -licenses -main cmd/vole -output SBOM.cdx.json . |
| 151 | ``` |
| 152 | |
| 153 | ## Reproducibility |
| 154 | |
| 155 | The release workflow replaces the SBOM tool's wall-clock timestamp with the tag |
| 156 | commit time. The repository metadata is pinned the same way: `Release`, |
| 157 | `Packages.gz`, and `repomd.xml` carry the tag commit time, and the copied |
| 158 | packages get that mtime so createrepo_c records it as each package's file time. |
| 159 | |
| 160 | `repo-add` stamps pacman database entries with the clock, so |
| 161 | `scripts/build-package-repos.py` rewrites `vole.db` and `vole.files` with the tag |
| 162 | commit time, no owner names, sorted entries, and no gzip timestamp. Signing the |
| 163 | packages before `repo-add` records the same `%PGPSIG%` in every build. |
| 164 | |
| 165 | Signatures are pinned too, as far as the tools allow. GnuPG and `rpmsign` are |
| 166 | given the tag commit time through `--faked-system-time` (for `rpmsign`, through |
| 167 | its `%_gpg_sign_cmd_extra_args` macro), so rebuilding one tag with the same key |
| 168 | produces the same signed files. GnuPG refuses a signature time before the key |
| 169 | was created, so the time used is the later of the tag commit time and the key's |
| 170 | creation time. The first releases signed by a fresh key therefore carry the key |
| 171 | creation time, not an earlier commit time. A key that has expired at the signing |
| 172 | time is an error. |
| 173 | |
| 174 | ## Publish the package repositories |
| 175 | |
| 176 | Attaching the files is not enough for a package manager: the client needs a URL |
| 177 | that keeps working across upgrades. Vole's own release follows the `stable` |
| 178 | channel. After the release workflow finishes, move it to the new tag: |
| 179 | |
| 180 | ```sh |
| 181 | vole release channel set stable v0.2.0 -m "Recommended for production" |
| 182 | ``` |
| 183 | |
| 184 | While the channel names a release, that release cannot be edited. Pointing the |
| 185 | channel at the next tag is both the publish step and what allows the old |
| 186 | release to change. Clients then use: |
| 187 | |
| 188 | ```text |
| 189 | https://rodent.software/vole/channels/stable/apt |
| 190 | https://rodent.software/vole/channels/stable/yum |
| 191 | https://rodent.software/vole/channels/stable/pacman/$arch |
| 192 | https://rodent.software/vole/channels/stable/vole-release-key.asc |
| 193 | https://rodent.software/vole/channels/stable/install.sh |
| 194 | ``` |
| 195 | |
| 196 | Apt verifies `InRelease` (or `Release` plus `Release.gpg`) and the hashes in it. |
| 197 | Dnf verifies `repomd.xml.asc` and, with `gpgcheck=1`, each RPM. Pacman verifies |
| 198 | `vole.db`/`vole.files` and each package's detached `.sig`. The public key is |
| 199 | served from the same channel for convenience; compare its fingerprint with the |
| 200 | committed key at `packaging/keys/vole-release.asc` before trusting it. |
| 201 | |
| 202 | The release attaches `install.sh` beside the key. It is the one-command client |
| 203 | for the channel: it detects the distribution, writes the same key and source |
| 204 | lines the install docs show, and hands the install to the package manager. On |
| 205 | macOS it installs the release binary into `/usr/local/bin` as root or |
| 206 | `~/.local/bin` otherwise, after checking it against the release's `SHA256SUMS`, |
| 207 | and it refuses when Homebrew already owns `vole`. It pins the committed key's |
| 208 | SHA-256 and fingerprint in `packaging/install.sh`, and |
| 209 | the release publishes that committed file verbatim so the pin is exact. Rotating |
| 210 | the release key therefore means updating both constants in the same change; |
| 211 | `scripts/check-install.sh` fails when they disagree. |
| 212 | |
| 213 | ## Package verification |
| 214 | |
| 215 | Branch CI (`.vole/workflows/verify.yaml`) does not build the packages, the |
| 216 | repository metadata, or the signatures. Those are release-path steps, they are |
| 217 | slow, and they only run on a tag. `scripts/check-install.sh` and |
| 218 | `scripts/check-deploy.py` stay in verify because they are shell-only checks of |
| 219 | files a release consumes: the installer's pinned key, and the cloud-init |
| 220 | deployment files. |
| 221 | |
| 222 | To exercise the release path without publishing anything, run the release |
| 223 | workflow against a tagged checkout: |
| 224 | |
| 225 | ```sh |
| 226 | git switch --detach v0.2.0 |
| 227 | vole workflow run release |
| 228 | ``` |
| 229 | |
| 230 | It runs the build in the release image and uploads nothing. With |
| 231 | `RELEASE_GPG_KEY` available it signs; without it, it leaves the tree unsigned |
| 232 | and says so. That is the manual smoke test for package, repository, signature, |
| 233 | and unit errors before a tag is pushed. |
| 234 | |
| 235 | See [Deploy on Linux](docs/deploy/linux.md#what-the-package-installs) for the paths and systemd units |
| 236 | the packages install, and [Install](docs/install.md#add-the-repository-by-hand) |
| 237 | for the client commands. |
| 238 | |
| 239 | ## Windows sign-off |
| 240 | |
| 241 | CI runs every job in a Linux container, so no release has installed the Windows |
| 242 | MSI or run the service. `wixl` on Linux builds the package but cannot exercise |
| 243 | it, and the MSI is not Authenticode-signed yet, so a packaging mistake would ship |
| 244 | to Windows users undetected. |
| 245 | |
| 246 | Before a release that carries the MSI is published, install it on a Windows |
| 247 | machine and check: |
| 248 | |
| 249 | - `msiexec /i vole-windows-amd64.msi /l*v install.log` exits 0, the `Vole` |
| 250 | service reports `Running`, and the Application event log has no error under |
| 251 | source `Vole`; |
| 252 | - `%ProgramData%\Vole\vole.toml` exists, the data directory exists, and the |
| 253 | service account, `SYSTEM`, and `Administrators` are the only entries in both |
| 254 | access lists; |
| 255 | - HTTP answers on the configured address, the admin CLI works over the SSH |
| 256 | listener, and a clone and push succeed; |
| 257 | - a reboot brings the forge back without a login; |
| 258 | - installing the MSI over the previous release upgrades it: one Programs and |
| 259 | Features entry, the service running, the configuration and data untouched; |
| 260 | - uninstalling removes the service and `%ProgramFiles%\Vole` and leaves |
| 261 | `%ProgramData%\Vole` in place. |
| 262 | |
| 263 | Do not publish a Windows MSI that has not passed this check. |
| 264 | |
| 265 | ## macOS sign-off |
| 266 | |
| 267 | CI runs every job in a Linux container, so a release has never executed the test |
| 268 | suite on macOS. The macOS binaries (`vole-darwin-amd64` and `vole-darwin-arm64`) |
| 269 | are compiled by the release but not exercised by it, so a platform mistake in a |
| 270 | server path, a socket, or a client check would ship to users undetected. |
| 271 | |
| 272 | Before a release that carries a macOS binary is published, run the macOS check on |
| 273 | a Mac: |
| 274 | |
| 275 | ```sh |
| 276 | scripts/check-macos.sh |
| 277 | ``` |
| 278 | |
| 279 | It runs the unit suite and an end-to-end pass over the features a Mac user first |
| 280 | touches: init, account and repository creation, clone and push over the built-in |
| 281 | SSH listener, an issue, a change request, a release attach, a pages site, and |
| 282 | `db check`/`db backup`. Do not publish a macOS artifact that has not passed this |
| 283 | check. See [Development](DEVELOPMENT.md) for the individual commands it runs. |
| 284 |