Repository navigation
[CTX-1481] fix(release): repair 0.0.27 APT and Copr channels - #2579
Merged
Merged
Conversation
The 0.0.27 release run failed the APT job with "no valid OpenPGP data found" because the secret is provisioned as base64 and/or with literal \n escapes, while the workflow piped it straight into gpg --import. It also failed the Copr job because Ubuntu 24.04 has no copr-cli package. - Add scripts/import-apt-gpg-key.sh: accepts armored, base64, escaped newline, and CRLF forms; retries parses; verifies the pinned secret-key fingerprint BCB87D7B489A64168080D900DF4751B6EA711CB8; fails closed and never prints key material. Import into a private per-run GNUPGHOME. - Install copr-cli in a Python venv under RUNNER_TEMP, put its bin on PATH, and print copr-cli --version instead of apt-get install. - Add workflow_dispatch repair-release-channels.yml for published tags: tag input (default v0.0.27), channels all|apt|copr; verifies release SHA256SUMS, republishes APT to bitty/apt with read-back comparison, uploads RPMs to Copr, and optionally adopts a newer validated flake.lock from the default branch. Read-only repository permissions; never moves the tag or mutates release assets. - Add hermetic importer tests and static workflow regressions; wire both into CI, the release validation job, and just check. Document the repair runbook and channel behavior.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 20 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
… sets - Decode base64 key material to a file so binary OpenPGP exports survive NUL bytes; add hermetic base64-of-binary coverage. - Require SHA256SUMS to list exactly the downloaded .deb/.rpm set in the repair workflow instead of verifying only the names that were seen. - Point failed channel summaries at the emergency repair workflow.
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.
Priority: P1 | Area: packaging | Labels: fix, P1, area:packaging | Milestone: v0.0.28 | RFC: - | Task: CTX-1481
Closes #2578
What failed in 0.0.27
APT_GPG_PRIVATE_KEYis non-empty but provisioned base64-encoded and/or with literal\nescapes;echo "$KEY" | gpg --batch --importfailed withgpg: no valid OpenPGP data found.copr-cliapt package (E: Unable to locate package copr-cli).The tag
v0.0.27is not moved or re-pointed by this change.Changes
APT key import
New
scripts/import-apt-gpg-key.shreads the secret from an environment variable, keeps it out of logs, and tries, in order:\nescapes converted to real newlines;After a successful parse it lists secret keys and requires the pinned fingerprint
BCB87D7B489A64168080D900DF4751B6EA711CB8. A wrong key, public-only material, or unparseable input fails with an explicit error.release.ymlimports into a private per-run$RUNNER_TEMP/apt-gnupgand only then runs the generator/signing step.Copr CLI
release.ymlnow creates a Python venv at$RUNNER_TEMP/copr-cli, upgrades pip, installscopr-cli, exports itsbinonPATH, and printscopr-cli --version. The apt install is gone.Emergency repair workflow
.github/workflows/repair-release-channels.ymlisworkflow_dispatchonly:tag(defaultv0.0.27, validated as stablevX.Y.Z, release must exist and not be draft/prerelease);channels=all,apt, orcopr;environment: release, workflow-levelpermissions: contents: read.APT leg: checks out the tag plus repair tooling from the default branch, downloads
*.deb+SHA256SUMSwithgh release download, requires the checksum file to list exactly the downloaded.debset and verifies every checksum, imports the key through the same helper, runsgenerate-apt-repo.py,gpgv-verifiesInRelease/Release.gpg, uploads tobitty/apt/..., and compares the read-backRelease,InRelease, andRelease.gpgbyte-for-byte.Copr leg: downloads
*.rpm+SHA256SUMS, applies the same exact-set checksum verification, installscopr-cliin a venv, and uploads x86_64/aarch64 RPMs to the configured project's enabled chroots.Nix leg (only for
channels=all): adoptsflake.lockfrom the default branch only when it differs, is newer than the tag's lock, parses as a v7 lock graph, and passesnix flake metadata; otherwise it skips with a notice. A build runs only after adoption.The workflow never runs
git tag/git pushor creates/edits/uploads/deletes release assets; a static test enforces that.Tests
scripts/tests/import-apt-gpg-key.test.sh— hermetic throwaway-key coverage: armored, base64, escaped-newline, base64-of-binary, wrong fingerprint, public-only, unparseable, empty. Also asserts no key material is printed.scripts/tests/check-release-channels.test.sh— static release/repair workflow regressions, including that the importer, release workflow, and repair workflow all pin the committed keyring fingerprint..github/workflows/ci.yml, the releasevalidatejob, andjust check.actionlintclean;act -ndry-runs pass forrelease.yml(tag push) andrepair-release-channels.yml(allandapt)..debassets and a throwaway key: checksum verification, import, generation, andgpgvall pass.just markdownlint,just ci-local-test,just workflow-publish-test,just status-drift-test,just scratch-paths-test, and the existing APT/Nix/release/AUR/manifest/distro packaging tests pass.gitleaks detect --log-opts origin/main..HEADclean; the public archive-key fingerprint is allowlisted as a non-secret identifier.just ci-localcannot go green on this host: the pre-existingbitty-runtime::spawn_surface::granted_production_backend_runs_confined_gitfails withE_SPAWN_FAILEDwhen run on the host kernel as well (this PR changes no Rust code). RemoteQuality gatesis the acceptance gate.Not done
No merge, tag, release edit, or channel publish from this PR. Applying the repairs to
v0.0.27requires dispatching the new workflow after merge (seepackaging/README.md). The branch is based on the currentorigin/main(c6a53a23, the named07f7c682plus the FreeBSD packaging commit);v0.0.27still targets07f7c682.