[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#994976: xtermcontrol: please make the build reproducible



Source: xtermcontrol
Version: 3.8-3
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0] we noticed that
xtermcontrol could not be built reproducibly.

This is because it uses a custom set of date macros in acinclude.m4.
Patch attached that overrides the values in debian/rules, basing
them off SOURCE_DATE_EPOCH.

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-
--- a/debian/rules	2021-09-24 09:20:53.800313098 +0100
--- b/debian/rules	2021-09-24 09:35:32.356026521 +0100
@@ -5,9 +5,15 @@
 
 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
 
+PACKAGE_YEAR = $(shell date --utc --date=@$(SOURCE_DATE_EPOCH) '+%Y')
+PACKAGE_DATE = $(shell date --utc --date=@$(SOURCE_DATE_EPOCH) +'%B %d, %Y')
+
 %:
 	dh $@
 
+override_dh_auto_build:
+	dh_auto_build -- PACKAGE_YEAR="$(PACKAGE_YEAR)" PACKAGE_DATE="$(PACKAGE_DATE)"
+
 override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 	xvfb-run xterm -e '( dh_auto_test ; echo $$? ) | tee debian/xterm_dh_auto_test.log'

Reply to: