1
0

- fix gem2rpm --fetch: prefer https for accessing rubygems.org

(bnc #963710)
  adds 0026-use-https-instead-of-http-for-rubygems.org.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/rubygem-gem2rpm?expand=0&rev=21
This commit is contained in:
Marcus Rückert 2016-11-10 17:20:12 +00:00 committed by Git OBS Bridge
parent 2c88c1595d
commit 6263cc81dd
29 changed files with 99 additions and 50 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 01/25] - 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
--
2.10.1
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 02/25] 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
--
2.10.1
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 03/25] new opensuse templates. they require the config file
Subject: [PATCH 03/26] new opensuse templates. they require the config file
support.
---
@ -503,5 +503,5 @@ index 37de592..25fdec3 100644
%changelog
--
2.10.1
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 04/25] added example gem2rpm.yml
Subject: [PATCH 04/26] added example gem2rpm.yml
---
Rakefile | 2 +-
@ -86,5 +86,5 @@ index 0000000..5e444eb
+# /bin/echo foo
+#
--
2.10.1
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 05/25] 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}
--
2.10.1
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 06/25] 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
--
2.10.1
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 07/25] 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] -%>
--
2.10.1
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 08/25] 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 %>
--
2.10.1
2.10.2

View File

@ -1,7 +1,7 @@
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 09/25] No longer require the ruby version inside the
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
@ -28,5 +28,5 @@ index 94d4005..29873e5 100644
<% if config[:main] && config[:main][:preamble] -%>
<%= config[:main][:preamble] %>
--
2.10.1
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/25] 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.10.1
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/25] 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.10.1
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/25] 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.10.1
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/25] 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.10.1
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/25] 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.10.1
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/25] 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.10.1
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/25] 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.10.1
2.10.2

View File

@ -1,7 +1,7 @@
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/25] .markdown is also seen in the wild
Subject: [PATCH 17/26] .markdown is also seen in the wild
---
templates/gem_packages.spec.erb | 2 +-
@ -35,5 +35,5 @@ index b1251c5..a5f34c6 100644
docdirfiles << path if bpath == file
}
--
2.10.1
2.10.2

View File

@ -1,7 +1,7 @@
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/25] Only use the extensions doc dir on MRI 2.1.x
Subject: [PATCH 18/26] Only use the extensions doc dir on MRI 2.1.x
---
templates/gem_packages.spec.erb | 3 +++
@ -22,5 +22,5 @@ index 9e2e877..80e552e 100644
rp = gem_spec.extensions_dir.rpartition(gem_spec.base_dir)
return File.join(rp[1], 'doc', rp[2])
--
2.10.1
2.10.2

View File

@ -1,7 +1,7 @@
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/25] Cleaner solution for the extensions doc dir
Subject: [PATCH 19/26] Cleaner solution for the extensions doc dir
The other solution was also failing on 1.8
---
@ -26,5 +26,5 @@ index 80e552e..661539a 100644
return File.join(rp[1], 'doc', rp[2])
end
--
2.10.1
2.10.2

View File

@ -1,7 +1,7 @@
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/25] Ruby 1.8 insists on the () for the parameter
Subject: [PATCH 20/26] Ruby 1.8 insists on the () for the parameter
---
templates/gem_packages.spec.erb | 2 +-
@ -21,5 +21,5 @@ index 661539a..6add6a7 100644
rp = gem_spec.extensions_dir.rpartition(gem_spec.base_dir)
return File.join(rp[1], 'doc', rp[2])
--
2.10.1
2.10.2

View File

@ -1,7 +1,7 @@
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/25] Fix company name in copyright header
Subject: [PATCH 21/26] Fix company name in copyright header
---
templates/opensuse.spec.erb | 2 +-
@ -21,5 +21,5 @@ index a5f34c6..57bf9ff 100644
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
--
2.10.1
2.10.2

View File

@ -1,7 +1,7 @@
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/25] add the touch for build-compare to the template
Subject: [PATCH 22/26] add the touch for build-compare to the template
---
templates/opensuse.spec.erb | 1 +
@ -20,5 +20,5 @@ index 57bf9ff..22c4647 100644
<% end -%>
--
2.10.1
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 23/25] 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.10.1
2.10.2

View File

@ -1,7 +1,7 @@
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/25] add ability to provide alternative main Source
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
---
@ -25,5 +25,5 @@ index 5b62b26..ae2d458 100644
config[:sources].each_with_index do |src, i| -%>
Source<%= i+1 %>: <%= src %>
--
2.10.1
2.10.2

View File

@ -1,7 +1,7 @@
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/25] allow running commands after patching
Subject: [PATCH 25/26] allow running commands after patching
but before we actually rebuild the gem.
needed for libv8 gem.
@ -40,5 +40,5 @@ index ae2d458..e6e9a1a 100644
%gem_build
<% end -%>
--
2.10.1
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

@ -1,3 +1,10 @@
-------------------------------------------------------------------
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

View File

@ -73,6 +73,7 @@ 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:
Summary: Generate rpm specfiles from gems
License: GPL-2.0+
Group: Development/Languages/Ruby
@ -109,6 +110,7 @@ The spec file tries to follow the gem as closely as possible
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%build
%gem_build

1
series
View File

@ -23,3 +23,4 @@
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