[DRE-commits] [rdtool] 01/01: Honour the SOURCE_DATE_EPOCH environment variable.

zeha at debian.org zeha at debian.org
Sun May 1 20:36:18 UTC 2016


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

zeha pushed a commit to branch master
in repository rdtool.

commit 18d453b53ee3f842c8f07a805a1d40eb72008f2d
Author: Christian Hofstaedtler <zeha at debian.org>
Date:   Sun May 1 20:30:52 2016 +0000

    Honour the SOURCE_DATE_EPOCH environment variable.
---
 debian/changelog                            |  9 +++++++++
 debian/patches/040_honour_SOURCE_DATE_EPOCH | 26 ++++++++++++++++++++++++++
 debian/patches/series                       |  1 +
 3 files changed, 36 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index fc37d4a..266a95d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+rdtool (0.6.38-4) unstable; urgency=medium
+
+  * Team upload.
+  * Honour the SOURCE_DATE_EPOCH environment variable.
+    Patch from Alexis Bienvenüe <pado at passoire.fr>.
+    (Closes: #820144)
+
+ -- Christian Hofstaedtler <zeha at debian.org>  Sun, 01 May 2016 20:33:46 +0000
+
 rdtool (0.6.38-3) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/patches/040_honour_SOURCE_DATE_EPOCH b/debian/patches/040_honour_SOURCE_DATE_EPOCH
new file mode 100644
index 0000000..0033813
--- /dev/null
+++ b/debian/patches/040_honour_SOURCE_DATE_EPOCH
@@ -0,0 +1,26 @@
+Description: Honour the SOURCE_DATE_EPOCH environment variable
+ If the environment variable SOURCE_DATE_EPOCH is set, uses this date
+ instead of current date for generated man pages.
+ See https://reproducible-builds.org/specs/source-date-epoch/
+Author: Alexis Bienvenüe <pado at passoire.fr>
+
+Index: rdtool-0.6.38/lib/rd/rd2man-lib.rb
+===================================================================
+--- rdtool-0.6.38.orig/lib/rd/rd2man-lib.rb
++++ rdtool-0.6.38/lib/rd/rd2man-lib.rb
+@@ -43,9 +43,14 @@ module RD
+       content = content.join
+       title = guess_title
+       title = title.sub(/\.rd$/i, '').upcase
++      if ENV['SOURCE_DATE_EPOCH'].nil?
++        date=Time.now
++      else
++        date=Time.at(ENV['SOURCE_DATE_EPOCH'].to_i).gmtime
++      end
+       <<"EOT"
+ .\\" DO NOT MODIFY THIS FILE! it was generated by rd2
+-.TH #{title} 1 "#{Time.now.strftime '%B %Y'}"
++.TH #{title} 1 "#{date.strftime '%B %Y'}"
+ #{content}
+ EOT
+     end # "
diff --git a/debian/patches/series b/debian/patches/series
index f7b2a39..33752bd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 010_change_dot_rd2rc_path
 020_test_load_fix
+040_honour_SOURCE_DATE_EPOCH

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/rdtool.git



More information about the Pkg-ruby-extras-commits mailing list