Repository navigation
feat(packaging): leave the package repositories dormant, unpublished (#138) - #491
Merged
Merged
Conversation
…138) The repositories are built, signed, and installed from in three containers on every pull request, and they are not published. Publishing one means holding a signing key: apt refuses an unsigned repository outright, and dnf's gpgcheck is on by default, so an unsigned repository is not a lesser version of a signed one but a repository nothing can install from. A key then has to be rotated for as long as anyone has the repository configured, and one gone stale is worse for those machines than no repository was. Hosting was never the obstacle and the code is written; the key is what is not worth taking on. Packages ship attached to each release, unsigned, with a published SHA-256 per asset. release.yml no longer exits 1 without GPG_SIGNING_KEY -- that refusal protected users of a repository who do not exist, while blocking every release. It warns and skips, and then asserts the packages really are unsigned, because no-secret and key-never-reached-nfpm produce identical green runs and the second is a defect this repository has already shipped once. Five documented one-liners are gone from README.md, docs/index.md, web/index.html and both docs-platform pages, along with the signing-key section they linked to. The scripts are still served, so the command ran, reached a signing key that 404s, and failed there. TestTheDormantRepositoriesAreNotDocumented walks the tree and fails on any page naming a repository address -- a one-way gate to delete on the day one is published. Turning it on is a repository secret and nothing else.
All four cells run in rockylinux:9 rather than reasoned about, because three of the four exit 0 and only the output text separates them. The measurement also shows the unsigned branch's "signatures OK" case is unreachable: rpm reports a signature it cannot verify as rc=1 with SIGNATURES NOT OK, so the exit status catches it first. Kept and explained rather than deleted -- it asserts "no signature", which a future rpm treating an unknown-key signature as success would otherwise walk past.
Owner
Author
The
|
| package | keyring | rc |
output | branch release.yml takes |
|---|---|---|---|---|
| unsigned | empty | 0 | digests OK |
accepts — unsigned as intended |
| signed | empty | 1 | digests SIGNATURES NOT OK |
errors: corrupt, or signed by a key this workflow did not import |
| signed | has the key | 0 | digests signatures OK |
accepts |
| unsigned | has the key | 0 | digests OK |
errors: "verified digests but carries no signature" — the original defect |
Two things worth recording from this:
- The signed-with-empty-keyring case is caught by
rc, not by the text. rpm reports it as exit 1
withSIGNATURES NOT OK, which is not thesignatures OKpattern and is not matched by it. The text
case for it is therefore unreachable today; it is kept and now commented as such, because what it
asserts is "no signature", and a future rpm that treated an unknown-key signature as a success would
otherwise walk past. - The first run of this probe proved nothing about the signed half and said so:
rpm --addsign
failed silently withoutrpm-signinstalled, so the "signed" file was a byte-identical copy and both
rows reporteddigests OK. The second run installsrpm-sign, checksaddsignexited 0, and
cmps the two files to confirm the signature actually changed the package before drawing any
conclusion from it.
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.
Why
release.ymlrefused to build a release withoutsecrets.GPG_SIGNING_KEY, so v0.14.0 could not becut. Rather than create a signing key, the decision is to leave the package repositories dormant.
The key is not a release-tooling artifact and no release tool removes the need for it. goreleaser —
which handles this in other projects — does not create or generate GPG keys; it signs with a key
you supply, its defaults are archives plus
checksums.txtand nosigns:block at all (which is whya key never came up elsewhere), and it generates no apt or yum repository metadata in the OSS
version. Its hosted-repository answer is
furies:/Gemfury, which is Pro-only.The key exists solely because of a self-hosted repository:
apt updaterefuses an unsignedrepository and accepts one only when marked
[trusted=yes], which turns authenticity off, andgpgcheckis dnf's default. An unsigned repository is not a lesser version of a signed one — it is arepository nothing can install from. Publishing means holding a key and rotating it for as long as
anyone has the repository configured, and a key gone stale is worse for those machines than no
repository was, because it leaves a trusted signer behind. Hosting was never the obstacle (~33 MB per
release against Pages' 1 GB cap) and the code is written and verified. The key is what is not worth
taking on.
What changed
release.ymlno longer blocks. The absent-key branch warns andexit 0s instead ofexit 1.That refusal protected users of a repository who do not exist, while blocking every release.
The unsigned state is asserted, not skipped. Two things produce an unsigned rpm — no secret, and a
secret that was imported and never reached nfpm (which happened: a
$GITHUB_ENVwrite applies tosubsequent steps, so
make package-linuxin the same step saw neither variable, and nfpm reads anunset
key_fileas "do not sign"). Both are four packages and a green run. So the branch is chosen bywhether a key was imported and each branch insists on the state it implies. Measured in
rockylinux:9rather than assumed: an unsigned rpm against an empty keyring exits 0 with
digests OK.Also fixed there: the build step read
"$GNUPGHOME/pass"wheneverGPG_PASSPHRASEwas set, and$GNUPGHOMEcomes from the import step that now skips itself — two independent secrets, so apassphrase without a key would have killed the step under
set -u.Five surfaces stop documenting the one-liners —
README.md,docs/index.md,web/index.htmlandboth
docs-platformpages — along with the signing-key section they linked to. The scripts are stillserved, so
curl … | sudo bashran, reached a signing key that 404s, and failed there: a documentedcommand that cannot succeed. They now describe installing a downloaded
.deb/.rpmand say plainlythat
apt upgradewill not reach ObjectFS, and why.Nothing was deleted.
pages.yml, both setup scripts,nfpm.yaml's signature block andci.yml'srepo-installjob are untouched. Turning this on is a repository secret and nothing else — which staystrue only while the path stays tested, so
repo-installkeeps building both repositories against athrowaway key and installing from them in
ubuntu:24.04,rockylinux:9andopensuse/leap:15.6onevery PR.
Gates
TestTheDormantRepositoriesAreNotDocumentedwalks every.mdand.htmlin the tree and fails on anypage naming
objectfs.io/setup-repo-*.sh,/aptor/yum(CHANGELOG.mdexempt — it has to be ableto name what it records). A one-way gate on purpose: a test cannot read whether a secret exists, so
it pins the decision rather than deriving it, and its doc comment says to delete it first when a
repository is published again. Floored on files scanned rather than found, since an absence test that
visits nothing passes.
TestRPMPackagesAreSigned→TestTheRPMSigningPathStaysIntact, andguardExits→guardBodyso theabsent-key branch can be asked three questions: it must exit, exit zero, and annotate the run.
Verified by mutation, all six caught by the intended assertion:
exit 1in the absent-key branch::warning::to a plain echoREADME.md:355 documents objectfs.io/setup-repo-debian.shStatic:
gofmt,go vet,golangci-lint(0 issues),go test ./internal/config/ok, shellcheckclean on all three rewritten
release.ymlsteps.Refs #138.