[Reproducible-builds] Bug#831046: lacheck: please make the build reproducible
Chris Lamb
lamby at debian.org
Wed Jul 13 21:25:08 UTC 2016
Source: lacheck
Version: 1.26-15
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 lacheck could not be built reproducibly.
Patch attached. Parts of it can probably go upstream.
[0] https://wiki.debian.org/ReproducibleBuilds
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/README.Debian.eperl 2016-07-13 23:18:48.746127761 +0200
--- b/debian/README.Debian.eperl 2016-07-13 23:20:46.078814933 +0200
@@ -9,7 +9,7 @@
Online documentation may be found in the lacheck(1) manual page.
--- Davide G. M. Salvetti <salve at debian.org>, <:=$_=gmtime:>.
+-- Davide G. M. Salvetti <salve at debian.org>, <? system("dpkg-parsechangelog --show-field Date"); !>>.
<:
# local variables:
# mode: text
--- a/debian/patches/0004-Reproducible-build.patch 1970-01-01 02:00:00.000000000 +0200
--- b/debian/patches/0004-Reproducible-build.patch 2016-07-13 23:24:07.876042883 +0200
@@ -0,0 +1,24 @@
+--- lacheck-1.26.orig/Makefile
++++ lacheck-1.26/Makefile
+@@ -41,6 +41,12 @@ FLEXFLAGS = -8
+
+ LIBS= #-ll
+
++ifdef SOURCE_DATE_EPOCH
++ BUILD_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" +%D 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" %D 2>/dev/null || date -u +%D)
++else
++ BUILD_DATE ?= $(shell date +%D)
++endif
++
+ $(LACHECK): lacheck.o
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(srcdir)/lacheck.o $(LIBS)
+
+@@ -55,7 +61,7 @@ lacheck.c: lacheck.lex
+
+ lacheck.1: lacheck.man
+ -sed -e "s!%%LACHECKREV%%!Release $(REV)!" $(srcdir)/lacheck.man |\
+- sed -e "s!%%LACHECKDATE%%!`date +%D`!" |\
++ sed -e "s!%%LACHECKDATE%%!$(BUILD_DATE)!" |\
+ sed -e "s!%%LACHECKPATH%%!$(bindir)/$(LACHECK)!" > $@
+
+ test.new: test.tex $(LACHECK)
--- a/debian/patches/series 2016-07-13 23:18:48.746127761 +0200
--- b/debian/patches/series 2016-07-13 23:24:04.592022445 +0200
@@ -1,3 +1,4 @@
0001-Add-DESTDIR-support-to-Makefile.patch
0002-Fix-check-target-in-Makefile.patch
0003-Makefile-Add-LDFLAGS-to-CC-invocation.patch
+0004-Reproducible-build.patch
More information about the Reproducible-builds
mailing list