Source: rdtool Version: 0.6.38-3 Severity: wishlist Tags: patch User: [email protected] Usertags: toolchain X-Debbugs-Cc: [email protected]
Dear Maintainer, While working on the “reproducible builds” effort [1], we have noticed that several packages (like apt-listbugs) use rdtool in their building process, resulting in timestamps (month and year of build) in man files that break reproducibility. To solve this kind of issues, it would be nice to have rdtool support the SOURCE_DATE_EPOCH environment variable [2]. See the attached patch for a proposed solution. Regards, Alexis Bienvenüe. [1] https://wiki.debian.org/ReproducibleBuilds [2] https://reproducible-builds.org/specs/source-date-epoch/
diff -Nru rdtool-0.6.38/debian/changelog rdtool-0.6.38/debian/changelog --- rdtool-0.6.38/debian/changelog 2014-09-09 11:16:13.000000000 +0200 +++ rdtool-0.6.38/debian/changelog 2016-04-05 19:52:49.000000000 +0200 @@ -1,3 +1,9 @@ +rdtool (0.6.38-3.0~reproducible1) unstable; urgency=medium + + * Honour the SOURCE_DATE_EPOCH environment variable. + + -- Alexis Bienvenüe <[email protected]> Tue, 05 Apr 2016 19:52:49 +0200 + rdtool (0.6.38-3) unstable; urgency=medium * Team upload. diff -Nru rdtool-0.6.38/debian/patches/040_honour_SOURCE_DATE_EPOCH rdtool-0.6.38/debian/patches/040_honour_SOURCE_DATE_EPOCH --- rdtool-0.6.38/debian/patches/040_honour_SOURCE_DATE_EPOCH 1970-01-01 01:00:00.000000000 +0100 +++ rdtool-0.6.38/debian/patches/040_honour_SOURCE_DATE_EPOCH 2016-04-05 20:00:27.000000000 +0200 @@ -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 <[email protected]> + +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 -Nru rdtool-0.6.38/debian/patches/series rdtool-0.6.38/debian/patches/series --- rdtool-0.6.38/debian/patches/series 2014-01-23 19:25:38.000000000 +0100 +++ rdtool-0.6.38/debian/patches/series 2016-04-05 19:50:18.000000000 +0200 @@ -1,2 +1,3 @@ 010_change_dot_rd2rc_path 020_test_load_fix +040_honour_SOURCE_DATE_EPOCH
_______________________________________________ Pkg-ruby-extras-maintainers mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ruby-extras-maintainers
