[Git][java-team/jboss-logging-tools][master] Clamp the date of the @Generated annotations to SOURCE_DATE_EPOCH to improve the reproducibility

Emmanuel Bourg gitlab at salsa.debian.org
Sat Aug 17 01:13:57 BST 2019



Emmanuel Bourg pushed to branch master at Debian Java Maintainers / jboss-logging-tools


Commits:
513b9636 by Emmanuel Bourg at 2019-08-17T00:06:12Z
Clamp the date of the @Generated annotations to SOURCE_DATE_EPOCH to improve the reproducibility

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/02-reproducible-generated-date.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+jboss-logging-tools (2.2.0-2) unstable; urgency=medium
+
+  * Team upload.
+  * Clamp the date of the @Generated annotations to SOURCE_DATE_EPOCH
+    to improve the reproducibility
+
+ -- Emmanuel Bourg <ebourg at apache.org>  Sat, 17 Aug 2019 02:05:41 +0200
+
 jboss-logging-tools (2.2.0-1) unstable; urgency=medium
 
   * New upstream version 2.2.0.


=====================================
debian/patches/02-reproducible-generated-date.patch
=====================================
@@ -0,0 +1,15 @@
+Description: Makes the date of the @Generated annotations reproducible
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: no
+--- a/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModelHelper.java
++++ b/processor/src/main/java/org/jboss/logging/processor/generator/model/ClassModelHelper.java
+@@ -52,7 +52,8 @@
+      */
+     static String generatedDateValue() {
+         final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
+-        return sdf.format(new Date());
++        sdf.setTimeZone(java.util.TimeZone.getTimeZone("UTC"));
++        return sdf.format(System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.valueOf(System.getenv("SOURCE_DATE_EPOCH"))) : new Date());
+     }
+ 
+     /**


=====================================
debian/patches/series
=====================================
@@ -1 +1,2 @@
 java9.patch
+02-reproducible-generated-date.patch



View it on GitLab: https://salsa.debian.org/java-team/jboss-logging-tools/commit/513b963692322533c4a5f85425d38b636c4d78cc

-- 
View it on GitLab: https://salsa.debian.org/java-team/jboss-logging-tools/commit/513b963692322533c4a5f85425d38b636c4d78cc
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20190817/3ccf128a/attachment.html>


More information about the pkg-java-commits mailing list