Author: Apollon Oikonomopoulos <apoikos@debian.org>
Description: Ensure reproducible build
 .
 Upstream creates build stamp using the git commit hash, build host,
 build date and user. While the commit hash is fixed, the rest of the
 parameters are not, resulting in a non-reproducible build. In order to
 fix these, we choose the following values for these parameters:
 .   
  - <user>@<host>: debian-ha-maintainers@lists.alioth.debian.org.
  - <builddate>: the date of the current Debian changelog entry.

Forwarded: not-needed
Last-Update: 2015-02-24

--- a/user/shared/Makefile.in
+++ b/user/shared/Makefile.in
@@ -59,6 +59,10 @@
 CFLAGS += -Wall -I../../drbd-headers -I.. -I.
 CFLAGS += $(EXTRA_CFLAGS)
 
+# Debian reproducible build
+DEBU=debian-ha-maintainers@lists.alioth.debian.org
+DEBD=$(shell dpkg-parsechangelog -l../../debian/changelog -SDate)
+
 .PHONY: drbd_buildtag.c
 
 all: drbdmeta_scanner.c drbd_buildtag.c
@@ -84,7 +88,7 @@
 	else									\
 		grep return $@ ;						\
 	fi ;									\
-	echo -e "\t\t\" build by $$USER@$$HOSTNAME, `date "+%F %T"`\";\n}";	\
+	echo -e "\t\t\" build by $(DEBU), $$(TZ=UTC date -d "$(DEBD)" "+%F %T %Z")\";\n}";\
 	mv -f $@.new $@
 
 drbdmeta_scanner.c: drbdmeta_scanner.fl drbdmeta_parser.h
