From d831e4c17ba9568973a3e0a2cd8ce14343e7f335 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 24 Oct 2024 17:28:27 +0000 Subject: [PATCH 01/10] openjdk8: 8u422-ga -> 8u432-b06 --- pkgs/development/compilers/openjdk/8/source.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/openjdk/8/source.json b/pkgs/development/compilers/openjdk/8/source.json index 47ad1dc0596a..6cedef5ccb7b 100644 --- a/pkgs/development/compilers/openjdk/8/source.json +++ b/pkgs/development/compilers/openjdk/8/source.json @@ -1,6 +1,6 @@ { - "hash": "sha256-uMo1DIkji+FPTbFRwURXybkLE5xv+teSClWP9RfAvfo=", + "hash": "sha256-48DyJXD7D28LFa+4ONeMgSddqrCLn6FLwEGWGeP4upM=", "owner": "openjdk", "repo": "jdk8u", - "rev": "jdk8u422-ga" + "rev": "refs/tags/jdk8u432-b06" } From afa5f909846cd0f80d38d0a50e7b2aa770d65eb0 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 24 Oct 2024 17:29:39 +0000 Subject: [PATCH 02/10] openjdk11: 11.0.24+8 -> 11.0.25+9 --- pkgs/development/compilers/openjdk/11/source.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/openjdk/11/source.json b/pkgs/development/compilers/openjdk/11/source.json index 8683cdecba3d..68080694d667 100644 --- a/pkgs/development/compilers/openjdk/11/source.json +++ b/pkgs/development/compilers/openjdk/11/source.json @@ -1,6 +1,6 @@ { - "hash": "sha256-H/VmT6NYbbZBba7Js8xk+epVZ2kLfvlwTNgg5SQ4ljA=", + "hash": "sha256-HqFm4qESB5T4Y1FLgfHZxURi7l7NkLzx2w8GzmB1jSY=", "owner": "openjdk", "repo": "jdk11u", - "rev": "jdk-11.0.24+8" + "rev": "refs/tags/jdk-11.0.25+9" } From fe4e4a1ae23b5f96df2de7399e857c8762fc5fba Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 24 Oct 2024 17:30:51 +0000 Subject: [PATCH 03/10] openjdk17: 17.0.12+7 -> 17.0.13+11 Drop an upstreamed patch, and update another for upstream changes. --- .../17/patches/fix-library-path-jdk17.patch | 31 ++++++++++--------- .../compilers/openjdk/17/source.json | 4 +-- .../development/compilers/openjdk/generic.nix | 9 ------ 3 files changed, 18 insertions(+), 26 deletions(-) diff --git a/pkgs/development/compilers/openjdk/17/patches/fix-library-path-jdk17.patch b/pkgs/development/compilers/openjdk/17/patches/fix-library-path-jdk17.patch index 4c38aca2b48a..71d96631ef89 100644 --- a/pkgs/development/compilers/openjdk/17/patches/fix-library-path-jdk17.patch +++ b/pkgs/development/compilers/openjdk/17/patches/fix-library-path-jdk17.patch @@ -1,6 +1,8 @@ +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. @@ -18,8 +20,8 @@ -#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. @@ -28,28 +30,26 @@ 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); @@ -57,4 +57,5 @@ -#undef DEFAULT_LIBPATH -#undef SYS_EXT_DIR #undef EXTENSIONS_DIR - } \ No newline at end of file + } + diff --git a/pkgs/development/compilers/openjdk/17/source.json b/pkgs/development/compilers/openjdk/17/source.json index 546e2fff8a19..c372853e70e0 100644 --- a/pkgs/development/compilers/openjdk/17/source.json +++ b/pkgs/development/compilers/openjdk/17/source.json @@ -1,6 +1,6 @@ { - "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" } diff --git a/pkgs/development/compilers/openjdk/generic.nix b/pkgs/development/compilers/openjdk/generic.nix index 49742ca8b989..669057216a55 100644 --- a/pkgs/development/compilers/openjdk/generic.nix +++ b/pkgs/development/compilers/openjdk/generic.nix @@ -221,15 +221,6 @@ stdenv.mkDerivation (finalAttrs: { 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 From fc8beb4a6a025b7fceea8c2a597543c0cfcbac92 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 24 Oct 2024 17:32:03 +0000 Subject: [PATCH 04/10] openjdk21: 21.0.4+7 -> 21.0.5+11 --- pkgs/development/compilers/openjdk/21/source.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/openjdk/21/source.json b/pkgs/development/compilers/openjdk/21/source.json index d0db28246a84..9808423ccff1 100644 --- a/pkgs/development/compilers/openjdk/21/source.json +++ b/pkgs/development/compilers/openjdk/21/source.json @@ -1,6 +1,6 @@ { - "hash": "sha256-+xpQtQ1IQ7btVWnENT9XS5A/2VP101/+XR3BMo8BqYI=", + "hash": "sha256-H28Hp1SzANkrgnC6xdkiSEcRK6bm8BcT/lbJDEUvRYY=", "owner": "openjdk", "repo": "jdk21u", - "rev": "jdk-21.0.4+7" + "rev": "refs/tags/jdk-21.0.5+11" } From 860924d70406ee12fb85edf08871c285a7a228ea Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 24 Oct 2024 17:33:14 +0000 Subject: [PATCH 05/10] openjdk23: 23-ga -> 23.0.1+11 --- pkgs/development/compilers/openjdk/23/source.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/openjdk/23/source.json b/pkgs/development/compilers/openjdk/23/source.json index b47426326ecd..d56aeb591498 100644 --- a/pkgs/development/compilers/openjdk/23/source.json +++ b/pkgs/development/compilers/openjdk/23/source.json @@ -1,6 +1,6 @@ { - "hash": "sha256-lcLnWAiskWindOqWmOWiIHiYKXGSJZK4d20k19QZfrE=", + "hash": "sha256-Sl0aEtndzlyuwMtcjOeDe2CVls89ONzicP5IXhAU2FA=", "owner": "openjdk", "repo": "jdk23u", - "rev": "jdk-23-ga" + "rev": "refs/tags/jdk-23.0.1+11" } From 7bc545f5a811d2835b7b2ded7f74434439a197fe Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 24 Oct 2024 18:49:28 +0100 Subject: [PATCH 06/10] openjdk{8,11,17,21,23}: remove obsolete version logic --- pkgs/development/compilers/openjdk/generic.nix | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkgs/development/compilers/openjdk/generic.nix b/pkgs/development/compilers/openjdk/generic.nix index 669057216a55..a551b974f93f 100644 --- a/pkgs/development/compilers/openjdk/generic.nix +++ b/pkgs/development/compilers/openjdk/generic.nix @@ -99,12 +99,8 @@ let atLeast23 = lib.versionAtLeast featureVersion "23"; tagPrefix = if atLeast11 then "jdk-" else "jdk"; - # TODO: Merge these `lib.removePrefix` calls once update scripts have - # been run. - version = lib.removePrefix tagPrefix (lib.removePrefix "refs/tags/" source.src.rev); - versionSplit = - # TODO: Remove `-ga` logic once update scripts have been run. - builtins.match (if atLeast11 then "(.+)[-+](.+)" else "(.+)-b?(.+)") version; + version = lib.removePrefix "refs/tags/${tagPrefix}" source.src.rev; + versionSplit = builtins.match (if atLeast11 then "(.+)+(.+)" else "(.+)-b(.+)") version; versionBuild = lib.elemAt versionSplit 1; # The JRE 8 libraries are in directories that depend on the CPU. From 09adc5dc965bb9edfb69b258876727b06f018553 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 24 Oct 2024 19:17:45 +0000 Subject: [PATCH 07/10] openjfx17: 17.0.11-ga -> 17.0.11+3 So this is fun: the hash here is actually the hash we had previously for 17.0.6+3. 614dc610feb174b3a220d7cda36e7fbf565fc172 bumped to this version, with the correct hash, but then the conversion to use the Gradle setup hook in e6f8a3babaadc3e1560e5143610cf1098fee4a77 regressed it back, presumably due to a merge issue, and of course nobody noticed until now. Drop an upstreamed WebKit Ruby compatibility fix that should never have been needed for the version we advertised this as being at the time. Fixes: e6f8a3babaadc3e1560e5143610cf1098fee4a77 --- pkgs/by-name/op/openjfx/17/deps.json | 4 ++-- pkgs/by-name/op/openjfx/17/source.json | 4 ++-- pkgs/by-name/op/openjfx/package.nix | 5 ----- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/op/openjfx/17/deps.json b/pkgs/by-name/op/openjfx/17/deps.json index a9fa40a91be1..ec1816339f40 100644 --- a/pkgs/by-name/op/openjfx/17/deps.json +++ b/pkgs/by-name/op/openjfx/17/deps.json @@ -7,8 +7,8 @@ } }, "https://github.com": { - "unicode-org/icu/releases/download/release-71-1/icu4c-71_1-data-bin-l": { - "zip": "sha256-pVWIy0BkICsthA5mxhR9SJQHleMNnaEcGl/AaLi5qZM=" + "unicode-org/icu/releases/download/release-73-1/icu4c-73_1-data-bin-l": { + "zip": "sha256-QDgpjuAqDDiRcYXvj/Tr3pyLVSx3f9A+TfbGtLGCXiA=" } }, "https://repo.maven.apache.org/maven2": { diff --git a/pkgs/by-name/op/openjfx/17/source.json b/pkgs/by-name/op/openjfx/17/source.json index 932875548f4b..df4010708c42 100644 --- a/pkgs/by-name/op/openjfx/17/source.json +++ b/pkgs/by-name/op/openjfx/17/source.json @@ -1,6 +1,6 @@ { + "hash": "sha256-WV8NHlYlt7buGbirLSorLnS2TnyBD17zUquFfwSL3xE=", "owner": "openjdk", "repo": "jfx17u", - "rev": "17.0.11-ga", - "sha256": "sha256-9VfXk2EfMebMyVKPohPRP2QXRFf8XemUtfY0JtBCHyw=" + "rev": "refs/tags/17.0.11+3" } diff --git a/pkgs/by-name/op/openjfx/package.nix b/pkgs/by-name/op/openjfx/package.nix index 96269280f7b6..aaac6be0c9cd 100644 --- a/pkgs/by-name/op/openjfx/package.nix +++ b/pkgs/by-name/op/openjfx/package.nix @@ -139,11 +139,6 @@ stdenv.mkDerivation { -i modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/Heap.cpp \ modules/javafx.web/src/main/native/Source/bmalloc/bmalloc/IsoSharedPageInlines.h - '' - + lib.optionalString (!atLeast21) '' - substituteInPlace modules/javafx.web/src/main/native/Source/JavaScriptCore/offlineasm/parser.rb \ - --replace-fail "File.exists?" "File.exist?" - '' + '' ln -s $config gradle.properties From 2c50b625cf3e496ce5a600486553908f79b13121 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 24 Oct 2024 19:35:01 +0000 Subject: [PATCH 08/10] openjfx21: 21.0.3-ga -> 21.0.3+2 Purely cosmetic change; these versions are identical. --- pkgs/by-name/op/openjfx/21/source.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/op/openjfx/21/source.json b/pkgs/by-name/op/openjfx/21/source.json index adecaa605bcc..73d3a6adbb5c 100644 --- a/pkgs/by-name/op/openjfx/21/source.json +++ b/pkgs/by-name/op/openjfx/21/source.json @@ -2,5 +2,5 @@ "hash": "sha256-7z0GIbkQwG9mXY9dssaicqaKpMo3FkNEpyAvkswoQQ4=", "owner": "openjdk", "repo": "jfx21u", - "rev": "21.0.3-ga" + "rev": "refs/tags/21.0.3+2" } From f95c2f68da044de1766fa6a6655085422e7346ee Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 24 Oct 2024 19:43:24 +0000 Subject: [PATCH 09/10] openjfx23: 23-ga -> 23.0.1+4 Drop a backported patch that was upstreamed. --- pkgs/by-name/op/openjfx/23/source.json | 4 ++-- pkgs/by-name/op/openjfx/package.nix | 16 ++++------------ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/pkgs/by-name/op/openjfx/23/source.json b/pkgs/by-name/op/openjfx/23/source.json index a67cd0f370f1..19ca02f90b00 100644 --- a/pkgs/by-name/op/openjfx/23/source.json +++ b/pkgs/by-name/op/openjfx/23/source.json @@ -1,6 +1,6 @@ { - "hash": "sha256-a/ev91Rq7D3z9O56ZZQCgvvbfj5GBt5Lonow2NH3s/E=", + "hash": "sha256-H3BPLo7yKWBiiI8sd3wkLJDN9h6jbWj5119cs2YHLwU=", "owner": "openjdk", "repo": "jfx23u", - "rev": "23-ga" + "rev": "refs/tags/23.0.1+4" } diff --git a/pkgs/by-name/op/openjfx/package.nix b/pkgs/by-name/op/openjfx/package.nix index aaac6be0c9cd..b64ce6d32e15 100644 --- a/pkgs/by-name/op/openjfx/package.nix +++ b/pkgs/by-name/op/openjfx/package.nix @@ -69,17 +69,8 @@ stdenv.mkDerivation { inherit (source) src; - patches = - if featureVersion == "23" then - [ - # 8338701: Provide media support for libavcodec version 61 - # - (fetchpatch2 { - url = "https://github.com/openjdk/jfx23u/commit/aba60fda1c82f00e8e685107592305c403a31287.patch?full_index=1"; - hash = "sha256-+aRhTwi4VQthAq1SH1jxPl0mTosNMKoTY52jm+jiKso="; - }) - ] - else if atLeast21 then + patches = lib.optionals (!atLeast23) ( + if atLeast21 then [ ./21/patches/backport-ffmpeg-7-support-jfx21.patch ] @@ -87,7 +78,8 @@ stdenv.mkDerivation { [ ./17/patches/backport-ffmpeg-6-support-jfx11.patch ./17/patches/backport-ffmpeg-7-support-jfx11.patch - ]; + ] + ); nativeBuildInputs = [ gradle_openjfx From 1b0dadd10238de0c60ed27d36cd500b8210111f2 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 24 Oct 2024 20:54:37 +0100 Subject: [PATCH 10/10] nixpkgs-openjdk-updater.openjdkSource: enforce `source.json` schema --- .../ni/nixpkgs-openjdk-updater/package.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/ni/nixpkgs-openjdk-updater/package.nix b/pkgs/by-name/ni/nixpkgs-openjdk-updater/package.nix index 124a1fced4c6..e23d573d9641 100644 --- a/pkgs/by-name/ni/nixpkgs-openjdk-updater/package.nix +++ b/pkgs/by-name/ni/nixpkgs-openjdk-updater/package.nix @@ -43,11 +43,17 @@ python3Packages.buildPythonApplication { featureVersionPrefix, }: let - # TODO: Tighten up after update scripts are run. - src = fetchFromGitHub (lib.importJSON sourceFile); + sourceInfo = lib.importJSON sourceFile; in { - inherit src; + src = fetchFromGitHub { + inherit (sourceInfo) + owner + repo + rev + hash + ; + }; updateScript = { command = [ @@ -57,10 +63,10 @@ python3Packages.buildPythonApplication { sourceFile "--owner" - src.owner + sourceInfo.owner "--repo" - src.repo + sourceInfo.repo "--feature-version-prefix" featureVersionPrefix