Source: lacheck
Version: 1.26-15
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds@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
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
--- 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 <sa...@debian.org>, <:=$_=gmtime:>.
+-- Davide G. M. Salvetti <sa...@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
_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to