aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-rw-r--r--gnu/local.mk3
-rw-r--r--gnu/packages/java.scm3
-rw-r--r--gnu/packages/patches/openjdk-currency-time-bomb.patch13
3 files changed, 17 insertions, 2 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 6e6d28e6f0..43163c3d27 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -7,7 +7,7 @@
# Copyright © 2016, 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
# Copyright © 2016, 2017 Rene Saavedra <rennes@openmailbox.org>
# Copyright © 2016 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
-# Copyright © 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Ricardo Wurmus <rekado@elephly.net>
+# Copyright © 2016-2024 Ricardo Wurmus <rekado@elephly.net>
# Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
# Copyright © 2016, 2017, 2018, 2019 Alex Vong <alexvong1995@gmail.com>
# Copyright © 2016-2023 Efraim Flashner <efraim@flashner.co.il>
@@ -1743,6 +1743,7 @@ dist_patch_DATA = \
%D%/packages/patches/openboardview-use-system-mpc.patch \
%D%/packages/patches/openbox-python3.patch \
%D%/packages/patches/opencolorio-fix-build-with-gcc11.patch \
+ %D%/patches/openjdk-currency-time-bomb.patch \
%D%/packages/patches/openjdk-9-pointer-comparison.patch \
%D%/packages/patches/openjdk-9-setsignalhandler.patch \
%D%/packages/patches/openjdk-10-idlj-reproducibility.patch \
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index ded73bc461..40d777089a 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -880,7 +880,8 @@ new Date();"))
(base32
"1v92nzdqx07c35x945awzir4yk0fk22vky6fpp8mq9js930sxsz0"))
(patches (search-patches "openjdk-9-pointer-comparison.patch"
- "openjdk-9-setsignalhandler.patch"))))
+ "openjdk-9-setsignalhandler.patch"
+ "openjdk-currency-time-bomb.patch"))))
(build-system gnu-build-system)
(outputs '("out" "jdk" "doc"))
(arguments
diff --git a/gnu/packages/patches/openjdk-currency-time-bomb.patch b/gnu/packages/patches/openjdk-currency-time-bomb.patch
new file mode 100644
index 0000000000..7738eb1595
--- /dev/null
+++ b/gnu/packages/patches/openjdk-currency-time-bomb.patch
@@ -0,0 +1,13 @@
+Fix a time bomb present in the OpenJDK tools.
+
+--- a/jdk/make/src/classes/build/tools/generatecurrencydata/GenerateCurrencyData.java
++++ b/jdk/make/src/classes/build/tools/generatecurrencydata/GenerateCurrencyData.java
+@@ -285,7 +285,7 @@ public class GenerateCurrencyData {
+ String timeString = currencyInfo.substring(4, length - 4);
+ long time = format.parse(timeString).getTime();
+ if (Math.abs(time - System.currentTimeMillis()) > ((long) 10) * 365 * 24 * 60 * 60 * 1000) {
+- throw new RuntimeException("time is more than 10 years from present: " + time);
++ System.err.println("note: time is more than 10 years from \"present\": " + time);
+ }
+ specialCaseCutOverTimes[specialCaseCount] = time;
+ specialCaseOldCurrencies[specialCaseCount] = oldCurrency;