Source: savi
Version: 1.4.9-1
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps username hostname
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Hi!

While working on the "reproducible builds" effort [1], we have noticed
that savi could not be built reproducibly.
It embeds the build date, username and hostname 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..78c300b
--- /dev/null
+++ b/debian/patches/reproducible-build.patch
@@ -0,0 +1,14 @@
+Author: Reiner Herrmann <rei...@reiner-h.de>
+Description: Strip build date, username and hostname to enable reproducible building
+
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -123,7 +123,7 @@
+ 
+ version.c: FORCE
+ # echo -E may be useful on Linux if output is over multiple lines
+-	@echo "char *Version = \"SaVi was compiled with 'make ARCH=$(ARCH)'$(LINEEND)\\nVersion" `cat ../VERSION`"$(LINEEND)\\nBuilt by $(USER)@$(HOST)$(HOSTNAME), `date`\";" > ./version.c
++	@echo "char *Version = \"SaVi was compiled with 'make ARCH=$(ARCH)'$(LINEEND)\\nVersion" `cat ../VERSION`"\";" > ./version.c
+ 
+ 
+ objs: $(OBJS)
diff --git a/debian/patches/series b/debian/patches/series
index 9aa50f0..8e88990 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 enable_zlib.diff
 share_lib_div.diff
+reproducible-build.patch

Attachment: signature.asc
Description: Digital signature

_______________________________________________
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