Source: elvis-tiny
Version: 1.4-23
Severity: wishlist
Tags: patch upstream
User: reproducible-bui...@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org

Hi!

While working on the "reproducible builds" effort [1], we have noticed
that elvis-tiny could not be built reproducibly.
It embeds the build date/time into the binary.

The attached patch strips this to enable reproducible building.

Regards,
 Reiner

[1]: https://wiki.debian.org/ReproducibleBuilds
diff --git a/debian/patches/reproducible-build.patch b/debian/patches/reproducible-build.patch
new file mode 100644
index 0000000..54f0158
--- /dev/null
+++ b/debian/patches/reproducible-build.patch
@@ -0,0 +1,15 @@
+Author: Reiner Herrmann <rei...@reiner-h.de>
+Description: Strip build date to enable reproducible building
+ If DATE is not defined, the C file doesn't embed it, so no
+ change is required there.
+
+--- a/Makefile.mix
++++ b/Makefile.mix
+@@ -49,7 +49,6 @@
+ 	-fsigned-char $(EXTRA_CFLAGS)
+ OF=	-o 
+ RF=	-c
+-DATE=	-DDATE=\'\"`date`\"\'
+ EVAL=	eval 
+ PROGS=	elvis
+ CHMEM=	
diff --git a/debian/patches/series b/debian/patches/series
index def6f80..125cff9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@ patch-range-segfault.diff
 patch-bug-258640.diff
 patch-siglongjmp.diff
 patch-fix-resize.diff
+reproducible-build.patch

Attachment: signature.asc
Description: Digital signature

Reply via email to