Source: 389-admin
Version: 1.1.35-2
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: timestamps
X-Debbugs-Cc: [email protected]
Hi,
While working on the "reproducible builds" effort [1], we have noticed
that 389-admin could not be built reproducibly.
The attached patch removes timestamps from the build system. Once
applied, 389-admin can be built reproducibly in our current experimental
framework.
[1]: https://wiki.debian.org/ReproducibleBuilds
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` [email protected] / chris-lamb.co.uk
`-
diff --git a/debian/rules b/debian/rules
index 59bf24b..273b989 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,6 +13,10 @@ endif
LDFLAGS += -L/usr/lib/$(DEB_HOST_MULTIARCH)/nss
+# Deterministic "build number". Format is defined in ./buildnum.pl
+BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date)
+BUILDNUM := $(shell date --date="$(BUILD_DATE)" +%Y.%j.%H%M)
+
override_dh_auto_configure:
dh_auto_configure -- \
--disable-rpath \
@@ -21,6 +25,9 @@ override_dh_auto_configure:
--with-initddir=/etc/init.d \
--with-apxs=/usr/bin/apxs2
+override_dh_auto_build:
+ dh_auto_build -- BUILDNUM=$(BUILDNUM)
+
override_dh_auto_install:
dh_auto_install --destdir=$(CURDIR)/debian/tmp