[libdist-zilla-perl] 01/02: Add patch to support SOURCE_DATE_EPOCH
Axel Beckert
abe at deuxchevaux.org
Sat May 7 22:49:55 UTC 2016
This is an automated email from the git hooks/post-receive script.
abe pushed a commit to branch master
in repository libdist-zilla-perl.
commit 540b5a339d30af1211d6d35c7c123f351ede3e68
Author: Axel Beckert <abe at deuxchevaux.org>
Date: Sun May 8 00:40:40 2016 +0200
Add patch to support SOURCE_DATE_EPOCH
This is needed for dh-dist-zilla → Dist::Zilla::Plugin::PodWeaver
→ Pod::Weaver generated documentation.
This should make at least librun-parts-perl reproducible.
---
debian/changelog | 3 +++
debian/patches/SOURCE_DATE_EPOCH_support.patch | 28 ++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 32 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 5d68030..d3c216c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,9 @@ libdist-zilla-perl (5.047-1) UNRELEASED; urgency=medium
+ Ignoring currently unfulfillable recommended version of List::Util:
no dual-life package and not in core yet either, probably not even
with 5.24.0.
+ * Add patch to support SOURCE_DATE_EPOCH e.g. for dh-dist-zilla →
+ Dist::Zilla::Plugin::PodWeaver → Pod::Weaver generated
+ documentation. Should make at least librun-parts-perl reproducible.
-- Axel Beckert <abe at debian.org> Sat, 07 May 2016 23:29:22 +0200
diff --git a/debian/patches/SOURCE_DATE_EPOCH_support.patch b/debian/patches/SOURCE_DATE_EPOCH_support.patch
new file mode 100644
index 0000000..fb7c82a
--- /dev/null
+++ b/debian/patches/SOURCE_DATE_EPOCH_support.patch
@@ -0,0 +1,28 @@
+Description: Add support for SOURCE_DATE_EPOCH
+ This allows to use Dist::Zilla in reproducible builds. One package
+ that will benefit from this patch is librun-parts-perl.
+Author: Axel Beckert <abe at debian.org>
+Forwarded: not yet
+
+--- a/lib/Dist/Zilla.pm
++++ b/lib/Dist/Zilla.pm
+@@ -439,7 +439,7 @@
+ # rjbs, 2008-06-13
+ my $stash = $_[0]->stash_named('%Rights');
+ my $year = $stash && $stash->copyright_year;
+- return defined $year ? $year : (localtime)[5] + 1900;
++ return defined $year ? $year : (localtime($ENV{SOURCE_DATE_EPOCH} || time))[5] + 1900;
+ }
+ );
+
+--- a/lib/Dist/Zilla/Plugin/DistINI.pm
++++ b/lib/Dist/Zilla/Plugin/DistINI.pm
+@@ -87,7 +87,7 @@
+ $content .= sprintf "author = %s\n", $_ for @{ $zilla->authors };
+ $content .= sprintf "license = %s\n", $license;
+ $content .= sprintf "copyright_holder = %s\n", $zilla->copyright_holder;
+- $content .= sprintf "copyright_year = %s\n", (localtime)[5] + 1900;
++ $content .= sprintf "copyright_year = %s\n", (localtime($ENV{SOURCE_DATE_EPOCH} || time))[5] + 1900;
+ $content .= "\n";
+
+ $content .= $postlude;
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..d46ce4b
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+SOURCE_DATE_EPOCH_support.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libdist-zilla-perl.git
More information about the Pkg-perl-cvs-commits
mailing list