-
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add JDK23 For September 2023 CPU (#998)
* Add JDK23 to Installer packages. * Add version specific field to Debian Control files. * Update Checksums For September Release * Update RiscV checksums JDK23 * JDK23 Updates
- Loading branch information
1 parent
f616d87
commit 5f6a48f
Showing
26 changed files
with
1,746 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
112 changes: 112 additions & 0 deletions
112
linux/jdk/alpine/src/main/packaging/temurin/23/APKBUILD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# Maintainer: Eclipse Adoptium Package Maintainers <temurin-dev@eclipse.org> | ||
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 | ||
" |
3 changes: 3 additions & 0 deletions
3
linux/jdk/alpine/src/main/packaging/temurin/23/HelloWorld.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
public class HelloWorld { | ||
public static void main(String[] args) { System.out.println("Hello World!"); } | ||
} |
72 changes: 72 additions & 0 deletions
72
linux/jdk/alpine/src/main/packaging/temurin/23/TestCryptoLevel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
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); | ||
} | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
linux/jdk/alpine/src/main/packaging/temurin/23/TestECDSA.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
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."); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
linux/jdk/debian/src/main/packaging/temurin/23/debian/changelog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <temurin-dev@eclipse.org> Wed, 18 Sep 2024 00:00:00 +0000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
11 |
Oops, something went wrong.