openjdk24: init at 24+36

Changed files
+77 -6
pkgs
+13
pkgs/development/compilers/openjdk/24/patches/fix-java-home-jdk24.patch
···
···
+
--- a/src/hotspot/os/linux/os_linux.cpp 2025-04-08 14:43:06.765198522 +0200
+
+++ b/src/hotspot/os/linux/os_linux.cpp 2025-04-08 14:43:27.890301990 +0200
+
@@ -2758,9 +2758,7 @@
+
assert(ret, "cannot locate libjvm");
+
char *rp = nullptr;
+
if (ret && dli_fname[0] != '\0') {
+
- rp = os::realpath(dli_fname, buf, buflen);
+
- }
+
- if (rp == nullptr) {
+
+ snprintf(buf, buflen, "%s", dli_fname);
+
return;
+
}
+
+30
pkgs/development/compilers/openjdk/24/patches/read-truststore-from-env-jdk24.patch
···
···
+
--- a/src/java.base/share/classes/sun/security/ssl/TrustStoreManager.java 2017-06-26 21:48:25.000000000 -0400
+
+++ b/src/java.base/share/classes/sun/security/ssl/TrustStoreManager.java 2017-07-05 20:45:57.491295030 -0400
+
@@ -71,6 +71,7 @@
+
*
+
* The preference of the default trusted KeyStore is:
+
* javax.net.ssl.trustStore
+
+ * system environment variable JAVAX_NET_SSL_TRUSTSTORE
+
* jssecacerts
+
* cacerts
+
*/
+
@@ -125,7 +126,8 @@
+
static TrustStoreDescriptor run() {
+
// Get the system properties for trust store.
+
String storePropName = System.getProperty(
+
- "javax.net.ssl.trustStore", jsseDefaultStore);
+
+ "javax.net.ssl.trustStore",
+
+ System.getenv("JAVAX_NET_SSL_TRUSTSTORE"));
+
String storePropType = System.getProperty(
+
"javax.net.ssl.trustStoreType",
+
KeyStore.getDefaultType());
+
@@ -137,6 +139,9 @@
+
String temporaryName = "";
+
File temporaryFile = null;
+
long temporaryTime = 0L;
+
+ if (storePropName == null) {
+
+ storePropName = jsseDefaultStore;
+
+ }
+
if (!"NONE".equals(storePropName)) {
+
String[] fileNames =
+
new String[] {storePropName, defaultStore};
+6
pkgs/development/compilers/openjdk/24/source.json
···
···
+
{
+
"hash": "sha256-ogWq6oLyZzzvxGTqEEoPMXdtfbobUyXcC5bXXxBxfuo=",
+
"owner": "openjdk",
+
"repo": "jdk24u",
+
"rev": "refs/tags/jdk-24+36"
+
}
+22 -6
pkgs/development/compilers/openjdk/generic.nix
···
lndir,
unzip,
ensureNewerSourcesForZipFilesHook,
cpio,
file,
···
temurin-bin-17,
temurin-bin-21,
temurin-bin-23,
jdk-bootstrap ?
{
"8" = temurin-bin-8.__spliced.buildBuild or temurin-bin-8;
···
"17" = temurin-bin-17.__spliced.buildBuild or temurin-bin-17;
"21" = temurin-bin-21.__spliced.buildBuild or temurin-bin-21;
"23" = temurin-bin-23.__spliced.buildBuild or temurin-bin-23;
}
.${featureVersion},
}:
···
atLeast17 = lib.versionAtLeast featureVersion "17";
atLeast21 = lib.versionAtLeast featureVersion "21";
atLeast23 = lib.versionAtLeast featureVersion "23";
tagPrefix = if atLeast11 then "jdk-" else "jdk";
version = lib.removePrefix "refs/tags/${tagPrefix}" source.src.rev;
···
patches =
[
(
-
if atLeast21 then
./21/patches/fix-java-home-jdk21.patch
else if atLeast11 then
./11/patches/fix-java-home-jdk10.patch
···
./8/patches/fix-java-home-jdk8.patch
)
(
-
if atLeast11 then
./11/patches/read-truststore-from-env-jdk10.patch
else
./8/patches/read-truststore-from-env-jdk8.patch
···
]
++ lib.optionals atLeast21 [
ensureNewerSourcesForZipFilesHook
];
buildInputs =
···
doInstallCheck = atLeast23;
-
${if atLeast17 then "postPatch" else null} = ''
-
chmod +x configure
-
patchShebangs --build configure
-
'';
${if !atLeast17 then "preConfigure" else null} =
''
···
lndir,
unzip,
ensureNewerSourcesForZipFilesHook,
+
pandoc,
cpio,
file,
···
temurin-bin-17,
temurin-bin-21,
temurin-bin-23,
+
temurin-bin-24,
jdk-bootstrap ?
{
"8" = temurin-bin-8.__spliced.buildBuild or temurin-bin-8;
···
"17" = temurin-bin-17.__spliced.buildBuild or temurin-bin-17;
"21" = temurin-bin-21.__spliced.buildBuild or temurin-bin-21;
"23" = temurin-bin-23.__spliced.buildBuild or temurin-bin-23;
+
"24" = temurin-bin-24.__spliced.buildBuild or temurin-bin-24;
}
.${featureVersion},
}:
···
atLeast17 = lib.versionAtLeast featureVersion "17";
atLeast21 = lib.versionAtLeast featureVersion "21";
atLeast23 = lib.versionAtLeast featureVersion "23";
+
atLeast24 = lib.versionAtLeast featureVersion "24";
tagPrefix = if atLeast11 then "jdk-" else "jdk";
version = lib.removePrefix "refs/tags/${tagPrefix}" source.src.rev;
···
patches =
[
(
+
if atLeast24 then
+
./24/patches/fix-java-home-jdk24.patch
+
else if atLeast21 then
./21/patches/fix-java-home-jdk21.patch
else if atLeast11 then
./11/patches/fix-java-home-jdk10.patch
···
./8/patches/fix-java-home-jdk8.patch
)
(
+
if atLeast24 then
+
./24/patches/read-truststore-from-env-jdk24.patch
+
else if atLeast11 then
./11/patches/read-truststore-from-env-jdk10.patch
else
./8/patches/read-truststore-from-env-jdk8.patch
···
]
++ lib.optionals atLeast21 [
ensureNewerSourcesForZipFilesHook
+
]
+
++ lib.optionals atLeast24 [
+
pandoc
];
buildInputs =
···
doInstallCheck = atLeast23;
+
${if atLeast17 then "postPatch" else null} =
+
''
+
chmod +x configure
+
patchShebangs --build configure
+
''
+
+ lib.optionalString atLeast24 ''
+
chmod +x make/scripts/*.{template,sh,pl}
+
patchShebangs --build make/scripts
+
'';
${if !atLeast17 then "preConfigure" else null} =
''
+5
pkgs/top-level/all-packages.nix
···
jdk23 = openjdk23;
jdk23_headless = openjdk23_headless;
# default JDK
jdk = jdk21;
jdk_headless = jdk21_headless;
···
jdk23 = openjdk23;
jdk23_headless = openjdk23_headless;
+
openjdk24 = javaPackages.compiler.openjdk24;
+
openjdk24_headless = javaPackages.compiler.openjdk24.headless;
+
jdk24 = openjdk24;
+
jdk24_headless = openjdk24_headless;
+
# default JDK
jdk = jdk21;
jdk_headless = jdk21_headless;
+1
pkgs/top-level/java-packages.nix
···
openjdk17 = mkOpenjdk "17";
openjdk21 = mkOpenjdk "21";
openjdk23 = mkOpenjdk "23";
# Legacy aliases
openjdk8-bootstrap = temurin-bin.jdk-8;
···
openjdk17 = mkOpenjdk "17";
openjdk21 = mkOpenjdk "21";
openjdk23 = mkOpenjdk "23";
+
openjdk24 = mkOpenjdk "24";
# Legacy aliases
openjdk8-bootstrap = temurin-bin.jdk-8;