Accepting request 764216 from devel:languages:ruby:extensions
OBS-URL: https://build.opensuse.org/request/show/764216 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rubygem-ronn?expand=0&rev=2
This commit is contained in:
commit
af7a3c050a
@ -3,3 +3,5 @@
|
|||||||
Ronn builds manuals. It converts simple, human readable textfiles to roff
|
Ronn builds manuals. It converts simple, human readable textfiles to roff
|
||||||
for terminal display, and also to HTML for the web.
|
for terminal display, and also to HTML for the web.
|
||||||
:license: MIT
|
:license: MIT
|
||||||
|
:patches:
|
||||||
|
ronn-date.patch: -p1
|
||||||
|
29
ronn-date.patch
Normal file
29
ronn-date.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
https://github.com/kamontat/ronn/pull/3
|
||||||
|
originally based on https://github.com/rtomayko/ronn/pull/98
|
||||||
|
|
||||||
|
commit 206846900163c8a538437444dfdd67a7a81e3801
|
||||||
|
Author: Bernhard M. Wiedemann <bwiedemann@suse.de>
|
||||||
|
Date: Mon Dec 9 14:36:21 2019 +0100
|
||||||
|
|
||||||
|
Allow to override build date with SOURCE_DATE_EPOCH
|
||||||
|
|
||||||
|
in order to make builds reproducible.
|
||||||
|
See https://reproducible-builds.org/ for why this is good
|
||||||
|
and https://reproducible-builds.org/specs/source-date-epoch/
|
||||||
|
for the definition of this variable.
|
||||||
|
|
||||||
|
It prioritizes the variable over mtime
|
||||||
|
because openSUSE's `tallow` package touched a .md file with a patch.
|
||||||
|
|
||||||
|
diff --git a/lib/ronn/document.rb b/lib/ronn/document.rb
|
||||||
|
index d42e2f9..6590c92 100644
|
||||||
|
--- a/lib/ronn/document.rb
|
||||||
|
+++ b/lib/ronn/document.rb
|
||||||
|
@@ -171,6 +171,7 @@ module Ronn
|
||||||
|
# the current time.
|
||||||
|
def date
|
||||||
|
return @date if @date
|
||||||
|
+ return Time.at(ENV['SOURCE_DATE_EPOCH'].to_i).gmtime if not ENV['SOURCE_DATE_EPOCH'].nil?
|
||||||
|
return File.mtime(path) if File.exist?(path)
|
||||||
|
Time.now
|
||||||
|
end
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Dec 9 10:26:45 UTC 2019 - Bernhard Wiedemann <bwiedemann@suse.com>
|
||||||
|
|
||||||
|
- Add ronn-date.patch to have reprodubible build time (boo#1047218)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Apr 25 17:12:12 UTC 2017 - avvissu@yandex.by
|
Tue Apr 25 17:12:12 UTC 2017 - avvissu@yandex.by
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package rubygem-ronn
|
# spec file for package rubygem-ronn
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -37,6 +37,9 @@ BuildRequires: update-alternatives
|
|||||||
Url: http://rtomayko.github.com/ronn
|
Url: http://rtomayko.github.com/ronn
|
||||||
Source: https://rubygems.org/gems/%{mod_full_name}.gem
|
Source: https://rubygems.org/gems/%{mod_full_name}.gem
|
||||||
Source1: gem2rpm.yml
|
Source1: gem2rpm.yml
|
||||||
|
# MANUAL
|
||||||
|
Patch0: ronn-date.patch
|
||||||
|
# /MANUAL
|
||||||
Summary: Builds manuals
|
Summary: Builds manuals
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Ruby
|
Group: Development/Languages/Ruby
|
||||||
@ -47,6 +50,10 @@ Ronn builds manuals. It converts simple, human readable textfiles to roff
|
|||||||
for terminal display, and also to HTML for the web.
|
for terminal display, and also to HTML for the web.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
|
%gem_unpack
|
||||||
|
%patch0 -p1
|
||||||
|
find -type f -print0 | xargs -0 touch -r %{S:0}
|
||||||
|
%gem_build
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user