Fix release signing script argument handling and checksums - #177
Merged
Conversation
The release-candidate guard read
if [ rcstring != "" ]; then
which compares the literal word "rcstring" against the empty string and is
therefore always true. Final releases took the rename branch too, where it
became a no-op rename of each archive onto itself.
The version and RC suffix were also hardcoded to the previous release, so
the script had to be edited before every use.
Take both as arguments, rename only when there is a suffix to add, and skip
an archive that has already been renamed so a re-run after a failure is not
confusing.
Two other changes:
- Require the signing key to be named through ROLLER_SIGNING_KEY, and refuse
a key that is not RSA or is under 4096 bits. Older keys may still be in a
release manager's keyring and would otherwise be picked by default.
- Write checksums with shasum(1) rather than "gpg --print-md", so downloaders
can verify with "shasum -c", and emit SHA-512 alongside SHA-256.
Claude-Session: https://claude.ai/code/session_019R1jdtwkaYEeA6L9DXEtEi
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.
The release-candidate guard in
assembly-release/sign-release.shreads:The
$is missing, so this compares the literal wordrcstringagainst the empty string and is always true. Final releases therefore took the rename branch as well, where it degenerated into renaming each archive onto itself.The version and RC suffix were also hardcoded to the previous release (
6.1.5/-rc2), so the script had to be hand-edited before every use — and would silently sign the wrong filenames if anyone forgot.Changes
ROLLER_SIGNING_KEY, and refuse a key that is not RSA or is under 4096 bits. A release manager may still have older keys in their keyring, and gpg would otherwise pick one by default. See https://infra.apache.org/release-signing.html.shasum(1)format instead ofgpg --print-md, so downloaders can verify withshasum -c. The--print-mdoutput is space-grouped and names atarget/-prefixed path, so it cannot be checked directly. Emit SHA-512 alongside SHA-256, per the current distribution policy.Verification
Guards, with real exit codes:
ROLLER_SIGNING_KEYno key matching ..., exit 1Rename behaviour, against dummy archives:
-rc1) — archive renamed to carry the suffix before signingThe signing and checksum steps themselves need a passphrase prompt on a TTY, so they were exercised only as far as the gpg invocation.
Usage is now:
https://claude.ai/code/session_019R1jdtwkaYEeA6L9DXEtEi