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 --- a/src/hotspot/os/linux/os_linux.cpp 2 +++ b/src/hotspot/os/linux/os_linux.cpp 3 - @@ -412,18 +412,8 @@ void os::init_system_properties_values() { 4 // 1: ... 5 // ... 6 // 7: The default directories, normally /lib and /usr/lib. ··· 18 -#define SYS_EXT_DIR "/usr/java/packages" 19 #define EXTENSIONS_DIR "/lib/ext" 20 21 - // Buffer that fits several sprintfs. 22 - @@ -431,7 +421,7 @@ void os::init_system_properties_values() { 23 // by the nulls included by the sizeof operator. 24 const size_t bufsize = 25 MAX2((size_t)MAXPATHLEN, // For dll_dir & friends. ··· 28 char *buf = NEW_C_HEAP_ARRAY(char, bufsize, mtInternal); 29 30 // sysclasspath, java_home, dll_dir 31 - @@ -478,26 +468,22 @@ void os::init_system_properties_values() { 32 // should always exist (until the legacy problem cited above is 33 // addressed). 34 const char *v = ::getenv("LD_LIBRARY_PATH"); 35 - const char *v_colon = ":"; 36 - if (v == NULL) { v = ""; v_colon = ""; } 37 + 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); 46 Arguments::set_library_path(ld_library_path); 47 FREE_C_HEAP_ARRAY(char, ld_library_path); 48 } 49 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()); 53 Arguments::set_ext_dirs(buf); 54 55 FREE_C_HEAP_ARRAY(char, buf); ··· 57 -#undef DEFAULT_LIBPATH 58 -#undef SYS_EXT_DIR 59 #undef EXTENSIONS_DIR 60 - }
··· 1 + diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp 2 + index 7c951cee51..bcc61ff43d 100644 3 --- a/src/hotspot/os/linux/os_linux.cpp 4 +++ b/src/hotspot/os/linux/os_linux.cpp 5 + @@ -416,18 +416,8 @@ 6 // 1: ... 7 // ... 8 // 7: The default directories, normally /lib and /usr/lib. ··· 20 -#define SYS_EXT_DIR "/usr/java/packages" 21 #define EXTENSIONS_DIR "/lib/ext" 22 23 + // Buffer that fits several snprintfs. 24 + @@ -435,7 +425,7 @@ 25 // by the nulls included by the sizeof operator. 26 const size_t bufsize = 27 MAX2((size_t)MAXPATHLEN, // For dll_dir & friends. ··· 30 char *buf = NEW_C_HEAP_ARRAY(char, bufsize, mtInternal); 31 32 // sysclasspath, java_home, dll_dir 33 + @@ -482,24 +472,20 @@ 34 // should always exist (until the legacy problem cited above is 35 // addressed). 36 const char *v = ::getenv("LD_LIBRARY_PATH"); 37 - const char *v_colon = ":"; 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; 41 + if (v == NULL) { 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 Arguments::set_library_path(ld_library_path); 47 FREE_C_HEAP_ARRAY(char, ld_library_path); 48 } 49 50 // Extensions directories. 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 Arguments::set_ext_dirs(buf); 54 55 FREE_C_HEAP_ARRAY(char, buf); ··· 57 -#undef DEFAULT_LIBPATH 58 -#undef SYS_EXT_DIR 59 #undef EXTENSIONS_DIR 60 + } 61 +
+2 -2
pkgs/development/compilers/openjdk/17/source.json
··· 1 { 2 - "hash": "sha256-9UB1H3gd+b4wWxOMgsdDPgX/IGWNORKk1gMsSjYoZMw=", 3 "owner": "openjdk", 4 "repo": "jdk17u", 5 - "rev": "jdk-17.0.12+7" 6 }
··· 1 { 2 + "hash": "sha256-wHJlCmaE8titkfcWb2WboqemekPBn3JWc4bGyWskmoY=", 3 "owner": "openjdk", 4 "repo": "jdk17u", 5 + "rev": "refs/tags/jdk-17.0.13+11" 6 }
-9
pkgs/development/compilers/openjdk/generic.nix
··· 221 hash = "sha256-Qcm3ZmGCOYLZcskNjj7DYR85R4v07vYvvavrVOYL8vg="; 222 }) 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 ++ lib.optionals (!headless && enableGtk) [ 234 ( 235 if atLeast17 then
··· 221 hash = "sha256-Qcm3ZmGCOYLZcskNjj7DYR85R4v07vYvvavrVOYL8vg="; 222 }) 223 ] 224 ++ lib.optionals (!headless && enableGtk) [ 225 ( 226 if atLeast17 then