Fix FTBFS caused by OpenSSL 3.2.1 update.

This commit is contained in:
Vít Ondruch 2024-03-06 15:13:47 +01:00
commit a34f33bc50
2 changed files with 54 additions and 1 deletions

View file

@ -0,0 +1,45 @@
From 047857d9cb44a0703b5582d502e45d585b9dfced Mon Sep 17 00:00:00 2001
From: "NARUSE, Yui" <naruse@airemix.jp>
Date: Sat, 3 Feb 2024 19:39:17 +0900
Subject: [PATCH 1/2] Show OpenSSL version in the error message of assert_equal
---
test/net/http/test_https.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/net/http/test_https.rb b/test/net/http/test_https.rb
index 89d500118db24b..ccfa48b2a44ea8 100644
--- a/test/net/http/test_https.rb
+++ b/test/net/http/test_https.rb
@@ -182,7 +182,7 @@ def test_session_reuse_but_expire
http.get("/")
socket = http.instance_variable_get(:@socket).io
- assert_equal false, socket.session_reused?
+ assert_equal false, socket.session_reused?, "NOTE: OpenSSL library version is #{OpenSSL::OPENSSL_LIBRARY_VERSION}"
http.finish
end
From 53b874d17b68d3f8566846a6df37fd6951a1873c Mon Sep 17 00:00:00 2001
From: "NARUSE, Yui" <naruse@airemix.jp>
Date: Sat, 3 Feb 2024 20:22:59 +0900
Subject: [PATCH 2/2] OpenSSL 3.2.1 30 Jan 2024 is also broken
---
test/net/http/test_https.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/net/http/test_https.rb b/test/net/http/test_https.rb
index ccfa48b2a44ea8..6b3171d265997e 100644
--- a/test/net/http/test_https.rb
+++ b/test/net/http/test_https.rb
@@ -167,7 +167,7 @@ def test_session_reuse
def test_session_reuse_but_expire
# FIXME: The new_session_cb is known broken for clients in OpenSSL 1.1.0h.
omit if OpenSSL::OPENSSL_LIBRARY_VERSION.include?('OpenSSL 1.1.0h')
- omit if OpenSSL::OPENSSL_LIBRARY_VERSION.include?('OpenSSL 3.2.0')
+ omit if OpenSSL::OPENSSL_LIBRARY_VERSION.include?('OpenSSL 3.2.')
http = Net::HTTP.new(HOST, config("port"))
http.use_ssl = true

View file

@ -167,7 +167,7 @@
Summary: An interpreter of object-oriented scripting language
Name: ruby
Version: %{ruby_version}%{?development_release}
Release: 4%{?dist}
Release: 5%{?dist}
# BSD-3-Clause: missing/{crypt,mt19937,setproctitle}.c
# ISC: missing/strl{cat,cpy}.c
# Public Domain for example for: include/ruby/st.h, strftime.c, missing/*, ...
@ -255,6 +255,10 @@ Patch12: ruby-3.4.0-fix-branch-protection-compilation-for-arm.patch
# that is not present for us. Therefore we can safely revert the change.
# https://bugs.ruby-lang.org/issues/20208
Patch13: ruby-3.4.0-Revert-Set-AI_ADDRCONFIG-when-making-getaddrinfo.patch
# Fix `TestNetHTTPS#test_session_reuse_but_expire` test failure cause by
# to OpenSSL 3.2
# https://github.com/ruby/ruby/pull/9824
Patch14: ruby-3.3.1-Fix-test-session-reuse-but-expire.patch
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%{?with_rubypick:Suggests: rubypick}
@ -728,6 +732,7 @@ analysis result in RBS format, a standard type description format for Ruby
%patch 11 -p1
%patch 12 -p1
%patch 13 -p1
%patch 14 -p1
# Provide an example of usage of the tapset:
cp -a %{SOURCE3} .
@ -1663,6 +1668,9 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
%changelog
* Wed Mar 06 2024 Vít Ondruch <vondruch@redhat.com> - 3.3.0-5
- Fix FTBFS caused by OpenSSL 3.2.1 update.
* Fri Jan 26 2024 Jarek Prokop <jprokop@redhat.com> - 3.3.0-4
- Do not set AI_ADDRCONFIG by default when calling getaddrinfo(3).