Source: libapache-poi-java
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: timestamps timezones
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

The timestamp is embedded in a file inside the poi.jar archive:

  
https://tests.reproducible-builds.org/debian/rb-pkg/trixie/amd64/diffoscope-results/libapache-poi-java.html

  /usr/share/java/poi-4.0.1.jar

  private·static·final·String·RELEASE_DATE·=·"20220516";
  vs.
  private·static·final·String·RELEASE_DATE·=·"20220517";

The attached patch to debian/rules fixes this by passing the --utc
argument to date, to ensure the date is rendered consistently.

According to my local tests, with this patch applied, libapache-poi-java
should build reproducibly on tests.reproducible-builds.org!

Thanks for maintaining libapache-poi-java!

live well,
  vagrant
From 31d9fba2bb2a58222eec798edf1104b877756b36 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Wed, 28 Jun 2023 13:25:19 -0700
Subject: [PATCH] debian/rules: Use utc date to avoid embedding
 timezone-specific timestamps.

https://reproducible-builds.org/docs/source-date-epoch/

Thanks to Chris Lamb for the initial patch!
---
 debian/rules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index c94adb7..9ddad46 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,7 +10,7 @@ VERSION := $(shell echo $(DEB_VERSION_UPSTREAM) | sed 's/+dfsg//')
 	dh $@ --with maven-repo-helper --with javahelper
 
 override_dh_auto_build:
-	dh_auto_build -- -Dversion.id=$(VERSION) -DDSTAMP=$(shell date '--date=@$(SOURCE_DATE_EPOCH)' +%Y%m%d) jar maven-poms javadocs
+	dh_auto_build -- -Dversion.id=$(VERSION) -DDSTAMP=$(shell date '--utc --date=@$(SOURCE_DATE_EPOCH)' +%Y%m%d) jar maven-poms javadocs
 
 override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
-- 
2.39.2

Attachment: signature.asc
Description: PGP signature

Reply via email to