[libur-perl] 01/03: Honour-SOURCE_DATE_EPOCH-for-embedded-timestamp-in-genera.patch: new patch, for reproducibility of reverse-build-dependencies, such as libgenome-model-tools-music-perl.

Intrigeri intrigeri at moszumanska.debian.org
Mon Jun 27 14:44:17 UTC 2016


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

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

commit 5bb524de81870fd5cd1781a71f4a24f065fad641
Author: intrigeri <intrigeri at boum.org>
Date:   Mon Jun 27 13:27:39 2016 +0000

    Honour-SOURCE_DATE_EPOCH-for-embedded-timestamp-in-genera.patch: new patch, for reproducibility of reverse-build-dependencies, such as libgenome-model-tools-music-perl.
---
 ...TE_EPOCH-for-embedded-timestamp-in-genera.patch | 62 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 63 insertions(+)

diff --git a/debian/patches/Honour-SOURCE_DATE_EPOCH-for-embedded-timestamp-in-genera.patch b/debian/patches/Honour-SOURCE_DATE_EPOCH-for-embedded-timestamp-in-genera.patch
new file mode 100644
index 0000000..09e30d3
--- /dev/null
+++ b/debian/patches/Honour-SOURCE_DATE_EPOCH-for-embedded-timestamp-in-genera.patch
@@ -0,0 +1,62 @@
+From: intrigeri <intrigeri at boum.org>
+Date: Mon, 27 Jun 2016 13:23:53 +0000
+Subject: Honour SOURCE_DATE_EPOCH for embedded timestamp in generated
+ documentation.
+
+When the environment variable SOURCE_DATE_EPOCH is set, use it instead of the
+current time for the embedded build timestamp.
+
+The specification of SOURCE_DATE_EPOCH is available here:
+https://reproducible-builds.org/specs/source-date-epoch/
+
+In the case it is not defined, fall back to current time.
+---
+ lib/Command/V1.pm              | 2 +-
+ lib/Command/View/DocMethods.pm | 2 +-
+ lib/UR/Context.pm              | 7 +++++++
+ 3 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Command/V1.pm b/lib/Command/V1.pm
+index 6a6a3b3..b5d6c07 100644
+--- a/lib/Command/V1.pm
++++ b/lib/Command/V1.pm
+@@ -598,7 +598,7 @@ sub doc_sections {
+     my $command_name = $self->command_name;
+     my $version = do { no strict; ${ $self->class . '::VERSION' } };
+     my $help_brief = $self->help_brief;
+-    my $datetime = $self->__context__->now;
++    my $datetime = $self->__context__->build_time;
+     my $sub_commands = $self->help_sub_commands(brief => 1) if $self->is_sub_command_delegator;
+     my ($date,$time) = split(' ',$datetime);
+ 
+diff --git a/lib/Command/View/DocMethods.pm b/lib/Command/View/DocMethods.pm
+index afb55d4..e87279d 100644
+--- a/lib/Command/View/DocMethods.pm
++++ b/lib/Command/View/DocMethods.pm
+@@ -168,7 +168,7 @@ sub doc_sections {
+ 
+     my $version = do { no strict; ${ $self->class . '::VERSION' } };
+     my $help_brief = $self->help_brief;
+-    my $datetime = $self->__context__->now;
++    my $datetime = $self->__context__->build_time;
+     my ($date,$time) = split(' ',$datetime);
+ 
+     push(@sections, UR::Doc::Section->create(
+diff --git a/lib/UR/Context.pm b/lib/UR/Context.pm
+index 840f127..ba20df7 100644
+--- a/lib/UR/Context.pm
++++ b/lib/UR/Context.pm
+@@ -113,6 +113,13 @@ sub now {
+     return Date::Format::time2str(date_template(), time());
+ }
+ 
++sub build_time {
++    return Date::Format::time2str(
++        date_template(),
++        $ENV{SOURCE_DATE_EPOCH} || time()
++    );
++}
++
+ my $master_monitor_query = 0;
+ sub monitor_query {
+     return if $UR::Object::Type::bootstrapping;
diff --git a/debian/patches/series b/debian/patches/series
index 5299247..3d0bc4b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 spelling.patch
+Honour-SOURCE_DATE_EPOCH-for-embedded-timestamp-in-genera.patch

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



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