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

Bug#776643: ocamlweb: please make the build reproducible



Hi,

Le 2015-01-30 14:17, Chris Lamb a écrit :
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.


While I appreciate the efforts made on the "reproducible builds" project, I don't think that the attached patch should be applied as is : Showing a
build date which is not the real build date is not helpful. I think we
should try to make it optional instead.

I think that something along these lines should do it:

----><-------------------------------------------------------------
Index: polygen-1.0.6.ds2-13/src/makefile
===================================================================
--- polygen-1.0.6.ds2-13/src/makefile
+++ polygen-1.0.6.ds2-13/src/makefile
@@ -16,8 +16,10 @@
 MLLDOPTS	= unix.cmxa
 MLLEX		= ocamllex
 MLYACC		= ocamlyacc

+BUILD_DATE=yes
+
 # must be linked in this order
 OBJS	   := ver.cmx		        \
 	          prelude.cmx           \
               err.cmx               \
@@ -53,9 +55,14 @@
 	@cat <_parser.mli >>parser.mli
 	@rm -f _parser.mli

 ver.ml: ver.ml.template
- sed -e "s/%VERSION%/$(VERSION)/" -e "s/%DATE%/$(DATE)/" ver.ml.template >ver.ml
+	sed "s/%VERSION%/$(VERSION)/"ver.ml.template >ver.ml
+ifeq($(BUILD_DATE),yes)
+    sed -i "s/%DATE%/$(DATE)/" ver.ml
+else
+    sed -i "/%DATE%/d" ver.ml
+endif

 clean:
rm -f *.o *.cm* a.out *.bak *.obj *~ *.annot *.stackdump parser.ml lexer.ml parser.mli ver.ml
 	cat </dev/null >.depend
----><-------------------------------------------------------------

(Not tested. Done quickly directly from the browser)

Regards,

--
Mehdi


Reply to: