GeezerVison is showing github.com — [MPOM-282] Create correct SHA512 content · Issue #340 · apache/maven-apache-parent
[MPOM-282] Create correct SHA512 content #340DescriptionKarl Heinz Marbaise opened MPOM-282 and commented
Currently the created SHA512 which is used for the distribution area contains only the checksum but not the filename which results in bad output if the checksums being checked via command line tool:
$ shasum -c apache-maven-3.2.5-bin.tar.gz.sha512
$ shasum: apache-maven-3.2.5-bin.tar.gz.sha512: no properly formatted SHA checksum lines found
The checksum should be enhanced to support that correctly.
Issue Links:
1 votes, 8 watchers Activityjira-importer commented on Oct 15, 2019 Michael Osipov commented
I concur to change this. Because this will deviate from the general habit we provide checksum files. They contain the checksum only. There is no canoncial checksum file format. jira-importer commented on Oct 3, 2020 Michael Osipov commented
Can we close this? There is no canonical checksum output format. jira-importer commented on Sep 19, 2021 jira-importer commented on Oct 20, 2021 jira-importer commented on Oct 22, 2021 Christopher Tubbs commented
Konrad Windszus - The page you linked is an informational page, a "HOW TO" guide, not policy. Even if it were ASF policy, nothing in that page describes any kind of file format requirement, as far as I can tell. If you believe otherwise, please cite the specific line. jira-importer commented on Jan 6, 2022 Michael Osipov commented
The linked paragraph by Konrad Windszus, contains a lot of non-sense since checksum and hash are used interchangeably which is wrong. All of the checksums we provide are solely for the consumption of Resolver to detect bitrot. Nothing else.
Tamas Cservenak jira-importer commented on Jan 6, 2022 Michael Osipov commented
I am quite certain that this will not change. jira-importer commented on Jan 6, 2022 Tamas Cservenak commented
Agreed, please do not mix the two: md5/sha1 is used by resolver ONLY to eliminate transport corruption (bitrot). While SHA1 (and MD5) are deprecated in cryptography, this is not cryptography, just data integrity (and even today many Linux/Unix use MD5 for same purpose). Also, see https://en.wikipedia.org/wiki/SHA-1 the "Data integrity" section. jira-importer commented on Jan 6, 2022 Tamas Cservenak commented
Hm, after rereading original issue: "the created SHA512 which is used for the distribution area" – is it maybe us misinterpreting this? As it is not resolver that creates "checksum for the distribution area", is it? If it is, it is wrong. If it is not, what does it create it? jira-importer commented on Jan 6, 2022 Tamas Cservenak commented
And one more thing: re checksum content, there are (to me at least) 3 "formats" known:
- resolver style
checksum (just checksum in file)
- GNU style
checksum filename
- BSD style
alg(filename) = checksum
Resolver can READ all 3 types of checksum styles, but WRITES only the first type. jira-importer commented on Jan 6, 2022 Christopher Tubbs commented
I'm not sure if this issue is about the resolver, or about files produced by some plugin for the release distribution area. In any case, I do think it would make sense if anywhere these files were created, they wrote in a format that included the filename, so it can be more easily verified with standard tooling. It does no harm to include the filename, and makes it easier for anybody, regardless of context to use a checksum file they encounter to verify the file it accompanies. jira-importer commented on Jan 6, 2022 Michael Osipov commented
If this is going to change it should happen ASF wide, not just us. It is part of the Maven Apache Parent. jira-importer commented on Jan 6, 2022 jira-importer commented on Jan 6, 2022 jira-importer commented on Jan 6, 2022 Michael Osipov commented
Christopher Tubbs, correct. Back then people requested Resolver to do that and I refused because I consider those to be an implemenation detail of Resolver. Therefore, this approach has been used. Obviously, we need to make a difference for ALL Maven-based plugins in ASF. I think should be moved to MPOM. jira-importer commented on Jan 6, 2022 Christopher Tubbs commented
There's also a related discussion on #40 for MPOM, but the conversation moved because a lot of it was out of scope of MPOM... jira-importer commented on Jan 6, 2022 Michael Osipov commented
Reopening since it should be fixed for all of us. jira-importer commented on Jan 6, 2022 Michael Osipov commented
I guess if the format is fixed, this should be removed: <attachChecksums>true</attachChecksums>. jira-importer commented on Jan 7, 2022 Herve Boutemy commented
Hm, after rereading original issue: "the created SHA512 which is used for the distribution area" – is it maybe us misinterpreting this?
+1
there are 2 separate needs that are constantly conflated.
I'll show 1 concrete example = the binary distribution of Maven 3.8.4 apache-maven-3.8.4-bin.zip :
let's look at maven wagon wagon-3.5.1-source-release.zip, that uses (like most of our Maven releases) the ASF parent POM for that source-release part:
Apache distribution area is free form of Apache Software Foundation, governed by ASF rules
Maven Central repository area has a Maven2 repository format, governed by Maven code + repository managers and other build/dependency tools reuse + Maven Central reuse
In the past, both asked for SHA1 = the start of thinking that both checksums files were forced to be the same
When Apache Software Foundation started to require sha512 but not Maven2 repository format, we started to see the mix
then when I read the issue title "create correct SHA512 content", it all summarises the lack of clarity we discovered in 2019 when working on MPOM-244: "correct" for which rules?
Because at least, ASF and Maven share the SHA-512 algorithm value: now, what should be the format of the .sha512 file in each case is another question (it is expected to be used by who? with which tool? mvn? shasum? other?) jira-importer commented on Jan 7, 2022 Herve Boutemy commented
INFRA-22540 is another pass at that same root cause issue, this time seen as ASF's Nexus Repository staging rules level (repository.apache.org) to check file existence, but not on file format (which is implicitely meant as "format for Maven2 repository format on checksums") jira-importer commented on Jan 7, 2022 Michael Osipov commented
Herve Boutemy, thanks for the analysis. I fully agree, we need to clearly separate the purpose of those files. As discussed with Tamas Cservenak, we need to get in touch with update to update a lot of resources on apache.org because they is a lot of contradicting information which causes this type of confusion. jira-importer commented on Apr 21, 2024 Author show commentMore actions
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|