Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reproducible builds #233

Open
agentgt opened this issue May 28, 2023 · 2 comments
Open

Reproducible builds #233

agentgt opened this issue May 28, 2023 · 2 comments

Comments

@agentgt
Copy link

agentgt commented May 28, 2023

Projects that generate code and run at the time compile stage need to be reproducible.

JTE at the moment is not.

https://maven.apache.org/guides/mini/guide-reproducible-builds.html

I have a PR but besides the above problem I noticed lots of other issues with your Maven setup:

  • Need to pin plugins with pluginsManagement
  • Need to pin Maven version (see JStachio pom.xml on how to do that).
  • If generating module-info you should pin the JDK version on release (e.g. require the same JDK version to build for release builds)

Once you setup reproducible builds register it here: https://github.com/jvm-repo-rebuild/reproducible-central

agentgt added a commit to agentgt/jte that referenced this issue May 28, 2023
@casid
Copy link
Owner

casid commented May 29, 2023

Hm, the maven version is kind of pinned by using the checked in maven wrapper.

@agentgt
Copy link
Author

agentgt commented May 29, 2023

So the idea with reproducible is that not only is your build reproducible but all tools you use.

I too normally use the maven wrapper but when I was looking at other builds on reproducible-central they were not using the wrapper and instead relying on the docker image's ubuntu version of the JDK and I think maven although I'm not entirely sure on that (ie the docker image might build it).

The idea being the linux distros are verifying the reproducibility.

So you can ask them (https://maven.apache.org/guides/mini/guide-reproducible-builds.html) if Maven wrapper is OK but I just tried to follow what others were doing.

Regardless you should use the Maven enforcer fail if any of your requirements for reproduction are not met like TZ, line encoding, Maven version, and JDK version. That is what I meant about pinning. That way someone doesn't say "hey this is not reproducible" when in reality they compiled with the wrong version of something.

Does that make since?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants