gnu: icedtea: Fix time bomb in ‘GenerateCurrencyData.java’.
Fixes <https://issues.guix.gnu.org/68333>. * gnu/packages/java.scm (icedtea-7)[drop]: Add optional ‘patches’ parameter and honor it. [native-inputs]: Add patch for “jdk-drop”. (icedtea-8): Likewise. * gnu/packages/patches/jdk-currency-time-bomb.patch, gnu/packages/patches/jdk-currency-time-bomb2.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. Change-Id: I3b4cf562ce4bedb87ce0e7c289e431fbb0dbb6f8master
parent
a126e8120d
commit
5c0f77f424
|
@ -1489,6 +1489,8 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/java-xerces-build_dont_unzip.patch \
|
%D%/packages/patches/java-xerces-build_dont_unzip.patch \
|
||||||
%D%/packages/patches/java-xerces-xjavac_taskdef.patch \
|
%D%/packages/patches/java-xerces-xjavac_taskdef.patch \
|
||||||
%D%/packages/patches/jbr-17-xcursor-no-dynamic.patch \
|
%D%/packages/patches/jbr-17-xcursor-no-dynamic.patch \
|
||||||
|
%D%/packages/patches/jdk-currency-time-bomb.patch \
|
||||||
|
%D%/packages/patches/jdk-currency-time-bomb2.patch \
|
||||||
%D%/packages/patches/jfsutils-add-sysmacros.patch \
|
%D%/packages/patches/jfsutils-add-sysmacros.patch \
|
||||||
%D%/packages/patches/jfsutils-gcc-compat.patch \
|
%D%/packages/patches/jfsutils-gcc-compat.patch \
|
||||||
%D%/packages/patches/jfsutils-include-systypes.patch \
|
%D%/packages/patches/jfsutils-include-systypes.patch \
|
||||||
|
|
|
@ -100,13 +100,14 @@
|
||||||
|
|
||||||
(define-public icedtea-7
|
(define-public icedtea-7
|
||||||
(let* ((version "2.6.13")
|
(let* ((version "2.6.13")
|
||||||
(drop (lambda (name hash)
|
(drop (lambda* (name hash #:optional (patches '()))
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append
|
(uri (string-append
|
||||||
"http://icedtea.classpath.org/download/drops"
|
"http://icedtea.classpath.org/download/drops"
|
||||||
"/icedtea7/" version "/" name ".tar.bz2"))
|
"/icedtea7/" version "/" name ".tar.bz2"))
|
||||||
(sha256 (base32 hash))))))
|
(sha256 (base32 hash))
|
||||||
|
(patches patches)))))
|
||||||
(package
|
(package
|
||||||
(name "icedtea")
|
(name "icedtea")
|
||||||
(version version)
|
(version version)
|
||||||
|
@ -614,7 +615,8 @@
|
||||||
"110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
|
"110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
|
||||||
("jdk-drop"
|
("jdk-drop"
|
||||||
,(drop "jdk"
|
,(drop "jdk"
|
||||||
"0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
|
"0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"
|
||||||
|
(search-patches "jdk-currency-time-bomb.patch")))
|
||||||
("langtools-drop"
|
("langtools-drop"
|
||||||
,(drop "langtools"
|
,(drop "langtools"
|
||||||
"0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
|
"0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
|
||||||
|
@ -687,13 +689,14 @@ IcedTea build harness.")
|
||||||
|
|
||||||
(define-public icedtea-8
|
(define-public icedtea-8
|
||||||
(let* ((version "3.19.0")
|
(let* ((version "3.19.0")
|
||||||
(drop (lambda (name hash)
|
(drop (lambda* (name hash #:optional (patches '()))
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append
|
(uri (string-append
|
||||||
"http://icedtea.classpath.org/download/drops"
|
"http://icedtea.classpath.org/download/drops"
|
||||||
"/icedtea8/" version "/" name ".tar.xz"))
|
"/icedtea8/" version "/" name ".tar.xz"))
|
||||||
(sha256 (base32 hash))))))
|
(sha256 (base32 hash))
|
||||||
|
(patches patches)))))
|
||||||
(package (inherit icedtea-7)
|
(package (inherit icedtea-7)
|
||||||
(version "3.19.0")
|
(version "3.19.0")
|
||||||
(source (origin
|
(source (origin
|
||||||
|
@ -839,7 +842,8 @@ new Date();"))
|
||||||
"1pc0pv4v2mn2mjc0vp19d94v2150xigyhxsmckqasy647zcm6w0r"))
|
"1pc0pv4v2mn2mjc0vp19d94v2150xigyhxsmckqasy647zcm6w0r"))
|
||||||
("jdk-drop"
|
("jdk-drop"
|
||||||
,(drop "jdk"
|
,(drop "jdk"
|
||||||
"1742lcm55l8zhi522x83v65ccr0rd6511q9rj7crw44x3ymdrhrv"))
|
"1742lcm55l8zhi522x83v65ccr0rd6511q9rj7crw44x3ymdrhrv"
|
||||||
|
(search-patches "jdk-currency-time-bomb2.patch")))
|
||||||
("langtools-drop"
|
("langtools-drop"
|
||||||
,(drop "langtools"
|
,(drop "langtools"
|
||||||
"08iz7p2xcddlphipf6gahyabr5cawlnydap12p1n4f0md069b50b"))
|
"08iz7p2xcddlphipf6gahyabr5cawlnydap12p1n4f0md069b50b"))
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
Fix a time bomb present in the jdk "drop" of IcedTea.
|
||||||
|
|
||||||
|
--- a/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java
|
||||||
|
+++ b/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java
|
||||||
|
@@ -284,7 +284,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;
|
|
@ -0,0 +1,13 @@
|
||||||
|
Fix a time bomb present in the jdk "drop" of IcedTea 8.
|
||||||
|
|
||||||
|
--- a/make/src/classes/build/tools/generatecurrencydata/GenerateCurrencyData.java
|
||||||
|
+++ b/make/src/classes/build/tools/generatecurrencydata/GenerateCurrencyData.java
|
||||||
|
@@ -284,7 +284,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;
|
Reference in New Issue