From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44354) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBlkD-0001Zp-PZ for guix-patches@gnu.org; Sun, 14 Oct 2018 15:08:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBlkA-0005jA-J3 for guix-patches@gnu.org; Sun, 14 Oct 2018 15:08:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:45299) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gBlkA-0005j2-F7 for guix-patches@gnu.org; Sun, 14 Oct 2018 15:08:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gBlkA-00085G-8p for guix-patches@gnu.org; Sun, 14 Oct 2018 15:08:02 -0400 Subject: [bug#33041] [PATCH] gnu: icedtea-6: Make javadoc reproducible. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44213) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBljV-0001Mc-5C for guix-patches@gnu.org; Sun, 14 Oct 2018 15:07:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBljQ-00055r-Ro for guix-patches@gnu.org; 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 ) id 1gBljO-0004ro-KE for guix-patches@gnu.org; Sun, 14 Oct 2018 15:07:14 -0400 Received: by mail-wr1-x433.google.com with SMTP id l6-v6so18345191wrt.1 for ; Sun, 14 Oct 2018 12:07:12 -0700 (PDT) From: =?UTF-8?Q?G=C3=A1bor?= Boskovits Date: Sun, 14 Oct 2018 21:06:55 +0200 Message-Id: <20181014190655.23754-1-boskovits@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 33041@debbugs.gnu.org Cc: =?UTF-8?Q?G=C3=A1bor?= Boskovits * 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 +# 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 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