GNU bug report logs - #33041
[PATCH] gnu: icedtea-6: Make javadoc reproducible.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Gábor Boskovits <boskovits@HIDDEN>; Keywords: patch; dated Sun, 14 Oct 2018 19:08:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 33041 <at> debbugs.gnu.org:


Received: (at 33041) by debbugs.gnu.org; 17 Oct 2018 07:58:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 17 03:58:17 2018
Received: from localhost ([127.0.0.1]:54343 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gCgif-00077B-BK
	for submit <at> debbugs.gnu.org; Wed, 17 Oct 2018 03:58:17 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:56308)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1gCgid-000773-HW
 for 33041 <at> debbugs.gnu.org; Wed, 17 Oct 2018 03:58:16 -0400
Received: from localhost (t193-007.demo.tuwien.ac.at [128.131.193.7])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 04FAE33602C6;
 Wed, 17 Oct 2018 09:58:13 +0200 (CEST)
Date: Wed, 17 Oct 2018 09:58:11 +0200
From: Danny Milosavljevic <dannym@HIDDEN>
To: =?ISO-8859-1?Q?G=E1bor?= Boskovits <boskovits@HIDDEN>
Subject: Re: [bug#33041] [PATCH] gnu: icedtea-6: Make javadoc reproducible.
Message-ID: <20181017095811.51bdc62e@HIDDEN>
In-Reply-To: <20181014190655.23754-1-boskovits@HIDDEN>
References: <20181014190655.23754-1-boskovits@HIDDEN>
X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 boundary="Sig_/b5s6NQnrn6ZOW2tmF8zIeNH"; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33041
Cc: 33041 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--Sig_/b5s6NQnrn6ZOW2tmF8zIeNH
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi Gabor,

On Sun, 14 Oct 2018 21:06:55 +0200
G=C3=A1bor Boskovits <boskovits@HIDDEN> wrote:

> +diff -r 06656286f572 -r 6e5f716a6592 src/share/classes/com/sun/tools/doc=
lets/formats/html/markup/HtmlDocWriter.java
> +--- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDo=
cWriter.java	Mon Aug 22 10:53:55 2016 -0700
> ++++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDo=
cWriter.java	Sat Oct 13 20:54:34 2018 +0200
> +@@ -396,6 +396,13 @@
> +      */
> +     public String today() {
> +         Calendar calendar =3D new GregorianCalendar(TimeZone.getDefault=
());
> +-        return calendar.getTime().toString();
> ++	Date date=3Dcalendar.getTime();
> ++	Map<String,String> env =3D System.getenv();
> ++	if(env.containsKey("SOURCE_DATE_EPOCH")) {
> ++	    String epoch=3Denv.get("SOURCE_DATE_EPOCH");
> ++	    long unixtime=3DLong.parseLong(epoch);
> ++	    date=3Dnew Date(unixtime*1000L);
> ++	}
> ++        return date.toString();
> +     }
> + }

Indentation is off.

Also, why not System.getenv("SOURCE_DATE_EPOCH") and check for null?  Not t=
hat important, though.

Otherwise LGTM!

--Sig_/b5s6NQnrn6ZOW2tmF8zIeNH
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlvG65MACgkQ5xo1VCww
uqXlzQf/WbFKpipNSzy1TNt+Mtn7vJo4fTIqZ5bmpkGjK2IzE28PklIld4KFnHBJ
WHW3Rpj22V2FyekhyVZ++KPhLteYjiF9Gh1pXkHr7+w7SJz3UFNwdbAFWCvesw+s
/a5jyJ9O0+xvhrwOdCce74a35Hj/dD7jpZPHL7MDfB+MSjPADMsM8yjNLgjuXs92
orFjWYT70nyzDqZBX70AOE3AXEFTOlo6mCmxew7J6+Rzt29b3W3N03WQVhXWBV2k
SI8SXzI3Bav4eMPR5Xe9x/djQgRq6VcQSiuU7tLLR6WFKMrPDVFZSOxWIu33XnZX
ihHwvn/U1mF+qQkM2he1q4b6jNHrOA==
=/B1x
-----END PGP SIGNATURE-----

--Sig_/b5s6NQnrn6ZOW2tmF8zIeNH--




Information forwarded to guix-patches@HIDDEN:
bug#33041; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 14 Oct 2018 19:07:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 14 15:07:37 2018
Received: from localhost ([127.0.0.1]:49557 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gBljl-00084V-JA
	for submit <at> debbugs.gnu.org; Sun, 14 Oct 2018 15:07:37 -0400
Received: from eggs.gnu.org ([208.118.235.92]:34619)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <boskovits@HIDDEN>) id 1gBljj-00084I-Kr
 for submit <at> debbugs.gnu.org; Sun, 14 Oct 2018 15:07:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <boskovits@HIDDEN>) id 1gBljX-00059q-4o
 for submit <at> debbugs.gnu.org; Sun, 14 Oct 2018 15:07:26 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:59374)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <boskovits@HIDDEN>) id 1gBljW-00059U-4i
 for submit <at> debbugs.gnu.org; Sun, 14 Oct 2018 15:07:22 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:44213)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <boskovits@HIDDEN>) id 1gBljV-0001Mc-5C
 for guix-patches@HIDDEN; Sun, 14 Oct 2018 15:07:21 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <boskovits@HIDDEN>) id 1gBljQ-00055r-Ro
 for guix-patches@HIDDEN; Sun, 14 Oct 2018 15:07:20 -0400
Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:34731)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <boskovits@HIDDEN>) id 1gBljO-0004ro-KE
 for guix-patches@HIDDEN; Sun, 14 Oct 2018 15:07:14 -0400
Received: by mail-wr1-x433.google.com with SMTP id l6-v6so18345191wrt.1
 for <guix-patches@HIDDEN>; Sun, 14 Oct 2018 12:07:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:date:message-id:mime-version
 :content-transfer-encoding;
 bh=dWb1IJfxtQDdSY3gaTnb4z+Uq2sAdg0axXk+2KgoQCM=;
 b=IV+2ACXBwMaEyFekGU1qDjFQaGuwGyq6FWEhQIrbV8qfDBk725Ma084Q8Wp0VLJIg1
 kKDgrBi/R0P4g9hoGcFpVwOhXPMdSGID+YSjU16iu5bLlyTOgEF3HVRXfjuk29WAPaSr
 AcPniMcXMWuD+hdbFzAUBM4LC1BtL9bx/b89RzXQWiVRKesUEqcDw5jdA3EaCRbGEVS+
 mLhUV2lR+Wouh0BSQ6lYUvvybWudu6dVfefZ2unjMcv24odXGq2utYLSuBClqHgyHEF9
 4lSJjBKcgzhyOVHIFm+TuNo6O+8OUJAB3mKjcpNBRYhsjhce7wIt4nllCOPxHKfd8oaW
 Kv0g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version
 :content-transfer-encoding;
 bh=dWb1IJfxtQDdSY3gaTnb4z+Uq2sAdg0axXk+2KgoQCM=;
 b=rhZhu2x8nWxt5b7VW+kY9C8FLClOdbUGu+rKGWmO3ZqJM89TdC68BKa+niMyeoW4Ya
 aT0ejFn1RJbR9FHcF0RretDUBzv53dJ/IxhURpFBY/cXeyXfx66HcjjeLOx6KrqMqzGx
 vK7MChRDibvFArWv2mAfJJet9weUVVZgkbaXLZsyxvPDRTl+7ZC2LhaVZGSkbsuAJamd
 3cttX74WErjz7p0VO020JvyCXCvwJ5puB8/waLvFQuFznLyid/mcUtyml6XmlOxD8i6k
 DCduh83zAzFS1c+xbqmUofQcgHRSj8jrzFCTpNMNdpmja6nfo7Dgmm7F5Dcyyui3KJAx
 GQYg==
X-Gm-Message-State: ABuFfoh5fB9oenzB++rWNUwWY1JLa7Ax9sADXWQ5cIK738OBgq2LAkTF
 S5PGzZZISvnKA67utORMKAH6AIM=
X-Google-Smtp-Source: ACcGV62mzrBE/3P8u8NuJErOe6/Ego5PtHYkQtpkdhm4EFHg4hZtSaFICJMkr6ixe16H/sggEHr2zA==
X-Received: by 2002:a5d:49c4:: with SMTP id
 t4-v6mr11819094wrs.116.1539544030714; 
 Sun, 14 Oct 2018 12:07:10 -0700 (PDT)
Received: from localhost.localdomain (4E5CE63B.dsl.pool.telekom.hu.
 [78.92.230.59])
 by smtp.gmail.com with ESMTPSA id z8-v6sm6222163wrp.63.2018.10.14.12.07.09
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 14 Oct 2018 12:07:10 -0700 (PDT)
From: =?UTF-8?q?G=C3=A1bor=20Boskovits?= <boskovits@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] gnu: icedtea-6: Make javadoc reproducible.
Date: Sun, 14 Oct 2018 21:06:55 +0200
Message-Id: <20181014190655.23754-1-boskovits@HIDDEN>
X-Mailer: git-send-email 2.18.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
Cc: =?UTF-8?q?G=C3=A1bor=20Boskovits?= <boskovits@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

* gnu/packages/patches/icedtea-6-javadoc-reproducibility.patch: New file.
* gnu/packages/java.scm[icedtea-6](native-inputs): Add patch to langtools-src.
(phases)[unpack]: Adjust unpacking of patched source.
* gnu/local.mk[dist_patch_DATA]: Register it.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/java.scm                         | 10 ++++---
 .../icedtea-6-javadoc-reproducibility.patch   | 26 +++++++++++++++++++
 3 files changed, 34 insertions(+), 3 deletions(-)
 create mode 100644 gnu/packages/patches/icedtea-6-javadoc-reproducibility.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index c3bc35a80..6e332b041 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -807,6 +807,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/icecat-use-system-graphite2.patch	\
   %D%/packages/patches/icecat-use-system-harfbuzz.patch		\
   %D%/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch  \
+  %D%/packages/patches/icedtea-6-javadoc-reproducibility.patch	\
   %D%/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch  \
   %D%/packages/patches/id3lib-CVE-2007-4460.patch			\
   %D%/packages/patches/ilmbase-fix-tests.patch			\
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index d2f4c9d05..ab9e3fd3a 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -734,10 +734,12 @@ machine.")))
                                        (string-append part "-src"))
                             part))
                          '("jdk" "corba"
-                           "langtools" "jaxp" "jaxws")))
+                           "jaxp" "jaxws")))
              (with-directory-excursion "openjdk"
                (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
-               (rename-file "hg-checkout" "hotspot"))
+               (rename-file "hg-checkout" "hotspot")
+               (invoke "tar" "xvf" (assoc-ref inputs "langtools-src"))
+               (rename-file "hg-checkout" "langtools"))
              (substitute* "Makefile.in"
                (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
                 "echo \"trust me\";")
@@ -976,7 +978,9 @@ machine.")))
                  (changeset "jdk6-b41")))
            (sha256
             (base32
-             "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
+             "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))
+           (patches
+            (search-patches "icedtea-6-javadoc-reproducibility.patch"))))
        ("jaxp-src"
         ,(origin
            (method hg-fetch)
diff --git a/gnu/packages/patches/icedtea-6-javadoc-reproducibility.patch b/gnu/packages/patches/icedtea-6-javadoc-reproducibility.patch
new file mode 100644
index 000000000..d4c8a97f3
--- /dev/null
+++ b/gnu/packages/patches/icedtea-6-javadoc-reproducibility.patch
@@ -0,0 +1,26 @@
+# HG changeset patch
+# User Gábor Boskovits <boskovits@HIDDEN>
+# Date 1539456874 -7200
+#      Sat Oct 13 20:54:34 2018 +0200
+# Node ID 6e5f716a659247888c104f66c58bf40fb959c8a4
+# Parent  06656286f572cbf716397b9d983f8dee7d94f913
+Make javadoc respect SOURCE_DATE_EPOCH.
+
+diff -r 06656286f572 -r 6e5f716a6592 src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java
+--- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java	Mon Aug 22 10:53:55 2016 -0700
++++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java	Sat Oct 13 20:54:34 2018 +0200
+@@ -396,6 +396,13 @@
+      */
+     public String today() {
+         Calendar calendar = new GregorianCalendar(TimeZone.getDefault());
+-        return calendar.getTime().toString();
++	Date date=calendar.getTime();
++	Map<String,String> env = System.getenv();
++	if(env.containsKey("SOURCE_DATE_EPOCH")) {
++	    String epoch=env.get("SOURCE_DATE_EPOCH");
++	    long unixtime=Long.parseLong(epoch);
++	    date=new Date(unixtime*1000L);
++	}
++        return date.toString();
+     }
+ }
-- 
2.18.0





Acknowledgement sent to Gábor Boskovits <boskovits@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#33041; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.