[Reproducible-builds] Bug#831354: fspy: please make the build reproducible

Chris Lamb lamby at debian.org
Thu Jul 14 20:12:49 UTC 2016


Source: fspy
Version: 0.1.1-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds at lists.alioth.debian.org

Hi,

Whilst working on the "reproducible builds" effort [0], we noticed
that fspy could not be built reproducibly.

Patch attached.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/Makefile	2016-07-14 22:02:22.394457902 +0200
--- b/Makefile	2016-07-14 22:12:29.028578510 +0200
@@ -1,7 +1,12 @@
 # This file is part of fspy
 # #########################
 
-BUILD = $(shell date +%Y%m%d%H)
+DATE_FMT = %Y%m%d%H
+ifdef SOURCE_DATE_EPOCH
+    BUILD ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)" 2>/dev/null || date -u "+$(DATE_FMT)")
+else
+    BUILD ?= $(shell date "+$(DATE_FMT)")
+endif
 #DEBUG = -g -D_DEBUG
 OPTS = -DMAJORVERSION=0 -DMINORVERSION=1 -DSUBMINORVERSION=1 -DBUILD=$(BUILD) -DCODENAME=\"25c3\"
 CFLAGS = -Wall


More information about the Reproducible-builds mailing list