All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [oe] [meta-java][PATCH] temurin-jdk-17-bin/temurin-jre-17-bin: Add recipes
       [not found] <1740FE2141407D2F.20960@lists.openembedded.org>
@ 2023-02-05 18:52 ` Robert Joslyn
  2023-02-06 20:03   ` Henning Heinold
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Joslyn @ 2023-02-05 18:52 UTC (permalink / raw)
  To: openembedded-devel; +Cc: dev

Sorry, forgot to add Richard L to CC when sending the patch!

Robert

On Feb 5 2023, at 9:34 am, Robert Joslyn
<robert.joslyn@redrectangle.org> wrote:

> Add recipes for the Adoptium Temurin JDK/JRE binaries. These recipes
> support arm, aarch64, ppc64le, and x86-64.
> 
> Signed-off-by: Robert Joslyn <robert.joslyn@redrectangle.org>
> ---
> .../temurin/temurin-jdk-17-bin_17.0.6+10.bb   | 25 ++++++++
> .../temurin/temurin-jre-17-bin_17.0.6+10.bb   | 23 +++++++
> recipes-core/temurin/temurin.inc              | 62 +++++++++++++++++++
> 3 files changed, 110 insertions(+)
> create mode 100644 recipes-core/temurin/temurin-jdk-17-bin_17.0.6+10.bb
> create mode 100644 recipes-core/temurin/temurin-jre-17-bin_17.0.6+10.bb
> create mode 100644 recipes-core/temurin/temurin.inc
> 
> diff --git a/recipes-core/temurin/temurin-jdk-17-bin_17.0.6+10.bb b/recipes-core/temurin/temurin-jdk-17-bin_17.0.6+10.bb
> new file mode 100644
> index 0000000..fe83df5
> --- /dev/null
> +++ b/recipes-core/temurin/temurin-jdk-17-bin_17.0.6+10.bb
> @@ -0,0 +1,25 @@
> +SUMMARY = "Temurin JDK Binaries"
> +
> +JAVA_TYPE = "jdk"
> +JAVA_SHA256:aarch64 = "9e0e88bbd9fa662567d0c1e22d469268c68ac078e9e5fe5a7244f56fec71f55f"
> +JAVA_SHA256:arm = "fe4d0c6d5bb8cf7f59f7ff82c0c1fd988bbe5cccf3bc7377dc8ae50740b46c82"
> +JAVA_SHA256:powerpc64le = "cb772c3fdf3f9fed56f23a37472acf2b80de20a7113fe09933891c6ef0ecde95"
> +JAVA_SHA256:x86-64 = "a0b1b9dd809d51a438f5fa08918f9aca7b2135721097f0858cf29f77a35d4289"
> +
> +require temurin.inc
> +
> +S = "${WORKDIR}/jdk-${PV}"
> +
> +inherit update-alternatives
> +
> +ALTERNATIVE_PRIORITY = "100"
> +ALTERNATIVE:${PN} = "java javac keytool"
> +
> +ALTERNATIVE_LINK_NAME[java] = "${bindir}/java"
> +ALTERNATIVE_TARGET[java] = "${JAVA_HOME}/bin/java"
> +
> +ALTERNATIVE_LINK_NAME[javac] = "${bindir}/javac"
> +ALTERNATIVE_TARGET[javac] = "${JAVA_HOME}/bin/javac"
> +
> +ALTERNATIVE_LINK_NAME[keytool] = "${bindir}/keytool"
> +ALTERNATIVE_TARGET[keytool] = "${JAVA_HOME}/bin/keytool"
> diff --git a/recipes-core/temurin/temurin-jre-17-bin_17.0.6+10.bb b/recipes-core/temurin/temurin-jre-17-bin_17.0.6+10.bb
> new file mode 100644
> index 0000000..2527437
> --- /dev/null
> +++ b/recipes-core/temurin/temurin-jre-17-bin_17.0.6+10.bb
> @@ -0,0 +1,23 @@
> +SUMMARY = "Temurin JRE Binaries"
> +
> +JAVA_TYPE = "jre"
> +JAVA_SHA256:arm = "bf7ef7ba477dc278f913e64174e76be9ae7f014c767352eae83b3f9581494fce"
> +JAVA_SHA256:aarch64 = "3797815cb853616b6415e1b8875cda4eaa004887561ea4ea2090d726b8d8582f"
> +JAVA_SHA256:powerpc64le = "f11b86bfd7fa4d7a0d05040ea235102296f03eaf064253f76d7ab94baa0352e3"
> +JAVA_SHA256:x86-64 = "fe669935609086e76cb0b829e92808766cbf8cb7bda57a76b47813b08584bfd2"
> +
> +require temurin.inc
> +
> +S = "${WORKDIR}/jdk-${PV}-jre"
> +
> +inherit update-alternatives
> +
> +# Lower than corresponding JDK
> +ALTERNATIVE_PRIORITY = "90"
> +
> +ALTERNATIVE:${PN} = "java keytool"
> +ALTERNATIVE_LINK_NAME[java] = "${bindir}/java"
> +ALTERNATIVE_TARGET[java] = "${JAVA_HOME}/bin/java"
> +
> +ALTERNATIVE_LINK_NAME[keytool] = "${bindir}/keytool"
> +ALTERNATIVE_TARGET[keytool] = "${JAVA_HOME}/bin/keytool"
> diff --git a/recipes-core/temurin/temurin.inc b/recipes-core/temurin/temurin.inc
> new file mode 100644
> index 0000000..a026598
> --- /dev/null
> +++ b/recipes-core/temurin/temurin.inc
> @@ -0,0 +1,62 @@
> +HOMEPAGE = "https://adoptium.net"
> +LICENSE = "GPL-2.0-with-classpath-exception"
> +LIC_FILES_CHKSUM = "file://NOTICE;md5=8fa9e85281110769de025562c085b3a4"
> +
> +COMPATIBLE_HOST = "(aarch64|arm|powerpc64le|x86_64).*-linux"
> +# Binaries are linked with glibc
> +COMPATIBLE_HOST:libc-musl = "null"
> +
> +JAVA_ARCH:aarch64 = "aarch64"
> +JAVA_ARCH:arm = "arm"
> +JAVA_ARCH:powerpc64le = "ppc64le"
> +JAVA_ARCH:x86-64 = "x64"
> +
> +# Convert PV to forms needed to download the tarball
> +PV_MAJOR = "${@d.getVar('PV').split('.')[0]}"
> +PV_UNDER = "${@d.getVar('PV').replace('+', '_')}"
> +
> +SRC_URI = "https://github.com/adoptium/temurin${PV_MAJOR}-binaries/releases/download/jdk-${PV}/OpenJDK${PV_MAJOR}U-${JAVA_TYPE}_${JAVA_ARCH}_linux_hotspot_${PV_UNDER}.tar.gz"
> +SRC_URI[sha256sum] = "${JAVA_SHA256}"
> +
> +# Disable stuff not needed for packaging binaries
> +INHIBIT_DEFAULT_DEPS = "1"
> +INHIBIT_PACKAGE_STRIP = "1"
> +INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
> +EXCLUDE_FROM_SHLIBS = "1"
> +do_patch[noexec] = "1"
> +do_configure[noexec] = "1"
> +do_compile[noexec] = "1"
> +
> +JAVA_HOME = "${libdir}/jvm/${BPN}"
> +
> +do_install() {
> +    install -d ${D}${JAVA_HOME}
> +    cp -r ${S}/* ${D}${JAVA_HOME}
> +}
> +
> +# The x86-64 binaries assume libraries are in /lib64, but a typical
> pure 64-bit
> +# Yocto image puts them in /lib. If not building a multilib image,
> add a
> +# symlink from /lib64 to /lib.
> +do_install:append:x86-64() {
> +    if [ -z "${MULTILIBS}" ]; then
> +        ln -s /lib ${D}/lib64
> +    fi
> +}
> +
> +FILES:${PN} = "${JAVA_HOME}"
> +FILES:${PN}:append:x86-64 = " /lib64"
> +
> +RDEPENDS:${PN} = " \
> +    alsa-lib \
> +    freetype \
> +    glibc \
> +    libx11 \
> +    libxext \
> +    libxi \
> +    libxrender \
> +    libxtst \
> +    zlib \
> +"
> +
> +# Ignore "doesn't have GNU_HASH (didn't pass LDFLAGS?)" errors
> +INSANE_SKIP:${PN} += "ldflags"
> -- 
> 2.39.1
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#100934): https://lists.openembedded.org/g/openembedded-devel/message/100934
> Mute This Topic: https://lists.openembedded.org/mt/96765795/1348415
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [robert.joslyn@redrectangle.org]
> -=-=-=-=-=-=-=-=-=-=-=-
> 
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [oe] [meta-java][PATCH] temurin-jdk-17-bin/temurin-jre-17-bin: Add recipes
  2023-02-05 18:52 ` [oe] [meta-java][PATCH] temurin-jdk-17-bin/temurin-jre-17-bin: Add recipes Robert Joslyn
@ 2023-02-06 20:03   ` Henning Heinold
  2023-02-07  3:14     ` Robert Joslyn
  0 siblings, 1 reply; 4+ messages in thread
From: Henning Heinold @ 2023-02-06 20:03 UTC (permalink / raw)
  To: openembedded-devel; +Cc: dev

Am Sun, Feb 05, 2023 at 10:52:59AM -0800 schrieb Robert Joslyn:
> Sorry, forgot to add Richard L to CC when sending the patch!
> 
> Robert
> 

Thanks for your work, but I am bit torn here, because
one goal of oe was that all packages can be compiled
by its own, so we can link against different sets of
libc implementations and not repackaging some binary stuff.
But in the end I would go with the decision of Richard Leitner.

> On Feb 5 2023, at 9:34 am, Robert Joslyn
> <robert.joslyn@redrectangle.org> wrote:
> 
> > +++ b/recipes-core/temurin/temurin.inc
> > @@ -0,0 +1,62 @@
> > +HOMEPAGE = "https://adoptium.net"
> > +LICENSE = "GPL-2.0-with-classpath-exception"

There are a lot more licenses involved according to:
https://projects.eclipse.org/projects/adoptium.temurin


Bye Henning


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [oe] [meta-java][PATCH] temurin-jdk-17-bin/temurin-jre-17-bin: Add recipes
  2023-02-06 20:03   ` Henning Heinold
@ 2023-02-07  3:14     ` Robert Joslyn
  2023-02-07 17:16       ` Henning Heinold
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Joslyn @ 2023-02-07  3:14 UTC (permalink / raw)
  To: Henning Heinold; +Cc: openembedded-devel, dev


> On Feb 6, 2023, at 12:03 PM, Henning Heinold <henning@itconsulting-heinold.de> wrote:
> 
> Am Sun, Feb 05, 2023 at 10:52:59AM -0800 schrieb Robert Joslyn:
>> Sorry, forgot to add Richard L to CC when sending the patch!
>> 
>> Robert
>> 
> 
> Thanks for your work, but I am bit torn here, because
> one goal of oe was that all packages can be compiled
> by its own, so we can link against different sets of
> libc implementations and not repackaging some binary stuff.
> But in the end I would go with the decision of Richard Leitner.

I agree, I would certainly prefer to build from source. I even run Gentoo so I can build from source on my workstation. But I have only a small need for Java and don’t have the time to get a newer Java building from source in OE (nor an employer willing to pay for it). Since getting it building is non-trivial, and we’re moving away from Java anyway, the easy answer is to grab some trusted binaries and use them until we hopefully migrate fully away from Java.

Posting this to the list is mostly to share the work in the hope it’s useful to others in the same position. Ideally those more invested in Java would spend the time to write proper recipes.

> 
>> On Feb 5 2023, at 9:34 am, Robert Joslyn
>> <robert.joslyn@redrectangle.org> wrote:
>> 
>>> +++ b/recipes-core/temurin/temurin.inc
>>> @@ -0,0 +1,62 @@
>>> +HOMEPAGE = "https://adoptium.net"
>>> +LICENSE = "GPL-2.0-with-classpath-exception"
> 
> There are a lot more licenses involved according to:
> https://projects.eclipse.org/projects/adoptium.temurin

Hmm, I was going based on the NOTICE file in the tatrball which says, 

    This program and the accompanying materials are made available under the terms
    of the GNU General Public License, version 2, with the Classpath Exception.

    Additional information relating to the program and accompanying materials
    license and usage is available as follows.
      * For Eclipse Temurin version 8 see the LICENSE and ASSEMBLY_EXCEPTION files
        in the top level directory of the installation.
      * For Eclipse Temurin version 9 or later see the files under the legal/
        directory in the top level directory of the installation.

    SPDX-License-Identifier: GPL-2.0 WITH Classpath-exception-2.0

The legal directory in the tarball does have a LICENSE file for each library, but every one is a symlink to the same GPL-2.0 license file with a classpath exception. Maybe the other licenses are used for things that aren’t distributed as part of the binaries?

I could update the recipes to checksum the other LICENSE files to make sure they don’t change (there are 70 of them in the JDK and 50 in the JRE).

Thanks for the review!

Robert

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [oe] [meta-java][PATCH] temurin-jdk-17-bin/temurin-jre-17-bin: Add recipes
  2023-02-07  3:14     ` Robert Joslyn
@ 2023-02-07 17:16       ` Henning Heinold
  0 siblings, 0 replies; 4+ messages in thread
From: Henning Heinold @ 2023-02-07 17:16 UTC (permalink / raw)
  To: openembedded-devel; +Cc: dev

Am Mon, Feb 06, 2023 at 07:14:23PM -0800 schrieb Robert Joslyn:
> 
> > On Feb 6, 2023, at 12:03 PM, Henning Heinold <henning@itconsulting-heinold.de> wrote:
> > 
> > Am Sun, Feb 05, 2023 at 10:52:59AM -0800 schrieb Robert Joslyn:
> >> Sorry, forgot to add Richard L to CC when sending the patch!
> >> 
> >> Robert
> >> 
> > 
> > There are a lot more licenses involved according to:
> > https://projects.eclipse.org/projects/adoptium.temurin
> 
> Hmm, I was going based on the NOTICE file in the tatrball which says, 
> 
>     This program and the accompanying materials are made available under the terms
>     of the GNU General Public License, version 2, with the Classpath Exception.
> 
>     Additional information relating to the program and accompanying materials
>     license and usage is available as follows.
>       * For Eclipse Temurin version 8 see the LICENSE and ASSEMBLY_EXCEPTION files
>         in the top level directory of the installation.
>       * For Eclipse Temurin version 9 or later see the files under the legal/
>         directory in the top level directory of the installation.
> 
>     SPDX-License-Identifier: GPL-2.0 WITH Classpath-exception-2.0
> 
> The legal directory in the tarball does have a LICENSE file for each library, but every one is a symlink to the same GPL-2.0 license file with a classpath exception. Maybe the other licenses are used for things that aren’t distributed as part of the binaries?
> 
> I could update the recipes to checksum the other LICENSE files to make sure they don’t change (there are 70 of them in the JDK and 50 in the JRE).
> 

Hm okay I looked, at the openjdk page again and there still is only GPL-2.0 WITH Classpath-exception-2.0 as license.
So I think for now this that would overkill to add all links.

> Thanks for the review!
> 

Your are welcome.
> Robert

Bye Henning


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-02-07 17:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1740FE2141407D2F.20960@lists.openembedded.org>
2023-02-05 18:52 ` [oe] [meta-java][PATCH] temurin-jdk-17-bin/temurin-jre-17-bin: Add recipes Robert Joslyn
2023-02-06 20:03   ` Henning Heinold
2023-02-07  3:14     ` Robert Joslyn
2023-02-07 17:16       ` Henning Heinold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.