lucimber / meta-openjdk-temurin

This is a software layer for Java VMs, for use with OpenEmbedded and Yocto Project build systems. The binaries are provided by the Eclipse Temurin Project.
GNU General Public License v2.0
9 stars 4 forks source link

Source code not archived by archiver.bbclass #28

Closed rhaberkorn closed 3 months ago

rhaberkorn commented 8 months ago

In order to comply with the GPL-licensing of the OpenJDK, you must provide source code with commercial products containing the OpenJDK. Yocto foresees the archiver.bbclass for that purpose.

Unfortunately, since the current Temurin recipes reference binary archives, any source archive created by the archiver class will not contain the necessary sources.

I would therefore suggest to add sources with the unpack=false attributes to all recipes. For instance

SRC_URI += "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.10%2B7/OpenJDK17U-jdk-sources_17.0.10_7.tar.gz;md5sum=8556055f844508d2c9cfc930cc9a1570;unpack=false"

This worked as a test in my case. The archiver will bundle both the binary and source archives in this case. The binaries are unnecessary for source archives, but I don't know how to exclude them elegantly, except doing it in a script.

sebveit commented 8 months ago

Thanks for the feedback! I'll look into it.

sebveit commented 4 months ago

Sorry for the delay. I have adapted the recipes to supply the source code of the JREs accordingly. See commit b7dd04b37b7420b9407b85303a69b0b75d3bdb80

Please verify if that works as intended!

rhaberkorn commented 4 months ago

Thank you. Could you port this to the dunfell branch as well, please? (Actually I am using it with hardknott, but it works as well.)

rhaberkorn commented 4 months ago

The kirkstone branch, that already contains your patch, should also build with hardknott, but I get the following error at install time: log.do_install.35245.gz

The directory should be called ...jvm/openjdk-17-jre/jdk-17.0.10+7-jre/bin - there is an unexpected jdk-17.0.10+7-jre subdirectory.

sebveit commented 4 months ago

I'm pushing that (adapted) commit to dunfell branch right now. Dunfell has slightly outdated config options regarding SRC_URI.

About your error: It might be related to issue https://github.com/lucimber/meta-openjdk-temurin/issues/23 You seemingly have a setup for hardknott but are trying to use kirkstone branch with this layer. This might not be a good idea.

Please try again with the matching branch and see if the error still occurs.

rhaberkorn commented 3 months ago

The patch on the dunfell branch works as expected. Thank you very much!