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

The build timestamp is included in various gzip headers:

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

  /usr/share/doc/liblopsub-dev/changelog.Debian.gz

  
gzip·compressed·data,·was·"changelog.Debian",·last·modified:·Mon·May·20·01:26:32·2024,·max·compression,·from·Unix
  vs.
  
gzip·compressed·data,·was·"changelog.Debian",·last·modified:·Mon·Apr·17·19:04:49·2023,·max·compression,·from·Unix

  /usr/share/man/man1/lopsubgen.1.gz

  
gzip·compressed·data,·was·"lopsubgen.1",·last·modified:·Mon·May·20·01:26:29·2024,·max·compression,·from·Unix
  vs.
  
gzip·compressed·data,·was·"lopsubgen.1",·last·modified:·Mon·Apr·17·19:04:45·2023,·max·compression,·from·Unix

The attached two patches (one patching the upstream Makefile, the other
patching debian/rules) fix this by passing -n to the gzip calls used to
compress changelog.Debian and the various manpages.

According to my local tests, with these two patches applied liblopsub
should build reproducibly on tests.reproducible-builds.org once it
migrates to debian/trixie! This alone does not resolve all
reproducibilitiy issues (e.g. build paths, tested in unstable and
experimental).

Thanks for maintaining liblopsub!

live well,
  vagrant
From f92b3e462e3665bf1a4f8469ddd5ebf0c19f3f26 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Tue, 27 Jun 2023 12:41:36 -0700
Subject: [PATCH 1/3] Makefile: Pass -n to gzip to avoid embedding timestamps.

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index d1f89b1..f139597 100644
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@ AR := ar
 GROFF := groff
 CP := cp
 INSTALL := install
-GZIP := gzip -f9
+GZIP := gzip -n -f9
 ZCAT := zcat
 
 DATE_FMT := +%B %Y
-- 
2.39.2

From e95dc3bf4cf0beb6afdd23a34c9b7923ffbd0c24 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Tue, 27 Jun 2023 12:42:16 -0700
Subject: [PATCH 2/3] debian/rules: Pass -n to gzip to avoid embedding
 timestamps.

---
 debian/rules | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/rules b/debian/rules
index 3ba7a74..1263826 100755
--- a/debian/rules
+++ b/debian/rules
@@ -49,8 +49,8 @@ binary: build
 	$(INST_FILE) debian/copyright $(DEVDOCS_DIR)/copyright
 	$(INST_FILE) debian/changelog $(DOCS_DIR)/changelog.Debian
 	$(INST_FILE) debian/changelog $(DEVDOCS_DIR)/changelog.Debian
-	gzip -f9 $(DOCS_DIR)/changelog.Debian
-	gzip -f9 $(DEVDOCS_DIR)/changelog.Debian
+	gzip -n -f9 $(DOCS_DIR)/changelog.Debian
+	gzip -n -f9 $(DEVDOCS_DIR)/changelog.Debian
 	dh_makeshlibs
 	dh_shlibdeps
 	dh_strip
-- 
2.39.2

Attachment: signature.asc
Description: PGP signature

Reply via email to