[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#776643: ocamlweb: please make the build reproducible



Source: ocamlweb
Version: 1.38-2
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Hi,

While working on the "reproducible builds" effort [1], we have noticed
that ocamlweb could not be built reproducibly.

The attached patch removes timestamps from the build system. Once
applied, ocamlweb can be built reproducibly in our current experimental
framework.

 [1]: https://wiki.debian.org/ReproducibleBuilds


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-
diff -urNad ocamlweb.orig/ocamlweb-1.38/debian/rules ocamlweb/ocamlweb-1.38/debian/rules
--- ocamlweb.orig/ocamlweb-1.38/debian/rules	2015-01-30 13:04:34.226952623 +0000
+++ ocamlweb/ocamlweb-1.38/debian/rules	2015-01-30 13:14:46.145306681 +0000
@@ -1,5 +1,6 @@
 #!/usr/bin/make -f
 
+BUILD_DATE=$(shell dpkg-parsechangelog --show-field Date)
 DEB_DESTDIR=$(CURDIR)/debian/ocamlweb
 
 %:
@@ -15,7 +16,7 @@
 
 # we have decided to build this package as bytecode
 override_dh_auto_build:
-	$(MAKE) byte
+	$(MAKE) byte BUILD_DATE="$(BUILD_DATE)"
 
 # UPDATETEX: executed after installation of tex files
 override_dh_auto_install:
diff -urNad ocamlweb.orig/ocamlweb-1.38/Makefile.in ocamlweb/ocamlweb-1.38/Makefile.in
--- ocamlweb.orig/ocamlweb-1.38/Makefile.in	2015-01-30 13:04:34.226952623 +0000
+++ ocamlweb/ocamlweb-1.38/Makefile.in	2015-01-30 13:15:07.861966728 +0000
@@ -21,6 +21,7 @@
 MAJORVN=1
 MINORVN=38
 VERSION=$(MAJORVN).$(MINORVN)
+BUILD_DATE="$(shell date)"
 
 OCAMLBEST=@OCAMLBEST@
 
@@ -75,7 +76,7 @@
 
 version.ml: Makefile
 	echo "let version = \""$(VERSION)"\"" > version.ml
-	echo "let date = \""`date`"\"" >> version.ml
+	echo "let date = \""$(BUILD_DATE)"\"" >> version.ml
 
 install-indep:
 	mkdir -p $(BINDIR)

Reply to: