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 apt and yum repositories with each release

73e98b74cf29c19adeeef3b4a277016838c3debe · Keenan Nemetz · 15d ago · parent eee732ec

Publish apt and yum repositories with each release

A release tree and a channel give one stable URL, but apt needs a flat Packages/Release repository and dnf needs repodata. Build both from the release packages, attach the dist tree so they sit under apt/ and yum/, cover the metadata in SHA256SUMS, and document installing and upgrading from the stable channel.

RELEASING.md +59−13

@@ -1,16 +1,17 @@
1 1 # Releasing Vole
2 2
3 This maintainer guide describes how Vole's own binaries, packages, checksums,
4 and SBOM are produced. For creating a release in a repository hosted by Vole,
5 see [Releases](docs/releases.md). For development setup and verification, see
6 [DEVELOPMENT.md](DEVELOPMENT.md).
3 This maintainer guide describes how Vole's own binaries, packages, package
4 repositories, checksums, and SBOM are produced. For creating a release in a
5 repository hosted by Vole, see [Releases](docs/releases.md). For development
6 setup and verification, see [DEVELOPMENT.md](DEVELOPMENT.md).
7 7
8 8 ## How the release is built
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), generates an SBOM, writes
13 `SHA256SUMS`, and attaches the results to the tag's release.
12 packages with [nfpm](https://nfpm.goreleaser.com), writes the apt and yum
13 repositories those packages need, generates an SBOM, writes `SHA256SUMS`, and
14 attaches the results to the tag's release.
14 15
15 16 The job requires bridge networking to download Go modules and pinned build
16 17 tools. Cross-compilation means any trusted Linux runner with the required image
@@ -28,14 +29,29 @@ publish artifacts. The version comes from
28 29 `git describe --tags --exact-match`; an untagged checkout stops before building.
29 30 Build outputs use the tag commit time to support byte-for-byte reproduction.
30 31
32 To build the package repositories from packages you already have:
33
34 ```sh
35 python3 scripts/build-package-repos.py --dist dist --version 0.2.0 \
36 --epoch "$(git log -1 --format=%ct)"
37 ```
38
39 The script writes `dist/apt/` and `dist/yum/` beside the packages. It needs
40 `dpkg-scanpackages` from dpkg-dev and `createrepo_c` from createrepo-c, which
41 both workflow images carry.
42
31 43 ## Release contents and SBOM
32 44
33 45 A Vole release includes:
34 46
35 47 - `vole-linux-amd64` and `vole-linux-arm64`;
36 - Debian and RPM packages for both architectures;
48 - Debian and RPM packages for both architectures, at the release root;
49 - `apt/` — a flat Debian repository: the packages, `Packages`,
50 `Packages.gz`, and `Release` with checksums of both;
51 - `yum/` — an RPM repository: the packages and `repodata/`, including
52 `repomd.xml`;
37 53 - `vole-<version>.sbom.cdx.json` in CycloneDX JSON;
38 - `SHA256SUMS` covering every attached artifact.
54 - `SHA256SUMS` covering every attached file, including both repository trees.
39 55
40 56 The SBOM lists linked Go modules, their versions and `go.sum` hashes, the Go
41 57 toolchain, and detected license evidence. One SBOM covers both architectures
@@ -51,14 +67,44 @@ go run github.com/CycloneDX/cyclonedx-gomod/cmd/cyclonedx-gomod@v1.9.0 \
51 67 ```
52 68
53 69 The release workflow replaces the tool's wall-clock timestamp with the tag
54 commit time so rebuilding one tag produces the same SBOM.
70 commit time so rebuilding one tag produces the same SBOM. The repository
71 metadata is pinned the same way: `Release`, `Packages.gz`, and `repomd.xml`
72 carry the tag commit time, and the copied packages get that mtime so
73 createrepo_c records it as each package's file time.
74
75 ## Publish the package repositories
76
77 Attaching the files is not enough for a package manager: the client needs a URL
78 that keeps working across upgrades. Vole's own release follows the `stable`
79 channel. After the release workflow finishes, move it to the new tag:
80
81 ```sh
82 vole release channel set stable v0.2.0 -m "Recommended for production"
83 ```
84
85 While the channel names a release, that release cannot be edited. Pointing the
86 channel at the next tag is both the publish step and what allows the old
87 release to change. Clients then use:
88
89 ```text
90 https://rodent.software/vole/channels/stable/apt
91 https://rodent.software/vole/channels/stable/yum
92 ```
93
94 Vole does not sign release artifacts, so these are unsigned repositories. The
95 `Release` and `repomd.xml` checksums detect a corrupted download, and HTTPS
96 authenticates the host, but neither proves who built a package. Signing the
97 repositories and packages is tracked in
98 [the signing issue](https://rodent.software/vole/issues/01M7R3T8991225YWK3SP88NS99).
55 99
56 100 ## Package verification in CI
57 101
58 102 `.vole/workflows/verify.yaml` builds and packages one architecture on every
59 branch push using the same `packaging/nfpm.yaml`. Definition, path, and unit
60 errors therefore fail before a release tag. `scripts/check-deploy.py` also
61 renders and validates the cloud-init deployment files.
103 branch push using the same `packaging/nfpm.yaml`, then builds the apt and yum
104 metadata from those packages. Definition, path, metadata, and unit errors
105 therefore fail before a release tag. `scripts/check-deploy.py` also renders and
106 validates the cloud-init deployment files.
62 107
63 108 See [Packages and upgrades](docs/packaging.md) for the paths and systemd units
64 the packages install.
109 the packages install, and [Install](docs/install.md#install-from-the-package-repository)
110 for the client commands.