Accepting request 440735 from devel:languages:ruby

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/440735
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rubygem-gem2rpm?expand=0&rev=22
This commit is contained in:
Dominique Leuenberger 2016-11-20 17:17:12 +00:00 committed by Git OBS Bridge
commit 67819cef48
30 changed files with 482 additions and 77 deletions

View File

@ -1,7 +1,7 @@
From 91bc63e3fbba24a5f90c4fce4f74b371c4694657 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de>
Date: Thu, 24 Jul 2014 16:46:19 +0200
Subject: [PATCH 1/9] - use the ID from os-release to use the proper template
Subject: [PATCH 01/26] - use the ID from os-release to use the proper template
---
bin/gem2rpm | 10 ++++++++++
@ -29,5 +29,5 @@ index 736a645..fa7ce6b 100755
else
begin
--
1.8.4.5
2.10.2

View File

@ -1,7 +1,7 @@
From 1742038eb7ec8fcb25009ce8b270b420183875bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de>
Date: Thu, 24 Jul 2014 16:54:45 +0200
Subject: [PATCH 2/9] added basic config file support to gem2rpm in yaml
Subject: [PATCH 02/26] added basic config file support to gem2rpm in yaml
format.
There is no validation as it is basically a hash where certain keys are
@ -89,5 +89,5 @@ index 017ecd1..e5e2693 100644
unless local
begin
--
1.8.4.5
2.10.2

View File

@ -1,7 +1,7 @@
From 5e1e30e5addc99825b3bf873983ca48732493060 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de>
Date: Thu, 24 Jul 2014 16:55:57 +0200
Subject: [PATCH 3/9] new opensuse templates. they require the config file
Subject: [PATCH 03/26] new opensuse templates. they require the config file
support.
---
@ -262,7 +262,7 @@ index 37de592..25fdec3 100644
+# spec file for package rubygem-<%= spec.name %><%= config[:version_suffix] %>
#
-# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) <%= Time.now.year %> SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) <%= Time.now.year %> SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -503,5 +503,5 @@ index 37de592..25fdec3 100644
%changelog
--
1.8.4.5
2.10.2

View File

@ -1,7 +1,7 @@
From f408e57b282cd55d59c1317240ee9e0dc679373c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de>
Date: Thu, 24 Jul 2014 17:02:56 +0200
Subject: [PATCH 4/9] added example gem2rpm.yml
Subject: [PATCH 04/26] added example gem2rpm.yml
---
Rakefile | 2 +-
@ -86,5 +86,5 @@ index 0000000..5e444eb
+# /bin/echo foo
+#
--
1.8.4.5
2.10.2

View File

@ -1,7 +1,7 @@
From da07cd470611c3c6b70fc863e2d82a2862a068e4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de>
Date: Thu, 24 Jul 2014 17:09:35 +0200
Subject: [PATCH 5/9] properly shorten description and summary
Subject: [PATCH 05/26] properly shorten description and summary
This also includes the description if we reuse the summary.
---
@ -54,5 +54,5 @@ index 9a8d5a1..2e4f7b2 100644
def development_dependencies
super.map {|d| Gem2Rpm::Dependency.new d}
--
1.8.4.5
2.10.2

View File

@ -1,7 +1,7 @@
From 0f22d81f982e02523c852521a5b94db657fe6673 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de>
Date: Thu, 24 Jul 2014 17:17:33 +0200
Subject: [PATCH 6/9] Preserve the license header found in the output file
Subject: [PATCH 06/26] Preserve the license header found in the output file
---
bin/gem2rpm | 13 +++++++++++--
@ -57,5 +57,5 @@ index 5261ae1..d30e0f6 100644
download_path = ""
unless local
--
1.8.4.5
2.10.2

View File

@ -1,7 +1,7 @@
From eed51b54253c303c593d9466ed8ed17523bda3d1 Mon Sep 17 00:00:00 2001
From: Stephan Kulow <coolo@suse.de>
Date: Wed, 15 Oct 2014 10:38:29 +0200
Subject: [PATCH 7/9] fixes for the opensuse template:
Subject: [PATCH 07/26] fixes for the opensuse template:
- add one more space for sources
- add empty lines in front of the warning preamble - otherwise format_spec_file
@ -52,5 +52,5 @@ index 25fdec3..8bc281c 100644
end -%>
<% if config[:patches] -%>
--
1.8.4.5
2.10.2

View File

@ -1,7 +1,7 @@
From ba7932c7d7bc6a70a45ac6ebb841a9e1bf8bb86b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <darix@nordisch.org>
Date: Tue, 21 Oct 2014 14:54:55 +0200
Subject: [PATCH 8/9] do not use not(). not supported on 1.8 e.g.
Subject: [PATCH 08/26] do not use not(). not supported on 1.8 e.g.
---
templates/gem_packages.spec.erb | 4 ++--
@ -30,5 +30,5 @@ index 058660b..94d4005 100644
%defattr(-,root,root,-)
%doc <%= gem_doc_dir %>
--
1.8.4.5
2.10.2

View File

@ -1,7 +1,8 @@
From 13b02a1596a744ed70687dae0ffb465e1979221e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <darix@nordisch.org>
Date: Tue, 21 Oct 2014 15:13:31 +0200
Subject: [PATCH 9/9] No longer require the ruby version inside the subpackage
Subject: [PATCH 09/26] No longer require the ruby version inside the
subpackage
With the buildrequires we already make sure that the package is only
built if we find a recent enough ABI. then the normal $interpreter(abi)
@ -27,5 +28,5 @@ index 94d4005..29873e5 100644
<% if config[:main] && config[:main][:preamble] -%>
<%= config[:main][:preamble] %>
--
1.8.4.5
2.10.2

View File

@ -1,7 +1,7 @@
From 953ff66677490c78ceff14afc0365f832079333a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <darix@nordisch.org>
Date: Tue, 21 Oct 2014 17:55:23 +0200
Subject: [PATCH 10/16] Try to load rbconfigpackagingsupport and fail
Subject: [PATCH 10/26] Try to load rbconfigpackagingsupport and fail
gracefully if not available
The file will patch ruby_install_name on unversioned ruby installations.
@ -24,5 +24,5 @@ index 29873e5..a6ab58b 100644
path.gsub(/\/-/, "/#{mod_full_name}")
end
--
2.2.2
2.10.2

View File

@ -1,7 +1,7 @@
From 0ee368bc6c4ea35d233dadbe1f2c7048a99d3dc4 Mon Sep 17 00:00:00 2001
From: Theo chatzimichos <tampakrap@opensuse.org>
Date: Fri, 5 Dec 2014 17:11:47 +0200
Subject: [PATCH 11/16] Add support for :scripts: (pre/post) for subpackages
Subject: [PATCH 11/26] Add support for :scripts: (pre/post) for subpackages
With this commit we can add pre/post/(etc) scripts in gem2rpm.yml for
subpackages, as in the example below:
@ -40,5 +40,5 @@ index 8bc281c..af04eaf 100644
end
-%>
--
2.2.2
2.10.2

View File

@ -1,7 +1,7 @@
From 092f7ca4ff1f954dd8982acf7199cd15636e87f3 Mon Sep 17 00:00:00 2001
From: Theo Chatzimichos <tampakrap@opensuse.org>
Date: Fri, 5 Dec 2014 17:16:41 +0200
Subject: [PATCH 12/16] typo in gem2rpm.yml.documentation: :custom_pkgs:
Subject: [PATCH 12/26] typo in gem2rpm.yml.documentation: :custom_pkgs:
instead of :custom:
---
@ -22,5 +22,5 @@ index 5e444eb..376eacd 100644
# :preamble: |-
# Requires: .....
--
2.2.2
2.10.2

View File

@ -1,7 +1,7 @@
From dad615aa35cbbe0d7351ea66af44a8548853a2da Mon Sep 17 00:00:00 2001
From: Dirk Mueller <dmueller@suse.com>
Date: Mon, 12 Jan 2015 15:34:26 +0100
Subject: [PATCH 13/16] Also tag LICENSE-MIT as docfile
Subject: [PATCH 13/26] Also tag LICENSE-MIT as docfile
Some packages (e.g. rubygem-http_parser) name it that way
---
@ -36,5 +36,5 @@ index af04eaf..8eb7fee 100644
#$stderr.puts "PATH #{path} #{bpath} #{file}"
docdirfiles << path if bpath == file
--
2.2.2
2.10.2

View File

@ -1,7 +1,7 @@
From 5bb494a7d6911754e485f6b729861771181bf2a0 Mon Sep 17 00:00:00 2001
From: Dirk Mueller <dmueller@suse.com>
Date: Mon, 12 Jan 2015 15:51:08 +0100
Subject: [PATCH 14/16] Refactor into multiple lines
Subject: [PATCH 14/26] Refactor into multiple lines
Makes this easier to extend/read imho.
---
@ -54,5 +54,5 @@ index 8eb7fee..88e7356 100644
#$stderr.puts "PATH #{path} #{bpath} #{file}"
docdirfiles << path if bpath == file
--
2.2.2
2.10.2

View File

@ -1,7 +1,7 @@
From b10341f5c13d71271e195101e46213026f628048 Mon Sep 17 00:00:00 2001
From: Dirk Mueller <dmueller@suse.com>
Date: Mon, 12 Jan 2015 15:52:34 +0100
Subject: [PATCH 15/16] Add 'licence' to the list of license files as well
Subject: [PATCH 15/26] Add 'licence' to the list of license files as well
This is a misspelling, but seems to be common enough still
---
@ -34,5 +34,5 @@ index 88e7356..8d14e38 100644
license-mit
mit-license
--
2.2.2
2.10.2

View File

@ -1,7 +1,7 @@
From 814a7133ce8ab7271cf0bf31ad6d4de94fec8863 Mon Sep 17 00:00:00 2001
From: Stephan Kulow <coolo@suse.de>
Date: Wed, 11 Feb 2015 02:05:31 +0100
Subject: [PATCH 16/16] add two more ways to express changes
Subject: [PATCH 16/26] add two more ways to express changes
---
templates/gem_packages.spec.erb | 2 ++
@ -35,5 +35,5 @@ index 8d14e38..b1251c5 100644
).each { |file|
bpath = path.downcase.gsub(%r{\.rdoc$}, '').gsub(%r{\.txt$}, '').gsub(%r{\.md$}, '')
--
2.2.2
2.10.2

View File

@ -0,0 +1,39 @@
From 660fa598f3a78f94f35e1edf10d143dae5db62bb Mon Sep 17 00:00:00 2001
From: Stephan Kulow <coolo@suse.de>
Date: Wed, 11 Feb 2015 02:30:14 +0100
Subject: [PATCH 17/26] .markdown is also seen in the wild
---
templates/gem_packages.spec.erb | 2 +-
templates/opensuse.spec.erb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/templates/gem_packages.spec.erb b/templates/gem_packages.spec.erb
index 0cd92e2..9e2e877 100644
--- a/templates/gem_packages.spec.erb
+++ b/templates/gem_packages.spec.erb
@@ -133,7 +133,7 @@ Usually in RDoc and RI formats.
release_notes
readme
).each { |file|
- bpath = path.downcase.gsub(%r{\.rdoc$}, '').gsub(%r{\.txt$}, '').gsub(%r{\.md$}, '')
+ bpath = path.downcase.gsub(%r{\.rdoc$}, '').gsub(%r{\.txt$}, '').gsub(%r{\.md$}, '').gsub(%r{\.markdown$}, '')
#$stderr.puts "PATH #{path} #{bpath} #{file}"
docdirfiles << path if bpath == file
}
diff --git a/templates/opensuse.spec.erb b/templates/opensuse.spec.erb
index b1251c5..a5f34c6 100644
--- a/templates/opensuse.spec.erb
+++ b/templates/opensuse.spec.erb
@@ -123,7 +123,7 @@ PreReq: update-alternatives
release_notes
readme
).each { |file|
- bpath = path.downcase.gsub(%r{\.rdoc$}, '').gsub(%r{\.txt$}, '').gsub(%r{\.md$}, '')
+ bpath = path.downcase.gsub(%r{\.rdoc$}, '').gsub(%r{\.txt$}, '').gsub(%r{\.md$}, '').gsub(%r{\.markdown$}, '')
#$stderr.puts "PATH #{path} #{bpath} #{file}"
docdirfiles << path if bpath == file
}
--
2.10.2

View File

@ -0,0 +1,26 @@
From 7a45c828d05304d90b3a202e55acbbcaab5cdac2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <darix@nordisch.org>
Date: Fri, 13 Mar 2015 03:24:25 +0100
Subject: [PATCH 18/26] Only use the extensions doc dir on MRI 2.1.x
---
templates/gem_packages.spec.erb | 3 +++
1 file changed, 3 insertions(+)
diff --git a/templates/gem_packages.spec.erb b/templates/gem_packages.spec.erb
index 9e2e877..80e552e 100644
--- a/templates/gem_packages.spec.erb
+++ b/templates/gem_packages.spec.erb
@@ -14,6 +14,9 @@
end
def self.get_extension_doc_dir(gem_spec)
+ # TODO: This is kinda ugly but it does the job for now.
+ rv = Gem::Version.new(RUBY_VERSION)
+ return nil unless RUBY_ENGINE=='ruby' && (Gem::Version.new('2.2.0') > rv && rv > Gem::Version.new('2.1.0'))
if gem_spec.respond_to?(:extensions_dir) && RUBY_ENGINE != 'rbx'
rp = gem_spec.extensions_dir.rpartition(gem_spec.base_dir)
return File.join(rp[1], 'doc', rp[2])
--
2.10.2

View File

@ -0,0 +1,30 @@
From 672a0405c2c191280887b4427a759490aa2ce5ad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <darix@nordisch.org>
Date: Fri, 13 Mar 2015 14:53:04 +0100
Subject: [PATCH 19/26] Cleaner solution for the extensions doc dir
The other solution was also failing on 1.8
---
templates/gem_packages.spec.erb | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/templates/gem_packages.spec.erb b/templates/gem_packages.spec.erb
index 80e552e..661539a 100644
--- a/templates/gem_packages.spec.erb
+++ b/templates/gem_packages.spec.erb
@@ -14,10 +14,8 @@
end
def self.get_extension_doc_dir(gem_spec)
- # TODO: This is kinda ugly but it does the job for now.
- rv = Gem::Version.new(RUBY_VERSION)
- return nil unless RUBY_ENGINE=='ruby' && (Gem::Version.new('2.2.0') > rv && rv > Gem::Version.new('2.1.0'))
- if gem_spec.respond_to?(:extensions_dir) && RUBY_ENGINE != 'rbx'
+ return nil unless Gem.ruby_engine == 'ruby' && Gem::Requirement.new("~> 2.1.0").satisfied_by? Gem.ruby_version
+ if gem_spec.respond_to?(:extensions_dir)
rp = gem_spec.extensions_dir.rpartition(gem_spec.base_dir)
return File.join(rp[1], 'doc', rp[2])
end
--
2.10.2

View File

@ -0,0 +1,25 @@
From f6ace6130df3a2ea6ca8e987e9675d652940510e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <darix@nordisch.org>
Date: Fri, 13 Mar 2015 15:06:01 +0100
Subject: [PATCH 20/26] Ruby 1.8 insists on the () for the parameter
---
templates/gem_packages.spec.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/gem_packages.spec.erb b/templates/gem_packages.spec.erb
index 661539a..6add6a7 100644
--- a/templates/gem_packages.spec.erb
+++ b/templates/gem_packages.spec.erb
@@ -14,7 +14,7 @@
end
def self.get_extension_doc_dir(gem_spec)
- return nil unless Gem.ruby_engine == 'ruby' && Gem::Requirement.new("~> 2.1.0").satisfied_by? Gem.ruby_version
+ return nil unless Gem.ruby_engine == 'ruby' && Gem::Requirement.new("~> 2.1.0").satisfied_by?(Gem.ruby_version)
if gem_spec.respond_to?(:extensions_dir)
rp = gem_spec.extensions_dir.rpartition(gem_spec.base_dir)
return File.join(rp[1], 'doc', rp[2])
--
2.10.2

View File

@ -0,0 +1,25 @@
From 2d02399fc670b648785b10bf7f1510c136e6f981 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <darix@nordisch.org>
Date: Thu, 16 Apr 2015 23:49:01 +0200
Subject: [PATCH 21/26] Fix company name in copyright header
---
templates/opensuse.spec.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/opensuse.spec.erb b/templates/opensuse.spec.erb
index a5f34c6..57bf9ff 100644
--- a/templates/opensuse.spec.erb
+++ b/templates/opensuse.spec.erb
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-<%= spec.name %><%= config[:version_suffix] %>
#
-# Copyright (c) <%= Time.now.year %> SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) <%= Time.now.year %> SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
--
2.10.2

View File

@ -1,8 +1,11 @@
commit f8c0600c659f26d1ec6c9d890a63dd642f741003
Author: Stephan Kulow <coolo@suse.de>
Date: Wed Apr 6 08:00:27 2016 +0200
From f8c0600c659f26d1ec6c9d890a63dd642f741003 Mon Sep 17 00:00:00 2001
From: Stephan Kulow <coolo@suse.de>
Date: Wed, 6 Apr 2016 08:00:27 +0200
Subject: [PATCH 22/26] add the touch for build-compare to the template
add the touch for build-compare to the template
---
templates/opensuse.spec.erb | 1 +
1 file changed, 1 insertion(+)
diff --git a/templates/opensuse.spec.erb b/templates/opensuse.spec.erb
index 57bf9ff..22c4647 100644
@ -16,3 +19,6 @@ index 57bf9ff..22c4647 100644
%gem_build
<% end -%>
--
2.10.2

View File

@ -1,7 +1,7 @@
From ee81c7f09669db9e6898df5bf36ac6c102d0d615 Mon Sep 17 00:00:00 2001
From: Thomas Bechtold <tbechtold@suse.com>
Date: Mon, 18 Jul 2016 10:12:29 +0200
Subject: [PATCH] Also tag APACHE-LICENSE-2.0 as docfile
Subject: [PATCH 23/26] Also tag APACHE-LICENSE-2.0 as docfile
Some packages (e.g. rubygem-apipie-rails) name it that way
---
@ -22,5 +22,5 @@ index 22c4647..5b62b26 100644
news
release_notes
--
2.9.0
2.10.2

View File

@ -0,0 +1,29 @@
From 3888b107af6ce5721ff40abe2bedcede1893732b Mon Sep 17 00:00:00 2001
From: Theo Chatzimichos <tampakrap@gmail.com>
Date: Tue, 23 Aug 2016 23:49:40 +0200
Subject: [PATCH 24/26] add ability to provide alternative main Source
this is useful in cases where the gem is not taken from rubygems.org
---
templates/opensuse.spec.erb | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/templates/opensuse.spec.erb b/templates/opensuse.spec.erb
index 5b62b26..ae2d458 100644
--- a/templates/opensuse.spec.erb
+++ b/templates/opensuse.spec.erb
@@ -73,7 +73,11 @@ BuildRequires: update-alternatives
<% unless spec.homepage.nil? || spec.homepage.empty? -%>
Url: <%= spec.homepage %>
<% end -%>
+<% if config[:sourceurl] -%>
+Source: <%= config[:sourceurl] %>
+<% else -%>
Source: http://rubygems.org/gems/%{mod_full_name}.gem
+<% end -%>
<% if config[:sources]
config[:sources].each_with_index do |src, i| -%>
Source<%= i+1 %>: <%= src %>
--
2.10.2

View File

@ -0,0 +1,44 @@
From e9601db421071203202ddb0122e8826859238e73 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de>
Date: Thu, 10 Nov 2016 15:46:22 +0100
Subject: [PATCH 25/26] allow running commands after patching
but before we actually rebuild the gem.
needed for libv8 gem.
---
gem2rpm.yml.documentation | 2 ++
templates/opensuse.spec.erb | 5 +++++
2 files changed, 7 insertions(+)
diff --git a/gem2rpm.yml.documentation b/gem2rpm.yml.documentation
index 376eacd..fbed82e 100644
--- a/gem2rpm.yml.documentation
+++ b/gem2rpm.yml.documentation
@@ -22,6 +22,8 @@
# :patches:
# foo.patch: -p1
# bar.patch:
+# :post_patch:
+# if you need to fiddle with the source dir before rebuilding the gem
# ## used by gem2rpm
# :sources:
# - foo.desktop
diff --git a/templates/opensuse.spec.erb b/templates/opensuse.spec.erb
index ae2d458..e6e9a1a 100644
--- a/templates/opensuse.spec.erb
+++ b/templates/opensuse.spec.erb
@@ -143,6 +143,11 @@ PreReq: update-alternatives
<% config[:patches].each_with_index do |patch, i| -%>
%patch<%= i %> <%= patch[1] if patch[1] %>
<% end -%>
+<% if config[:post_patch] -%>
+# MANUAL
+<%= config[:post_patch] %>
+# /MANUAL
+<% end -%>
find -type f -print0 | xargs -0 touch -r %{S:0}
%gem_build
<% end -%>
--
2.10.2

View File

@ -0,0 +1,39 @@
From 304e55ea06e789e41683351c3eca7e8f20619201 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de>
Date: Thu, 10 Nov 2016 18:16:23 +0100
Subject: [PATCH 26/26] use https instead of http for rubygems.org
---
bin/gem2rpm | 2 +-
templates/opensuse.spec.erb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/gem2rpm b/bin/gem2rpm
index 8a6db05..45ed21c 100755
--- a/bin/gem2rpm
+++ b/bin/gem2rpm
@@ -111,7 +111,7 @@ gemfile = rest[0]
if fetch
gem_uri = ''
- open("http://rubygems.org/api/v1/gems/#{gemfile}.json") do |f|
+ open("https://rubygems.org/api/v1/gems/#{gemfile}.json") do |f|
gem_uri = f.read.match(/"gem_uri":\s*"(.*?)",/m)[1]
gemfile = URI.parse(gem_uri).path.split('/').last
open(gemfile, 'w') do |gf|
diff --git a/templates/opensuse.spec.erb b/templates/opensuse.spec.erb
index e6e9a1a..b070745 100644
--- a/templates/opensuse.spec.erb
+++ b/templates/opensuse.spec.erb
@@ -76,7 +76,7 @@ Url: <%= spec.homepage %>
<% if config[:sourceurl] -%>
Source: <%= config[:sourceurl] %>
<% else -%>
-Source: http://rubygems.org/gems/%{mod_full_name}.gem
+Source: https://rubygems.org/gems/%{mod_full_name}.gem
<% end -%>
<% if config[:sources]
config[:sources].each_with_index do |src, i| -%>
--
2.10.2

View File

@ -21,7 +21,9 @@
# ## used by gem2rpm
# :patches:
# foo.patch: -p1
# bar.patch:
# bar.patch:
# :post_patch:
# if you need to fiddle with the source dir before rebuilding the gem
# ## used by gem2rpm
# :sources:
# - foo.desktop
@ -54,7 +56,7 @@
# :filelist: |-
# /usr/bin/gem2rpm-opensuse
# ## used by gem_packages
# :custom:
# :custom_pkgs:
# apache:
# :preamble: |-
# Requires: .....

View File

@ -1,3 +1,53 @@
-------------------------------------------------------------------
Thu Nov 10 17:17:22 UTC 2016 - mrueckert@suse.de
- fix gem2rpm --fetch: prefer https for accessing rubygems.org
(bnc #963710)
adds 0026-use-https-instead-of-http-for-rubygems.org.patch
-------------------------------------------------------------------
Thu Nov 10 16:10:15 UTC 2016 - mrueckert@suse.de
- added support for 2.4.0
-------------------------------------------------------------------
Thu Nov 10 16:04:57 UTC 2016 - mrueckert@suse.de
- dropped all patches and replaced them with git format-patch
series:
- modified:
0001-use-the-ID-from-os-release-to-use-the-proper-templat.patch
0002-added-basic-config-file-support-to-gem2rpm-in-yaml-f.patch
0003-new-opensuse-templates.-they-require-the-config-file.patch
0004-added-example-gem2rpm.yml.patch
0005-properly-shorten-description-and-summary.patch
0006-Preserve-the-license-header-found-in-the-output-file.patch
0007-fixes-for-the-opensuse-template.patch
0008-do-not-use-not-.-not-supported-on-1.8-e.g.patch
0009-No-longer-require-the-ruby-version-inside-the-subpac.patch
0010-Try-to-load-rbconfigpackagingsupport-and-fail-gracef.patch
0011-Add-support-for-scripts-pre-post-for-subpackages.patch
0012-typo-in-gem2rpm.yml.documentation-custom_pkgs-instea.patch
0013-Also-tag-LICENSE-MIT-as-docfile.patch
0014-Refactor-into-multiple-lines.patch
0015-Add-licence-to-the-list-of-license-files-as-well.patch
0016-add-two-more-ways-to-express-changes.patch
- dropped:
0017-touch-unpacked-sources.patch
0001-Also-tag-APACHE-LICENSE-2.0-as-docfile.patch
- newly added:
0017-.markdown-is-also-seen-in-the-wild.patch
0018-Only-use-the-extensions-doc-dir-on-MRI-2.1.x.patch
0019-Cleaner-solution-for-the-extensions-doc-dir.patch
0020-Ruby-1.8-insists-on-the-for-the-parameter.patch
0021-Fix-company-name-in-copyright-header.patch
0022-add-the-touch-for-build-compare-to-the-template.patch
0023-Also-tag-APACHE-LICENSE-2.0-as-docfile.patch
0024-add-ability-to-provide-alternative-main-Source.patch
0025-allow-running-commands-after-patching.patch
- added :post_patch hook to run commands before we rebuild the gem
used by libv8
-------------------------------------------------------------------
Mon Jul 18 08:29:08 UTC 2016 - tbechtold@suse.com

View File

@ -23,6 +23,7 @@
%bcond_with ruby21
%bcond_with ruby22
%bcond_with ruby23
%bcond_with ruby24
%bcond_with rubinius25
Name: rubygem-gem2rpm
@ -47,24 +48,32 @@ Source: http://rubygems.org/gems/%{mod_full_name}.gem
Source1: gem2rpm.yml.documentation
Source2: gem2rpm-opensuse
Source3: series
Patch0: 0001-use-the-ID-from-os-release-to-use-the-proper-templat.patch
Patch1: 0002-added-basic-config-file-support-to-gem2rpm-in-yaml-f.patch
Patch2: 0003-new-opensuse-templates.-they-require-the-config-file.patch
Patch3: 0004-added-example-gem2rpm.yml.patch
Patch4: 0005-properly-shorten-description-and-summary.patch
Patch5: 0006-Preserve-the-license-header-found-in-the-output-file.patch
Patch6: 0007-fixes-for-the-opensuse-template.patch
Patch7: 0008-do-not-use-not-.-not-supported-on-1.8-e.g.patch
Patch8: 0010-Try-to-load-rbconfigpackagingsupport-and-fail-gracef.patch
Patch9: 0011-Add-support-for-scripts-pre-post-for-subpackages.patch
Patch10: 0012-typo-in-gem2rpm.yml.documentation-custom_pkgs-instea.patch
Patch11: 0013-Also-tag-LICENSE-MIT-as-docfile.patch
Patch12: 0014-Refactor-into-multiple-lines.patch
Patch13: 0015-Add-licence-to-the-list-of-license-files-as-well.patch
Patch14: 0016-add-two-more-ways-to-express-changes.patch
Patch15: 0009-No-longer-require-the-ruby-version-inside-the-subpac.patch
Patch16: 0017-touch-unpacked-sources.patch
Patch17: 0001-Also-tag-APACHE-LICENSE-2.0-as-docfile.patch
Patch01: 0001-use-the-ID-from-os-release-to-use-the-proper-templat.patch
Patch02: 0002-added-basic-config-file-support-to-gem2rpm-in-yaml-f.patch
Patch03: 0003-new-opensuse-templates.-they-require-the-config-file.patch
Patch04: 0004-added-example-gem2rpm.yml.patch
Patch05: 0005-properly-shorten-description-and-summary.patch
Patch06: 0006-Preserve-the-license-header-found-in-the-output-file.patch
Patch07: 0007-fixes-for-the-opensuse-template.patch
Patch08: 0008-do-not-use-not-.-not-supported-on-1.8-e.g.patch
Patch09: 0009-No-longer-require-the-ruby-version-inside-the-subpac.patch
Patch10: 0010-Try-to-load-rbconfigpackagingsupport-and-fail-gracef.patch
Patch11: 0011-Add-support-for-scripts-pre-post-for-subpackages.patch
Patch12: 0012-typo-in-gem2rpm.yml.documentation-custom_pkgs-instea.patch
Patch13: 0013-Also-tag-LICENSE-MIT-as-docfile.patch
Patch14: 0014-Refactor-into-multiple-lines.patch
Patch15: 0015-Add-licence-to-the-list-of-license-files-as-well.patch
Patch16: 0016-add-two-more-ways-to-express-changes.patch
Patch17: 0017-.markdown-is-also-seen-in-the-wild.patch
Patch18: 0018-Only-use-the-extensions-doc-dir-on-MRI-2.1.x.patch
Patch19: 0019-Cleaner-solution-for-the-extensions-doc-dir.patch
Patch20: 0020-Ruby-1.8-insists-on-the-for-the-parameter.patch
Patch21: 0021-Fix-company-name-in-copyright-header.patch
Patch22: 0022-add-the-touch-for-build-compare-to-the-template.patch
Patch23: 0023-Also-tag-APACHE-LICENSE-2.0-as-docfile.patch
Patch24: 0024-add-ability-to-provide-alternative-main-Source.patch
Patch25: 0025-allow-running-commands-after-patching.patch
Patch26: 0026-use-https-instead-of-http-for-rubygems.org.patch
Summary: Generate rpm specfiles from gems
License: GPL-2.0+
Group: Development/Languages/Ruby
@ -76,16 +85,15 @@ The spec file tries to follow the gem as closely as possible
%prep
%gem_unpack
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch01 -p1
%patch02 -p1
%patch03 -p1
%patch04 -p1
%patch05 -p1
%patch06 -p1
%patch07 -p1
%patch08 -p1
%patch09 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
@ -94,6 +102,15 @@ The spec file tries to follow the gem as closely as possible
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%build
%gem_build
@ -440,6 +457,62 @@ fi
%doc %{_libdir}/ruby/gems/2.3.0/doc/gem2rpm-%{version}
%endif
%if %{with ruby24}
%package -n ruby2.4-rubygem-gem2rpm
Summary: Generate rpm specfiles from gems
Group: Development/Languages/Ruby
PreReq: update-alternatives
%description -n ruby2.4-rubygem-gem2rpm
Generate source rpms and rpm spec files from a Ruby Gem.
The spec file tries to follow the gem as closely as possible
%package -n ruby2.4-rubygem-gem2rpm-doc
Summary: RDoc documentation for %{mod_name}
Group: Development/Languages/Ruby
Requires: ruby2.4-rubygem-gem2rpm = %{version}
%description -n ruby2.4-rubygem-gem2rpm-doc
Documentation generated at gem installation time.
Usually in RDoc and RI formats.
%post -n ruby2.4-rubygem-gem2rpm
/usr/sbin/update-alternatives --install \
%{_bindir}/gem2rpm gem2rpm %{_bindir}/gem2rpm.ruby2.4-%{version} %{mod_weight}
/usr/sbin/update-alternatives --install \
%{_bindir}/gem2rpm-%{version} gem2rpm-%{version} %{_bindir}/gem2rpm.ruby2.4-%{version} %{mod_weight}
/usr/sbin/update-alternatives --install \
%{_bindir}/gem2rpm.ruby2.4 gem2rpm.ruby2.4 %{_bindir}/gem2rpm.ruby2.4-%{version} %{mod_weight}
%preun -n ruby2.4-rubygem-gem2rpm
if [ "$1" = 0 ] ; then
/usr/sbin/update-alternatives --remove gem2rpm %{_bindir}/gem2rpm.ruby2.4-%{version}
/usr/sbin/update-alternatives --remove gem2rpm-%{version} %{_bindir}/gem2rpm.ruby2.4-%{version}
/usr/sbin/update-alternatives --remove gem2rpm.ruby2.4 %{_bindir}/gem2rpm.ruby2.4-%{version}
fi
%files -n ruby2.4-rubygem-gem2rpm
%defattr(-,root,root,-)
%{_docdir}/ruby2.4-rubygem-gem2rpm
#{_bindir}/gem2rpm-opensuse
%{_bindir}/gem2rpm.ruby2.4-%{version}
%ghost %{_bindir}/gem2rpm.ruby2.4
%ghost %{_bindir}/gem2rpm-%{version}
%ghost %{_bindir}/gem2rpm
%ghost %{_sysconfdir}/alternatives/gem2rpm
%ghost %{_sysconfdir}/alternatives/gem2rpm.ruby2.4
%ghost %{_sysconfdir}/alternatives/gem2rpm-%{version}
# cache file
%{_libdir}/ruby/gems/2.4.0/cache/gem2rpm-%{version}.gem
%{_libdir}/ruby/gems/2.4.0/gems/gem2rpm-%{version}
%{_libdir}/ruby/gems/2.4.0/specifications/gem2rpm-%{version}.gemspec
%files -n ruby2.4-rubygem-gem2rpm-doc
%defattr(-,root,root,-)
%doc %{_libdir}/ruby/gems/2.4.0/doc/gem2rpm-%{version}
%endif
%if %{with rubinius25}
%package -n rbx2.5-rubygem-gem2rpm
# MANUAL

32
series
View File

@ -1,10 +1,26 @@
0001-use-the-ID-from-os-release-to-use-the-proper-templat.patch -p1
0002-added-basic-config-file-support-to-gem2rpm-in-yaml-f.patch -p1
0003-sle-12-templates.-they-require-the-config-file-suppo.patch -p1
0004-openSUSE-template-fixes.patch -p1
0005-added-example-gem2rpm.yml.patch -p1
0006-properly-shorten-description-and-summary.patch -p1
0007-Preserve-the-license-header-found-in-the-output-file.patch -p1
0008-dont-allow-suffixes-with-just-a-plain-number.-prefix.patch -p1
0009-rubinius-has-no-extensions-docdir.patch -p1
0010-switch-to-new-packaging-scheme-by-default.patch -p1
0003-new-opensuse-templates.-they-require-the-config-file.patch -p1
0004-added-example-gem2rpm.yml.patch -p1
0005-properly-shorten-description-and-summary.patch -p1
0006-Preserve-the-license-header-found-in-the-output-file.patch -p1
0007-fixes-for-the-opensuse-template.patch -p1
0008-do-not-use-not-.-not-supported-on-1.8-e.g.patch -p1
0009-No-longer-require-the-ruby-version-inside-the-subpac.patch -p1
0010-Try-to-load-rbconfigpackagingsupport-and-fail-gracef.patch -p1
0011-Add-support-for-scripts-pre-post-for-subpackages.patch -p1
0012-typo-in-gem2rpm.yml.documentation-custom_pkgs-instea.patch -p1
0013-Also-tag-LICENSE-MIT-as-docfile.patch -p1
0014-Refactor-into-multiple-lines.patch -p1
0015-Add-licence-to-the-list-of-license-files-as-well.patch -p1
0016-add-two-more-ways-to-express-changes.patch -p1
0017-.markdown-is-also-seen-in-the-wild.patch -p1
0018-Only-use-the-extensions-doc-dir-on-MRI-2.1.x.patch -p1
0019-Cleaner-solution-for-the-extensions-doc-dir.patch -p1
0020-Ruby-1.8-insists-on-the-for-the-parameter.patch -p1
0021-Fix-company-name-in-copyright-header.patch -p1
0022-add-the-touch-for-build-compare-to-the-template.patch -p1
0023-Also-tag-APACHE-LICENSE-2.0-as-docfile.patch -p1
0024-add-ability-to-provide-alternative-main-Source.patch -p1
0025-allow-running-commands-after-patching.patch -p1
0026-use-https-instead-of-http-for-rubygems.org.patch -p1