all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kei Kebreau <kkebreau@posteo.net>
To: "Gábor Boskovits" <boskovits@gmail.com>
Cc: 33041@debbugs.gnu.org
Subject: [bug#33041] [PATCH] gnu: icedtea-6: Make javadoc reproducible.
Date: Thu, 10 Dec 2020 16:31:33 -0500	[thread overview]
Message-ID: <87o8j1xs96.fsf@posteo.net> (raw)
In-Reply-To: <CAE4v=pj9q3=C7+X8DEok6ThX25VBAYnYc+O46-Q2YV43NRVTvQ@mail.gmail.com> ("Gábor Boskovits"'s message of "Thu, 14 May 2020 20:22:02 +0200")


[-- Attachment #1.1: Type: text/plain, Size: 191 bytes --]

Hi all,

I came across this bug and had some time to attempt to make the
suggested changes.  Please find the updated patch attached and let me
know if it still works as intended.

Best,
Kei


[-- Attachment #1.2: 0001-gnu-icedtea-6-Make-javadoc-reproducible.patch --]
[-- Type: text/x-patch, Size: 4097 bytes --]

From e3bc8635e8730e33c2e4f9658dacb6f2f669d8bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=A1bor=20Boskovits?= <boskovits@gmail.com>
Date: Sun, 14 Oct 2018 21:06:55 +0200
Subject: [PATCH] gnu: icedtea-6: Make javadoc reproducible.

* 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                         |  9 +++++--
 .../icedtea-6-javadoc-reproducibility.patch   | 25 +++++++++++++++++++
 3 files changed, 33 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/icedtea-6-javadoc-reproducibility.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 9284e487fe..9a1b98eb16 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1169,6 +1169,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/icecat-use-system-graphite2+harfbuzz.patch	\
   %D%/packages/patches/icecat-use-system-media-libs.patch	\
   %D%/packages/patches/icedtea-6-extend-hotspot-aarch64-support.patch	\
+  %D%/packages/patches/icedtea-6-javadoc-reproducibility.patch	\
   %D%/packages/patches/icedtea-7-hotspot-aarch64-use-c++98.patch	\
   %D%/packages/patches/icu4c-CVE-2020-10531.patch  		\
   %D%/packages/patches/id3lib-CVE-2007-4460.patch			\
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index e298fd9537..deaa9e1fcd 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -892,7 +892,10 @@ machine.")))
                                        (string-append part "-src"))
                             part))
                          '("jdk" "hotspot" "corba"
-                           "langtools" "jaxp" "jaxws")))
+                           "jaxp" "jaxws")))
+             (with-directory-excursion "openjdk"
+               (invoke "tar" "xvf" (assoc-ref inputs "langtools-src"))
+               (rename-file "hg-checkout" "langtools"))
              (substitute* "patches/freetypeversion.patch"
                (("REQUIRED_FREETYPE_VERSION = 2.2.1")
                 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
@@ -1136,7 +1139,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 0000000000..dd472a9c66
--- /dev/null
+++ b/gnu/packages/patches/icedtea-6-javadoc-reproducibility.patch
@@ -0,0 +1,25 @@
+# HG changeset patch
+# User Gábor Boskovits <boskovits@gmail.com>
+# 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 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	Wed Dec 09 21:40:00 2020 -0500
+@@ -396,6 +396,12 @@
+      */
+     public String today() {
+         Calendar calendar = new GregorianCalendar(TimeZone.getDefault());
+-        return calendar.getTime().toString();
++        Date date=calendar.getTime();
++        String epoch=System.getenv("SOURCE_DATE_EPOCH");
++        if(epoch != null) {
++            long unixtime=Long.parseLong(epoch);
++            date=new Date(unixtime*1000L);
++	}
++	return date.toString();
+     }
+ }
-- 
2.29.2


[-- Attachment #1.3: Type: text/plain, Size: 378 bytes --]



Gábor Boskovits <boskovits@gmail.com> writes:

> Ok, I will look into it.
>
> Ricardo Wurmus <rekado@elephly.net> ezt írta (időpont: 2020. máj. 14., Csü 19:59):
>
>  Hi Gábor,
>
>  looks like we dropped this issue.  Would you like to rebase it, include
>  Danny’s suggestions, and push it?  I’d very much like to close bug #30927.
>
>  -- 
>  Ricardo

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2020-12-10 21:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-14 19:06 [bug#33041] [PATCH] gnu: icedtea-6: Make javadoc reproducible Gábor Boskovits
2018-10-17  7:58 ` Danny Milosavljevic
2020-05-14 17:58 ` Ricardo Wurmus
2020-05-14 18:22   ` Gábor Boskovits
2020-12-10 21:31     ` Kei Kebreau [this message]
2021-07-14 13:34       ` Maxim Cournoyer
2024-03-07 22:24 ` bug#33041: " Vagrant Cascadian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o8j1xs96.fsf@posteo.net \
    --to=kkebreau@posteo.net \
    --cc=33041@debbugs.gnu.org \
    --cc=boskovits@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.