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 1/7] 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 From 84b8f16b8354b7b5be9f40c6fe947f8693523b86 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Fri, 26 Dec 2014 16:53:38 -0700 Subject: [PATCH 2/7] Disbable sse2 on i668 (bug #1101811) --- ruby-nosse2.patch | 41 +++++++++++++++++++++++++++++++++++++++++ ruby.spec | 9 ++++++++- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 ruby-nosse2.patch diff --git a/ruby-nosse2.patch b/ruby-nosse2.patch new file mode 100644 index 0000000..9df25dd --- /dev/null +++ b/ruby-nosse2.patch @@ -0,0 +1,41 @@ +diff -up ruby-2.1.5/configure.in.nosse2 ruby-2.1.5/configure.in +--- ruby-2.1.5/configure.in.nosse2 2014-12-26 16:31:57.696889054 -0700 ++++ ruby-2.1.5/configure.in 2014-12-26 16:32:25.187718930 -0700 +@@ -860,22 +860,6 @@ if test "$GCC" = yes; then + for oflag in -fno-fast-math; do + RUBY_TRY_CFLAGS($oflag, [RUBY_APPEND_OPTION(optflags, $oflag)]) + done +- AS_CASE(["$target"], +- [*-darwin*], [ +- # doesn't seem necessary on Mac OS X +- ], +- [[i[4-6]86*|i386*mingw*]], [ +- RUBY_TRY_CFLAGS(-msse2 -mfpmath=sse, [ +- RUBY_APPEND_OPTION(XCFLAGS, -msse2 -mfpmath=sse) +- ]) +- AS_CASE(["$XCFLAGS"], +- [[*-msse2*]], [ +- RUBY_TRY_CFLAGS(-mstackrealign, [ +- RUBY_APPEND_OPTION(XCFLAGS, -mstackrealign) +- ]) +- ]) +- ] +- ) + fi + + AC_ARG_WITH(opt-dir, +diff -up ruby-2.1.5/test/ruby/test_sprintf.rb.nosse2 ruby-2.1.5/test/ruby/test_sprintf.rb +--- ruby-2.1.5/test/ruby/test_sprintf.rb.nosse2 2014-09-03 09:25:51.000000000 -0600 ++++ ruby-2.1.5/test/ruby/test_sprintf.rb 2014-12-26 16:31:57.699889035 -0700 +@@ -194,8 +194,9 @@ class TestSprintf < Test::Unit::TestCase + sprintf("%20.0f", 36893488147419107329.0)) + assert_equal(" Inf", sprintf("% 0e", 1.0/0.0), "moved from btest/knownbug") + assert_equal(" -0.", sprintf("%#10.0f", -0.5), "[ruby-dev:42552]") +- assert_equal("0x1p+2", sprintf('%.0a', Float('0x1.fp+1')), "[ruby-dev:42551]") +- assert_equal("-0x1.0p+2", sprintf('%.1a', Float('-0x1.ffp+1')), "[ruby-dev:42551]") ++ # out of spec ++ #assert_equal("0x1p+2", sprintf('%.0a', Float('0x1.fp+1')), "[ruby-dev:42551]") ++ #assert_equal("-0x1.0p+2", sprintf('%.1a', Float('-0x1.ffp+1')), "[ruby-dev:42551]") + end + + def test_float_hex diff --git a/ruby.spec b/ruby.spec index 7ca58fd..9329c39 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 25 +%global release 26 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.2.2 @@ -109,6 +109,9 @@ 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 +# Disable sse2, already applied upstream +# https://bugzilla.redhat.com/show_bug.cgi?id=1101811 +Patch8: ruby-nosse2.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -370,6 +373,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -870,6 +874,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Fri Dec 26 2014 Orion Poplwski - 2.1.5-26 +- Disbable sse2 on i668 (bug #1101811) + * Thu Nov 20 2014 Vít Ondruch - 2.1.5-25 - Update to Ruby 2.1.5. From 0e163c24d9dde6374c9b5b65b57730d104677487 Mon Sep 17 00:00:00 2001 From: Josef Stribny Date: Tue, 14 Apr 2015 13:11:53 +0200 Subject: [PATCH 3/7] Update to 2.1.6 --- ruby-nosse2.patch | 41 ----------------------------------------- ruby.spec | 13 ++++++------- sources | 2 +- 3 files changed, 7 insertions(+), 49 deletions(-) delete mode 100644 ruby-nosse2.patch diff --git a/ruby-nosse2.patch b/ruby-nosse2.patch deleted file mode 100644 index 9df25dd..0000000 --- a/ruby-nosse2.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff -up ruby-2.1.5/configure.in.nosse2 ruby-2.1.5/configure.in ---- ruby-2.1.5/configure.in.nosse2 2014-12-26 16:31:57.696889054 -0700 -+++ ruby-2.1.5/configure.in 2014-12-26 16:32:25.187718930 -0700 -@@ -860,22 +860,6 @@ if test "$GCC" = yes; then - for oflag in -fno-fast-math; do - RUBY_TRY_CFLAGS($oflag, [RUBY_APPEND_OPTION(optflags, $oflag)]) - done -- AS_CASE(["$target"], -- [*-darwin*], [ -- # doesn't seem necessary on Mac OS X -- ], -- [[i[4-6]86*|i386*mingw*]], [ -- RUBY_TRY_CFLAGS(-msse2 -mfpmath=sse, [ -- RUBY_APPEND_OPTION(XCFLAGS, -msse2 -mfpmath=sse) -- ]) -- AS_CASE(["$XCFLAGS"], -- [[*-msse2*]], [ -- RUBY_TRY_CFLAGS(-mstackrealign, [ -- RUBY_APPEND_OPTION(XCFLAGS, -mstackrealign) -- ]) -- ]) -- ] -- ) - fi - - AC_ARG_WITH(opt-dir, -diff -up ruby-2.1.5/test/ruby/test_sprintf.rb.nosse2 ruby-2.1.5/test/ruby/test_sprintf.rb ---- ruby-2.1.5/test/ruby/test_sprintf.rb.nosse2 2014-09-03 09:25:51.000000000 -0600 -+++ ruby-2.1.5/test/ruby/test_sprintf.rb 2014-12-26 16:31:57.699889035 -0700 -@@ -194,8 +194,9 @@ class TestSprintf < Test::Unit::TestCase - sprintf("%20.0f", 36893488147419107329.0)) - assert_equal(" Inf", sprintf("% 0e", 1.0/0.0), "moved from btest/knownbug") - assert_equal(" -0.", sprintf("%#10.0f", -0.5), "[ruby-dev:42552]") -- assert_equal("0x1p+2", sprintf('%.0a', Float('0x1.fp+1')), "[ruby-dev:42551]") -- assert_equal("-0x1.0p+2", sprintf('%.1a', Float('-0x1.ffp+1')), "[ruby-dev:42551]") -+ # out of spec -+ #assert_equal("0x1p+2", sprintf('%.0a', Float('0x1.fp+1')), "[ruby-dev:42551]") -+ #assert_equal("-0x1.0p+2", sprintf('%.1a', Float('-0x1.ffp+1')), "[ruby-dev:42551]") - end - - def test_float_hex diff --git a/ruby.spec b/ruby.spec index 9329c39..53b129c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 %global minor_version 1 -%global teeny_version 5 +%global teeny_version 6 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -21,7 +21,7 @@ %endif -%global release 26 +%global release 27 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.2.2 @@ -35,7 +35,7 @@ %global irb_version %{ruby_version} %global bigdecimal_version 1.2.4 -%global io_console_version 0.4.2 +%global io_console_version 0.4.3 %global json_version 1.8.1 %global minitest_version 4.7.5 %global psych_version 2.0.5 @@ -109,9 +109,6 @@ 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 -# Disable sse2, already applied upstream -# https://bugzilla.redhat.com/show_bug.cgi?id=1101811 -Patch8: ruby-nosse2.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -373,7 +370,6 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch5 -p1 %patch6 -p1 %patch7 -p1 -%patch8 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -874,6 +870,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Tue Apr 14 2015 Josef Stribny - 2.1.6-27 +- Update to 2.1.6 + * Fri Dec 26 2014 Orion Poplwski - 2.1.5-26 - Disbable sse2 on i668 (bug #1101811) diff --git a/sources b/sources index 2f388ee..84ba80d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a7c3e5fec47eff23091b566e9e1dac1b ruby-2.1.5.tar.bz2 +e1a8e6c6bfbb09bb7f8d6be8f508e4a1 ruby-2.1.6.tar.bz2 From a97ee0bcd3e116a2f086257cdf9fb18f1c09f6dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 23 Mar 2015 11:01:10 +0100 Subject: [PATCH 4/7] Fix libruby.so versions in SystemTap scripts (rhbz#1218274). --- ruby.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ruby.spec b/ruby.spec index 53b129c..bdffe4b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 27 +%global release 28 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.2.2 @@ -533,10 +533,10 @@ sed -i '/^end$/ i\ # Install a tapset and fix up the path to the library. mkdir -p %{buildroot}%{tapset_dir} -sed -e "s|@LIBRARY_PATH@|%{tapset_libdir}/libruby.so.%{ruby_version}|" \ - %{SOURCE2} > %{buildroot}%{tapset_dir}/libruby.so.%{ruby_version}.stp +sed -e "s|@LIBRARY_PATH@|%{tapset_libdir}/libruby.so.%{major_minor_version}|" \ + %{SOURCE2} > %{buildroot}%{tapset_dir}/libruby.so.%{major_minor_version}.stp # Escape '*/' in comment. -sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{ruby_version}.stp +sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{major_minor_version}.stp %check DISABLE_TESTS="" @@ -870,6 +870,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon May 04 2015 Vít Ondruch - 2.1.6-28 +- Fix libruby.so versions in SystemTap scripts (rhbz#1218274). + * Tue Apr 14 2015 Josef Stribny - 2.1.6-27 - Update to 2.1.6 From 3b36dd8cd1ed903047dbebc04bd50056b4b2474d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 11 May 2015 12:10:24 +0200 Subject: [PATCH 5/7] Fix compatibility issues with Tcl/Tk 8.6 (rhbz#1181160). --- ruby-2.2.0-Support-tcl-tk-8.6.patch | 183 ++++++++++++++++++++++++++++ ruby.spec | 10 +- 2 files changed, 191 insertions(+), 2 deletions(-) create mode 100644 ruby-2.2.0-Support-tcl-tk-8.6.patch diff --git a/ruby-2.2.0-Support-tcl-tk-8.6.patch b/ruby-2.2.0-Support-tcl-tk-8.6.patch new file mode 100644 index 0000000..a77d7ab --- /dev/null +++ b/ruby-2.2.0-Support-tcl-tk-8.6.patch @@ -0,0 +1,183 @@ +diff -urN ruby-2.1.3.orig/ext/tk/extconf.rb ruby-2.1.3/ext/tk/extconf.rb +--- ruby-2.1.3.orig/ext/tk/extconf.rb 2013-11-30 11:46:47.000000000 +0900 ++++ ruby-2.1.3/ext/tk/extconf.rb 2014-10-19 17:50:33.045820645 +0900 +@@ -9,10 +9,10 @@ + # %w[8.9 8.8 8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0 7.6 4.2] + # %w[8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0] + # %w[8.7 8.6 8.5 8.4 8.0] # to shorten search steps +- %w[8.5 8.4] # At present, Tcl/Tk8.6 is not supported. ++ %w[8.6 8.5 8.4] + + TkLib_Config['unsupported_versions'] = +- %w[8.8 8.7 8.6] # At present, Tcl/Tk8.6 is not supported. ++ %w[8.8 8.7] + + TkLib_Config['major_nums'] = '87' + +diff -urN ruby-2.1.3.orig/ext/tk/lib/tk.rb ruby-2.1.3/ext/tk/lib/tk.rb +--- ruby-2.1.3.orig/ext/tk/lib/tk.rb 2011-05-27 08:36:33.000000000 +0900 ++++ ruby-2.1.3/ext/tk/lib/tk.rb 2014-10-19 17:48:59.046873862 +0900 +@@ -1309,8 +1309,12 @@ + end + + unless interp.deleted? +- #Thread.current[:status].value = TclTkLib.mainloop(false) +- Thread.current[:status].value = interp.mainloop(false) ++ begin ++ #Thread.current[:status].value = TclTkLib.mainloop(false) ++ Thread.current[:status].value = interp.mainloop(false) ++ rescue Exception=>e ++ puts "ignore exception on interp: #{e.inspect}\n" if $DEBUG ++ end + end + + ensure +@@ -1569,7 +1573,15 @@ + EOL + =end + +- at_exit{ INTERP.remove_tk_procs(TclTkLib::FINALIZE_PROC_NAME) } ++ if !WITH_RUBY_VM || RUN_EVENTLOOP_ON_MAIN_THREAD ### check Ruby 1.9 !!!!!!! ++ at_exit{ INTERP.remove_tk_procs(TclTkLib::FINALIZE_PROC_NAME) } ++ else ++ at_exit{ ++ Tk.root.destroy ++ INTERP.remove_tk_procs(TclTkLib::FINALIZE_PROC_NAME) ++ INTERP_THREAD.kill.join ++ } ++ end + + EventFlag = TclTkLib::EventFlag + +diff -urN ruby-2.1.3.orig/ext/tk/tcltklib.c ruby-2.1.3/ext/tk/tcltklib.c +--- ruby-2.1.3.orig/ext/tk/tcltklib.c 2014-02-10 20:45:14.000000000 +0900 ++++ ruby-2.1.3/ext/tk/tcltklib.c 2014-10-19 19:17:00.014057636 +0900 +@@ -6020,15 +6025,38 @@ + } + + rbtk_eventloop_depth++; +- /* DUMP2("namespace wrapper enter depth == %d", rbtk_eventloop_depth); */ ++ DUMP2("namespace wrapper enter depth == %d", rbtk_eventloop_depth); + + if (info.isNativeObjectProc) { ++#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 6 ++ DUMP1("call a native-object-proc"); + ret = (*(info.objProc))(info.objClientData, interp, objc, objv); ++#else ++ /* Tcl8.6 or later */ ++ int i; ++ Tcl_Obj **cp_objv; ++ char org_ns_cmd_name[] = "__orig_namespace_command__"; ++ ++ DUMP1("call a native-object-proc for tcl8.6 or later"); ++ cp_objv = RbTk_ALLOC_N(Tcl_Obj *, (objc + 1)); ++ ++ cp_objv[0] = Tcl_NewStringObj(org_ns_cmd_name, strlen(org_ns_cmd_name)); ++ for(i = 1; i < objc; i++) { ++ cp_objv[i] = objv[i]; ++ } ++ cp_objv[objc] = (Tcl_Obj *)NULL; ++ ++ /* ret = Tcl_EvalObjv(interp, objc, cp_objv, TCL_EVAL_DIRECT); */ ++ ret = Tcl_EvalObjv(interp, objc, cp_objv, 0); ++ ++ ckfree((char*)cp_objv); ++#endif + } else { + /* string interface */ + int i; + char **argv; + ++ DUMP1("call with the string-interface"); + /* argv = (char **)Tcl_Alloc(sizeof(char *) * (objc + 1)); */ + argv = RbTk_ALLOC_N(char *, (objc + 1)); + #if 0 /* use Tcl_Preserve/Release */ +@@ -6068,6 +6097,8 @@ + Tcl_Interp *interp; + { + #if TCL_MAJOR_VERSION >= 8 ++ ++#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 6 + Tcl_CmdInfo orig_info; + + if (!Tcl_GetCommandInfo(interp, "namespace", &(orig_info))) { +@@ -6084,6 +6115,11 @@ + orig_info.deleteProc); + } + ++#else /* tcl8.6 or later */ ++ Tcl_GlobalEval(interp, "rename namespace __orig_namespace_command__"); ++ ++#endif ++ + Tcl_CreateObjCommand(interp, "namespace", ip_rbNamespaceObjCmd, + (ClientData) 0, (Tcl_CmdDeleteProc *)NULL); + #endif +@@ -8448,15 +8484,28 @@ + #endif + { + struct invoke_info *inf = (struct invoke_info *)arg; ++ ++#if TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION < 6 + int i, len; +-#if TCL_MAJOR_VERSION >= 8 + int argc = inf->objc; + char **argv = (char **)NULL; + #endif + ++ DUMP1("call invoke_tcl_proc"); ++ ++#if TCL_MAJOR_VERSION > 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION >= 6) ++ ++ /* eval */ ++ inf->ptr->return_value = Tcl_EvalObjv(inf->ptr->ip, inf->objc, inf->objv, TCL_EVAL_DIRECT); ++ /* inf->ptr->return_value = Tcl_EvalObjv(inf->ptr->ip, inf->objc, inf->objv, 0); */ ++ ++#else /* Tcl/Tk 7.x, 8.0 -- 8.5 */ ++ + /* memory allocation for arguments of this command */ +-#if TCL_MAJOR_VERSION >= 8 ++#if TCL_MAJOR_VERSION == 8 ++ /* Tcl/Tk 8.0 -- 8.5 */ + if (!inf->cmdinfo.isNativeObjectProc) { ++ DUMP1("called proc is not a native-obj-proc"); + /* string interface */ + /* argv = (char **)ALLOC_N(char *, argc+1);*/ /* XXXXXXXXXX */ + argv = RbTk_ALLOC_N(char *, (argc+1)); +@@ -8470,11 +8519,14 @@ + } + #endif + ++ DUMP1("reset result of tcl-interp"); + Tcl_ResetResult(inf->ptr->ip); + + /* Invoke the C procedure */ +-#if TCL_MAJOR_VERSION >= 8 ++#if TCL_MAJOR_VERSION == 8 ++ /* Tcl/Tk 8.0 -- 8.5 */ + if (inf->cmdinfo.isNativeObjectProc) { ++ DUMP1("call tcl_proc as a native-obj-proc"); + inf->ptr->return_value + = (*(inf->cmdinfo.objProc))(inf->cmdinfo.objClientData, + inf->ptr->ip, inf->objc, inf->objv); +@@ -8482,7 +8534,9 @@ + else + #endif + { +-#if TCL_MAJOR_VERSION >= 8 ++#if TCL_MAJOR_VERSION == 8 ++ /* Tcl/Tk 8.0 -- 8.5 */ ++ DUMP1("call tcl_proc as not a native-obj-proc"); + inf->ptr->return_value + = (*(inf->cmdinfo.proc))(inf->cmdinfo.clientData, inf->ptr->ip, + argc, (CONST84 char **)argv); +@@ -8505,6 +8559,9 @@ + #endif + } + ++#endif /* Tcl/Tk 8.6 or later || Tcl 7.x, 8.0 -- 8.5 */ ++ ++ DUMP1("end of invoke_tcl_proc"); + return Qnil; + } + diff --git a/ruby.spec b/ruby.spec index bdffe4b..a29feb9 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 28 +%global release 29 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.2.2 @@ -109,6 +109,9 @@ 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 +# Fix compatibility with Tcl/Tk 8.6. +# https://bugs.ruby-lang.org/issues/8000 +Patch8: ruby-2.2.0-Support-tcl-tk-8.6.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -370,6 +373,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -396,7 +400,6 @@ autoconf --with-vendorarchhdrdir='$(vendorhdrdir)/$(arch)' \ --with-rubygemsdir='%{rubygems_dir}' \ --with-ruby-pc='%{name}.pc' \ - --with-tcltkversion=8.6 \ --disable-rpath \ --enable-shared \ --with-ruby-version='' \ @@ -870,6 +873,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Thu May 07 2015 Vít Ondruch - 2.1.6-29 +- Fix compatibility issues with Tcl/Tk 8.6 (rhbz#1181160). + * Mon May 04 2015 Vít Ondruch - 2.1.6-28 - Fix libruby.so versions in SystemTap scripts (rhbz#1218274). From f5e6624d6ba4d715dcf55d523444569e6e2fe132 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 8 Jun 2015 15:01:34 +0200 Subject: [PATCH 6/7] Fix the RubyGems version (rhbz#1226679). --- ruby.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index a29feb9..36b9eba 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,10 +21,10 @@ %endif -%global release 29 +%global release 30 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} -%global rubygems_version 2.2.2 +%global rubygems_version 2.2.3 # The RubyGems library has to stay out of Ruby directory three, since the # RubyGems should be share by all Ruby implementations. @@ -873,6 +873,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon Jun 08 2015 Vít Ondruch - 2.1.6-30 +- Fix the RubyGems version (rhbz#1226679). + * Thu May 07 2015 Vít Ondruch - 2.1.6-29 - Fix compatibility issues with Tcl/Tk 8.6 (rhbz#1181160). From 4ec6f18cb7ecea62fa129d33d2981941dc07dab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 2 Sep 2015 16:17:00 +0200 Subject: [PATCH 7/7] Update to Ruby 2.1.7. --- 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 +- ruby-2.2.0-Support-tcl-tk-8.6.patch | 183 ------------------ ruby.spec | 13 +- sources | 2 +- 9 files changed, 16 insertions(+), 200 deletions(-) delete mode 100644 ruby-2.2.0-Support-tcl-tk-8.6.patch diff --git a/ruby-1.9.3-mkmf-verbose.patch b/ruby-1.9.3-mkmf-verbose.patch index 120ee37..7630001 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 -@@ -1829,7 +1829,7 @@ SRC +@@ -1830,7 +1830,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 6a425ea..10940a7 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 -@@ -3914,6 +3914,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -3901,6 +3901,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 4a4919c..094f142 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 -@@ -3143,6 +3143,11 @@ if test ${multiarch+set}; then +@@ -3130,6 +3130,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 89f5890..9d08694 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 -@@ -3718,8 +3718,6 @@ AS_CASE(["$target_os"], +@@ -3705,8 +3705,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, -@@ -3749,6 +3747,7 @@ AC_ARG_WITH(ruby-version, +@@ -3736,6 +3734,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 */']) -@@ -3765,30 +3764,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then +@@ -3752,30 +3751,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 78e9697..f4e98ca 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 -@@ -3830,6 +3830,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3817,6 +3817,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 55c7448..2d99287 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 -@@ -3804,6 +3804,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -3791,6 +3791,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='' -@@ -3827,6 +3831,7 @@ AC_SUBST(sitearchdir)dnl +@@ -3814,6 +3818,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-2.2.0-Support-tcl-tk-8.6.patch b/ruby-2.2.0-Support-tcl-tk-8.6.patch deleted file mode 100644 index a77d7ab..0000000 --- a/ruby-2.2.0-Support-tcl-tk-8.6.patch +++ /dev/null @@ -1,183 +0,0 @@ -diff -urN ruby-2.1.3.orig/ext/tk/extconf.rb ruby-2.1.3/ext/tk/extconf.rb ---- ruby-2.1.3.orig/ext/tk/extconf.rb 2013-11-30 11:46:47.000000000 +0900 -+++ ruby-2.1.3/ext/tk/extconf.rb 2014-10-19 17:50:33.045820645 +0900 -@@ -9,10 +9,10 @@ - # %w[8.9 8.8 8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0 7.6 4.2] - # %w[8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0] - # %w[8.7 8.6 8.5 8.4 8.0] # to shorten search steps -- %w[8.5 8.4] # At present, Tcl/Tk8.6 is not supported. -+ %w[8.6 8.5 8.4] - - TkLib_Config['unsupported_versions'] = -- %w[8.8 8.7 8.6] # At present, Tcl/Tk8.6 is not supported. -+ %w[8.8 8.7] - - TkLib_Config['major_nums'] = '87' - -diff -urN ruby-2.1.3.orig/ext/tk/lib/tk.rb ruby-2.1.3/ext/tk/lib/tk.rb ---- ruby-2.1.3.orig/ext/tk/lib/tk.rb 2011-05-27 08:36:33.000000000 +0900 -+++ ruby-2.1.3/ext/tk/lib/tk.rb 2014-10-19 17:48:59.046873862 +0900 -@@ -1309,8 +1309,12 @@ - end - - unless interp.deleted? -- #Thread.current[:status].value = TclTkLib.mainloop(false) -- Thread.current[:status].value = interp.mainloop(false) -+ begin -+ #Thread.current[:status].value = TclTkLib.mainloop(false) -+ Thread.current[:status].value = interp.mainloop(false) -+ rescue Exception=>e -+ puts "ignore exception on interp: #{e.inspect}\n" if $DEBUG -+ end - end - - ensure -@@ -1569,7 +1573,15 @@ - EOL - =end - -- at_exit{ INTERP.remove_tk_procs(TclTkLib::FINALIZE_PROC_NAME) } -+ if !WITH_RUBY_VM || RUN_EVENTLOOP_ON_MAIN_THREAD ### check Ruby 1.9 !!!!!!! -+ at_exit{ INTERP.remove_tk_procs(TclTkLib::FINALIZE_PROC_NAME) } -+ else -+ at_exit{ -+ Tk.root.destroy -+ INTERP.remove_tk_procs(TclTkLib::FINALIZE_PROC_NAME) -+ INTERP_THREAD.kill.join -+ } -+ end - - EventFlag = TclTkLib::EventFlag - -diff -urN ruby-2.1.3.orig/ext/tk/tcltklib.c ruby-2.1.3/ext/tk/tcltklib.c ---- ruby-2.1.3.orig/ext/tk/tcltklib.c 2014-02-10 20:45:14.000000000 +0900 -+++ ruby-2.1.3/ext/tk/tcltklib.c 2014-10-19 19:17:00.014057636 +0900 -@@ -6020,15 +6025,38 @@ - } - - rbtk_eventloop_depth++; -- /* DUMP2("namespace wrapper enter depth == %d", rbtk_eventloop_depth); */ -+ DUMP2("namespace wrapper enter depth == %d", rbtk_eventloop_depth); - - if (info.isNativeObjectProc) { -+#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 6 -+ DUMP1("call a native-object-proc"); - ret = (*(info.objProc))(info.objClientData, interp, objc, objv); -+#else -+ /* Tcl8.6 or later */ -+ int i; -+ Tcl_Obj **cp_objv; -+ char org_ns_cmd_name[] = "__orig_namespace_command__"; -+ -+ DUMP1("call a native-object-proc for tcl8.6 or later"); -+ cp_objv = RbTk_ALLOC_N(Tcl_Obj *, (objc + 1)); -+ -+ cp_objv[0] = Tcl_NewStringObj(org_ns_cmd_name, strlen(org_ns_cmd_name)); -+ for(i = 1; i < objc; i++) { -+ cp_objv[i] = objv[i]; -+ } -+ cp_objv[objc] = (Tcl_Obj *)NULL; -+ -+ /* ret = Tcl_EvalObjv(interp, objc, cp_objv, TCL_EVAL_DIRECT); */ -+ ret = Tcl_EvalObjv(interp, objc, cp_objv, 0); -+ -+ ckfree((char*)cp_objv); -+#endif - } else { - /* string interface */ - int i; - char **argv; - -+ DUMP1("call with the string-interface"); - /* argv = (char **)Tcl_Alloc(sizeof(char *) * (objc + 1)); */ - argv = RbTk_ALLOC_N(char *, (objc + 1)); - #if 0 /* use Tcl_Preserve/Release */ -@@ -6068,6 +6097,8 @@ - Tcl_Interp *interp; - { - #if TCL_MAJOR_VERSION >= 8 -+ -+#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 6 - Tcl_CmdInfo orig_info; - - if (!Tcl_GetCommandInfo(interp, "namespace", &(orig_info))) { -@@ -6084,6 +6115,11 @@ - orig_info.deleteProc); - } - -+#else /* tcl8.6 or later */ -+ Tcl_GlobalEval(interp, "rename namespace __orig_namespace_command__"); -+ -+#endif -+ - Tcl_CreateObjCommand(interp, "namespace", ip_rbNamespaceObjCmd, - (ClientData) 0, (Tcl_CmdDeleteProc *)NULL); - #endif -@@ -8448,15 +8484,28 @@ - #endif - { - struct invoke_info *inf = (struct invoke_info *)arg; -+ -+#if TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION < 6 - int i, len; --#if TCL_MAJOR_VERSION >= 8 - int argc = inf->objc; - char **argv = (char **)NULL; - #endif - -+ DUMP1("call invoke_tcl_proc"); -+ -+#if TCL_MAJOR_VERSION > 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION >= 6) -+ -+ /* eval */ -+ inf->ptr->return_value = Tcl_EvalObjv(inf->ptr->ip, inf->objc, inf->objv, TCL_EVAL_DIRECT); -+ /* inf->ptr->return_value = Tcl_EvalObjv(inf->ptr->ip, inf->objc, inf->objv, 0); */ -+ -+#else /* Tcl/Tk 7.x, 8.0 -- 8.5 */ -+ - /* memory allocation for arguments of this command */ --#if TCL_MAJOR_VERSION >= 8 -+#if TCL_MAJOR_VERSION == 8 -+ /* Tcl/Tk 8.0 -- 8.5 */ - if (!inf->cmdinfo.isNativeObjectProc) { -+ DUMP1("called proc is not a native-obj-proc"); - /* string interface */ - /* argv = (char **)ALLOC_N(char *, argc+1);*/ /* XXXXXXXXXX */ - argv = RbTk_ALLOC_N(char *, (argc+1)); -@@ -8470,11 +8519,14 @@ - } - #endif - -+ DUMP1("reset result of tcl-interp"); - Tcl_ResetResult(inf->ptr->ip); - - /* Invoke the C procedure */ --#if TCL_MAJOR_VERSION >= 8 -+#if TCL_MAJOR_VERSION == 8 -+ /* Tcl/Tk 8.0 -- 8.5 */ - if (inf->cmdinfo.isNativeObjectProc) { -+ DUMP1("call tcl_proc as a native-obj-proc"); - inf->ptr->return_value - = (*(inf->cmdinfo.objProc))(inf->cmdinfo.objClientData, - inf->ptr->ip, inf->objc, inf->objv); -@@ -8482,7 +8534,9 @@ - else - #endif - { --#if TCL_MAJOR_VERSION >= 8 -+#if TCL_MAJOR_VERSION == 8 -+ /* Tcl/Tk 8.0 -- 8.5 */ -+ DUMP1("call tcl_proc as not a native-obj-proc"); - inf->ptr->return_value - = (*(inf->cmdinfo.proc))(inf->cmdinfo.clientData, inf->ptr->ip, - argc, (CONST84 char **)argv); -@@ -8505,6 +8559,9 @@ - #endif - } - -+#endif /* Tcl/Tk 8.6 or later || Tcl 7.x, 8.0 -- 8.5 */ -+ -+ DUMP1("end of invoke_tcl_proc"); - return Qnil; - } - diff --git a/ruby.spec b/ruby.spec index 36b9eba..db01eb3 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 %global minor_version 1 -%global teeny_version 6 +%global teeny_version 7 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -21,10 +21,10 @@ %endif -%global release 30 +%global release 31 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} -%global rubygems_version 2.2.3 +%global rubygems_version 2.2.5 # The RubyGems library has to stay out of Ruby directory three, since the # RubyGems should be share by all Ruby implementations. @@ -109,9 +109,6 @@ 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 -# Fix compatibility with Tcl/Tk 8.6. -# https://bugs.ruby-lang.org/issues/8000 -Patch8: ruby-2.2.0-Support-tcl-tk-8.6.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -373,7 +370,6 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch5 -p1 %patch6 -p1 %patch7 -p1 -%patch8 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -873,6 +869,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Wed Sep 02 2015 Vít Ondruch - 2.1.7-31 +- Update to Ruby 2.1.7. + * Mon Jun 08 2015 Vít Ondruch - 2.1.6-30 - Fix the RubyGems version (rhbz#1226679). diff --git a/sources b/sources index 84ba80d..9114b83 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e1a8e6c6bfbb09bb7f8d6be8f508e4a1 ruby-2.1.6.tar.bz2 +3a878e98311d543e5de3533b82ef4a5a ruby-2.1.7.tar.bz2