ci(release-rpm): accept V4 header signatures in verify step#370
Merged
fcostaoliveira merged 1 commit intoMay 6, 2026
Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 1282f84. Configure here.
The publish-to-yum verify step queried %{SIGPGP:pgpsig}, which is
'(none)' on V4-signed RPMs. rpm --addsign on rpm >= 4.13 produces V4
header signatures stored in RSAHEADER/DSAHEADER, so the legacy SIGPGP
tag stays empty even though the package is correctly signed.
The 2.3.1 backfill failed at this step on every retry: build matrix
signed RPMs successfully, then the verify step rejected them all with
'RPM unsigned: ... (SIGPGP=(none))'.
Replace the SIGPGP query with `rpm -Kv` parsing. rpm -Kv prints a
per-component line ("Header V4 RSA/SHA512 Signature, key ID xxxx: OK")
and exits 0 only when every component verifies. Also explicitly reject
NOKEY / NOTTRUSTED / BAD outcomes to keep the safety net the original
script intended. Works for both V3 (legacy SIGPGP) and V4
(RSAHEADER/DSAHEADER) signed packages.
Refs: https://github.com/redis/memtier_benchmark/actions/runs/25388333208/job/74456580707
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1282f84 to
13983e6
Compare
paulorsousa
approved these changes
May 6, 2026
1 task
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.

Summary
The 2.3.1 release's `publish-to-yum` job kept failing at step 6 ("Verify RPM signatures") with:
```
##[error]RPM unsigned: rpms/.../memtier-benchmark-2.3.1-...rpm (SIGPGP=(none))
```
Failed run: https://github.com/redis/memtier_benchmark/actions/runs/25388333208/job/74456580707
The build matrix actually signs the RPMs correctly — the verify step's check is what's broken:
```bash
sig=$(rpm -qp --queryformat '%{SIGPGP:pgpsig}\n' "$rpm_file")
if [ "$sig" = "(none)" ] || [ -z "$sig" ]; then
echo "::error::RPM unsigned: $rpm_file (SIGPGP=$sig)"
```
`rpm --addsign` on rpm >= 4.13 produces a V4 header signature stored in `%{RSAHEADER}` / `%{DSAHEADER}`. The legacy `%{SIGPGP}` tag stays `(none)` on V4-signed packages, so this query falsely reports modern RPMs as unsigned. `rpm -K` confirms the actual signature is fine: `Header V4 RSA/SHA512 Signature, key ID bf53aa0c: OK` (after the public key is imported, which step 6 does).
This bug was never tripped before because PR #338 added `release-rpm.yml` but its `publish-to-yum` job is gated on `event_name == 'release'` — it only runs when an actual release is published, and 2.3.0 predated this workflow. The 2.3.1 release was the first end-to-end exercise.
Change
Replace the `SIGPGP` query with `rpm -Kv` parsing. `rpm -Kv` prints a per-component verification line and exits 0 only when every component verifies. Match against `'Header V[34] (RSA|DSA)/.*: OK'` to accept both V3 (legacy SIGPGP) and V4 (RSAHEADER/DSAHEADER) signatures, and explicitly reject `NOKEY / NOTTRUSTED / BAD` outcomes to preserve the safety net the original script intended.
Test plan
Sibling PR
Same fix needs to land on the `2.3` release branch so 2.3.1 (and future 2.3.x patches) can publish to YUM. I'll open the cherry-pick after this lands.
🤖 Generated with Claude Code
Note
Medium Risk
Touches the release publishing workflow’s RPM signature verification logic; a regex/command mismatch could either fail legitimate releases or (less likely) allow a bad signature to slip through.
Overview
Fixes the
publish-to-yumworkflow’s RPM signature verification to handle modern V4 header signatures produced byrpm --addsign.The verify step now captures
rpm -Kvoutput per RPM and greps for anHeader V3/V4 RSA/DSA ...: OKline, while explicitly flaggingNOKEY/NOTTRUSTED/BADcases, instead of relying on the legacy%{SIGPGP}tag which reports(none)for V4-signed packages.Reviewed by Cursor Bugbot for commit 13983e6. Bugbot is set up for automated code reviews on this repo. Configure here.