Source: liblopsub Version: 1.0.2-1 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: timestamps X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
Hi, Whilst working on the Reproducible Builds effort [0], we noticed that liblopsub could not be built reproducibly. Patch attached. [0] https://reproducible-builds.org/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
diff --git a/Makefile b/Makefile index 408e3a5..2d85802 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,12 @@ INSTALL := install GZIP := gzip -f9 ZCAT := zcat -DATE := $(shell date '+%B %Y') +DATE_FMT = '+%B %Y' +ifdef SOURCE_DATE_EPOCH + DATE := $(shell LC_ALL=C date -u -d "@$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)" 2>/dev/null || LC_ALL=C date -u -r "$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)" 2>/dev/null || date LC_ALL=C -u "+$(DATE_FMT)") +else + DATE := $(shell date "+$(DATE_FMT)") +endif GIT_VERSION := $(shell ./version-gen.sh) PLAIN_VERSION := $(firstword $(subst -, , $(GIT_VERSION))) MAJOR_VERSION := $(firstword $(subst ., , $(PLAIN_VERSION)))