diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch index e4ea396..e460873 100644 --- a/ruby-2.3.0-ruby_version.patch +++ b/ruby-2.3.0-ruby_version.patch @@ -4,46 +4,39 @@ Date: Tue, 31 Mar 2015 16:37:44 +0200 Subject: [PATCH 3/4] Add ruby_version_dir_name support for RubyGems. --- - lib/rubygems/defaults.rb | 9 +++++---- + lib/rubygems/defaults.rb | 7 ++++--- test/rubygems/test_gem.rb | 5 +++-- - 2 files changed, 8 insertions(+), 6 deletions(-) + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb index d4ff4a262c..3f9a5bf590 100644 --- a/lib/rubygems/defaults.rb +++ b/lib/rubygems/defaults.rb -@@ -38,13 +38,13 @@ def self.default_dir - [ - File.dirname(RbConfig::CONFIG['sitedir']), - 'Gems', -- RbConfig::CONFIG['ruby_version'], -+ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] - ] - else - [ - RbConfig::CONFIG['rubylibprefix'], - 'gems', -- RbConfig::CONFIG['ruby_version'], -+ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] - ] - end +@@ -34,7 +34,7 @@ def self.default_spec_cache_dir + # specified in the environment -@@ -117,7 +117,8 @@ def self.user_dir + def self.default_dir +- @default_dir ||= File.join(RbConfig::CONFIG["rubylibprefix"], "gems", RbConfig::CONFIG["ruby_version"]) ++ @default_dir ||= File.join(RbConfig::CONFIG["rubylibprefix"], "gems", RbConfig::CONFIG["ruby_version_dir_name"] || RbConfig::CONFIG["ruby_version"]) + end + + ## +@@ -103,7 +103,8 @@ def self.user_dir gem_dir = File.join(Gem.user_home, ".gem") gem_dir = File.join(Gem.data_home, "gem") unless File.exist?(gem_dir) parts = [gem_dir, ruby_engine] -- parts << RbConfig::CONFIG['ruby_version'] unless RbConfig::CONFIG['ruby_version'].empty? -+ ruby_version_dir_name = RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] +- parts << RbConfig::CONFIG["ruby_version"] unless RbConfig::CONFIG["ruby_version"].empty? ++ ruby_version_dir_name = RbConfig::CONFIG["ruby_version_dir_name"] || RbConfig::CONFIG["ruby_version"] + parts << ruby_version_dir_name unless ruby_version_dir_name.empty? File.join parts end -@@ -252,7 +253,7 @@ def self.vendor_dir # :nodoc: - return nil unless RbConfig::CONFIG.key? 'vendordir' +@@ -234,7 +235,7 @@ def self.vendor_dir # :nodoc: + return nil unless RbConfig::CONFIG.key? "vendordir" - File.join RbConfig::CONFIG['vendordir'], 'gems', -- RbConfig::CONFIG['ruby_version'] -+ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] + File.join RbConfig::CONFIG["vendordir"], "gems", +- RbConfig::CONFIG["ruby_version"] ++ RbConfig::CONFIG["ruby_version_dir_name"] || RbConfig::CONFIG["ruby_version"] end ## @@ -51,24 +44,25 @@ diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb index b25068405d..e9fef4a311 100644 --- a/test/rubygems/test_gem.rb +++ b/test/rubygems/test_gem.rb -@@ -1452,7 +1452,8 @@ def test_self_use_paths +@@ -1395,7 +1395,8 @@ def test_self_use_paths def test_self_user_dir - parts = [@userhome, '.gem', Gem.ruby_engine] -- parts << RbConfig::CONFIG['ruby_version'] unless RbConfig::CONFIG['ruby_version'].empty? -+ ruby_version_dir_name = RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] + parts = [@userhome, ".gem", Gem.ruby_engine] +- parts << RbConfig::CONFIG["ruby_version"] unless RbConfig::CONFIG["ruby_version"].empty? ++ ruby_version_dir_name = RbConfig::CONFIG["ruby_version_dir_name"] || RbConfig::CONFIG["ruby_version"] + parts << ruby_version_dir_name unless ruby_version_dir_name.empty? FileUtils.mkdir_p File.join(parts) -@@ -1530,7 +1531,7 @@ def test_self_vendor_dir - vendordir(File.join(@tempdir, 'vendor')) do +@@ -1471,7 +1472,7 @@ def test_self_vendor_dir + vendordir(File.join(@tempdir, "vendor")) do expected = - File.join RbConfig::CONFIG['vendordir'], 'gems', -- RbConfig::CONFIG['ruby_version'] -+ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] + File.join RbConfig::CONFIG["vendordir"], "gems", +- RbConfig::CONFIG["ruby_version"] ++ RbConfig::CONFIG["ruby_version_dir_name"] || RbConfig::CONFIG["ruby_version"] assert_equal expected, Gem.vendor_dir end -- 2.1.0 + diff --git a/rubygems-3.1.3-Avoid-Bundler-installation.patch b/rubygems-3.1.3-Avoid-Bundler-installation.patch index 18939e6..55edaf0 100644 --- a/rubygems-3.1.3-Avoid-Bundler-installation.patch +++ b/rubygems-3.1.3-Avoid-Bundler-installation.patch @@ -2,7 +2,7 @@ diff --git a/setup.rb b/setup.rb index 16ffa7215..49f6bfca5 100644 --- a/setup.rb +++ b/setup.rb -@@ -26,6 +26,12 @@ require 'rubygems/exceptions' +@@ -24,6 +24,12 @@ require 'rubygems/exceptions' Gem::CommandManager.instance.register_command :setup @@ -14,4 +14,4 @@ index 16ffa7215..49f6bfca5 100644 + args = ARGV.clone if ENV["GEM_PREV_VER"] - args = [ '--previous-version', ENV["GEM_PREV_VER"] ] + args + args = [ "--previous-version", ENV["GEM_PREV_VER"] ] + args diff --git a/rubygems-3.2.14-Allow-to-run-test-suite-from-release-tarball.patch b/rubygems-3.2.14-Allow-to-run-test-suite-from-release-tarball.patch deleted file mode 100644 index 161d189..0000000 --- a/rubygems-3.2.14-Allow-to-run-test-suite-from-release-tarball.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 5c42ecf4457f7db4194ded5a64d48754752fc03f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Wed, 10 Mar 2021 16:53:26 +0100 -Subject: [PATCH] Allow to run test suite from release tarball. - -Just skip the Automatie if not avialable. It is not essential to run the -test suite. - -Fixes #4430 ---- - Rakefile | 24 ++++++++++++++---------- - 1 file changed, 14 insertions(+), 10 deletions(-) - -diff --git a/Rakefile b/Rakefile -index 8b1164559..393f65954 100644 ---- a/Rakefile -+++ b/Rakefile -@@ -58,16 +58,20 @@ RDoc::Task.new :rdoc => 'docs', :clobber_rdoc => 'clobber_docs' do |doc| - doc.rdoc_dir = 'doc' - end - --load "util/automatiek.rake" -- --# We currently ship Molinillo master branch as of --# https://github.com/CocoaPods/Molinillo/commit/7cc27a355e861bdf593e2cde7bf1bca3daae4303 --Automatiek::RakeTask.new("molinillo") do |lib| -- lib.version = "master" -- lib.download = { :github => "https://github.com/CocoaPods/Molinillo" } -- lib.namespace = "Molinillo" -- lib.prefix = "Gem::Resolver" -- lib.vendor_lib = "lib/rubygems/resolver/molinillo" -+begin -+ load "util/automatiek.rake" -+ -+ # We currently ship Molinillo master branch as of -+ # https://github.com/CocoaPods/Molinillo/commit/7cc27a355e861bdf593e2cde7bf1bca3daae4303 -+ Automatiek::RakeTask.new("molinillo") do |lib| -+ lib.version = "master" -+ lib.download = { :github => "https://github.com/CocoaPods/Molinillo" } -+ lib.namespace = "Molinillo" -+ lib.prefix = "Gem::Resolver" -+ lib.vendor_lib = "lib/rubygems/resolver/molinillo" -+ end -+rescue LoadError -+ # `rake` is likely executed from released tarball. Just ignore the issue. - end - - namespace :rubocop do --- -2.30.0 - diff --git a/rubygems.spec b/rubygems.spec index b1451ae..44636f8 100644 --- a/rubygems.spec +++ b/rubygems.spec @@ -4,9 +4,12 @@ # Bundled libraries versions %global molinillo_version 0.7.0 +%global optparse_version 0.2.0 +# TODO: Check the version if/when available in library. +%global tsort_version 0.1.0 # Requires versions -%global bundler_version 2.2.14 +%global bundler_version 2.3.25 %global io_console_version 0.5.6 %global openssl_version 2.2.0 %global psych_version 3.3.0 @@ -32,9 +35,12 @@ Summary: The Ruby standard for packaging ruby libraries Name: rubygems -Version: 3.2.14 -Release: 200%{?dist} -License: Ruby or MIT +Version: 3.3.25 +Release: 207%{?dist} +# BSD-2-Clause: lib/rubygems/tsort/ +# BSD-2-Clause OR RUBY: lib/rubygems/optparse/ +# MIT: lib/rubygems/resolver/molinillo +License: (Ruby OR MIT) AND BSD-2-Clause AND (BSD-2-Clause OR RUBY) AND MIT URL: https://rubygems.org/ Source0: https://rubygems.org/rubygems/%{name}-%{version}.tgz @@ -57,10 +63,6 @@ Patch0: ruby-2.3.0-ruby_version.patch # independent package, therefore just ignore the installation altogether. # https://github.com/rubygems/rubygems/issues/3604 Patch1: rubygems-3.1.3-Avoid-Bundler-installation.patch -# Remove unnecessary dependencies from Rakefile to make it usable to execute -# the test suite. -# https://github.com/rubygems/rubygems/pull/4447 -Patch2: rubygems-3.2.14-Allow-to-run-test-suite-from-release-tarball.patch Requires: ruby(release) @@ -71,15 +73,13 @@ Requires: rubygem(openssl) >= %{openssl_version} Requires: rubygem(psych) >= %{psych_version} BuildRequires: ruby(release) BuildRequires: rubygems-devel -BuildRequires: rubygem(rdoc) %if %{without bootstrap} # For mkmf.rb BuildRequires: ruby-devel -BuildRequires: rubygem(minitest) +BuildRequires: rubygem(test-unit) BuildRequires: %{_bindir}/cmake BuildRequires: %{_bindir}/git BuildRequires: %{_bindir}/gcc -BuildRequires: rubygem(builder) BuildRequires: rubygem(rake) BuildRequires: rubygem(webrick) %endif @@ -105,9 +105,8 @@ Documentation for %{name}. %prep %setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 +%patch 0 -p1 +%patch 1 -p1 %build # Nothing @@ -163,31 +162,36 @@ rm -vr %{buildroot}%{rubygems_dir}/bundler* mkdir -p lib/rubygems/defaults touch lib/rubygems/defaults/operating_system.rb -# It is necessary to specify the paths to let the test suite pass." -export GEM_PATH=%{gem_dir} +# Check Bundler version. +[ "`RUBYOPT=-Ibundler/lib ruby -rbundler/version -e 'puts Bundler::VERSION'| tail -1`" \ + == '%{bundler_version}' ] # Check Molinillo version correctness. [ "`RUBYOPT=-Ilib ruby -e 'module Gem; class Resolver; end; end; require %{rubygems/resolver/molinillo/lib/molinillo/gem_metadata}; puts Gem::Resolver::Molinillo::VERSION' | tail -1`" \ == '%{molinillo_version}' ] -# Check Bundler version. -[ "`RUBYOPT=-Ibundler/lib ruby -rbundler/version -e 'puts Bundler::VERSION'| tail -1`" \ - == '%{bundler_version}' ] - +# Check optparse version correctness. +[ "`RUBYOPT=-Ilib ruby -e 'require %{rubygems/optparse/lib/optparse}; puts Gem::OptionParser::Version' | tail -1`" \ + == '%{optparse_version}' ] %if %{without bootstrap} # util directory with changelog generator are not shipped in release archive. mv test/test_changelog_generator.rb{,.disabled} -# TestProjectSanity#test_manifest_is_up_to_date is of no interest and it -# expects to work in git repository. -# TestGemExtExtConfBuilder#test_class_(build_rbconfig_make_prog|build|build_env_make) -# are failing, because they cannot locate `gem.build_complete` file. -# https://github.com/rubygems/rubygems/pull/4440 +# Put all required libraries on the `$LOAD_PATH`, where the original Ruby +# `require` can find them. This prevents the RubyGems load machinery from +# running and failing to find `gem.build_complete` files for sytem packages +# and therefore raising warnings such as: "Ignoring json-2.5.1 because its +# extensions are not built. Try: gem pristine json --version 2.5.1". +# https://github.com/rubygems/rubygems/pull/4446 +export RUBYOPT="-I$(ruby -e 'size = $LOAD_PATH.size; %w(rake test-unit rdoc webrick).each {|r| require r}; puts $LOAD_PATH[...-size].join ?:')" + +# Rakefile is not shipped anymore => emulate its content. +# https://github.com/rubygems/rubygems/blob/v3.3.22/Rakefile#L56-L64 # The `test_realworld_{default_gem,upgraded_default_gem}` needs the same -# treatment as the have in Ruby repository. +# treatment as the have in Ruby repository. Use `GEM_COMMAND` to skip them. GEM_COMMAND="skip test_realworld_{default_gem,upgraded_default_gem}" \ - rake TESTOPTS='- -v "-e /test_(manifest_is_up_to_date|class_(build_rbconfig_make_prog|build|build_env_make))/"' + ruby -Itest:bundler/lib:lib -e 'Dir.glob "./test/**/test_*.rb", &method(:require)' - \ # CVE vulnerability check ruby %{SOURCE11} @@ -207,6 +211,11 @@ ruby %{SOURCE12} %dir %{rubygems_dir} %{rubygems_dir}/rubygems %{rubygems_dir}/rubygems.rb +%exclude %{rubygems_dir}/rubygems/optparse/.* +%license %{rubygems_dir}/rubygems/optparse/COPYING +%license %{rubygems_dir}/rubygems/resolver/molinillo/LICENSE +%exclude %{rubygems_dir}/rubygems/tsort/.* +%license %{rubygems_dir}/rubygems/tsort/LICENSE.txt # Explicitly include only RubyGems directory strucure to avoid accidentally # packaged content. @@ -227,6 +236,45 @@ ruby %{SOURCE12} %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 3.3.25-207 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Sun Jan 19 2025 Fedora Release Engineering - 3.3.25-206 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Fri Jul 19 2024 Fedora Release Engineering - 3.3.25-205 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Fri Jan 26 2024 Fedora Release Engineering - 3.3.25-204 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jul 21 2023 Fedora Release Engineering - 3.3.25-203 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Jan 20 2023 Fedora Release Engineering - 3.3.25-202 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Nov 03 2022 Jun Aruga - 3.3.25-201 +- Update to RubyGems 3.3.25. + Resolves: rhbz#2132563 + +* Thu Sep 08 2022 Vít Ondruch - 3.3.22-201 +- Update to RubyGems 3.3.22. + Resolves: rhbz#1941091 + Resolves: rhbz#2046966 + +* Sat Jul 23 2022 Fedora Release Engineering - 3.2.14-204 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Fri Jan 21 2022 Fedora Release Engineering - 3.2.14-203 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 3.2.14-202 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Thu Mar 11 2021 Vít Ondruch - 3.2.14-201 +- Enable additional test cases with Ruby load path setup correctly. + * Fri Mar 05 2021 Vít Ondruch - 3.2.14-200 - Update to RubyGems 3.2.14. Resolves: rhbz#1905813 diff --git a/sources b/sources index 9bbf4c2..8eb1dc0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rubygems-3.2.14.tgz) = de28bdfdc239cd49bb5a1f78f0a9e3ec432fb70c8326c7899f7ef0a088f60becd99ba81285b20388296f96afb46ca3ca359208621d88a6be68b7388d155a2383 +SHA512 (rubygems-3.3.25.tgz) = 0ec39f4110c0ae21b3a2acb97e78220a429b3340a1498d48e663e98ebdc16123cc99b455474bc43d116a6b7c967340aebd77d93c13edcb3f9112e6614759216a