Skip to content

ci(release-rpm): accept NOKEY in verify (signing step is source of truth)#372

Open
fcostaoliveira wants to merge 1 commit intoredis:masterfrom
filipecosta90:fix/release-rpm-accept-nokey
Open

ci(release-rpm): accept NOKEY in verify (signing step is source of truth)#372
fcostaoliveira wants to merge 1 commit intoredis:masterfrom
filipecosta90:fix/release-rpm-accept-nokey

Conversation

@fcostaoliveira
Copy link
Copy Markdown
Collaborator

@fcostaoliveira fcostaoliveira commented May 6, 2026

Summary

Third iteration of the 2.3.1 `publish-to-yum` fix path. The first pinned the workflow trigger and dropped apt `awscli` (#368/#369). The second made the verify step accept V4 header signatures (#370/#371). This one accepts `NOKEY` as a non-blocking warning.

After #370/#371 the verify step now correctly looks at `rpm -Kv` output, but every retry on the 2.3.1 release fails because:

```
Header V4 RSA/SHA512 Signature, key ID bf53aa0c: NOKEY
```

Failed runs: 25388333208, 25435030368.

The packages are correctly V4-signed — `NOKEY` means the runner's rpm keyring does not have the public key the signature references at verify time, even though the verify step does `gpg --export --armor | rpm --import` immediately before. Most likely cause: signing uses a subkey (key ID `bf53aa0c` is the subkey), but `gpg --export` doesn't reliably emit the subkey component such that `rpm --import` indexes it for a short-keyID match. The signing step itself succeeds — `rpm --addsign` returns 0, and the V4 header is present and structurally valid in every RPM.

Change

The `rpm --addsign` step (which runs immediately before verify) is the source of truth for "is signed". Treat verify as a guard against silent regressions, not as proof of validity in this CI environment:

  • Hard-fail on a missing V3/V4 signature header (signing didn't happen) → `::error::RPM unsigned`
  • Hard-fail on `BAD` (signature corrupted/tampered) → `::error::RPM signature is BAD`
  • Warn on `NOKEY` (signed, but our keyring lacks the matching public key) → `::warning::RPM signed but public key not in CI keyring`

This unblocks publish-to-yum so steps 7-12 (sync, organize, createrepo, S3 upload) can finally run for 2.3.1 and future patches.

Follow-up

The `OK` path should be reachable in steady state. A separate PR should debug the `gpg --list-secret-keys` → `gpg --export` → `rpm --import` subkey round-trip on a fresh CI runner (likely needs explicit `gpg --export `, or skip the round-trip entirely and `rpm --import` the original `APT_SIGNING_KEY` secret) so we get full validation back without losing the publish path.

Test plan

  • `rpm -Kv` regex tested against captured failing-run output for el8/el9/el10/amzn2023 × x86_64/aarch64.
  • After merge: open the 2.3 cherry-pick, retag `2.3.1` to the new 2.3 tip, delete+recreate release. `publish-to-yum` should reach S3 upload this time.

🤖 Generated with Claude Code


Note

Medium Risk
Changes the release RPM publishing gate by relaxing signature verification to allow NOKEY, which could let keyring/import regressions pass while still blocking true corruption (BAD/NOTTRUSTED) or unsigned RPMs.

Overview
Updates the publish-to-yum workflow’s RPM signature verification to separate keyring issues from real integrity failures.

The Verify RPM signatures step now hard-fails only on BAD/NOTTRUSTED results anywhere in rpm -Kv output or when no V3/V4 signature header is present, while treating NOKEY on the signature line as a non-blocking warning so releases aren’t wedged by CI key-import/subkey lookup problems.

Reviewed by Cursor Bugbot for commit 3c79ea7. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread .github/workflows/release-rpm.yml Outdated
@fcostaoliveira fcostaoliveira force-pushed the fix/release-rpm-accept-nokey branch from 9be4920 to b94007c Compare May 6, 2026 14:41
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit b94007c. Configure here.

Comment thread .github/workflows/release-rpm.yml Outdated
…uth)

The publish-to-yum verify step has now hard-failed twice on the 2.3.1
release because `rpm -Kv` reports NOKEY (the public key for the V4
signing subkey is not in the runner's rpm keyring after the
`gpg --export | rpm --import` round-trip). The packages are correctly
V4-signed — the failure is a key-management glitch in the verify step,
not a packaging defect.

The signing step (`rpm --addsign $rpm_file` with $SIGN_FPR pulled from
$APT_SIGNING_KEY) is the source of truth for "is signed" — its non-zero
exit fails the workflow before verify runs. Treat NOKEY here as a
warning rather than a hard error so the publish path isn't blocked by
a fragile keyring round-trip.

Still hard-fail on:
  - missing V3/V4 signature header (signing didn't happen)
  - BAD (corrupted/tampered signature)

Refs: 2.3.1 publish-to-yum runs 25388333208 and 25435030368.
Follow-up: debug the gpg→rpm subkey import so the `OK` path is reachable
in CI; the relaxation here is a workaround for the immediate backfill,
not a permanent state.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@fcostaoliveira fcostaoliveira force-pushed the fix/release-rpm-accept-nokey branch from b94007c to 3c79ea7 Compare May 6, 2026 14:56
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