openjdk17: 17.0.12+7 -> 17.0.13+11

Drop an upstreamed patch, and update another for upstream changes.

Emily fe4e4a1a afa5f909

Changed files
+18 -26
pkgs
development
+16 -15
pkgs/development/compilers/openjdk/17/patches/fix-library-path-jdk17.patch
···
+
diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
+
index 7c951cee51..bcc61ff43d 100644
--- a/src/hotspot/os/linux/os_linux.cpp
+++ b/src/hotspot/os/linux/os_linux.cpp
-
@@ -412,18 +412,8 @@ void os::init_system_properties_values() {
+
@@ -416,18 +416,8 @@
// 1: ...
// ...
// 7: The default directories, normally /lib and /usr/lib.
···
-#define SYS_EXT_DIR "/usr/java/packages"
#define EXTENSIONS_DIR "/lib/ext"
-
// Buffer that fits several sprintfs.
-
@@ -431,7 +421,7 @@ void os::init_system_properties_values() {
+
// Buffer that fits several snprintfs.
+
@@ -435,7 +425,7 @@
// by the nulls included by the sizeof operator.
const size_t bufsize =
MAX2((size_t)MAXPATHLEN, // For dll_dir & friends.
···
char *buf = NEW_C_HEAP_ARRAY(char, bufsize, mtInternal);
// sysclasspath, java_home, dll_dir
-
@@ -478,26 +468,22 @@ void os::init_system_properties_values() {
+
@@ -482,24 +472,20 @@
// should always exist (until the legacy problem cited above is
// addressed).
const char *v = ::getenv("LD_LIBRARY_PATH");
- const char *v_colon = ":";
- if (v == NULL) { v = ""; v_colon = ""; }
+
- // That's +1 for the colon and +1 for the trailing '\0'.
+
- size_t pathsize = strlen(v) + 1 + sizeof(SYS_EXT_DIR) + sizeof("/lib/") + sizeof(DEFAULT_LIBPATH) + 1;
+ if (v == NULL) { v = ""; }
-
// That's +1 for the colon and +1 for the trailing '\0'.
-
char *ld_library_path = NEW_C_HEAP_ARRAY(char,
-
- strlen(v) + 1 +
-
- sizeof(SYS_EXT_DIR) + sizeof("/lib/") + sizeof(DEFAULT_LIBPATH) + 1,
-
+ strlen(v) + 1,
-
mtInternal);
-
- sprintf(ld_library_path, "%s%s" SYS_EXT_DIR "/lib:" DEFAULT_LIBPATH, v, v_colon);
-
+ sprintf(ld_library_path, "%s", v);
+
+ size_t pathsize = strlen(v) + 1;
+
char *ld_library_path = NEW_C_HEAP_ARRAY(char, pathsize, mtInternal);
+
- os::snprintf_checked(ld_library_path, pathsize, "%s%s" SYS_EXT_DIR "/lib:" DEFAULT_LIBPATH, v, v_colon);
+
+ os::snprintf_checked(ld_library_path, pathsize, "%s", v);
Arguments::set_library_path(ld_library_path);
FREE_C_HEAP_ARRAY(char, ld_library_path);
}
// Extensions directories.
-
- sprintf(buf, "%s" EXTENSIONS_DIR ":" SYS_EXT_DIR EXTENSIONS_DIR, Arguments::get_java_home());
-
+ sprintf(buf, "%s" EXTENSIONS_DIR, Arguments::get_java_home());
+
- os::snprintf_checked(buf, bufsize, "%s" EXTENSIONS_DIR ":" SYS_EXT_DIR EXTENSIONS_DIR, Arguments::get_java_home());
+
+ os::snprintf_checked(buf, bufsize, "%s" EXTENSIONS_DIR, Arguments::get_java_home());
Arguments::set_ext_dirs(buf);
FREE_C_HEAP_ARRAY(char, buf);
···
-#undef DEFAULT_LIBPATH
-#undef SYS_EXT_DIR
#undef EXTENSIONS_DIR
-
}
+
}
+
+2 -2
pkgs/development/compilers/openjdk/17/source.json
···
{
-
"hash": "sha256-9UB1H3gd+b4wWxOMgsdDPgX/IGWNORKk1gMsSjYoZMw=",
+
"hash": "sha256-wHJlCmaE8titkfcWb2WboqemekPBn3JWc4bGyWskmoY=",
"owner": "openjdk",
"repo": "jdk17u",
-
"rev": "jdk-17.0.12+7"
+
"rev": "refs/tags/jdk-17.0.13+11"
}
-9
pkgs/development/compilers/openjdk/generic.nix
···
hash = "sha256-Qcm3ZmGCOYLZcskNjj7DYR85R4v07vYvvavrVOYL8vg=";
})
]
-
++ lib.optionals (featureVersion == "17") [
-
# Backport fixes for musl 1.2.4 which are already applied in jdk21+
-
# Fetching patch from chimera because they already went through the effort of rebasing it onto jdk17
-
(fetchurl {
-
name = "lfs64.patch";
-
url = "https://raw.githubusercontent.com/chimera-linux/cports/4614075d19e9c9636f3f7e476687247f63330a35/contrib/openjdk17/patches/lfs64.patch";
-
hash = "sha256-t2mRbdEiumBAbIAC0zsJNwCn59WYWHsnRtuOSL6bWB4=";
-
})
-
]
++ lib.optionals (!headless && enableGtk) [
(
if atLeast17 then