Fix CLI checksum verification for sha256sum -c#2999
Merged
sugmanue merged 2 commits intosmithy-lang:mainfrom Mar 25, 2026
Merged
Fix CLI checksum verification for sha256sum -c#2999sugmanue merged 2 commits intosmithy-lang:mainfrom
sugmanue merged 2 commits intosmithy-lang:mainfrom
Conversation
Add appendFileNameToChecksum.set(true) to the checksumImages task
in smithy-cli/build.gradle.kts. This generates sha256sum -c
compatible checksum files that include the filename in the format:
<hash> <filename>
Previously, the .sha256 files contained only the raw hash (64
bytes, no filename), causing sha256sum -c to fail with:
sha256sum: WARNING: 1 line is improperly formatted
The Gradle Checksum plugin (Checksum.java line 192) generates
the standard two-space separated format when this option is set:
String.format("%s %s", hashCode, change.getFile().getName())
Verified all 5 platform checksums pass sha256sum -c:
smithy-cli-windows-x64.zip: OK
smithy-cli-linux-x86_64.zip: OK
smithy-cli-darwin-aarch64.zip: OK
smithy-cli-darwin-x86_64.zip: OK
smithy-cli-linux-aarch64.zip: OK
Fixes smithy-lang#2477
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
sugmanue
approved these changes
Mar 25, 2026
Contributor
sugmanue
left a comment
There was a problem hiding this comment.
Thank you Shrey for your contribution.
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.
Background
Add
appendFileNameToChecksum.set(true)to thechecksumImagestask in
smithy-cli/build.gradle.kts. This generatessha256sum -ccompatible checksum files that include the filename in the standard
format:
<hash> <filename>(two spaces).Previously, the
.sha256files contained only the raw hash(64 bytes, no filename), causing
sha256sum -cto fail with:sha256sum: WARNING: 1 line is improperly formatted
The Gradle Checksum plugin (
Checksum.javaline 192) generatesthe standard two-space separated format when this option is set:
Testing
Built locally and verified all 5 platform checksums pass sha256sum -c:
smithy-cli-windows-x64.zip: OK
smithy-cli-linux-x86_64.zip: OK
smithy-cli-darwin-aarch64.zip: OK
smithy-cli-darwin-x86_64.zip: OK
smithy-cli-linux-aarch64.zip: OK
Links
Fixes #2477
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.