diff --git a/linux/Jenkinsfile b/linux/Jenkinsfile index 531053e72..bfebe36d5 100644 --- a/linux/Jenkinsfile +++ b/linux/Jenkinsfile @@ -38,7 +38,7 @@ pipeline { } parameters { choice(name: 'TYPE', choices: Types.ALL, description: 'Build JDK or JRE') - choice(name: 'VERSION', choices: ['8', '11', '17', '21', '22'], description: 'Build for specific JDK VERSION') + choice(name: 'VERSION', choices: ['8', '11', '17', '21', '22', '23'], description: 'Build for specific JDK VERSION') choice(name: 'ARCH', choices: ['x86_64', 'armv7hl', 'armv7l', 'aarch64', 'ppc64le', 's390x', 'riscv64', 'all'], description: 'Build for specific platform\n s390x not for VERSION 8\n Use armv7l for DebARM32 armv7hl for RH/Suse') choice(name: 'DISTRO', choices: ['all', 'Alpine', 'Debian', 'RedHat', 'Suse'], description: 'Build for specific Distro\n Select RPM builds for RedHat and Suse') booleanParam(name: 'uploadPackage', defaultValue: false, description: 'Tick this box to upload the deb/rpm files (exclude src.rpm) to Artifactory for official release') @@ -259,6 +259,9 @@ def jenkinsStepDeb() { // for one single ARCH add into array debArchAllList.add("${ARCH}") + // Due to the jenkinsfile issues with string/numberic comparisons + // The individual if statements ensure stability and consistency + // when ARCH = all, rewrite list if ("${ARCH}" == 'all') { debArchAllList = ['x86_64', 'armv7l', 'aarch64', 'ppc64le', 's390x', 'riscv64'] @@ -279,6 +282,10 @@ def jenkinsStepDeb() { if ("${VERSION}" == '22' && "${ARCH}" == 'all') { debArchAllList = ['x86_64', 'aarch64', 'ppc64le', 's390x', 'riscv64'] } + // remove Arm32 & add riscv64 for JDK23 + if ("${VERSION}" == '23' && "${ARCH}" == 'all') { + debArchAllList = ['x86_64', 'aarch64', 'ppc64le', 's390x', 'riscv64'] + } debArchAllList.each { DebARCH -> // special handle: no label x86_64 only x64 for debian agent @@ -413,6 +420,9 @@ def buildAndTest(String DISTRO, String buildArch, String VERSION) { case "22": debArchList.remove('armv7l') break + case "23": + debArchList.remove('armv7l') + break default: // Handle Any other cases by defaulting to the main list. break @@ -490,7 +500,7 @@ def uploadDebArtifacts(String buildArch, String Version) { 'riscv64' : 'riscv64' ] - if (['8', '11', '17', '21', '22'].contains(VERSION)) { + if (['8', '11', '17', '21', '22', '23'].contains(VERSION)) { debArchList = [ 'x86_64' : 'amd64', 'armv7l': 'armhf', @@ -499,8 +509,8 @@ def uploadDebArtifacts(String buildArch, String Version) { 's390x' : 's390x', 'riscv64' : 'riscv64' ] - if (['21', '22'].contains(VERSION)) { - debArchList.remove('armv7l') // Removing armv7l for versions 21 and 22 + if (['21', '22', '23'].contains(VERSION)) { + debArchList.remove('armv7l') // Removing armv7l for versions 21,22,23 } if (VERSION == "8") { debArchList.remove('s390x') // Removing s390x for version 8 @@ -513,7 +523,7 @@ def uploadDebArtifacts(String buildArch, String Version) { echo "Debian Architecture Upload List = ${debArchList}" /* - Debian/Ubuntu 10.0 11.0 16.04 20.04 22.04 22.10 + Debian/Ubuntu 10.0 11.0 16.04 20.04 22.04 22.10 24.04 add more into list when available for release also update linux/{jdk,jre}/debian/main/packing/build.sh */ @@ -611,6 +621,10 @@ def uploadRpmArtifacts(String DISTRO, String rpmArch, String Version) { rpmArchList['s390x'] = 's390x' rpmArchList['riscv64'] = 'riscv64' } + if (VERSION == '23') { + rpmArchList['s390x'] = 's390x' + rpmArchList['riscv64'] = 'riscv64' + } if ("${rpmArch}" != 'all') { // when only build and upload one arch, reset diff --git a/linux/jdk/alpine/src/main/packaging/temurin/23/APKBUILD b/linux/jdk/alpine/src/main/packaging/temurin/23/APKBUILD new file mode 100644 index 000000000..ab0801355 --- /dev/null +++ b/linux/jdk/alpine/src/main/packaging/temurin/23/APKBUILD @@ -0,0 +1,112 @@ +# Maintainer: Eclipse Adoptium Package Maintainers +pkgname=temurin-23 +pkgver=23_p37 +# replace _p1 with _1 +_pkgver=${pkgver/_p/_} +_pkgverplus=${pkgver/_p/+} +_pkgvername=${_pkgverplus/+/%2B} +pkgrel=1 +pkgdesc="Eclipse Temurin 23" +provider_priority=23 +url="https://adoptium.net" +arch="aarch64 x86_64" +license="GPL-2.0-with-classpath-exception" +makedepends=" + alsa-lib-dev + freetype-dev + libffi-dev + libjpeg-turbo-dev + libx11-dev + libxext-dev + libxrandr-dev + libxrender-dev + libxt-dev + libxtst-dev +" +depends="" +subpackages="$pkgname-src:_src:noarch + $pkgname-jdk:_jdk" +source=" + https://github.com/adoptium/temurin23-binaries/releases/download/jdk-$_pkgvername/OpenJDK23u-jdk_${CARCH/x86_64/x64}_alpine-linux_hotspot_$_pkgver.tar.gz + + HelloWorld.java + TestECDSA.java + TestCryptoLevel.java +" + +_java_home="/usr/lib/jvm/java-23-temurin" + +ldpath="$_java_home/lib:$_java_home/lib/server" +sonameprefix="$pkgname:" + +prepare() { + default_prepare +} + +check() { + local _java_bin="./jdk-$_pkgverplus/bin" + + # 1) compile and run a simple hello world + $_java_bin/javac -d . "$srcdir"/HelloWorld.java + $_java_bin/java HelloWorld + + # 2) compile and run a testcase for unlimited policy + $_java_bin/javac -d . "$srcdir"/TestCryptoLevel.java + $_java_bin/java -cp . --add-opens java.base/javax.crypto=ALL-UNNAMED TestCryptoLevel + + # 3) compile and run a testcase for ECDSA signatures + $_java_bin/javac -d . "$srcdir"/TestECDSA.java + $_java_bin/java TestECDSA +} + +package() { + mkdir -p "$pkgdir/$_java_home" + cp -r "$srcdir"/jdk-"$_pkgverplus"/* "$pkgdir/$_java_home" +} + +_src() { + pkgdesc="Eclipse Temurin 23 (sources)" + mkdir -p "$subpkgdir/$_java_home"/lib + mv "$pkgdir"/$_java_home/lib/src.zip \ + "$subpkgdir"/$_java_home/lib/ +} + +_jdk() { + pkgdesc="Eclipse Temurin 23 (JDK)" + provides="java-jdk java-jre" + depends="java-common java-cacerts" + _fromroot="$pkgdir/$_java_home" + _toroot="$subpkgdir/$_java_home" + + mkdir -p "$_toroot" + mv "$_fromroot/bin" "$_toroot" + mv "$_fromroot/conf" "$_toroot" + mv "$_fromroot/include" "$_toroot" + mv "$_fromroot/jmods" "$_toroot" + mv "$_fromroot/legal" "$_toroot" + mv "$_fromroot/lib" "$_toroot" + mv "$_fromroot/man" "$_toroot" + mv "$_fromroot/release" "$_toroot" + mv "$_fromroot/NOTICE" "$_toroot" + + # symlink to shared cacerts store + rm "$_toroot/lib/security/cacerts" + ln -sf /etc/ssl/certs/java/cacerts \ + "$_toroot/lib/security/cacerts" +} + +case "$CARCH" in + x86_64) + _arch_sum="bff4c78f30d8d173e622bf2f40c36113df47337fc6d1ee5105ed2459841165aa" + ;; + aarch64) + _arch_sum="7e842c9b8a44a5a21d83a3e38ae3b141cfbdb429dde70ff264d3da4bff44e1c7" + ;; +esac + +sha256sums=" +$_arch_sum OpenJDK23u-jdk_${CARCH/x86_64/x64}_alpine-linux_hotspot_$_pkgver.tar.gz +e9185736dde99a4dc570a645a20407bdb41c1f48dfc34d9c3eb246cf0435a378 HelloWorld.java +22d2ff9757549ebc64e09afd3423f84b5690dcf972cd6535211c07c66d38fab0 TestCryptoLevel.java +9fb00c7b0220de8f3ee2aa398459a37d119f43fd63321530a00b3bb9217dd933 TestECDSA.java +" diff --git a/linux/jdk/alpine/src/main/packaging/temurin/23/HelloWorld.java b/linux/jdk/alpine/src/main/packaging/temurin/23/HelloWorld.java new file mode 100644 index 000000000..0be813a19 --- /dev/null +++ b/linux/jdk/alpine/src/main/packaging/temurin/23/HelloWorld.java @@ -0,0 +1,3 @@ +public class HelloWorld { + public static void main(String[] args) { System.out.println("Hello World!"); } +} diff --git a/linux/jdk/alpine/src/main/packaging/temurin/23/TestCryptoLevel.java b/linux/jdk/alpine/src/main/packaging/temurin/23/TestCryptoLevel.java new file mode 100644 index 000000000..3ed6c8dc1 --- /dev/null +++ b/linux/jdk/alpine/src/main/packaging/temurin/23/TestCryptoLevel.java @@ -0,0 +1,72 @@ +/* TestCryptoLevel -- Ensure unlimited crypto policy is in use. + Copyright (C) 2012 Red Hat, Inc. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ + +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.InvocationTargetException; + +import java.security.Permission; +import java.security.PermissionCollection; + +public class TestCryptoLevel +{ + public static void main(String[] args) + throws NoSuchFieldException, ClassNotFoundException, + IllegalAccessException, InvocationTargetException + { + Class cls = null; + Method def = null, exempt = null; + + try + { + cls = Class.forName("javax.crypto.JceSecurity"); + } + catch (ClassNotFoundException ex) + { + System.err.println("Running a non-Sun JDK."); + System.exit(0); + } + try + { + def = cls.getDeclaredMethod("getDefaultPolicy"); + exempt = cls.getDeclaredMethod("getExemptPolicy"); + } + catch (NoSuchMethodException ex) + { + System.err.println("Running IcedTea with the original crypto patch."); + System.exit(0); + } + def.setAccessible(true); + exempt.setAccessible(true); + PermissionCollection defPerms = (PermissionCollection) def.invoke(null); + PermissionCollection exemptPerms = (PermissionCollection) exempt.invoke(null); + Class apCls = Class.forName("javax.crypto.CryptoAllPermission"); + Field apField = apCls.getDeclaredField("INSTANCE"); + apField.setAccessible(true); + Permission allPerms = (Permission) apField.get(null); + if (defPerms.implies(allPerms) && (exemptPerms == null || exemptPerms.implies(allPerms))) + { + System.err.println("Running with the unlimited policy."); + System.exit(0); + } + else + { + System.err.println("WARNING: Running with a restricted crypto policy."); + System.exit(-1); + } + } +} diff --git a/linux/jdk/alpine/src/main/packaging/temurin/23/TestECDSA.java b/linux/jdk/alpine/src/main/packaging/temurin/23/TestECDSA.java new file mode 100644 index 000000000..abd81d1ce --- /dev/null +++ b/linux/jdk/alpine/src/main/packaging/temurin/23/TestECDSA.java @@ -0,0 +1,49 @@ +/* TestECDSA -- Ensure ECDSA signatures are working. + Copyright (C) 2016 Red Hat, Inc. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ + +import java.math.BigInteger; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.Signature; + +/** + * @test + */ +public class TestECDSA { + + public static void main(String[] args) throws Exception { + KeyPairGenerator keyGen = KeyPairGenerator.getInstance("EC"); + KeyPair key = keyGen.generateKeyPair(); + + byte[] data = "This is a string to sign".getBytes("UTF-8"); + + Signature dsa = Signature.getInstance("NONEwithECDSA"); + dsa.initSign(key.getPrivate()); + dsa.update(data); + byte[] sig = dsa.sign(); + System.out.println("Signature: " + new BigInteger(1, sig).toString(16)); + + Signature dsaCheck = Signature.getInstance("NONEwithECDSA"); + dsaCheck.initVerify(key.getPublic()); + dsaCheck.update(data); + boolean success = dsaCheck.verify(sig); + if (!success) { + throw new RuntimeException("Test failed. Signature verification error"); + } + System.out.println("Test passed."); + } +} diff --git a/linux/jdk/debian/src/main/packaging/temurin/23/debian/changelog b/linux/jdk/debian/src/main/packaging/temurin/23/debian/changelog new file mode 100644 index 000000000..adbabf7fe --- /dev/null +++ b/linux/jdk/debian/src/main/packaging/temurin/23/debian/changelog @@ -0,0 +1,5 @@ +temurin-23-jdk (23.0.0.0.0+37) STABLE; urgency=medium + + * Eclipse Temurin 23.0.0.0.0+37 release. + + -- Eclipse Adoptium Package Maintainers Wed, 18 Sep 2024 00:00:00 +0000 diff --git a/linux/jdk/debian/src/main/packaging/temurin/23/debian/compat b/linux/jdk/debian/src/main/packaging/temurin/23/debian/compat new file mode 100644 index 000000000..b4de39476 --- /dev/null +++ b/linux/jdk/debian/src/main/packaging/temurin/23/debian/compat @@ -0,0 +1 @@ +11 diff --git a/linux/jdk/debian/src/main/packaging/temurin/23/debian/control b/linux/jdk/debian/src/main/packaging/temurin/23/debian/control new file mode 100644 index 000000000..369b24f61 --- /dev/null +++ b/linux/jdk/debian/src/main/packaging/temurin/23/debian/control @@ -0,0 +1,105 @@ +Source: temurin-23-jdk +Section: java +Priority: optional +Maintainer: Eclipse Adoptium Package Maintainers +Build-Depends: debhelper (>= 11), lsb-release + +Package: temurin-23-jdk +Architecture: amd64 arm64 ppc64el s390x riscv64 +Depends: adoptium-ca-certificates, + java-common, + libasound2, + libc6, + libx11-6, + libfontconfig1, + libfreetype6, + libxext6, + libxi6, + libxrender1, + libxtst6, + zlib1g +Recommends: fonts-dejavu-core, + fonts-dejavu-extra +Provides: java-compiler, + java-sdk, + java-sdk-headless, + java10-sdk, + java11-sdk, + java12-sdk, + java13-sdk, + java14-sdk, + java15-sdk, + java16-sdk, + java17-sdk, + java18-sdk, + java2-sdk, + java5-sdk, + java6-sdk, + java7-sdk, + java8-sdk, + java9-sdk, + java10-sdk-headless, + java11-sdk-headless, + java12-sdk-headless, + java13-sdk-headless, + java14-sdk-headless, + java15-sdk-headless, + java16-sdk-headless, + java17-sdk-headless, + java18-sdk-headless, + java19-sdk-headless, + java2-sdk-headless, + java20-sdk-headless, + java21-sdk-headless, + java22-sdk-headless, + java23-sdk-headless, + java5-sdk-headless, + java6-sdk-headless, + java7-sdk-headless, + java8-sdk-headless, + java9-sdk-headless, + java-runtime (= 23), + java-runtime-headless (= 23), + java10-runtime, + java11-runtime, + java12-runtime, + java13-runtime, + java14-runtime, + java15-runtime, + java16-runtime, + java17-runtime, + java18-runtime, + java19-runtime, + java2-runtime, + java20-runtime, + java21-runtime, + java22-runtime, + java23-runtime, + java5-runtime, + java6-runtime, + java7-runtime, + java8-runtime, + java9-runtime, + java10-runtime-headless, + java11-runtime-headless, + java12-runtime-headless, + java13-runtime-headless, + java14-runtime-headless, + java15-runtime-headless, + java16-runtime-headless, + java17-runtime-headless, + java18-runtime-headless, + java19-runtime-headless, + java2-runtime-headless, + java20-runtime-headless, + java21-runtime-headless, + java22-runtime-headless, + java23-runtime-headless, + java5-runtime-headless, + java6-runtime-headless, + java7-runtime-headless, + java8-runtime-headless, + java9-runtime-headless +Description: Eclipse Temurin 23 JDK + Eclipse Temurin JDK is an OpenJDK-based development environment to create + applications and components using the programming language Java. diff --git a/linux/jdk/debian/src/main/packaging/temurin/23/debian/copyright b/linux/jdk/debian/src/main/packaging/temurin/23/debian/copyright new file mode 100644 index 000000000..0a1694bd6 --- /dev/null +++ b/linux/jdk/debian/src/main/packaging/temurin/23/debian/copyright @@ -0,0 +1,5 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Files: * +Copyright: Oracle and/or its affiliates +License: GPL-2.0+CE \ No newline at end of file diff --git a/linux/jdk/debian/src/main/packaging/temurin/23/debian/jinfo.in b/linux/jdk/debian/src/main/packaging/temurin/23/debian/jinfo.in new file mode 100644 index 000000000..b538329a2 --- /dev/null +++ b/linux/jdk/debian/src/main/packaging/temurin/23/debian/jinfo.in @@ -0,0 +1,36 @@ +name=@pkg_alias@ +alias=@pkg_alias@ +priority=@priority@ +section=contrib + +jdkhl jar /usr/lib/jvm/@jvm_dir@/bin/jar +jdkhl jarsigner /usr/lib/jvm/@jvm_dir@/bin/jarsigner +hl java /usr/lib/jvm/@jvm_dir@/bin/java +jdkhl javac /usr/lib/jvm/@jvm_dir@/bin/javac +jdkhl javadoc /usr/lib/jvm/@jvm_dir@/bin/javadoc +jdkhl javap /usr/lib/jvm/@jvm_dir@/bin/javap +jdkhl jcmd /usr/lib/jvm/@jvm_dir@/bin/jcmd +jdk jconsole /usr/lib/jvm/@jvm_dir@/bin/jconsole +jdkhl jdb /usr/lib/jvm/@jvm_dir@/bin/jdb +jdkhl jdeprscan /usr/lib/jvm/@jvm_dir@/bin/jdeprscan +jdkhl jdeps /usr/lib/jvm/@jvm_dir@/bin/jdeps +hl jfr /usr/lib/jvm/@jvm_dir@/bin/jfr +jdkhl jhsdb /usr/lib/jvm/@jvm_dir@/bin/jhsdb +jdkhl jimage /usr/lib/jvm/@jvm_dir@/bin/jimage +jdkhl jinfo /usr/lib/jvm/@jvm_dir@/bin/jinfo +jdkhl jlink /usr/lib/jvm/@jvm_dir@/bin/jlink +jdkhl jmap /usr/lib/jvm/@jvm_dir@/bin/jmap +jdkhl jmod /usr/lib/jvm/@jvm_dir@/bin/jmod +jdkhl jpackage /usr/lib/jvm/@jvm_dir@/bin/jpackage +jdkhl jps /usr/lib/jvm/@jvm_dir@/bin/jps +hl jrunscript /usr/lib/jvm/@jvm_dir@/bin/jrunscript +jdkhl jshell /usr/lib/jvm/@jvm_dir@/bin/jshell +jdkhl jstack /usr/lib/jvm/@jvm_dir@/bin/jstack +jdkhl jstat /usr/lib/jvm/@jvm_dir@/bin/jstat +jdkhl jstatd /usr/lib/jvm/@jvm_dir@/bin/jstatd +jdkhl jwebserver /usr/lib/jvm/@jvm_dir@/bin/jwebserver +hl keytool /usr/lib/jvm/@jvm_dir@/bin/keytool +hl rmiregistry /usr/lib/jvm/@jvm_dir@/bin/rmiregistry +jdkhl serialver /usr/lib/jvm/@jvm_dir@/bin/serialver +hl jexec /usr/lib/jvm/@jvm_dir@/lib/jexec +hl jspawnhelper /usr/lib/jvm/@jvm_dir@/lib/jspawnhelper diff --git a/linux/jdk/debian/src/main/packaging/temurin/23/debian/postinst.in b/linux/jdk/debian/src/main/packaging/temurin/23/debian/postinst.in new file mode 100644 index 000000000..cc1c4dbcb --- /dev/null +++ b/linux/jdk/debian/src/main/packaging/temurin/23/debian/postinst.in @@ -0,0 +1,42 @@ +#!/bin/sh +set -eu + +priority="@priority@" +jdk_base_dir="/usr/lib/jvm/@jvm_dir@" +tools="@jvm_tools@" + +case "$1" in +configure) + for tool in $tools; do + for tool_path in "$jdk_base_dir/bin/$tool" "$jdk_base_dir/lib/$tool"; do + if [ ! -e "$tool_path" ]; then + continue + fi + + slave="" + tool_man_path="$jdk_base_dir/man/man1/$tool.1" + if [ -e "$tool_man_path" ]; then + slave="--slave /usr/share/man/man1/$tool.1 $tool.1 $tool_man_path" + fi + + update-alternatives \ + --install \ + "/usr/bin/$tool" \ + "$tool" \ + "$tool_path" \ + "$priority" \ + $slave + done + done + ;; + +abort-upgrade | abort-remove | abort-deconfigure) + # Nothing to do + ;; +*) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/linux/jdk/debian/src/main/packaging/temurin/23/debian/prerm.in b/linux/jdk/debian/src/main/packaging/temurin/23/debian/prerm.in new file mode 100644 index 000000000..85999aefa --- /dev/null +++ b/linux/jdk/debian/src/main/packaging/temurin/23/debian/prerm.in @@ -0,0 +1,28 @@ +#!/bin/sh +set -eu + +jdk_base_dir="/usr/lib/jvm/@jvm_dir@" +tools="@jvm_tools@" + +case "$1" in +purge) + # Nothing to do + ;; +remove | upgrade | failed-upgrade | abort-install | abort-upgrade | disappear | deconfigure) + for tool in $tools; do + for tool_path in "$jdk_base_dir/bin/$tool" "$jdk_base_dir/lib/$tool"; do + if [ ! -e "$tool_path" ]; then + continue + fi + + update-alternatives --remove "$tool" "$tool_path" + done + done + ;; +*) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/linux/jdk/debian/src/main/packaging/temurin/23/debian/rules b/linux/jdk/debian/src/main/packaging/temurin/23/debian/rules new file mode 100644 index 000000000..b73e6ec70 --- /dev/null +++ b/linux/jdk/debian/src/main/packaging/temurin/23/debian/rules @@ -0,0 +1,81 @@ +#!/usr/bin/make -f + +pkg_name = temurin-23-jdk +priority = 2311 +jvm_tools = jar jarsigner java javac javadoc javap jcmd jconsole jdb jdeprscan jdeps jfr jhsdb jimage jinfo jlink jmap jmod jpackage jps jrunscript jshell jstack jstat jstatd jwebserver keytool rmiregistry serialver jexec jspawnhelper + +amd64_tarball_url = https://github.com/adoptium/temurin23-binaries/releases/download/jdk-23%2B37/OpenJDK23U-jdk_x64_linux_hotspot_23_37.tar.gz +amd64_checksum = 630c4f3870056e7e005736ec1edc34ee63a9b45e2027582c52f53a9bf44314b8 +arm64_tarball_url = https://github.com/adoptium/temurin23-binaries/releases/download/jdk-23%2B37/OpenJDK23U-jdk_aarch64_linux_hotspot_23_37.tar.gz +arm64_checksum = e8043d1bd9c4f42c5cf7883aca1fc3ef6bcccf4a664f378818ac0fd4fb987b7e +ppc64el_tarball_url = https://github.com/adoptium/temurin23-binaries/releases/download/jdk-23%2B37/OpenJDK23U-jdk_ppc64le_linux_hotspot_23_37.tar.gz +ppc64el_checksum = 4d3b0609c783dea1f6a899bfc8c84b4000d1f48f39e2489d70050bbf2c7f7d9c +s390x_tarball_url = https://github.com/adoptium/temurin23-binaries/releases/download/jdk-23%2B37/OpenJDK23U-jdk_s390x_linux_hotspot_23_37.tar.gz +s390x_checksum = 2f9cb1db72ddc91f0b90904d038bca9314bc0bafedb0efe1233469bf3c934e58 +riscv64_tarball_url = https://github.com/adoptium/temurin23-binaries/releases/download/jdk-23%2B37/OpenJDK23U-jdk_riscv64_linux_hotspot_23_37.tar.gz +riscv64_checksum = d401699a92469de7bfb72909c1d11019537a0a2c21af01a8dce1831f09ef5165 + +d = debian/$(pkg_name) +jvm_home = usr/lib/jvm +jvm_dir = $(pkg_name)-$(DEB_HOST_ARCH) +pkg_alias = $(pkg_name)-$(DEB_HOST_ARCH) + +%: + dh $@ + +override_dh_auto_clean: +override_dh_auto_test: +override_dh_auto_build: +override_dh_strip: +override_dh_auto_install: + # Download and verify checksum of JDK + wget --progress=dot:mega -O jdk.tar.gz $($(DEB_HOST_ARCH)_tarball_url) + echo '$($(DEB_HOST_ARCH)_checksum) jdk.tar.gz' > jdk.tar.gz.sha256.txt + sha256sum -c jdk.tar.gz.sha256.txt + + # Substitute variables. + sed \ + -e 's/@pkg_alias@/$(pkg_alias)/g' \ + -e 's/@jvm_dir@/$(jvm_dir)/g' \ + -e 's/@priority@/$(priority)/g' \ + -e 's/@jvm_tools@/$(jvm_tools)/g' \ + debian/jinfo.in > debian/jinfo + + sed \ + -e 's/@pkg_alias@/$(pkg_alias)/g' \ + -e 's/@jvm_dir@/$(jvm_dir)/g' \ + -e 's/@priority@/$(priority)/g' \ + -e 's/@jvm_tools@/$(jvm_tools)/g' \ + debian/postinst.in > debian/postinst + + sed \ + -e 's/@pkg_alias@/$(pkg_alias)/g' \ + -e 's/@jvm_dir@/$(jvm_dir)/g' \ + -e 's/@priority@/$(priority)/g' \ + -e 's/@jvm_tools@/$(jvm_tools)/g' \ + debian/prerm.in > debian/prerm + + # Unpack JDK. + dh_installdirs \ + $(jvm_home) \ + $(jvm_home)/$(jvm_dir) + tar --strip-components=1 -C "$(d)/$(jvm_home)/$(jvm_dir)" -xf jdk.tar.gz + + # Add jinfo file (alternatives support). + cp debian/jinfo "$(d)/$(jvm_home)/.$(pkg_alias).jinfo" + + # Replace bundled cacerts and redirect to adoptium-ca-certificates. + rm -f "$(d)/$(jvm_home)/$(jvm_dir)/lib/security/cacerts" + ln -s /etc/ssl/certs/adoptium/cacerts "$(d)/$(jvm_home)/$(jvm_dir)/lib/security/cacerts" + + # Ensure src.zip is present in the root folder of the JDK. + if [ ! -f "$(d)/$(jvm_home)/$(jvm_dir)/src.zip" ]; then \ + if [ ! -f "$(d)/$(jvm_home)/$(jvm_dir)/lib/src.zip" ] ; then \ + echo "Missing src.zip in binary distribution"; \ + exit 1; \ + fi; \ + ln -s lib/src.zip "$(d)/$(jvm_home)/$(jvm_dir)/src.zip"; \ + fi; + +override_dh_gencontrol: + dh_gencontrol -- diff --git a/linux/jdk/redhat/src/main/packaging/temurin/23/temurin-23-jdk.spec b/linux/jdk/redhat/src/main/packaging/temurin/23/temurin-23-jdk.spec new file mode 100644 index 000000000..d331ad40b --- /dev/null +++ b/linux/jdk/redhat/src/main/packaging/temurin/23/temurin-23-jdk.spec @@ -0,0 +1,256 @@ +%global upstream_version 23+37 +# Only [A-Za-z0-9.] allowed in version: +# https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_upstream_uses_invalid_characters_in_the_version +# also not very intuitive: +# $ rpmdev-vercmp 23.0.0.0.0___23.0.0.0.0+1 +# 23.0.0.0.0___1 == 23.0.0.0.0+37 +%global spec_version 23.0.0.0.0.0 +%global spec_release 0 +%global priority 2300 + +%global source_url_base https://github.com/adoptium/temurin23-binaries/releases/download +%global upstream_version_url %(echo %{upstream_version} | sed 's/\+/%%2B/g') +%global upstream_version_no_plus %(echo %{upstream_version} | sed 's/\+/_/g') +%global java_provides openjdk + +# Map architecture to the expected value in the download URL; Allow for a +# pre-defined value of vers_arch and use that if it's defined + +%ifarch x86_64 +%global vers_arch x64 +%global vers_arch2 ppc64le +%global vers_arch3 aarch64 +%global vers_arch4 s390x +%global vers_arch5 riscv64 +%global src_num 0 +%global sha_src_num 1 +%endif +%ifarch ppc64le +%global vers_arch x64 +%global vers_arch2 ppc64le +%global vers_arch3 aarch64 +%global vers_arch4 s390x +%global vers_arch5 riscv64 +%global src_num 2 +%global sha_src_num 3 +%endif +%ifarch aarch64 +%global vers_arch x64 +%global vers_arch2 ppc64le +%global vers_arch3 aarch64 +%global vers_arch4 s390x +%global vers_arch5 riscv64 +%global src_num 4 +%global sha_src_num 5 +%endif +%ifarch s390x +%global vers_arch x64 +%global vers_arch2 ppc64le +%global vers_arch3 aarch64 +%global vers_arch4 s390x +%global vers_arch5 riscv64 +%global src_num 6 +%global sha_src_num 7 +%endif +%ifarch riscv64 +%global vers_arch x64 +%global vers_arch2 ppc64le +%global vers_arch3 aarch64 +%global vers_arch4 s390x +%global vers_arch5 riscv64 +%global src_num 8 +%global sha_src_num 9 +%endif +# Allow for noarch SRPM build +%ifarch noarch +%global src_num 0 +%global sha_src_num 1 +%endif + +Name: temurin-23-jdk +Version: %{spec_version} +Release: %{spec_release} +Summary: Eclipse Temurin 23 JDK + +Group: java +License: GPLv2 with exceptions +Vendor: Eclipse Adoptium +URL: https://projects.eclipse.org/projects/adoptium +Packager: Eclipse Adoptium Package Maintainers + +AutoReqProv: no +Prefix: /usr/lib/jvm/%{name} + +ExclusiveArch: x86_64 ppc64le aarch64 s390x riscv64 + +BuildRequires: tar +BuildRequires: wget + +Requires: /bin/sh +Requires: /usr/sbin/alternatives +Requires: ca-certificates +Requires: dejavu-sans-fonts +Requires: libX11%{?_isa} +Requires: libXext%{?_isa} +Requires: libXi%{?_isa} +Requires: libXrender%{?_isa} +Requires: libXtst%{?_isa} +Requires: alsa-lib%{?_isa} +Requires: glibc%{?_isa} +Requires: zlib%{?_isa} +Requires: fontconfig%{?_isa} +Requires: freetype%{?_isa} + +Provides: java +Provides: java-23 +Provides: java-23-devel +Provides: java-23-headless +Provides: java-23-%{java_provides} +Provides: java-23-%{java_provides}-devel +Provides: java-23-%{java_provides}-headless +Provides: java-devel +Provides: java-devel-%{java_provides} +Provides: java-headless +Provides: java-%{java_provides} +Provides: java-%{java_provides}-devel +Provides: java-%{java_provides}-headless +Provides: java-sdk +Provides: java-sdk-23 +Provides: java-sdk-23-%{java_provides} +Provides: java-sdk-%{java_provides} + +# First architecture (x86_64) +Source0: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jdk_%{vers_arch}_linux_hotspot_%{upstream_version_no_plus}.tar.gz +Source1: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jdk_%{vers_arch}_linux_hotspot_%{upstream_version_no_plus}.tar.gz.sha256.txt +# Second architecture (ppc64le) +Source2: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jdk_%{vers_arch2}_linux_hotspot_%{upstream_version_no_plus}.tar.gz +Source3: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jdk_%{vers_arch2}_linux_hotspot_%{upstream_version_no_plus}.tar.gz.sha256.txt +# Third architecture (aarch64) +Source4: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jdk_%{vers_arch3}_linux_hotspot_%{upstream_version_no_plus}.tar.gz +Source5: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jdk_%{vers_arch3}_linux_hotspot_%{upstream_version_no_plus}.tar.gz.sha256.txt +# Fourth architecture (s390x) +Source6: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jdk_%{vers_arch4}_linux_hotspot_%{upstream_version_no_plus}.tar.gz +Source7: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jdk_%{vers_arch4}_linux_hotspot_%{upstream_version_no_plus}.tar.gz.sha256.txt +# Fifth architecture (riscv64) +Source8: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jdk_%{vers_arch5}_linux_hotspot_%{upstream_version_no_plus}.tar.gz +Source9: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jdk_%{vers_arch5}_linux_hotspot_%{upstream_version_no_plus}.tar.gz.sha256.txt + +# Set the compression format to xz to be compatible with more Red Hat flavours. Newer versions of Fedora use zstd which +# is not available on CentOS 7, for example. https://github.com/rpm-software-management/rpm/blob/master/macros.in#L353 +# lists the available options. +%define _source_payload w7.xzdio +%define _binary_payload w7.xzdio + +# Avoid build failures on some distros due to missing build-id in binaries. +%global debug_package %{nil} +%global __brp_strip %{nil} + +%description +Eclipse Temurin JDK is an OpenJDK-based development environment to create +applications and components using the programming language Java. + +%prep +pushd "%{_sourcedir}" +sha256sum -c "%{expand:%{SOURCE%{sha_src_num}}}" +popd + +%setup -n jdk-%{upstream_version} -T -b %{src_num} + +%build +# noop + +%install +mkdir -p %{buildroot}%{prefix} +cd %{buildroot}%{prefix} +tar --strip-components=1 -C "%{buildroot}%{prefix}" -xf %{expand:%{SOURCE%{src_num}}} + +# Use cacerts included in OS +rm -f "%{buildroot}%{prefix}/lib/security/cacerts" +pushd "%{buildroot}%{prefix}/lib/security" +ln -s /etc/pki/java/cacerts "%{buildroot}%{prefix}/lib/security/cacerts" +popd + +# Ensure systemd-tmpfiles-clean does not remove pid files +# https://bugzilla.redhat.com/show_bug.cgi?id=1704608 +%{__mkdir} -p %{buildroot}/usr/lib/tmpfiles.d +echo 'x /tmp/hsperfdata_*' > "%{buildroot}/usr/lib/tmpfiles.d/%{name}.conf" +echo 'x /tmp/.java_pid*' >> "%{buildroot}/usr/lib/tmpfiles.d/%{name}.conf" + +%post +if [ $1 -ge 1 ] ; then + update-alternatives --install %{_bindir}/java java %{prefix}/bin/java %{priority} \ + --slave %{_bindir}/keytool keytool %{prefix}/bin/keytool \ + --slave %{_bindir}/rmiregistry rmiregistry %{prefix}/bin/rmiregistry \ + --slave %{_bindir}/jexec jexec %{prefix}/lib/jexec \ + --slave %{_bindir}/jspawnhelper jspawnhelper %{prefix}/lib/jspawnhelper \ + --slave %{_mandir}/man1/java.1 java.1 %{prefix}/man/man1/java.1 \ + --slave %{_mandir}/man1/keytool.1 keytool.1 %{prefix}/man/man1/keytool.1 \ + --slave %{_mandir}/man1/rmiregistry.1 rmiregistry.1 %{prefix}/man/man1/rmiregistry.1 \ + + update-alternatives --install %{_bindir}/javac javac %{prefix}/bin/javac %{priority} \ + --slave %{_bindir}/jar jar %{prefix}/bin/jar \ + --slave %{_bindir}/jarsigner jarsigner %{prefix}/bin/jarsigner \ + --slave %{_bindir}/javadoc javadoc %{prefix}/bin/javadoc \ + --slave %{_bindir}/javap javap %{prefix}/bin/javap \ + --slave %{_bindir}/jcmd jcmd %{prefix}/bin/jcmd \ + --slave %{_bindir}/jconsole jconsole %{prefix}/bin/jconsole \ + --slave %{_bindir}/jdb jdb %{prefix}/bin/jdb \ + --slave %{_bindir}/jdeprscan jdeprscan %{prefix}/bin/jdeprscan \ + --slave %{_bindir}/jdeps jdeps %{prefix}/bin/jdeps \ + --slave %{_bindir}/jfr jfr %{prefix}/bin/jfr \ + --slave %{_bindir}/jhsdb jhsdb %{prefix}/bin/jhsdb \ + --slave %{_bindir}/jimage jimage %{prefix}/bin/jimage \ + --slave %{_bindir}/jinfo jinfo %{prefix}/bin/jinfo \ + --slave %{_bindir}/jlink jlink %{prefix}/bin/jlink \ + --slave %{_bindir}/jmap jmap %{prefix}/bin/jmap \ + --slave %{_bindir}/jmod jmod %{prefix}/bin/jmod \ + --slave %{_bindir}/jpackage jpackage %{prefix}/bin/jpackage \ + --slave %{_bindir}/jps jps %{prefix}/bin/jps \ + --slave %{_bindir}/jrunscript jrunscript %{prefix}/bin/jrunscript \ + --slave %{_bindir}/jshell jshell %{prefix}/bin/jshell \ + --slave %{_bindir}/jstack jstack %{prefix}/bin/jstack \ + --slave %{_bindir}/jstat jstat %{prefix}/bin/jstat \ + --slave %{_bindir}/jstatd jstatd %{prefix}/bin/jstatd \ + --slave %{_bindir}/jwebserver jwebserver %{prefix}/bin/jwebserver \ + --slave %{_bindir}/serialver serialver %{prefix}/bin/serialver \ + --slave %{_mandir}/man1/jar.1 jar.1 %{prefix}/man/man1/jar.1 \ + --slave %{_mandir}/man1/jarsigner.1 jarsigner.1 %{prefix}/man/man1/jarsigner.1 \ + --slave %{_mandir}/man1/javac.1 javac.1 %{prefix}/man/man1/javac.1 \ + --slave %{_mandir}/man1/javadoc.1 javadoc.1 %{prefix}/man/man1/javadoc.1 \ + --slave %{_mandir}/man1/javap.1 javap.1 %{prefix}/man/man1/javap.1 \ + --slave %{_mandir}/man1/jcmd.1 jcmd.1 %{prefix}/man/man1/jcmd.1 \ + --slave %{_mandir}/man1/jconsole.1 jconsole.1 %{prefix}/man/man1/jconsole.1 \ + --slave %{_mandir}/man1/jdb.1 jdb.1 %{prefix}/man/man1/jdb.1 \ + --slave %{_mandir}/man1/jdeprscan.1 jdeprscan.1 %{prefix}/man/man1/jdeprscan.1 \ + --slave %{_mandir}/man1/jdeps.1 jdeps.1 %{prefix}/man/man1/jdeps.1 \ + --slave %{_mandir}/man1/jfr.1 jfr.1 %{prefix}/man/man1/jfr.1 \ + --slave %{_mandir}/man1/jhsdb.1 jhsdb.1 %{prefix}/man/man1/jhsdb.1 \ + --slave %{_mandir}/man1/jinfo.1 jinfo.1 %{prefix}/man/man1/jinfo.1 \ + --slave %{_mandir}/man1/jlink.1 jlink.1 %{prefix}/man/man1/jlink.1 \ + --slave %{_mandir}/man1/jmap.1 jmap.1 %{prefix}/man/man1/jmap.1 \ + --slave %{_mandir}/man1/jmod.1 jmod.1 %{prefix}/man/man1/jmod.1 \ + --slave %{_mandir}/man1/jpackage.1 jpackage.1 %{prefix}/man/man1/jpackage.1 \ + --slave %{_mandir}/man1/jps.1 jps.1 %{prefix}/man/man1/jps.1 \ + --slave %{_mandir}/man1/jrunscript.1 jrunscript.1 %{prefix}/man/man1/jrunscript.1 \ + --slave %{_mandir}/man1/jshell.1 jshell.1 %{prefix}/man/man1/jshell.1 \ + --slave %{_mandir}/man1/jstack.1 jstack.1 %{prefix}/man/man1/jstack.1 \ + --slave %{_mandir}/man1/jstat.1 jstat.1 %{prefix}/man/man1/jstat.1 \ + --slave %{_mandir}/man1/jstatd.1 jstatd.1 %{prefix}/man/man1/jstatd.1 \ + --slave %{_mandir}/man1/jwebserver.1 jwebserver.1 %{prefix}/man/man1/jwebserver.1 \ + --slave %{_mandir}/man1/serialver.1 serialver.1 %{prefix}/man/man1/serialver.1 +fi + +%preun +if [ $1 -eq 0 ]; then + update-alternatives --remove java %{prefix}/bin/java + update-alternatives --remove javac %{prefix}/bin/javac +fi + +%files +%defattr(-,root,root) +%{prefix} +/usr/lib/tmpfiles.d/%{name}.conf + +%changelog +* Wed Sep 18 2024 Eclipse Adoptium Package Maintainers 23.0.0.0.0.37-0 +- Eclipse Temurin 23+37 release 0. diff --git a/linux/jdk/suse/src/main/packaging/temurin/23/temurin-23-jdk.spec b/linux/jdk/suse/src/main/packaging/temurin/23/temurin-23-jdk.spec new file mode 100644 index 000000000..d62c523de --- /dev/null +++ b/linux/jdk/suse/src/main/packaging/temurin/23/temurin-23-jdk.spec @@ -0,0 +1,246 @@ +%global upstream_version 23+37 +# Only [A-Za-z0-9.] allowed in version: +# https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_upstream_uses_invalid_characters_in_the_version +# also not very intuitive: +# $ rpmdev-vercmp 23.0.0.0.0___23.0.0.0.0+1 +# 23.0.0.0.0___1 == 23.0.0.0.0+37 +%global spec_version 23.0.0.0.0.37 +%global spec_release 0 +%global priority 2300 + +%global source_url_base https://github.com/adoptium/temurin23-binaries/releases/download +%global upstream_version_url %(echo %{upstream_version} | sed 's/\+/%%2B/g') +%global upstream_version_no_plus %(echo %{upstream_version} | sed 's/\+/_/g') +%global java_provides openjdk + +# Map architecture to the expected value in the download URL; Allow for a +# pre-defined value of vers_arch and use that if it's defined + +%ifarch x86_64 +%global vers_arch x64 +%global vers_arch2 ppc64le +%global vers_arch3 aarch64 +%global vers_arch4 s390x +%global vers_arch5 riscv64 +%global src_num 0 +%global sha_src_num 1 +%endif +%ifarch ppc64le +%global vers_arch x64 +%global vers_arch2 ppc64le +%global vers_arch3 aarch64 +%global vers_arch4 s390x +%global vers_arch5 riscv64 +%global src_num 2 +%global sha_src_num 3 +%endif +%ifarch aarch64 +%global vers_arch x64 +%global vers_arch2 ppc64le +%global vers_arch3 aarch64 +%global vers_arch4 s390x +%global vers_arch5 riscv64 +%global src_num 4 +%global sha_src_num 5 +%endif +%ifarch s390x +%global vers_arch x64 +%global vers_arch2 ppc64le +%global vers_arch3 aarch64 +%global vers_arch4 s390x +%global vers_arch5 riscv64 +%global src_num 6 +%global sha_src_num 7 +%endif +%ifarch riscv64 +%global vers_arch x64 +%global vers_arch2 ppc64le +%global vers_arch3 aarch64 +%global vers_arch4 s390x +%global vers_arch5 riscv64 +%global src_num 8 +%global sha_src_num 9 +%endif +# Allow for noarch SRPM build +%ifarch noarch +%global src_num 0 +%global sha_src_num 1 +%endif + +Name: temurin-23-jdk +Version: %{spec_version} +Release: %{spec_release} +Summary: Eclipse Temurin 23 JDK + +Group: java +License: GPLv2 with exceptions +Vendor: Eclipse Adoptium +URL: https://projects.eclipse.org/projects/adoptium +Packager: Eclipse Adoptium Package Maintainers + +AutoReqProv: no +Prefix: %{_libdir}/jvm/%{name} + +ExclusiveArch: x86_64 ppc64le aarch64 s390x riscv64 + +BuildRequires: tar +BuildRequires: wget + +Requires: /bin/sh +Requires: /usr/sbin/alternatives +Requires: ca-certificates +Requires: dejavu-fonts +Requires: libX11-6%{?_isa} +Requires: libXext6%{?_isa} +Requires: libXi6%{?_isa} +Requires: libXrender1%{?_isa} +Requires: libXtst6%{?_isa} +Requires: libasound2%{?_isa} +Requires: glibc%{?_isa} +Requires: libz1%{?_isa} +Requires: fontconfig%{?_isa} +Requires: libfreetype6%{?_isa} + +Provides: java +Provides: java-23 +Provides: java-23-devel +Provides: java-23-headless +Provides: java-23-%{java_provides} +Provides: java-23-%{java_provides}-devel +Provides: java-23-%{java_provides}-headless +Provides: java-devel +Provides: java-devel-%{java_provides} +Provides: java-headless +Provides: java-%{java_provides} +Provides: java-%{java_provides}-devel +Provides: java-%{java_provides}-headless +Provides: java-sdk +Provides: java-sdk-23 +Provides: java-sdk-23-%{java_provides} +Provides: java-sdk-%{java_provides} + +# First architecture (x86_64) +Source0: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jdk_%{vers_arch}_linux_hotspot_%{upstream_version_no_plus}.tar.gz +Source1: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jdk_%{vers_arch}_linux_hotspot_%{upstream_version_no_plus}.tar.gz.sha256.txt +# Second architecture (ppc64le) +Source2: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jdk_%{vers_arch2}_linux_hotspot_%{upstream_version_no_plus}.tar.gz +Source3: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jdk_%{vers_arch2}_linux_hotspot_%{upstream_version_no_plus}.tar.gz.sha256.txt +# Third architecture (aarch64) +Source4: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jdk_%{vers_arch3}_linux_hotspot_%{upstream_version_no_plus}.tar.gz +Source5: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jdk_%{vers_arch3}_linux_hotspot_%{upstream_version_no_plus}.tar.gz.sha256.txt +# Fourth architecture (s390x) +Source6: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jdk_%{vers_arch4}_linux_hotspot_%{upstream_version_no_plus}.tar.gz +Source7: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jdk_%{vers_arch4}_linux_hotspot_%{upstream_version_no_plus}.tar.gz.sha256.txt +# Fifth architecture (riscv64) +Source8: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jdk_%{vers_arch5}_linux_hotspot_%{upstream_version_no_plus}.tar.gz +Source9: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jdk_%{vers_arch5}_linux_hotspot_%{upstream_version_no_plus}.tar.gz.sha256.txt + +# Avoid build failures on some distros due to missing build-id in binaries. +%global debug_package %{nil} +%global __brp_strip %{nil} + +%description +Eclipse Temurin JDK is an OpenJDK-based development environment to create +applications and components using the programming language Java. + +%prep +pushd "%{_sourcedir}" +sha256sum -c "%{expand:%{SOURCE%{sha_src_num}}}" +popd + +%setup -n jdk-%{upstream_version} -T -b %{src_num} + +%build +# noop + +%install +mkdir -p %{buildroot}%{prefix} +cd %{buildroot}%{prefix} +tar --strip-components=1 -C "%{buildroot}%{prefix}" -xf %{expand:%{SOURCE%{src_num}}} + +# Use cacerts included in OS +rm -f "%{buildroot}%{prefix}/lib/security/cacerts" +pushd "%{buildroot}%{prefix}/lib/security" +ln -s /var/lib/ca-certificates/java-cacerts "%{buildroot}%{prefix}/lib/security/cacerts" +popd + +%pretrans +# noop + +%post +if [ $1 -ge 1 ] ; then + update-alternatives --install %{_bindir}/java java %{prefix}/bin/java %{priority} \ + --slave %{_bindir}/keytool keytool %{prefix}/bin/keytool \ + --slave %{_bindir}/rmiregistry rmiregistry %{prefix}/bin/rmiregistry \ + --slave %{_bindir}/jexec jexec %{prefix}/lib/jexec \ + --slave %{_bindir}/jspawnhelper jspawnhelper %{prefix}/lib/jspawnhelper \ + --slave %{_mandir}/man1/java.1 java.1 %{prefix}/man/man1/java.1 \ + --slave %{_mandir}/man1/keytool.1 keytool.1 %{prefix}/man/man1/keytool.1 \ + --slave %{_mandir}/man1/rmiregistry.1 rmiregistry.1 %{prefix}/man/man1/rmiregistry.1 \ + + update-alternatives --install %{_bindir}/javac javac %{prefix}/bin/javac %{priority} \ + --slave %{_bindir}/jar jar %{prefix}/bin/jar \ + --slave %{_bindir}/jarsigner jarsigner %{prefix}/bin/jarsigner \ + --slave %{_bindir}/javadoc javadoc %{prefix}/bin/javadoc \ + --slave %{_bindir}/javap javap %{prefix}/bin/javap \ + --slave %{_bindir}/jcmd jcmd %{prefix}/bin/jcmd \ + --slave %{_bindir}/jconsole jconsole %{prefix}/bin/jconsole \ + --slave %{_bindir}/jdb jdb %{prefix}/bin/jdb \ + --slave %{_bindir}/jdeprscan jdeprscan %{prefix}/bin/jdeprscan \ + --slave %{_bindir}/jdeps jdeps %{prefix}/bin/jdeps \ + --slave %{_bindir}/jfr jfr %{prefix}/bin/jfr \ + --slave %{_bindir}/jhsdb jhsdb %{prefix}/bin/jhsdb \ + --slave %{_bindir}/jimage jimage %{prefix}/bin/jimage \ + --slave %{_bindir}/jinfo jinfo %{prefix}/bin/jinfo \ + --slave %{_bindir}/jlink jlink %{prefix}/bin/jlink \ + --slave %{_bindir}/jmap jmap %{prefix}/bin/jmap \ + --slave %{_bindir}/jmod jmod %{prefix}/bin/jmod \ + --slave %{_bindir}/jpackage jpackage %{prefix}/bin/jpackage \ + --slave %{_bindir}/jps jps %{prefix}/bin/jps \ + --slave %{_bindir}/jrunscript jrunscript %{prefix}/bin/jrunscript \ + --slave %{_bindir}/jshell jshell %{prefix}/bin/jshell \ + --slave %{_bindir}/jstack jstack %{prefix}/bin/jstack \ + --slave %{_bindir}/jstat jstat %{prefix}/bin/jstat \ + --slave %{_bindir}/jstatd jstatd %{prefix}/bin/jstatd \ + --slave %{_bindir}/jwebserver jwebserver %{prefix}/bin/jwebserver \ + --slave %{_bindir}/serialver serialver %{prefix}/bin/serialver \ + --slave %{_mandir}/man1/jar.1 jar.1 %{prefix}/man/man1/jar.1 \ + --slave %{_mandir}/man1/jarsigner.1 jarsigner.1 %{prefix}/man/man1/jarsigner.1 \ + --slave %{_mandir}/man1/javac.1 javac.1 %{prefix}/man/man1/javac.1 \ + --slave %{_mandir}/man1/javadoc.1 javadoc.1 %{prefix}/man/man1/javadoc.1 \ + --slave %{_mandir}/man1/javap.1 javap.1 %{prefix}/man/man1/javap.1 \ + --slave %{_mandir}/man1/jcmd.1 jcmd.1 %{prefix}/man/man1/jcmd.1 \ + --slave %{_mandir}/man1/jconsole.1 jconsole.1 %{prefix}/man/man1/jconsole.1 \ + --slave %{_mandir}/man1/jdb.1 jdb.1 %{prefix}/man/man1/jdb.1 \ + --slave %{_mandir}/man1/jdeprscan.1 jdeprscan.1 %{prefix}/man/man1/jdeprscan.1 \ + --slave %{_mandir}/man1/jdeps.1 jdeps.1 %{prefix}/man/man1/jdeps.1 \ + --slave %{_mandir}/man1/jfr.1 jfr.1 %{prefix}/man/man1/jfr.1 \ + --slave %{_mandir}/man1/jhsdb.1 jhsdb.1 %{prefix}/man/man1/jhsdb.1 \ + --slave %{_mandir}/man1/jinfo.1 jinfo.1 %{prefix}/man/man1/jinfo.1 \ + --slave %{_mandir}/man1/jlink.1 jlink.1 %{prefix}/man/man1/jlink.1 \ + --slave %{_mandir}/man1/jmap.1 jmap.1 %{prefix}/man/man1/jmap.1 \ + --slave %{_mandir}/man1/jmod.1 jmod.1 %{prefix}/man/man1/jmod.1 \ + --slave %{_mandir}/man1/jpackage.1 jpackage.1 %{prefix}/man/man1/jpackage.1 \ + --slave %{_mandir}/man1/jps.1 jps.1 %{prefix}/man/man1/jps.1 \ + --slave %{_mandir}/man1/jrunscript.1 jrunscript.1 %{prefix}/man/man1/jrunscript.1 \ + --slave %{_mandir}/man1/jshell.1 jshell.1 %{prefix}/man/man1/jshell.1 \ + --slave %{_mandir}/man1/jstack.1 jstack.1 %{prefix}/man/man1/jstack.1 \ + --slave %{_mandir}/man1/jstat.1 jstat.1 %{prefix}/man/man1/jstat.1 \ + --slave %{_mandir}/man1/jstatd.1 jstatd.1 %{prefix}/man/man1/jstatd.1 \ + --slave %{_mandir}/man1/jwebserver.1 jwebserver.1 %{prefix}/man/man1/jwebserver.1 \ + --slave %{_mandir}/man1/serialver.1 serialver.1 %{prefix}/man/man1/serialver.1 +fi + +%preun +if [ $1 -eq 0 ]; then + update-alternatives --remove java %{prefix}/bin/java + update-alternatives --remove javac %{prefix}/bin/javac +fi + +%files +%defattr(-,root,root) +%{prefix} + +%changelog +* Wed Sep 18 2024 Eclipse Adoptium Package Maintainers 23.0.0.0.0.37-0 +- Eclipse Temurin 23+37 release 0. diff --git a/linux/jre/alpine/src/main/packaging/temurin/23/APKBUILD b/linux/jre/alpine/src/main/packaging/temurin/23/APKBUILD new file mode 100644 index 000000000..09916e539 --- /dev/null +++ b/linux/jre/alpine/src/main/packaging/temurin/23/APKBUILD @@ -0,0 +1,83 @@ +# Maintainer: Eclipse Adoptium Package Maintainers +pkgname=temurin-23 +pkgver=23_p37 +# replace _p1 with _1 +_pkgver=${pkgver/_p/_} +_pkgverplus=${pkgver/_p/+} +_pkgvername=${_pkgverplus/+/%2B} +pkgrel=1 +pkgdesc="Eclipse Temurin 23" +provider_priority=23 +url="https://adoptium.net" +arch="aarch64 x86_64" +license="GPL-2.0-with-classpath-exception" +makedepends=" + alsa-lib-dev + freetype-dev + libffi-dev + libjpeg-turbo-dev + libx11-dev + libxext-dev + libxrandr-dev + libxrender-dev + libxt-dev + libxtst-dev +" +depends="" +subpackages="$pkgname-jre:_jre" +source="https://github.com/adoptium/temurin23-binaries/releases/download/jdk-$_pkgvername/OpenJDK23u-jre_${CARCH/x86_64/x64}_alpine-linux_hotspot_$_pkgver.tar.gz" + +_java_home="/usr/lib/jvm/java-23-temurin-jre" + +ldpath="$_java_home/lib:$_java_home/lib/server" +sonameprefix="$pkgname:" + +prepare() { + default_prepare +} + +check() { + local _java_bin="./jdk-$_pkgverplus-jre/bin" + + # 1) check that java -version works + $_java_bin/java -version +} + +package() { + mkdir -p "$pkgdir/$_java_home" + cp -r "$srcdir"/jdk-"$_pkgverplus-jre"/* "$pkgdir/$_java_home" +} + +_jre() { + pkgdesc="Eclipse Temurin 23 (JRE)" + provides="java-jre" + depends="java-common java-cacerts" + _fromroot="$pkgdir/$_java_home" + _toroot="$subpkgdir/$_java_home" + + mkdir -p "$_toroot" + mv "$_fromroot/bin" "$_toroot" + mv "$_fromroot/conf" "$_toroot" + mv "$_fromroot/legal" "$_toroot" + mv "$_fromroot/lib" "$_toroot" + mv "$_fromroot/release" "$_toroot" + mv "$_fromroot/NOTICE" "$_toroot" + + # symlink to shared cacerts store + rm "$_toroot/lib/security/cacerts" + ln -sf /etc/ssl/certs/java/cacerts \ + "$_toroot/lib/security/cacerts" +} + +case "$CARCH" in + x86_64) + _arch_sum="7acbc972b0dd84ca10ec6f192b20e76445a22f4c5558e1657ff393e4868e9343" + ;; + aarch64) + _arch_sum="858aa6b255164e535e2fd6cc8dfbf129327a9126ebb9e8f24115c2089efd36f3" + ;; +esac + +sha256sums=" +$_arch_sum OpenJDK23u-jre_${CARCH/x86_64/x64}_alpine-linux_hotspot_$_pkgver.tar.gz +" diff --git a/linux/jre/debian/src/main/packaging/temurin/23/debian/changelog b/linux/jre/debian/src/main/packaging/temurin/23/debian/changelog new file mode 100644 index 000000000..b206a7eb8 --- /dev/null +++ b/linux/jre/debian/src/main/packaging/temurin/23/debian/changelog @@ -0,0 +1,5 @@ +temurin-23-jre (23.0.0.0.0+37-0) STABLE; urgency=medium + + * Eclipse Temurin 23.0.0.0.0+37-0 release. + + -- Eclipse Adoptium Package Maintainers Wed, 18 Sep 2024 00:00:00 +0000 diff --git a/linux/jre/debian/src/main/packaging/temurin/23/debian/compat b/linux/jre/debian/src/main/packaging/temurin/23/debian/compat new file mode 100644 index 000000000..b4de39476 --- /dev/null +++ b/linux/jre/debian/src/main/packaging/temurin/23/debian/compat @@ -0,0 +1 @@ +11 diff --git a/linux/jre/debian/src/main/packaging/temurin/23/debian/control b/linux/jre/debian/src/main/packaging/temurin/23/debian/control new file mode 100644 index 000000000..a3aa600db --- /dev/null +++ b/linux/jre/debian/src/main/packaging/temurin/23/debian/control @@ -0,0 +1,67 @@ +Source: temurin-23-jre +Section: java +Priority: optional +Maintainer: Eclipse Adoptium Package Maintainers +Build-Depends: debhelper (>= 11), lsb-release + +Package: temurin-23-jre +Architecture: amd64 arm64 ppc64el s390x riscv64 +Depends: adoptium-ca-certificates, + java-common, + libasound2, + libc6, + libfontconfig1, + libfreetype6, + libx11-6, + libxext6, + libxi6, + libxrender1, + libxtst6, + zlib1g +Recommends: fonts-dejavu-core, + fonts-dejavu-extra +Provides: java-runtime (= 23), + java-runtime-headless (= 23), + java10-runtime, + java11-runtime, + java12-runtime, + java13-runtime, + java14-runtime, + java15-runtime, + java16-runtime, + java17-runtime, + java18-runtime, + java19-runtime, + java2-runtime, + java20-runtime, + java21-runtime, + java22-runtime, + java23-runtime, + java5-runtime, + java6-runtime, + java7-runtime, + java8-runtime, + java9-runtime, + java10-runtime-headless, + java11-runtime-headless, + java12-runtime-headless, + java13-runtime-headless, + java14-runtime-headless, + java15-runtime-headless, + java16-runtime-headless, + java17-runtime-headless, + java18-runtime-headless, + java19-runtime-headless, + java2-runtime-headless, + java20-runtime-headless, + java21-runtime-headless, + java22-runtime-headless, + java23-runtime-headless, + java5-runtime-headless, + java6-runtime-headless, + java7-runtime-headless, + java8-runtime-headless, + java9-runtime-headless +Description: Eclipse Temurin 23 JRE + Eclipse Temurin JRE is an OpenJDK-based runtime environment to execute + Java applications and services. diff --git a/linux/jre/debian/src/main/packaging/temurin/23/debian/copyright b/linux/jre/debian/src/main/packaging/temurin/23/debian/copyright new file mode 100644 index 000000000..0a1694bd6 --- /dev/null +++ b/linux/jre/debian/src/main/packaging/temurin/23/debian/copyright @@ -0,0 +1,5 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Files: * +Copyright: Oracle and/or its affiliates +License: GPL-2.0+CE \ No newline at end of file diff --git a/linux/jre/debian/src/main/packaging/temurin/23/debian/jinfo.in b/linux/jre/debian/src/main/packaging/temurin/23/debian/jinfo.in new file mode 100644 index 000000000..8212c3415 --- /dev/null +++ b/linux/jre/debian/src/main/packaging/temurin/23/debian/jinfo.in @@ -0,0 +1,11 @@ +name=@pkg_alias@ +alias=@pkg_alias@ +priority=@priority@ +section=contrib + +hl java /usr/lib/jvm/@jvm_dir@/bin/java +hl jfr /usr/lib/jvm/@jvm_dir@/bin/jfr +hl jrunscript /usr/lib/jvm/@jvm_dir@/bin/jrunscript +jdkhl jwebserver /usr/lib/jvm/@jvm_dir@/bin/jwebserver +hl keytool /usr/lib/jvm/@jvm_dir@/bin/keytool +hl rmiregistry /usr/lib/jvm/@jvm_dir@/bin/rmiregistry diff --git a/linux/jre/debian/src/main/packaging/temurin/23/debian/postinst.in b/linux/jre/debian/src/main/packaging/temurin/23/debian/postinst.in new file mode 100644 index 000000000..cc1c4dbcb --- /dev/null +++ b/linux/jre/debian/src/main/packaging/temurin/23/debian/postinst.in @@ -0,0 +1,42 @@ +#!/bin/sh +set -eu + +priority="@priority@" +jdk_base_dir="/usr/lib/jvm/@jvm_dir@" +tools="@jvm_tools@" + +case "$1" in +configure) + for tool in $tools; do + for tool_path in "$jdk_base_dir/bin/$tool" "$jdk_base_dir/lib/$tool"; do + if [ ! -e "$tool_path" ]; then + continue + fi + + slave="" + tool_man_path="$jdk_base_dir/man/man1/$tool.1" + if [ -e "$tool_man_path" ]; then + slave="--slave /usr/share/man/man1/$tool.1 $tool.1 $tool_man_path" + fi + + update-alternatives \ + --install \ + "/usr/bin/$tool" \ + "$tool" \ + "$tool_path" \ + "$priority" \ + $slave + done + done + ;; + +abort-upgrade | abort-remove | abort-deconfigure) + # Nothing to do + ;; +*) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/linux/jre/debian/src/main/packaging/temurin/23/debian/prerm.in b/linux/jre/debian/src/main/packaging/temurin/23/debian/prerm.in new file mode 100644 index 000000000..85999aefa --- /dev/null +++ b/linux/jre/debian/src/main/packaging/temurin/23/debian/prerm.in @@ -0,0 +1,28 @@ +#!/bin/sh +set -eu + +jdk_base_dir="/usr/lib/jvm/@jvm_dir@" +tools="@jvm_tools@" + +case "$1" in +purge) + # Nothing to do + ;; +remove | upgrade | failed-upgrade | abort-install | abort-upgrade | disappear | deconfigure) + for tool in $tools; do + for tool_path in "$jdk_base_dir/bin/$tool" "$jdk_base_dir/lib/$tool"; do + if [ ! -e "$tool_path" ]; then + continue + fi + + update-alternatives --remove "$tool" "$tool_path" + done + done + ;; +*) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/linux/jre/debian/src/main/packaging/temurin/23/debian/rules b/linux/jre/debian/src/main/packaging/temurin/23/debian/rules new file mode 100644 index 000000000..43b6af95c --- /dev/null +++ b/linux/jre/debian/src/main/packaging/temurin/23/debian/rules @@ -0,0 +1,71 @@ +#!/usr/bin/make -f + +pkg_name = temurin-23-jre +priority = 2312 +jvm_tools = java jfr jrunscript jwebserver keytool rmiregistry +amd64_tarball_url = https://github.com/adoptium/temurin23-binaries/releases/download/jdk-23%2B37/OpenJDK23U-jre_x64_linux_hotspot_23_37.tar.gz +amd64_checksum = 9c3c3d42ffb2603b328b7154fc9eb449ef87488b3cbeb24a497d46677c7fd44d +arm64_tarball_url = https://github.com/adoptium/temurin23-binaries/releases/download/jdk-23%2B37/OpenJDK23U-jre_aarch64_linux_hotspot_23_37.tar.gz +arm64_checksum = ec45f4f9a4a98d8a0af24b508ca84a411ea88fac8abb8ad2cfca85cb3902ab5d +ppc64el_tarball_url = https://github.com/adoptium/temurin23-binaries/releases/download/jdk-23%2B37/OpenJDK23U-jre_ppc64le_linux_hotspot_23_37.tar.gz +ppc64el_checksum = 9120876c35b904ac041c5a021330a6f11d4e6c7537ce28bdbb7170b944673435 +s390x_tarball_url = https://github.com/adoptium/temurin23-binaries/releases/download/jdk-23%2B37/OpenJDK23U-jre_s390x_linux_hotspot_23_37.tar.gz +s390x_checksum = b42ac56cfb90b313b73622221d8944d32996376d2d953e4ee3942439c5ce91bb +riscv64_tarball_url = https://github.com/adoptium/temurin23-binaries/releases/download/jdk-23%2B37/OpenJDK23U-jre_riscv64_linux_hotspot_23_37.tar.gz +riscv64_checksum = ca32d942ef5357fb948604cd8aea5c597130cf7fdf6ddee267b4aa99406ee471 + +d = debian/$(pkg_name) +jvm_home = usr/lib/jvm +jvm_dir = $(pkg_name)-$(DEB_HOST_ARCH) +pkg_alias = $(pkg_name)-$(DEB_HOST_ARCH) + +%: + dh $@ + +override_dh_auto_clean: +override_dh_auto_test: +override_dh_auto_build: +override_dh_strip: +override_dh_auto_install: + # Download and verify checksum of JRE + wget --progress=dot:mega -O jre.tar.gz $($(DEB_HOST_ARCH)_tarball_url) + echo '$($(DEB_HOST_ARCH)_checksum) jre.tar.gz' > jre.tar.gz.sha256.txt + sha256sum -c jre.tar.gz.sha256.txt + + # Substitute variables. + sed \ + -e 's/@pkg_alias@/$(pkg_alias)/g' \ + -e 's/@jvm_dir@/$(jvm_dir)/g' \ + -e 's/@priority@/$(priority)/g' \ + -e 's/@jvm_tools@/$(jvm_tools)/g' \ + debian/jinfo.in > debian/jinfo + + sed \ + -e 's/@pkg_alias@/$(pkg_alias)/g' \ + -e 's/@jvm_dir@/$(jvm_dir)/g' \ + -e 's/@priority@/$(priority)/g' \ + -e 's/@jvm_tools@/$(jvm_tools)/g' \ + debian/postinst.in > debian/postinst + + sed \ + -e 's/@pkg_alias@/$(pkg_alias)/g' \ + -e 's/@jvm_dir@/$(jvm_dir)/g' \ + -e 's/@priority@/$(priority)/g' \ + -e 's/@jvm_tools@/$(jvm_tools)/g' \ + debian/prerm.in > debian/prerm + + # Unpack JRE. + dh_installdirs \ + $(jvm_home) \ + $(jvm_home)/$(jvm_dir) + tar --strip-components=1 -C "$(d)/$(jvm_home)/$(jvm_dir)" -xf jre.tar.gz + + # Add jinfo file (alternatives support). + cp debian/jinfo "$(d)/$(jvm_home)/.$(pkg_alias).jinfo" + + # Replace bundled cacerts and redirect to adoptium-ca-certificates. + rm -f "$(d)/$(jvm_home)/$(jvm_dir)/lib/security/cacerts" + ln -s /etc/ssl/certs/adoptium/cacerts "$(d)/$(jvm_home)/$(jvm_dir)/lib/security/cacerts" + +override_dh_gencontrol: + dh_gencontrol -- diff --git a/linux/jre/redhat/src/main/packaging/temurin/23/temurin-23-jre.spec b/linux/jre/redhat/src/main/packaging/temurin/23/temurin-23-jre.spec new file mode 100644 index 000000000..4fe6c8e83 --- /dev/null +++ b/linux/jre/redhat/src/main/packaging/temurin/23/temurin-23-jre.spec @@ -0,0 +1,191 @@ +%global upstream_version 23+37 +# Only [A-Za-z0-9.] allowed in version: +# https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_upstream_uses_invalid_characters_in_the_version +# also not very intuitive: +# $ rpmdev-vercmp 23.0.0.0.0___23.0.0.0.0+1 +# 23.0.0.0.0___1 == 23.0.0.0.0+37 +%global spec_version 23.0.0.0.0.37 +%global spec_release 0 +%global priority 2300 + +%global source_url_base https://github.com/adoptium/temurin23-binaries/releases/download +%global upstream_version_url %(echo %{upstream_version} | sed 's/\+/%%2B/g') +%global upstream_version_no_plus %(echo %{upstream_version} | sed 's/\+/_/g') +%global java_provides openjre + +# Map architecture to the expected value in the download URL; Allow for a +# pre-defined value of vers_arch and use that if it's defined + +%ifarch x86_64 +%global vers_arch x64 +%global vers_arch2 ppc64le +%global vers_arch3 aarch64 +%global vers_arch4 s390x +%global vers_arch5 riscv64 +%global src_num 0 +%global sha_src_num 1 +%endif +%ifarch ppc64le +%global vers_arch x64 +%global vers_arch2 ppc64le +%global vers_arch3 aarch64 +%global vers_arch4 s390x +%global vers_arch5 riscv64 +%global src_num 2 +%global sha_src_num 3 +%endif +%ifarch aarch64 +%global vers_arch x64 +%global vers_arch2 ppc64le +%global vers_arch3 aarch64 +%global vers_arch4 s390x +%global vers_arch5 riscv64 +%global src_num 4 +%global sha_src_num 5 +%endif +%ifarch s390x +%global vers_arch x64 +%global vers_arch2 ppc64le +%global vers_arch3 aarch64 +%global vers_arch4 s390x +%global vers_arch5 riscv64 +%global src_num 6 +%global sha_src_num 7 +%endif +%ifarch riscv64 +%global vers_arch x64 +%global vers_arch2 ppc64le +%global vers_arch3 aarch64 +%global vers_arch4 s390x +%global vers_arch5 riscv64 +%global src_num 8 +%global sha_src_num 9 +%endif +# Allow for noarch SRPM build +%ifarch noarch +%global src_num 0 +%global sha_src_num 1 +%endif + +Name: temurin-23-jre +Version: %{spec_version} +Release: %{spec_release} +Summary: Eclipse Temurin 23 JRE + +Group: java +License: GPLv2 with exceptions +Vendor: Eclipse Adoptium +URL: https://projects.eclipse.org/projects/adoptium +Packager: Eclipse Adoptium Package Maintainers + +AutoReqProv: no +Prefix: /usr/lib/jvm/%{name} + +ExclusiveArch: x86_64 ppc64le aarch64 s390x riscv64 + +BuildRequires: tar +BuildRequires: wget + +Requires: /bin/sh +Requires: /usr/sbin/alternatives +Requires: ca-certificates +Requires: dejavu-sans-fonts +Requires: libX11%{?_isa} +Requires: libXext%{?_isa} +Requires: libXi%{?_isa} +Requires: libXrender%{?_isa} +Requires: libXtst%{?_isa} +Requires: alsa-lib%{?_isa} +Requires: glibc%{?_isa} +Requires: zlib%{?_isa} +Requires: fontconfig%{?_isa} + +Provides: jre +Provides: jre-23 +Provides: jre-23-headless +Provides: jre-23-%{java_provides} +Provides: jre-23-%{java_provides}-headless +Provides: jre-headless +Provides: jre-%{java_provides} +Provides: jre-%{java_provides}-headless + +# First architecture (x86_64) +Source0: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jre_%{vers_arch}_linux_hotspot_%{upstream_version_no_plus}.tar.gz +Source1: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jre_%{vers_arch}_linux_hotspot_%{upstream_version_no_plus}.tar.gz.sha256.txt +# Second architecture (ppc64le) +Source2: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jre_%{vers_arch2}_linux_hotspot_%{upstream_version_no_plus}.tar.gz +Source3: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jre_%{vers_arch2}_linux_hotspot_%{upstream_version_no_plus}.tar.gz.sha256.txt +# Third architecture (aarch64) +Source4: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jre_%{vers_arch3}_linux_hotspot_%{upstream_version_no_plus}.tar.gz +Source5: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jre_%{vers_arch3}_linux_hotspot_%{upstream_version_no_plus}.tar.gz.sha256.txt +# Fourth architecture (s390x) +Source6: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jre_%{vers_arch4}_linux_hotspot_%{upstream_version_no_plus}.tar.gz +Source7: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jre_%{vers_arch4}_linux_hotspot_%{upstream_version_no_plus}.tar.gz.sha256.txt +# Fifth architecture (riscv64) +Source8: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jre_%{vers_arch5}_linux_hotspot_%{upstream_version_no_plus}.tar.gz +Source9: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jre_%{vers_arch5}_linux_hotspot_%{upstream_version_no_plus}.tar.gz.sha256.txt + +# Set the compression format to xz to be compatible with more Red Hat flavours. Newer versions of Fedora use zstd which +# is not available on CentOS 7, for example. https://github.com/rpm-software-management/rpm/blob/master/macros.in#L353 +# lists the available options. +%define _source_payload w7.xzdio +%define _binary_payload w7.xzdio + +# Avoid build failures on some distros due to missing build-id in binaries. +%global debug_package %{nil} +%global __brp_strip %{nil} + +%description +Eclipse Temurin JRE is an OpenJDK-based runtime environment to execute +applications and components using the programming language Java. + +%prep +pushd "%{_sourcedir}" +sha256sum -c "%{expand:%{SOURCE%{sha_src_num}}}" +popd + +%setup -n jdk-%{upstream_version}-jre -T -b %{src_num} + +%build +# noop + +%install +mkdir -p %{buildroot}%{prefix} +cd %{buildroot}%{prefix} +tar --strip-components=1 -C "%{buildroot}%{prefix}" -xf %{expand:%{SOURCE%{src_num}}} + +# Use cacerts included in OS +rm -f "%{buildroot}%{prefix}/lib/security/cacerts" +pushd "%{buildroot}%{prefix}/lib/security" +ln -s /etc/pki/java/cacerts "%{buildroot}%{prefix}/lib/security/cacerts" +popd + +# Ensure systemd-tmpfiles-clean does not remove pid files +# https://bugzilla.redhat.com/show_bug.cgi?id=1704608 +%{__mkdir} -p %{buildroot}/usr/lib/tmpfiles.d +echo 'x /tmp/hsperfdata_*' > "%{buildroot}/usr/lib/tmpfiles.d/%{name}.conf" +echo 'x /tmp/.java_pid*' >> "%{buildroot}/usr/lib/tmpfiles.d/%{name}.conf" + +%post +if [ $1 -ge 1 ] ; then + update-alternatives --install %{_bindir}/java java %{prefix}/bin/java %{priority} \ + --slave %{_bindir}/jfr jfr %{prefix}/bin/jfr \ + --slave %{_bindir}/jrunscript jrunscript %{prefix}/bin/jrunscript \ + --slave %{_bindir}/jwebserver jwebserver %{prefix}/bin/jwebserver \ + --slave %{_bindir}/keytool keytool %{prefix}/bin/keytool \ + --slave %{_bindir}/rmiregistry rmiregistry %{prefix}/bin/rmiregistry +fi + +%preun +if [ $1 -eq 0 ]; then + update-alternatives --remove java %{prefix}/bin/java +fi + +%files +%defattr(-,root,root) +%{prefix} +/usr/lib/tmpfiles.d/%{name}.conf + +%changelog +* Wed Sep 18 2024 Eclipse Adoptium Package Maintainers 23.0.0.0.0.37-0 +- Eclipse Temurin 23+37 release 0. diff --git a/linux/jre/suse/src/main/packaging/temurin/23/temurin-23-jre.spec b/linux/jre/suse/src/main/packaging/temurin/23/temurin-23-jre.spec new file mode 100644 index 000000000..b2090c766 --- /dev/null +++ b/linux/jre/suse/src/main/packaging/temurin/23/temurin-23-jre.spec @@ -0,0 +1,182 @@ +%global upstream_version 23+37 +# Only [A-Za-z0-9.] allowed in version: +# https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_upstream_uses_invalid_characters_in_the_version +# also not very intuitive: +# $ rpmdev-vercmp 23.0.0.0.0___23.0.0.0.0+1 +# 23.0.0.0.0___1 == 23.0.0.0.0+37 +%global spec_version 23.0.0.0.0.37 +%global spec_release 0 +%global priority 2300 + + +%global source_url_base https://github.com/adoptium/temurin23-binaries/releases/download +%global upstream_version_url %(echo %{upstream_version} | sed 's/\+/%%2B/g') +%global upstream_version_no_plus %(echo %{upstream_version} | sed 's/\+/_/g') +%global java_provides openjre + +# Map architecture to the expected value in the download URL; Allow for a +# pre-defined value of vers_arch and use that if it's defined + +%ifarch x86_64 +%global vers_arch x64 +%global vers_arch2 ppc64le +%global vers_arch3 aarch64 +%global vers_arch4 s390x +%global vers_arch5 riscv64 +%global src_num 0 +%global sha_src_num 1 +%endif +%ifarch ppc64le +%global vers_arch x64 +%global vers_arch2 ppc64le +%global vers_arch3 aarch64 +%global vers_arch4 s390x +%global vers_arch5 riscv64 +%global src_num 2 +%global sha_src_num 3 +%endif +%ifarch aarch64 +%global vers_arch x64 +%global vers_arch2 ppc64le +%global vers_arch3 aarch64 +%global vers_arch4 s390x +%global vers_arch5 riscv64 +%global src_num 4 +%global sha_src_num 5 +%endif +%ifarch s390x +%global vers_arch x64 +%global vers_arch2 ppc64le +%global vers_arch3 aarch64 +%global vers_arch4 s390x +%global vers_arch5 riscv64 +%global src_num 6 +%global sha_src_num 7 +%endif +%ifarch riscv64 +%global vers_arch x64 +%global vers_arch2 ppc64le +%global vers_arch3 aarch64 +%global vers_arch4 s390x +%global vers_arch5 riscv64 +%global src_num 8 +%global sha_src_num 9 +%endif +# Allow for noarch SRPM build +%ifarch noarch +%global src_num 0 +%global sha_src_num 1 +%endif + +Name: temurin-23-jre +Version: %{spec_version} +Release: %{spec_release} +Summary: Eclipse Temurin 23 JRE + +Group: java +License: GPLv2 with exceptions +Vendor: Eclipse Adoptium +URL: https://projects.eclipse.org/projects/adoptium +Packager: Eclipse Adoptium Package Maintainers + +AutoReqProv: no +Prefix: %{_libdir}/jvm/%{name} + +ExclusiveArch: x86_64 ppc64le aarch64 s390x riscv64 + +BuildRequires: tar +BuildRequires: wget + +Requires: /bin/sh +Requires: /usr/sbin/alternatives +Requires: ca-certificates +Requires: dejavu-fonts +Requires: libX11-6%{?_isa} +Requires: libXext6%{?_isa} +Requires: libXi6%{?_isa} +Requires: libXrender1%{?_isa} +Requires: libXtst6%{?_isa} +Requires: libasound2%{?_isa} +Requires: glibc%{?_isa} +Requires: libz1%{?_isa} +Requires: fontconfig%{?_isa} + +Provides: jre +Provides: jre-23 +Provides: jre-23-headless +Provides: jre-23-%{java_provides} +Provides: jre-23-%{java_provides}-headless +Provides: jre-headless +Provides: jre-%{java_provides} +Provides: jre-%{java_provides}-headless + +# First architecture (x86_64) +Source0: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jre_%{vers_arch}_linux_hotspot_%{upstream_version_no_plus}.tar.gz +Source1: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jre_%{vers_arch}_linux_hotspot_%{upstream_version_no_plus}.tar.gz.sha256.txt +# Second architecture (ppc64le) +Source2: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jre_%{vers_arch2}_linux_hotspot_%{upstream_version_no_plus}.tar.gz +Source3: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jre_%{vers_arch2}_linux_hotspot_%{upstream_version_no_plus}.tar.gz.sha256.txt +# Third architecture (aarch64) +Source4: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jre_%{vers_arch3}_linux_hotspot_%{upstream_version_no_plus}.tar.gz +Source5: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jre_%{vers_arch3}_linux_hotspot_%{upstream_version_no_plus}.tar.gz.sha256.txt +# Fourth architecture (s390x) +Source6: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jre_%{vers_arch4}_linux_hotspot_%{upstream_version_no_plus}.tar.gz +Source7: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jre_%{vers_arch4}_linux_hotspot_%{upstream_version_no_plus}.tar.gz.sha256.txt +# Fifth architecture (riscv64) +Source8: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jre_%{vers_arch5}_linux_hotspot_%{upstream_version_no_plus}.tar.gz +Source9: %{source_url_base}/jdk-%{upstream_version_url}/OpenJDK23U-jre_%{vers_arch5}_linux_hotspot_%{upstream_version_no_plus}.tar.gz.sha256.txt + +# Avoid build failures on some distros due to missing build-id in binaries. +%global debug_package %{nil} +%global __brp_strip %{nil} + +%description +Eclipse Temurin JRE is an OpenJDK-based runtime environment to execute +applications and components using the programming language Java. + +%prep +pushd "%{_sourcedir}" +sha256sum -c "%{expand:%{SOURCE%{sha_src_num}}}" +popd + +%setup -n jdk-%{upstream_version}-jre -T -b %{src_num} + +%build +# noop + +%install +mkdir -p %{buildroot}%{prefix} +cd %{buildroot}%{prefix} +tar --strip-components=1 -C "%{buildroot}%{prefix}" -xf %{expand:%{SOURCE%{src_num}}} + +# Use cacerts included in OS +rm -f "%{buildroot}%{prefix}/lib/security/cacerts" +pushd "%{buildroot}%{prefix}/lib/security" +ln -s /var/lib/ca-certificates/java-cacerts "%{buildroot}%{prefix}/lib/security/cacerts" +popd + +%pretrans +# noop + +%post +if [ $1 -ge 1 ] ; then + update-alternatives --install %{_bindir}/java java %{prefix}/bin/java %{priority} \ + --slave %{_bindir}/jfr jfr %{prefix}/bin/jfr \ + --slave %{_bindir}/jrunscript jrunscript %{prefix}/bin/jrunscript \ + --slave %{_bindir}/jwebserver jwebserver %{prefix}/bin/jwebserver \ + --slave %{_bindir}/keytool keytool %{prefix}/bin/keytool \ + --slave %{_bindir}/rmiregistry rmiregistry %{prefix}/bin/rmiregistry +fi + +%preun +if [ $1 -eq 0 ]; then + update-alternatives --remove java %{prefix}/bin/java +fi + +%files +%defattr(-,root,root) +%{prefix} + +%changelog +* Wed Sep 18 2024 Eclipse Adoptium Package Maintainers 23.0.0.0.0.37-0 +- Eclipse Temurin 23+37 release 0.