I'm working on Reproducible Builds for a long time now.

Having the same binary done on Windows and *nix is a big challenge particularly 
at Git level, even before thinking at the build process
I chose not to try to have the same binary, because there are always edge cases.

The only thing I did is doing some Git heuristics and created a "mvncrlf" 
modified script to rebuild from a Linux host with a good chance to get the same 
binary as the initial builder who did the release on Windows
see rebuild.sh and bin/mvncrlf in 
https://github.com/jvm-repo-rebuild/reproducible-central/

on some releases done by Windows users, the Git heuristics did not fully work, 
I ended up using source-release archive of Apache project instead of Git...

Regards,

Hervé

On 2023/02/10 18:42:09 "Piotr P. Karwasz" wrote:
> Hi,
> 
> At Log4j we have solved all the reproducibility problems mentioned on
> the wiki page[1] and we are approaching the problem of reproducibility
> between different OSes.
> 
> My goal is for the following procedure to work regardless of the
> operating system of the user:
> 
> 1. a user checks out a tagged release from the Git repository,
> 2. the user runs the Maven Wrapper: 'mvn package'
> 3. the user checks the SHA256 of the resulting JAR file with the one
> from Maven Central.
> 
> The only problem I have encountered so far is the difference between
> line endings on Windows and UNIX systems.
> 
> The line endings of static resources can be easily fixed using a
> `.gitattributes` file, but the line endings of resources generated by
> plugins may vary. Many plugins respect `System.lineSeparator()`, but
> setting the `line.separator` Java system property on the command line
> is no trivial task and it can not certainly be done in
> `.mvn/jvm.config`.
> 
> What do you think about introducing a POM-like system property (e.g.
> `project.build.lineSeparator`) that would allow setting
> `line.separator` using a simple `-Dproject.build.lineSeparator=LF` or
> `-Dproject.build.lineSeparator=CRLF`? Ideally this could be a real POM
> property, but I am afraid that by the time the POM is resolved,
> `System.lineSeparator()` is already initialized.
> 
> Piotr
> 
> [1] https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=74682318
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to