From: "Gábor Boskovits" <boskovits@gmail.com>
To: 33041@debbugs.gnu.org
Cc: "Gábor Boskovits" <boskovits@gmail.com>
Subject: [bug#33041] [PATCH] gnu: icedtea-6: Make javadoc reproducible.
Date: Sun, 14 Oct 2018 21:06:55 +0200 [thread overview]
Message-ID: <20181014190655.23754-1-boskovits@gmail.com> (raw)
* 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@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 -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
next reply other threads:[~2018-10-14 19:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-14 19:06 Gábor Boskovits [this message]
2018-10-17 7:58 ` [bug#33041] [PATCH] gnu: icedtea-6: Make javadoc reproducible Danny Milosavljevic
2020-05-14 17:58 ` Ricardo Wurmus
2020-05-14 18:22 ` Gábor Boskovits
2020-12-10 21:31 ` Kei Kebreau
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181014190655.23754-1-boskovits@gmail.com \
--to=boskovits@gmail.com \
--cc=33041@debbugs.gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).