Skip to content

feat(packaging): leave the package repositories dormant, unpublished (#138) - #491

Merged
scttfrdmn merged 3 commits into
mainfrom
chore/dormant-package-repositories
Sep 15, 2026
Merged

scttfrdmn merged 3 commits into
mainfrom
chore/dormant-package-repositories

Conversation

@scttfrdmn

Copy link
Copy Markdown
Owner

Why

release.yml refused to build a release without secrets.GPG_SIGNING_KEY, so v0.14.0 could not be
cut
. 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.txt and no signs: block at all (which is why
a 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 update refuses an unsigned
repository and accepts one only when marked [trusted=yes], which turns authenticity off, and
gpgcheck is dnf's default. An unsigned repository is not a lesser version of a signed one — it is a
repository 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.yml no longer blocks. The absent-key branch warns and exit 0s instead of exit 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_ENV write applies to
subsequent steps, so make package-linux in the same step saw neither variable, and nfpm reads an
unset key_file as "do not sign"). Both are four packages and a green run. So the branch is chosen by
whether a key was imported and each branch insists on the state it implies. Measured in rockylinux:9
rather than assumed: an unsigned rpm against an empty keyring exits 0 with digests OK.

Also fixed there: the build step read "$GNUPGHOME/pass" whenever GPG_PASSPHRASE was set, and
$GNUPGHOME comes from the import step that now skips itself — two independent secrets, so a
passphrase 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.html and
both docs-platform pages — along with the signing-key section they linked to. The scripts are still
served, so curl … | sudo bash ran, reached a signing key that 404s, and failed there: a documented
command that cannot succeed. They now describe installing a downloaded .deb/.rpm and say plainly
that apt upgrade will not reach ObjectFS, and why.

Nothing was deleted. pages.yml, both setup scripts, nfpm.yaml's signature block and ci.yml's
repo-install job are untouched. Turning this on is a repository secret and nothing else — which stays
true only while the path stays tested, so repo-install keeps building both repositories against a
throwaway key and installing from them in ubuntu:24.04, rockylinux:9 and opensuse/leap:15.6 on
every PR.

Gates

TestTheDormantRepositoriesAreNotDocumented walks every .md and .html in the tree and fails on any
page naming objectfs.io/setup-repo-*.sh, /apt or /yum (CHANGELOG.md exempt — it has to be able
to 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, and guardExits → guardBody so the
absent-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:

mutation caught by
restore exit 1 in the absent-key branch "refuses to release without a signing key"
drop the exit entirely "falls through into the rest of the step"
downgrade ::warning:: to a plain echo "skips signing without annotating the run"
delete the guard "no in-shell check for an absent signing key"
stop asserting the unsigned state "verifies signed packages but skips unsigned ones"
document a one-liner again README.md:355 documents objectfs.io/setup-repo-debian.sh

Static: gofmt, go vet, golangci-lint (0 issues), go test ./internal/config/ ok, shellcheck
clean on all three rewritten release.yml steps.

Refs #138.

…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.
@scttfrdmn

Copy link
Copy Markdown
Owner Author

The rpm -K matrix, measured

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:

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
    with SIGNATURES NOT OK, which is not the signatures OK pattern 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 without rpm-sign installed, so the "signed" file was a byte-identical copy and both
    rows reported digests OK. The second run installs rpm-sign, checks addsign exited 0, and
    cmps the two files to confirm the signature actually changed the package before drawing any
    conclusion from it.

@scttfrdmn
scttfrdmn merged commit bbc94ec into main Sep 15, 2026
43 checks passed
@scttfrdmn
scttfrdmn deleted the chore/dormant-package-repositories branch September 15, 2026 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant