Package: alt-ergo
Version: 0.99.1+dfsg1-2
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps

Hi!

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

The attached patch removes extra timestamps from the build system,
helping us to work in make the build reproducible.

Notes:
* 0003-allow-set-build-date.patch: is a quilt patch.
* debian-rules.patch: is a patch for the debian directory file.

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

-- System Information:
Debian Release: stretch/sid
  APT prefers testing-updates
  APT policy: (500, 'testing-updates'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Description: Allow set the build date
 This patch moves the date command used for set the build date to a variable,
 allowing set the build date externally.
Author: Juan Picca <jumap...@gmail.com>
Last-Update: 2015-05-25
---
--- a/Makefile.users
+++ b/Makefile.users
@@ -1,4 +1,5 @@
 ARCH = $(shell uname -m)
+BUILD_DATE = $(shell LANG=en_US; date)
 
 VERSION=0.99.1
 
@@ -157,7 +158,7 @@ endif
 
 src/util/version.ml: config.status
 	@echo "let version = \""$(VERSION)"\"" >> src/util/version.ml
-	@echo "let date = \""`LANG=en_US; date`"\"" >> src/util/version.ml
+	@echo "let date = \""$(BUILD_DATE)"\"" >> src/util/version.ml
 	@echo "let bindir = \""$(BINDIR)"\"" >> src/util/version.ml
 	@echo "let libdir = \""$(LIBDIR)"\"" >> src/util/version.ml
 	@echo "let pluginsdir = \""$(PLUGINSDIR)"\"" >> src/util/version.ml
diff -ruNp alt-ergo-0.99.1+dfsg1.old/debian/rules alt-ergo-0.99.1+dfsg1/debian/rules
--- alt-ergo-0.99.1+dfsg1.old/debian/rules	2015-05-04 14:05:56.000000000 -0300
+++ alt-ergo-0.99.1+dfsg1/debian/rules	2015-05-25 11:32:50.114651077 -0300
@@ -3,10 +3,13 @@
 
 #export DH_VERBOSE=1
 
+LAST_CHANGE=$(shell dpkg-parsechangelog -S Date)
+BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)")
+
 include /usr/share/ocaml/ocamlvars.mk
 
 override_dh_auto_build:
-	$(MAKE) all gui
+	$(MAKE) all gui BUILD_DATE="$(BUILD_DATE)"
 
 override_dh_auto_install:
 	$(MAKE) DESTDIR=debian/tmp install install-gui
_______________________________________________
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