diff options
author | Jérémy Bobbio <lunar@debian.org> | 2015-01-01 11:23:36 +0100 |
---|---|---|
committer | Clint Adams <clint@debian.org> | 2015-01-01 11:00:12 -0500 |
commit | 9f2e77ff77765516e198f36caa4e157460a1bdaf (patch) | |
tree | 868ddacd57ba548bdb08b8fc4c2bc80e7c591859 /debian | |
parent | dfbc23aecffef1545a28dfb9d84ce3eb5aa19232 (diff) |
Fix mtimes before building binary packages
To enable sed to be build reproducibly, mtimes of any files
created after the date of the latest debian/changelog entry
will be changed to that date.
Diffstat (limited to 'debian')
-rwxr-xr-x | debian/rules | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules index c64cb86..26b3fda 100755 --- a/debian/rules +++ b/debian/rules @@ -15,6 +15,8 @@ CFLAGS := $(shell dpkg-buildflags --get CFLAGS) CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) +BUILD_DATE := $(shell dpkg-parsechangelog | sed -n -e 's/^Date: //p') + INSTALL = install INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644 INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755 @@ -109,6 +111,8 @@ endif # Build the packgae dpkg-shlibdeps -dPre-Depends $(tmpdir)/bin/sed dpkg-gencontrol -isp + find debian/tmp -depth -newermt '$(BUILD_DATE)' -print0 | \ + xargs -0r touch --no-dereference --date='$(BUILD_DATE)' dpkg --build debian/tmp .. checkroot: |