adoptium / temurin-build

Eclipse Temurin™ build scripts - common across all releases/versions
Apache License 2.0
1k stars 243 forks source link

temurin binaries have wrong module-list in release-file #3793

Open sleicht opened 1 month ago

sleicht commented 1 month ago

What are you trying to do? The list of modules in the release-file doesn't represent the linked modules of the jre.

Expected behaviour: release-file modules list is the same as the list of the command java --list-modules: java.base java.compiler java.datatransfer java.desktop java.instrument java.logging java.management java.management.rmi java.naming java.net.http java.prefs java.rmi java.scripting java.se java.security.jgss java.security.sasl java.smartcardio java.sql java.sql.rowset java.transaction.xa java.xml java.xml.crypto jdk.accessibility jdk.charsets jdk.crypto.cryptoki jdk.crypto.ec jdk.dynalink jdk.httpserver jdk.incubator.foreign jdk.incubator.vector jdk.internal.vm.ci jdk.internal.vm.compiler jdk.internal.vm.compiler.management jdk.jdwp.agent jdk.jfr jdk.jsobject jdk.localedata jdk.management jdk.management.agent jdk.management.jfr jdk.naming.dns jdk.naming.rmi jdk.net jdk.nio.mapmode jdk.sctp jdk.security.auth jdk.security.jgss jdk.unsupported jdk.xml.dom jdk.zipfs

Observed behaviour: release-file modules list has the complete list of JDK modules: java.base java.compiler java.datatransfer java.xml java.prefs java.desktop java.instrument java.logging java.management java.security.sasl java.naming java.rmi java.management.rmi java.net.http java.scripting java.security.jgss java.transaction.xa java.sql java.sql.rowset java.xml.crypto java.se java.smartcardio jdk.accessibility jdk.internal.jvmstat jdk.attach jdk.charsets jdk.compiler jdk.crypto.ec jdk.crypto.cryptoki jdk.dynalink jdk.internal.ed jdk.editpad jdk.hotspot.agent jdk.httpserver jdk.incubator.foreign jdk.incubator.vector jdk.internal.le jdk.internal.opt jdk.internal.vm.ci jdk.internal.vm.compiler jdk.internal.vm.compiler.management jdk.jartool jdk.javadoc jdk.jcmd jdk.management jdk.management.agent jdk.jconsole jdk.jdeps jdk.jdwp.agent jdk.jdi jdk.jfr jdk.jlink jdk.jpackage jdk.jshell jdk.jsobject jdk.jstatd jdk.localedata jdk.management.jfr jdk.naming.dns jdk.naming.rmi jdk.net jdk.nio.mapmode jdk.random jdk.sctp jdk.security.auth jdk.security.jgss jdk.unsupported jdk.unsupported.desktop jdk.xml.dom jdk.zipfs

Any other comments: If I use jlink to build a custom jre the release file gets created and has only the added modules in the modules list.

sxa commented 1 month ago

Noting that two other providers I've checked do not have the same discrepancy. For the Temurin 21.0.3+9 on Linux/x64 the additional ones are:

jdk.attach jdk.compiler jdk.editpad jdk.hotspot.agent jdk.internal.ed jdk.internal.jvmstat jdk.internal.le jdk.internal.opt jdk.jartool jdk.javadoc jdk.jcmd jdk.jconsole jdk.jdeps jdk.jdi jdk.jlink jdk.jpackage jdk.jshell jdk.jstatd jdk.random

As @jerboaa mentioned in the slack thread our JREs are created with the legacy-jre-target target in the upstream openjdk make system for recent releases so we are generally subject to whatever that is doing.

sleicht commented 1 month ago

And where can I open a ticket for the legacy-jre-target?

sxa commented 1 month ago

It would likely need to be raised in the Java JBS system, although you need to be granted access to be able to do that.

Any thoughts @andrew-m-leonard? Since the JRE targets are now in legacy mode I'm not sure how much interest there would be in resolving this. I'm assuming that the release file is generated as part of this target.

Having a look through the list it looks like we may have ended up with the release file containing the full contents of the JDK instead of the cut-down JRE contents.

jerboaa commented 1 month ago

Yes, that seems a JDK build bug for the legacy jre target. This still seems a bug to me. The jlink command for the legacy target doesn't specify the full set of modules, yet passes the same release file to jlink which seems a bug. It should just not do that.