From afea8c5c1ddc98f44ee6fa6bfc160ecb8194b1a2 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 29 Jun 2021 10:02:12 -0400 Subject: [PATCH] import ruby-2.5.9-107.module+el8.4.0+10822+fe4fffb1 --- .gitignore | 2 +- .ruby.metadata | 2 +- .../ruby-2.1.0-custom-rubygems-location.patch | 10 ++-- SOURCES/ruby-2.3.0-ruby_version.patch | 2 +- ...stop-the-error-due-to-openssl-1-1-1h.patch | 46 ++++++++++++++++ ...y-2.6.0-rdoc-6.0.1-fix-template-typo.patch | 34 ------------ ...nvert-ip-addresses-to-canonical-form.patch | 26 +++++++++ SPECS/ruby.spec | 54 ++++++++++--------- 8 files changed, 109 insertions(+), 67 deletions(-) create mode 100644 SOURCES/ruby-2.5.9-revert-stop-the-error-due-to-openssl-1-1-1h.patch delete mode 100644 SOURCES/ruby-2.6.0-rdoc-6.0.1-fix-template-typo.patch create mode 100644 SOURCES/ruby-3.0.0-Convert-ip-addresses-to-canonical-form.patch 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/.ruby.metadata b/.ruby.metadata index eb0720e..a9edca5 100644 --- a/.ruby.metadata +++ b/.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-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 e563f57..fc59c29 100644 --- a/SPECS/ruby.spec +++ b/SPECS/ruby.spec @@ -1,6 +1,6 @@ %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} @@ -21,7 +21,7 @@ %endif -%global release 106 +%global release 107 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} @@ -30,7 +30,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. @@ -46,8 +46,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 @@ -143,8 +143,6 @@ Patch15: ruby-2.6.0-library-options-to-MAINLIBS.patch # Do not require C++ compiler. # https://github.com/rubygems/rubygems/pull/2367 Patch16: ruby-2.5.1-Avoid-need-of-C++-compiler-to-pass-the-test-suite.patch -# https://github.com/ruby/rdoc/commit/d05e6269d4a4dfd701f5ddb3ae34306cba891511 -Patch20: ruby-2.6.0-rdoc-6.0.1-fix-template-typo.patch # Properly harden package using -fstack-protector-strong. # https://bugs.ruby-lang.org/issues/15053 Patch24: ruby-2.6.0-configure-fstack-protector-strong.patch @@ -173,6 +171,13 @@ Patch26: ruby-2.6.3-fiddle-1.0.0-ffi-closure-alloc-default.patch # https://github.com/ruby/rdoc/commit/8e1916b89ef1d50930c2c863119ddb6ce6c796ed # https://github.com/ruby/rdoc/commit/5a8dc7ce883b24539918c75a460a740943c46970 Patch27: ruby-2.6.0-rdoc-6.0.2-fix-different-js-gz-pages-across-multilib.patch +# Revert: Stop the error due to openssl 1.1.1h, which causes an error in Ruby 2.5. +# https://github.com/ruby/ruby/commit/93e6364a848f00b34647b13063dceb854dfaa11e. +Patch28: 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=1955010 +Patch29: ruby-3.0.0-Convert-ip-addresses-to-canonical-form.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -548,8 +553,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 @@ -565,22 +569,14 @@ sed -i 's/"evaluation\/incorrect_words.yaml", //' \ %patch10 -p1 %patch15 -p1 %patch16 -p1 - -# Preserve rdoc's js file timestamp modified by patch command -# for reproducible build. It is used as generated js.gz file's metadata. -# https://bugzilla.redhat.com/show_bug.cgi?id=1719647 -# https://github.com/junaruga/rdoc/blob/v6.0.2/lib/rdoc/generator/json_index.rb#L199 -# https://github.com/rpm-software-management/rpm/issues/788 -ORIG_EPOCH=$(stat --printf='%y' lib/rdoc/generator/template/json_index/js/navigation.js) -%patch20 -p1 -touch -d "${ORIG_EPOCH}" lib/rdoc/generator/template/json_index/js/navigation.js - %patch22 -p1 %patch23 -p1 %patch24 -p1 %patch25 -p1 %patch26 -p1 %patch27 -p1 +%patch28 -p1 -R +%patch29 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -634,13 +630,13 @@ make install DESTDIR=%{buildroot} sed -i 's/Version: \${ruby_version}/Version: %{ruby_version}/' %{buildroot}%{_libdir}/pkgconfig/%{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)" @@ -1024,7 +1020,7 @@ OPENSSL_SYSTEM_CIPHERS_OVERRIDE=xyz_nonexistent_file OPENSSL_CONF='' \ %{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 rubygems-devel @@ -1133,6 +1129,14 @@ OPENSSL_SYSTEM_CIPHERS_OVERRIDE=xyz_nonexistent_file OPENSSL_CONF='' \ %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Mon Apr 19 2021 Pavel Valena - 2.5.9-107 +- Update to Ruby 2.5.9. + * Remove Patch20: ruby-2.6.0-rdoc-6.0.1-fix-template-typo.patch; subsumed + Resolves: rhbz#1952626 +- Resolv::DNS: timeouts if multiple IPv6 name servers are given and address + contains leading zero + Resolves: rhbz#1955010 + * Mon Jun 22 2020 Pavel Valena - 2.5.5-106 - Remove file with non-commercial license from did_you_mean gem. Resolves: rhbz#1846113