Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package java-11-openjdk for openSUSE:Factory checked in at 2023-08-12 15:06:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/java-11-openjdk (Old) and /work/SRC/openSUSE:Factory/.java-11-openjdk.new.11712 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "java-11-openjdk" Sat Aug 12 15:06:04 2023 rev:64 rq:1103522 version:11.0.20.0 Changes: -------- --- /work/SRC/openSUSE:Factory/java-11-openjdk/java-11-openjdk.changes 2023-07-26 13:22:01.395340224 +0200 +++ /work/SRC/openSUSE:Factory/.java-11-openjdk.new.11712/java-11-openjdk.changes 2023-08-12 15:06:11.726504881 +0200 @@ -1,0 +2,8 @@ +Fri Aug 4 15:49:22 UTC 2023 - Fridrich Strba <fst...@suse.com> + +- Added patch: + * reproducible-javadoc-timestamp.patch + + use SOURCE_DATE_EPOCH in javadoc and make the javadoc + generation more reproducible + +------------------------------------------------------------------- New: ---- reproducible-javadoc-timestamp.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ java-11-openjdk.spec ++++++ --- /var/tmp/diff_new_pack.t7sp6j/_old 2023-08-12 15:06:13.090513694 +0200 +++ /var/tmp/diff_new_pack.t7sp6j/_new 2023-08-12 15:06:13.098513745 +0200 @@ -218,6 +218,8 @@ # Patch20: loadAssistiveTechnologies.patch # +Patch21: reproducible-javadoc-timestamp.patch +# Patch30: JDK-8208602.patch # # OpenJDK specific patches @@ -500,6 +502,8 @@ %patch20 -p1 +%patch21 -p1 + %patch30 -p1 # s390 build fixes ++++++ reproducible-javadoc-timestamp.patch ++++++ >From cf1f86d30b2e9d0b4ada535d16e6e9141dc6bb17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.st...@bluewin.ch> Date: Fri, 4 Aug 2023 17:43:52 +0200 Subject: [PATCH] Reproducible javadoc timestamp --- .../doclets/formats/html/markup/Head.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Head.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Head.java index 85ee310f0b..3c5260b1a0 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Head.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Head.java @@ -256,6 +256,9 @@ public class Head { */ public Content toContent() { Date now = showTimestamp ? calendar.getTime() : null; + if (now != null && System.getenv("SOURCE_DATE_EPOCH") != null) { + now = new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))); + } HtmlTree tree = new HtmlTree(HtmlTag.HEAD); if (showGeneratedBy) { @@ -269,6 +272,9 @@ public class Head { if (showMetaCreated) { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); + if (System.getenv("SOURCE_DATE_EPOCH") != null) { + dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); + } tree.addContent(HtmlTree.META( (htmlVersion == HtmlVersion.HTML5) ? "dc.created" : "date", dateFormat.format(now))); @@ -298,7 +304,14 @@ public class Head { private Comment getGeneratedBy(boolean timestamp, Date now) { String text = "Generated by javadoc"; // marker string, deliberately not localized if (timestamp) { - text += " ("+ docletVersion + ") on " + now; + text += " ("+ docletVersion + ") on "; + if (System.getenv("SOURCE_DATE_EPOCH") == null) { + text += now; + } else { + SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z"); + fmt.setTimeZone(TimeZone.getTimeZone("UTC")); + text += fmt.format(now); + } } return new Comment(text); } -- 2.41.0