Bug#1079041: apg: please make the build reproducible

Chris Lamb lamby at debian.org
Mon Aug 19 10:16:54 BST 2024


Source: apg
Version: 2.2.3.dfsg.1-6
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

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

Although a value is passed to --mtime, as it is not prefixed by @,
tar gets confused about what date format it is in, leading to the
strange message:

   tar: Option --mtime: Treating date '1715341018' as 171534-10-18 00:00:00

This would actually still be deterministic (!) but, as it was not
parsed as a UNIX timestamp, a timezone variation is then applied.

Patch attached that adds the @.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-

-------------- next part --------------
--- a/debian/rules	2024-08-19 10:07:43.882848830 +0100
--- b/debian/rules	2024-08-19 10:13:49.059285956 +0100
@@ -21,7 +21,7 @@
 	make install INSTALL_PREFIX=$(CURDIR)/debian/apg/usr
 	mv $(CURDIR)/debian/apg/usr/bin/apg $(CURDIR)/debian/apg/usr/lib/apg/apg
 	tar --create --verbose --file - --directory $(CURDIR)/php/apgonline/ \
-	  --clamp-mtime --mtime="$(SOURCE_DATE_EPOCH)" \
+	  --clamp-mtime --mtime="@$(SOURCE_DATE_EPOCH)" \
 	  --mode=u=rwX,go=rX --sort=name . | gzip --no-name > php.tar.gz
 	install -D --mode=0644 php.tar.gz $(CURDIR)/debian/apg/usr/share/doc/apg/php.tar.gz
 	rm php.tar.gz


More information about the Reproducible-bugs mailing list