summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2014-09-30 15:32:08 +0200
committerJulian Andres Klode <jak@debian.org>2014-09-30 15:33:55 +0200
commit515204913c9168e8db77c96fdd7c29feba5bb6f4 (patch)
tree41b02f720856aad7346d4db0f71f3159977a3d59 /debian
parent43f539bd0cd3d8fc00c865d1b7e818e0b77119be (diff)
downloadpython-apt-515204913c9168e8db77c96fdd7c29feba5bb6f4.tar.gz
Embed changelog entry date and time instead of build date and time
This makes reproducible builds possible. For non-package builds, simply use the start of the Unix time. Also make sure that all time values are in the UTC timezone. Closes: #762674
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/rules8
1 files changed, 7 insertions, 1 deletions
diff --git a/debian/rules b/debian/rules
index 3ceeb205..20a3fa25 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,7 +1,13 @@
#!/usr/bin/make -f
# Should be include-links, but that somehow fails.
export DEBVER=$(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p')
-export DEB_CFLAGS_MAINT_APPEND=-Wno-write-strings
+export DATETIME:=$(shell dpkg-parsechangelog | sed -n -e 's/^Date: //p')
+export DATE_CMD:=env TZ=UTC LC_ALL=C.UTF-8 date
+export DATE:=$(shell $(DATE_CMD) --date="$(DATETIME)" "+%b %_d %Y")
+export TIME:=$(shell $(DATE_CMD) --date="$(DATETIME)" "+%H:%M:%S")
+export DEB_CFLAGS_MAINT_APPEND=-Wno-write-strings \
+ -DDATE=\""$(DATE)"\" \
+ -DTIME=\""$(TIME)"\"
export PATH := $(CURDIR)/utils:$(PATH)
export pyversions := $(CURDIR)/utils/pyversions