From 2c88c1595dde50346cfbf49c5bec819bdc31ee96b7437152ff6a4615b382f2bd Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Thu, 10 Nov 2016 16:21:35 +0000 Subject: [PATCH 1/3] - added support for 2.4.0 - 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 OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/rubygem-gem2rpm?expand=0&rev=20 --- ...os-release-to-use-the-proper-templat.patch | 4 +- ...ig-file-support-to-gem2rpm-in-yaml-f.patch | 4 +- ...plates.-they-require-the-config-file.patch | 6 +- 0004-added-example-gem2rpm.yml.patch | 4 +- ...erly-shorten-description-and-summary.patch | 4 +- ...ense-header-found-in-the-output-file.patch | 4 +- 0007-fixes-for-the-opensuse-template.patch | 4 +- ...t-use-not-.-not-supported-on-1.8-e.g.patch | 4 +- ...e-the-ruby-version-inside-the-subpac.patch | 5 +- ...nfigpackagingsupport-and-fail-gracef.patch | 4 +- ...for-scripts-pre-post-for-subpackages.patch | 4 +- ...yml.documentation-custom_pkgs-instea.patch | 4 +- 0013-Also-tag-LICENSE-MIT-as-docfile.patch | 4 +- 0014-Refactor-into-multiple-lines.patch | 4 +- ...to-the-list-of-license-files-as-well.patch | 4 +- ...add-two-more-ways-to-express-changes.patch | 4 +- 0017-.markdown-is-also-seen-in-the-wild.patch | 39 ++++++ ...-the-extensions-doc-dir-on-MRI-2.1.x.patch | 26 ++++ ...-solution-for-the-extensions-doc-dir.patch | 30 +++++ ...1.8-insists-on-the-for-the-parameter.patch | 25 ++++ ...Fix-company-name-in-copyright-header.patch | 25 ++++ ...ch-for-build-compare-to-the-template.patch | 14 +- ...so-tag-APACHE-LICENSE-2.0-as-docfile.patch | 4 +- ...y-to-provide-alternative-main-Source.patch | 29 ++++ ...llow-running-commands-after-patching.patch | 44 ++++++ gem2rpm.yml.documentation | 6 +- rubygem-gem2rpm.changes | 43 ++++++ rubygem-gem2rpm.spec | 127 ++++++++++++++---- series | 31 +++-- 29 files changed, 433 insertions(+), 77 deletions(-) create mode 100644 0017-.markdown-is-also-seen-in-the-wild.patch create mode 100644 0018-Only-use-the-extensions-doc-dir-on-MRI-2.1.x.patch create mode 100644 0019-Cleaner-solution-for-the-extensions-doc-dir.patch create mode 100644 0020-Ruby-1.8-insists-on-the-for-the-parameter.patch create mode 100644 0021-Fix-company-name-in-copyright-header.patch rename 0017-touch-unpacked-sources.patch => 0022-add-the-touch-for-build-compare-to-the-template.patch (58%) rename 0001-Also-tag-APACHE-LICENSE-2.0-as-docfile.patch => 0023-Also-tag-APACHE-LICENSE-2.0-as-docfile.patch (90%) create mode 100644 0024-add-ability-to-provide-alternative-main-Source.patch create mode 100644 0025-allow-running-commands-after-patching.patch diff --git a/0001-use-the-ID-from-os-release-to-use-the-proper-templat.patch b/0001-use-the-ID-from-os-release-to-use-the-proper-templat.patch index 6fb78b3..05c8824 100644 --- a/0001-use-the-ID-from-os-release-to-use-the-proper-templat.patch +++ b/0001-use-the-ID-from-os-release-to-use-the-proper-templat.patch @@ -1,7 +1,7 @@ From 91bc63e3fbba24a5f90c4fce4f74b371c4694657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= 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/25] - 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.1 diff --git a/0002-added-basic-config-file-support-to-gem2rpm-in-yaml-f.patch b/0002-added-basic-config-file-support-to-gem2rpm-in-yaml-f.patch index fee5c61..5a01203 100644 --- a/0002-added-basic-config-file-support-to-gem2rpm-in-yaml-f.patch +++ b/0002-added-basic-config-file-support-to-gem2rpm-in-yaml-f.patch @@ -1,7 +1,7 @@ From 1742038eb7ec8fcb25009ce8b270b420183875bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= 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/25] 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.1 diff --git a/0003-new-opensuse-templates.-they-require-the-config-file.patch b/0003-new-opensuse-templates.-they-require-the-config-file.patch index b9a45db..ac94eae 100644 --- a/0003-new-opensuse-templates.-they-require-the-config-file.patch +++ b/0003-new-opensuse-templates.-they-require-the-config-file.patch @@ -1,7 +1,7 @@ From 5e1e30e5addc99825b3bf873983ca48732493060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= Date: Thu, 24 Jul 2014 16:55:57 +0200 -Subject: [PATCH 3/9] new opensuse templates. they require the config file +Subject: [PATCH 03/25] 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.1 diff --git a/0004-added-example-gem2rpm.yml.patch b/0004-added-example-gem2rpm.yml.patch index 99e7ee1..dde7510 100644 --- a/0004-added-example-gem2rpm.yml.patch +++ b/0004-added-example-gem2rpm.yml.patch @@ -1,7 +1,7 @@ From f408e57b282cd55d59c1317240ee9e0dc679373c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= Date: Thu, 24 Jul 2014 17:02:56 +0200 -Subject: [PATCH 4/9] added example gem2rpm.yml +Subject: [PATCH 04/25] added example gem2rpm.yml --- Rakefile | 2 +- @@ -86,5 +86,5 @@ index 0000000..5e444eb +# /bin/echo foo +# -- -1.8.4.5 +2.10.1 diff --git a/0005-properly-shorten-description-and-summary.patch b/0005-properly-shorten-description-and-summary.patch index 01b5175..eef4e80 100644 --- a/0005-properly-shorten-description-and-summary.patch +++ b/0005-properly-shorten-description-and-summary.patch @@ -1,7 +1,7 @@ From da07cd470611c3c6b70fc863e2d82a2862a068e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= Date: Thu, 24 Jul 2014 17:09:35 +0200 -Subject: [PATCH 5/9] properly shorten description and summary +Subject: [PATCH 05/25] 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.1 diff --git a/0006-Preserve-the-license-header-found-in-the-output-file.patch b/0006-Preserve-the-license-header-found-in-the-output-file.patch index 6569298..ebd755c 100644 --- a/0006-Preserve-the-license-header-found-in-the-output-file.patch +++ b/0006-Preserve-the-license-header-found-in-the-output-file.patch @@ -1,7 +1,7 @@ From 0f22d81f982e02523c852521a5b94db657fe6673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= 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/25] 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.1 diff --git a/0007-fixes-for-the-opensuse-template.patch b/0007-fixes-for-the-opensuse-template.patch index 36af9b2..45bb1a3 100644 --- a/0007-fixes-for-the-opensuse-template.patch +++ b/0007-fixes-for-the-opensuse-template.patch @@ -1,7 +1,7 @@ From eed51b54253c303c593d9466ed8ed17523bda3d1 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Wed, 15 Oct 2014 10:38:29 +0200 -Subject: [PATCH 7/9] fixes for the opensuse template: +Subject: [PATCH 07/25] 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.1 diff --git a/0008-do-not-use-not-.-not-supported-on-1.8-e.g.patch b/0008-do-not-use-not-.-not-supported-on-1.8-e.g.patch index a76aafd..179482d 100644 --- a/0008-do-not-use-not-.-not-supported-on-1.8-e.g.patch +++ b/0008-do-not-use-not-.-not-supported-on-1.8-e.g.patch @@ -1,7 +1,7 @@ From ba7932c7d7bc6a70a45ac6ebb841a9e1bf8bb86b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= 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/25] 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.1 diff --git a/0009-No-longer-require-the-ruby-version-inside-the-subpac.patch b/0009-No-longer-require-the-ruby-version-inside-the-subpac.patch index 2c093c2..ca14188 100644 --- a/0009-No-longer-require-the-ruby-version-inside-the-subpac.patch +++ b/0009-No-longer-require-the-ruby-version-inside-the-subpac.patch @@ -1,7 +1,8 @@ From 13b02a1596a744ed70687dae0ffb465e1979221e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= 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/25] 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.1 diff --git a/0010-Try-to-load-rbconfigpackagingsupport-and-fail-gracef.patch b/0010-Try-to-load-rbconfigpackagingsupport-and-fail-gracef.patch index 4f57ce5..02e3a7a 100644 --- a/0010-Try-to-load-rbconfigpackagingsupport-and-fail-gracef.patch +++ b/0010-Try-to-load-rbconfigpackagingsupport-and-fail-gracef.patch @@ -1,7 +1,7 @@ From 953ff66677490c78ceff14afc0365f832079333a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= Date: Tue, 21 Oct 2014 17:55:23 +0200 -Subject: [PATCH 10/16] Try to load rbconfigpackagingsupport and fail +Subject: [PATCH 10/25] 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.1 diff --git a/0011-Add-support-for-scripts-pre-post-for-subpackages.patch b/0011-Add-support-for-scripts-pre-post-for-subpackages.patch index 626f74c..c4c4940 100644 --- a/0011-Add-support-for-scripts-pre-post-for-subpackages.patch +++ b/0011-Add-support-for-scripts-pre-post-for-subpackages.patch @@ -1,7 +1,7 @@ From 0ee368bc6c4ea35d233dadbe1f2c7048a99d3dc4 Mon Sep 17 00:00:00 2001 From: Theo chatzimichos Date: Fri, 5 Dec 2014 17:11:47 +0200 -Subject: [PATCH 11/16] Add support for :scripts: (pre/post) for subpackages +Subject: [PATCH 11/25] 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.1 diff --git a/0012-typo-in-gem2rpm.yml.documentation-custom_pkgs-instea.patch b/0012-typo-in-gem2rpm.yml.documentation-custom_pkgs-instea.patch index 9ed33c3..fab69c6 100644 --- a/0012-typo-in-gem2rpm.yml.documentation-custom_pkgs-instea.patch +++ b/0012-typo-in-gem2rpm.yml.documentation-custom_pkgs-instea.patch @@ -1,7 +1,7 @@ From 092f7ca4ff1f954dd8982acf7199cd15636e87f3 Mon Sep 17 00:00:00 2001 From: Theo Chatzimichos Date: Fri, 5 Dec 2014 17:16:41 +0200 -Subject: [PATCH 12/16] typo in gem2rpm.yml.documentation: :custom_pkgs: +Subject: [PATCH 12/25] 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.1 diff --git a/0013-Also-tag-LICENSE-MIT-as-docfile.patch b/0013-Also-tag-LICENSE-MIT-as-docfile.patch index 6e59c64..d0ab582 100644 --- a/0013-Also-tag-LICENSE-MIT-as-docfile.patch +++ b/0013-Also-tag-LICENSE-MIT-as-docfile.patch @@ -1,7 +1,7 @@ From dad615aa35cbbe0d7351ea66af44a8548853a2da Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 12 Jan 2015 15:34:26 +0100 -Subject: [PATCH 13/16] Also tag LICENSE-MIT as docfile +Subject: [PATCH 13/25] 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.1 diff --git a/0014-Refactor-into-multiple-lines.patch b/0014-Refactor-into-multiple-lines.patch index 683ea91..7b276f8 100644 --- a/0014-Refactor-into-multiple-lines.patch +++ b/0014-Refactor-into-multiple-lines.patch @@ -1,7 +1,7 @@ From 5bb494a7d6911754e485f6b729861771181bf2a0 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 12 Jan 2015 15:51:08 +0100 -Subject: [PATCH 14/16] Refactor into multiple lines +Subject: [PATCH 14/25] 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.1 diff --git a/0015-Add-licence-to-the-list-of-license-files-as-well.patch b/0015-Add-licence-to-the-list-of-license-files-as-well.patch index 72db40e..a150862 100644 --- a/0015-Add-licence-to-the-list-of-license-files-as-well.patch +++ b/0015-Add-licence-to-the-list-of-license-files-as-well.patch @@ -1,7 +1,7 @@ From b10341f5c13d71271e195101e46213026f628048 Mon Sep 17 00:00:00 2001 From: Dirk Mueller 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/25] 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.1 diff --git a/0016-add-two-more-ways-to-express-changes.patch b/0016-add-two-more-ways-to-express-changes.patch index 8e95087..75f0e25 100644 --- a/0016-add-two-more-ways-to-express-changes.patch +++ b/0016-add-two-more-ways-to-express-changes.patch @@ -1,7 +1,7 @@ From 814a7133ce8ab7271cf0bf31ad6d4de94fec8863 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Wed, 11 Feb 2015 02:05:31 +0100 -Subject: [PATCH 16/16] add two more ways to express changes +Subject: [PATCH 16/25] 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.1 diff --git a/0017-.markdown-is-also-seen-in-the-wild.patch b/0017-.markdown-is-also-seen-in-the-wild.patch new file mode 100644 index 0000000..556667a --- /dev/null +++ b/0017-.markdown-is-also-seen-in-the-wild.patch @@ -0,0 +1,39 @@ +From 660fa598f3a78f94f35e1edf10d143dae5db62bb Mon Sep 17 00:00:00 2001 +From: Stephan Kulow +Date: Wed, 11 Feb 2015 02:30:14 +0100 +Subject: [PATCH 17/25] .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.1 + diff --git a/0018-Only-use-the-extensions-doc-dir-on-MRI-2.1.x.patch b/0018-Only-use-the-extensions-doc-dir-on-MRI-2.1.x.patch new file mode 100644 index 0000000..8967ad3 --- /dev/null +++ b/0018-Only-use-the-extensions-doc-dir-on-MRI-2.1.x.patch @@ -0,0 +1,26 @@ +From 7a45c828d05304d90b3a202e55acbbcaab5cdac2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marcus=20R=C3=BCckert?= +Date: Fri, 13 Mar 2015 03:24:25 +0100 +Subject: [PATCH 18/25] 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.1 + diff --git a/0019-Cleaner-solution-for-the-extensions-doc-dir.patch b/0019-Cleaner-solution-for-the-extensions-doc-dir.patch new file mode 100644 index 0000000..4331f24 --- /dev/null +++ b/0019-Cleaner-solution-for-the-extensions-doc-dir.patch @@ -0,0 +1,30 @@ +From 672a0405c2c191280887b4427a759490aa2ce5ad Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marcus=20R=C3=BCckert?= +Date: Fri, 13 Mar 2015 14:53:04 +0100 +Subject: [PATCH 19/25] 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.1 + diff --git a/0020-Ruby-1.8-insists-on-the-for-the-parameter.patch b/0020-Ruby-1.8-insists-on-the-for-the-parameter.patch new file mode 100644 index 0000000..1dbe8f5 --- /dev/null +++ b/0020-Ruby-1.8-insists-on-the-for-the-parameter.patch @@ -0,0 +1,25 @@ +From f6ace6130df3a2ea6ca8e987e9675d652940510e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marcus=20R=C3=BCckert?= +Date: Fri, 13 Mar 2015 15:06:01 +0100 +Subject: [PATCH 20/25] 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.1 + diff --git a/0021-Fix-company-name-in-copyright-header.patch b/0021-Fix-company-name-in-copyright-header.patch new file mode 100644 index 0000000..c4c6265 --- /dev/null +++ b/0021-Fix-company-name-in-copyright-header.patch @@ -0,0 +1,25 @@ +From 2d02399fc670b648785b10bf7f1510c136e6f981 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marcus=20R=C3=BCckert?= +Date: Thu, 16 Apr 2015 23:49:01 +0200 +Subject: [PATCH 21/25] 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.1 + diff --git a/0017-touch-unpacked-sources.patch b/0022-add-the-touch-for-build-compare-to-the-template.patch similarity index 58% rename from 0017-touch-unpacked-sources.patch rename to 0022-add-the-touch-for-build-compare-to-the-template.patch index 2c10f91..937fa45 100644 --- a/0017-touch-unpacked-sources.patch +++ b/0022-add-the-touch-for-build-compare-to-the-template.patch @@ -1,8 +1,11 @@ -commit f8c0600c659f26d1ec6c9d890a63dd642f741003 -Author: Stephan Kulow -Date: Wed Apr 6 08:00:27 2016 +0200 +From f8c0600c659f26d1ec6c9d890a63dd642f741003 Mon Sep 17 00:00:00 2001 +From: Stephan Kulow +Date: Wed, 6 Apr 2016 08:00:27 +0200 +Subject: [PATCH 22/25] 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.1 + diff --git a/0001-Also-tag-APACHE-LICENSE-2.0-as-docfile.patch b/0023-Also-tag-APACHE-LICENSE-2.0-as-docfile.patch similarity index 90% rename from 0001-Also-tag-APACHE-LICENSE-2.0-as-docfile.patch rename to 0023-Also-tag-APACHE-LICENSE-2.0-as-docfile.patch index 93ce7f4..0fcafc2 100644 --- a/0001-Also-tag-APACHE-LICENSE-2.0-as-docfile.patch +++ b/0023-Also-tag-APACHE-LICENSE-2.0-as-docfile.patch @@ -1,7 +1,7 @@ From ee81c7f09669db9e6898df5bf36ac6c102d0d615 Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Mon, 18 Jul 2016 10:12:29 +0200 -Subject: [PATCH] Also tag APACHE-LICENSE-2.0 as docfile +Subject: [PATCH 23/25] 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.1 diff --git a/0024-add-ability-to-provide-alternative-main-Source.patch b/0024-add-ability-to-provide-alternative-main-Source.patch new file mode 100644 index 0000000..1e5e5a0 --- /dev/null +++ b/0024-add-ability-to-provide-alternative-main-Source.patch @@ -0,0 +1,29 @@ +From 3888b107af6ce5721ff40abe2bedcede1893732b Mon Sep 17 00:00:00 2001 +From: Theo Chatzimichos +Date: Tue, 23 Aug 2016 23:49:40 +0200 +Subject: [PATCH 24/25] 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.1 + diff --git a/0025-allow-running-commands-after-patching.patch b/0025-allow-running-commands-after-patching.patch new file mode 100644 index 0000000..f6f8c47 --- /dev/null +++ b/0025-allow-running-commands-after-patching.patch @@ -0,0 +1,44 @@ +From e9601db421071203202ddb0122e8826859238e73 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marcus=20R=C3=BCckert?= +Date: Thu, 10 Nov 2016 15:46:22 +0100 +Subject: [PATCH 25/25] 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.1 + diff --git a/gem2rpm.yml.documentation b/gem2rpm.yml.documentation index 23cf23e..95cf020 100644 --- a/gem2rpm.yml.documentation +++ b/gem2rpm.yml.documentation @@ -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: ..... diff --git a/rubygem-gem2rpm.changes b/rubygem-gem2rpm.changes index ec849e2..2507117 100644 --- a/rubygem-gem2rpm.changes +++ b/rubygem-gem2rpm.changes @@ -1,3 +1,46 @@ +------------------------------------------------------------------- +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 diff --git a/rubygem-gem2rpm.spec b/rubygem-gem2rpm.spec index e59994e..831c346 100644 --- a/rubygem-gem2rpm.spec +++ b/rubygem-gem2rpm.spec @@ -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,31 @@ 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 Summary: Generate rpm specfiles from gems License: GPL-2.0+ Group: Development/Languages/Ruby @@ -76,16 +84,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 +101,14 @@ 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 %build %gem_build @@ -440,6 +455,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 diff --git a/series b/series index 6bff879..fb5bc5a 100644 --- a/series +++ b/series @@ -1,10 +1,25 @@ 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 From 6263cc81dd41b9306da36b48313b6bfd24fa882ee90fcbf492d141db332a0eee Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Thu, 10 Nov 2016 17:20:12 +0000 Subject: [PATCH 2/3] - 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 --- ...os-release-to-use-the-proper-templat.patch | 4 +- ...ig-file-support-to-gem2rpm-in-yaml-f.patch | 4 +- ...plates.-they-require-the-config-file.patch | 4 +- 0004-added-example-gem2rpm.yml.patch | 4 +- ...erly-shorten-description-and-summary.patch | 4 +- ...ense-header-found-in-the-output-file.patch | 4 +- 0007-fixes-for-the-opensuse-template.patch | 4 +- ...t-use-not-.-not-supported-on-1.8-e.g.patch | 4 +- ...e-the-ruby-version-inside-the-subpac.patch | 4 +- ...nfigpackagingsupport-and-fail-gracef.patch | 4 +- ...for-scripts-pre-post-for-subpackages.patch | 4 +- ...yml.documentation-custom_pkgs-instea.patch | 4 +- 0013-Also-tag-LICENSE-MIT-as-docfile.patch | 4 +- 0014-Refactor-into-multiple-lines.patch | 4 +- ...to-the-list-of-license-files-as-well.patch | 4 +- ...add-two-more-ways-to-express-changes.patch | 4 +- 0017-.markdown-is-also-seen-in-the-wild.patch | 4 +- ...-the-extensions-doc-dir-on-MRI-2.1.x.patch | 4 +- ...-solution-for-the-extensions-doc-dir.patch | 4 +- ...1.8-insists-on-the-for-the-parameter.patch | 4 +- ...Fix-company-name-in-copyright-header.patch | 4 +- ...ch-for-build-compare-to-the-template.patch | 4 +- ...so-tag-APACHE-LICENSE-2.0-as-docfile.patch | 4 +- ...y-to-provide-alternative-main-Source.patch | 4 +- ...llow-running-commands-after-patching.patch | 4 +- ...tps-instead-of-http-for-rubygems.org.patch | 39 +++++++++++++++++++ rubygem-gem2rpm.changes | 7 ++++ rubygem-gem2rpm.spec | 2 + series | 1 + 29 files changed, 99 insertions(+), 50 deletions(-) create mode 100644 0026-use-https-instead-of-http-for-rubygems.org.patch diff --git a/0001-use-the-ID-from-os-release-to-use-the-proper-templat.patch b/0001-use-the-ID-from-os-release-to-use-the-proper-templat.patch index 05c8824..abdf3b8 100644 --- a/0001-use-the-ID-from-os-release-to-use-the-proper-templat.patch +++ b/0001-use-the-ID-from-os-release-to-use-the-proper-templat.patch @@ -1,7 +1,7 @@ From 91bc63e3fbba24a5f90c4fce4f74b371c4694657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= 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 diff --git a/0002-added-basic-config-file-support-to-gem2rpm-in-yaml-f.patch b/0002-added-basic-config-file-support-to-gem2rpm-in-yaml-f.patch index 5a01203..f9379bf 100644 --- a/0002-added-basic-config-file-support-to-gem2rpm-in-yaml-f.patch +++ b/0002-added-basic-config-file-support-to-gem2rpm-in-yaml-f.patch @@ -1,7 +1,7 @@ From 1742038eb7ec8fcb25009ce8b270b420183875bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= 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 diff --git a/0003-new-opensuse-templates.-they-require-the-config-file.patch b/0003-new-opensuse-templates.-they-require-the-config-file.patch index ac94eae..bb03f96 100644 --- a/0003-new-opensuse-templates.-they-require-the-config-file.patch +++ b/0003-new-opensuse-templates.-they-require-the-config-file.patch @@ -1,7 +1,7 @@ From 5e1e30e5addc99825b3bf873983ca48732493060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= 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 diff --git a/0004-added-example-gem2rpm.yml.patch b/0004-added-example-gem2rpm.yml.patch index dde7510..4be755e 100644 --- a/0004-added-example-gem2rpm.yml.patch +++ b/0004-added-example-gem2rpm.yml.patch @@ -1,7 +1,7 @@ From f408e57b282cd55d59c1317240ee9e0dc679373c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= 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 diff --git a/0005-properly-shorten-description-and-summary.patch b/0005-properly-shorten-description-and-summary.patch index eef4e80..a1af765 100644 --- a/0005-properly-shorten-description-and-summary.patch +++ b/0005-properly-shorten-description-and-summary.patch @@ -1,7 +1,7 @@ From da07cd470611c3c6b70fc863e2d82a2862a068e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= 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 diff --git a/0006-Preserve-the-license-header-found-in-the-output-file.patch b/0006-Preserve-the-license-header-found-in-the-output-file.patch index ebd755c..9c78346 100644 --- a/0006-Preserve-the-license-header-found-in-the-output-file.patch +++ b/0006-Preserve-the-license-header-found-in-the-output-file.patch @@ -1,7 +1,7 @@ From 0f22d81f982e02523c852521a5b94db657fe6673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= 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 diff --git a/0007-fixes-for-the-opensuse-template.patch b/0007-fixes-for-the-opensuse-template.patch index 45bb1a3..a922256 100644 --- a/0007-fixes-for-the-opensuse-template.patch +++ b/0007-fixes-for-the-opensuse-template.patch @@ -1,7 +1,7 @@ From eed51b54253c303c593d9466ed8ed17523bda3d1 Mon Sep 17 00:00:00 2001 From: Stephan Kulow 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 diff --git a/0008-do-not-use-not-.-not-supported-on-1.8-e.g.patch b/0008-do-not-use-not-.-not-supported-on-1.8-e.g.patch index 179482d..91d5ce5 100644 --- a/0008-do-not-use-not-.-not-supported-on-1.8-e.g.patch +++ b/0008-do-not-use-not-.-not-supported-on-1.8-e.g.patch @@ -1,7 +1,7 @@ From ba7932c7d7bc6a70a45ac6ebb841a9e1bf8bb86b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= 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 diff --git a/0009-No-longer-require-the-ruby-version-inside-the-subpac.patch b/0009-No-longer-require-the-ruby-version-inside-the-subpac.patch index ca14188..62d864d 100644 --- a/0009-No-longer-require-the-ruby-version-inside-the-subpac.patch +++ b/0009-No-longer-require-the-ruby-version-inside-the-subpac.patch @@ -1,7 +1,7 @@ From 13b02a1596a744ed70687dae0ffb465e1979221e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= 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 diff --git a/0010-Try-to-load-rbconfigpackagingsupport-and-fail-gracef.patch b/0010-Try-to-load-rbconfigpackagingsupport-and-fail-gracef.patch index 02e3a7a..cfae31d 100644 --- a/0010-Try-to-load-rbconfigpackagingsupport-and-fail-gracef.patch +++ b/0010-Try-to-load-rbconfigpackagingsupport-and-fail-gracef.patch @@ -1,7 +1,7 @@ From 953ff66677490c78ceff14afc0365f832079333a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= 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 diff --git a/0011-Add-support-for-scripts-pre-post-for-subpackages.patch b/0011-Add-support-for-scripts-pre-post-for-subpackages.patch index c4c4940..c6b553a 100644 --- a/0011-Add-support-for-scripts-pre-post-for-subpackages.patch +++ b/0011-Add-support-for-scripts-pre-post-for-subpackages.patch @@ -1,7 +1,7 @@ From 0ee368bc6c4ea35d233dadbe1f2c7048a99d3dc4 Mon Sep 17 00:00:00 2001 From: Theo chatzimichos 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 diff --git a/0012-typo-in-gem2rpm.yml.documentation-custom_pkgs-instea.patch b/0012-typo-in-gem2rpm.yml.documentation-custom_pkgs-instea.patch index fab69c6..37f589e 100644 --- a/0012-typo-in-gem2rpm.yml.documentation-custom_pkgs-instea.patch +++ b/0012-typo-in-gem2rpm.yml.documentation-custom_pkgs-instea.patch @@ -1,7 +1,7 @@ From 092f7ca4ff1f954dd8982acf7199cd15636e87f3 Mon Sep 17 00:00:00 2001 From: Theo Chatzimichos 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 diff --git a/0013-Also-tag-LICENSE-MIT-as-docfile.patch b/0013-Also-tag-LICENSE-MIT-as-docfile.patch index d0ab582..93465a9 100644 --- a/0013-Also-tag-LICENSE-MIT-as-docfile.patch +++ b/0013-Also-tag-LICENSE-MIT-as-docfile.patch @@ -1,7 +1,7 @@ From dad615aa35cbbe0d7351ea66af44a8548853a2da Mon Sep 17 00:00:00 2001 From: Dirk Mueller 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 diff --git a/0014-Refactor-into-multiple-lines.patch b/0014-Refactor-into-multiple-lines.patch index 7b276f8..4244773 100644 --- a/0014-Refactor-into-multiple-lines.patch +++ b/0014-Refactor-into-multiple-lines.patch @@ -1,7 +1,7 @@ From 5bb494a7d6911754e485f6b729861771181bf2a0 Mon Sep 17 00:00:00 2001 From: Dirk Mueller 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 diff --git a/0015-Add-licence-to-the-list-of-license-files-as-well.patch b/0015-Add-licence-to-the-list-of-license-files-as-well.patch index a150862..50978c3 100644 --- a/0015-Add-licence-to-the-list-of-license-files-as-well.patch +++ b/0015-Add-licence-to-the-list-of-license-files-as-well.patch @@ -1,7 +1,7 @@ From b10341f5c13d71271e195101e46213026f628048 Mon Sep 17 00:00:00 2001 From: Dirk Mueller 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 diff --git a/0016-add-two-more-ways-to-express-changes.patch b/0016-add-two-more-ways-to-express-changes.patch index 75f0e25..94a60da 100644 --- a/0016-add-two-more-ways-to-express-changes.patch +++ b/0016-add-two-more-ways-to-express-changes.patch @@ -1,7 +1,7 @@ From 814a7133ce8ab7271cf0bf31ad6d4de94fec8863 Mon Sep 17 00:00:00 2001 From: Stephan Kulow 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 diff --git a/0017-.markdown-is-also-seen-in-the-wild.patch b/0017-.markdown-is-also-seen-in-the-wild.patch index 556667a..e72fe8b 100644 --- a/0017-.markdown-is-also-seen-in-the-wild.patch +++ b/0017-.markdown-is-also-seen-in-the-wild.patch @@ -1,7 +1,7 @@ From 660fa598f3a78f94f35e1edf10d143dae5db62bb Mon Sep 17 00:00:00 2001 From: Stephan Kulow 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 diff --git a/0018-Only-use-the-extensions-doc-dir-on-MRI-2.1.x.patch b/0018-Only-use-the-extensions-doc-dir-on-MRI-2.1.x.patch index 8967ad3..c9f1c56 100644 --- a/0018-Only-use-the-extensions-doc-dir-on-MRI-2.1.x.patch +++ b/0018-Only-use-the-extensions-doc-dir-on-MRI-2.1.x.patch @@ -1,7 +1,7 @@ From 7a45c828d05304d90b3a202e55acbbcaab5cdac2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= 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 diff --git a/0019-Cleaner-solution-for-the-extensions-doc-dir.patch b/0019-Cleaner-solution-for-the-extensions-doc-dir.patch index 4331f24..ecc5a6f 100644 --- a/0019-Cleaner-solution-for-the-extensions-doc-dir.patch +++ b/0019-Cleaner-solution-for-the-extensions-doc-dir.patch @@ -1,7 +1,7 @@ From 672a0405c2c191280887b4427a759490aa2ce5ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= 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 diff --git a/0020-Ruby-1.8-insists-on-the-for-the-parameter.patch b/0020-Ruby-1.8-insists-on-the-for-the-parameter.patch index 1dbe8f5..c645117 100644 --- a/0020-Ruby-1.8-insists-on-the-for-the-parameter.patch +++ b/0020-Ruby-1.8-insists-on-the-for-the-parameter.patch @@ -1,7 +1,7 @@ From f6ace6130df3a2ea6ca8e987e9675d652940510e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= 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 diff --git a/0021-Fix-company-name-in-copyright-header.patch b/0021-Fix-company-name-in-copyright-header.patch index c4c6265..37edd26 100644 --- a/0021-Fix-company-name-in-copyright-header.patch +++ b/0021-Fix-company-name-in-copyright-header.patch @@ -1,7 +1,7 @@ From 2d02399fc670b648785b10bf7f1510c136e6f981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= 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 diff --git a/0022-add-the-touch-for-build-compare-to-the-template.patch b/0022-add-the-touch-for-build-compare-to-the-template.patch index 937fa45..f3415b6 100644 --- a/0022-add-the-touch-for-build-compare-to-the-template.patch +++ b/0022-add-the-touch-for-build-compare-to-the-template.patch @@ -1,7 +1,7 @@ From f8c0600c659f26d1ec6c9d890a63dd642f741003 Mon Sep 17 00:00:00 2001 From: Stephan Kulow 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 diff --git a/0023-Also-tag-APACHE-LICENSE-2.0-as-docfile.patch b/0023-Also-tag-APACHE-LICENSE-2.0-as-docfile.patch index 0fcafc2..c35c659 100644 --- a/0023-Also-tag-APACHE-LICENSE-2.0-as-docfile.patch +++ b/0023-Also-tag-APACHE-LICENSE-2.0-as-docfile.patch @@ -1,7 +1,7 @@ From ee81c7f09669db9e6898df5bf36ac6c102d0d615 Mon Sep 17 00:00:00 2001 From: Thomas Bechtold 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 diff --git a/0024-add-ability-to-provide-alternative-main-Source.patch b/0024-add-ability-to-provide-alternative-main-Source.patch index 1e5e5a0..b5af448 100644 --- a/0024-add-ability-to-provide-alternative-main-Source.patch +++ b/0024-add-ability-to-provide-alternative-main-Source.patch @@ -1,7 +1,7 @@ From 3888b107af6ce5721ff40abe2bedcede1893732b Mon Sep 17 00:00:00 2001 From: Theo Chatzimichos 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 diff --git a/0025-allow-running-commands-after-patching.patch b/0025-allow-running-commands-after-patching.patch index f6f8c47..07bba89 100644 --- a/0025-allow-running-commands-after-patching.patch +++ b/0025-allow-running-commands-after-patching.patch @@ -1,7 +1,7 @@ From e9601db421071203202ddb0122e8826859238e73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= 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 diff --git a/0026-use-https-instead-of-http-for-rubygems.org.patch b/0026-use-https-instead-of-http-for-rubygems.org.patch new file mode 100644 index 0000000..7d67f16 --- /dev/null +++ b/0026-use-https-instead-of-http-for-rubygems.org.patch @@ -0,0 +1,39 @@ +From 304e55ea06e789e41683351c3eca7e8f20619201 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marcus=20R=C3=BCckert?= +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 + diff --git a/rubygem-gem2rpm.changes b/rubygem-gem2rpm.changes index 2507117..15fad09 100644 --- a/rubygem-gem2rpm.changes +++ b/rubygem-gem2rpm.changes @@ -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 diff --git a/rubygem-gem2rpm.spec b/rubygem-gem2rpm.spec index 831c346..ecd01fb 100644 --- a/rubygem-gem2rpm.spec +++ b/rubygem-gem2rpm.spec @@ -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 diff --git a/series b/series index fb5bc5a..213efdc 100644 --- a/series +++ b/series @@ -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 From 2a145e2095b6d37691c2b62c1b8fa91e1e4a875b554ead917870757c777b39f1 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Thu, 10 Nov 2016 19:04:08 +0000 Subject: [PATCH 3/3] forgot to add the patchfilename OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/rubygem-gem2rpm?expand=0&rev=22 --- rubygem-gem2rpm.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rubygem-gem2rpm.spec b/rubygem-gem2rpm.spec index ecd01fb..34a3794 100644 --- a/rubygem-gem2rpm.spec +++ b/rubygem-gem2rpm.spec @@ -73,7 +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: +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