From fa5c2ce584922e7ebed2b25212b737dc18502ddb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 28 Nov 2014 17:02:39 +0100 Subject: [PATCH] Update to Ruby 2.1.5. --- ruby-1.9.3-mkmf-verbose.patch | 2 +- ...-additional-preludes-by-configuratio.patch | 2 +- ...0-Enable-configuration-of-archlibdir.patch | 2 +- ...ed-paths-when-empty-version-string-i.patch | 6 +-- ruby-2.1.0-always-use-i386.patch | 2 +- ruby-2.1.0-custom-rubygems-location.patch | 4 +- ...0-Don-t-use-obsolete-SSLv3-for-tests.patch | 38 +++++++++++++++++++ ruby.spec | 15 +++++++- sources | 2 +- 9 files changed, 61 insertions(+), 12 deletions(-) create mode 100644 ruby-2.2.0-Don-t-use-obsolete-SSLv3-for-tests.patch diff --git a/ruby-1.9.3-mkmf-verbose.patch b/ruby-1.9.3-mkmf-verbose.patch index 66107c4..120ee37 100644 --- a/ruby-1.9.3-mkmf-verbose.patch +++ b/ruby-1.9.3-mkmf-verbose.patch @@ -11,7 +11,7 @@ diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 682eb46..e6b1445 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb -@@ -1828,7 +1828,7 @@ SRC +@@ -1829,7 +1829,7 @@ SRC SHELL = /bin/sh # V=0 quiet, V=1 verbose. other values don't work. diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index e297a73..6a425ea 100644 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -38,7 +38,7 @@ diff --git a/configure.in b/configure.in index 0e371e2..d4f1dcb 100644 --- a/configure.in +++ b/configure.in -@@ -3841,6 +3841,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -3914,6 +3914,13 @@ AC_SUBST(rubyarchhdrdir)dnl AC_SUBST(sitearchhdrdir)dnl AC_SUBST(vendorarchhdrdir)dnl diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index 90a97d7..4a4919c 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index 37d9a62..553d4d0 100644 --- a/configure.in +++ b/configure.in -@@ -3071,6 +3071,11 @@ if test ${multiarch+set}; then +@@ -3143,6 +3143,11 @@ if test ${multiarch+set}; then fi archlibdir='${libdir}/${arch}' diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index 37c6fa4..89f5890 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -14,7 +14,7 @@ diff --git a/configure.in b/configure.in index 17ed3ed..5843651 100644 --- a/configure.in +++ b/configure.in -@@ -3645,8 +3645,6 @@ AS_CASE(["$target_os"], +@@ -3718,8 +3718,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -23,7 +23,7 @@ index 17ed3ed..5843651 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, -@@ -3676,6 +3674,7 @@ AC_ARG_WITH(ruby-version, +@@ -3749,6 +3747,7 @@ AC_ARG_WITH(ruby-version, [ruby_version=full]) unset RUBY_LIB_VERSION unset RUBY_LIB_VERSION_STYLE @@ -31,7 +31,7 @@ index 17ed3ed..5843651 100644 AS_CASE(["$ruby_version"], [full], [RUBY_LIB_VERSION_STYLE='3 /* full */'], [minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */']) -@@ -3692,30 +3691,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then +@@ -3765,30 +3764,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then ruby_version="`$CPP -I. -I"${srcdir}" -I"${srcdir}/include" conftest.c | sed '/^ruby_version=/!d;s/ //g'`" eval $ruby_version elif test -z "${ruby_version}"; then diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index 88eff60..78e9697 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index 553d4d0..03a4152 100644 --- a/configure.in +++ b/configure.in -@@ -3757,6 +3757,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3830,6 +3830,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index e0e488b..55c7448 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in index 03a4152..0e371e2 100644 --- a/configure.in +++ b/configure.in -@@ -3731,6 +3731,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -3804,6 +3804,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -26,7 +26,7 @@ index 03a4152..0e371e2 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -3754,6 +3754,7 @@ AC_SUBST(sitearchdir)dnl +@@ -3827,6 +3831,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-2.2.0-Don-t-use-obsolete-SSLv3-for-tests.patch b/ruby-2.2.0-Don-t-use-obsolete-SSLv3-for-tests.patch new file mode 100644 index 0000000..3ad6520 --- /dev/null +++ b/ruby-2.2.0-Don-t-use-obsolete-SSLv3-for-tests.patch @@ -0,0 +1,38 @@ +From 75ca3a364e2e35a53a385eab08bebdcb08baeace Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Fri, 21 Nov 2014 16:02:52 +0100 +Subject: [PATCH] Don't use obsolete SSLv3 for tests. + +SSLv23 should be the most liberal settings according to upstream +documentation: + +https://www.openssl.org/docs/ssl/SSL_CTX_new.html +--- + test/openssl/test_ssl_session.rb | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/openssl/test_ssl_session.rb b/test/openssl/test_ssl_session.rb +index 8066ef1..2f3e578 100644 +--- a/test/openssl/test_ssl_session.rb ++++ b/test/openssl/test_ssl_session.rb +@@ -273,7 +273,7 @@ __EOS__ + + def test_ctx_client_session_cb + called = {} +- ctx = OpenSSL::SSL::SSLContext.new("SSLv3") ++ ctx = OpenSSL::SSL::SSLContext.new + ctx.session_cache_mode = OpenSSL::SSL::SSLContext::SESSION_CACHE_CLIENT + + ctx.session_new_cb = lambda { |ary| +@@ -345,7 +345,7 @@ __EOS__ + last_client_session = nil + 3.times do + sock = TCPSocket.new("127.0.0.1", port) +- ssl = OpenSSL::SSL::SSLSocket.new(sock, OpenSSL::SSL::SSLContext.new("SSLv3")) ++ ssl = OpenSSL::SSL::SSLSocket.new(sock, OpenSSL::SSL::SSLContext.new(:SSLv23_server)) + ssl.sync_close = true + ssl.session = last_client_session if last_client_session + ssl.connect +-- +1.9.3 + diff --git a/ruby.spec b/ruby.spec index ec213ea..7ca58fd 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 %global minor_version 1 -%global teeny_version 4 +%global teeny_version 5 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -21,7 +21,7 @@ %endif -%global release 24 +%global release 25 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.2.2 @@ -106,6 +106,9 @@ Patch5: ruby-1.9.3-mkmf-verbose.patch # in support for ABRT. # http://bugs.ruby-lang.org/issues/8566 Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +# Test are broken due to SSLv3 disabled in Fedora. +# https://bugs.ruby-lang.org/issues/10046 +Patch7: ruby-2.2.0-Don-t-use-obsolete-SSLv3-for-tests.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -366,6 +369,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -566,6 +570,10 @@ sed -i '/^ def test_machine_stackoverflow/,/^ end/ s/^/#/' test/ruby/test_exce sed -i '/assert(OpenSSL::Cipher::Cipher.new(name).is_a?(OpenSSL::Cipher::Cipher))/i \ next if /wrap/ =~ name' test/openssl/test_cipher.rb +# Test is broken due to SSLv3 disabled in Fedora. +# https://bugs.ruby-lang.org/issues/10046 +sed -i '/def test_ctx_server_session_cb$/,/^ end$/ s/^/#/' test/openssl/test_ssl_session.rb + make check TESTS="-v $DISABLE_TESTS" %post libs -p /sbin/ldconfig @@ -862,6 +870,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Thu Nov 20 2014 Vít Ondruch - 2.1.5-25 +- Update to Ruby 2.1.5. + * Fri Oct 31 2014 Vít Ondruch - 2.1.4-24 - Update to Ruby 2.1.4. - Include only vendor directories, not their content (rhbz#1114071). diff --git a/sources b/sources index 0edbf6f..2f388ee 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f4136e781d261e3cc20748005e1740b7 ruby-2.1.4.tar.bz2 +a7c3e5fec47eff23091b566e9e1dac1b ruby-2.1.5.tar.bz2