Skip to content

jinterface: Allow to build determenistic OtpErlang.jar#10556

Merged
sverker merged 1 commit intoerlang:masterfrom
bmwiedemann:jar
Feb 2, 2026
Merged

jinterface: Allow to build determenistic OtpErlang.jar#10556
sverker merged 1 commit intoerlang:masterfrom
bmwiedemann:jar

Conversation

@bmwiedemann
Copy link
Contributor

This is a simpler alternative to PR #5580

It lets us get closer to reproducible builds for erlang. See https://reproducible-builds.org/ for why this is good.

Note: when using options with double-dash,
jar does not understand merged options such as -cf anymore
so we have to split them up to work again.

Closes #5580

@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2026

CT Test Results

  2 files   13 suites   5m 0s ⏱️
152 tests 146 ✅ 6 💤 0 ❌
168 runs  162 ✅ 6 💤 0 ❌

Results for commit ed91c31.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@CLAassistant
Copy link

CLAassistant commented Jan 16, 2026

CLA assistant check
All committers have signed the CLA.

@bmwiedemann
Copy link
Contributor Author

bmwiedemann commented Jan 16, 2026

Edit: CLA signing did work now. The original comment was:

It seems, signing the CLA does not work anymore. However, let me certify hereby that:
The contribution was created by me and I have the right to submit it under the open source license indicated in the file (Apache-2.0) .

@IngelaAndin IngelaAndin added the team:VM Assigned to OTP team VM label Jan 19, 2026
@bmwiedemann bmwiedemann force-pushed the jar branch 2 times, most recently from c631605 to 3a25efe Compare January 20, 2026 15:47
sverker
sverker previously approved these changes Jan 20, 2026
@sverker sverker added enhancement testing currently being tested, tag is used by OTP internal CI and removed testing currently being tested, tag is used by OTP internal CI labels Jan 21, 2026
@sverker
Copy link
Contributor

sverker commented Jan 21, 2026

We got this build error

-f : no such file or directory
OtpErlang.jar : no such file or directory

and then the entire jar file seems to be dumped to stdout.

I pushed a fixup commit where it uses the dash-less syntax instead:

jar cf ...

@sverker
Copy link
Contributor

sverker commented Jan 21, 2026

That fix did not work. jar from openjdk-17 does not like combining dash-less "cf" with "--date=".

On the other hand, I don't know why our docker build does not like
jar -c -f OtpErlang.jar com/ericsson/otp/erlang/

@bmwiedemann
Copy link
Contributor Author

Maybe the docker build uses some other jar version/implementation? I remember other projects had trouble because busybox-tar was used.

@sverker sverker added the testing currently being tested, tag is used by OTP internal CI label Jan 22, 2026
@sverker
Copy link
Contributor

sverker commented Jan 29, 2026

@bmwiedemann This seems to work on all our test machines. Ok?

@bmwiedemann
Copy link
Contributor Author

Yes, it also works in my tests. Good to merge.

This is a simpler alternative to PR erlang#5580

It lets us get closer to reproducible builds for erlang.
See https://reproducible-builds.org/ for why this is good.

Note: when using options with double-dash,
  jar does not understand merged options such as -cf anymore
  so we have to split them up to work again.

Note2: we hardcode the date, because the complexity of converting
  seconds to a date string to work on all OSes is not worth it.

Closes erlang#5580
@sverker
Copy link
Contributor

sverker commented Feb 2, 2026

Ticket: OTP-19956

@sverker sverker merged commit 3b77fdf into erlang:master Feb 2, 2026
27 checks passed
@bmwiedemann bmwiedemann deleted the jar branch February 15, 2026 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants