[findbugs] 15/18: Replaced the timestamps in version.properties, the man pages and the documentation with SOURCE_DATE_EPOCH
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Wed Aug 10 17:55:48 UTC 2016
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository findbugs.
commit 0de34b06e65c58f8e2f72899514ab2f41cd70254
Author: Emmanuel Bourg <ebourg at apache.org>
Date: Wed Aug 10 19:44:09 2016 +0200
Replaced the timestamps in version.properties, the man pages and the documentation with SOURCE_DATE_EPOCH
---
debian/changelog | 2 ++
debian/patches/0015-reproducibility.patch | 18 ++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 21 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index e1d1eb6..25ef44b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,8 @@ findbugs (3.1.0~preview2-1) UNRELEASED; urgency=medium
- Refreshed debian/copyright
* Moved the core library, the annotations and the Ant tasks to distinct
packages (Closes: #808707)
+ * Reproducibility: replaced the timestamps in version.properties,
+ the man pages and the documentation with SOURCE_DATE_EPOCH
* Depend on libasm-java (>= 5.0) instead of libasm4-java
* Removed junit4 and jdepend from the runtime dependencies
* debian/rules: Generate the man pages during the build phase
diff --git a/debian/patches/0015-reproducibility.patch b/debian/patches/0015-reproducibility.patch
new file mode 100644
index 0000000..963bae0
--- /dev/null
+++ b/debian/patches/0015-reproducibility.patch
@@ -0,0 +1,18 @@
+Description: Make the timestamps reproducible
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: no
+--- a/src/java/edu/umd/cs/findbugs/Version.java
++++ b/src/java/edu/umd/cs/findbugs/Version.java
+@@ -92,6 +92,12 @@
+ SimpleDateFormat eclipseDateFormat = new SimpleDateFormat("yyyyMMdd", Locale.ENGLISH);
+ SimpleDateFormat releaseDateFormat = new SimpleDateFormat(UpdateChecker.PLUGIN_RELEASE_DATE_FMT, Locale.ENGLISH);
+ Date now = new Date();
++ if (System.getenv("SOURCE_DATE_EPOCH") != null) {
++ now = new Date(Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")) * 1000L);
++ dateFormat.setTimeZone(java.util.TimeZone.getTimeZone("UTC"));
++ eclipseDateFormat.setTimeZone(java.util.TimeZone.getTimeZone("UTC"));
++ releaseDateFormat.setTimeZone(java.util.TimeZone.getTimeZone("UTC"));
++ }
+ COMPUTED_DATE = dateFormat.format(now);
+ COMPUTED_ECLIPSE_DATE = eclipseDateFormat.format(now);
+ String tmp = releaseDateFormat.format(now);
diff --git a/debian/patches/series b/debian/patches/series
index 85b4226..ea01ed6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -12,3 +12,4 @@
0012-verbose-tests.patch
0013-dont-fetch-external-libraries.patch
0014-asm-compatibility.patch
+0015-reproducibility.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/findbugs.git
More information about the pkg-java-commits
mailing list