[libmarpa-r2-perl] 01/02: Honour SOURCE_DATE_EPOCH for embedded timestamp, if it is set, for build reproducibility. Thanks to Reiner Herrmann <reiner at reiner-h.de> for the patch! (Closes: #828639)

Intrigeri intrigeri at moszumanska.debian.org
Sun Jun 26 17:58:48 UTC 2016


This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to branch master
in repository libmarpa-r2-perl.

commit 18c52361a3d4a1da639626b8a0eec48fb4131311
Author: intrigeri <intrigeri at boum.org>
Date:   Sun Jun 26 17:38:11 2016 +0000

    Honour SOURCE_DATE_EPOCH for embedded timestamp, if it is set, for build reproducibility. Thanks to Reiner Herrmann <reiner at reiner-h.de> for the patch! (Closes: #828639)
---
 debian/patches/reproducible_build.patch | 23 +++++++++++++++++++++++
 debian/patches/series                   |  1 +
 2 files changed, 24 insertions(+)

diff --git a/debian/patches/reproducible_build.patch b/debian/patches/reproducible_build.patch
new file mode 100644
index 0000000..24cf4ff
--- /dev/null
+++ b/debian/patches/reproducible_build.patch
@@ -0,0 +1,23 @@
+Author: Reiner Herrmann <reiner at reiner-h.de>
+Description: Honour SOURCE_DATE_EPOCH for embedded timestamp, if it is set
+
+--- a/inc/Marpa/R2/Build_Me.pm
++++ b/inc/Marpa/R2/Build_Me.pm
+@@ -83,7 +83,7 @@
+ 
+ ##no critic(ValuesAndExpressions::RequireInterpolationOfMetachars)
+     $text .= q{use vars qw($TIMESTAMP)} . qq{;\n};
+-    $text .= q{$TIMESTAMP='} . localtime()->datetime . qq{';\n};
++    $text .= q{$TIMESTAMP='} . (gmtime($ENV{SOURCE_DATE_EPOCH}) || localtime())->datetime . qq{';\n};
+ ##use critic
+ 
+     for my $package (@use_packages) {
+@@ -104,7 +104,7 @@
+ 
+ ##no critic(ValuesAndExpressions::RequireInterpolationOfMetachars)
+     $text .= q{use vars qw($TIMESTAMP)} . qq{;\n};
+-    $text .= q{$TIMESTAMP='} . localtime()->datetime . qq{';\n};
++    $text .= q{$TIMESTAMP='} . (gmtime($ENV{SOURCE_DATE_EPOCH}) || localtime())->datetime . qq{';\n};
+ ##use critic
+ 
+     for my $package (@use_packages) {
diff --git a/debian/patches/series b/debian/patches/series
index f8d2256..b4a3780 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 1001_xs_boot_workaround.patch
 2001_libmarpa_external_linkage.patch
+reproducible_build.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmarpa-r2-perl.git



More information about the Pkg-perl-cvs-commits mailing list