diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index 530efa9..4b3b431 100644 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -26,7 +26,7 @@ diff --git a/configure.ac b/configure.ac index 028ef7ca3e..cdeff87871 100644 --- a/configure.ac +++ b/configure.ac -@@ -3827,6 +3827,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -3846,6 +3846,13 @@ AC_SUBST(rubyarchhdrdir)dnl AC_SUBST(sitearchhdrdir)dnl AC_SUBST(vendorarchhdrdir)dnl @@ -41,12 +41,12 @@ index 028ef7ca3e..cdeff87871 100644 AS_HELP_STRING([--with-mantype=TYPE], [specify man page type; TYPE is one of man and doc]), [ diff --git a/template/Makefile.in b/template/Makefile.in -index 110071de6a..a83500b5af 100644 +index d7e139c6d4..a0171afdcc 100644 --- a/template/Makefile.in +++ b/template/Makefile.in -@@ -155,6 +155,8 @@ BOOTSTRAPRUBY = @BOOTSTRAPRUBY@ - COROUTINE_H = @X_FIBER_COROUTINE_H@ +@@ -156,6 +156,8 @@ COROUTINE_H = @X_COROUTINE_H@ COROUTINE_OBJ = $(COROUTINE_H:.h=.@OBJEXT@) + COROUTINE_SRC = @X_COROUTINE_SRC@ +OPTIONAL_PRELUDES = @OPTIONAL_PRELUDES@ + diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index d46928a..7d58d96 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -8,10 +8,10 @@ Subject: [PATCH] Allow to configure libruby.so placement. 1 file changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac -index 11fc237552..b77e88fc37 100644 +index d261ea57b5..3c13076b82 100644 --- a/configure.ac +++ b/configure.ac -@@ -3044,6 +3044,11 @@ AS_IF([test ${multiarch+set}], [ +@@ -3063,6 +3063,11 @@ AS_IF([test ${multiarch+set}], [ ]) archlibdir='${libdir}/${arch}' diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index 6c6a968..432564b 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -11,10 +11,10 @@ Subject: [PATCH] Prevent duplicated paths when empty version string is 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac -index 999e2d6d5d..11fc237552 100644 +index c42436c23d..d261ea57b5 100644 --- a/configure.ac +++ b/configure.ac -@@ -3682,7 +3682,8 @@ AS_CASE(["$ruby_version_dir_name"], +@@ -3701,7 +3701,8 @@ AS_CASE(["$ruby_version_dir_name"], ruby_version_dir=/'${ruby_version_dir_name}' if test -z "${ruby_version_dir_name}"; then diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index 3d8a703..18514e5 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -8,10 +8,10 @@ Subject: [PATCH] Always use i386. 1 file changed, 2 insertions(+) diff --git a/configure.ac b/configure.ac -index b77e88fc37..6bba453e3c 100644 +index 3c13076b82..93af30321d 100644 --- a/configure.ac +++ b/configure.ac -@@ -3746,6 +3746,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3765,6 +3765,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index c33a772..0d1050a 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -12,10 +12,10 @@ Subject: [PATCH] Allow to install RubyGems into custom location, outside of 4 files changed, 22 insertions(+) diff --git a/configure.ac b/configure.ac -index 6bba453e3c..028ef7ca3e 100644 +index 93af30321d..bc13397e0e 100644 --- a/configure.ac +++ b/configure.ac -@@ -3718,6 +3718,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -3737,6 +3737,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -26,7 +26,7 @@ index 6bba453e3c..028ef7ca3e 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -3742,6 +3746,7 @@ AC_SUBST(sitearchdir)dnl +@@ -3761,6 +3765,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch index c687edf..8f81c2a 100644 --- a/ruby-2.3.0-ruby_version.patch +++ b/ruby-2.3.0-ruby_version.patch @@ -17,10 +17,10 @@ string. 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/configure.ac b/configure.ac -index 8ea969412f..a00f2b6776 100644 +index 80b137e380..63cd3b4f8b 100644 --- a/configure.ac +++ b/configure.ac -@@ -3633,9 +3633,6 @@ AS_CASE(["$target_os"], +@@ -3652,9 +3652,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -30,7 +30,7 @@ index 8ea969412f..a00f2b6776 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, AS_HELP_STRING([--with-rubyarchprefix=DIR], -@@ -3658,56 +3655,62 @@ AC_ARG_WITH(ridir, +@@ -3677,56 +3674,62 @@ AC_ARG_WITH(ridir, AC_SUBST(ridir) AC_SUBST(RI_BASE_NAME) @@ -120,7 +120,7 @@ index 8ea969412f..a00f2b6776 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) -@@ -3724,6 +3727,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -3743,6 +3746,7 @@ AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl @@ -181,48 +181,40 @@ index d4c110e..d39c9a6 100755 install_recursive($rdocdir, ridatadir, :no_install => rdoc_noinst, :mode => $data_mode) end -- -2.1.0 +2.23.0 -From f8d136f9a46d1fe87eba622ab9665935d05e981b Mon Sep 17 00:00:00 2001 +From 9f0ec0233f618cbb862629816b22491c3df79578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= 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 | 11 ++++++----- - test/rubygems/test_gem.rb | 5 +++-- - 2 files changed, 9 insertions(+), 7 deletions(-) + lib/rubygems/defaults.rb | 9 +++++---- + test/rubygems/test_gem.rb | 5 +++-- + 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb -index 55ca080..75eea2b 100644 +index d4ff4a262c..3f9a5bf590 100644 --- a/lib/rubygems/defaults.rb +++ b/lib/rubygems/defaults.rb -@@ -32,20 +32,20 @@ def self.default_dir +@@ -32,13 +32,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'] ] - elsif RbConfig::CONFIG['rubylibprefix'] + else [ RbConfig::CONFIG['rubylibprefix'], 'gems', - RbConfig::CONFIG['ruby_version'] -+ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] - ] - else - [ - RbConfig::CONFIG['libdir'], - ruby_engine, - 'gems', -- RbConfig::CONFIG['ruby_version'] + RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] ] end -@@ -75,7 +75,8 @@ def self.default_rubygems_dirs +@@ -75,7 +75,8 @@ def self.default_specifications_dir def self.user_dir parts = [Gem.user_home, '.gem', ruby_engine] @@ -232,7 +224,7 @@ index 55ca080..75eea2b 100644 File.join parts end -@@ -165,7 +166,7 @@ def self.vendor_dir # :nodoc: +@@ -158,7 +159,7 @@ def self.vendor_dir # :nodoc: return nil unless RbConfig::CONFIG.key? 'vendordir' File.join RbConfig::CONFIG['vendordir'], 'gems', @@ -242,10 +234,10 @@ index 55ca080..75eea2b 100644 ## diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb -index 0428bea..b6e090e 100644 +index b25068405d..e9fef4a311 100644 --- a/test/rubygems/test_gem.rb +++ b/test/rubygems/test_gem.rb -@@ -1279,7 +1279,8 @@ def test_self_use_paths +@@ -1315,7 +1315,8 @@ def test_self_use_paths def test_self_user_dir parts = [@userhome, '.gem', Gem.ruby_engine] @@ -255,7 +247,7 @@ index 0428bea..b6e090e 100644 assert_equal File.join(parts), Gem.user_dir end -@@ -1355,7 +1356,7 @@ def test_self_vendor_dir +@@ -1391,7 +1392,7 @@ def test_self_vendor_dir vendordir(File.join(@tempdir, 'vendor')) do expected = File.join RbConfig::CONFIG['vendordir'], 'gems', diff --git a/ruby-2.7.0-Remove-RubyGems-dependency.patch b/ruby-2.7.0-Remove-RubyGems-dependency.patch new file mode 100644 index 0000000..525bb07 --- /dev/null +++ b/ruby-2.7.0-Remove-RubyGems-dependency.patch @@ -0,0 +1,32 @@ +From 6532dbecf36d1f24dab1f2143afd171e0b7699eb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Wed, 4 Sep 2019 15:07:07 +0200 +Subject: [PATCH] Remove RubyGems dependency. + +Since `Process::RLIMIT_NOFILE` is platform specific, better to use Ruby +introspection than detecting platform. +--- + lib/net/http/persistent.rb | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb b/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +index a54be2a..06739f1 100644 +--- a/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb ++++ b/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +@@ -202,10 +202,10 @@ class Net::HTTP::Persistent + ## + # The default connection pool size is 1/4 the allowed open files. + +- if Gem.win_platform? then +- DEFAULT_POOL_SIZE = 256 +- else ++ if Process.const_defined? :RLIMIT_NOFILE + DEFAULT_POOL_SIZE = Process.getrlimit(Process::RLIMIT_NOFILE).first / 4 ++ else ++ DEFAULT_POOL_SIZE = 256 + end + + ## +-- +2.23.0 + diff --git a/ruby.spec b/ruby.spec index 1eef6e9..1aa9cf4 100644 --- a/ruby.spec +++ b/ruby.spec @@ -10,7 +10,7 @@ #%%global milestone rc2 # Keep the revision enabled for pre-releases from SVN. -%global revision 0c6c937904 +%global revision 36a0c668b6 %global ruby_archive %{name}-%{ruby_version} @@ -39,22 +39,22 @@ # version (if it's going to be bundled). %global bundler_fileutils_version 1.2.0 %global bundler_molinillo_version 0.6.6 -%global bundler_net_http_persistent_version 2.9.4 +%global bundler_net_http_persistent_version 3.1.0 %global bundler_thor_version 0.20.3 %global bigdecimal_version 1.4.2 %global did_you_mean_version 1.3.0 -%global io_console_version 0.4.7 -%global irb_version 1.1.0.pre.2 +%global io_console_version 0.4.9 +%global irb_version 1.1.0.pre.3 %global json_version 2.2.0 %global minitest_version 5.11.3 %global net_telnet_version 0.2.0 %global openssl_version 2.1.2 -%global power_assert_version 1.1.4 +%global power_assert_version 1.1.5 %global psych_version 3.1.0 %global racc_version 1.4.16.pre.1 -%global rake_version 12.3.2 -%global rdoc_version 6.1.1 +%global rake_version 12.3.3 +%global rdoc_version 6.2.0 %global test_unit_version 3.3.3 %global xmlrpc_version 0.3.0 @@ -141,6 +141,9 @@ Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch # hardening features of glibc (rhbz#1361037). # https://bugs.ruby-lang.org/issues/12666 Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch +# Revert commit which breaks bundled net-http-persistent version check. +# https://github.com/drbrain/net-http-persistent/pull/109 +Patch10: ruby-2.7.0-Remove-RubyGems-dependency.patch # Add support for .include directive used by OpenSSL config files. # https://github.com/ruby/openssl/pull/216 @@ -547,6 +550,7 @@ rm -rf ext/fiddle/libffi* %patch6 -p1 %patch7 -p1 %patch9 -p1 +%patch10 -p1 %patch22 -p1 # Provide an example of usage of the tapset: @@ -1075,8 +1079,8 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/specifications/default/mutex_m-0.1.0.gemspec %{gem_dir}/specifications/default/ostruct-0.1.0.gemspec %{gem_dir}/specifications/default/prime-0.1.0.gemspec -%{gem_dir}/specifications/default/reline-0.0.1.gemspec -%{gem_dir}/specifications/default/rexml-3.1.9.gemspec +%{gem_dir}/specifications/default/reline-0.0.2.gemspec +%{gem_dir}/specifications/default/rexml-3.2.2.gemspec %{gem_dir}/specifications/default/rss-0.2.8.gemspec %{gem_dir}/specifications/default/scanf-1.0.0.gemspec %{gem_dir}/specifications/default/sdbm-1.0.0.gemspec @@ -1211,7 +1215,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %changelog * Mon Jul 01 2019 Vít Ondruch - 2.7.0-1 -- Upgrade to Ruby 2.7.0 (0c6c937904). +- Upgrade to Ruby 2.7.0 (36a0c668b6). - Drop useless %%{rubygems_default_filter}. - Fix checksec 2.0+ compatibility.