Source: libapache-poi-java
Version: 3.10.1-2
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Hi,

While working on the "reproducible builds" effort [1], we have noticed
that libapache-poi-java could not be built reproducibly.

The attached patch removes varying timestamps from the build system.
Once
applied, libapache-poi-java can be built reproducibly in our
reproducible
toolchain.

 [1]: https://wiki.debian.org/ReproducibleBuilds


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
diff --git a/debian/rules b/debian/rules
index 80f353c..cbdda63 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,6 +5,9 @@ include /usr/share/cdbs/1/class/ant.mk
 
 VERSION := $(shell echo $(DEB_UPSTREAM_VERSION) | sed 's/+dfsg//')
 
+BUILD_DATE = $(shell dpkg-parsechangelog --show-field Date)
+DSTAMP := $(shell LC_ALL=C date --utc --date="$(BUILD_DATE)" "+%Y%m%d")
+
 PACKAGE := apache-poi
 MAVEN_DIST := build/dist
 POM_DIR := $(MAVEN_DIST)
@@ -18,7 +21,7 @@ DEB_ANT_BUILD_TARGET := jar maven-poms javadocs
 DEB_ANT_CHECK_TARGET := test
 #DEB_INSTALL_CHANGELOGS_ALL := RELEASE-NOTES.txt
 
-ANT_ARGS := -Dversion.id=$(VERSION)
+ANT_ARGS := -Dversion.id=$(VERSION) -DDSTAMP=$(DSTAMP)
 
 clean::
        mh_clean
_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to