[DRE-maint] Bug#829362: ruby-ronn: please make the output reproducible
Antonio Terceiro
terceiro at debian.org
Sat Sep 3 16:26:03 UTC 2016
On Fri, Sep 02, 2016 at 08:03:06PM +0100, Chris Lamb wrote:
> Antonio Terceiro wrote:
>
> > So do we want to replace the earlier patch with this one?
>
> Hm, the patch to #829362 (which modifies the patch) is kinda ugly and
> almost impossible to mentally parse. Sorry about that.
>
> So, considering this cleaner patch:
>
> https://github.com/rtomayko/ronn/pull/98/files
>
> … I believe we need all of these changes so, yes, we should replace
> it. The following hunk demonstrates that it absorbs the previous patch:
>
> https://github.com/rtomayko/ronn/pull/98/files#diff-a87e9e80c3a7693175aa8c08bdb48452L70
I tried that, but with this patch the build failed. I rewrote it into a
much less invasive version:
--- a/lib/ronn/document.rb
+++ b/lib/ronn/document.rb
@@ -165,6 +165,7 @@ module Ronn
# the current time.
def date
return @date if @date
+ return Time.at(ENV['SOURCE_DATE_EPOCH'].to_i).gmtime if ENV['SOURCE_DATE_EPOCH']
return File.mtime(path) if File.exist?(path)
Time.now
end
IMO all the other changes are not really warranted.
With the resulting ruby-ronn binary, I tried both ruby-coveralls and
foodcritic, which are listed in the issue page¹, and they became reproducible.
¹ https://tests.reproducible-builds.org/debian/issues/unstable/timestamps_in_manpages_generated_by_ronn_issue.html,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-ruby-extras-maintainers/attachments/20160903/8e0f3622/attachment-0001.sig>
More information about the Pkg-ruby-extras-maintainers
mailing list