Skip to content

Emit standard sha512sum format in release checksums#769

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix-sha512-format
May 9, 2026
Merged

Emit standard sha512sum format in release checksums#769
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix-sha512-format

Conversation

@potiuk
Copy link
Copy Markdown
Member

@potiuk potiuk commented May 9, 2026

Surfaced during 0.42.0-incubating RC3 verification: the .sha512 files shipped on dist.apache.org contain only the bare hex digest, so the standard sha512sum -c file.sha512 recipe returns "no properly formatted checksum lines found". Voters either work around it with echo "$(cat ${F}.sha512) ${F}" | sha512sum -c - (as the README currently does, see lines 132–134) or compare digests by hand.

Change

  • scripts/apache_release.py::_checksum_artifact() — emit the standard <digest> <filename>\n layout that sha512sum -c and shasum -c both expect.
  • scripts/README.md — drop the echo "$(cat …)" workaround in the verification workflow and use plain sha512sum -c <file>.sha512.

Compatibility

Both checksum readers in the repo already use .read().strip().split()[0]:

  • scripts/verify_apache_artifacts.py:113
  • scripts/apache_release.py::_verify_artifact_checksum (line 310)

So they accept both the old bare-digest format and the new standard format — verification of existing RCs on dist.apache.org keeps working unchanged.

Sanity test

$ python -c "from scripts.apache_release import _checksum_artifact; _checksum_artifact('artifact.tar.gz')"
$ cat artifact.tar.gz.sha512
e29ce…726b  artifact.tar.gz
$ sha512sum -c artifact.tar.gz.sha512
artifact.tar.gz: OK

Vote thread

https://lists.apache.org/thread/bhcwnjpbx7vhnql48z7vc3njpgrx9qmj


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.7)

Generated-by: Claude Code (Opus 4.7) following the verification of 0.42.0-incubating RC3 on the IPMC vote thread.

Surfaced during 0.42.0-incubating RC3 verification: the .sha512 files
shipped on dist.apache.org contain only the bare hex digest, so the
standard 'sha512sum -c file.sha512' recipe returns 'no properly
formatted checksum lines found'. Voters either have to work around it
with 'echo "$(cat ${F}.sha512)  ${F}" | sha512sum -c -' (as the
README currently does) or compare digests by hand.

Switch _checksum_artifact() to emit the standard '<digest>  <filename>'
layout that sha512sum -c and shasum -c both expect, and simplify the
verification recipe in scripts/README.md to plain
'sha512sum -c <file>.sha512'.

Both checksum readers in the repo (scripts/verify_apache_artifacts.py
and scripts/apache_release.py::_verify_artifact_checksum) already use
'.read().strip().split()[0]', so they accept both the old and the new
format -- verification of existing RCs on dist.apache.org keeps working
unchanged.

Vote thread:
https://lists.apache.org/thread/bhcwnjpbx7vhnql48z7vc3njpgrx9qmj
@github-actions github-actions Bot added the area/ci Workflows, build, release scripts label May 9, 2026
Copy link
Copy Markdown
Contributor

@elijahbenizzy elijahbenizzy left a comment

Choose a reason for hiding this comment

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

This looks good, thank you!

@potiuk potiuk merged commit 30c9b3a into apache:main May 9, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci Workflows, build, release scripts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants