Skip to content

Conversation

@jon-signal
Copy link
Contributor

@jon-signal jon-signal commented Sep 19, 2024

The version of sha256sum that ships with macOS Sequoia appears to have a bug where it does not read from stdin by default, even though its man page says, in part (emphasis added):

In all cases, each file listed on the command line is processed separately. If no files are listed on the command line, or a file name is given as -, input is taken from stdin instead.

…but invoking sha256 as it appears in the mvnw script does not work as expected:

echo '3d8f20ce6103913be8b52aef6d994e0c54705fb527324ceb9b835b338739c7a8  /Users/jon/REDACTED/.mvn/wrapper/maven-wrapper.jar' | sha256sum -c
usage: sha256sum [-bctwz] [files ...]

…which in turn results in a non-successful exit code, which in turn leads to a (rather alarming!) warning about a mismatched checksums and possible compromise.

Adding a - explicitly calls for sha256sum to read from stdin.


To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

 The version of `sha256sum` included in macOS Sequoia does not read from stdin by default
@slachiewicz slachiewicz added the bug Something isn't working label Sep 29, 2024
@slachiewicz slachiewicz merged commit b2ff9cd into apache:master Dec 16, 2024
@jon-signal jon-signal deleted the sha256_stdin branch March 17, 2025 14:33
@jira-importer
Copy link

Resolve #297

1 similar comment
@jira-importer
Copy link

Resolve #297

@slawekjaranowski slawekjaranowski added this to the 3.3.3 milestone Jul 25, 2025
@gsmet
Copy link

gsmet commented Aug 20, 2025

@gnodet not sure who is doing the releases here but could we have a release with this fix? We have to fix it manually in all our repositories and it's not ideal.

Thanks!

@cstamas
Copy link
Member

cstamas commented Aug 20, 2025

@slawekjaranowski ping

@slawekjaranowski
Copy link
Member

There is on my release list 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants