openjdk17: 17.0.12+7 -> 17.0.13+11

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

Emily fe4e4a1a afa5f909

+18 -26
+16 -15
pkgs/development/compilers/openjdk/17/patches/fix-library-path-jdk17.patch
··· 1 + diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp 2 + index 7c951cee51..bcc61ff43d 100644 1 3 --- a/src/hotspot/os/linux/os_linux.cpp 2 4 +++ b/src/hotspot/os/linux/os_linux.cpp 3 - @@ -412,18 +412,8 @@ void os::init_system_properties_values() { 5 + @@ -416,18 +416,8 @@ 4 6 // 1: ... 5 7 // ... 6 8 // 7: The default directories, normally /lib and /usr/lib. ··· 18 20 -#define SYS_EXT_DIR "/usr/java/packages" 19 21 #define EXTENSIONS_DIR "/lib/ext" 20 22 21 - // Buffer that fits several sprintfs. 22 - @@ -431,7 +421,7 @@ void os::init_system_properties_values() { 23 + // Buffer that fits several snprintfs. 24 + @@ -435,7 +425,7 @@ 23 25 // by the nulls included by the sizeof operator. 24 26 const size_t bufsize = 25 27 MAX2((size_t)MAXPATHLEN, // For dll_dir & friends. ··· 28 30 char *buf = NEW_C_HEAP_ARRAY(char, bufsize, mtInternal); 29 31 30 32 // sysclasspath, java_home, dll_dir 31 - @@ -478,26 +468,22 @@ void os::init_system_properties_values() { 33 + @@ -482,24 +472,20 @@ 32 34 // should always exist (until the legacy problem cited above is 33 35 // addressed). 34 36 const char *v = ::getenv("LD_LIBRARY_PATH"); 35 37 - const char *v_colon = ":"; 36 38 - if (v == NULL) { v = ""; v_colon = ""; } 39 + - // That's +1 for the colon and +1 for the trailing '\0'. 40 + - size_t pathsize = strlen(v) + 1 + sizeof(SYS_EXT_DIR) + sizeof("/lib/") + sizeof(DEFAULT_LIBPATH) + 1; 37 41 + if (v == NULL) { v = ""; } 38 - // That's +1 for the colon and +1 for the trailing '\0'. 39 - char *ld_library_path = NEW_C_HEAP_ARRAY(char, 40 - - strlen(v) + 1 + 41 - - sizeof(SYS_EXT_DIR) + sizeof("/lib/") + sizeof(DEFAULT_LIBPATH) + 1, 42 - + strlen(v) + 1, 43 - mtInternal); 44 - - sprintf(ld_library_path, "%s%s" SYS_EXT_DIR "/lib:" DEFAULT_LIBPATH, v, v_colon); 45 - + sprintf(ld_library_path, "%s", v); 42 + + size_t pathsize = strlen(v) + 1; 43 + char *ld_library_path = NEW_C_HEAP_ARRAY(char, pathsize, mtInternal); 44 + - os::snprintf_checked(ld_library_path, pathsize, "%s%s" SYS_EXT_DIR "/lib:" DEFAULT_LIBPATH, v, v_colon); 45 + + os::snprintf_checked(ld_library_path, pathsize, "%s", v); 46 46 Arguments::set_library_path(ld_library_path); 47 47 FREE_C_HEAP_ARRAY(char, ld_library_path); 48 48 } 49 49 50 50 // Extensions directories. 51 - - sprintf(buf, "%s" EXTENSIONS_DIR ":" SYS_EXT_DIR EXTENSIONS_DIR, Arguments::get_java_home()); 52 - + sprintf(buf, "%s" EXTENSIONS_DIR, Arguments::get_java_home()); 51 + - os::snprintf_checked(buf, bufsize, "%s" EXTENSIONS_DIR ":" SYS_EXT_DIR EXTENSIONS_DIR, Arguments::get_java_home()); 52 + + os::snprintf_checked(buf, bufsize, "%s" EXTENSIONS_DIR, Arguments::get_java_home()); 53 53 Arguments::set_ext_dirs(buf); 54 54 55 55 FREE_C_HEAP_ARRAY(char, buf); ··· 57 57 -#undef DEFAULT_LIBPATH 58 58 -#undef SYS_EXT_DIR 59 59 #undef EXTENSIONS_DIR 60 - } 60 + } 61 +
+2 -2
pkgs/development/compilers/openjdk/17/source.json
··· 1 1 { 2 - "hash": "sha256-9UB1H3gd+b4wWxOMgsdDPgX/IGWNORKk1gMsSjYoZMw=", 2 + "hash": "sha256-wHJlCmaE8titkfcWb2WboqemekPBn3JWc4bGyWskmoY=", 3 3 "owner": "openjdk", 4 4 "repo": "jdk17u", 5 - "rev": "jdk-17.0.12+7" 5 + "rev": "refs/tags/jdk-17.0.13+11" 6 6 }
-9
pkgs/development/compilers/openjdk/generic.nix
··· 221 221 hash = "sha256-Qcm3ZmGCOYLZcskNjj7DYR85R4v07vYvvavrVOYL8vg="; 222 222 }) 223 223 ] 224 - ++ lib.optionals (featureVersion == "17") [ 225 - # Backport fixes for musl 1.2.4 which are already applied in jdk21+ 226 - # Fetching patch from chimera because they already went through the effort of rebasing it onto jdk17 227 - (fetchurl { 228 - name = "lfs64.patch"; 229 - url = "https://raw.githubusercontent.com/chimera-linux/cports/4614075d19e9c9636f3f7e476687247f63330a35/contrib/openjdk17/patches/lfs64.patch"; 230 - hash = "sha256-t2mRbdEiumBAbIAC0zsJNwCn59WYWHsnRtuOSL6bWB4="; 231 - }) 232 - ] 233 224 ++ lib.optionals (!headless && enableGtk) [ 234 225 ( 235 226 if atLeast17 then