GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — [MPOM-244] upload SHA-512 only for source-release to staging repo by kwin · Pull Request #40 · apache/maven-apache-parent Conversation
|
|
@hboutemy WDYT? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Not in all Apache projects, look at https://repo1.maven.org/maven2/org/apache/sling/org.apache.sling.api/2.9.0/ or https://repo1.maven.org/maven2/org/apache/felix/org.apache.felix.scr/2.1.8/. Maven Central has the source-release artifacts as well.
Only MD5 and SHA1. SHA512 has been explicitly disabled for performance reasons (https://issues.apache.org/jira/browse/MRESOLVER-140)
ASF policy enforces that only for those releases (https://infra.apache.org/release-distribution.html#sigs-and-sums). For the binaries it is never checked (because as you said, Maven will only use MD5/SHA1 to detect transport corruption) and ASF doesn't care about the binaries anyhow. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
They must comply with: https://infra.apache.org/release-distribution.html. They can provide more if they like, but not less than that.
What holds you off to enable this?
ASF never provides binary. The only official release is a source tarball/zip. Binaries are courtesy. So if you want to point someone to an Apache release, point to downloads.apache.org. That's it. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
To be honest, it is a bit tough to discuss with you. Also language like "non-sense" does not really help. But let me try to respond to your complaints:
Yes, even Apache Sling and Felix do that, but this is IMHO not relevant in the context of this PR.
This is only possible with command line options and not via pom.xml configuration. To distribute that among a team is much more effort than on relying on a plugin available from Maven Central which is even compatible with Apache Maven prior 3.8.1 (which is IMHO the first release shipping with Maven Resolver 1.6.x supporting SHA-512 on demand)
Same as above. IMHO not really relevant in the context of this PR. In fact a lot of ASF projects provide binaries via Maven Central although ASF only mandates distribution of source archives. The whole point about this PR is being able to use the Nexus Staging Repo as the single source for dist and Maven Central (as that eases validating a release candidate and therefore voting on a release). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Does this work for you? I also believe that if you attach checksums Resolver will calculate checksums of checksums. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I decided against using maven-resolver-impl for calculating SHA-512 for the following reasons:
Although the SHA-512 artifact being calculated by the checksum-maven-plugin will get another MD5/SHA1 checksum when being deployed that IMHO doesn't do any harm. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@hboutemy I would appreciate your input on this as well. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
IIUC, in the end, you end-up about publishing sha512 checksum to Central only for source-release? => adding that key aspect to the PR title, will need to see if/how/when to update Jira on the implementation side, this means that the current commit is big because there was POM reformatting (change of order of 2 plugins), but the real update is about adding |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
The reordering is necessary due to nicoulaj/checksum-maven-plugin#112 as both plugins leverage the same phase. Therefore we have to first attach the SHA-512 checksum before calculating the signature. The maven-gpg-plugin will not sign SHA-512 files (https://github.com/apache/maven-gpg-plugin/blob/878edefba0f80b55701ea347a69b58c9bbeca37d/src/main/java/org/apache/maven/plugins/gpg/GpgSignAttachedMojo.java#L53) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I understand why you need to exclude asc from checksum, if asc was produced before checksum |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Let me summarize the status quo (without PR):
With this PR the order is inverted:
Without the inverted order the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
ah, ok, I didn't get that attaching checksums required to switch from |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@kwin wouldn't |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
files goal does never attach with a classifier, therefore we can't use it |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
ok, then it's safer to bind the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I can do that but for clarity reason I would still reorder in the pom Update: Done in 5b2579d |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I have checked the change. Two questions:
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I answered the first question already in #40 (comment):
For the 2nd question, I have not tried, but most probably resolver will just overwrite the existing file (with the same content), for now this isn't an issue, because I don't see a reason why ASF projects should generate SHA-512 by Maven Resolver, it won't ever be enabled by default for performance reasons. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Even if Resolver overwrites, Nexus Staging might reject this because the file is uploaded twice. You should check that. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
People can already configure it. I just want to avoid surprises for all Apache folks. E.g., Mark Thomas does this actively now. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
See here: https://repo1.maven.org/maven2/org/apache/tomcat/tomcat-catalina/10.0.6/ Produced by Resoler via Ant. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
FYI, I added some instructions to calculate sha512 in dist: apache/maven-site@29bc21e |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
can you show me, please? I don't know how to do that notice: I mean using Maven, because that's the Maven ASF parent POM that we're tweaking... |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I have done this massively in Core ITs: apache/maven-integration-testing@672728a |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
See https://maven.apache.org/resolver/configuration.html for |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
oh nice, I didn't know that content! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
changed pom.xml version to 23 and ran the same |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
That is nice. One can manually delete the redundant files from staging. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I did not test yet, but why don't we just add |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@hboutemy See my answer in #40 (comment). SHA-512 checksum are not enabled by default for performance reasons: https://issues.apache.org/jira/browse/MRESOLVER-138. Although this affects mainly downloads it shows that SHA-512 checksums won't be checked automatically by Maven (probably will never be). Therefore the additional SHA512 only makes sense for artifacts not (primarily) downloaded via Maven. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@kwin ok, thanks for the link |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@kwin Thanks for bearing with me. I am very picky when it affects all ASF committers. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This change bugs me, mostly because the checksum files it creates aren't following any kind of standard. I would have preferred the content of the generated file not just be a raw checksum, but actually follow GNU coreutils default format or, more preferably, the BSD "tag" format (see https://man7.org/linux/man-pages/man1/sha512sum.1.html). Following a standard file format allows one to quickly and easily use standard tools to verify the checksum ( |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
reading your comment, it makes me feel that for a very long time, we're probably conflating:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
ASF mandates this format: https://www.apache.org/info/verification.html |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@ctubbsii @hboutemy @kwin There are many many issues conflated here and a lot of misunderstanding in general. I had a very lengthly talk about this in general with @cstamas recently. Disclaimer: I will not talk about signatures here. First of all, Maven repo (e.g., Central) != Apache dist area. The checksums in repo are solely for bitrot NOTHING ELSE. The format is basically an implementation detail of Maven Resolver, though the parsing is lenient. @kwin You maybe remember that we have talked about this.
Those are not checksum algorithms. @ctubbsii I here do agree with you that the dist area is most designed for human consumption (or curl, etc) and not Maven Resolver. Therefore proper checksums are highly advised. I highly favorize BSD tags since they are default, obviously on BSD systems including macOS, OpenSSL generates them as well by default and GNU sum tools can produce and consume them with ease. Upshot: Lets discuss a proper solution for the Apache dist area for all Maven-based projects. PS: You can of course abuse a cryptographic hashing algorithm like |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I do agree with
but the same is true for MD5 and SHA1. The format of hashes in Apache Dist are standardized among all ASF projects and the information from https://www.apache.org/info/verification.html implies that you MUST(!) use the raw hash in the files! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Exactly!
I don't see this requirement of raw hash. Can you explicitly show me? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
You are right that the format is not stated on https://www.apache.org/info/verification.html but I would conclude that from https://infra.apache.org/release-signing.html#basic-facts
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
But not explicit. I don't know who to talk to, but this should be clarified explicitly as it causes confusion as you see. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The referenced page of apache explicitly mentions the usage of The format from my point of view is a consequence by using the appropriate tools... if not otherwise explicitly mentioned I would assume that the format is the one which can be consumed by the given tools. This is currently not the case. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
...and they all produce different output. Windows does not even work: Alternatively: What now? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
A lot of this discussion is out of scope for MPOM. The point I was trying to make here in #40 (comment) is that this shouldn't be running by default in the apache-release profile if it's going to produce files with less overall utility to the staging process than the ones projects might already be creating for themselves. Therefore, it doesn't add much value to those MPOM users. I don't think MPOM should decide the format for the whole project, but I'm happy to advocate for the BSD "tag" style in the appropriate venue. For here, I'd be happy if it could be disabled more easily, or configured to provide the output format I prefer, so it's not just being a bother. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Resolve #456 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.