[Reproducible-commits] [dpkg] 01/06: Preset build timestamp to latest changelog entry
Jérémy Bobbio
lunar at moszumanska.debian.org
Wed Oct 14 12:46:53 UTC 2015
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch pu/reproducible_builds
in repository dpkg.
commit 7373d156a86048ac8e444b448f1762efb3b94604
Author: Jérémy Bobbio <lunar at debian.org>
Date: Tue Aug 27 23:53:22 2013 +0200
Preset build timestamp to latest changelog entry
dpkg-buildpackage will set the SOURCE_DATE_EPOCH environment variable to the
date of the latest entry in debian/changelog. This enables build to be easily
reproduced as the dates captured in the `.deb` archives will be deterministic.
SOURCE_DATE_EPOCH can also be externaly set before running dpkg-buildpackage.
to reproduce the build with an arbitrary date.
Closes: #759999
---
scripts/dpkg-buildpackage.pl | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl
index 17ada97..e14cd26 100755
--- a/scripts/dpkg-buildpackage.pl
+++ b/scripts/dpkg-buildpackage.pl
@@ -439,6 +439,11 @@ if ($changedby) {
$maintainer = mustsetvar($changelog->{maintainer}, g_('source changed by'));
}
+if (!$ENV{SOURCE_DATE_EPOCH}) {
+ my $timestamp = `date -d'$changelog->{date}' +%s`;
+ chomp $timestamp;
+ $ENV{SOURCE_DATE_EPOCH} = $timestamp;
+}
my @arch_opts;
push @arch_opts, ('--host-arch', $host_arch) if $host_arch;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list