From e5acbf567c3d367de2625ff07b5e4dc0637f0cb1 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 25 2021 12:19:27 +0000 Subject: import rh-ruby25-ruby-2.5.9-9.el7 --- diff --git a/.gitignore b/.gitignore index 162477a..da44e6e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/ruby-2.5.5.tar.xz +SOURCES/ruby-2.5.9.tar.xz diff --git a/.rh-ruby25-ruby.metadata b/.rh-ruby25-ruby.metadata index eb0720e..a9edca5 100644 --- a/.rh-ruby25-ruby.metadata +++ b/.rh-ruby25-ruby.metadata @@ -1 +1 @@ -85cee62e47f0707808ff3d7cb68b6cd075a65509 SOURCES/ruby-2.5.5.tar.xz +7be8dc2e6e534eb36bfdf9f017af512996ec99a6 SOURCES/ruby-2.5.9.tar.xz diff --git a/SOURCES/ruby-2.1.0-custom-rubygems-location.patch b/SOURCES/ruby-2.1.0-custom-rubygems-location.patch index 4b54560..5ebe1ce 100644 --- a/SOURCES/ruby-2.1.0-custom-rubygems-location.patch +++ b/SOURCES/ruby-2.1.0-custom-rubygems-location.patch @@ -67,15 +67,15 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index b47b6e1..0b99408 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -331,6 +331,7 @@ def CONFIG.[](name, mandatory = false) - sitearchlibdir = CONFIG["sitearchdir"] - vendorlibdir = CONFIG["vendorlibdir"] - vendorarchlibdir = CONFIG["vendorarchdir"] +@@ -335,6 +335,7 @@ def CONFIG.[](name, mandatory = false) + vendorlibdir = CONFIG["vendorlibdir"] + vendorarchlibdir = CONFIG["vendorarchdir"] + end +rubygemsdir = CONFIG["rubygemsdir"] mandir = CONFIG["mandir", true] docdir = CONFIG["docdir", true] configure_args = Shellwords.shellwords(CONFIG["configure_args"]) -@@ -537,7 +538,13 @@ def install(src, cmd) +@@ -541,7 +542,13 @@ def install(src, cmd) install?(:local, :comm, :lib) do prepare "library scripts", rubylibdir noinst = %w[*.txt *.rdoc *.gemspec] diff --git a/SOURCES/ruby-2.3.0-ruby_version.patch b/SOURCES/ruby-2.3.0-ruby_version.patch index 30370e1..7cc747f 100644 --- a/SOURCES/ruby-2.3.0-ruby_version.patch +++ b/SOURCES/ruby-2.3.0-ruby_version.patch @@ -171,7 +171,7 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index d4c110e..d39c9a6 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -417,7 +417,7 @@ def CONFIG.[](name, mandatory = false) +@@ -421,7 +421,7 @@ def CONFIG.[](name, mandatory = false) install?(:doc, :rdoc) do if $rdocdir diff --git a/SOURCES/ruby-2.5.9-revert-stop-the-error-due-to-openssl-1-1-1h.patch b/SOURCES/ruby-2.5.9-revert-stop-the-error-due-to-openssl-1-1-1h.patch new file mode 100644 index 0000000..6b882a0 --- /dev/null +++ b/SOURCES/ruby-2.5.9-revert-stop-the-error-due-to-openssl-1-1-1h.patch @@ -0,0 +1,46 @@ +From 93e6364a848f00b34647b13063dceb854dfaa11e Mon Sep 17 00:00:00 2001 +From: usa +Date: Wed, 28 Oct 2020 13:12:06 +0000 +Subject: [PATCH] merge revision(s): 07786ed + + * test/net/http/test_https.rb: Stop the error due to openssl 1.1.1h + + On some environments that uses OpenSSL 1.1.1h, the two tests now fail. + + http://rubyci.s3.amazonaws.com/android29-x86_64/ruby-master/log/20200924T062352Z.fail.html.gz + https://github.com/ruby/ruby/runs/1159288773?check_suite_focus=true + + ``` + 1) Failure: + TestNetHTTPS#test_get [/data/data/com.termux/files/home/cb/tmp/build/202 00924T062352Z/ruby/test/net/http/test_https.rb:47]: + <"0\x82\x03\xED0\x82\x02\xD5\xA0\x03..."> expected but was + <"0\x82\x03\xE30\x82\x02\xCB\xA0\x03...">. + ``` + + Not sure why, but verify_callback now seems to receive only SERVER_CERT + but not CA_CERT. + It would be good to investigate the issue furthermore, but tentatively, + I want to stop the failures. + + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@67887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + test/net/http/test_https.rb | 6 ++++-- + +diff --git a/test/net/http/test_https.rb b/test/net/http/test_https.rb +index c1d486470ae2..3a2341024121 100644 +--- a/test/net/http/test_https.rb ++++ b/test/net/http/test_https.rb +@@ -44,8 +44,10 @@ def test_get + http.request_get("/") {|res| + assert_equal($test_net_http_data, res.body) + } +- assert_equal(CA_CERT.to_der, certs[0].to_der) +- assert_equal(SERVER_CERT.to_der, certs[1].to_der) ++ # TODO: OpenSSL 1.1.1h seems to yield only SERVER_CERT; need to check the incompatibility ++ certs.zip([SERVER_CERT, CA_CERT]) do |actual, expected| ++ assert_equal(expected.to_der, actual.to_der) ++ end + rescue SystemCallError + skip $! + end diff --git a/SOURCES/ruby-2.6.0-rdoc-6.0.1-fix-template-typo.patch b/SOURCES/ruby-2.6.0-rdoc-6.0.1-fix-template-typo.patch deleted file mode 100644 index e108270..0000000 --- a/SOURCES/ruby-2.6.0-rdoc-6.0.1-fix-template-typo.patch +++ /dev/null @@ -1,34 +0,0 @@ -From d05e6269d4a4dfd701f5ddb3ae34306cba891511 Mon Sep 17 00:00:00 2001 -From: Jun Aruga -Date: Fri, 3 Aug 2018 11:35:55 +0200 -Subject: [PATCH] Fix indent and typo from moveTimout to moveTimeout. - ---- - lib/rdoc/generator/template/json_index/js/navigation.js | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -diff --git a/lib/rdoc/generator/template/json_index/js/navigation.js b/lib/rdoc/generator/template/json_index/js/navigation.js -index e4126812..43c5118a 100644 ---- a/lib/rdoc/generator/template/json_index/js/navigation.js -+++ b/lib/rdoc/generator/template/json_index/js/navigation.js -@@ -59,9 +59,8 @@ Navigation = new function() { - } - break; - case 13: //Event.KEY_RETURN: -- if (this.$current) -- e.preventDefault(); -- this.select(this.$current); -+ if (this.$current) e.preventDefault(); -+ this.select(this.$current); - break; - } - if (e.ctrlKey && e.shiftKey) this.select(this.$current); -@@ -80,7 +79,7 @@ Navigation = new function() { - var go = function() { - if (!_this.moveTimeout) return; - _this[isDown ? 'moveDown' : 'moveUp'](); -- _this.moveTimout = setTimeout(go, 100); -+ _this.moveTimeout = setTimeout(go, 100); - } - this.moveTimeout = setTimeout(go, 200); - } diff --git a/SOURCES/ruby-2.6.0-rescue-on-EISDIR-in-test_open_tempfile_path.patch b/SOURCES/ruby-2.6.0-rescue-on-EISDIR-in-test_open_tempfile_path.patch index dc08082..2a5692e 100644 --- a/SOURCES/ruby-2.6.0-rescue-on-EISDIR-in-test_open_tempfile_path.patch +++ b/SOURCES/ruby-2.6.0-rescue-on-EISDIR-in-test_open_tempfile_path.patch @@ -15,7 +15,7 @@ diff --git a/test/ruby/test_file.rb b/test/ruby/test_file.rb index 89757287d194..5e9574cf32e3 100644 --- a/test/ruby/test_file.rb +++ b/test/ruby/test_file.rb -@@ -504,6 +504,8 @@ def test_open_tempfile_path +@@ -502,6 +502,8 @@ def test_open_tempfile_path io = File.open(tmpdir, File::RDWR | File::TMPFILE) rescue Errno::EINVAL skip 'O_TMPFILE not supported (EINVAL)' diff --git a/SOURCES/ruby-3.0.0-Convert-ip-addresses-to-canonical-form.patch b/SOURCES/ruby-3.0.0-Convert-ip-addresses-to-canonical-form.patch new file mode 100644 index 0000000..bb95ea1 --- /dev/null +++ b/SOURCES/ruby-3.0.0-Convert-ip-addresses-to-canonical-form.patch @@ -0,0 +1,26 @@ +From 2becb920e431110c4afc4fa069b051c5940c2096 Mon Sep 17 00:00:00 2001 +From: Jeremy Evans +Date: Fri, 29 May 2020 14:13:30 -0700 +Subject: [PATCH] Convert ip addresses to canonical form in + Resolv::DNS::Requester::UnconnectedUDP#sender + +Otherwise, if the IP address given is not in canonical form, it +won't match, and Resolv will ignore it. + +Fixes [Bug #16439] +--- + lib/resolv.rb | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/resolv.rb b/lib/resolv.rb +index e7b45e785a85..d78531e174fd 100644 +--- a/lib/resolv.rb ++++ b/lib/resolv.rb +@@ -774,6 +774,7 @@ def recv_reply(readable_socks) + end + + def sender(msg, data, host, port=Port) ++ host = Addrinfo.ip(host).ip_address + lazy_initialize + sock = @socks_hash[host.index(':') ? "::" : "0.0.0.0"] + return nil if !sock diff --git a/SPECS/ruby.spec b/SPECS/ruby.spec index 5417868..4bb4244 100644 --- a/SPECS/ruby.spec +++ b/SPECS/ruby.spec @@ -3,7 +3,7 @@ %global major_version 2 %global minor_version 5 -%global teeny_version 5 +%global teeny_version 9 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -24,7 +24,7 @@ %endif -%global release 8 +%global release 9 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory tree, since the @@ -32,7 +32,7 @@ %global rubygems_dir %{_datadir}/rubygems # Bundled libraries versions -%global rubygems_version 2.7.6.2 +%global rubygems_version 2.7.6.3 %global molinillo_version 0.5.7 # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. @@ -48,8 +48,8 @@ %global openssl_version 2.1.2 %global power_assert_version 1.1.1 %global psych_version 3.0.2 -%global rake_version 12.3.0 -%global rdoc_version 6.0.1 +%global rake_version 12.3.3 +%global rdoc_version 6.0.1.1 %global test_unit_version 3.2.7 %global xmlrpc_version 0.3.0 @@ -148,12 +148,17 @@ Patch10: ruby-2.5.0-Add-Gem.operating_system_defaults.patch # Properly harden package using -fstack-protector-strong. # https://bugs.ruby-lang.org/issues/15053 Patch12: ruby-2.6.0-configure-fstack-protector-strong.patch -# Fix generated rdoc template issues. -# https://github.com/ruby/rdoc/commit/d05e6269d4a4dfd701f5ddb3ae34306cba891511 -Patch13: ruby-2.6.0-rdoc-6.0.1-fix-template-typo.patch # Fix failing test_open_tempfile_path test case (skip on EISDIR exception). # https://github.com/ruby/ruby/commit/785ace12f903cfae848ea38d7b8a0cb3439379f3 Patch14: ruby-2.6.0-rescue-on-EISDIR-in-test_open_tempfile_path.patch +# Revert: Stop the error due to openssl 1.1.1h, which causes an error in Ruby 2.5. +# The commit fixes test compatibility with OpenSSL 1.1.1h, but we have OpenSSL 1.1.1g. +# https://github.com/ruby/ruby/commit/93e6364a848f00b34647b13063dceb854dfaa11e. +Patch15: ruby-2.5.9-revert-stop-the-error-due-to-openssl-1-1-1h.patch +# Resolv::DNS: timeouts if multiple IPv6 name servers are given and address +# contains leading zero +# https://bugzilla.redhat.com/show_bug.cgi?id=1953001 +Patch16: ruby-3.0.0-Convert-ip-addresses-to-canonical-form.patch Requires: %{?scl_prefix}%{pkg_name}-libs%{?_isa} = %{version}-%{release} Requires: %{?scl_prefix}ruby(rubygems) >= %{rubygems_version} @@ -187,6 +192,7 @@ Requires: %{?scl_prefix}rubygem(rdoc) >= %{rdoc_version} # Requires: %%{?scl_prefix}rubygem(strscan) >= %%{strscan_version} # Requires: %%{?scl_prefix}rubygem(webrick) >= %%{webrick_version} # Requires: %%{?scl_prefix}rubygem(zlib) >= %%{zlib_version} + BuildRequires: autoconf BuildRequires: gdbm-devel BuildRequires: libffi-devel @@ -545,8 +551,7 @@ rm -rf ext/fiddle/libffi* # Remove file with non-commercial license # https://bugzilla.redhat.com/show_bug.cgi?id=1846113 -rm -f gems/did_you_mean-1.2.0/evaluation/incorrect_words.yaml -sed -i 's/"evaluation\/incorrect_words.yaml", //' \ +sed -i 's/"evaluation\/incorrect_words.yaml"\.freeze, //' \ gems/did_you_mean-1.2.0/did_you_mean.gemspec @@ -561,8 +566,9 @@ sed -i 's/"evaluation\/incorrect_words.yaml", //' \ %patch9 -p1 %patch10 -p1 %patch12 -p1 -%patch13 -p1 %patch14 -p1 +%patch15 -p1 -R +%patch16 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -617,13 +623,13 @@ install -m644 %{SOURCE7} %{buildroot}%{_includedir}/%{pkg_name}/config.h sed -i 's/Version: \${ruby_version}/Version: %{ruby_version}/' %{buildroot}%{_libdir}/pkgconfig/%{pkg_name}.pc # Kill bundled certificates, as they should be part of ca-certificates. +# This can fail because certificates can be in the same directory. for cert in \ - rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem \ - rubygems.org/AddTrustExternalCARoot.pem \ - index.rubygems.org/GlobalSignRootCA.pem + rubygems.org/GlobalSignRootCA.pem \ + rubygems.org/GlobalSignRootCA_R3.pem do - rm %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert - rm -r $(dirname %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert) + rm %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert ||: + rm -r $(dirname %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert) ||: done # Ensure there is not forgotten any certificate. test ! "$(ls -A %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/ 2>/dev/null)" @@ -1008,7 +1014,7 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/default/sdbm-1.0.0.gemspec %{gem_dir}/specifications/default/stringio-0.0.1.gemspec %{gem_dir}/specifications/default/strscan-1.0.0.gemspec -%{gem_dir}/specifications/default/webrick-1.4.2.gemspec +%{gem_dir}/specifications/default/webrick-1.4.2.1.gemspec %{gem_dir}/specifications/default/zlib-1.0.0.gemspec %files -n %{?scl_prefix}rubygems-devel @@ -1114,6 +1120,14 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Mon Apr 19 2021 Pavel Valena - 2.5.9-9 +- Update to Ruby 2.5.9. + * Remove Patch20: ruby-2.6.0-rdoc-6.0.1-fix-template-typo.patch; subsumed + Resolves: rhbz#1952998 +- Resolv::DNS: timeouts if multiple IPv6 name servers are given and address + contains leading zero + Resolves: rhbz#1953001 + * Fri Aug 21 2020 Pavel Valena - 2.5.5-8 - Remove file with non-commercial license from did_you_mean gem. Resolves: rhbz#1848915