Your message dated Wed, 15 Jan 2020 01:53:22 +0000
with message-id <[email protected]>
and subject line Bug#933349: fixed in openjdk-11 11.0.6+10-1
has caused the Debian Bug report #933349,
regarding openjdk-11: Make the generated copyright headers reproducible
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
933349: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=933349
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: openjdk-11
Version: 11.0.4+11-1
Severity: normal

OpenJDK generates several classes at build time with a copyright header that
look like this:

  /*
   * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights 
reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it

The upper bound of the date range is generated dynamically using the current
date, which makes the file non reproducible.

It affects the reproducibility of the src.zip file installed by 
openjdk-11-source.

I'm attaching a patch fixing the two build tools involved in this issue
(EquivMapsGenerator and CopyrightHeaders).

Emmanuel Bourg
Description: Makes the generated copyright headers reproducible
Author: Emmanuel Bourg <[email protected]>
Forwarded: no
--- a/make/jdk/src/classes/build/tools/cldrconverter/CopyrightHeaders.java
+++ b/make/jdk/src/classes/build/tools/cldrconverter/CopyrightHeaders.java
@@ -26,6 +26,7 @@
 package build.tools.cldrconverter;
 
 import java.util.Calendar;
+import java.util.Date;
 import java.util.GregorianCalendar;
 import java.util.Locale;
 import java.util.TimeZone;
@@ -150,8 +151,14 @@
     }
 
     private static int getYear() {
-        return new 
GregorianCalendar(TimeZone.getTimeZone("America/Los_Angeles"),
-                                         Locale.US).get(Calendar.YEAR);
+        Date date = new Date();
+        if (System.getenv("SOURCE_DATE_EPOCH") != null) {
+            date = new Date(1000 * 
Long.valueOf(System.getenv("SOURCE_DATE_EPOCH")));
+        }
+
+        GregorianCalendar calendar = new 
GregorianCalendar(TimeZone.getTimeZone("UTC"), Locale.ENGLISH);
+        calendar.setTime(date);
+        return calendar.get(Calendar.YEAR);
     }
 
     // no instantiation
--- 
a/make/jdk/src/classes/build/tools/generatelsrequivmaps/EquivMapsGenerator.java
+++ 
b/make/jdk/src/classes/build/tools/generatelsrequivmaps/EquivMapsGenerator.java
@@ -33,9 +33,13 @@
 import java.time.ZoneId;
 import java.time.ZonedDateTime;
 import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
+import java.util.TimeZone;
 import java.util.TreeMap;
 
 /**
@@ -225,8 +229,15 @@
         + "}";
 
     private static String getOpenJDKCopyright() {
-        int year = ZonedDateTime.now(ZoneId
-                .of("America/Los_Angeles")).getYear();
+        Date date = new Date();
+        if (System.getenv("SOURCE_DATE_EPOCH") != null) {
+            date = new Date(1000 * 
Long.valueOf(System.getenv("SOURCE_DATE_EPOCH")));
+        }
+
+        GregorianCalendar calendar = new 
GregorianCalendar(TimeZone.getTimeZone("UTC"), Locale.ENGLISH);
+        calendar.setTime(date);
+
+        int year = calendar.get(Calendar.YEAR);
         return String.format(Locale.US, COPYRIGHT, year);
     }
 

--- End Message ---
--- Begin Message ---
Source: openjdk-11
Source-Version: 11.0.6+10-1

We believe that the bug you reported is fixed in the latest version of
openjdk-11, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Matthias Klose <[email protected]> (supplier of updated openjdk-11 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Wed, 15 Jan 2020 01:09:36 +0100
Source: openjdk-11
Architecture: source
Version: 11.0.6+10-1
Distribution: unstable
Urgency: high
Maintainer: OpenJDK Team <[email protected]>
Changed-By: Matthias Klose <[email protected]>
Closes: 933339 933342 933349 933373 942030
Changes:
 openjdk-11 (11.0.6+10-1) unstable; urgency=high
 .
   * OpenJDK 11.0.5+10 build (release).
     - S8220598: Malformed copyright year range in a few files in java.base.
     - S8224909, CVE-2020-2583: Unlink Set of LinkedHashSets.
     - S8225261: Better method resolutions.
     - S8225279: Better XRender interpolation.
     - S8226352, CVE-2020-2590: Improve Kerberos interop capabilities.
     - S8227758: More valid PKIX processing.
     - S8227816: More Colorful ICC profiles.
     - S8228548, CVE-2020-2593: Normalize normalization for all.
     - S8229728: Implement negotiation parameters.
     - S8229951, CVE-2020-2601: Better Ticket Granting Services.
     - S8230279: Improve Pack200 file reading.
     - S8230318: Better trust store usage.
     - S8230967: Improve Registry support of clients.
     - S8231139: Improved keystore support.
     - S8231422, CVE-2020-2604: Better serial filter handling.
     - S8231780, CVE-2020-2655: Better TLS messaging support.
     - S8231790: Provide better FileSystemProviders.
     - S8232419: Improve Registry registration.
     - S8234037, CVE-2020-2654: Improve Object Identifier Processing.
   * Disable zero on sparc64 (Adrian Glaubitz). Closes: #942030.
   * Make the generated character data source files reproducible (Emmanuel
     Bourg). Closes: #933339.
   * Make the generated module-info.java files reproducible (Emmanuel Bourg).
     Closes: #933342.
   * Make the generated copyright headers reproducible (Emmanuel Bourg).
     Closes: #933349.
   * Make the build user reproducible (Emmanuel Bourg). Closes: #933373.
Checksums-Sha1:
 9cf9815f8c91cd8fce004926d9bb1b9a41c73951 4814 openjdk-11_11.0.6+10-1.dsc
 51bf7b279129e756de6d6a89d7186d08f4b5d1b4 75506884 
openjdk-11_11.0.6+10.orig.tar.xz
 0a72ae566db0dc035beca8828f322eb09f4c84a0 174676 
openjdk-11_11.0.6+10-1.debian.tar.xz
 c113a6ed273f76d70aa773132d29fc65ff8823d2 15599 
openjdk-11_11.0.6+10-1_source.buildinfo
Checksums-Sha256:
 612396ed3955f28607a49b517967601c1195e71cbe0c2f09ea8d064779dcacb8 4814 
openjdk-11_11.0.6+10-1.dsc
 a4ecca6e093758cbb7d15d8cdf40e1b7564a096987442549ca346a0c434cf917 75506884 
openjdk-11_11.0.6+10.orig.tar.xz
 988c26576751ca9a915dfc0b23b325a9f9af9689c602c9775dae8d5668103aef 174676 
openjdk-11_11.0.6+10-1.debian.tar.xz
 f8afda9ad259d6c721142aef9d5a14934147fbcde29006bf899bd55df55aa1ad 15599 
openjdk-11_11.0.6+10-1_source.buildinfo
Files:
 f9d84080193293c522282fd03e900b4e 4814 java optional openjdk-11_11.0.6+10-1.dsc
 1e85b0cb04a5ecf619d0da940f8b95b5 75506884 java optional 
openjdk-11_11.0.6+10.orig.tar.xz
 5555b58efa9f735f44a4aae8fe09b478 174676 java optional 
openjdk-11_11.0.6+10-1.debian.tar.xz
 e840039e77778df8dd13e68ec817aaea 15599 java optional 
openjdk-11_11.0.6+10-1_source.buildinfo

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

iQJEBAEBCAAuFiEE1WVxuIqLuvFAv2PWvX6qYHePpvUFAl4eXWEQHGRva29AdWJ1
bnR1LmNvbQAKCRC9fqpgd4+m9d+LD/9RtxWCu0H3RaDZZWnmXT/29E3B3Lliez/+
gm36Xn03MDFjTj4pAeJCCuJTY6GfoGQOHMjSJ349fWknm7/mQgx8GOY1NS3l3Qis
zmAMzK1Y1+AYLUUKBcTU21rfpN+VHQVXM4oxk+1LUmnoVEq1qz1U1Pa1j+Lqcu0i
o9hl2ZpjX66kGcdW+hFS548ujWWjLxdMwgxlTaLWnD8G4HNQBmmJl6PbDSD8c7Fd
KG7hPW/X2kBBvnGpAqFOHsMdJrndogwGmQ8X9OAC/jwnGhh27v3ck1R5lREpSRYb
amtex29YofWBL6ukcDp2lHuF0NCvt5+JHH07oU54SMe8HVxWKpXz9osmF+SU5c33
Y3nERezDZlcIEQ+qtBfCESTbEaIDtaFOaqWNNs7OEURGLL0gueocPJMb5vqin869
PGJ5R3Gx3oIDsKbeFRSEuKn71pfJnglasxNfpX4dkEdbnwNvzUEAkxAxw7UhwG+c
k8SpaTTBQq3AFGyiPENIB1s8gSwmZhd+iqfwiWtzoIdKkWuLuZnTHgBMDP6Lktnk
HSBZi55ZzGNQOGDt+62h3FOP2Xo5lhoA1m/4215HjnvR2/aB4721pxitGifKOFF5
bmCzWDSe6GT7UUGQuuVtMSshvhanEjJswH/kVnSUaW7koaHxwlFw61rNDNHzX+jl
LOw72R4hJQ==
=B5Wk
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to