Merge remote-tracking branch 'fedora/master' into stream-ruby-2.5
This commit is contained in:
commit
72eb3f0a4e
|
@ -0,0 +1,35 @@
|
|||
From 51e2c91412a511196e58efea5b87c460b4fa6a20 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
|
||||
Date: Thu, 26 Jul 2018 13:17:52 +0200
|
||||
Subject: [PATCH] Avoid need of C++ compiler to pass the test suite.
|
||||
|
||||
The test suite fails when C++ compiler is not available on the system:
|
||||
|
||||
~~~
|
||||
TestGemExtCmakeBuilder#test_self_build:
|
||||
Gem::InstallError: cmake failed, exit code 1
|
||||
/builddir/build/BUILD/ruby-2.5.1/lib/rubygems/ext/builder.rb:92:in `run'
|
||||
/builddir/build/BUILD/ruby-2.5.1/lib/rubygems/ext/cmake_builder.rb:10:in `build'
|
||||
/builddir/build/BUILD/ruby-2.5.1/test/rubygems/test_gem_ext_cmake_builder.rb:37:in `block in test_self_build'
|
||||
/builddir/build/BUILD/ruby-2.5.1/test/rubygems/test_gem_ext_cmake_builder.rb:36:in `chdir'
|
||||
/builddir/build/BUILD/ruby-2.5.1/test/rubygems/test_gem_ext_cmake_builder.rb:36:in `test_self_build'
|
||||
~~~
|
||||
|
||||
But there is nothing which would realy required C++. It is just CMake
|
||||
default to check for C++.
|
||||
---
|
||||
test/rubygems/test_gem_ext_cmake_builder.rb | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/test/rubygems/test_gem_ext_cmake_builder.rb b/test/rubygems/test_gem_ext_cmake_builder.rb
|
||||
index 76d3cb2afe..2d449fc2fd 100644
|
||||
--- a/test/rubygems/test_gem_ext_cmake_builder.rb
|
||||
+++ b/test/rubygems/test_gem_ext_cmake_builder.rb
|
||||
@@ -25,6 +25,7 @@ def test_self_build
|
||||
File.open File.join(@ext, 'CMakeLists.txt'), 'w' do |cmakelists|
|
||||
cmakelists.write <<-eo_cmake
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
+project(self_build LANGUAGES NONE)
|
||||
install (FILES test.txt DESTINATION bin)
|
||||
eo_cmake
|
||||
end
|
|
@ -0,0 +1,112 @@
|
|||
From 71057ca5963108bac1e2c31bd0e8e205ba74cc19 Mon Sep 17 00:00:00 2001
|
||||
From: Kazuki Yamaguchi <k@rhe.jp>
|
||||
Date: Fri, 11 May 2018 13:43:32 +0900
|
||||
Subject: [PATCH 1/2] test/test_pkey_rsa: fix test failure with OpenSSL 1.1.1
|
||||
|
||||
OpenSSL 1.1.1 raised the minimum size for RSA keys to 512 bits.
|
||||
---
|
||||
test/openssl/test_pkey_rsa.rb | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/test/openssl/test_pkey_rsa.rb b/test/openssl/test_pkey_rsa.rb
|
||||
index c1205563..b4393e68 100644
|
||||
--- a/test/openssl/test_pkey_rsa.rb
|
||||
+++ b/test/openssl/test_pkey_rsa.rb
|
||||
@@ -60,6 +60,13 @@ def test_new_with_exponent
|
||||
end
|
||||
end
|
||||
|
||||
+ def test_generate
|
||||
+ key = OpenSSL::PKey::RSA.generate(512, 17)
|
||||
+ assert_equal 512, key.n.num_bits
|
||||
+ assert_equal 17, key.e
|
||||
+ assert_not_nil key.d
|
||||
+ end
|
||||
+
|
||||
def test_new_break
|
||||
assert_nil(OpenSSL::PKey::RSA.new(1024) { break })
|
||||
assert_raise(RuntimeError) do
|
||||
@@ -256,7 +263,7 @@ def test_pem_passwd
|
||||
end
|
||||
|
||||
def test_dup
|
||||
- key = OpenSSL::PKey::RSA.generate(256, 17)
|
||||
+ key = Fixtures.pkey("rsa1024")
|
||||
key2 = key.dup
|
||||
assert_equal key.params, key2.params
|
||||
key2.set_key(key2.n, 3, key2.d)
|
||||
|
||||
From a5e26bc1345fe325bdc619f9b1768b7ad3c94214 Mon Sep 17 00:00:00 2001
|
||||
From: Kazuki Yamaguchi <k@rhe.jp>
|
||||
Date: Fri, 11 May 2018 14:12:39 +0900
|
||||
Subject: [PATCH 2/2] test/test_ssl_session: set client protocol version
|
||||
explicitly
|
||||
|
||||
Clients that implement TLS 1.3's Middlebox Compatibility Mode will
|
||||
always provide a non-empty session ID in the ClientHello. This means
|
||||
the "get" callback for the server-side session caching may be called
|
||||
for the initial connection.
|
||||
---
|
||||
test/openssl/test_ssl_session.rb | 14 +++++++++-----
|
||||
1 file changed, 9 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/test/openssl/test_ssl_session.rb b/test/openssl/test_ssl_session.rb
|
||||
index af8c65b1..6db0c2d1 100644
|
||||
--- a/test/openssl/test_ssl_session.rb
|
||||
+++ b/test/openssl/test_ssl_session.rb
|
||||
@@ -198,7 +198,9 @@ def test_server_session_cache
|
||||
first_session = nil
|
||||
10.times do |i|
|
||||
connections = i
|
||||
- server_connect_with_session(port, nil, first_session) { |ssl|
|
||||
+ cctx = OpenSSL::SSL::SSLContext.new
|
||||
+ cctx.ssl_version = :TLSv1_2
|
||||
+ server_connect_with_session(port, cctx, first_session) { |ssl|
|
||||
ssl.puts("abc"); assert_equal "abc\n", ssl.gets
|
||||
first_session ||= ssl.session
|
||||
|
||||
@@ -257,6 +259,8 @@ def test_ctx_server_session_cb
|
||||
|
||||
connections = nil
|
||||
called = {}
|
||||
+ cctx = OpenSSL::SSL::SSLContext.new
|
||||
+ cctx.ssl_version = :TLSv1_2
|
||||
sctx = nil
|
||||
ctx_proc = Proc.new { |ctx|
|
||||
sctx = ctx
|
||||
@@ -292,7 +296,7 @@ def test_ctx_server_session_cb
|
||||
}
|
||||
start_server(ctx_proc: ctx_proc) do |port|
|
||||
connections = 0
|
||||
- sess0 = server_connect_with_session(port, nil, nil) { |ssl|
|
||||
+ sess0 = server_connect_with_session(port, cctx, nil) { |ssl|
|
||||
ssl.puts("abc"); assert_equal "abc\n", ssl.gets
|
||||
assert_equal false, ssl.session_reused?
|
||||
ssl.session
|
||||
@@ -307,7 +311,7 @@ def test_ctx_server_session_cb
|
||||
|
||||
# Internal cache hit
|
||||
connections = 1
|
||||
- server_connect_with_session(port, nil, sess0.dup) { |ssl|
|
||||
+ server_connect_with_session(port, cctx, sess0.dup) { |ssl|
|
||||
ssl.puts("abc"); assert_equal "abc\n", ssl.gets
|
||||
assert_equal true, ssl.session_reused?
|
||||
ssl.session
|
||||
@@ -328,7 +332,7 @@ def test_ctx_server_session_cb
|
||||
|
||||
# External cache hit
|
||||
connections = 2
|
||||
- sess2 = server_connect_with_session(port, nil, sess0.dup) { |ssl|
|
||||
+ sess2 = server_connect_with_session(port, cctx, sess0.dup) { |ssl|
|
||||
ssl.puts("abc"); assert_equal "abc\n", ssl.gets
|
||||
if !ssl.session_reused? && openssl?(1, 1, 0) && !openssl?(1, 1, 0, 7)
|
||||
# OpenSSL >= 1.1.0, < 1.1.0g
|
||||
@@ -355,7 +359,7 @@ def test_ctx_server_session_cb
|
||||
|
||||
# Cache miss
|
||||
connections = 3
|
||||
- sess3 = server_connect_with_session(port, nil, sess0.dup) { |ssl|
|
||||
+ sess3 = server_connect_with_session(port, cctx, sess0.dup) { |ssl|
|
||||
ssl.puts("abc"); assert_equal "abc\n", ssl.gets
|
||||
assert_equal false, ssl.session_reused?
|
||||
ssl.session
|
29
ruby.spec
29
ruby.spec
|
@ -21,7 +21,7 @@
|
|||
%endif
|
||||
|
||||
|
||||
%global release 93
|
||||
%global release 96
|
||||
%{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}}
|
||||
|
||||
# The RubyGems library has to stay out of Ruby directory three, since the
|
||||
|
@ -142,6 +142,12 @@ Patch11: ruby-2.5.1-TestTimeTZ-test-failures-Kiritimati-and-Lisbon.patch
|
|||
# Don't force libraries used to build Ruby to its dependencies.
|
||||
# https://bugs.ruby-lang.org/issues/14422
|
||||
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
|
||||
# Fix some OpenSSL 1.1.1 test failures.
|
||||
# https://github.com/ruby/openssl/pull/202
|
||||
Patch17: ruby-2.5.1-Test-fixes-for-OpenSSL-1.1.1.patch
|
||||
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
Suggests: rubypick
|
||||
|
@ -526,6 +532,8 @@ rm -rf ext/fiddle/libffi*
|
|||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch15 -p1
|
||||
%patch16 -p1
|
||||
%patch17 -p1
|
||||
|
||||
# Provide an example of usage of the tapset:
|
||||
cp -a %{SOURCE3} .
|
||||
|
@ -749,6 +757,13 @@ DISABLE_TESTS="$DISABLE_TESTS -n !/test_segv_\(setproctitle\|test\|loaded_featur
|
|||
# https://bugs.ruby-lang.org/issues/14175
|
||||
sed -i '/def test_mdns_each_address$/,/^ end$/ s/^/#/' test/resolv/test_mdns.rb
|
||||
|
||||
# For now, disable some OpenSSL tests incompatible with OpenSSL 1.1.1:
|
||||
# https://github.com/ruby/openssl/issues/207
|
||||
mv test/openssl/test_ssl.rb{,.disabled}
|
||||
DISABLE_TESTS="$DISABLE_TESTS -n !/test_resumption/"
|
||||
DISABLE_TESTS="$DISABLE_TESTS -n !/test_\(identity_verify_failure\|min_version\|session_reuse\)/"
|
||||
DISABLE_TESTS="$DISABLE_TESTS -n !/test_do_not_allow_invalid_client_cert_auth_connection/"
|
||||
|
||||
make check TESTS="-v $DISABLE_TESTS"
|
||||
|
||||
%files
|
||||
|
@ -1068,6 +1083,18 @@ make check TESTS="-v $DISABLE_TESTS"
|
|||
%{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec
|
||||
|
||||
%changelog
|
||||
* Tue Jul 31 2018 Florian Weimer <fweimer@redhat.com> - 2.5.1-96
|
||||
- Rebuild with fixed binutils
|
||||
|
||||
* Fri Jul 27 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.5.1-95
|
||||
- Rebuild for new binutils
|
||||
|
||||
* Thu Jul 26 2018 Vít Ondruch <vondruch@redhat.com> - 2.5.1-94
|
||||
- Disable some test failing with OpenSSL 1.1.1.
|
||||
|
||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.1-94
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Thu May 10 2018 Pavel Valena <pvalena@redhat.com> - 2.5.1-93
|
||||
- Add macros to edit files lists in .gemspec
|
||||
(gemspec_add_file and gemspec_remove_file).
|
||||
|
|
Loading…
Reference in New Issue