From 9599325b90de3d9b3593a146ce383e3361c66d7a Mon Sep 17 00:00:00 2001 From: Jarek Prokop Date: Tue, 22 Jun 2021 19:46:03 +0200 Subject: [PATCH] Skip the ssl tests on Brew s390x build environment. Fix FTBFS due to SSL tests on s390x. The s390x builders in Brew have unexpected configuration of DNS, which make the tests fail. Related: rhbz#1938942 --- ruby-3.0.0-Skip-ssl-tests-for-offline.patch | 16 ++++++++++++++++ ruby.spec | 8 ++++++++ 2 files changed, 24 insertions(+) create mode 100644 ruby-3.0.0-Skip-ssl-tests-for-offline.patch diff --git a/ruby-3.0.0-Skip-ssl-tests-for-offline.patch b/ruby-3.0.0-Skip-ssl-tests-for-offline.patch new file mode 100644 index 0000000..22ce112 --- /dev/null +++ b/ruby-3.0.0-Skip-ssl-tests-for-offline.patch @@ -0,0 +1,16 @@ +diff --git a/test/rubygems/test_bundled_ca.rb b/test/rubygems/test_bundled_ca.rb +index 6973758c4c..71f61ca8f7 100644 +--- a/test/rubygems/test_bundled_ca.rb ++++ b/test/rubygems/test_bundled_ca.rb +@@ -32,7 +32,7 @@ def assert_https(host) + http.verify_mode = OpenSSL::SSL::VERIFY_PEER + http.cert_store = bundled_certificate_store + http.get('/') +- rescue Errno::ENOENT, Errno::ETIMEDOUT, SocketError ++ rescue Errno::ECONNREFUSED, Errno::ENETUNREACH, Errno::ENOENT, Errno::ETIMEDOUT, SocketError + skip "#{host} seems offline, I can't tell whether ssl would work." + rescue OpenSSL::SSL::SSLError => e + # Only fail for certificate verification errors +-- +2.29.2 + diff --git a/ruby.spec b/ruby.spec index 7323008..7f592c2 100644 --- a/ruby.spec +++ b/ruby.spec @@ -153,6 +153,10 @@ Patch15: ruby-dwarf5-avoid_crash-r1.patch # Avoid possible timeout errors in TestBugReporter#test_bug_reporter_add. # https://bugs.ruby-lang.org/issues/16492 Patch19: ruby-2.7.1-Timeout-the-test_bug_reporter_add-witout-raising-err.patch +# Skip the ssl tests on Brew s390x build environment. +# https://projects.engineering.redhat.com/browse/RHELBLD-6305 +# https://github.com/ruby/ruby/pull/4112 +Patch100: ruby-3.0.0-Skip-ssl-tests-for-offline.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -589,6 +593,9 @@ rm -rf ext/fiddle/libffi* %patch9 -p1 %patch15 -p1 %patch19 -p1 +%ifarch s390x +%patch100 -p1 +%endif # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -1360,6 +1367,7 @@ MSPECOPTS="" * Drop Net::Telnet and XMLRPC packages, because they were dropped from Ruby. Resolves: rhbz#1938942 - Fix FTBFS due to an incompatible load directive. +- Skip the SSL tests on Brew s390x build environment. * Wed Apr 07 2021 Pavel Valena - 2.7.3-136 - Upgrade to Ruby 2.7.3.