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 <[email protected]>  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 <[email protected]>
+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.


_______________________________________________
pkg-java-commits mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-java-commits

Reply via email to