Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

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.

Publish signed pacman repositories with each release

fbdb3818bc53560d022234c741c539e59c82bc41 · Keenan Nemetz · 14d ago · parent fd86ba87

Publish signed pacman repositories with each release

Build Arch packages with the same nfpm contents, publish one pacman database per architecture, and sign the packages and databases with the release key. repo-add stamps tar entries from the clock, so the databases are repacked with the tag time before signing. The maintainer script becomes post_install/post_upgrade bodies, so it no longer exits the shell. Document pacman-key, SigLevel, installation, and upgrades, and build and verify the Arch tree in CI.

RELEASING.md +26−10

@@ -9,10 +9,15 @@ development setup and verification, see [DEVELOPMENT.md](DEVELOPMENT.md).
9 9
10 10 `.vole/workflows/release.yaml` runs on annotated `v*` tags. It tests and scans
11 11 the tagged source, cross-compiles Linux binaries for both architectures, builds
12 packages with [nfpm](https://nfpm.goreleaser.com), signs the RPMs, writes the apt
13 and yum repositories those packages need, signs the repository metadata and the
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
14 15 checksum list, generates an SBOM, and attaches the results to the tag's release.
15 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
16 21 The job requires bridge networking to download Go modules and pinned build
17 22 tools, and the `RELEASE_GPG_KEY` repository secret. Cross-compilation means any
18 23 trusted Linux runner with the required image can produce both architectures.
@@ -106,19 +111,22 @@ script rather than producing a release that clients reject.
106 111 A Vole release includes:
107 112
108 113 - `vole-linux-amd64` and `vole-linux-arm64`;
109 - Debian and RPM packages for both architectures, at the release root;
114 - Debian, RPM, and Arch packages for both architectures, at the release root;
110 115 - `apt/` — a flat Debian repository: the packages, `Packages`,
111 116 `Packages.gz`, `Release`, `InRelease`, and `Release.gpg`;
112 117 - `apt/vole.gpg` — the public key as a binary keyring for `signed-by=`;
113 118 - `yum/` — an RPM repository: the packages, `repodata/`, and
114 119 `repodata/repomd.xml.asc`;
115 120 - `yum/RPM-GPG-KEY-vole` — the public key for `rpm --import`;
121 - `pacman/x86_64/` and `pacman/aarch64/` — one Arch repository per
122 architecture: the package, its `.sig`, `vole.db`, `vole.files`, and the two
123 database signatures;
116 124 - `vole-release-key.asc` and `vole-release-key.fingerprint` at the release root;
117 125 - `vole-<version>.sbom.cdx.json` in CycloneDX JSON;
118 126 - `SHA256SUMS` and its detached signature `SHA256SUMS.asc`.
119 127
120 `SHA256SUMS` covers every other attached file, including both repository trees,
121 the public key, and the signatures. It cannot cover its own signature, so
128 `SHA256SUMS` covers every other attached file, including all three repository
129 trees, the public key, and the signatures. It cannot cover its own signature, so
122 130 `SHA256SUMS.asc` is written after the list and excluded from it.
123 131
124 132 The SBOM lists linked Go modules, their versions and `go.sum` hashes, the Go
@@ -141,6 +149,11 @@ commit time. The repository metadata is pinned the same way: `Release`,
141 149 `Packages.gz`, and `repomd.xml` carry the tag commit time, and the copied
142 150 packages get that mtime so createrepo_c records it as each package's file time.
143 151
152 `repo-add` stamps pacman database entries with the clock, so
153 `scripts/build-package-repos.py` rewrites `vole.db` and `vole.files` with the tag
154 commit time, no owner names, sorted entries, and no gzip timestamp. Signing the
155 packages before `repo-add` records the same `%PGPSIG%` in every build.
156
144 157 Signatures are pinned too, as far as the tools allow. GnuPG and `rpmsign` are
145 158 given the tag commit time through `--faked-system-time` (for `rpmsign`, through
146 159 its `%_gpg_sign_cmd_extra_args` macro), so rebuilding one tag with the same key
@@ -167,21 +180,24 @@ release to change. Clients then use:
167 180 ```text
168 181 https://rodent.software/vole/channels/stable/apt
169 182 https://rodent.software/vole/channels/stable/yum
183 https://rodent.software/vole/channels/stable/pacman/$arch
170 184 https://rodent.software/vole/channels/stable/vole-release-key.asc
171 185 ```
172 186
173 187 Apt verifies `InRelease` (or `Release` plus `Release.gpg`) and the hashes in it.
174 Dnf verifies `repomd.xml.asc` and, with `gpgcheck=1`, each RPM. The public key is
188 Dnf verifies `repomd.xml.asc` and, with `gpgcheck=1`, each RPM. Pacman verifies
189 `vole.db`/`vole.files` and each package's detached `.sig`. The public key is
175 190 served from the same channel for convenience; compare its fingerprint with the
176 191 committed key at `packaging/keys/vole-release.asc` before trusting it.
177 192
178 193 ## Package verification in CI
179 194
180 195 `.vole/workflows/verify.yaml` builds and packages one architecture on every
181 branch push using the same `packaging/nfpm.yaml`, builds the apt and yum
182 metadata from those packages, signs them with a throwaway key generated inside
183 the job, and verifies the signatures with the exported public key. Definition,
184 path, metadata, signature, and unit errors therefore fail before a release tag.
196 branch push using the same `packaging/nfpm.yaml`, builds the apt, yum, and
197 pacman metadata from those packages, signs them with a throwaway key generated
198 inside the job, and verifies the signatures with the exported public key.
199 Definition, path, metadata, signature, and unit errors therefore fail before a
200 release tag.
185 201 `scripts/check-deploy.py` also renders and validates the cloud-init deployment
186 202 files.
187 203