Add apt publishing framework to release tool [master]#11915
Merged
danudey merged 10 commits intoFeb 28, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds initial apt repository publishing support to the release tool by introducing an aptrepo package (Reprepro config generation, deb scanning, and .sources file generation) plus supporting utilities/templates.
Changes:
- Add
release/internal/aptrepopackage to generate Reprepro config, include.deb/.ddebfiles, and emit deb822.sourcesfiles. - Add GPG public key export helper and filesystem/binary presence helpers.
- Update
release/Makefilebuild dependencies to include.gotmpltemplates.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| release/internal/utils/utils.go | Adds a new branding/company constant for use in freeform fields. |
| release/internal/utils/gpg.go | Adds helper to export ASCII-armored GPG public key via gpg. |
| release/internal/utils/files.go | Adds path/dir existence helpers and a PATH binary check helper. |
| release/internal/aptrepo/reprepro-conf.gotmpl | Template for Reprepro distributions configuration. |
| release/internal/aptrepo/repo.sources.gotmpl | Template for deb822 .sources files. |
| release/internal/aptrepo/repo.go | Core repo object: config writing, reprepro execution, package inclusion, sources generation. |
| release/internal/aptrepo/apt.go | Deb scanning and suite derivation; .sources file writing and GPG key formatting. |
| release/Makefile | Ensures .gotmpl changes trigger rebuilding bin/release. |
alexh-tigera
approved these changes
Feb 25, 2026
radTuti
approved these changes
Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an initial framework for generating and publishing apt repositories. It will likely require some tweaks down the road, but the core is functional at this point.
Features
repreproto generate the repository from a list of packages, creating separate repos for each suite.a. Sets a friendly and descriptive
X-Repolib-Namefor each repository, in case a user is using repolib to manage their sourcesb. Sets the release's 'Origin' and 'Label' so that end users can filter or prioritize packages in their
apt.preferences.dc. Generates a
<suite>.sourcesfile using the provided information, which includes the public GPG key specified inline so that users don't need to download, store, convert, and manage a separate key file. This also makes it easier for us to change GPG keys down the road or use separate GPG keys for separate repos.d. Generates a
Contentsfile so that users can useapt-fileto search or list the contents of packages before installing them.Example sources file
The pre-generated sources files will look similar to this, depending on the parameters given to
AptRepo. This uses the new(ish) deb822 format, which is supported on Debian Bookworm and Ubuntu Jammy (the oldest versions we support) and is the default on Debian Trixie and Ubuntu Noble (the latest versions). This is a much more easily readable and configurable format than the previoussources.listfile format, and allows us to include the public GPG key inline so that users don't have to acquire and manage it separately.Example Releases file
The Releases file is generated as an index for apt, but it also includes metadata that end-users can use to configure which package apt installs from where, filtering by Label or Origin in case that becomes necessary.