From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:700:3204::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id gLRtMGurnmWNWAAAkFu2QA (envelope-from ) for ; Wed, 10 Jan 2024 15:36:27 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id AAYDKWurnmWTJQEAe85BDQ (envelope-from ) for ; Wed, 10 Jan 2024 15:36:27 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="LSrC/MUY"; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1704897387; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=BC083U2BQJ8457MIxYvvYPLe12gxRA7W11lg8vmGVM0=; b=sRbjtXZGNrq7W0V4MkNvra0siBXmrEHYwiWnq+CE53pBY3cc5UIV7oamrsGxvLmW7r4u4R qA/QWeEbNg0d3V3uVU1JrsBHgxmNA4r0ZEV78Thx6Z45WaR7WvlukTJWonCh0dRrt3C8oF 7oLvMySSiegzC0jK567n9yKssPzKE1zpL7XlRLzL+uqA0BvItuitVgRVOovQAucyaAFN0J yGRUPSOfK8j6fPwvg3neCEmtaehLaMXd0EP9opfsh7cXjHm6tKzhJxua6ZqVnUNWF6AM+m naccPJmS9KiJXF8KVepaLPEMh9SdsZtBeHkS0SkuQT0+iIoBxUACsu+DTMpE8w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1704897387; a=rsa-sha256; cv=none; b=ZskfqgI15HXQsCbsAsLs/ou48cbcWDyiVDot2nM5NAENSK6NOtXYkZz4tKeGOlfSW4YmTL fsun/Zi4dsfA7Z7IG40xXFkfe51meqOJFbEOIM+kJld+tO48Dn0LrOugWn+sGfYs8BbEX9 1Dko0OtmpDDaV74QyXGy4a1UYo941SJKK7wbV8CwVCt1mC0VV1zC+PYZaNL/4Cu/KtM+8J 7Xiei6k72pu9aPLluZuJoAwp13Z94lWeOJE+E5un9VIHMsgGiEgrtuC47iwrEpTPFgazEj JPYdeSyAvqmQPHe3lo7fMAMjUmc0WGP4y5Tnf3Oety0EMen4SNj/Csadeh69Xg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="LSrC/MUY"; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 52E5F527AB for ; Wed, 10 Jan 2024 15:36:27 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rNZgf-0008Br-9p; Wed, 10 Jan 2024 09:36:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rNZgb-0008BQ-Or for bug-guix@gnu.org; Wed, 10 Jan 2024 09:36:07 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rNZgZ-0001Aw-93 for bug-guix@gnu.org; Wed, 10 Jan 2024 09:36:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rNZgX-0004Dy-RC for bug-guix@gnu.org; Wed, 10 Jan 2024 09:36:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#68333: Time bomb in icedtea/openjdk Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 10 Jan 2024 14:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68333 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Rostislav Svoboda Cc: 68333@debbugs.gnu.org Received: via spool by 68333-submit@debbugs.gnu.org id=B68333.170489731816084 (code B ref 68333); Wed, 10 Jan 2024 14:36:01 +0000 Received: (at 68333) by debbugs.gnu.org; 10 Jan 2024 14:35:18 +0000 Received: from localhost ([127.0.0.1]:39448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNZfp-0004BK-ET for submit@debbugs.gnu.org; Wed, 10 Jan 2024 09:35:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNZfm-0004An-Ti for 68333@debbugs.gnu.org; Wed, 10 Jan 2024 09:35:15 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rNZfi-0000k5-Ou; Wed, 10 Jan 2024 09:35:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=BC083U2BQJ8457MIxYvvYPLe12gxRA7W11lg8vmGVM0=; b=LSrC/MUY2tIyrnc2oB4S 6gIN/6/ycXUgPjFAFU2974eYoXhlh8Xvp1ADZufOFjNLQqKP+Nm4z/23E3YELlKGGyH4iOBgXT+vL MN80YrUJEVGEEkSejJA23qwFRjL3kTNj84rR6xrCrAtbHqmdlUCzi6Zs+HwqYNkJnhNup2MjBDyZ2 pEKc6gMO7H2q5knyVyBe4jzoQUHinuD8dP9Uat8dYLd+Ydk+3L6pTdTL4jFbR5lNz/GGcfpLgO9g1 zAgEGLjEnWTUfvjwPlcOki0MuG/zccXjaR5FcfbwYoudmjQc7De831MRgQ5F/2n0MrqdHBIEihLhr CkWC3n/mZ4Nbtg==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: (Rostislav Svoboda's message of "Tue, 9 Jan 2024 22:00:49 +0100") References: Date: Wed, 10 Jan 2024 15:35:00 +0100 Message-ID: <87ply9tfxn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.99 X-Spam-Score: -6.99 X-Migadu-Queue-Id: 52E5F527AB X-Migadu-Scanner: mx11.migadu.com X-TUID: DZn0gnhcPBdV --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Rostislav Svoboda skribis: > From 1e86e32825a5025b4ef439e7f678143416f622b5 Mon Sep 17 00:00:00 2001 > Message-ID: <1e86e32825a5025b4ef439e7f678143416f622b5.1704815654.git.Rost= islav.Svoboda@gmail.com> > From: Rostislav Svoboda > Date: Tue, 9 Jan 2024 14:08:02 +0100 > Subject: [PATCH] gnu: Fix time bomb preventing build of icedtea. > > Fixes . > > Fixes time bomb preventing build of icedtea by patching the java source c= ode > so that the java-RuntimeException is not thrown when 'more than 10 years = ago' > condition is true. > > * gnu/packages/java.scm (icedtea): Patch java source code so that the > offending line is commented out. > > Change-Id: I4861ee2ffc5aaffb6a9244110d222ae64bfbdf94 Thanks for the quick investigation and patch! I just realized that this affects current =E2=80=98master=E2=80=99 so we=E2=80=99d rather fix it soon. What do you think of the attached patch? The difference is that it patches code at its root (in the actual source tarball rather than after it=E2=80=99s been copied), it does so for IcedTea 7 and 8, and there are pa= tch files that are slightly clearer than a substitution pattern. It=E2=80=99s still building on my machine but if it works for everyone, I= =E2=80=99d like to push as soon as I got it built. Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-icedtea-Fix-time-bomb-in-GenerateCurrencyData.ja.patch Content-Transfer-Encoding: quoted-printable Content-Description: the patch >From 92561a776ad88eb73034948beedbe9e6be4077b4 Mon Sep 17 00:00:00 2001 Message-ID: <92561a776ad88eb73034948beedbe9e6be4077b4.1704897216.git.ludo@g= nu.org> From: =3D?UTF-8?q?Ludovic=3D20Court=3DC3=3DA8s?=3D Date: Wed, 10 Jan 2024 15:27:47 +0100 Subject: [PATCH] =3D?UTF-8?q?gnu:=3D20icedtea:=3D20Fix=3D20time=3D20bomb=3D= 20in=3D20?=3D =3D?UTF-8?q?=3DE2=3D80=3D98GenerateCurrencyData.java=3DE2=3D80=3D99.?=3D MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit Fixes . * gnu/packages/java.scm (icedtea-7)[drop]: Add optional =E2=80=98patches=E2= =80=99 parameter and honor it. [native-inputs]: Add patch for =E2=80=9Cjdk-drop=E2=80=9D. (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: I3b4cf562ce4bedb87ce0e7c289e431fbb0dbb6f8 --- gnu/local.mk | 2 ++ gnu/packages/java.scm | 16 ++++++++++------ .../patches/jdk-currency-time-bomb.patch | 13 +++++++++++++ .../patches/jdk-currency-time-bomb2.patch | 13 +++++++++++++ 4 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 gnu/packages/patches/jdk-currency-time-bomb.patch create mode 100644 gnu/packages/patches/jdk-currency-time-bomb2.patch diff --git a/gnu/local.mk b/gnu/local.mk index 16a34065c6..22970932e9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1478,6 +1478,8 @@ dist_patch_DATA =3D \ %D%/packages/patches/java-xerces-build_dont_unzip.patch \ %D%/packages/patches/java-xerces-xjavac_taskdef.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-gcc-compat.patch \ %D%/packages/patches/jfsutils-include-systypes.patch \ diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index e2c2a041a9..ded73bc461 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -100,13 +100,14 @@ (define-module (gnu packages java) =20 (define-public icedtea-7 (let* ((version "2.6.13") - (drop (lambda (name hash) + (drop (lambda* (name hash #:optional (patches '())) (origin (method url-fetch) (uri (string-append "http://icedtea.classpath.org/download/drops" "/icedtea7/" version "/" name ".tar.bz2")) - (sha256 (base32 hash)))))) + (sha256 (base32 hash)) + (patches patches))))) (package (name "icedtea") (version version) @@ -614,7 +615,8 @@ (define-public icedtea-7 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk")) ("jdk-drop" ,(drop "jdk" - "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd")) + "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd" + (search-patches "jdk-currency-time-bomb.patch"))) ("langtools-drop" ,(drop "langtools" "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj")) @@ -687,13 +689,14 @@ (define-public icedtea-7 =20 (define-public icedtea-8 (let* ((version "3.19.0") - (drop (lambda (name hash) + (drop (lambda* (name hash #:optional (patches '())) (origin (method url-fetch) (uri (string-append "http://icedtea.classpath.org/download/drops" "/icedtea8/" version "/" name ".tar.xz")) - (sha256 (base32 hash)))))) + (sha256 (base32 hash)) + (patches patches))))) (package (inherit icedtea-7) (version "3.19.0") (source (origin @@ -839,7 +842,8 @@ (define-public icedtea-8 "1pc0pv4v2mn2mjc0vp19d94v2150xigyhxsmckqasy647zcm6w0r")) ("jdk-drop" ,(drop "jdk" - "1742lcm55l8zhi522x83v65ccr0rd6511q9rj7crw44x3ymdrhrv")) + "1742lcm55l8zhi522x83v65ccr0rd6511q9rj7crw44x3ymdrhrv" + (search-patches "jdk-currency-time-bomb2.patch"))) ("langtools-drop" ,(drop "langtools" "08iz7p2xcddlphipf6gahyabr5cawlnydap12p1n4f0md069b50b")) diff --git a/gnu/packages/patches/jdk-currency-time-bomb.patch b/gnu/packag= es/patches/jdk-currency-time-bomb.patch new file mode 100644 index 0000000000..8e6bce6fcd --- /dev/null +++ b/gnu/packages/patches/jdk-currency-time-bomb.patch @@ -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 =3D currencyInfo.substring(4, length - 4); + long time =3D 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 fr= om present: " + time); ++ System.err.println("note: time is more than 10 years from= \"present\": " + time); + } + specialCaseCutOverTimes[specialCaseCount] =3D time; + specialCaseOldCurrencies[specialCaseCount] =3D oldCurrency; diff --git a/gnu/packages/patches/jdk-currency-time-bomb2.patch b/gnu/packa= ges/patches/jdk-currency-time-bomb2.patch new file mode 100644 index 0000000000..94454626c4 --- /dev/null +++ b/gnu/packages/patches/jdk-currency-time-bomb2.patch @@ -0,0 +1,13 @@ +Fix a time bomb present in the jdk "drop" of IcedTea 8. + +--- a/make/src/classes/build/tools/generatecurrencydata/GenerateCurrencyDa= ta.java ++++ b/make/src/classes/build/tools/generatecurrencydata/GenerateCurrencyDa= ta.java +@@ -284,7 +284,7 @@ public class GenerateCurrencyData { + String timeString =3D currencyInfo.substring(4, length - 4); + long time =3D 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 fr= om present: " + time); ++ System.err.println("note: time is more than 10 years from= \"present\": " + time); + } + specialCaseCutOverTimes[specialCaseCount] =3D time; + specialCaseOldCurrencies[specialCaseCount] =3D oldCurrency; base-commit: 3eac1c82f7f1547aa6819db867b071a4ee7de8e3 --=20 2.41.0 --=-=-=--