Source: mblaze Version: 0.3.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 mblaze could not be built reproducibly. Patch attached. [0] https://reproducible-builds.org/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/debian/patches/reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/reproducible-build.patch 2018-02-15 20:58:12.715958345 +0000 @@ -0,0 +1,25 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2018-02-15 + +--- mblaze-0.3.2.orig/GNUmakefile ++++ mblaze-0.3.2/GNUmakefile +@@ -37,10 +37,17 @@ msort : mystrverscmp.o + mmime : slurp.o + minc mlist : squeeze_slash.o + ++DATE_FMT = %Y-%m-%d ++ifdef SOURCE_DATE_EPOCH ++ BUILD_DATE ?= $(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_DATE ?= $(shell date "+$(DATE_FMT)") ++endif ++ + museragent: FRC + @printf '#!/bin/sh\nprintf "User-Agent: mblaze/%s (%s)\\n"\n' \ + "$$({ git describe --always --dirty 2>/dev/null || cat VERSION; } | sed 's/^v//')" \ +- "$$(date +%Y-%m-%d)" >$@ ++ "$(BUILD_DATE)" >$@ + @chmod +x $@ + + README: man/mblaze.7 --- a/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/series 2018-02-15 20:58:11.831953372 +0000 @@ -0,0 +1 @@ +reproducible-build.patch