From a03b2d278bf4ddd8c06731f202f2f6cc23dac1ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 7 Oct 2013 12:30:18 +0200 Subject: [PATCH 01/30] Update to Ruby 2.1.0.preview1. --- .gitignore | 1 + ruby-1.9.3-always-use-i386.patch | 12 +- ruby-1.9.3-custom-rubygems-location.patch | 82 ++-- ruby-1.9.3-mkmf-verbose.patch | 8 +- ruby-1.9.3.p195-fix-webrick-tests.patch | 14 +- ...ed-paths-when-empty-version-string-i.patch | 124 +++-- ...inst-OpenSSL-with-enabled-ECC-curves.patch | 85 ---- ruby-2.0.0-p195-aarch64.patch | 360 --------------- ...Specification.files-in-default-.gems.patch | 6 +- ...refix-install_dirs-only-with-DESTDIR.patch | 70 --- ...-additional-preludes-by-configuratio.patch | 26 +- ...0-Enable-configuration-of-archlibdir.patch | 28 ++ ....1.0-test_config.rb-fix-library-path.patch | 31 ++ ruby.spec | 72 +-- ...obal-Specification.dirs-during-insta.patch | 149 +----- ...s-2.0.0-Fixes-for-empty-ruby-version.patch | 81 ---- rubygems-2.0.0-binary-extensions.patch | 423 ++++++------------ ...l_require_paths-on-yet-another-place.patch | 71 +++ sources | 2 +- 19 files changed, 480 insertions(+), 1165 deletions(-) delete mode 100644 ruby-2.0.0-p195-Fix-build-against-OpenSSL-with-enabled-ECC-curves.patch delete mode 100644 ruby-2.0.0-p195-aarch64.patch delete mode 100644 ruby-2.0.0-p247-Revert-mkmf.rb-prefix-install_dirs-only-with-DESTDIR.patch create mode 100644 ruby-2.1.0-Enable-configuration-of-archlibdir.patch create mode 100644 ruby-2.1.0-test_config.rb-fix-library-path.patch delete mode 100644 rubygems-2.0.0-Fixes-for-empty-ruby-version.patch create mode 100644 rubygems-2.2.0-DRY-Use-full_require_paths-on-yet-another-place.patch diff --git a/.gitignore b/.gitignore index b883574..b4edb4a 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz /ruby-2.0.0-p0.tar.gz /ruby-2.0.0-p195.tar.bz2 /ruby-2.0.0-p247.tar.bz2 +/ruby-2.1.0-preview1.tar.bz2 diff --git a/ruby-1.9.3-always-use-i386.patch b/ruby-1.9.3-always-use-i386.patch index 8b724a8..10e3d99 100644 --- a/ruby-1.9.3-always-use-i386.patch +++ b/ruby-1.9.3-always-use-i386.patch @@ -1,4 +1,4 @@ -From 796aa193a0e01f3035361f045ac66486d71f608a Mon Sep 17 00:00:00 2001 +From 2089cab72b38d6d5e7ba2b596e41014209acad30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 19 Nov 2012 14:37:28 +0100 Subject: [PATCH] Always use i386. @@ -8,12 +8,12 @@ Subject: [PATCH] Always use i386. 1 file changed, 2 insertions(+) diff --git a/configure.in b/configure.in -index 418b0cb..d26fe5b 100644 +index 553d4d0..03a4152 100644 --- a/configure.in +++ b/configure.in -@@ -3419,6 +3419,8 @@ AC_SUBST(vendorarchdir)dnl - configure_args=$ac_configure_args - AC_SUBST(configure_args)dnl +@@ -3647,6 +3647,8 @@ AC_SUBST(vendorarchdir)dnl + + AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl +target_cpu=`echo $target_cpu | sed s/i.86/i386/` + @@ -21,5 +21,5 @@ index 418b0cb..d26fe5b 100644 arch="universal-${target_os}" AC_CACHE_CHECK(whether __ARCHITECTURE__ is available, rb_cv_architecture_available, -- -1.8.1 +1.8.3.1 diff --git a/ruby-1.9.3-custom-rubygems-location.patch b/ruby-1.9.3-custom-rubygems-location.patch index 90ad58d..05a0d01 100644 --- a/ruby-1.9.3-custom-rubygems-location.patch +++ b/ruby-1.9.3-custom-rubygems-location.patch @@ -1,46 +1,73 @@ -From b5e9dc3683cb085aa57e7b12c35a4f21b2cc1482 Mon Sep 17 00:00:00 2001 +From 94da59aafacc6a9efe829529eb51385588d6f149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 11 Nov 2011 13:14:45 +0100 Subject: [PATCH] Allow to install RubyGems into custom location, outside of Ruby tree. --- - configure.in | 8 ++++++++ - tool/rbinstall.rb | 9 +++++++++ - version.c | 4 ++++ - 3 files changed, 21 insertions(+) + configure.in | 5 +++++ + loadpath.c | 4 ++++ + template/verconf.h.in | 3 +++ + tool/rbinstall.rb | 9 +++++++++ + 4 files changed, 21 insertions(+) diff --git a/configure.in b/configure.in -index 1627d12..e064b2b 100644 +index 03a4152..0e371e2 100644 --- a/configure.in +++ b/configure.in -@@ -3349,6 +3349,13 @@ AC_ARG_WITH(vendorarchdir, +@@ -3621,6 +3621,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}]) +AC_ARG_WITH(rubygemsdir, + AS_HELP_STRING([--with-rubygemsdir=DIR], [custom rubygems directory]), + [rubygemsdir=$withval]) -+if test "$rubygemsdir" != ""; then -+ AC_DEFINE_UNQUOTED(RUBYGEMS_DIR,"$rubygemsdir" !!) -+fi + - unexpand_shvar rubylibprefix exec_prefix libdir RUBY_BASE_NAME - unexpand_shvar rubyarchprefix exec_prefix libdir arch RUBY_BASE_NAME archlibdir rubylibprefix - unexpand_shvar rubysitearchprefix exec_prefix libdir sitearch arch RUBY_BASE_NAME archlibdir sitearchlibdir rubylibprefix -@@ -3415,6 +3422,7 @@ AC_SUBST(sitearchdir)dnl + if test "${LOAD_RELATIVE+set}"; then + AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) + RUBY_EXEC_PREFIX='' +@@ -3644,6 +3648,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl +AC_SUBST(rubygemsdir)dnl - configure_args=$ac_configure_args - AC_SUBST(configure_args)dnl + AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl + +diff --git a/loadpath.c b/loadpath.c +index 623dc9d..74c5d9e 100644 +--- a/loadpath.c ++++ b/loadpath.c +@@ -86,6 +86,10 @@ const char ruby_initial_load_paths[] = + RUBY_VENDOR_LIB "\0" + #endif + ++#ifdef RUBYGEMS_DIR ++ RUBYGEMS_DIR "\0" ++#endif ++ + RUBY_LIB "\0" + #ifdef RUBY_THINARCH + RUBY_ARCH_LIB_FOR(RUBY_THINARCH) "\0" +diff --git a/template/verconf.h.in b/template/verconf.h.in +index 79c003e..34f2382 100644 +--- a/template/verconf.h.in ++++ b/template/verconf.h.in +@@ -34,6 +34,9 @@ + % if C["RUBY_SEARCH_PATH"] + #define RUBY_SEARCH_PATH "${RUBY_SEARCH_PATH}" + % end ++% if C["rubygemsdir"] ++#define RUBYGEMS_DIR "${rubygemsdir}" ++% end + % + % R = {} + % R["ruby_version"] = '"RUBY_LIB_VERSION"' diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb -index 92e54c6..c72dfb6 100755 +index b47b6e1..0b99408 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -313,6 +313,7 @@ sitelibdir = CONFIG["sitelibdir"] +@@ -317,6 +317,7 @@ sitelibdir = CONFIG["sitelibdir"] sitearchlibdir = CONFIG["sitearchdir"] vendorlibdir = CONFIG["vendorlibdir"] vendorarchlibdir = CONFIG["vendorarchdir"] @@ -48,7 +75,7 @@ index 92e54c6..c72dfb6 100755 mandir = CONFIG["mandir", true] docdir = CONFIG["docdir", true] configure_args = Shellwords.shellwords(CONFIG["configure_args"]) -@@ -500,7 +501,15 @@ end +@@ -505,7 +506,15 @@ end install?(:local, :comm, :lib) do prepare "library scripts", rubylibdir noinst = %w[README* *.txt *.rdoc *.gemspec] @@ -64,21 +91,6 @@ index 92e54c6..c72dfb6 100755 end install?(:local, :arch, :lib) do -diff --git a/version.c b/version.c -index 54c4513..d76100b 100644 ---- a/version.c -+++ b/version.c -@@ -99,6 +99,10 @@ const char ruby_initial_load_paths[] = - #endif - #endif - -+#ifdef RUBYGEMS_DIR -+ RUBYGEMS_DIR "\0" -+#endif -+ - RUBY_LIB "\0" - #ifdef RUBY_THINARCH - RUBY_ARCH_LIB_FOR(RUBY_THINARCH) "\0" -- -1.8.1.2 +1.8.3.1 diff --git a/ruby-1.9.3-mkmf-verbose.patch b/ruby-1.9.3-mkmf-verbose.patch index de78ad8..66107c4 100644 --- a/ruby-1.9.3-mkmf-verbose.patch +++ b/ruby-1.9.3-mkmf-verbose.patch @@ -1,4 +1,4 @@ -From ec16398159a161fc77436b4855d489f193b2515b Mon Sep 17 00:00:00 2001 +From 28cc0749d6729aa2444661ee7b411e183fe220b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 19 Nov 2012 15:14:51 +0100 Subject: [PATCH] Verbose mkmf. @@ -8,10 +8,10 @@ Subject: [PATCH] Verbose mkmf. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mkmf.rb b/lib/mkmf.rb -index 4b6c52e..67a15ee 100644 +index 682eb46..e6b1445 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb -@@ -1777,7 +1777,7 @@ SRC +@@ -1828,7 +1828,7 @@ SRC SHELL = /bin/sh # V=0 quiet, V=1 verbose. other values don't work. @@ -21,5 +21,5 @@ index 4b6c52e..67a15ee 100644 Q = $(Q1:0=@) ECHO1 = $(V:1=@#{CONFIG['NULLCMD']}) -- -1.8.1.2 +1.8.3.1 diff --git a/ruby-1.9.3.p195-fix-webrick-tests.patch b/ruby-1.9.3.p195-fix-webrick-tests.patch index b340bff..3b2d6e7 100644 --- a/ruby-1.9.3.p195-fix-webrick-tests.patch +++ b/ruby-1.9.3.p195-fix-webrick-tests.patch @@ -1,5 +1,14 @@ +From 2db9ad4a090d0c82e30afa44c623e3c5c99f7a37 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Mon, 19 Nov 2012 14:37:28 +0100 +Subject: [PATCH] Fix WEBrick tests. + +--- + test/runner.rb | 2 ++ + 1 file changed, 2 insertions(+) + diff --git a/test/runner.rb b/test/runner.rb -index 49844c7..8e59a85 100644 +index 94beb44..db4dfe9 100644 --- a/test/runner.rb +++ b/test/runner.rb @@ -2,6 +2,8 @@ require 'rbconfig' @@ -11,3 +20,6 @@ index 49844c7..8e59a85 100644 src_testdir = File.dirname(File.realpath(__FILE__)) $LOAD_PATH << src_testdir module Gem +-- +1.8.3.1 + diff --git a/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index 58d602d..498a792 100644 --- a/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -1,70 +1,98 @@ -From e943a89efd63dcfb80a0ab8d9a4db37f523f508e Mon Sep 17 00:00:00 2001 +From 35b8c14ddc7f9b38c21c15dfecefa3dff7567981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 8 Feb 2013 22:48:41 +0100 Subject: [PATCH] Prevent duplicated paths when empty version string is configured. --- - configure.in | 3 +++ - version.c | 10 ++++++++++ - 2 files changed, 13 insertions(+) + configure.in | 15 +++++++++------ + loadpath.c | 4 ++++ + 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/configure.in b/configure.in -index 5850bbf..7604bb8 100644 +index 881449e..37d9a62 100644 --- a/configure.in +++ b/configure.in -@@ -3367,6 +3367,9 @@ unexpand_shvar exec_prefix prefix - if test ${RUBY_LIB_VERSION_STYLE+set}; then - AC_DEFINE_UNQUOTED(RUBY_LIB_VERSION_STYLE, $RUBY_LIB_VERSION_STYLE !!) - else -+ if test "x${ruby_version}" = 'x'; then -+ AC_DEFINE(RUBY_LIB_VERSION_BLANK, 1) -+ fi - AC_DEFINE_UNQUOTED(RUBY_LIB_VERSION, [$RUBY_LIB_VERSION] !!) - fi - AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, ${RUBY_EXEC_PREFIX}) -diff --git a/version.c b/version.c -index 282960d..54c4513 100644 ---- a/version.c -+++ b/version.c -@@ -39,9 +39,15 @@ - #define RUBY_VENDOR_LIB RUBY_LIB_PREFIX"/vendor_ruby" - #endif +@@ -3535,8 +3535,6 @@ AC_ARG_WITH(rubylibprefix, + fi + rubylibprefix="$withval"]) + AC_SUBST(rubylibprefix) +-rubylibdir='${rubylibprefix}/${ruby_version}' +-rubyarchdir=${multiarch+'${rubyarchprefix}/${ruby_version}'}${multiarch-'${rubylibdir}/${arch}'} -+#ifdef RUBY_LIB_VERSION_BLANK -+#define RUBY_LIB RUBY_LIB_PREFIX -+#define RUBY_SITE_LIB2 RUBY_SITE_LIB -+#define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB -+#else - #define RUBY_LIB RUBY_LIB_PREFIX "/"RUBY_LIB_VERSION - #define RUBY_SITE_LIB2 RUBY_SITE_LIB "/"RUBY_LIB_VERSION - #define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB "/"RUBY_LIB_VERSION -+#endif - #ifndef RUBY_ARCH_LIB_FOR - #define RUBY_ARCH_LIB_FOR(arch) RUBY_LIB "/"arch + rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} + AC_ARG_WITH(rubyarchprefix, +@@ -3566,6 +3564,7 @@ AC_ARG_WITH(ruby-version, + [ruby_version=full]) + unset RUBY_LIB_VERSION + unset RUBY_LIB_VERSION_STYLE ++ruby_version_suffix=/'${ruby_version}' + AS_CASE(["$ruby_version"], + [full], [RUBY_LIB_VERSION_STYLE='3 /* full */'], + [minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */']) +@@ -3582,30 +3581,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 +- AC_MSG_ERROR([No ruby version, No place for bundled libraries]) ++ unset ruby_version_suffix ++ AC_DEFINE(RUBY_LIB_VERSION_BLANK, 1) + else + RUBY_LIB_VERSION="\"${ruby_version}\"" + fi + AC_SUBST(RUBY_LIB_VERSION_STYLE) + AC_SUBST(RUBY_LIB_VERSION) + ++rubylibdir='${rubylibprefix}'${ruby_version_suffix} ++rubyarchdir=${multiarch+'${rubyarchprefix}'${ruby_version_suffix}}${multiarch-'${rubylibdir}/${arch}'} ++ + AC_ARG_WITH(sitedir, + AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]], "no" to disable site directory]), + [sitedir=$withval], + [sitedir='${rubylibprefix}/site_ruby']) +-sitelibdir='${sitedir}/${ruby_version}' ++sitelibdir='${sitedir}'${ruby_version_suffix} + + AC_ARG_WITH(sitearchdir, + AS_HELP_STRING([--with-sitearchdir=DIR], + [architecture dependent site libraries in DIR [[SITEDIR/SITEARCH]], "no" to disable site directory]), + [sitearchdir=$withval], +- [sitearchdir=${multiarch+'${rubysitearchprefix}/site_ruby/${ruby_version}'}${multiarch-'${sitelibdir}/${sitearch}'}]) ++ [sitearchdir=${multiarch+'${rubysitearchprefix}/site_ruby'${ruby_version_suffix}}${multiarch-'${sitelibdir}/${sitearch}'}]) + + AC_ARG_WITH(vendordir, + AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]], "no" to disable vendor directory]), + [vendordir=$withval], + [vendordir='${rubylibprefix}/vendor_ruby']) +-vendorlibdir='${vendordir}/${ruby_version}' ++vendorlibdir='${vendordir}'${ruby_version_suffix} + + AC_ARG_WITH(vendorarchdir, + AS_HELP_STRING([--with-vendorarchdir=DIR], +diff --git a/loadpath.c b/loadpath.c +index 9160031..623dc9d 100644 +--- a/loadpath.c ++++ b/loadpath.c +@@ -65,7 +65,9 @@ const char ruby_initial_load_paths[] = + RUBY_SEARCH_PATH "\0" #endif -@@ -77,8 +83,10 @@ const char ruby_initial_load_paths[] = + #ifndef NO_RUBY_SITE_LIB ++#ifndef RUBY_LIB_VERSION_BLANK + RUBY_SITE_LIB2 "\0" ++#endif + #ifdef RUBY_THINARCH RUBY_SITE_ARCH_LIB_FOR(RUBY_THINARCH) "\0" #endif - RUBY_SITE_ARCH_LIB_FOR(RUBY_SITEARCH) "\0" -+#ifndef RUBY_LIB_VERSION_BLANK - RUBY_SITE_LIB "\0" +@@ -74,7 +76,9 @@ const char ruby_initial_load_paths[] = #endif -+#endif #ifndef NO_RUBY_VENDOR_LIB ++#ifndef RUBY_LIB_VERSION_BLANK RUBY_VENDOR_LIB2 "\0" -@@ -86,8 +94,10 @@ const char ruby_initial_load_paths[] = ++#endif + #ifdef RUBY_THINARCH RUBY_VENDOR_ARCH_LIB_FOR(RUBY_THINARCH) "\0" #endif - RUBY_VENDOR_ARCH_LIB_FOR(RUBY_SITEARCH) "\0" -+#ifndef RUBY_LIB_VERSION_BLANK - RUBY_VENDOR_LIB "\0" - #endif -+#endif - - RUBY_LIB "\0" - #ifdef RUBY_THINARCH -- -1.8.1.2 +1.8.3.1 diff --git a/ruby-2.0.0-p195-Fix-build-against-OpenSSL-with-enabled-ECC-curves.patch b/ruby-2.0.0-p195-Fix-build-against-OpenSSL-with-enabled-ECC-curves.patch deleted file mode 100644 index 461b787..0000000 --- a/ruby-2.0.0-p195-Fix-build-against-OpenSSL-with-enabled-ECC-curves.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 5617aafa2d44d0a4bc811830e225463abd01b2b2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Tue, 21 May 2013 10:01:33 +0200 -Subject: [PATCH] Fix build against OpenSSL with enabled ECC curves. - ---- - ext/openssl/ossl_pkey_ec.c | 4 ++++ - test/openssl/test_pkey_ec.rb | 26 +++++++++++++------------- - 2 files changed, 17 insertions(+), 13 deletions(-) - -diff --git a/ext/openssl/ossl_pkey_ec.c b/ext/openssl/ossl_pkey_ec.c -index 8e6d88f..29e28ca 100644 ---- a/ext/openssl/ossl_pkey_ec.c -+++ b/ext/openssl/ossl_pkey_ec.c -@@ -762,8 +762,10 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self) - method = EC_GFp_mont_method(); - } else if (id == s_GFp_nist) { - method = EC_GFp_nist_method(); -+#if !defined(OPENSSL_NO_EC2M) - } else if (id == s_GF2m_simple) { - method = EC_GF2m_simple_method(); -+#endif - } - - if (method) { -@@ -817,8 +819,10 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self) - - if (id == s_GFp) { - new_curve = EC_GROUP_new_curve_GFp; -+#if !defined(OPENSSL_NO_EC2M) - } else if (id == s_GF2m) { - new_curve = EC_GROUP_new_curve_GF2m; -+#endif - } else { - ossl_raise(rb_eArgError, "unknown symbol, must be :GFp or :GF2m"); - } -diff --git a/test/openssl/test_pkey_ec.rb b/test/openssl/test_pkey_ec.rb -index f151335..56f3ff7 100644 ---- a/test/openssl/test_pkey_ec.rb -+++ b/test/openssl/test_pkey_ec.rb -@@ -7,28 +7,28 @@ class OpenSSL::TestEC < Test::Unit::TestCase - @data1 = 'foo' - @data2 = 'bar' * 1000 # data too long for DSA sig - -- @group1 = OpenSSL::PKey::EC::Group.new('secp112r1') -- @group2 = OpenSSL::PKey::EC::Group.new('sect163k1') -- @group3 = OpenSSL::PKey::EC::Group.new('prime256v1') -+ @groups = [] -+ @keys = [] - -- @key1 = OpenSSL::PKey::EC.new -- @key1.group = @group1 -- @key1.generate_key -+ OpenSSL::PKey::EC.builtin_curves.each do |curve, comment| -+ group = OpenSSL::PKey::EC::Group.new(curve) - -- @key2 = OpenSSL::PKey::EC.new(@group2.curve_name) -- @key2.generate_key -+ key = OpenSSL::PKey::EC.new(group) -+ key.generate_key - -- @key3 = OpenSSL::PKey::EC.new(@group3) -- @key3.generate_key -- -- @groups = [@group1, @group2, @group3] -- @keys = [@key1, @key2, @key3] -+ @groups << group -+ @keys << key -+ end - end - - def compare_keys(k1, k2) - assert_equal(k1.to_pem, k2.to_pem) - end - -+ def test_builtin_curves -+ assert(!OpenSSL::PKey::EC.builtin_curves.empty?) -+ end -+ - def test_curve_names - @groups.each_with_index do |group, idx| - key = @keys[idx] --- -1.8.2.1 - diff --git a/ruby-2.0.0-p195-aarch64.patch b/ruby-2.0.0-p195-aarch64.patch deleted file mode 100644 index 8009d32..0000000 --- a/ruby-2.0.0-p195-aarch64.patch +++ /dev/null @@ -1,360 +0,0 @@ -diff -urN ruby-2.0.0-p0/tool/config.guess ruby-2.0.0-p0-aarch64/tool/config.guess ---- ruby-2.0.0-p0/tool/config.guess 2012-01-29 07:50:18.000000000 -0600 -+++ ruby-2.0.0-p0-aarch64/tool/config.guess 2013-03-08 07:15:49.233030866 -0600 -@@ -2,9 +2,9 @@ - # Attempt to guess a canonical system name. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, --# 2011 Free Software Foundation, Inc. -+# 2011, 2012 Free Software Foundation, Inc. - --timestamp='2011-11-11' -+timestamp='2012-09-25' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by -@@ -17,9 +17,7 @@ - # General Public License for more details. - # - # You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA --# 02110-1301, USA. -+# along with this program; if not, see . - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a -@@ -57,8 +55,8 @@ - - Originally written by Per Bothner. - Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, --2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free --Software Foundation, Inc. -+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -+Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -@@ -145,7 +143,7 @@ - case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or -- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, -+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward -@@ -202,6 +200,10 @@ - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; -+ *:Bitrig:*:*) -+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` -+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} -+ exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} -@@ -304,7 +306,7 @@ - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; -- arm:riscos:*:*|arm:RISCOS:*:*) -+ arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) -@@ -803,6 +805,9 @@ - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; -+ *:MINGW64*:*) -+ echo ${UNAME_MACHINE}-pc-mingw64 -+ exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; -@@ -863,6 +868,13 @@ - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; -+ aarch64:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; -+ aarch64_be:Linux:*:*) -+ UNAME_MACHINE=aarch64_be -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; -@@ -897,16 +909,16 @@ - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) -- echo cris-axis-linux-gnu -+ echo ${UNAME_MACHINE}-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) -- echo crisv32-axis-linux-gnu -+ echo ${UNAME_MACHINE}-axis-linux-gnu - exit ;; - frv:Linux:*:*) -- echo frv-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - hexagon:Linux:*:*) -- echo hexagon-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - LIBC=gnu -@@ -948,7 +960,7 @@ - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) -- echo or32-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu -@@ -989,7 +1001,7 @@ - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) -- echo x86_64-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -@@ -1196,6 +1208,9 @@ - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; -+ x86_64:Haiku:*:*) -+ echo x86_64-unknown-haiku -+ exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; -@@ -1251,7 +1266,7 @@ - NEO-?:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} - exit ;; -- NSE-?:NONSTOP_KERNEL:*:*) -+ NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) -@@ -1320,11 +1335,11 @@ - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; -+ x86_64:VMkernel:*:*) -+ echo ${UNAME_MACHINE}-unknown-esx -+ exit ;; - esac - --#echo '(No uname command or uname output not recognized.)' 1>&2 --#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 -- - eval $set_cc_for_build - cat >$dummy.c <. - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a -@@ -76,8 +74,8 @@ - GNU config.sub ($timestamp) - - Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, --2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free --Software Foundation, Inc. -+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -+Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -@@ -125,13 +123,17 @@ - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ -- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ -+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; -+ android-linux) -+ os=-linux-android -+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown -+ ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] -@@ -154,7 +156,7 @@ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -- -apple | -axis | -knuth | -cray | -microblaze) -+ -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 - ;; -@@ -223,6 +225,12 @@ - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -+ -lynx*178) -+ os=-lynxos178 -+ ;; -+ -lynx*5) -+ os=-lynxos5 -+ ;; - -lynx*) - os=-lynxos - ;; -@@ -247,6 +255,7 @@ - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ -+ | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ -@@ -264,7 +273,7 @@ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ -- | maxq | mb | microblaze | mcore | mep | metag \ -+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ -@@ -319,8 +328,7 @@ - c6x) - basic_machine=tic6x-unknown - ;; -- m6811 | m68hc11 | m6812 | m68hc12 | picochip) -- # Motorola 68HC11/12. -+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) - basic_machine=$basic_machine-unknown - os=-none - ;; -@@ -333,7 +341,10 @@ - strongarm | thumb | xscale) - basic_machine=arm-unknown - ;; -- -+ xgate) -+ basic_machine=$basic_machine-unknown -+ os=-none -+ ;; - xscaleeb) - basic_machine=armeb-unknown - ;; -@@ -356,6 +367,7 @@ - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ -+ | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ -@@ -377,7 +389,8 @@ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ -+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ -+ | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ -@@ -719,7 +732,6 @@ - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; --# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 -@@ -777,9 +789,13 @@ - basic_machine=ns32k-utek - os=-sysv - ;; -- microblaze) -+ microblaze*) - basic_machine=microblaze-xilinx - ;; -+ mingw64) -+ basic_machine=x86_64-pc -+ os=-mingw64 -+ ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 -@@ -1341,15 +1357,15 @@ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ -- | -openbsd* | -solidbsd* \ -+ | -bitrig* | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -linux-android* \ -- | -linux-newlib* | -linux-uclibc* \ -+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ -+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ -@@ -1532,6 +1548,9 @@ - c4x-* | tic4x-*) - os=-coff - ;; -+ hexagon-*) -+ os=-elf -+ ;; - tic54x-*) - os=-coff - ;; -@@ -1559,9 +1578,6 @@ - ;; - m68000-sun) - os=-sunos3 -- # This also exists in the configure program, but was not the -- # default. -- # os=-sunos4 - ;; - m68*-cisco) - os=-aout diff --git a/ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch b/ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch index 2989954..0abe8bd 100644 --- a/ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch +++ b/ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch @@ -1,4 +1,4 @@ -From fb9fcc8b01d968c62577756cbfd00f20a10b5cbf Mon Sep 17 00:00:00 2001 +From 541f3b85cac00e5b836e018ef8afea4342e0cd39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 9 Jul 2013 12:32:49 +0200 Subject: [PATCH] Make stable Gem::Specification.files in default .gemspecs @@ -11,10 +11,10 @@ possibly conflicting in multilib scenario. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb -index 1063fac..fb2fcee 100755 +index 0b99408..7b54966 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -592,7 +592,7 @@ module RbInstall +@@ -608,7 +608,7 @@ module RbInstall end def collect diff --git a/ruby-2.0.0-p247-Revert-mkmf.rb-prefix-install_dirs-only-with-DESTDIR.patch b/ruby-2.0.0-p247-Revert-mkmf.rb-prefix-install_dirs-only-with-DESTDIR.patch deleted file mode 100644 index fa7d946..0000000 --- a/ruby-2.0.0-p247-Revert-mkmf.rb-prefix-install_dirs-only-with-DESTDIR.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 28e8a4ad0146fef37b514bde9a27ba5b6f7c34c5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Tue, 2 Jul 2013 11:51:50 +0200 -Subject: [PATCH] Revert "mkmf.rb: prefix install_dirs only with DESTDIR" - -This reverts commit 7e1d5045943835ff906850e7b3bc71f985ae5f36. ---- - lib/mkmf.rb | 29 ++++++++++++++--------------- - 1 file changed, 14 insertions(+), 15 deletions(-) - -diff --git a/lib/mkmf.rb b/lib/mkmf.rb -index ee89198..cca487e 100644 ---- a/lib/mkmf.rb -+++ b/lib/mkmf.rb -@@ -189,21 +189,21 @@ module MakeMakefile - ] - elsif $configure_args.has_key?('--vendor') - dirs = [ -- ['BINDIR', '$(DESTDIR)$(bindir)'], -- ['RUBYCOMMONDIR', '$(DESTDIR)$(vendordir)$(target_prefix)'], -- ['RUBYLIBDIR', '$(DESTDIR)$(vendorlibdir)$(target_prefix)'], -- ['RUBYARCHDIR', '$(DESTDIR)$(vendorarchdir)$(target_prefix)'], -- ['HDRDIR', '$(DESTDIR)$(rubyhdrdir)/ruby$(target_prefix)'], -- ['ARCHHDRDIR', '$(DESTDIR)$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'], -+ ['BINDIR', '$(bindir)'], -+ ['RUBYCOMMONDIR', '$(vendordir)$(target_prefix)'], -+ ['RUBYLIBDIR', '$(vendorlibdir)$(target_prefix)'], -+ ['RUBYARCHDIR', '$(vendorarchdir)$(target_prefix)'], -+ ['HDRDIR', '$(rubyhdrdir)/ruby$(target_prefix)'], -+ ['ARCHHDRDIR', '$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'], - ] - else - dirs = [ -- ['BINDIR', '$(DESTDIR)$(bindir)'], -- ['RUBYCOMMONDIR', '$(DESTDIR)$(sitedir)$(target_prefix)'], -- ['RUBYLIBDIR', '$(DESTDIR)$(sitelibdir)$(target_prefix)'], -- ['RUBYARCHDIR', '$(DESTDIR)$(sitearchdir)$(target_prefix)'], -- ['HDRDIR', '$(DESTDIR)$(rubyhdrdir)/ruby$(target_prefix)'], -- ['ARCHHDRDIR', '$(DESTDIR)$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'], -+ ['BINDIR', '$(bindir)'], -+ ['RUBYCOMMONDIR', '$(sitedir)$(target_prefix)'], -+ ['RUBYLIBDIR', '$(sitelibdir)$(target_prefix)'], -+ ['RUBYARCHDIR', '$(sitearchdir)$(target_prefix)'], -+ ['HDRDIR', '$(rubyhdrdir)/ruby$(target_prefix)'], -+ ['ARCHHDRDIR', '$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'], - ] - end - dirs << ['target_prefix', (target_prefix ? "/#{target_prefix}" : "")] -@@ -1728,7 +1728,6 @@ SRC - end - - def with_destdir(dir) -- return dir unless $extmk - dir = dir.sub($dest_prefix_pattern, '') - /\A\$[\(\{]/ =~ dir ? dir : "$(DESTDIR)"+dir - end -@@ -1787,8 +1786,8 @@ ECHO = $(ECHO1:0=@echo) - #### Start of system configuration section. #### - #{"top_srcdir = " + $top_srcdir.sub(%r"\A#{Regexp.quote($topdir)}/", "$(topdir)/") if $extmk} - srcdir = #{srcdir.gsub(/\$\((srcdir)\)|\$\{(srcdir)\}/) {mkintpath(CONFIG[$1||$2]).unspace}} --topdir = #{mkintpath(topdir = $extmk ? CONFIG["topdir"] : $topdir).unspace} --hdrdir = #{(hdrdir = CONFIG["hdrdir"]) == topdir ? "$(topdir)" : mkintpath(hdrdir).unspace} -+topdir = #{mkintpath($extmk ? CONFIG["topdir"] : $topdir).unspace} -+hdrdir = #{mkintpath(CONFIG["hdrdir"]).unspace} - arch_hdrdir = #{$arch_hdrdir.quote} - PATH_SEPARATOR = #{CONFIG['PATH_SEPARATOR']} - VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])} --- -1.8.2.1 - 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 3a36f91..a4a171f 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 @@ -1,8 +1,19 @@ +From 996012f6abe0ce4d68a2de9f249935c6d5b467bc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Fri, 4 Oct 2013 22:13:11 +0200 +Subject: [PATCH] Allow to specify addition preludes by configuration option. + +--- + Makefile.in | 1 + + common.mk | 2 +- + configure.in | 7 +++++++ + 3 files changed, 9 insertions(+), 1 deletion(-) + diff --git a/Makefile.in b/Makefile.in -index a93a1e6..fb30c19 100644 +index 7e8ed82..7916993 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -108,6 +108,7 @@ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@ +@@ -110,6 +110,7 @@ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@ XRUBY_RUBYHDRDIR = @XRUBY_RUBYHDRDIR@ DEFAULT_PRELUDES = $(@USE_RUBYGEMS@_GEM_PRELUDE) @@ -11,10 +22,10 @@ index a93a1e6..fb30c19 100644 #### End of system configuration section. #### diff --git a/common.mk b/common.mk -index e5069e5..ca5e3f9 100644 +index 5cfbc3d..3f0a82e 100644 --- a/common.mk +++ b/common.mk -@@ -107,7 +107,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) +@@ -110,7 +110,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT) @@ -24,10 +35,10 @@ index e5069e5..ca5e3f9 100644 YES_GEM_PRELUDE = $(GEM_PRELUDE) NO_GEM_PRELUDE = diff --git a/configure.in b/configure.in -index 7977aaf..1ef42cd 100644 +index 0e371e2..d4f1dcb 100644 --- a/configure.in +++ b/configure.in -@@ -3494,6 +3494,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -3731,6 +3731,13 @@ AC_SUBST(rubyarchhdrdir)dnl AC_SUBST(sitearchhdrdir)dnl AC_SUBST(vendorarchhdrdir)dnl @@ -41,3 +52,6 @@ index 7977aaf..1ef42cd 100644 AC_ARG_WITH(mantype, AS_HELP_STRING([--with-mantype=TYPE], [specify man page type; TYPE is one of man and doc]), [ +-- +1.8.3.1 + diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch new file mode 100644 index 0000000..668edfa --- /dev/null +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -0,0 +1,28 @@ +From 07c666ba5c3360dd6f43605a8ac7c85c99c1721f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 1 Oct 2013 12:22:40 +0200 +Subject: [PATCH] Allow to configure libruby.so placement. + +--- + configure.in | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/configure.in b/configure.in +index 37d9a62..553d4d0 100644 +--- a/configure.in ++++ b/configure.in +@@ -2956,6 +2956,11 @@ if test ${multiarch+set}; then + fi + + archlibdir='${libdir}/${arch}' ++AC_ARG_WITH(archlibdir, ++ AS_HELP_STRING([--with-archlibdir=DIR], ++ [prefix for libruby [[LIBDIR/ARCH]]]), ++ [archlibdir="$withval"]) ++ + sitearchlibdir='${libdir}/${sitearch}' + archincludedir='${includedir}/${arch}' + sitearchincludedir='${includedir}/${sitearch}' +-- +1.8.3.1 + diff --git a/ruby-2.1.0-test_config.rb-fix-library-path.patch b/ruby-2.1.0-test_config.rb-fix-library-path.patch new file mode 100644 index 0000000..404a278 --- /dev/null +++ b/ruby-2.1.0-test_config.rb-fix-library-path.patch @@ -0,0 +1,31 @@ +From cf26cdec7bcd0668b8f8347a5f29072c8b8f6e8d Mon Sep 17 00:00:00 2001 +From: nobu +Date: Tue, 1 Oct 2013 11:36:47 +0000 +Subject: [PATCH] test_config.rb: fix library path + +* test/mkmf/test_config.rb (test_dir_config): fix expected library + path. [ruby-core:57535] [Bug #8972] + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + test/mkmf/test_config.rb | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/test/mkmf/test_config.rb b/test/mkmf/test_config.rb +index b09dfd6..4a9be57 100644 +--- a/test/mkmf/test_config.rb ++++ b/test/mkmf/test_config.rb +@@ -8,8 +8,9 @@ class TestMkmf < Test::Unit::TestCase + class TestConfig < Test::Unit::TestCase + def test_dir_config + bug8074 = '[Bug #8074]' ++ lib = RbConfig.expand(RbConfig::MAKEFILE_CONFIG["libdir"], "exec_prefix"=>"") + assert_separately %w[-rmkmf - -- --with-foo-dir=/test/foo], %{ +- assert_equal(%w[/test/foo/include /test/foo/lib], dir_config("foo"), #{bug8074.dump}) ++ assert_equal(%w[/test/foo/include /test/foo#{lib}], dir_config("foo"), #{bug8074.dump}) + } + end + end +-- +1.8.3.1 + diff --git a/ruby.spec b/ruby.spec index 9aea8a4..4d796ff 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,7 +1,7 @@ %global major_version 2 -%global minor_version 0 +%global minor_version 1 %global teeny_version 0 -%global patch_level 247 +%global patch_level 0 %global major_minor_version %{major_version}.%{minor_version} @@ -10,7 +10,7 @@ %global ruby_release %{ruby_version} # Specify the named version. It has precedense to revision. -#%%global milestone preview2 +%global milestone preview1 # Keep the revision enabled for pre-releases from SVN. #%%global revision 39387 @@ -26,10 +26,10 @@ %endif -%global release 15 +%global release 16 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} -%global rubygems_version 2.0.3 +%global rubygems_version 2.2.0.preview.1 # The RubyGems library has to stay out of Ruby directory three, since the # RubyGems should be share by all Ruby implementations. @@ -39,12 +39,12 @@ # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. # http://redmine.ruby-lang.org/issues/5313 %global irb_version %{ruby_version_patch_level} -%global rdoc_version 4.0.0 -%global bigdecimal_version 1.2.0 +%global rdoc_version 4.1.0.preview.1 +%global bigdecimal_version 1.2.1 %global io_console_version 0.4.2 %global json_version 1.7.7 -%global minitest_version 4.3.2 -%global psych_version 2.0.0 +%global minitest_version 4.7.5 +%global psych_version 2.0.1 # Might not be needed in the future, if we are lucky enough. # https://bugzilla.redhat.com/show_bug.cgi?id=888262 @@ -114,52 +114,41 @@ source_macros(rpm.expand("%{SOURCE5}")) # http://bugs.ruby-lang.org/issues/7807 Patch0: ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +# Allows to override libruby.so placement. Hopefully we will be able to return +# to plain --with-rubyarchprefix. +# http://bugs.ruby-lang.org/issues/8973 +Patch1: ruby-2.1.0-Enable-configuration-of-archlibdir.patch # Force multiarch directories for i.86 to be always named i386. This solves # some differencies in build between Fedora and RHEL. Patch3: ruby-1.9.3-always-use-i386.patch # Fixes random WEBRick test failures. # https://bugs.ruby-lang.org/issues/6573. Patch5: ruby-1.9.3.p195-fix-webrick-tests.patch +# https://github.com/rubygems/rubygems/pull/667 +Patch7: rubygems-2.2.0-DRY-Use-full_require_paths-on-yet-another-place.patch # Allows to install RubyGems into custom directory, outside of Ruby's tree. # http://redmine.ruby-lang.org/issues/5617 Patch8: ruby-1.9.3-custom-rubygems-location.patch # Add support for installing binary extensions according to FHS. # https://github.com/rubygems/rubygems/issues/210 -# Note that 8th patch might be resolved by -# https://bugs.ruby-lang.org/issues/7897 Patch9: rubygems-2.0.0-binary-extensions.patch # Make mkmf verbose by default Patch12: ruby-1.9.3-mkmf-verbose.patch -# This slightly changes behavior of "gem install --install-dir" behavior. # Without this patch, Specifications.dirs is modified and gems installed on # the system cannot be required anymore. This causes later issues when RDoc # documentation should be generated, since json gem is sudenly not accessible. -# https://github.com/rubygems/rubygems/pull/452 +# https://github.com/rubygems/rubygems/pull/670 Patch13: rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch -# This prevents issues, when ruby configuration specifies --with-ruby-version=''. -# https://github.com/rubygems/rubygems/pull/455 -Patch14: rubygems-2.0.0-Fixes-for-empty-ruby-version.patch -# Although this does not directly affects Fedora ATM, it might be issue when -# rebuilding package on different platform (RHEL7). Please keep the patch until -# it is resolved in upstream. -# https://bugs.ruby-lang.org/issues/8384 -Patch15: ruby-2.0.0-p195-Fix-build-against-OpenSSL-with-enabled-ECC-curves.patch -# Adds aarch64 support. -# http://bugs.ruby-lang.org/issues/8331 -# https://bugzilla.redhat.com/show_bug.cgi?id=926463 -# Please note that this is the BZ patch, it might be good idea to update it -# with its upstream version when available. -Patch16: ruby-2.0.0-p195-aarch64.patch # Adds support for '--with-prelude' configuration option. This allows to built # in support for ABRT. # http://bugs.ruby-lang.org/issues/8566 Patch17: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch -# Fixes issues with DESTDIR. -# https://bugs.ruby-lang.org/issues/8115 -Patch18: ruby-2.0.0-p247-Revert-mkmf.rb-prefix-install_dirs-only-with-DESTDIR.patch # Fixes multilib conlicts of .gemspec files. # https://bugs.ruby-lang.org/issues/8623 Patch19: ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch +# TestMkmf::TestConfig#test_dir_config fails on x86_64. +# http://bugs.ruby-lang.org/issues/8972 +Patch20: ruby-2.1.0-test_config.rb-fix-library-path.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -417,18 +406,17 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %setup -q -n %{ruby_archive} %patch0 -p1 +%patch1 -p1 %patch3 -p1 %patch5 -p1 +%patch7 -p1 %patch8 -p1 %patch9 -p1 %patch12 -p1 %patch13 -p1 -%patch14 -p1 -%patch15 -p1 -%patch16 -p1 %patch17 -p1 -%patch18 -p1 %patch19 -p1 +%patch20 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -443,6 +431,7 @@ autoconf %configure \ --with-rubylibprefix='%{ruby_libdir}' \ + --with-archlibdir='%{_libdir}' \ --with-rubyarchprefix='%{ruby_libarchdir}' \ --with-sitedir='%{ruby_sitelibdir}' \ --with-sitearchdir='%{ruby_sitearchdir}' \ @@ -460,7 +449,10 @@ autoconf --enable-multiarch \ --with-prelude=./abrt_prelude.rb \ - +# This avoids regeneration of sizes.c (BASERUBY is needed for that), when +# configure.in has newer timestamp the sizes.c (after patch is applied). +# http://bugs.ruby-lang.org/issues/8968 +touch sizes.c # Q= makes the build output more verbose and allows to check Fedora # compiler options. @@ -600,6 +592,12 @@ DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS" # the test suite). touch abrt.rb +# Fix "./ruby: error while loading shared libraries: libruby.so.2.1: cannot open +# shared object file: No such file or directory" error. +# http://bugs.ruby-lang.org/issues/8971 +# Fixed in rev43129. +sed -i '/yes-test-sample/,/test-knownbugs/ s/MINIRUBY/RUNRUBY/' uncommon.mk + make check TESTS="-v $DISABLE_TESTS" %post libs -p /sbin/ldconfig @@ -785,6 +783,7 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libarchdir}/strscan.so %{ruby_libarchdir}/syslog.so %exclude %{ruby_libarchdir}/tcltklib.so +%{ruby_libarchdir}/thread.so %exclude %{ruby_libarchdir}/tkutil.so %{ruby_libarchdir}/zlib.so @@ -893,6 +892,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon Oct 07 2013 Vít Ondruch - 2.1.0.0-0.16.preview1 +- Update to Ruby 2.1.0.preview1. + * Tue Jul 30 2013 Vít Ondruch - 2.0.0.247-15 - Move Psych symlinks to vendor dir, to prevent F18 -> F19 upgrade issues (rhbz#988490). diff --git a/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch b/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch index 607e028..ad0f0bf 100644 --- a/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch +++ b/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch @@ -1,152 +1,29 @@ -From b95b9942361104dc5b7fd08eb4970f893d8c1a54 Mon Sep 17 00:00:00 2001 +From ad80fb9ffe5ab73e05784237de8d8b7d03784867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Wed, 13 Feb 2013 13:12:30 +0100 -Subject: [PATCH 1/3] Remove duplicated check. +Date: Fri, 4 Oct 2013 22:13:11 +0200 +Subject: [PATCH] Do not modify global Specification.dirs during installation. -The loaded specifications are rejected already in #gather_dependencies, -so this condition cannot trigger. --- - lib/rubygems/dependency_installer.rb | 3 --- - 1 file changed, 3 deletions(-) + lib/rubygems/dependency_installer.rb | 6 ------ + 1 file changed, 6 deletions(-) diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb -index d811f62..dffa8df 100644 +index e7c489a..5123fce 100644 --- a/lib/rubygems/dependency_installer.rb +++ b/lib/rubygems/dependency_installer.rb -@@ -330,9 +330,6 @@ class Gem::DependencyInstaller +@@ -74,12 +74,6 @@ class Gem::DependencyInstaller + @only_install_dir = !!options[:install_dir] + @install_dir = options[:install_dir] || Gem.dir - last = @gems_to_install.size - 1 - @gems_to_install.each_with_index do |spec, index| -- # REFACTOR more current spec set hardcoding, should be abstracted? -- next if Gem::Specification.include?(spec) and index != last -- - # TODO: make this sorta_verbose so other users can benefit from it - say "Installing gem #{spec.full_name}" if Gem.configuration.really_verbose - --- -1.8.1.2 - - -From 2fa9087b1986db6c7945c0f997fed2bfff5ce06a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Wed, 13 Feb 2013 15:47:47 +0100 -Subject: [PATCH 2/3] Do not modify global Specification.dirs during - installation. - -While gems are installed into --install-dir just fine even without -modifications of Specification.dirs, change in it makes inaccessible -gems already present on the system. ---- - lib/rubygems/dependency_installer.rb | 15 ++++++--------- - 1 file changed, 6 insertions(+), 9 deletions(-) - -diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb -index dffa8df..841f26a 100644 ---- a/lib/rubygems/dependency_installer.rb -+++ b/lib/rubygems/dependency_installer.rb -@@ -57,17 +57,14 @@ class Gem::DependencyInstaller - # :build_args:: See Gem::Installer::new - - def initialize(options = {}) -- @install_dir = options[:install_dir] || Gem.dir - - if options[:install_dir] then +- if options[:install_dir] then - # HACK shouldn't change the global settings, needed for -i behavior - # maybe move to the install command? See also github #442 - Gem::Specification.dirs = @install_dir -- Gem.ensure_gem_subdirectories @install_dir -+ Gem.ensure_gem_subdirectories options[:install_dir] - end - +- end +- options = DEFAULT_OPTIONS.merge options -+ @install_dir = options[:install_dir] @bin_dir = options[:bin_dir] - @dev_shallow = options[:dev_shallow] - @development = options[:development] -@@ -92,7 +89,7 @@ class Gem::DependencyInstaller - @installed_gems = [] - @toplevel_specs = nil - -- @cache_dir = options[:cache_dir] || @install_dir -+ @cache_dir = options[:cache_dir] || @install_dir || Gem.dir - - # Set with any errors that SpecFetcher finds while search through - # gemspecs for a dep -@@ -202,7 +199,7 @@ class Gem::DependencyInstaller - # that this isn't dependent only on the currently installed gems - dependency_list.specs.reject! { |spec| - not keep_names.include?(spec.full_name) and -- Gem::Specification.include?(spec) -+ (!@install_dir && Gem::Specification.include?(spec)) - } - - unless dependency_list.ok? or @ignore_dependencies or @force then -@@ -254,7 +251,7 @@ class Gem::DependencyInstaller - to_do.push t.spec - end - -- results.remove_installed! dep -+ results.remove_installed! dep unless @install_dir - - @available << results - results.inject_into_list dependency_list -@@ -360,7 +357,7 @@ class Gem::DependencyInstaller - :force => @force, - :format_executable => @format_executable, - :ignore_dependencies => @ignore_dependencies, -- :install_dir => @install_dir, -+ :install_dir => (@install_dir || Gem.dir), - :security_policy => @security_policy, - :user_install => @user_install, - :wrappers => @wrappers, -- -1.8.1.2 - - -From d473204ce920702dd87257db49355929f31530d4 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Fri, 15 Feb 2013 17:02:44 +0100 -Subject: [PATCH 3/3] Default to Gem.dir as late as possible. - ---- - lib/rubygems/dependency_installer.rb | 2 +- - lib/rubygems/installer.rb | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb -index 841f26a..abcfa0f 100644 ---- a/lib/rubygems/dependency_installer.rb -+++ b/lib/rubygems/dependency_installer.rb -@@ -357,7 +357,7 @@ class Gem::DependencyInstaller - :force => @force, - :format_executable => @format_executable, - :ignore_dependencies => @ignore_dependencies, -- :install_dir => (@install_dir || Gem.dir), -+ :install_dir => @install_dir, - :security_policy => @security_policy, - :user_install => @user_install, - :wrappers => @wrappers, -diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb -index 780a88b..6543130 100644 ---- a/lib/rubygems/installer.rb -+++ b/lib/rubygems/installer.rb -@@ -537,13 +537,13 @@ class Gem::Installer - :bin_dir => nil, - :env_shebang => false, - :force => false, -- :install_dir => Gem.dir, - :only_install_dir => false - }.merge options - - @env_shebang = options[:env_shebang] - @force = options[:force] -- @gem_home = options[:install_dir] -+ @install_dir = options[:install_dir] -+ @gem_home = options[:install_dir] || Gem.dir - @ignore_dependencies = options[:ignore_dependencies] - @format_executable = options[:format_executable] - @security_policy = options[:security_policy] --- -1.8.1.2 +1.8.3.1 diff --git a/rubygems-2.0.0-Fixes-for-empty-ruby-version.patch b/rubygems-2.0.0-Fixes-for-empty-ruby-version.patch deleted file mode 100644 index e443a46..0000000 --- a/rubygems-2.0.0-Fixes-for-empty-ruby-version.patch +++ /dev/null @@ -1,81 +0,0 @@ -From c9b2eff36728266052ccfff54d3ac0a0624fd0f1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Thu, 14 Feb 2013 11:50:41 +0100 -Subject: [PATCH 1/2] Use File.join insteado of manual path creation. - -This prevents issues, when File.join in #new_default_spec removes -superfluous slashes while they are kept in expected paths. E.g. the test -would fail if ruby configuration specifies --with-ruby-version=''. ---- - test/rubygems/test_gem_commands_contents_command.rb | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/test/rubygems/test_gem_commands_contents_command.rb b/test/rubygems/test_gem_commands_contents_command.rb -index 60df53f..35c9631 100644 ---- a/test/rubygems/test_gem_commands_contents_command.rb -+++ b/test/rubygems/test_gem_commands_contents_command.rb -@@ -140,10 +140,10 @@ lib/foo.rb - @cmd.execute - end - -- expected = %W[ -- #{Gem::ConfigMap[:bindir]}/default_command -- #{Gem::ConfigMap[:rubylibdir]}/default/gem.rb -- #{Gem::ConfigMap[:archdir]}/default_gem.so -+ expected = [ -+ File.join(Gem::ConfigMap[:bindir], 'default_command'), -+ File.join(Gem::ConfigMap[:rubylibdir], 'default/gem.rb'), -+ File.join(Gem::ConfigMap[:archdir], 'default_gem.so') - ].sort.join "\n" - - assert_equal expected, @ui.output.chomp --- -1.8.1.2 - - -From b022cef7b2e6c2d138388a6c2db02cca8c408cc6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Thu, 14 Feb 2013 13:35:20 +0100 -Subject: [PATCH 2/2] Do not add last slash to Gem.user_dir if ruby_version - string is empty. - ---- - lib/rubygems/defaults.rb | 4 +++- - test/rubygems/test_gem.rb | 6 ++++-- - 2 files changed, 7 insertions(+), 3 deletions(-) - -diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb -index ea84e5c..05c35bb 100644 ---- a/lib/rubygems/defaults.rb -+++ b/lib/rubygems/defaults.rb -@@ -54,7 +54,9 @@ module Gem - # Path for gems in the user's home directory - - def self.user_dir -- File.join Gem.user_home, '.gem', ruby_engine, ConfigMap[:ruby_version] -+ parts = [Gem.user_home, '.gem', ruby_engine] -+ parts << ConfigMap[:ruby_version] unless ConfigMap[:ruby_version].empty? -+ File.join parts - end - - ## -diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb -index bf77009..9ee78f7 100644 ---- a/test/rubygems/test_gem.rb -+++ b/test/rubygems/test_gem.rb -@@ -1198,8 +1198,10 @@ class TestGem < Gem::TestCase - end - - def test_self_user_dir -- assert_equal File.join(@userhome, '.gem', Gem.ruby_engine, -- Gem::ConfigMap[:ruby_version]), Gem.user_dir -+ parts = [@userhome, '.gem', Gem.ruby_engine] -+ parts << Gem::ConfigMap[:ruby_version] unless Gem::ConfigMap[:ruby_version].empty? -+ -+ assert_equal File.join(parts), Gem.user_dir - end - - def test_self_user_home --- -1.8.1.2 - diff --git a/rubygems-2.0.0-binary-extensions.patch b/rubygems-2.0.0-binary-extensions.patch index 4876d35..5c212e7 100644 --- a/rubygems-2.0.0-binary-extensions.patch +++ b/rubygems-2.0.0-binary-extensions.patch @@ -1,258 +1,97 @@ -From ec90622235ae19b28a327cb50a10e0311e8f3d71 Mon Sep 17 00:00:00 2001 +From 37cd8547d23973a7ec23a004ab9b60738d67ada9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 3 Nov 2011 16:43:05 +0100 -Subject: [PATCH 1/8] Add dedicate extensions folder into $LOAD_PATH. +Subject: [PATCH] Add dedicate extensions folder into $LOAD_PATH. --- - lib/rubygems/specification.rb | 32 ++++++++++++++++++++++++++++++-- - 1 file changed, 30 insertions(+), 2 deletions(-) + lib/rubygems/basic_specification.rb | 35 ++++++++++++++++++++++++++++++++--- + lib/rubygems/defaults.rb | 11 +++++++++++ + lib/rubygems/ext/builder.rb | 6 +++++- + lib/rubygems/installer.rb | 1 + + lib/rubygems/specification.rb | 7 +++++++ + lib/rubygems/uninstaller.rb | 1 + + 6 files changed, 57 insertions(+), 4 deletions(-) -diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb -index cabdf8d..87b14d2 100644 ---- a/lib/rubygems/specification.rb -+++ b/lib/rubygems/specification.rb -@@ -1256,6 +1256,12 @@ class Gem::Specification - File.join full_gem_path, path - end - -+ unless extensions.empty? -+ paths += require_paths.map do |path| -+ File.join ext_dir, path -+ end -+ end -+ - # gem directories must come after -I and ENV['RUBYLIB'] - insert_index = Gem.load_path_insert_index - -@@ -1374,11 +1380,16 @@ class Gem::Specification - - def contains_requirable_file? file - root = full_gem_path -+ ext = ext_dir - suffixes = Gem.suffixes - - require_paths.any? do |lib| -- base = "#{root}/#{lib}/#{file}" -- suffixes.any? { |suf| File.file? "#{base}#{suf}" } -+ base = ["#{root}/#{lib}/#{file}"] -+ base << "#{ext}/#{lib}/#{file}" unless extensions.empty? -+ -+ base.any? do |path| -+ suffixes.any? { |suf| File.file? "#{path}#{suf}" } -+ end - end +diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb +index a10eab3..da3af91 100644 +--- a/lib/rubygems/basic_specification.rb ++++ b/lib/rubygems/basic_specification.rb +@@ -51,6 +51,14 @@ class Gem::BasicSpecification + File.dirname(loaded_from) == self.class.default_specifications_dir end -@@ -1674,6 +1685,23 @@ class Gem::Specification - end - - ## -+ # Returns the full path to this spec's ext directory. -+ # eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0 -+ -+ def ext_dir -+ @gem_dir ||= File.expand_path File.join(exts_dir, full_name) -+ end -+ + ## + # Returns the full path to the exts directory containing this spec's + # gem directory. eg: /usr/local/lib/ruby/1.8/exts + + def exts_dir -+ # TODO: this logic seems terribly broken, but tests fail if just base_dir -+ @exts_dir ||= File.join(loaded_from && base_dir || Gem.dir, "exts") ++ @exts_dir ||= Gem.default_ext_dir_for(base_dir) || gems_dir ++ end ++ + def find_full_gem_path # :nodoc: + # TODO: also, shouldn't it default to full_name if it hasn't been written? + path = File.expand_path File.join(gems_dir, full_name) +@@ -60,6 +68,15 @@ class Gem::BasicSpecification + + private :find_full_gem_path + ++ def find_full_gem_ext_path # :nodoc: ++ # TODO: skip for gems without extensions. ++ path = File.expand_path File.join(exts_dir, full_name) ++ path.untaint ++ path if File.directory? path ++ end ++ ++ private :find_full_gem_ext_path ++ + ## + # The full path to the gem (install path + full name). + +@@ -70,6 +87,13 @@ class Gem::BasicSpecification + end + + ## ++ # The full path to the gem binary extension (install path + full name). ++ ++ def full_gem_ext_path ++ @full_gem_ext_path ||= find_full_gem_ext_path + end + + ## - # Deprecated and ignored, defaults to true. + # Returns the full name (name-version) of this Gem. Platform information + # is included (name-version-platform) if it is specified and not the + # default Ruby platform. +@@ -88,9 +112,12 @@ class Gem::BasicSpecification # - # Formerly used to indicate this gem was RDoc-capable. --- -1.8.1.2 - - -From e42819f32fc5d935f7e7189ec4be8bdab0a2cf3f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Wed, 16 Nov 2011 13:26:48 +0100 -Subject: [PATCH 2/8] Use spec's ext dir for extension installation. - ---- - lib/rubygems/installer.rb | 2 +- - lib/rubygems/specification.rb | 7 +++---- - 2 files changed, 4 insertions(+), 5 deletions(-) - -diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb -index 780a88b..854c177 100644 ---- a/lib/rubygems/installer.rb -+++ b/lib/rubygems/installer.rb -@@ -646,7 +646,7 @@ TEXT - say "This could take a while..." - end -- dest_path = File.join gem_dir, spec.require_paths.first -+ dest_path = spec.ext_dir - ran_rake = false # only run rake once - - spec.extensions.each do |extension| -diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb -index 87b14d2..492ddbe 100644 ---- a/lib/rubygems/specification.rb -+++ b/lib/rubygems/specification.rb -@@ -1689,16 +1689,15 @@ class Gem::Specification - # eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0 - - def ext_dir -- @gem_dir ||= File.expand_path File.join(exts_dir, full_name) -+ @ext_dir ||= File.join exts_dir, full_name, require_paths.first - end - - ## - # Returns the full path to the exts directory containing this spec's -- # gem directory. eg: /usr/local/lib/ruby/1.8/exts -+ # gem directory. eg: /usr/local/lib/ruby/1.8/gems - - def exts_dir -- # TODO: this logic seems terribly broken, but tests fail if just base_dir -- @exts_dir ||= File.join(loaded_from && base_dir || Gem.dir, "exts") -+ @exts_dir ||= gems_dir - end - - ## --- -1.8.1.2 - - -From 0e9dd0655111f7dda805233c79a3771459d9a66a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Wed, 16 Nov 2011 14:52:16 +0100 -Subject: [PATCH 3/9] Simplify the extending of $LOAD_PATH for binary gems. - ---- - lib/rubygems/specification.rb | 11 +++++------ - 1 file changed, 5 insertions(+), 6 deletions(-) - -diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb -index 492ddbe..c703827 100644 ---- a/lib/rubygems/specification.rb -+++ b/lib/rubygems/specification.rb -@@ -1256,11 +1256,7 @@ class Gem::Specification - File.join full_gem_path, path - end - -- unless extensions.empty? -- paths += require_paths.map do |path| -- File.join ext_dir, path -- end + def full_require_paths +- require_paths.map do |path| +- File.join full_gem_path, path - end -+ paths << ext_dir unless extensions.empty? || paths.include?(ext_dir) - - # gem directories must come after -I and ENV['RUBYLIB'] - insert_index = Gem.load_path_insert_index -@@ -1697,7 +1693,10 @@ class Gem::Specification - # gem directory. eg: /usr/local/lib/ruby/1.8/gems - - def exts_dir -- @exts_dir ||= gems_dir -+ @exts_dir ||= begin -+ dirs = Gem.default_dirs.detect {|location, paths| paths[:gem_dir] == base_dir} -+ dirs ? File.join(dirs.last[:ext_dir], 'exts') : gems_dir -+ end ++ require_paths.map do |require_path| ++ full_gem_paths = [full_gem_path, full_gem_ext_path] ++ full_gem_paths.compact! ++ ++ full_gem_paths.map { |path| File.join path, require_path } ++ end.flatten end ## --- -1.8.1.2 - - -From 9a8556c609e800d0dbd24af416d613f2e82f323c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Fri, 9 Dec 2011 16:31:04 +0100 -Subject: [PATCH 4/8] Fix the binary extension search path construction. - ---- - lib/rubygems/installer.rb | 2 +- - lib/rubygems/specification.rb | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb -index 854c177..f1f2ad7 100644 ---- a/lib/rubygems/installer.rb -+++ b/lib/rubygems/installer.rb -@@ -646,7 +646,7 @@ TEXT - say "This could take a while..." - end +@@ -110,7 +137,9 @@ class Gem::BasicSpecification + @loaded_from = path && path.to_s -- dest_path = spec.ext_dir -+ dest_path = File.join spec.ext_dir, spec.require_paths.first - ran_rake = false # only run rake once - - spec.extensions.each do |extension| -diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb -index c703827..fa9ea6e 100644 ---- a/lib/rubygems/specification.rb -+++ b/lib/rubygems/specification.rb -@@ -1256,7 +1256,7 @@ class Gem::Specification - File.join full_gem_path, path - end - -- paths << ext_dir unless extensions.empty? || paths.include?(ext_dir) -+ paths << File.join(ext_dir, require_paths.first) unless extensions.empty? || (ext_dir == full_gem_path) - - # gem directories must come after -I and ENV['RUBYLIB'] - insert_index = Gem.load_path_insert_index -@@ -1685,7 +1685,7 @@ class Gem::Specification - # eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0 - - def ext_dir -- @ext_dir ||= File.join exts_dir, full_name, require_paths.first -+ @ext_dir ||= File.join exts_dir, full_name + @full_gem_path = nil ++ @full_gem_ext_path = nil + @gems_dir = nil ++ @exts_dir = nil + @base_dir = nil end - ## --- -1.8.1.2 - - -From 476c2f90cc6f5f490858f253a9b23eb19d53d2fc Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Tue, 13 Dec 2011 12:14:54 +0100 -Subject: [PATCH 5/8] Remove binary extensions during uninstall. - ---- - lib/rubygems/uninstaller.rb | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb -index d672b9d..5c31a0c 100644 ---- a/lib/rubygems/uninstaller.rb -+++ b/lib/rubygems/uninstaller.rb -@@ -246,6 +246,7 @@ class Gem::Uninstaller - File.writable?(spec.base_dir) - - FileUtils.rm_rf spec.full_gem_path -+ FileUtils.rm_rf spec.ext_dir - - # TODO: should this be moved to spec?... I vote eww (also exists in docmgr) - old_platform_name = [spec.name, --- -1.8.1.2 - - -From 35dc17e86f701fe1be80d98ace79735c535fd570 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Tue, 13 Dec 2011 14:27:14 +0100 -Subject: [PATCH 6/8] Avoid dependency on customized operating_system.rb. - ---- - lib/rubygems/defaults.rb | 11 +++++++++++ - lib/rubygems/specification.rb | 5 +---- - 2 files changed, 12 insertions(+), 4 deletions(-) - diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb -index ea84e5c..b221954 100644 +index 591580b..8ed474f 100644 --- a/lib/rubygems/defaults.rb +++ b/lib/rubygems/defaults.rb -@@ -101,6 +101,17 @@ module Gem +@@ -111,6 +111,17 @@ module Gem end ## @@ -270,75 +109,71 @@ index ea84e5c..b221954 100644 # A wrapper around RUBY_ENGINE const that may not be defined def self.ruby_engine -diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb -index fa9ea6e..2b10499 100644 ---- a/lib/rubygems/specification.rb -+++ b/lib/rubygems/specification.rb -@@ -1693,10 +1693,7 @@ class Gem::Specification - # gem directory. eg: /usr/local/lib/ruby/1.8/gems +diff --git a/lib/rubygems/ext/builder.rb b/lib/rubygems/ext/builder.rb +index 8c05723..75d5fc2 100644 +--- a/lib/rubygems/ext/builder.rb ++++ b/lib/rubygems/ext/builder.rb +@@ -170,7 +170,7 @@ EOF + say "This could take a while..." + end - def exts_dir -- @exts_dir ||= begin -- dirs = Gem.default_dirs.detect {|location, paths| paths[:gem_dir] == base_dir} -- dirs ? File.join(dirs.last[:ext_dir], 'exts') : gems_dir -- end -+ @exts_dir ||= Gem.default_ext_dir_for(base_dir) || gems_dir +- dest_path = File.join @gem_dir, @spec.require_paths.first ++ dest_path = File.join(@only_install_dir ? @gem_dir : @spec.ext_dir, @spec.require_paths.first) + + @ran_rake = false # only run rake once + +@@ -181,5 +181,9 @@ EOF + end end ++ def only_install_dir= only_install_dir ++ @only_install_dir = only_install_dir ++ end ++ + end + +diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb +index 261af89..a6aca5d 100644 +--- a/lib/rubygems/installer.rb ++++ b/lib/rubygems/installer.rb +@@ -662,6 +662,7 @@ TEXT + + def build_extensions + builder = Gem::Ext::Builder.new spec, @build_args ++ builder.only_install_dir = @only_install_dir + + builder.build_extensions + end +diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb +index deac343..b630fa3 100644 +--- a/lib/rubygems/specification.rb ++++ b/lib/rubygems/specification.rb +@@ -1612,6 +1612,13 @@ class Gem::Specification < Gem::BasicSpecification + @executables = Array(value) + end + ++ # Returns the full path to this spec's ext directory. ++ # eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0 ++ ++ def ext_dir ++ @ext_dir ||= File.expand_path File.join(exts_dir, full_name) ++ end ++ ## + # Sets extensions to +extensions+, ensuring it is an array. Don't + # use this, push onto the array instead. +diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb +index 143ab6d..f81a23d 100644 +--- a/lib/rubygems/uninstaller.rb ++++ b/lib/rubygems/uninstaller.rb +@@ -247,6 +247,7 @@ class Gem::Uninstaller + File.writable?(spec.base_dir) + + FileUtils.rm_rf spec.full_gem_path ++ FileUtils.rm_rf spec.ext_dir + + # TODO: should this be moved to spec?... I vote eww (also exists in docmgr) + old_platform_name = [spec.name, -- -1.8.1.2 - - -From 0937c0b0a3c2ed08ab5b0875f7f95e24157525c2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Thu, 7 Feb 2013 13:07:34 +0100 -Subject: [PATCH 7/8] Fix binary extensions installation when --install-dir is - specified. - ---- - lib/rubygems/installer.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb -index f1f2ad7..e1577fc 100644 ---- a/lib/rubygems/installer.rb -+++ b/lib/rubygems/installer.rb -@@ -646,7 +646,7 @@ TEXT - say "This could take a while..." - end - -- dest_path = File.join spec.ext_dir, spec.require_paths.first -+ dest_path = File.join(options[:install_dir] ? gem_dir : spec.ext_dir, spec.require_paths.first) - ran_rake = false # only run rake once - - spec.extensions.each do |extension| --- -1.8.1.2 - - -From 062a11c59731f5875d5a8821a212c8a41cb84577 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Fri, 15 Feb 2013 17:07:07 +0100 -Subject: [PATCH 8/8] Use correct option. - ---- - lib/rubygems/installer.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb -index e1577fc..1492c68 100644 ---- a/lib/rubygems/installer.rb -+++ b/lib/rubygems/installer.rb -@@ -646,7 +646,7 @@ TEXT - say "This could take a while..." - end - -- dest_path = File.join(options[:install_dir] ? gem_dir : spec.ext_dir, spec.require_paths.first) -+ dest_path = File.join(@install_dir ? gem_dir : spec.ext_dir, spec.require_paths.first) - ran_rake = false # only run rake once - - spec.extensions.each do |extension| --- -1.8.1.2 +1.8.3.1 diff --git a/rubygems-2.2.0-DRY-Use-full_require_paths-on-yet-another-place.patch b/rubygems-2.2.0-DRY-Use-full_require_paths-on-yet-another-place.patch new file mode 100644 index 0000000..a6766bc --- /dev/null +++ b/rubygems-2.2.0-DRY-Use-full_require_paths-on-yet-another-place.patch @@ -0,0 +1,71 @@ +From 02f94e96ea6a9e0fe37341eccd83ffb63549ead5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Thu, 3 Oct 2013 14:15:59 +0200 +Subject: [PATCH] DRY: Use full_require_paths on yet another place. + +--- + lib/rubygems/basic_specification.rb | 16 +++++++++++++--- + lib/rubygems/specification.rb | 11 ----------- + 2 files changed, 13 insertions(+), 14 deletions(-) + +diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb +index 24bb4bc..a10eab3 100644 +--- a/lib/rubygems/basic_specification.rb ++++ b/lib/rubygems/basic_specification.rb +@@ -38,11 +38,10 @@ class Gem::BasicSpecification + # Return true if this spec can require +file+. + + def contains_requirable_file? file +- root = full_gem_path + suffixes = Gem.suffixes + +- require_paths.any? do |lib| +- base = "#{root}/#{lib}/#{file}" ++ full_require_paths.any? do |path| ++ base = "#{path}/#{file}" + suffixes.any? { |suf| File.file? "#{base}#{suf}" } + end + end +@@ -84,6 +83,17 @@ class Gem::BasicSpecification + end + + ## ++ # Full paths in the gem to add to $LOAD_PATH when this gem is ++ # activated. ++ # ++ ++ def full_require_paths ++ require_paths.map do |path| ++ File.join full_gem_path, path ++ end ++ end ++ ++ ## + # Returns the full path to the gems directory containing this spec's + # gem directory. eg: /usr/local/lib/ruby/1.8/gems + +diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb +index 6de8c3b..deac343 100644 +--- a/lib/rubygems/specification.rb ++++ b/lib/rubygems/specification.rb +@@ -2015,17 +2015,6 @@ class Gem::Specification < Gem::BasicSpecification + end + + ## +- # Full paths in the gem to add to $LOAD_PATH when this gem is +- # activated. +- # +- +- def full_require_paths +- require_paths.map do |path| +- File.join full_gem_path, path +- end +- end +- +- ## + # The RubyGems version required by this gem + + def required_rubygems_version= req +-- +1.8.3.1 + diff --git a/sources b/sources index 44c414b..ca481bf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -60913f3eec0c4071f44df42600be2604 ruby-2.0.0-p247.tar.bz2 +d32d1ea23988399afadbd21c5a7a37fc ruby-2.1.0-preview1.tar.bz2 From 835bcc89f9cbb404b89383d71112ea0413d8de19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 7 Oct 2013 13:08:54 +0200 Subject: [PATCH 02/30] Update versions of significantly updated patches. --- ...-duplicated-paths-when-empty-version-string-i.patch | 0 ...-use-i386.patch => ruby-2.1.0-always-use-i386.patch | 0 ....patch => ruby-2.1.0-custom-rubygems-location.patch | 0 ruby.spec | 10 +++++----- ...modify-global-Specification.dirs-during-insta.patch | 0 ...ons.patch => rubygems-2.2.0-binary-extensions.patch | 0 6 files changed, 5 insertions(+), 5 deletions(-) rename ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch => ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch (100%) rename ruby-1.9.3-always-use-i386.patch => ruby-2.1.0-always-use-i386.patch (100%) rename ruby-1.9.3-custom-rubygems-location.patch => ruby-2.1.0-custom-rubygems-location.patch (100%) rename rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch => rubygems-2.2.0-Do-not-modify-global-Specification.dirs-during-insta.patch (100%) rename rubygems-2.0.0-binary-extensions.patch => rubygems-2.2.0-binary-extensions.patch (100%) diff --git a/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch similarity index 100% rename from ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch rename to ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch diff --git a/ruby-1.9.3-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch similarity index 100% rename from ruby-1.9.3-always-use-i386.patch rename to ruby-2.1.0-always-use-i386.patch diff --git a/ruby-1.9.3-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch similarity index 100% rename from ruby-1.9.3-custom-rubygems-location.patch rename to ruby-2.1.0-custom-rubygems-location.patch diff --git a/ruby.spec b/ruby.spec index 4d796ff..5c3e1a2 100644 --- a/ruby.spec +++ b/ruby.spec @@ -113,14 +113,14 @@ source_macros(rpm.expand("%{SOURCE5}")) } # http://bugs.ruby-lang.org/issues/7807 -Patch0: ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +Patch0: ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch # Allows to override libruby.so placement. Hopefully we will be able to return # to plain --with-rubyarchprefix. # http://bugs.ruby-lang.org/issues/8973 Patch1: ruby-2.1.0-Enable-configuration-of-archlibdir.patch # Force multiarch directories for i.86 to be always named i386. This solves # some differencies in build between Fedora and RHEL. -Patch3: ruby-1.9.3-always-use-i386.patch +Patch3: ruby-2.1.0-always-use-i386.patch # Fixes random WEBRick test failures. # https://bugs.ruby-lang.org/issues/6573. Patch5: ruby-1.9.3.p195-fix-webrick-tests.patch @@ -128,17 +128,17 @@ Patch5: ruby-1.9.3.p195-fix-webrick-tests.patch Patch7: rubygems-2.2.0-DRY-Use-full_require_paths-on-yet-another-place.patch # Allows to install RubyGems into custom directory, outside of Ruby's tree. # http://redmine.ruby-lang.org/issues/5617 -Patch8: ruby-1.9.3-custom-rubygems-location.patch +Patch8: ruby-2.1.0-custom-rubygems-location.patch # Add support for installing binary extensions according to FHS. # https://github.com/rubygems/rubygems/issues/210 -Patch9: rubygems-2.0.0-binary-extensions.patch +Patch9: rubygems-2.2.0-binary-extensions.patch # Make mkmf verbose by default Patch12: ruby-1.9.3-mkmf-verbose.patch # Without this patch, Specifications.dirs is modified and gems installed on # the system cannot be required anymore. This causes later issues when RDoc # documentation should be generated, since json gem is sudenly not accessible. # https://github.com/rubygems/rubygems/pull/670 -Patch13: rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch +Patch13: rubygems-2.2.0-Do-not-modify-global-Specification.dirs-during-insta.patch # Adds support for '--with-prelude' configuration option. This allows to built # in support for ABRT. # http://bugs.ruby-lang.org/issues/8566 diff --git a/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch b/rubygems-2.2.0-Do-not-modify-global-Specification.dirs-during-insta.patch similarity index 100% rename from rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch rename to rubygems-2.2.0-Do-not-modify-global-Specification.dirs-during-insta.patch diff --git a/rubygems-2.0.0-binary-extensions.patch b/rubygems-2.2.0-binary-extensions.patch similarity index 100% rename from rubygems-2.0.0-binary-extensions.patch rename to rubygems-2.2.0-binary-extensions.patch From 8f30dbcc0baa2241f9326aac6b2d9997e6f39cd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 9 Oct 2013 16:10:06 +0200 Subject: [PATCH 03/30] Workaround several failing tests. --- ruby.spec | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ruby.spec b/ruby.spec index 5c3e1a2..ce694b0 100644 --- a/ruby.spec +++ b/ruby.spec @@ -587,6 +587,13 @@ DISABLE_TESTS="" DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS" %endif +%ifarch i686 +# TestSprintf#test_float fails on i686 +# http://bugs.ruby-lang.org/issues/8358 +sed -i "/assert_equal(\"0x1p+2\", sprintf('%.0a', Float('0x1.fp+1')), \"\[ruby-dev:42551\]\")/ s/^/#/" test/ruby/test_sprintf.rb +sed -i "/assert_equal(\"-0x1.0p+2\", sprintf('%.1a', Float('-0x1.ffp+1')), \"\[ruby-dev:42551\]\")/ s/^/#/" test/ruby/test_sprintf.rb +%endif + # test_debug(TestRubyOptions) fails due to LoadError reported in debug mode, # when abrt.rb cannot be required (seems to be easier way then customizing # the test suite). @@ -598,6 +605,17 @@ touch abrt.rb # Fixed in rev43129. sed -i '/yes-test-sample/,/test-knownbugs/ s/MINIRUBY/RUNRUBY/' uncommon.mk +# TestSignal#test_hup_me hangs up the test suite. +# http://bugs.ruby-lang.org/issues/8997 +sed -i '/def test_hup_me/,/end if Process.respond_to/ s/^/#/' test/ruby/test_signal.rb + +%ifarch armv7l armv7hl armv7hnl +# TestProcess#test_clock_getres_constants and TestProcess#test_clock_gettime_constants fails on ARM. +# http://bugs.ruby-lang.org/issues/9008 +sed -i '/Process.constants.grep(\/\\ACLOCK_\/).each {|n|/ s/$/\n next if [:CLOCK_REALTIME_ALARM, :CLOCK_BOOTTIME_ALARM].include? n/' \ + test/ruby/test_process.rb +%endif + make check TESTS="-v $DISABLE_TESTS" %post libs -p /sbin/ldconfig From 4f8b7ad60ddf7d052852dcd88e684bcb3aa7dda9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 12 Nov 2013 13:28:42 +0100 Subject: [PATCH 04/30] Add remark about the upcomming ARM issue fix. --- ruby.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ruby.spec b/ruby.spec index ce694b0..aebfa01 100644 --- a/ruby.spec +++ b/ruby.spec @@ -612,6 +612,9 @@ sed -i '/def test_hup_me/,/end if Process.respond_to/ s/^/#/' test/ruby/test_sig %ifarch armv7l armv7hl armv7hnl # TestProcess#test_clock_getres_constants and TestProcess#test_clock_gettime_constants fails on ARM. # http://bugs.ruby-lang.org/issues/9008 +# Kernel issue. Should be fixed in 3.13 kernel. +# https://lkml.org/lkml/2013/10/18/521 +# http://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?id=98d6f4dd84a134d942827584a3c5f67ffd8ec35f sed -i '/Process.constants.grep(\/\\ACLOCK_\/).each {|n|/ s/$/\n next if [:CLOCK_REALTIME_ALARM, :CLOCK_BOOTTIME_ALARM].include? n/' \ test/ruby/test_process.rb %endif From ef80e1fa9d5429f276e4640a142ea0d39e986b18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 27 Nov 2013 16:07:24 +0100 Subject: [PATCH 05/30] Allow MD5 in OpenSSL for tests. --- ruby.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index aebfa01..72e92c2 100644 --- a/ruby.spec +++ b/ruby.spec @@ -619,7 +619,9 @@ sed -i '/Process.constants.grep(\/\\ACLOCK_\/).each {|n|/ s/$/\n next if [: test/ruby/test_process.rb %endif -make check TESTS="-v $DISABLE_TESTS" +# Allow MD5 in OpenSSL. +# https://bugs.ruby-lang.org/issues/9154 +OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %post libs -p /sbin/ldconfig @@ -913,6 +915,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon Dec 02 2013 Vít Ondruch - 2.1.0.0-0.16.preview1 +- Allow MD5 in OpenSSL for tests. + * Mon Oct 07 2013 Vít Ondruch - 2.1.0.0-0.16.preview1 - Update to Ruby 2.1.0.preview1. From 360d2b99cd3a28d2d19195f2609a8228c2f34c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 17 Dec 2013 16:56:33 +0100 Subject: [PATCH 06/30] Upgrade to Ruby 2.1.0 (r44266). --- operating_system.rb | 10 + ...Specification.files-in-default-.gems.patch | 28 --- ...-additional-preludes-by-configuratio.patch | 6 +- ...ed-paths-when-empty-version-string-i.patch | 47 +++-- ruby-2.1.0-custom-rubygems-location.patch | 2 +- ....1.0-test_config.rb-fix-library-path.patch | 31 --- ruby.spec | 88 ++++----- ...l_require_paths-on-yet-another-place.patch | 71 ------- ...obal-Specification.dirs-during-insta.patch | 29 --- rubygems-2.2.0-binary-extensions.patch | 179 ------------------ 10 files changed, 86 insertions(+), 405 deletions(-) delete mode 100644 ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch delete mode 100644 ruby-2.1.0-test_config.rb-fix-library-path.patch delete mode 100644 rubygems-2.2.0-DRY-Use-full_require_paths-on-yet-another-place.patch delete mode 100644 rubygems-2.2.0-Do-not-modify-global-Specification.dirs-during-insta.patch delete mode 100644 rubygems-2.2.0-binary-extensions.patch diff --git a/operating_system.rb b/operating_system.rb index c3b19d6..fba8117 100644 --- a/operating_system.rb +++ b/operating_system.rb @@ -81,5 +81,15 @@ module Gem dirs = Gem.default_dirs.detect {|location, paths| paths[:gem_dir] == base_dir} dirs && File.join(dirs.last[:ext_dir], RbConfig::CONFIG['RUBY_INSTALL_NAME']) end + + # This method should be available since RubyGems 2.2 until RubyGems 3.0. + # https://github.com/rubygems/rubygems/issues/749 + if method_defined? :install_extension_in_lib + remove_method :install_extension_in_lib + + def install_extension_in_lib + false + end + end end end diff --git a/ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch b/ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch deleted file mode 100644 index 0abe8bd..0000000 --- a/ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 541f3b85cac00e5b836e018ef8afea4342e0cd39 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Tue, 9 Jul 2013 12:32:49 +0200 -Subject: [PATCH] Make stable Gem::Specification.files in default .gemspecs - -Although the .gemspec files for default gems are same in function, the -different order of their "s.files" makes them different therefore -possibly conflicting in multilib scenario. ---- - tool/rbinstall.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb -index 0b99408..7b54966 100755 ---- a/tool/rbinstall.rb -+++ b/tool/rbinstall.rb -@@ -608,7 +608,7 @@ module RbInstall - end - - def collect -- ruby_libraries + built_libraries -+ (ruby_libraries + built_libraries).sort - end - - private --- -1.8.3.1 - 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 a4a171f..55778ef 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 @@ -16,7 +16,7 @@ index 7e8ed82..7916993 100644 @@ -110,6 +110,7 @@ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@ XRUBY_RUBYHDRDIR = @XRUBY_RUBYHDRDIR@ - DEFAULT_PRELUDES = $(@USE_RUBYGEMS@_GEM_PRELUDE) + DEFAULT_PRELUDES = $(GEM_PRELUDE) +OPTIONAL_PRELUDES = @OPTIONAL_PRELUDES@ #### End of system configuration section. #### @@ -32,8 +32,8 @@ index 5cfbc3d..3f0a82e 100644 -PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(DEFAULT_PRELUDES) +PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(DEFAULT_PRELUDES) $(OPTIONAL_PRELUDES) GEM_PRELUDE = $(srcdir)/gem_prelude.rb - YES_GEM_PRELUDE = $(GEM_PRELUDE) - NO_GEM_PRELUDE = + PRELUDES = prelude.c miniprelude.c + GOLFPRELUDES = golf_prelude.c diff --git a/configure.in b/configure.in index 0e371e2..d4f1dcb 100644 --- a/configure.in 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 498a792..950336c 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 @@ -1,4 +1,4 @@ -From 35b8c14ddc7f9b38c21c15dfecefa3dff7567981 Mon Sep 17 00:00:00 2001 +From 763c6571697b0bd551a8a0c27d538d00f161a9f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 8 Feb 2013 22:48:41 +0100 Subject: [PATCH] Prevent duplicated paths when empty version string is @@ -6,23 +6,23 @@ Subject: [PATCH] Prevent duplicated paths when empty version string is --- configure.in | 15 +++++++++------ - loadpath.c | 4 ++++ - 2 files changed, 13 insertions(+), 6 deletions(-) + loadpath.c | 12 ++++++++++++ + 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/configure.in b/configure.in -index 881449e..37d9a62 100644 +index 88d24ee..4a300b9 100644 --- a/configure.in +++ b/configure.in -@@ -3535,8 +3535,6 @@ AC_ARG_WITH(rubylibprefix, - fi - rubylibprefix="$withval"]) - AC_SUBST(rubylibprefix) +@@ -3608,8 +3608,6 @@ AC_ARG_WITH(rubylibprefix, + rubyw_install_name='$(RUBYW_INSTALL_NAME)' + ]) + -rubylibdir='${rubylibprefix}/${ruby_version}' -rubyarchdir=${multiarch+'${rubyarchprefix}/${ruby_version}'}${multiarch-'${rubylibdir}/${arch}'} rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, -@@ -3566,6 +3564,7 @@ AC_ARG_WITH(ruby-version, +@@ -3639,6 +3637,7 @@ AC_ARG_WITH(ruby-version, [ruby_version=full]) unset RUBY_LIB_VERSION unset RUBY_LIB_VERSION_STYLE @@ -30,7 +30,7 @@ index 881449e..37d9a62 100644 AS_CASE(["$ruby_version"], [full], [RUBY_LIB_VERSION_STYLE='3 /* full */'], [minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */']) -@@ -3582,30 +3581,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then +@@ -3655,30 +3654,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 @@ -70,29 +70,44 @@ index 881449e..37d9a62 100644 AC_ARG_WITH(vendorarchdir, AS_HELP_STRING([--with-vendorarchdir=DIR], diff --git a/loadpath.c b/loadpath.c -index 9160031..623dc9d 100644 +index 9160031..0d4d953 100644 --- a/loadpath.c +++ b/loadpath.c -@@ -65,7 +65,9 @@ const char ruby_initial_load_paths[] = +@@ -65,22 +65,34 @@ const char ruby_initial_load_paths[] = RUBY_SEARCH_PATH "\0" #endif #ifndef NO_RUBY_SITE_LIB -+#ifndef RUBY_LIB_VERSION_BLANK ++#ifdef RUBY_LIB_VERSION_BLANK ++ RUBY_SITE_LIB "\0" ++#else RUBY_SITE_LIB2 "\0" +#endif #ifdef RUBY_THINARCH RUBY_SITE_ARCH_LIB_FOR(RUBY_THINARCH) "\0" #endif -@@ -74,7 +76,9 @@ const char ruby_initial_load_paths[] = + RUBY_SITE_ARCH_LIB_FOR(RUBY_SITEARCH) "\0" ++#ifndef RUBY_LIB_VERSION_BLANK + RUBY_SITE_LIB "\0" #endif ++#endif #ifndef NO_RUBY_VENDOR_LIB -+#ifndef RUBY_LIB_VERSION_BLANK ++#ifdef RUBY_LIB_VERSION_BLANK ++ RUBY_VENDOR_LIB "\0" ++#else RUBY_VENDOR_LIB2 "\0" +#endif #ifdef RUBY_THINARCH RUBY_VENDOR_ARCH_LIB_FOR(RUBY_THINARCH) "\0" #endif + RUBY_VENDOR_ARCH_LIB_FOR(RUBY_SITEARCH) "\0" ++#ifndef RUBY_LIB_VERSION_BLANK + RUBY_VENDOR_LIB "\0" + #endif ++#endif + + RUBY_LIB "\0" + #ifdef RUBY_THINARCH -- -1.8.3.1 +1.8.4.2 diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index 05a0d01..b7f6588 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -39,7 +39,7 @@ index 623dc9d..74c5d9e 100644 --- a/loadpath.c +++ b/loadpath.c @@ -86,6 +86,10 @@ const char ruby_initial_load_paths[] = - RUBY_VENDOR_LIB "\0" + #endif #endif +#ifdef RUBYGEMS_DIR diff --git a/ruby-2.1.0-test_config.rb-fix-library-path.patch b/ruby-2.1.0-test_config.rb-fix-library-path.patch deleted file mode 100644 index 404a278..0000000 --- a/ruby-2.1.0-test_config.rb-fix-library-path.patch +++ /dev/null @@ -1,31 +0,0 @@ -From cf26cdec7bcd0668b8f8347a5f29072c8b8f6e8d Mon Sep 17 00:00:00 2001 -From: nobu -Date: Tue, 1 Oct 2013 11:36:47 +0000 -Subject: [PATCH] test_config.rb: fix library path - -* test/mkmf/test_config.rb (test_dir_config): fix expected library - path. [ruby-core:57535] [Bug #8972] - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - test/mkmf/test_config.rb | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/test/mkmf/test_config.rb b/test/mkmf/test_config.rb -index b09dfd6..4a9be57 100644 ---- a/test/mkmf/test_config.rb -+++ b/test/mkmf/test_config.rb -@@ -8,8 +8,9 @@ class TestMkmf < Test::Unit::TestCase - class TestConfig < Test::Unit::TestCase - def test_dir_config - bug8074 = '[Bug #8074]' -+ lib = RbConfig.expand(RbConfig::MAKEFILE_CONFIG["libdir"], "exec_prefix"=>"") - assert_separately %w[-rmkmf - -- --with-foo-dir=/test/foo], %{ -- assert_equal(%w[/test/foo/include /test/foo/lib], dir_config("foo"), #{bug8074.dump}) -+ assert_equal(%w[/test/foo/include /test/foo#{lib}], dir_config("foo"), #{bug8074.dump}) - } - end - end --- -1.8.3.1 - diff --git a/ruby.spec b/ruby.spec index 72e92c2..0089654 100644 --- a/ruby.spec +++ b/ruby.spec @@ -10,10 +10,10 @@ %global ruby_release %{ruby_version} # Specify the named version. It has precedense to revision. -%global milestone preview1 +#%%global milestone preview2 # Keep the revision enabled for pre-releases from SVN. -#%%global revision 39387 +%global revision 44266 %global ruby_archive %{name}-%{ruby_version} @@ -29,22 +29,23 @@ %global release 16 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} -%global rubygems_version 2.2.0.preview.1 +%global rubygems_version 2.2.0.rc.1 # The RubyGems library has to stay out of Ruby directory three, since the # RubyGems should be share by all Ruby implementations. %global rubygems_dir %{_datadir}/rubygems -%global rake_version 0.9.6 # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. # http://redmine.ruby-lang.org/issues/5313 %global irb_version %{ruby_version_patch_level} -%global rdoc_version 4.1.0.preview.1 -%global bigdecimal_version 1.2.1 + +%global bigdecimal_version 1.2.3 %global io_console_version 0.4.2 -%global json_version 1.7.7 +%global json_version 1.8.1 %global minitest_version 4.7.5 -%global psych_version 2.0.1 +%global psych_version 2.0.2 +%global rake_version 10.1.0 +%global rdoc_version 4.1.0.rc.1 # Might not be needed in the future, if we are lucky enough. # https://bugzilla.redhat.com/show_bug.cgi?id=888262 @@ -124,31 +125,15 @@ Patch3: ruby-2.1.0-always-use-i386.patch # Fixes random WEBRick test failures. # https://bugs.ruby-lang.org/issues/6573. Patch5: ruby-1.9.3.p195-fix-webrick-tests.patch -# https://github.com/rubygems/rubygems/pull/667 -Patch7: rubygems-2.2.0-DRY-Use-full_require_paths-on-yet-another-place.patch # Allows to install RubyGems into custom directory, outside of Ruby's tree. # http://redmine.ruby-lang.org/issues/5617 Patch8: ruby-2.1.0-custom-rubygems-location.patch -# Add support for installing binary extensions according to FHS. -# https://github.com/rubygems/rubygems/issues/210 -Patch9: rubygems-2.2.0-binary-extensions.patch # Make mkmf verbose by default Patch12: ruby-1.9.3-mkmf-verbose.patch -# Without this patch, Specifications.dirs is modified and gems installed on -# the system cannot be required anymore. This causes later issues when RDoc -# documentation should be generated, since json gem is sudenly not accessible. -# https://github.com/rubygems/rubygems/pull/670 -Patch13: rubygems-2.2.0-Do-not-modify-global-Specification.dirs-during-insta.patch # Adds support for '--with-prelude' configuration option. This allows to built # in support for ABRT. # http://bugs.ruby-lang.org/issues/8566 Patch17: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch -# Fixes multilib conlicts of .gemspec files. -# https://bugs.ruby-lang.org/issues/8623 -Patch19: ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch -# TestMkmf::TestConfig#test_dir_config fails on x86_64. -# http://bugs.ruby-lang.org/issues/8972 -Patch20: ruby-2.1.0-test_config.rb-fix-library-path.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -160,7 +145,6 @@ Requires: rubygem(bigdecimal) >= %{bigdecimal_version} BuildRequires: autoconf BuildRequires: gdbm-devel -BuildRequires: ncurses-devel BuildRequires: libdb-devel BuildRequires: libffi-devel BuildRequires: openssl-devel @@ -409,14 +393,9 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch1 -p1 %patch3 -p1 %patch5 -p1 -%patch7 -p1 %patch8 -p1 -%patch9 -p1 %patch12 -p1 -%patch13 -p1 %patch17 -p1 -%patch19 -p1 -%patch20 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -449,11 +428,6 @@ autoconf --enable-multiarch \ --with-prelude=./abrt_prelude.rb \ -# This avoids regeneration of sizes.c (BASERUBY is needed for that), when -# configure.in has newer timestamp the sizes.c (after patch is applied). -# http://bugs.ruby-lang.org/issues/8968 -touch sizes.c - # Q= makes the build output more verbose and allows to check Fedora # compiler options. make %{?_smp_mflags} COPY="cp -p" Q= @@ -511,25 +485,25 @@ mv %{buildroot}%{ruby_libdir}/rdoc* %{buildroot}%{gem_dir}/gems/rdoc-%{rdoc_vers mv %{buildroot}%{gem_dir}/specifications/default/rdoc-%{rdoc_version}.gemspec %{buildroot}%{gem_dir}/specifications mkdir -p %{buildroot}%{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib -mkdir -p %{buildroot}%{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}/lib +mkdir -p %{buildroot}%{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version} mv %{buildroot}%{ruby_libdir}/bigdecimal %{buildroot}%{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib -mv %{buildroot}%{ruby_libarchdir}/bigdecimal.so %{buildroot}%{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}/lib +mv %{buildroot}%{ruby_libarchdir}/bigdecimal.so %{buildroot}%{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version} mv %{buildroot}%{gem_dir}/specifications/default/bigdecimal-%{bigdecimal_version}.gemspec %{buildroot}%{gem_dir}/specifications ln -s %{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib/bigdecimal %{buildroot}%{ruby_libdir}/bigdecimal -ln -s %{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}/lib/bigdecimal.so %{buildroot}%{ruby_libarchdir}/bigdecimal.so +ln -s %{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}/bigdecimal.so %{buildroot}%{ruby_libarchdir}/bigdecimal.so mkdir -p %{buildroot}%{gem_dir}/gems/io-console-%{io_console_version}/lib -mkdir -p %{buildroot}%{_libdir}/gems/%{name}/io-console-%{io_console_version}/lib/io +mkdir -p %{buildroot}%{_libdir}/gems/%{name}/io-console-%{io_console_version}/io mv %{buildroot}%{ruby_libdir}/io %{buildroot}%{gem_dir}/gems/io-console-%{io_console_version}/lib -mv %{buildroot}%{ruby_libarchdir}/io/console.so %{buildroot}%{_libdir}/gems/%{name}/io-console-%{io_console_version}/lib/io +mv %{buildroot}%{ruby_libarchdir}/io/console.so %{buildroot}%{_libdir}/gems/%{name}/io-console-%{io_console_version}/io mv %{buildroot}%{gem_dir}/specifications/default/io-console-%{io_console_version}.gemspec %{buildroot}%{gem_dir}/specifications ln -s %{gem_dir}/gems/io-console-%{io_console_version}/lib/io %{buildroot}%{ruby_libdir}/io -ln -s %{_libdir}/gems/%{name}/io-console-%{io_console_version}/lib/io/console.so %{buildroot}%{ruby_libarchdir}/io/console.so +ln -s %{_libdir}/gems/%{name}/io-console-%{io_console_version}/io/console.so %{buildroot}%{ruby_libarchdir}/io/console.so mkdir -p %{buildroot}%{gem_dir}/gems/json-%{json_version}/lib -mkdir -p %{buildroot}%{_libdir}/gems/%{name}/json-%{json_version}/lib +mkdir -p %{buildroot}%{_libdir}/gems/%{name}/json-%{json_version} mv %{buildroot}%{ruby_libdir}/json* %{buildroot}%{gem_dir}/gems/json-%{json_version}/lib -mv %{buildroot}%{ruby_libarchdir}/json/ %{buildroot}%{_libdir}/gems/%{name}/json-%{json_version}/lib/ +mv %{buildroot}%{ruby_libarchdir}/json/ %{buildroot}%{_libdir}/gems/%{name}/json-%{json_version}/ mv %{buildroot}%{gem_dir}/specifications/default/json-%{json_version}.gemspec %{buildroot}%{gem_dir}/specifications mkdir -p %{buildroot}%{gem_dir}/gems/minitest-%{minitest_version}/lib @@ -537,9 +511,9 @@ mv %{buildroot}%{ruby_libdir}/minitest %{buildroot}%{gem_dir}/gems/minitest-%{mi mv %{buildroot}%{gem_dir}/specifications/default/minitest-%{minitest_version}.gemspec %{buildroot}%{gem_dir}/specifications mkdir -p %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib -mkdir -p %{buildroot}%{_libdir}/gems/%{name}/psych-%{psych_version}/lib +mkdir -p %{buildroot}%{_libdir}/gems/%{name}/psych-%{psych_version} mv %{buildroot}%{ruby_libdir}/psych* %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib -mv %{buildroot}%{ruby_libarchdir}/psych.so %{buildroot}%{_libdir}/gems/%{name}/psych-%{psych_version}/lib/ +mv %{buildroot}%{ruby_libarchdir}/psych.so %{buildroot}%{_libdir}/gems/%{name}/psych-%{psych_version}/ mv %{buildroot}%{gem_dir}/specifications/default/psych-%{psych_version}.gemspec %{buildroot}%{gem_dir}/specifications # The links should replace directory, which RPM cannot handle and it is causing # issues during upgrade from F18 to F19. As a workaround the links are placed @@ -547,7 +521,7 @@ mv %{buildroot}%{gem_dir}/specifications/default/psych-%{psych_version}.gemspec # https://bugzilla.redhat.com/show_bug.cgi?id=988490 ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych %{buildroot}%{ruby_vendorlibdir}/psych ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych.rb %{buildroot}%{ruby_vendorlibdir}/psych.rb -ln -s %{_libdir}/gems/%{name}/psych-%{psych_version}/lib/psych.so %{buildroot}%{ruby_vendorarchdir}/psych.so +ln -s %{_libdir}/gems/%{name}/psych-%{psych_version}/psych.so %{buildroot}%{ruby_vendorarchdir}/psych.so # Adjust the gemspec files so that the gems will load properly sed -i '/^end$/ i\ @@ -619,6 +593,23 @@ sed -i '/Process.constants.grep(\/\\ACLOCK_\/).each {|n|/ s/$/\n next if [: test/ruby/test_process.rb %endif +# Errno::EINVAL: Invalid argument - recvmsg(2) +# Looks to be a problem of Linux 3.12+ and should be possible to remove as soon +# as Koji builders run fixed kerenel. +# https://bugs.ruby-lang.org/issues/9124 +sed -i '/^ def test_timestampns/,/^ end/ s/^/#/' test/socket/test_socket.rb +sed -i '/^ def test_timestamp/,/^ end/ s/^/#/' test/socket/test_socket.rb +sed -i '/^ def test_udp_server/,/^ end/ s/^/#/' test/socket/test_socket.rb +sed -i '/^ def test_recvmsg_nonblock_error/,/^ end/ s/^/#/' test/socket/test_nonblock.rb +sed -i '/^ def test_fd_passing_n/,/^ end/ s/^/#/' test/socket/test_unix.rb +sed -i '/^ def test_fd_passing_n2/,/^ end/ s/^/#/' test/socket/test_unix.rb +sed -i '/^ def test_recvmsg/,/^ end/ s/^/#/' test/socket/test_unix.rb +sed -i '/^ def test_sendcred_ucred/,/^ end/ s/^/#/' test/socket/test_unix.rb + +# Segmentation fault. +# https://bugs.ruby-lang.org/issues/9198 +sed -i '/^ def test_machine_stackoverflow/,/^ end/ s/^/#/' test/ruby/test_exception.rb + # Allow MD5 in OpenSSL. # https://bugs.ruby-lang.org/issues/9154 OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" @@ -711,7 +702,6 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %dir %{ruby_libarchdir} %{ruby_libarchdir}/continuation.so %{ruby_libarchdir}/coverage.so -%{ruby_libarchdir}/curses.so %{ruby_libarchdir}/date_core.so %{ruby_libarchdir}/dbm.so %dir %{ruby_libarchdir}/digest @@ -798,6 +788,7 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %dir %{ruby_libarchdir}/racc %{ruby_libarchdir}/racc/cparse.so %{ruby_libarchdir}/rbconfig.rb +%{ruby_libarchdir}/rbconfig/sizeof.so %{ruby_libarchdir}/readline.so %{ruby_libarchdir}/ripper.so %{ruby_libarchdir}/sdbm.so @@ -915,6 +906,9 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Tue Dec 17 2013 Vít Ondruch - 2.1.0.0-0.16.r44266 +- Upgrade to Ruby 2.1.0 (r44266). + * Mon Dec 02 2013 Vít Ondruch - 2.1.0.0-0.16.preview1 - Allow MD5 in OpenSSL for tests. diff --git a/rubygems-2.2.0-DRY-Use-full_require_paths-on-yet-another-place.patch b/rubygems-2.2.0-DRY-Use-full_require_paths-on-yet-another-place.patch deleted file mode 100644 index a6766bc..0000000 --- a/rubygems-2.2.0-DRY-Use-full_require_paths-on-yet-another-place.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 02f94e96ea6a9e0fe37341eccd83ffb63549ead5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Thu, 3 Oct 2013 14:15:59 +0200 -Subject: [PATCH] DRY: Use full_require_paths on yet another place. - ---- - lib/rubygems/basic_specification.rb | 16 +++++++++++++--- - lib/rubygems/specification.rb | 11 ----------- - 2 files changed, 13 insertions(+), 14 deletions(-) - -diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb -index 24bb4bc..a10eab3 100644 ---- a/lib/rubygems/basic_specification.rb -+++ b/lib/rubygems/basic_specification.rb -@@ -38,11 +38,10 @@ class Gem::BasicSpecification - # Return true if this spec can require +file+. - - def contains_requirable_file? file -- root = full_gem_path - suffixes = Gem.suffixes - -- require_paths.any? do |lib| -- base = "#{root}/#{lib}/#{file}" -+ full_require_paths.any? do |path| -+ base = "#{path}/#{file}" - suffixes.any? { |suf| File.file? "#{base}#{suf}" } - end - end -@@ -84,6 +83,17 @@ class Gem::BasicSpecification - end - - ## -+ # Full paths in the gem to add to $LOAD_PATH when this gem is -+ # activated. -+ # -+ -+ def full_require_paths -+ require_paths.map do |path| -+ File.join full_gem_path, path -+ end -+ end -+ -+ ## - # Returns the full path to the gems directory containing this spec's - # gem directory. eg: /usr/local/lib/ruby/1.8/gems - -diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb -index 6de8c3b..deac343 100644 ---- a/lib/rubygems/specification.rb -+++ b/lib/rubygems/specification.rb -@@ -2015,17 +2015,6 @@ class Gem::Specification < Gem::BasicSpecification - end - - ## -- # Full paths in the gem to add to $LOAD_PATH when this gem is -- # activated. -- # -- -- def full_require_paths -- require_paths.map do |path| -- File.join full_gem_path, path -- end -- end -- -- ## - # The RubyGems version required by this gem - - def required_rubygems_version= req --- -1.8.3.1 - diff --git a/rubygems-2.2.0-Do-not-modify-global-Specification.dirs-during-insta.patch b/rubygems-2.2.0-Do-not-modify-global-Specification.dirs-during-insta.patch deleted file mode 100644 index ad0f0bf..0000000 --- a/rubygems-2.2.0-Do-not-modify-global-Specification.dirs-during-insta.patch +++ /dev/null @@ -1,29 +0,0 @@ -From ad80fb9ffe5ab73e05784237de8d8b7d03784867 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Fri, 4 Oct 2013 22:13:11 +0200 -Subject: [PATCH] Do not modify global Specification.dirs during installation. - ---- - lib/rubygems/dependency_installer.rb | 6 ------ - 1 file changed, 6 deletions(-) - -diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb -index e7c489a..5123fce 100644 ---- a/lib/rubygems/dependency_installer.rb -+++ b/lib/rubygems/dependency_installer.rb -@@ -74,12 +74,6 @@ class Gem::DependencyInstaller - @only_install_dir = !!options[:install_dir] - @install_dir = options[:install_dir] || Gem.dir - -- if options[:install_dir] then -- # HACK shouldn't change the global settings, needed for -i behavior -- # maybe move to the install command? See also github #442 -- Gem::Specification.dirs = @install_dir -- end -- - options = DEFAULT_OPTIONS.merge options - - @bin_dir = options[:bin_dir] --- -1.8.3.1 - diff --git a/rubygems-2.2.0-binary-extensions.patch b/rubygems-2.2.0-binary-extensions.patch deleted file mode 100644 index 5c212e7..0000000 --- a/rubygems-2.2.0-binary-extensions.patch +++ /dev/null @@ -1,179 +0,0 @@ -From 37cd8547d23973a7ec23a004ab9b60738d67ada9 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Thu, 3 Nov 2011 16:43:05 +0100 -Subject: [PATCH] Add dedicate extensions folder into $LOAD_PATH. - ---- - lib/rubygems/basic_specification.rb | 35 ++++++++++++++++++++++++++++++++--- - lib/rubygems/defaults.rb | 11 +++++++++++ - lib/rubygems/ext/builder.rb | 6 +++++- - lib/rubygems/installer.rb | 1 + - lib/rubygems/specification.rb | 7 +++++++ - lib/rubygems/uninstaller.rb | 1 + - 6 files changed, 57 insertions(+), 4 deletions(-) - -diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb -index a10eab3..da3af91 100644 ---- a/lib/rubygems/basic_specification.rb -+++ b/lib/rubygems/basic_specification.rb -@@ -51,6 +51,14 @@ class Gem::BasicSpecification - File.dirname(loaded_from) == self.class.default_specifications_dir - end - -+ ## -+ # Returns the full path to the exts directory containing this spec's -+ # gem directory. eg: /usr/local/lib/ruby/1.8/exts -+ -+ def exts_dir -+ @exts_dir ||= Gem.default_ext_dir_for(base_dir) || gems_dir -+ end -+ - def find_full_gem_path # :nodoc: - # TODO: also, shouldn't it default to full_name if it hasn't been written? - path = File.expand_path File.join(gems_dir, full_name) -@@ -60,6 +68,15 @@ class Gem::BasicSpecification - - private :find_full_gem_path - -+ def find_full_gem_ext_path # :nodoc: -+ # TODO: skip for gems without extensions. -+ path = File.expand_path File.join(exts_dir, full_name) -+ path.untaint -+ path if File.directory? path -+ end -+ -+ private :find_full_gem_ext_path -+ - ## - # The full path to the gem (install path + full name). - -@@ -70,6 +87,13 @@ class Gem::BasicSpecification - end - - ## -+ # The full path to the gem binary extension (install path + full name). -+ -+ def full_gem_ext_path -+ @full_gem_ext_path ||= find_full_gem_ext_path -+ end -+ -+ ## - # Returns the full name (name-version) of this Gem. Platform information - # is included (name-version-platform) if it is specified and not the - # default Ruby platform. -@@ -88,9 +112,12 @@ class Gem::BasicSpecification - # - - def full_require_paths -- require_paths.map do |path| -- File.join full_gem_path, path -- end -+ require_paths.map do |require_path| -+ full_gem_paths = [full_gem_path, full_gem_ext_path] -+ full_gem_paths.compact! -+ -+ full_gem_paths.map { |path| File.join path, require_path } -+ end.flatten - end - - ## -@@ -110,7 +137,9 @@ class Gem::BasicSpecification - @loaded_from = path && path.to_s - - @full_gem_path = nil -+ @full_gem_ext_path = nil - @gems_dir = nil -+ @exts_dir = nil - @base_dir = nil - end - -diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb -index 591580b..8ed474f 100644 ---- a/lib/rubygems/defaults.rb -+++ b/lib/rubygems/defaults.rb -@@ -111,6 +111,17 @@ module Gem - end - - ## -+ # Returns binary extensions dir for specified RubyGems base dir or nil -+ # if such directory cannot be determined. -+ # -+ # By default, the binary extensions are located side by side with their -+ # Ruby counterparts, therefore nil is returned -+ -+ def self.default_ext_dir_for base_dir -+ nil -+ end -+ -+ ## - # A wrapper around RUBY_ENGINE const that may not be defined - - def self.ruby_engine -diff --git a/lib/rubygems/ext/builder.rb b/lib/rubygems/ext/builder.rb -index 8c05723..75d5fc2 100644 ---- a/lib/rubygems/ext/builder.rb -+++ b/lib/rubygems/ext/builder.rb -@@ -170,7 +170,7 @@ EOF - say "This could take a while..." - end - -- dest_path = File.join @gem_dir, @spec.require_paths.first -+ dest_path = File.join(@only_install_dir ? @gem_dir : @spec.ext_dir, @spec.require_paths.first) - - @ran_rake = false # only run rake once - -@@ -181,5 +181,9 @@ EOF - end - end - -+ def only_install_dir= only_install_dir -+ @only_install_dir = only_install_dir -+ end -+ - end - -diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb -index 261af89..a6aca5d 100644 ---- a/lib/rubygems/installer.rb -+++ b/lib/rubygems/installer.rb -@@ -662,6 +662,7 @@ TEXT - - def build_extensions - builder = Gem::Ext::Builder.new spec, @build_args -+ builder.only_install_dir = @only_install_dir - - builder.build_extensions - end -diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb -index deac343..b630fa3 100644 ---- a/lib/rubygems/specification.rb -+++ b/lib/rubygems/specification.rb -@@ -1612,6 +1612,13 @@ class Gem::Specification < Gem::BasicSpecification - @executables = Array(value) - end - -+ # Returns the full path to this spec's ext directory. -+ # eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0 -+ -+ def ext_dir -+ @ext_dir ||= File.expand_path File.join(exts_dir, full_name) -+ end -+ - ## - # Sets extensions to +extensions+, ensuring it is an array. Don't - # use this, push onto the array instead. -diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb -index 143ab6d..f81a23d 100644 ---- a/lib/rubygems/uninstaller.rb -+++ b/lib/rubygems/uninstaller.rb -@@ -247,6 +247,7 @@ class Gem::Uninstaller - File.writable?(spec.base_dir) - - FileUtils.rm_rf spec.full_gem_path -+ FileUtils.rm_rf spec.ext_dir - - # TODO: should this be moved to spec?... I vote eww (also exists in docmgr) - old_platform_name = [spec.name, --- -1.8.3.1 - From 453497595c4aae9a223940d409b2c7935291ed25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 19 Dec 2013 12:26:37 +0100 Subject: [PATCH 07/30] Fix RubyGems test suite. --- ruby.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ruby.spec b/ruby.spec index 0089654..952626e 100644 --- a/ruby.spec +++ b/ruby.spec @@ -593,6 +593,10 @@ sed -i '/Process.constants.grep(\/\\ACLOCK_\/).each {|n|/ s/$/\n next if [: test/ruby/test_process.rb %endif +# Fix "Could not find 'minitest'" error. +# http://bugs.ruby-lang.org/issues/9259 +sed -i "/^ gem 'minitest', '~> 4.0'/ s/^/#/" lib/rubygems/test_case.rb + # Errno::EINVAL: Invalid argument - recvmsg(2) # Looks to be a problem of Linux 3.12+ and should be possible to remove as soon # as Koji builders run fixed kerenel. From f84b34dea7529a382e3efe4ef74a016bdb701f6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 19 Dec 2013 13:52:28 +0100 Subject: [PATCH 08/30] Add git and cmake BR to execute all RubyGems test cases. --- ruby.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ruby.spec b/ruby.spec index 952626e..d65d6bc 100644 --- a/ruby.spec +++ b/ruby.spec @@ -156,6 +156,9 @@ BuildRequires: procps BuildRequires: %{_bindir}/dtrace # Unbundle cert.pem BuildRequires: ca-certificates +# RubyGems test suite optional dependencies. +BuildRequires: %{_bindir}/git +BuildRequires: %{_bindir}/cmake # This package provides %%{_bindir}/ruby-mri therefore it is marked by this # virtual provide. It can be installed as dependency of rubypick. From 0492f505187c4f332ac7cb4266dd643f4312cb67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 19 Dec 2013 16:02:49 +0100 Subject: [PATCH 09/30] Update to Ruby 2.1.0 (r44289). --- ruby.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ruby.spec b/ruby.spec index d65d6bc..3d7e87a 100644 --- a/ruby.spec +++ b/ruby.spec @@ -13,7 +13,7 @@ #%%global milestone preview2 # Keep the revision enabled for pre-releases from SVN. -%global revision 44266 +%global revision 44289 %global ruby_archive %{name}-%{ruby_version} @@ -913,8 +913,8 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog -* Tue Dec 17 2013 Vít Ondruch - 2.1.0.0-0.16.r44266 -- Upgrade to Ruby 2.1.0 (r44266). +* Tue Dec 17 2013 Vít Ondruch - 2.1.0.0-0.16.r44289 +- Upgrade to Ruby 2.1.0 (r44289). * Mon Dec 02 2013 Vít Ondruch - 2.1.0.0-0.16.preview1 - Allow MD5 in OpenSSL for tests. From 2b7dccf61f4a4965ae1dbddcd69d6e3e72480d17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 20 Dec 2013 13:58:40 +0100 Subject: [PATCH 10/30] Upgrade to Ruby 2.1.0 (r44362). --- ruby-2.1.0-resolv.rb-no-encodings.patch | 143 ++++++++++++++++++++++++ ruby.spec | 15 ++- 2 files changed, 153 insertions(+), 5 deletions(-) create mode 100644 ruby-2.1.0-resolv.rb-no-encodings.patch diff --git a/ruby-2.1.0-resolv.rb-no-encodings.patch b/ruby-2.1.0-resolv.rb-no-encodings.patch new file mode 100644 index 0000000..f1037db --- /dev/null +++ b/ruby-2.1.0-resolv.rb-no-encodings.patch @@ -0,0 +1,143 @@ +From 1ffbe07e179a2e047d24c7091f6ff013195b1a93 Mon Sep 17 00:00:00 2001 +From: nobu +Date: Sat, 21 Dec 2013 03:37:26 +0000 +Subject: [PATCH] resolv.rb: no encodings + +* lib/resolv.rb (Resolv::Hosts#lazy_initialize): should not + consider encodings in hosts file. [ruby-core:59239] [Bug #9273] +* lib/resolv.rb (Resolv::Config.parse_resolv_conf): ditto. + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + ChangeLog | 7 +++++++ + lib/resolv.rb | 4 ++-- + test/resolv/test_addr.rb | 12 ++++++++++++ + test/resolv/test_dns.rb | 13 +++++++++++++ + 4 files changed, 34 insertions(+), 2 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 72eaa6f..93686e9 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,6 +1,13 @@ + install win32.h. + [ruby-core:58801][Bug #9199] reported by arton. + ++Sat Dec 21 12:37:19 2013 Nobuyoshi Nakada ++ ++ * lib/resolv.rb (Resolv::Hosts#lazy_initialize): should not ++ consider encodings in hosts file. [ruby-core:59239] [Bug #9273] ++ ++ * lib/resolv.rb (Resolv::Config.parse_resolv_conf): ditto. ++ + Fri Dec 20 17:52:50 2013 Koichi Sasada + + * vm_method.c: check definition of +diff --git a/lib/resolv.rb b/lib/resolv.rb +index 6d34a67..0c2b68e 100644 +--- a/lib/resolv.rb ++++ b/lib/resolv.rb +@@ -187,7 +187,7 @@ class Resolv + unless @initialized + @name2addr = {} + @addr2name = {} +- open(@filename) {|f| ++ open(@filename, 'rb') {|f| + f.each {|line| + line.sub!(/#.*/, '') + addr, hostname, *aliases = line.split(/\s+/) +@@ -920,7 +920,7 @@ class Resolv + nameserver = [] + search = nil + ndots = 1 +- open(filename) {|f| ++ open(filename, 'rb') {|f| + f.each {|line| + line.sub!(/[#;].*/, '') + keyword, *args = line.split(/\s+/) +diff --git a/test/resolv/test_addr.rb b/test/resolv/test_addr.rb +index 84bc8c2..d4728e1 100644 +--- a/test/resolv/test_addr.rb ++++ b/test/resolv/test_addr.rb +@@ -13,4 +13,16 @@ class TestResolvAddr < Test::Unit::TestCase + end + } + end ++ ++ def test_invalid_byte_comment ++ bug9273 = '[ruby-core:59239] [Bug #9273]' ++ Tempfile.open('resolv_test_addr_') do |tmpfile| ++ tmpfile.print("\xff\x00\x40") ++ tmpfile.close ++ hosts = Resolv::Hosts.new(tmpfile.path) ++ assert_nothing_raised(ArgumentError, bug9273) do ++ hosts.each_address("") {break} ++ end ++ end ++ end + end +diff --git a/test/resolv/test_dns.rb b/test/resolv/test_dns.rb +index 0d9565e..e3e38ef 100644 +--- a/test/resolv/test_dns.rb ++++ b/test/resolv/test_dns.rb +@@ -1,6 +1,7 @@ + require 'test/unit' + require 'resolv' + require 'socket' ++require 'tempfile' + + class TestResolvDNS < Test::Unit::TestCase + def setup +@@ -150,4 +151,16 @@ class TestResolvDNS < Test::Unit::TestCase + } + end + ++ def test_invalid_byte_comment ++ bug9273 = '[ruby-core:59239] [Bug #9273]' ++ Tempfile.open('resolv_test_dns_') do |tmpfile| ++ tmpfile.print("\xff\x00\x40") ++ tmpfile.close ++ Resolv::DNS.open(tmpfile.path) do |dns| ++ assert_nothing_raised(ArgumentError, bug9273) do ++ dns.getresources("foo.example.org", Resolv::DNS::Resource::IN::A) ++ end ++ end ++ end ++ end + end +-- +1.8.4.2 + +From 1ef0a76c6c6556bf6ab155e2ad28a23748ee59ef Mon Sep 17 00:00:00 2001 +From: nobu +Date: Sat, 21 Dec 2013 07:18:18 +0000 +Subject: [PATCH] test_dns.rb: no server access + +* test/resolv/test_dns.rb (test_invalid_byte_comment): get rid of + actual server access. [Bug #9273] + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + test/resolv/test_dns.rb | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/test/resolv/test_dns.rb b/test/resolv/test_dns.rb +index e3e38ef..07396fb 100644 +--- a/test/resolv/test_dns.rb ++++ b/test/resolv/test_dns.rb +@@ -156,10 +156,8 @@ class TestResolvDNS < Test::Unit::TestCase + Tempfile.open('resolv_test_dns_') do |tmpfile| + tmpfile.print("\xff\x00\x40") + tmpfile.close +- Resolv::DNS.open(tmpfile.path) do |dns| +- assert_nothing_raised(ArgumentError, bug9273) do +- dns.getresources("foo.example.org", Resolv::DNS::Resource::IN::A) +- end ++ assert_nothing_raised(ArgumentError, bug9273) do ++ Resolv::DNS::Config.parse_resolv_conf(tmpfile.path) + end + end + end +-- +1.8.4.2 + diff --git a/ruby.spec b/ruby.spec index 3d7e87a..e1f3c9f 100644 --- a/ruby.spec +++ b/ruby.spec @@ -13,7 +13,7 @@ #%%global milestone preview2 # Keep the revision enabled for pre-releases from SVN. -%global revision 44289 +%global revision 44362 %global ruby_archive %{name}-%{ruby_version} @@ -29,7 +29,7 @@ %global release 16 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} -%global rubygems_version 2.2.0.rc.1 +%global rubygems_version 2.2.0 # The RubyGems library has to stay out of Ruby directory three, since the # RubyGems should be share by all Ruby implementations. @@ -45,7 +45,7 @@ %global minitest_version 4.7.5 %global psych_version 2.0.2 %global rake_version 10.1.0 -%global rdoc_version 4.1.0.rc.1 +%global rdoc_version 4.1.0 # Might not be needed in the future, if we are lucky enough. # https://bugzilla.redhat.com/show_bug.cgi?id=888262 @@ -134,6 +134,10 @@ Patch12: ruby-1.9.3-mkmf-verbose.patch # in support for ABRT. # http://bugs.ruby-lang.org/issues/8566 Patch17: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +# Fixes possible "ArgumentError: invalid byte sequence in US-ASCII" error in +# TestGemRemoteFetcher#test_download_to_cache. +# http://bugs.ruby-lang.org/issues/9273 +Patch18: ruby-2.1.0-resolv.rb-no-encodings.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -399,6 +403,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch8 -p1 %patch12 -p1 %patch17 -p1 +%patch18 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -913,8 +918,8 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog -* Tue Dec 17 2013 Vít Ondruch - 2.1.0.0-0.16.r44289 -- Upgrade to Ruby 2.1.0 (r44289). +* Mon Dec 23 2013 Vít Ondruch - 2.1.0.0-0.16.r44362 +- Upgrade to Ruby 2.1.0 (r44362). * Mon Dec 02 2013 Vít Ondruch - 2.1.0.0-0.16.preview1 - Allow MD5 in OpenSSL for tests. From 641dc00b5fa7b51f36b7072f5084e073368f1275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 23 Dec 2013 17:55:52 +0100 Subject: [PATCH 11/30] Move RPM macros into /usr/lib/rpm/macros.d directory. This is preferred locatin for RPM macros, since macro files are not typical configuration files (rhbz#846679). --- ruby.spec | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ruby.spec b/ruby.spec index e1f3c9f..52f0c0b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -458,11 +458,11 @@ sed -i 's/Version: \${ruby_version}/Version: %{ruby_version}/' %{buildroot}%{_li # Move macros file insto proper place and replace the %%{name} macro, since it # would be wrongly evaluated during build of other packages. -mkdir -p %{buildroot}%{_sysconfdir}/rpm -install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/rpm/macros.ruby -sed -i "s/%%{name}/%{name}/" %{buildroot}%{_sysconfdir}/rpm/macros.ruby -install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/rpm/macros.rubygems -sed -i "s/%%{name}/%{name}/" %{buildroot}%{_sysconfdir}/rpm/macros.rubygems +mkdir -p %{buildroot}%{_exec_prefix}/lib/rpm/macros.d +install -m 644 %{SOURCE4} %{buildroot}%{_exec_prefix}/lib/rpm/macros.d/macros.ruby +sed -i "s/%%{name}/%{name}/" %{buildroot}%{_exec_prefix}/lib/rpm/macros.d/macros.ruby +install -m 644 %{SOURCE5} %{buildroot}%{_exec_prefix}/lib/rpm/macros.d/macros.rubygems +sed -i "s/%%{name}/%{name}/" %{buildroot}%{_exec_prefix}/lib/rpm/macros.d/macros.rubygems # Kill bundled cert.pem mkdir -p %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/ @@ -651,7 +651,7 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %doc README.EXT %lang(ja) %doc README.EXT.ja -%{_sysconfdir}/rpm/macros.ruby +%{_exec_prefix}/lib/rpm/macros.d/macros.ruby %{_includedir}/* %{_libdir}/libruby.so @@ -848,7 +848,7 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %exclude %{gem_dir}/specifications/default/test-unit-*.gemspec %files -n rubygems-devel -%{_sysconfdir}/rpm/macros.rubygems +%{_exec_prefix}/lib/rpm/macros.d/macros.rubygems %files -n rubygem-rake %{_bindir}/rake @@ -920,6 +920,7 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %changelog * Mon Dec 23 2013 Vít Ondruch - 2.1.0.0-0.16.r44362 - Upgrade to Ruby 2.1.0 (r44362). +- Move RPM macros into /usr/lib/rpm/macros.d directory. * Mon Dec 02 2013 Vít Ondruch - 2.1.0.0-0.16.preview1 - Allow MD5 in OpenSSL for tests. From f8855bc5dd7fed13a6ca027265c2065997365c4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 2 Jan 2014 18:36:55 +0100 Subject: [PATCH 12/30] Ignore IMAP tests due to expired certificate. --- ruby.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ruby.spec b/ruby.spec index 52f0c0b..f1bb181 100644 --- a/ruby.spec +++ b/ruby.spec @@ -563,6 +563,10 @@ sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{r %check DISABLE_TESTS="" +# Ignore IMAP tests due to expired certificate. +# http://bugs.ruby-lang.org/issues/9341 +DISABLE_TESTS="-x test_imap.rb $DISABLE_TESTS" + %ifarch armv7l armv7hl armv7hnl # test_call_double(DL::TestDL) fails on ARM HardFP # http://bugs.ruby-lang.org/issues/6592 From 7b70466c53e32de5aba4f14d448c8050aed1094f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 2 Jan 2014 18:58:30 +0100 Subject: [PATCH 13/30] Upgrade to Ruby 2.1.0. --- ruby.spec | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/ruby.spec b/ruby.spec index f1bb181..fac33a8 100644 --- a/ruby.spec +++ b/ruby.spec @@ -6,14 +6,13 @@ %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} -%global ruby_version_patch_level %{major_minor_version}.%{teeny_version}.%{patch_level} %global ruby_release %{ruby_version} # Specify the named version. It has precedense to revision. #%%global milestone preview2 # Keep the revision enabled for pre-releases from SVN. -%global revision 44362 +#%%global revision 44362 %global ruby_archive %{name}-%{ruby_version} @@ -22,11 +21,14 @@ %global development_release %{?milestone}%{?!milestone:%{?revision:r%{revision}}} %global ruby_archive %{ruby_archive}-%{?milestone}%{?!milestone:%{?revision:r%{revision}}} %else -%global ruby_archive %{ruby_archive}-p%{patch_level} +# Ruby will be using semver versioning scheme since Ruby 2.1.0. However, it is +# unclear ATM what name will be used when next bugfix version is released. +# http://bugs.ruby-lang.org/issues/8835 +#%%global ruby_archive %{ruby_archive}-p%{patch_level} %endif -%global release 16 +%global release 17 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.2.0 @@ -37,7 +39,7 @@ # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. # http://redmine.ruby-lang.org/issues/5313 -%global irb_version %{ruby_version_patch_level} +%global irb_version %{ruby_version} %global bigdecimal_version 1.2.3 %global io_console_version 0.4.2 @@ -61,7 +63,7 @@ Summary: An interpreter of object-oriented scripting language Name: ruby -Version: %{ruby_version_patch_level} +Version: %{ruby_version} Release: %{release_string} Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... @@ -247,7 +249,7 @@ specified in standard Ruby syntax. Summary: The Interactive Ruby Version: %{irb_version} Group: Development/Libraries -Requires: %{name}-libs = %{ruby_version_patch_level} +Requires: %{name}-libs = %{ruby_version} Provides: irb = %{version}-%{release} Provides: ruby(irb) = %{version}-%{release} BuildArch: noarch @@ -387,8 +389,8 @@ serialize and de-serialize most Ruby objects to and from the YAML format. %package tcltk Summary: Tcl/Tk interface for scripting language Ruby Group: Development/Languages -Requires: %{name}-libs%{?_isa} = %{ruby_version_patch_level} -Provides: ruby(tcltk) = %{ruby_version_patch_level}-%{release} +Requires: %{name}-libs%{?_isa} = %{ruby_version} +Provides: ruby(tcltk) = %{ruby_version}-%{release} %description tcltk Tcl/Tk interface for the object-oriented scripting language Ruby. @@ -922,16 +924,11 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog -* Mon Dec 23 2013 Vít Ondruch - 2.1.0.0-0.16.r44362 -- Upgrade to Ruby 2.1.0 (r44362). +* Thu Jan 02 2014 Vít Ondruch - 2.1.0-17 +- Upgrade to Ruby 2.1.0. - Move RPM macros into /usr/lib/rpm/macros.d directory. - -* Mon Dec 02 2013 Vít Ondruch - 2.1.0.0-0.16.preview1 - Allow MD5 in OpenSSL for tests. -* Mon Oct 07 2013 Vít Ondruch - 2.1.0.0-0.16.preview1 -- Update to Ruby 2.1.0.preview1. - * Tue Jul 30 2013 Vít Ondruch - 2.0.0.247-15 - Move Psych symlinks to vendor dir, to prevent F18 -> F19 upgrade issues (rhbz#988490). From 16f19fee741116801ec4832494ef8844233e534e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 2 Jan 2014 19:00:56 +0100 Subject: [PATCH 14/30] Remove obsoleted obsoletes. --- ruby.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index fac33a8..68a65d5 100644 --- a/ruby.spec +++ b/ruby.spec @@ -271,8 +271,6 @@ Requires: rubygem(json) >= %{json_version} Provides: rdoc = %{version}-%{release} Provides: ri = %{version}-%{release} Provides: rubygem(rdoc) = %{version}-%{release} -Obsoletes: ruby-rdoc < %{version} -Obsoletes: ruby-ri < %{version} BuildArch: noarch %description -n rubygem-rdoc From 8fc18e146bbc17abdc649038fd11e3ad5fc2f4fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 3 Jan 2014 13:20:53 +0100 Subject: [PATCH 15/30] Re-enable fixed test case. --- ruby.spec | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ruby.spec b/ruby.spec index 68a65d5..1bd690f 100644 --- a/ruby.spec +++ b/ruby.spec @@ -585,12 +585,6 @@ sed -i "/assert_equal(\"-0x1.0p+2\", sprintf('%.1a', Float('-0x1.ffp+1')), \"\[r # the test suite). touch abrt.rb -# Fix "./ruby: error while loading shared libraries: libruby.so.2.1: cannot open -# shared object file: No such file or directory" error. -# http://bugs.ruby-lang.org/issues/8971 -# Fixed in rev43129. -sed -i '/yes-test-sample/,/test-knownbugs/ s/MINIRUBY/RUNRUBY/' uncommon.mk - # TestSignal#test_hup_me hangs up the test suite. # http://bugs.ruby-lang.org/issues/8997 sed -i '/def test_hup_me/,/end if Process.respond_to/ s/^/#/' test/ruby/test_signal.rb From 97430c9392040e6befb5cdf52f54f8e08bd99382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 3 Jan 2014 14:09:59 +0100 Subject: [PATCH 16/30] Backport regenerated certificates for IMAP tests. --- ...x-test-failures-due-to-expired-certs.patch | 259 ++++++++++++++++++ ruby.spec | 8 +- 2 files changed, 263 insertions(+), 4 deletions(-) create mode 100644 ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch diff --git a/ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch b/ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch new file mode 100644 index 0000000..f9fa197 --- /dev/null +++ b/ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch @@ -0,0 +1,259 @@ +From 5ac7c395c19426a9a92f0a918b03e0f493af6e2c Mon Sep 17 00:00:00 2001 +From: tmm1 +Date: Fri, 3 Jan 2014 01:46:55 +0000 +Subject: [PATCH] test/net/imap/test_imap.rb: fix test failures due to expired + certs + +* test/net/imap/cacert.pem: generate new CA cert, since the last one + expired. [Bug #9341] [ruby-core:59459] +* test/net/imap/server.crt: new server cert signed with updated CA. +* test/net/imap/Makefile: add `make regen_certs` to automate this + process. + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + ChangeLog | 8 +++++ + test/net/imap/Makefile | 15 +++++++++ + test/net/imap/cacert.pem | 84 ++++++++++++++++++++++++++---------------------- + test/net/imap/server.crt | 65 +++++++++++++++---------------------- + 4 files changed, 94 insertions(+), 78 deletions(-) + create mode 100644 test/net/imap/Makefile + +diff --git a/ChangeLog b/ChangeLog +index a4f20cd..d6a7148 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,11 @@ ++Fri Jan 3 10:43:57 2014 Aman Gupta ++ ++ * test/net/imap/cacert.pem: generate new CA cert, since the last one ++ expired. [Bug #9341] [ruby-core:59459] ++ * test/net/imap/server.crt: new server cert signed with updated CA. ++ * test/net/imap/Makefile: add `make regen_certs` to automate this ++ process. ++ + Wed Dec 25 16:58:31 2013 Nobuyoshi Nakada + + * proc.c (rb_mod_define_method): consider visibility only if self +diff --git a/test/net/imap/Makefile b/test/net/imap/Makefile +new file mode 100644 +index 0000000..b2bc9c7 +--- /dev/null ++++ b/test/net/imap/Makefile +@@ -0,0 +1,15 @@ ++all: ++ ++regen_certs: ++ touch server.key ++ make server.crt ++ ++cacert.pem: server.key ++ openssl req -new -x509 -days 1825 -key server.key -out cacert.pem -text -subj "/C=JP/ST=Shimane/L=Matz-e city/O=Ruby Core Team/CN=Ruby Test CA/emailAddress=security@ruby-lang.org" ++ ++server.csr: ++ openssl req -new -key server.key -out server.csr -text -subj "/C=JP/ST=Shimane/O=Ruby Core Team/OU=Ruby Test/CN=localhost" ++ ++server.crt: server.csr cacert.pem ++ openssl x509 -days 1825 -CA cacert.pem -CAkey server.key -set_serial 00 -in server.csr -req -text -out server.crt ++ rm server.csr +diff --git a/test/net/imap/cacert.pem b/test/net/imap/cacert.pem +index bd7e68a..7073387 100644 +--- a/test/net/imap/cacert.pem ++++ b/test/net/imap/cacert.pem +@@ -2,59 +2,65 @@ Certificate: + Data: + Version: 3 (0x2) + Serial Number: +- 9f:dc:f7:94:98:05:43:4c ++ b9:90:a2:bf:62:69:17:9c + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=JP, ST=Shimane, L=Matz-e city, O=Ruby Core Team, CN=Ruby Test CA/emailAddress=security@ruby-lang.org + Validity +- Not Before: Dec 23 10:21:33 2010 GMT +- Not After : Jan 1 10:21:33 2014 GMT ++ Not Before: Jan 3 01:34:17 2014 GMT ++ Not After : Jan 2 01:34:17 2019 GMT + Subject: C=JP, ST=Shimane, L=Matz-e city, O=Ruby Core Team, CN=Ruby Test CA/emailAddress=security@ruby-lang.org + Subject Public Key Info: + Public Key Algorithm: rsaEncryption +- Public-Key: (1024 bit) +- Modulus: +- 00:ce:be:2c:9f:47:ba:db:9c:9c:5b:f0:38:3b:f3: +- 74:20:37:76:23:9f:84:1c:81:90:b4:3e:00:20:34: +- 98:7e:81:69:50:a1:c3:65:96:ea:fa:00:da:8c:cc: +- 53:3f:ba:3c:d0:50:7a:5a:b4:6b:ac:d3:2e:18:ca: +- 2a:69:b3:6a:6f:38:c2:32:a8:06:b6:0a:30:a9:ee: +- 03:38:e9:05:a5:19:23:54:a8:3c:b9:08:ad:2b:72: +- 23:df:93:22:c4:46:a8:ea:f1:a6:e9:30:4a:3f:83: +- 39:e9:62:8e:8b:a3:5e:67:89:1d:7c:75:de:05:aa: +- 58:b1:b7:79:7c:10:80:6d:87 ++ RSA Public Key: (1024 bit) ++ Modulus (1024 bit): ++ 00:db:75:d0:45:de:b1:df:bf:71:a0:0e:b0:a5:e6: ++ bc:f4:1c:9d:e5:25:67:64:c5:7b:cb:f1:af:c6:be: ++ 9a:aa:ea:7e:0f:cc:05:af:ef:40:69:06:b2:c9:13: ++ 9d:7e:eb:a2:06:e2:ea:7d:07:c7:c7:99:c7:fb:d5: ++ b8:eb:63:77:62:2b:18:12:c3:53:58:d0:f5:c7:40: ++ 0c:01:d1:26:82:34:16:09:e3:dc:65:f4:dc:bb:5d: ++ a5:41:60:e7:a9:74:ba:d7:4c:b6:a3:9c:c5:8c:89: ++ af:cb:e8:9f:05:fe:ea:fe:64:24:bf:e7:ed:e3:f6: ++ d0:fc:d6:eb:fc:06:82:10:fb + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: +- 41:C9:49:37:B1:FA:61:E3:BA:D7:19:3D:D9:DA:8C:B9:82:C9:B4:6A ++ E8:7E:58:AC:13:7B:03:22:8D:9E:AF:32:0B:84:89:80:80:0C:1E:C2 + X509v3 Authority Key Identifier: +- keyid:41:C9:49:37:B1:FA:61:E3:BA:D7:19:3D:D9:DA:8C:B9:82:C9:B4:6A ++ keyid:E8:7E:58:AC:13:7B:03:22:8D:9E:AF:32:0B:84:89:80:80:0C:1E:C2 ++ DirName:/C=JP/ST=Shimane/L=Matz-e city/O=Ruby Core Team/CN=Ruby Test CA/emailAddress=security@ruby-lang.org ++ serial:B9:90:A2:BF:62:69:17:9C + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha1WithRSAEncryption +- 86:00:33:b9:dd:ff:5f:83:59:5f:c3:29:3c:d7:11:db:10:b3: +- d7:d1:70:fb:0a:c6:74:85:c6:ea:e1:15:c4:92:f8:0e:11:cc: +- ff:a6:3c:31:c2:2c:66:d8:fe:63:93:9f:b0:97:e6:f5:bc:5c: +- 80:68:96:5d:eb:77:b9:23:dd:68:a7:49:03:ff:22:48:55:f1: +- 39:7c:20:21:ff:64:52:e1:f6:cf:3c:b3:4d:2c:5c:03:62:ea: +- c5:49:99:07:fa:8d:ff:7b:c2:75:0c:ca:24:b5:0b:f5:b7:57: +- 3a:10:f0:8a:bb:9a:e8:92:4d:d5:6f:c2:a2:29:36:61:78:a4: +- dc:7b ++ 8f:77:06:4e:31:72:12:ee:68:09:70:27:d4:31:85:ef:10:95: ++ f9:0f:2b:66:63:08:37:88:6e:b7:9b:40:3e:18:77:33:86:e8: ++ 61:6a:b7:3c:cb:c7:a6:d6:d5:92:6a:1f:56:d0:9f:5c:32:56: ++ d3:37:52:fe:0e:20:c2:7a:0d:fe:2d:3c:81:da:b8:7f:4d:6a: ++ 08:01:d9:be:7a:a2:15:be:a6:ce:49:64:90:8c:9a:ca:6e:2e: ++ 84:48:1d:94:19:56:94:46:aa:25:9b:68:c2:80:60:bf:cb:2e: ++ 35:03:ea:0a:65:5a:33:38:c6:cc:81:46:c0:bc:36:86:96:39: ++ 10:7d + -----BEGIN CERTIFICATE----- +-MIIC6DCCAlGgAwIBAgIJAJ/c95SYBUNMMA0GCSqGSIb3DQEBBQUAMIGMMQswCQYD +-VQQGEwJKUDEQMA4GA1UECAwHU2hpbWFuZTEUMBIGA1UEBwwLTWF0ei1lIGNpdHkx +-FzAVBgNVBAoMDlJ1YnkgQ29yZSBUZWFtMRUwEwYDVQQDDAxSdWJ5IFRlc3QgQ0Ex +-JTAjBgkqhkiG9w0BCQEWFnNlY3VyaXR5QHJ1YnktbGFuZy5vcmcwHhcNMTAxMjIz +-MTAyMTMzWhcNMTQwMTAxMTAyMTMzWjCBjDELMAkGA1UEBhMCSlAxEDAOBgNVBAgM +-B1NoaW1hbmUxFDASBgNVBAcMC01hdHotZSBjaXR5MRcwFQYDVQQKDA5SdWJ5IENv +-cmUgVGVhbTEVMBMGA1UEAwwMUnVieSBUZXN0IENBMSUwIwYJKoZIhvcNAQkBFhZz ++MIIDjTCCAvagAwIBAgIJALmQor9iaRecMA0GCSqGSIb3DQEBBQUAMIGMMQswCQYD ++VQQGEwJKUDEQMA4GA1UECBMHU2hpbWFuZTEUMBIGA1UEBxMLTWF0ei1lIGNpdHkx ++FzAVBgNVBAoTDlJ1YnkgQ29yZSBUZWFtMRUwEwYDVQQDEwxSdWJ5IFRlc3QgQ0Ex ++JTAjBgkqhkiG9w0BCQEWFnNlY3VyaXR5QHJ1YnktbGFuZy5vcmcwHhcNMTQwMTAz ++MDEzNDE3WhcNMTkwMTAyMDEzNDE3WjCBjDELMAkGA1UEBhMCSlAxEDAOBgNVBAgT ++B1NoaW1hbmUxFDASBgNVBAcTC01hdHotZSBjaXR5MRcwFQYDVQQKEw5SdWJ5IENv ++cmUgVGVhbTEVMBMGA1UEAxMMUnVieSBUZXN0IENBMSUwIwYJKoZIhvcNAQkBFhZz + ZWN1cml0eUBydWJ5LWxhbmcub3JnMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB +-gQDOviyfR7rbnJxb8Dg783QgN3Yjn4QcgZC0PgAgNJh+gWlQocNllur6ANqMzFM/ +-ujzQUHpatGus0y4Yyipps2pvOMIyqAa2CjCp7gM46QWlGSNUqDy5CK0rciPfkyLE +-Rqjq8abpMEo/gznpYo6Lo15niR18dd4Fqlixt3l8EIBthwIDAQABo1AwTjAdBgNV +-HQ4EFgQUQclJN7H6YeO61xk92dqMuYLJtGowHwYDVR0jBBgwFoAUQclJN7H6YeO6 +-1xk92dqMuYLJtGowDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCGADO5 +-3f9fg1lfwyk81xHbELPX0XD7CsZ0hcbq4RXEkvgOEcz/pjwxwixm2P5jk5+wl+b1 +-vFyAaJZd63e5I91op0kD/yJIVfE5fCAh/2RS4fbPPLNNLFwDYurFSZkH+o3/e8J1 +-DMoktQv1t1c6EPCKu5rokk3Vb8KiKTZheKTcew== ++gQDbddBF3rHfv3GgDrCl5rz0HJ3lJWdkxXvL8a/Gvpqq6n4PzAWv70BpBrLJE51+ ++66IG4up9B8fHmcf71bjrY3diKxgSw1NY0PXHQAwB0SaCNBYJ49xl9Ny7XaVBYOep ++dLrXTLajnMWMia/L6J8F/ur+ZCS/5+3j9tD81uv8BoIQ+wIDAQABo4H0MIHxMB0G ++A1UdDgQWBBToflisE3sDIo2erzILhImAgAwewjCBwQYDVR0jBIG5MIG2gBToflis ++E3sDIo2erzILhImAgAwewqGBkqSBjzCBjDELMAkGA1UEBhMCSlAxEDAOBgNVBAgT ++B1NoaW1hbmUxFDASBgNVBAcTC01hdHotZSBjaXR5MRcwFQYDVQQKEw5SdWJ5IENv ++cmUgVGVhbTEVMBMGA1UEAxMMUnVieSBUZXN0IENBMSUwIwYJKoZIhvcNAQkBFhZz ++ZWN1cml0eUBydWJ5LWxhbmcub3JnggkAuZCiv2JpF5wwDAYDVR0TBAUwAwEB/zAN ++BgkqhkiG9w0BAQUFAAOBgQCPdwZOMXIS7mgJcCfUMYXvEJX5DytmYwg3iG63m0A+ ++GHczhuhharc8y8em1tWSah9W0J9cMlbTN1L+DiDCeg3+LTyB2rh/TWoIAdm+eqIV ++vqbOSWSQjJrKbi6ESB2UGVaURqolm2jCgGC/yy41A+oKZVozOMbMgUbAvDaGljkQ ++fQ== + -----END CERTIFICATE----- +diff --git a/test/net/imap/server.crt b/test/net/imap/server.crt +index d848b26..fa4f994 100644 +--- a/test/net/imap/server.crt ++++ b/test/net/imap/server.crt +@@ -1,17 +1,17 @@ + Certificate: + Data: +- Version: 3 (0x2) ++ Version: 1 (0x0) + Serial Number: 0 (0x0) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=JP, ST=Shimane, L=Matz-e city, O=Ruby Core Team, CN=Ruby Test CA/emailAddress=security@ruby-lang.org + Validity +- Not Before: Dec 23 10:23:52 2010 GMT +- Not After : Jan 1 10:23:52 2014 GMT ++ Not Before: Jan 3 01:34:17 2014 GMT ++ Not After : Jan 2 01:34:17 2019 GMT + Subject: C=JP, ST=Shimane, O=Ruby Core Team, OU=Ruby Test, CN=localhost + Subject Public Key Info: + Public Key Algorithm: rsaEncryption +- Public-Key: (1024 bit) +- Modulus: ++ RSA Public Key: (1024 bit) ++ Modulus (1024 bit): + 00:db:75:d0:45:de:b1:df:bf:71:a0:0e:b0:a5:e6: + bc:f4:1c:9d:e5:25:67:64:c5:7b:cb:f1:af:c6:be: + 9a:aa:ea:7e:0f:cc:05:af:ef:40:69:06:b2:c9:13: +@@ -22,40 +22,27 @@ Certificate: + af:cb:e8:9f:05:fe:ea:fe:64:24:bf:e7:ed:e3:f6: + d0:fc:d6:eb:fc:06:82:10:fb + Exponent: 65537 (0x10001) +- X509v3 extensions: +- X509v3 Basic Constraints: +- CA:FALSE +- Netscape Comment: +- OpenSSL Generated Certificate +- X509v3 Subject Key Identifier: +- E8:7E:58:AC:13:7B:03:22:8D:9E:AF:32:0B:84:89:80:80:0C:1E:C2 +- X509v3 Authority Key Identifier: +- keyid:41:C9:49:37:B1:FA:61:E3:BA:D7:19:3D:D9:DA:8C:B9:82:C9:B4:6A +- + Signature Algorithm: sha1WithRSAEncryption +- ae:ee:cd:fe:c9:af:48:0b:50:37:ac:6a:f6:68:90:9b:67:df: +- 6f:2d:17:c9:3c:a5:da:ad:39:dc:2a:5b:07:88:26:38:19:30: +- d6:95:cf:10:69:c7:92:14:83:be:f1:b5:8e:6f:d9:91:51:c5: +- 63:ae:1c:89:ac:27:bf:4f:2a:8f:4e:0c:57:42:0a:c9:8e:0c: +- f4:f3:02:f7:ea:44:b6:e4:47:05:af:4e:74:e4:87:87:d9:c8: +- 76:ed:ab:32:7c:f0:31:34:10:14:bc:a6:37:cd:d7:dc:33:da: +- 82:d3:d4:9b:e9:d5:cd:38:cc:fa:81:5f:4e:fd:5f:53:05:5d: +- 76:f9 ++ 85:f5:d3:05:8b:8c:f4:43:1c:88:f2:8f:b2:f2:93:77:b7:3d: ++ 95:c6:a0:34:bc:33:6a:d8:85:5f:3e:86:08:10:c5:5c:c1:76: ++ a3:53:3c:dc:38:98:23:97:e7:da:21:ac:e8:4d:3c:96:70:29: ++ ff:ff:1e:4a:9a:17:2b:db:04:62:b9:ef:ab:ea:a7:a5:e8:7c: ++ b1:d5:ed:30:a8:6c:78:de:51:7e:e3:8a:c2:a4:64:a8:63:a2: ++ bc:fd:43:9c:f3:55:7d:54:c9:6a:d8:53:1c:4b:6b:03:aa:b6: ++ 19:e6:a4:4f:47:00:96:c5:42:59:85:4e:c3:4e:cd:41:82:53: ++ 10:f8 + -----BEGIN CERTIFICATE----- +-MIIC3jCCAkegAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjDELMAkGA1UEBhMCSlAx +-EDAOBgNVBAgMB1NoaW1hbmUxFDASBgNVBAcMC01hdHotZSBjaXR5MRcwFQYDVQQK +-DA5SdWJ5IENvcmUgVGVhbTEVMBMGA1UEAwwMUnVieSBUZXN0IENBMSUwIwYJKoZI +-hvcNAQkBFhZzZWN1cml0eUBydWJ5LWxhbmcub3JnMB4XDTEwMTIyMzEwMjM1MloX +-DTE0MDEwMTEwMjM1MlowYDELMAkGA1UEBhMCSlAxEDAOBgNVBAgMB1NoaW1hbmUx +-FzAVBgNVBAoMDlJ1YnkgQ29yZSBUZWFtMRIwEAYDVQQLDAlSdWJ5IFRlc3QxEjAQ +-BgNVBAMMCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA23XQ +-Rd6x379xoA6wpea89Byd5SVnZMV7y/Gvxr6aqup+D8wFr+9AaQayyROdfuuiBuLq +-fQfHx5nH+9W462N3YisYEsNTWND1x0AMAdEmgjQWCePcZfTcu12lQWDnqXS610y2 +-o5zFjImvy+ifBf7q/mQkv+ft4/bQ/Nbr/AaCEPsCAwEAAaN7MHkwCQYDVR0TBAIw +-ADAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUw +-HQYDVR0OBBYEFOh+WKwTewMijZ6vMguEiYCADB7CMB8GA1UdIwQYMBaAFEHJSTex +-+mHjutcZPdnajLmCybRqMA0GCSqGSIb3DQEBBQUAA4GBAK7uzf7Jr0gLUDesavZo +-kJtn328tF8k8pdqtOdwqWweIJjgZMNaVzxBpx5IUg77xtY5v2ZFRxWOuHImsJ79P +-Ko9ODFdCCsmODPTzAvfqRLbkRwWvTnTkh4fZyHbtqzJ88DE0EBS8pjfN19wz2oLT +-1Jvp1c04zPqBX079X1MFXXb5 ++MIICXDCCAcUCAQAwDQYJKoZIhvcNAQEFBQAwgYwxCzAJBgNVBAYTAkpQMRAwDgYD ++VQQIEwdTaGltYW5lMRQwEgYDVQQHEwtNYXR6LWUgY2l0eTEXMBUGA1UEChMOUnVi ++eSBDb3JlIFRlYW0xFTATBgNVBAMTDFJ1YnkgVGVzdCBDQTElMCMGCSqGSIb3DQEJ ++ARYWc2VjdXJpdHlAcnVieS1sYW5nLm9yZzAeFw0xNDAxMDMwMTM0MTdaFw0xOTAx ++MDIwMTM0MTdaMGAxCzAJBgNVBAYTAkpQMRAwDgYDVQQIEwdTaGltYW5lMRcwFQYD ++VQQKEw5SdWJ5IENvcmUgVGVhbTESMBAGA1UECxMJUnVieSBUZXN0MRIwEAYDVQQD ++Ewlsb2NhbGhvc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANt10EXesd+/ ++caAOsKXmvPQcneUlZ2TFe8vxr8a+mqrqfg/MBa/vQGkGsskTnX7rogbi6n0Hx8eZ ++x/vVuOtjd2IrGBLDU1jQ9cdADAHRJoI0Fgnj3GX03LtdpUFg56l0utdMtqOcxYyJ ++r8vonwX+6v5kJL/n7eP20PzW6/wGghD7AgMBAAEwDQYJKoZIhvcNAQEFBQADgYEA ++hfXTBYuM9EMciPKPsvKTd7c9lcagNLwzatiFXz6GCBDFXMF2o1M83DiYI5fn2iGs ++6E08lnAp//8eSpoXK9sEYrnvq+qnpeh8sdXtMKhseN5RfuOKwqRkqGOivP1DnPNV ++fVTJathTHEtrA6q2GeakT0cAlsVCWYVOw07NQYJTEPg= + -----END CERTIFICATE----- +-- +1.8.5.1 + diff --git a/ruby.spec b/ruby.spec index 1bd690f..486ca5e 100644 --- a/ruby.spec +++ b/ruby.spec @@ -140,6 +140,9 @@ Patch17: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch # TestGemRemoteFetcher#test_download_to_cache. # http://bugs.ruby-lang.org/issues/9273 Patch18: ruby-2.1.0-resolv.rb-no-encodings.patch +# Backport regenerated certificates for IMAP tests. +# http://bugs.ruby-lang.org/issues/9341 +Patch19: ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -404,6 +407,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch12 -p1 %patch17 -p1 %patch18 -p1 +%patch19 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -563,10 +567,6 @@ sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{r %check DISABLE_TESTS="" -# Ignore IMAP tests due to expired certificate. -# http://bugs.ruby-lang.org/issues/9341 -DISABLE_TESTS="-x test_imap.rb $DISABLE_TESTS" - %ifarch armv7l armv7hl armv7hnl # test_call_double(DL::TestDL) fails on ARM HardFP # http://bugs.ruby-lang.org/issues/6592 From 0f37fb5c2c291a48379a7edb97c53ae991fcb401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 3 Jan 2014 16:21:47 +0100 Subject: [PATCH 17/30] Use %{_rpmconfigdir} for specifying RPM config dir. --- ruby.spec | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ruby.spec b/ruby.spec index 486ca5e..d2fba26 100644 --- a/ruby.spec +++ b/ruby.spec @@ -462,11 +462,11 @@ sed -i 's/Version: \${ruby_version}/Version: %{ruby_version}/' %{buildroot}%{_li # Move macros file insto proper place and replace the %%{name} macro, since it # would be wrongly evaluated during build of other packages. -mkdir -p %{buildroot}%{_exec_prefix}/lib/rpm/macros.d -install -m 644 %{SOURCE4} %{buildroot}%{_exec_prefix}/lib/rpm/macros.d/macros.ruby -sed -i "s/%%{name}/%{name}/" %{buildroot}%{_exec_prefix}/lib/rpm/macros.d/macros.ruby -install -m 644 %{SOURCE5} %{buildroot}%{_exec_prefix}/lib/rpm/macros.d/macros.rubygems -sed -i "s/%%{name}/%{name}/" %{buildroot}%{_exec_prefix}/lib/rpm/macros.d/macros.rubygems +mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d +install -m 644 %{SOURCE4} %{buildroot}%{_rpmconfigdir}/macros.d/macros.ruby +sed -i "s/%%{name}/%{name}/" %{buildroot}%{_rpmconfigdir}/macros.d/macros.ruby +install -m 644 %{SOURCE5} %{buildroot}%{_rpmconfigdir}/macros.d/macros.rubygems +sed -i "s/%%{name}/%{name}/" %{buildroot}%{_rpmconfigdir}/macros.d/macros.rubygems # Kill bundled cert.pem mkdir -p %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/ @@ -649,7 +649,7 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %doc README.EXT %lang(ja) %doc README.EXT.ja -%{_exec_prefix}/lib/rpm/macros.d/macros.ruby +%{_rpmconfigdir}/macros.d/macros.ruby %{_includedir}/* %{_libdir}/libruby.so @@ -846,7 +846,7 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %exclude %{gem_dir}/specifications/default/test-unit-*.gemspec %files -n rubygems-devel -%{_exec_prefix}/lib/rpm/macros.d/macros.rubygems +%{_rpmconfigdir}/macros.d/macros.rubygems %files -n rubygem-rake %{_bindir}/rake From 02ee7904a419f4434bdef373500f3b14916fed0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 6 Jan 2014 13:48:46 +0100 Subject: [PATCH 18/30] Rebase patches. --- ...o-specify-additional-preludes-by-configuratio.patch | 6 +++--- ruby-2.1.0-Enable-configuration-of-archlibdir.patch | 2 +- ...-duplicated-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 | 10 +++++----- ruby-2.1.0-resolv.rb-no-encodings.patch | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) 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 55778ef..4487c44 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 @@ -13,7 +13,7 @@ diff --git a/Makefile.in b/Makefile.in index 7e8ed82..7916993 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -110,6 +110,7 @@ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@ +@@ -114,6 +114,7 @@ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@ XRUBY_RUBYHDRDIR = @XRUBY_RUBYHDRDIR@ DEFAULT_PRELUDES = $(GEM_PRELUDE) @@ -25,7 +25,7 @@ diff --git a/common.mk b/common.mk index 5cfbc3d..3f0a82e 100644 --- a/common.mk +++ b/common.mk -@@ -110,7 +110,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) +@@ -109,7 +109,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT) @@ -38,7 +38,7 @@ diff --git a/configure.in b/configure.in index 0e371e2..d4f1dcb 100644 --- a/configure.in +++ b/configure.in -@@ -3731,6 +3731,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -3814,6 +3814,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 668edfa..4b44444 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 -@@ -2956,6 +2956,11 @@ if test ${multiarch+set}; then +@@ -3044,6 +3044,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 950336c..86d1675 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 @@ -13,7 +13,7 @@ diff --git a/configure.in b/configure.in index 88d24ee..4a300b9 100644 --- a/configure.in +++ b/configure.in -@@ -3608,8 +3608,6 @@ AC_ARG_WITH(rubylibprefix, +@@ -3618,8 +3618,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -22,7 +22,7 @@ index 88d24ee..4a300b9 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, -@@ -3639,6 +3637,7 @@ AC_ARG_WITH(ruby-version, +@@ -3649,6 +3647,7 @@ AC_ARG_WITH(ruby-version, [ruby_version=full]) unset RUBY_LIB_VERSION unset RUBY_LIB_VERSION_STYLE @@ -30,7 +30,7 @@ index 88d24ee..4a300b9 100644 AS_CASE(["$ruby_version"], [full], [RUBY_LIB_VERSION_STYLE='3 /* full */'], [minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */']) -@@ -3655,30 +3654,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then +@@ -3665,30 +3664,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 10e3d99..b7e2fed 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 -@@ -3647,6 +3647,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3730,6 +3730,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 b7f6588..3c7272e 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 -@@ -3621,6 +3621,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -3704,6 +3704,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='' -@@ -3644,6 +3648,7 @@ AC_SUBST(sitearchdir)dnl +@@ -3727,6 +3731,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl @@ -38,7 +38,7 @@ diff --git a/loadpath.c b/loadpath.c index 623dc9d..74c5d9e 100644 --- a/loadpath.c +++ b/loadpath.c -@@ -86,6 +86,10 @@ const char ruby_initial_load_paths[] = +@@ -94,6 +94,10 @@ const char ruby_initial_load_paths[] = #endif #endif @@ -67,7 +67,7 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index b47b6e1..0b99408 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -317,6 +317,7 @@ sitelibdir = CONFIG["sitelibdir"] +@@ -324,6 +324,7 @@ sitelibdir = CONFIG["sitelibdir"] sitearchlibdir = CONFIG["sitearchdir"] vendorlibdir = CONFIG["vendorlibdir"] vendorarchlibdir = CONFIG["vendorarchdir"] @@ -75,7 +75,7 @@ index b47b6e1..0b99408 100755 mandir = CONFIG["mandir", true] docdir = CONFIG["docdir", true] configure_args = Shellwords.shellwords(CONFIG["configure_args"]) -@@ -505,7 +506,15 @@ end +@@ -512,7 +513,15 @@ end install?(:local, :comm, :lib) do prepare "library scripts", rubylibdir noinst = %w[README* *.txt *.rdoc *.gemspec] diff --git a/ruby-2.1.0-resolv.rb-no-encodings.patch b/ruby-2.1.0-resolv.rb-no-encodings.patch index f1037db..27e91aa 100644 --- a/ruby-2.1.0-resolv.rb-no-encodings.patch +++ b/ruby-2.1.0-resolv.rb-no-encodings.patch @@ -19,7 +19,7 @@ diff --git a/ChangeLog b/ChangeLog index 72eaa6f..93686e9 100644 --- a/ChangeLog +++ b/ChangeLog -@@ -1,6 +1,13 @@ +@@ -67,6 +67,13 @@ install win32.h. [ruby-core:58801][Bug #9199] reported by arton. From 19ff4992f3753a8a614abf5088635b6fbd2464e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 10 Jan 2014 14:53:57 +0100 Subject: [PATCH 19/30] Detect if rubygems are running under rpmbuild. This allows to install binaryi extensions on suitable place and clears the .spec files a bit. --- operating_system.rb | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/operating_system.rb b/operating_system.rb index fba8117..079564f 100644 --- a/operating_system.rb +++ b/operating_system.rb @@ -11,6 +11,15 @@ module Gem end private :previous_but_one_dir_to + ## + # Tries to detect, if arguments and environment variables suggest that + # 'gem install' is executed from rpmbuild. + + def rpmbuild? + (ARGV.include?('--install-dir') || ARGV.include?('-i')) && ENV['RPM_PACKAGE_NAME'] + end + private :rpmbuild? + ## # Default gems locations allowed on FHS system (/usr, /usr/share). # The locations are derived from directories specified during build @@ -78,8 +87,16 @@ module Gem end def default_ext_dir_for base_dir - dirs = Gem.default_dirs.detect {|location, paths| paths[:gem_dir] == base_dir} - dirs && File.join(dirs.last[:ext_dir], RbConfig::CONFIG['RUBY_INSTALL_NAME']) + dir = if rpmbuild? + build_dir = base_dir.chomp Gem.default_dirs[:system][:gem_dir] + if build_dir != base_dir + File.join build_dir, Gem.default_dirs[:system][:ext_dir] + end + else + dirs = Gem.default_dirs.detect {|location, paths| paths[:gem_dir] == base_dir} + dirs && dirs.last[:ext_dir] + end + dir && File.join(dir, RbConfig::CONFIG['RUBY_INSTALL_NAME']) end # This method should be available since RubyGems 2.2 until RubyGems 3.0. From 86a8f5cf5aacdfe5700ba763d9391f3dfd0b5db5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 10 Jan 2014 15:26:24 +0100 Subject: [PATCH 20/30] Bump the release and add changelog. --- ruby.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index d2fba26..3eff915 100644 --- a/ruby.spec +++ b/ruby.spec @@ -28,7 +28,7 @@ %endif -%global release 17 +%global release 18 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.2.0 @@ -916,6 +916,10 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Fri Jan 10 2014 Vít Ondruch - 2.1.0-18 +- Detect if rubygems are running under rpmbuild and install gem binary + extensions into appropriate place. + * Thu Jan 02 2014 Vít Ondruch - 2.1.0-17 - Upgrade to Ruby 2.1.0. - Move RPM macros into /usr/lib/rpm/macros.d directory. From e11dee85448fc7270671c1f1a004739f49a93903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 10 Jan 2014 16:06:12 +0100 Subject: [PATCH 21/30] Don't generate documentation on unexpected places. --- ruby.spec | 9 +++ ...-Add-BasicSpecification-source_paths.patch | 73 +++++++++++++++++++ ...ource_paths-for-fallback-rdoc-plugin.patch | 26 +++++++ 3 files changed, 108 insertions(+) create mode 100644 rubygems-2.2.1-Add-BasicSpecification-source_paths.patch create mode 100644 rubygems-2.2.1-Use-source_paths-for-fallback-rdoc-plugin.patch diff --git a/ruby.spec b/ruby.spec index 3eff915..ce34984 100644 --- a/ruby.spec +++ b/ruby.spec @@ -143,6 +143,12 @@ Patch18: ruby-2.1.0-resolv.rb-no-encodings.patch # Backport regenerated certificates for IMAP tests. # http://bugs.ruby-lang.org/issues/9341 Patch19: ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch +# Fix documentation generated on unexpected places. +# https://github.com/rubygems/rubygems/issues/758 +# https://github.com/rubygems/rubygems/commit/e088c6824209d98eccb0f1e6c7e21f26b4a1178d +Patch20: rubygems-2.2.1-Add-BasicSpecification-source_paths.patch +# https://github.com/rubygems/rubygems/commit/2f03b54b63043aadce9e95b83e98b29712bad21f +Patch21: rubygems-2.2.1-Use-source_paths-for-fallback-rdoc-plugin.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -408,6 +414,8 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch17 -p1 %patch18 -p1 %patch19 -p1 +%patch20 -p1 +%patch21 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -917,6 +925,7 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %changelog * Fri Jan 10 2014 Vít Ondruch - 2.1.0-18 +- Don't generate documentation on unexpected places. - Detect if rubygems are running under rpmbuild and install gem binary extensions into appropriate place. diff --git a/rubygems-2.2.1-Add-BasicSpecification-source_paths.patch b/rubygems-2.2.1-Add-BasicSpecification-source_paths.patch new file mode 100644 index 0000000..3cd1bed --- /dev/null +++ b/rubygems-2.2.1-Add-BasicSpecification-source_paths.patch @@ -0,0 +1,73 @@ +From e088c6824209d98eccb0f1e6c7e21f26b4a1178d Mon Sep 17 00:00:00 2001 +From: Eric Hodel +Date: Mon, 6 Jan 2014 14:20:18 -0800 +Subject: [PATCH] Add BasicSpecification#source_paths + +This allows documentation and analysis tools to retrieve paths of source +files in gems. This is needed as the introduction of shared gem +directories means the extension source directory is no longer included +in require_paths (which was meant for $LOAD_PATH, not source code). +--- + lib/rubygems/basic_specification.rb | 18 ++++++++++++++++++ + test/rubygems/test_gem_specification.rb | 16 ++++++++++++++++ + 2 files changed, 34 insertions(+) + +diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb +index a52377f..470a6eb 100644 +--- a/lib/rubygems/basic_specification.rb ++++ b/lib/rubygems/basic_specification.rb +@@ -207,6 +207,24 @@ def require_paths + end + + ## ++ # Returns the paths to the source files for use with analysis and ++ # documentation tools. These paths are relative to full_gem_path. ++ ++ def source_paths ++ paths = raw_require_paths.dup ++ ++ if @extensions then ++ ext_dirs = @extensions.map do |extension| ++ extension.split(File::SEPARATOR, 2).first ++ end.uniq ++ ++ paths.concat ext_dirs ++ end ++ ++ paths.uniq ++ end ++ ++ ## + # Return a Gem::Specification from this gem + + def to_spec +diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb +index 46db0c4..b72a5d1 100644 +--- a/test/rubygems/test_gem_specification.rb ++++ b/test/rubygems/test_gem_specification.rb +@@ -1809,6 +1809,22 @@ def test_source + assert_kind_of Gem::Source::Installed, @a1.source + end + ++ def test_source_paths ++ ext_spec ++ ++ @ext.require_paths = %w[lib ext foo] ++ @ext.extensions << 'bar/baz' ++ ++ expected = %w[ ++ lib ++ ext ++ foo ++ bar ++ ] ++ ++ assert_equal expected, @ext.source_paths ++ end ++ + def test_full_require_paths + ext_spec + +-- +1.8.5.1 + diff --git a/rubygems-2.2.1-Use-source_paths-for-fallback-rdoc-plugin.patch b/rubygems-2.2.1-Use-source_paths-for-fallback-rdoc-plugin.patch new file mode 100644 index 0000000..edf40f1 --- /dev/null +++ b/rubygems-2.2.1-Use-source_paths-for-fallback-rdoc-plugin.patch @@ -0,0 +1,26 @@ +From 2f03b54b63043aadce9e95b83e98b29712bad21f Mon Sep 17 00:00:00 2001 +From: Eric Hodel +Date: Mon, 6 Jan 2014 14:30:07 -0800 +Subject: [PATCH] Use source_paths for fallback rdoc plugin + +Fixes #758 +--- + lib/rubygems/rdoc.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/rubygems/rdoc.rb b/lib/rubygems/rdoc.rb +index 52249dc..633bd89 100644 +--- a/lib/rubygems/rdoc.rb ++++ b/lib/rubygems/rdoc.rb +@@ -193,7 +193,7 @@ def generate + ::RDoc::Parser::C.reset + + args = @spec.rdoc_options +- args.concat @spec.require_paths ++ args.concat @spec.source_paths + args.concat @spec.extra_rdoc_files + + case config_args = Gem.configuration[:rdoc] +-- +1.8.5.1 + From 199081935ed74325e7ae917b44a55dc1511d960f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 15 Jan 2014 10:16:52 +0100 Subject: [PATCH 22/30] Add support for ppc64le arch (rhbz#1053263). --- config.h | 5 +++++ ruby.spec | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/config.h b/config.h index ce501db..b34e398 100644 --- a/config.h +++ b/config.h @@ -20,7 +20,12 @@ #elif defined(__ia64__) #include "ruby/config-ia64.h" #elif defined(__powerpc64__) +#include +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ #include "ruby/config-ppc64.h" +#else +#include "ruby/config-ppc64le.h" +#endif #elif defined(__powerpc__) #include "ruby/config-ppc.h" #elif defined(__s390x__) diff --git a/ruby.spec b/ruby.spec index ce34984..5436e1f 100644 --- a/ruby.spec +++ b/ruby.spec @@ -924,10 +924,11 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog -* Fri Jan 10 2014 Vít Ondruch - 2.1.0-18 +* Wed Jan 15 2014 Vít Ondruch - 2.1.0-18 - Don't generate documentation on unexpected places. - Detect if rubygems are running under rpmbuild and install gem binary extensions into appropriate place. +- Add support for ppc64le arch (rhbz#1053263). * Thu Jan 02 2014 Vít Ondruch - 2.1.0-17 - Upgrade to Ruby 2.1.0. From 04104b76f38b35a4e2f646cbefe7ed6cf423b468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 6 Feb 2014 08:59:35 +0100 Subject: [PATCH 23/30] "Errno::EINVAL: Invalid argument - recvmsg(2)" works with recent kernel. Tested with Kernel 3.12.8-300.fc20.x86_64. https://bugs.ruby-lang.org/issues/9124 --- ruby.spec | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/ruby.spec b/ruby.spec index 5436e1f..ea28606 100644 --- a/ruby.spec +++ b/ruby.spec @@ -611,19 +611,6 @@ sed -i '/Process.constants.grep(\/\\ACLOCK_\/).each {|n|/ s/$/\n next if [: # http://bugs.ruby-lang.org/issues/9259 sed -i "/^ gem 'minitest', '~> 4.0'/ s/^/#/" lib/rubygems/test_case.rb -# Errno::EINVAL: Invalid argument - recvmsg(2) -# Looks to be a problem of Linux 3.12+ and should be possible to remove as soon -# as Koji builders run fixed kerenel. -# https://bugs.ruby-lang.org/issues/9124 -sed -i '/^ def test_timestampns/,/^ end/ s/^/#/' test/socket/test_socket.rb -sed -i '/^ def test_timestamp/,/^ end/ s/^/#/' test/socket/test_socket.rb -sed -i '/^ def test_udp_server/,/^ end/ s/^/#/' test/socket/test_socket.rb -sed -i '/^ def test_recvmsg_nonblock_error/,/^ end/ s/^/#/' test/socket/test_nonblock.rb -sed -i '/^ def test_fd_passing_n/,/^ end/ s/^/#/' test/socket/test_unix.rb -sed -i '/^ def test_fd_passing_n2/,/^ end/ s/^/#/' test/socket/test_unix.rb -sed -i '/^ def test_recvmsg/,/^ end/ s/^/#/' test/socket/test_unix.rb -sed -i '/^ def test_sendcred_ucred/,/^ end/ s/^/#/' test/socket/test_unix.rb - # Segmentation fault. # https://bugs.ruby-lang.org/issues/9198 sed -i '/^ def test_machine_stackoverflow/,/^ end/ s/^/#/' test/ruby/test_exception.rb @@ -929,6 +916,7 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" - Detect if rubygems are running under rpmbuild and install gem binary extensions into appropriate place. - Add support for ppc64le arch (rhbz#1053263). +- Re-enable some test cases, which are passing now with Kernel 3.12.8+. * Thu Jan 02 2014 Vít Ondruch - 2.1.0-17 - Upgrade to Ruby 2.1.0. From 7347c8fd58b3bc41f59f79faadfb0a17309ebc13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 6 Feb 2014 09:04:54 +0100 Subject: [PATCH 24/30] Re-enabled "TestProcess#{test_clock_getres_constants,test_clock_gettime_constants} The issue was fixed with Kernel 3.12.9-300.fc20.armv7hl. http://bugs.ruby-lang.org/issues/9008 --- ruby.spec | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ruby.spec b/ruby.spec index ea28606..645265f 100644 --- a/ruby.spec +++ b/ruby.spec @@ -597,16 +597,6 @@ touch abrt.rb # http://bugs.ruby-lang.org/issues/8997 sed -i '/def test_hup_me/,/end if Process.respond_to/ s/^/#/' test/ruby/test_signal.rb -%ifarch armv7l armv7hl armv7hnl -# TestProcess#test_clock_getres_constants and TestProcess#test_clock_gettime_constants fails on ARM. -# http://bugs.ruby-lang.org/issues/9008 -# Kernel issue. Should be fixed in 3.13 kernel. -# https://lkml.org/lkml/2013/10/18/521 -# http://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?id=98d6f4dd84a134d942827584a3c5f67ffd8ec35f -sed -i '/Process.constants.grep(\/\\ACLOCK_\/).each {|n|/ s/$/\n next if [:CLOCK_REALTIME_ALARM, :CLOCK_BOOTTIME_ALARM].include? n/' \ - test/ruby/test_process.rb -%endif - # Fix "Could not find 'minitest'" error. # http://bugs.ruby-lang.org/issues/9259 sed -i "/^ gem 'minitest', '~> 4.0'/ s/^/#/" lib/rubygems/test_case.rb From 9fc3f49bd63fd3521e47ba3f09fb42d372a88e02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 6 Feb 2014 10:34:50 +0100 Subject: [PATCH 25/30] Backport fix for floating point issues on i686. --- ruby-2.2.0-configure.in-use-SSE2.patch | 49 ++++++++++++++++++++++++++ ruby.spec | 12 +++---- 2 files changed, 54 insertions(+), 7 deletions(-) create mode 100644 ruby-2.2.0-configure.in-use-SSE2.patch diff --git a/ruby-2.2.0-configure.in-use-SSE2.patch b/ruby-2.2.0-configure.in-use-SSE2.patch new file mode 100644 index 0000000..87858ce --- /dev/null +++ b/ruby-2.2.0-configure.in-use-SSE2.patch @@ -0,0 +1,49 @@ +From 40967a5c0b975f3f3ec1538a820985aa61b65b8f Mon Sep 17 00:00:00 2001 +From: nobu +Date: Thu, 9 Jan 2014 11:46:26 +0000 +Subject: [PATCH] configure.in: use SSE2 + +* configure.in: use SSE2 instructions to drop unexpected precisions on + other than mingw. [ruby-core:59472] [Bug #8358] + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + ChangeLog | 5 +++++ + configure.in | 8 ++++++++- + 2 files changed, 13 insertions(+), 0 deletion(-) + +diff --git a/ChangeLog b/ChangeLog +index 7ec6eec..9ba337f 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,8 @@ ++Thu Jan 9 20:46:22 2014 Nobuyoshi Nakada ++ ++ * configure.in: use SSE2 instructions to drop unexpected precisions on ++ other than mingw. [ruby-core:59472] [Bug #8358] ++ + Fri Jan 3 10:43:57 2014 Aman Gupta + + * test/net/imap/cacert.pem: generate new CA cert, since the last one +diff --git a/configure.in b/configure.in +index f9e9431..9c95cc4 100644 +--- a/configure.in ++++ b/configure.in +@@ -858,6 +857,14 @@ 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*]], [ ++ RUBY_TRY_CFLAGS(-msse2 -mfpmath=sse, [RUBY_APPEND_OPTION(XCFLAGS, -msse2 -mfpmath=sse)]) ++ ] ++ ) + fi + + AC_ARG_WITH(opt-dir, +-- +1.8.5.1 + diff --git a/ruby.spec b/ruby.spec index 645265f..6a4e404 100644 --- a/ruby.spec +++ b/ruby.spec @@ -149,6 +149,9 @@ Patch19: ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch Patch20: rubygems-2.2.1-Add-BasicSpecification-source_paths.patch # https://github.com/rubygems/rubygems/commit/2f03b54b63043aadce9e95b83e98b29712bad21f Patch21: rubygems-2.2.1-Use-source_paths-for-fallback-rdoc-plugin.patch +# TestSprintf#test_float fails on i686 +# http://bugs.ruby-lang.org/issues/8358 +Patch22: ruby-2.2.0-configure.in-use-SSE2.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -416,6 +419,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch19 -p1 %patch20 -p1 %patch21 -p1 +%patch22 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -581,13 +585,6 @@ DISABLE_TESTS="" DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS" %endif -%ifarch i686 -# TestSprintf#test_float fails on i686 -# http://bugs.ruby-lang.org/issues/8358 -sed -i "/assert_equal(\"0x1p+2\", sprintf('%.0a', Float('0x1.fp+1')), \"\[ruby-dev:42551\]\")/ s/^/#/" test/ruby/test_sprintf.rb -sed -i "/assert_equal(\"-0x1.0p+2\", sprintf('%.1a', Float('-0x1.ffp+1')), \"\[ruby-dev:42551\]\")/ s/^/#/" test/ruby/test_sprintf.rb -%endif - # test_debug(TestRubyOptions) fails due to LoadError reported in debug mode, # when abrt.rb cannot be required (seems to be easier way then customizing # the test suite). @@ -907,6 +904,7 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" extensions into appropriate place. - Add support for ppc64le arch (rhbz#1053263). - Re-enable some test cases, which are passing now with Kernel 3.12.8+. +- Backport fix for floating point issues on i686. * Thu Jan 02 2014 Vít Ondruch - 2.1.0-17 - Upgrade to Ruby 2.1.0. From b038223eae017fc71e3b2e1cc1221a7308bfdeba Mon Sep 17 00:00:00 2001 From: Josef Stribny Date: Mon, 10 Feb 2014 14:17:53 +0100 Subject: [PATCH 26/30] Don't link cert.pem explicitely --- ruby.spec | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/ruby.spec b/ruby.spec index 6a4e404..86359f7 100644 --- a/ruby.spec +++ b/ruby.spec @@ -28,7 +28,7 @@ %endif -%global release 18 +%global release 19 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.2.0 @@ -172,8 +172,6 @@ BuildRequires: tk-devel # Needed to pass test_set_program_name(TestRubyOptions) BuildRequires: procps BuildRequires: %{_bindir}/dtrace -# Unbundle cert.pem -BuildRequires: ca-certificates # RubyGems test suite optional dependencies. BuildRequires: %{_bindir}/git BuildRequires: %{_bindir}/cmake @@ -219,7 +217,6 @@ Requires: ruby(release) Requires: rubygem(rdoc) >= %{rdoc_version} Requires: rubygem(io-console) >= %{io_console_version} Requires: rubygem(psych) >= %{psych_version} -Requires: ca-certificates Provides: gem = %{version}-%{release} Provides: ruby(rubygems) = %{version}-%{release} BuildArch: noarch @@ -480,11 +477,6 @@ sed -i "s/%%{name}/%{name}/" %{buildroot}%{_rpmconfigdir}/macros.d/macros.ruby install -m 644 %{SOURCE5} %{buildroot}%{_rpmconfigdir}/macros.d/macros.rubygems sed -i "s/%%{name}/%{name}/" %{buildroot}%{_rpmconfigdir}/macros.d/macros.rubygems -# Kill bundled cert.pem -mkdir -p %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/ -ln -sf %{_sysconfdir}/pki/tls/cert.pem \ - %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/ca-bundle.pem - # Install custom operating_system.rb. mkdir -p %{buildroot}%{rubygems_dir}/rubygems/defaults cp %{SOURCE1} %{buildroot}%{rubygems_dir}/rubygems/defaults @@ -898,6 +890,9 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon Feb 10 2014 Josef Stribny - 2.1.0-19 +- Don't link cert.pem explicitely + * Wed Jan 15 2014 Vít Ondruch - 2.1.0-18 - Don't generate documentation on unexpected places. - Detect if rubygems are running under rpmbuild and install gem binary From 724ffdbb53749eb752ed8d30bc663e48a0738948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 3 Mar 2014 17:49:42 +0100 Subject: [PATCH 27/30] Add RPM dependency generators for RubyGems. --- ruby.spec | 16 ++++++++++ rubygems.attr | 3 ++ rubygems.prov | 36 +++++++++++++++++++++++ rubygems.req | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 136 insertions(+) create mode 100644 rubygems.attr create mode 100644 rubygems.prov create mode 100644 rubygems.req diff --git a/ruby.spec b/ruby.spec index 86359f7..f157de9 100644 --- a/ruby.spec +++ b/ruby.spec @@ -82,6 +82,10 @@ Source6: abrt_prelude.rb # https://fedorahosted.org/fpc/ticket/312 # https://bugzilla.redhat.com/show_bug.cgi?id=977941 Source7: config.h +# RPM dependency generators. +Source8: rubygems.attr +Source9: rubygems.req +Source10: rubygems.prov # Include the constants defined in macros files. @@ -477,6 +481,12 @@ sed -i "s/%%{name}/%{name}/" %{buildroot}%{_rpmconfigdir}/macros.d/macros.ruby install -m 644 %{SOURCE5} %{buildroot}%{_rpmconfigdir}/macros.d/macros.rubygems sed -i "s/%%{name}/%{name}/" %{buildroot}%{_rpmconfigdir}/macros.d/macros.rubygems +# Install dependency generators. +mkdir -p %{buildroot}%{_rpmconfigdir}/fileattrs +install -m 644 %{SOURCE8} %{buildroot}%{_rpmconfigdir}/fileattrs +install -m 755 %{SOURCE9} %{buildroot}%{_rpmconfigdir} +install -m 755 %{SOURCE10} %{buildroot}%{_rpmconfigdir} + # Install custom operating_system.rb. mkdir -p %{buildroot}%{rubygems_dir}/rubygems/defaults cp %{SOURCE1} %{buildroot}%{rubygems_dir}/rubygems/defaults @@ -821,6 +831,9 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %files -n rubygems-devel %{_rpmconfigdir}/macros.d/macros.rubygems +%{_rpmconfigdir}/fileattrs/rubygems.attr +%{_rpmconfigdir}/rubygems.req +%{_rpmconfigdir}/rubygems.prov %files -n rubygem-rake %{_bindir}/rake @@ -890,6 +903,9 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon Mar 03 2014 Vít Ondruch - 2.1.0-19 +- Add RPM dependency generators for RubyGems. + * Mon Feb 10 2014 Josef Stribny - 2.1.0-19 - Don't link cert.pem explicitely diff --git a/rubygems.attr b/rubygems.attr new file mode 100644 index 0000000..f711775 --- /dev/null +++ b/rubygems.attr @@ -0,0 +1,3 @@ +%__rubygems_requires %{_rpmconfigdir}/rubygems.req +%__rubygems_provides %{_rpmconfigdir}/rubygems.prov +%__rubygems_path ^%{gem_spec}$ diff --git a/rubygems.prov b/rubygems.prov new file mode 100644 index 0000000..f23ec3f --- /dev/null +++ b/rubygems.prov @@ -0,0 +1,36 @@ +#!/usr/bin/ruby + +require 'rubygems/package' + +module RubyGemsProv + module Helpers + # If there is some prelease version files, such as rc1 (i.e. non-numeric + # field), prepend this field by tilde instead of dot. + def self.normalize_prerelease(version) + if version.prerelease? + prerelease = version.version.sub /^#{version.release}\./, '' + "#{version.release}~#{prerelease}" + else + version.release + end + end + end + + # Reports all functionality gem provides. + def self.provides + while filename = gets + filename.strip! + begin + specification = Gem::Specification.load filename + + puts "rubygem(#{specification.name}) = #{Helpers::normalize_prerelease(specification.version)}" + rescue => e + # Ignore all errors. + end + end + end +end + +if __FILE__ == $0 + RubyGemsProv::provides +end diff --git a/rubygems.req b/rubygems.req new file mode 100644 index 0000000..831d7af --- /dev/null +++ b/rubygems.req @@ -0,0 +1,81 @@ +#!/usr/bin/ruby + +require 'rubygems/package' + +module RubyGemsReq + module Helpers + # Expands '~>' and '!=' gem requirements. + def self.expand_requirement(requirements) + requirements.inject([]) do |output, r| + output.concat case r.first + when '~>' + expand_pessimistic_requirement(r) + when '!=' + expand_not_equal_requirement(r) + else + [r] + end + end + end + + # Expands the pessimistic version operator '~>' into equivalent '>=' and + # '<' pair. + def self.expand_pessimistic_requirement(requirement) + next_version = Gem::Version.create(requirement.last).bump + return ['>=', requirement.last], ['<', next_version] + end + + # Expands the not equal version operator '!=' into equivalent '<' and + # '>' pair. + def self.expand_not_equal_requirement(requirement) + return ['<', requirement.last], ['>', requirement.last] + end + + # Converts Gem::Requirement into array of requirements strings compatible + # with RPM .spec file. + def self.requirement_versions_to_rpm(requirement) + self.expand_requirement(requirement.requirements).map do |op, version| + version == Gem::Version.new(0) ? "" : "#{op} #{version}" + end + end + end + + # Report RubyGems dependency, versioned if required. + def self.rubygems_dependency(specification) + Helpers::requirement_versions_to_rpm(specification.required_rubygems_version).each do |requirement| + dependency_string = "ruby(rubygems)" + dependency_strint += " #{specification.required_rubygems_version}" if requirement && requirement.length > 0 + puts dependency_string + end + end + + # Report all gem dependencies including their version. + def self.gem_depenencies(specification) + specification.runtime_dependencies.each do |dependency| + Helpers::requirement_versions_to_rpm(dependency.requirement).each do |requirement| + dependency_string = "rubygem(#{dependency.name})" + dependency_string += " #{requirement}" if requirement && requirement.length > 0 + puts dependency_string + end + end + end + + # Reports all requirements specified by all provided .gemspec files. + def self.requires + while filename = gets + filename.strip! + begin + specification = Gem::Specification.load filename + + rubygems_dependency(specification) + gem_depenencies(specification) + rescue => e + # Ignore all errors. + end + end + end +end + +if __FILE__ == $0 + RubyGemsReq::requires +end From df08120417d5cf499448bcc02ced3a1034fbb859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 5 Mar 2014 15:30:45 +0100 Subject: [PATCH 28/30] Update to Ruby 2.1.1. --- ...-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.1.0-resolv.rb-no-encodings.patch | 143 ---------- ...x-test-failures-due-to-expired-certs.patch | 259 ------------------ ruby-2.2.0-configure.in-use-SSE2.patch | 49 ---- ruby.spec | 36 +-- ...-Add-BasicSpecification-source_paths.patch | 73 ----- ...ource_paths-for-fallback-rdoc-plugin.patch | 26 -- 11 files changed, 17 insertions(+), 585 deletions(-) delete mode 100644 ruby-2.1.0-resolv.rb-no-encodings.patch delete mode 100644 ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch delete mode 100644 ruby-2.2.0-configure.in-use-SSE2.patch delete mode 100644 rubygems-2.2.1-Add-BasicSpecification-source_paths.patch delete mode 100644 rubygems-2.2.1-Use-source_paths-for-fallback-rdoc-plugin.patch 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 4487c44..e297a73 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 -@@ -3814,6 +3814,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -3841,6 +3841,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 4b44444..90a97d7 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 -@@ -3044,6 +3044,11 @@ if test ${multiarch+set}; then +@@ -3071,6 +3071,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 86d1675..da88a97 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 @@ -13,7 +13,7 @@ diff --git a/configure.in b/configure.in index 88d24ee..4a300b9 100644 --- a/configure.in +++ b/configure.in -@@ -3618,8 +3618,6 @@ AS_CASE(["$target_os"], +@@ -3645,8 +3645,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -22,7 +22,7 @@ index 88d24ee..4a300b9 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, -@@ -3649,6 +3647,7 @@ AC_ARG_WITH(ruby-version, +@@ -3676,6 +3676,7 @@ AC_ARG_WITH(ruby-version, [ruby_version=full]) unset RUBY_LIB_VERSION unset RUBY_LIB_VERSION_STYLE @@ -30,7 +30,7 @@ index 88d24ee..4a300b9 100644 AS_CASE(["$ruby_version"], [full], [RUBY_LIB_VERSION_STYLE='3 /* full */'], [minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */']) -@@ -3665,30 +3664,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then +@@ -3692,30 +3691,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 b7e2fed..88eff60 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 -@@ -3730,6 +3730,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3757,6 +3757,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 3c7272e..e0e488b 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 -@@ -3704,6 +3704,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -3731,6 +3731,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='' -@@ -3727,6 +3731,7 @@ AC_SUBST(sitearchdir)dnl +@@ -3754,6 +3754,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-2.1.0-resolv.rb-no-encodings.patch b/ruby-2.1.0-resolv.rb-no-encodings.patch deleted file mode 100644 index 27e91aa..0000000 --- a/ruby-2.1.0-resolv.rb-no-encodings.patch +++ /dev/null @@ -1,143 +0,0 @@ -From 1ffbe07e179a2e047d24c7091f6ff013195b1a93 Mon Sep 17 00:00:00 2001 -From: nobu -Date: Sat, 21 Dec 2013 03:37:26 +0000 -Subject: [PATCH] resolv.rb: no encodings - -* lib/resolv.rb (Resolv::Hosts#lazy_initialize): should not - consider encodings in hosts file. [ruby-core:59239] [Bug #9273] -* lib/resolv.rb (Resolv::Config.parse_resolv_conf): ditto. - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - ChangeLog | 7 +++++++ - lib/resolv.rb | 4 ++-- - test/resolv/test_addr.rb | 12 ++++++++++++ - test/resolv/test_dns.rb | 13 +++++++++++++ - 4 files changed, 34 insertions(+), 2 deletions(-) - -diff --git a/ChangeLog b/ChangeLog -index 72eaa6f..93686e9 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -67,6 +67,13 @@ - install win32.h. - [ruby-core:58801][Bug #9199] reported by arton. - -+Sat Dec 21 12:37:19 2013 Nobuyoshi Nakada -+ -+ * lib/resolv.rb (Resolv::Hosts#lazy_initialize): should not -+ consider encodings in hosts file. [ruby-core:59239] [Bug #9273] -+ -+ * lib/resolv.rb (Resolv::Config.parse_resolv_conf): ditto. -+ - Fri Dec 20 17:52:50 2013 Koichi Sasada - - * vm_method.c: check definition of -diff --git a/lib/resolv.rb b/lib/resolv.rb -index 6d34a67..0c2b68e 100644 ---- a/lib/resolv.rb -+++ b/lib/resolv.rb -@@ -187,7 +187,7 @@ class Resolv - unless @initialized - @name2addr = {} - @addr2name = {} -- open(@filename) {|f| -+ open(@filename, 'rb') {|f| - f.each {|line| - line.sub!(/#.*/, '') - addr, hostname, *aliases = line.split(/\s+/) -@@ -920,7 +920,7 @@ class Resolv - nameserver = [] - search = nil - ndots = 1 -- open(filename) {|f| -+ open(filename, 'rb') {|f| - f.each {|line| - line.sub!(/[#;].*/, '') - keyword, *args = line.split(/\s+/) -diff --git a/test/resolv/test_addr.rb b/test/resolv/test_addr.rb -index 84bc8c2..d4728e1 100644 ---- a/test/resolv/test_addr.rb -+++ b/test/resolv/test_addr.rb -@@ -13,4 +13,16 @@ class TestResolvAddr < Test::Unit::TestCase - end - } - end -+ -+ def test_invalid_byte_comment -+ bug9273 = '[ruby-core:59239] [Bug #9273]' -+ Tempfile.open('resolv_test_addr_') do |tmpfile| -+ tmpfile.print("\xff\x00\x40") -+ tmpfile.close -+ hosts = Resolv::Hosts.new(tmpfile.path) -+ assert_nothing_raised(ArgumentError, bug9273) do -+ hosts.each_address("") {break} -+ end -+ end -+ end - end -diff --git a/test/resolv/test_dns.rb b/test/resolv/test_dns.rb -index 0d9565e..e3e38ef 100644 ---- a/test/resolv/test_dns.rb -+++ b/test/resolv/test_dns.rb -@@ -1,6 +1,7 @@ - require 'test/unit' - require 'resolv' - require 'socket' -+require 'tempfile' - - class TestResolvDNS < Test::Unit::TestCase - def setup -@@ -150,4 +151,16 @@ class TestResolvDNS < Test::Unit::TestCase - } - end - -+ def test_invalid_byte_comment -+ bug9273 = '[ruby-core:59239] [Bug #9273]' -+ Tempfile.open('resolv_test_dns_') do |tmpfile| -+ tmpfile.print("\xff\x00\x40") -+ tmpfile.close -+ Resolv::DNS.open(tmpfile.path) do |dns| -+ assert_nothing_raised(ArgumentError, bug9273) do -+ dns.getresources("foo.example.org", Resolv::DNS::Resource::IN::A) -+ end -+ end -+ end -+ end - end --- -1.8.4.2 - -From 1ef0a76c6c6556bf6ab155e2ad28a23748ee59ef Mon Sep 17 00:00:00 2001 -From: nobu -Date: Sat, 21 Dec 2013 07:18:18 +0000 -Subject: [PATCH] test_dns.rb: no server access - -* test/resolv/test_dns.rb (test_invalid_byte_comment): get rid of - actual server access. [Bug #9273] - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - test/resolv/test_dns.rb | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -diff --git a/test/resolv/test_dns.rb b/test/resolv/test_dns.rb -index e3e38ef..07396fb 100644 ---- a/test/resolv/test_dns.rb -+++ b/test/resolv/test_dns.rb -@@ -156,10 +156,8 @@ class TestResolvDNS < Test::Unit::TestCase - Tempfile.open('resolv_test_dns_') do |tmpfile| - tmpfile.print("\xff\x00\x40") - tmpfile.close -- Resolv::DNS.open(tmpfile.path) do |dns| -- assert_nothing_raised(ArgumentError, bug9273) do -- dns.getresources("foo.example.org", Resolv::DNS::Resource::IN::A) -- end -+ assert_nothing_raised(ArgumentError, bug9273) do -+ Resolv::DNS::Config.parse_resolv_conf(tmpfile.path) - end - end - end --- -1.8.4.2 - diff --git a/ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch b/ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch deleted file mode 100644 index f9fa197..0000000 --- a/ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch +++ /dev/null @@ -1,259 +0,0 @@ -From 5ac7c395c19426a9a92f0a918b03e0f493af6e2c Mon Sep 17 00:00:00 2001 -From: tmm1 -Date: Fri, 3 Jan 2014 01:46:55 +0000 -Subject: [PATCH] test/net/imap/test_imap.rb: fix test failures due to expired - certs - -* test/net/imap/cacert.pem: generate new CA cert, since the last one - expired. [Bug #9341] [ruby-core:59459] -* test/net/imap/server.crt: new server cert signed with updated CA. -* test/net/imap/Makefile: add `make regen_certs` to automate this - process. - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - ChangeLog | 8 +++++ - test/net/imap/Makefile | 15 +++++++++ - test/net/imap/cacert.pem | 84 ++++++++++++++++++++++++++---------------------- - test/net/imap/server.crt | 65 +++++++++++++++---------------------- - 4 files changed, 94 insertions(+), 78 deletions(-) - create mode 100644 test/net/imap/Makefile - -diff --git a/ChangeLog b/ChangeLog -index a4f20cd..d6a7148 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,3 +1,11 @@ -+Fri Jan 3 10:43:57 2014 Aman Gupta -+ -+ * test/net/imap/cacert.pem: generate new CA cert, since the last one -+ expired. [Bug #9341] [ruby-core:59459] -+ * test/net/imap/server.crt: new server cert signed with updated CA. -+ * test/net/imap/Makefile: add `make regen_certs` to automate this -+ process. -+ - Wed Dec 25 16:58:31 2013 Nobuyoshi Nakada - - * proc.c (rb_mod_define_method): consider visibility only if self -diff --git a/test/net/imap/Makefile b/test/net/imap/Makefile -new file mode 100644 -index 0000000..b2bc9c7 ---- /dev/null -+++ b/test/net/imap/Makefile -@@ -0,0 +1,15 @@ -+all: -+ -+regen_certs: -+ touch server.key -+ make server.crt -+ -+cacert.pem: server.key -+ openssl req -new -x509 -days 1825 -key server.key -out cacert.pem -text -subj "/C=JP/ST=Shimane/L=Matz-e city/O=Ruby Core Team/CN=Ruby Test CA/emailAddress=security@ruby-lang.org" -+ -+server.csr: -+ openssl req -new -key server.key -out server.csr -text -subj "/C=JP/ST=Shimane/O=Ruby Core Team/OU=Ruby Test/CN=localhost" -+ -+server.crt: server.csr cacert.pem -+ openssl x509 -days 1825 -CA cacert.pem -CAkey server.key -set_serial 00 -in server.csr -req -text -out server.crt -+ rm server.csr -diff --git a/test/net/imap/cacert.pem b/test/net/imap/cacert.pem -index bd7e68a..7073387 100644 ---- a/test/net/imap/cacert.pem -+++ b/test/net/imap/cacert.pem -@@ -2,59 +2,65 @@ Certificate: - Data: - Version: 3 (0x2) - Serial Number: -- 9f:dc:f7:94:98:05:43:4c -+ b9:90:a2:bf:62:69:17:9c - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=JP, ST=Shimane, L=Matz-e city, O=Ruby Core Team, CN=Ruby Test CA/emailAddress=security@ruby-lang.org - Validity -- Not Before: Dec 23 10:21:33 2010 GMT -- Not After : Jan 1 10:21:33 2014 GMT -+ Not Before: Jan 3 01:34:17 2014 GMT -+ Not After : Jan 2 01:34:17 2019 GMT - Subject: C=JP, ST=Shimane, L=Matz-e city, O=Ruby Core Team, CN=Ruby Test CA/emailAddress=security@ruby-lang.org - Subject Public Key Info: - Public Key Algorithm: rsaEncryption -- Public-Key: (1024 bit) -- Modulus: -- 00:ce:be:2c:9f:47:ba:db:9c:9c:5b:f0:38:3b:f3: -- 74:20:37:76:23:9f:84:1c:81:90:b4:3e:00:20:34: -- 98:7e:81:69:50:a1:c3:65:96:ea:fa:00:da:8c:cc: -- 53:3f:ba:3c:d0:50:7a:5a:b4:6b:ac:d3:2e:18:ca: -- 2a:69:b3:6a:6f:38:c2:32:a8:06:b6:0a:30:a9:ee: -- 03:38:e9:05:a5:19:23:54:a8:3c:b9:08:ad:2b:72: -- 23:df:93:22:c4:46:a8:ea:f1:a6:e9:30:4a:3f:83: -- 39:e9:62:8e:8b:a3:5e:67:89:1d:7c:75:de:05:aa: -- 58:b1:b7:79:7c:10:80:6d:87 -+ RSA Public Key: (1024 bit) -+ Modulus (1024 bit): -+ 00:db:75:d0:45:de:b1:df:bf:71:a0:0e:b0:a5:e6: -+ bc:f4:1c:9d:e5:25:67:64:c5:7b:cb:f1:af:c6:be: -+ 9a:aa:ea:7e:0f:cc:05:af:ef:40:69:06:b2:c9:13: -+ 9d:7e:eb:a2:06:e2:ea:7d:07:c7:c7:99:c7:fb:d5: -+ b8:eb:63:77:62:2b:18:12:c3:53:58:d0:f5:c7:40: -+ 0c:01:d1:26:82:34:16:09:e3:dc:65:f4:dc:bb:5d: -+ a5:41:60:e7:a9:74:ba:d7:4c:b6:a3:9c:c5:8c:89: -+ af:cb:e8:9f:05:fe:ea:fe:64:24:bf:e7:ed:e3:f6: -+ d0:fc:d6:eb:fc:06:82:10:fb - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: -- 41:C9:49:37:B1:FA:61:E3:BA:D7:19:3D:D9:DA:8C:B9:82:C9:B4:6A -+ E8:7E:58:AC:13:7B:03:22:8D:9E:AF:32:0B:84:89:80:80:0C:1E:C2 - X509v3 Authority Key Identifier: -- keyid:41:C9:49:37:B1:FA:61:E3:BA:D7:19:3D:D9:DA:8C:B9:82:C9:B4:6A -+ keyid:E8:7E:58:AC:13:7B:03:22:8D:9E:AF:32:0B:84:89:80:80:0C:1E:C2 -+ DirName:/C=JP/ST=Shimane/L=Matz-e city/O=Ruby Core Team/CN=Ruby Test CA/emailAddress=security@ruby-lang.org -+ serial:B9:90:A2:BF:62:69:17:9C - - X509v3 Basic Constraints: - CA:TRUE - Signature Algorithm: sha1WithRSAEncryption -- 86:00:33:b9:dd:ff:5f:83:59:5f:c3:29:3c:d7:11:db:10:b3: -- d7:d1:70:fb:0a:c6:74:85:c6:ea:e1:15:c4:92:f8:0e:11:cc: -- ff:a6:3c:31:c2:2c:66:d8:fe:63:93:9f:b0:97:e6:f5:bc:5c: -- 80:68:96:5d:eb:77:b9:23:dd:68:a7:49:03:ff:22:48:55:f1: -- 39:7c:20:21:ff:64:52:e1:f6:cf:3c:b3:4d:2c:5c:03:62:ea: -- c5:49:99:07:fa:8d:ff:7b:c2:75:0c:ca:24:b5:0b:f5:b7:57: -- 3a:10:f0:8a:bb:9a:e8:92:4d:d5:6f:c2:a2:29:36:61:78:a4: -- dc:7b -+ 8f:77:06:4e:31:72:12:ee:68:09:70:27:d4:31:85:ef:10:95: -+ f9:0f:2b:66:63:08:37:88:6e:b7:9b:40:3e:18:77:33:86:e8: -+ 61:6a:b7:3c:cb:c7:a6:d6:d5:92:6a:1f:56:d0:9f:5c:32:56: -+ d3:37:52:fe:0e:20:c2:7a:0d:fe:2d:3c:81:da:b8:7f:4d:6a: -+ 08:01:d9:be:7a:a2:15:be:a6:ce:49:64:90:8c:9a:ca:6e:2e: -+ 84:48:1d:94:19:56:94:46:aa:25:9b:68:c2:80:60:bf:cb:2e: -+ 35:03:ea:0a:65:5a:33:38:c6:cc:81:46:c0:bc:36:86:96:39: -+ 10:7d - -----BEGIN CERTIFICATE----- --MIIC6DCCAlGgAwIBAgIJAJ/c95SYBUNMMA0GCSqGSIb3DQEBBQUAMIGMMQswCQYD --VQQGEwJKUDEQMA4GA1UECAwHU2hpbWFuZTEUMBIGA1UEBwwLTWF0ei1lIGNpdHkx --FzAVBgNVBAoMDlJ1YnkgQ29yZSBUZWFtMRUwEwYDVQQDDAxSdWJ5IFRlc3QgQ0Ex --JTAjBgkqhkiG9w0BCQEWFnNlY3VyaXR5QHJ1YnktbGFuZy5vcmcwHhcNMTAxMjIz --MTAyMTMzWhcNMTQwMTAxMTAyMTMzWjCBjDELMAkGA1UEBhMCSlAxEDAOBgNVBAgM --B1NoaW1hbmUxFDASBgNVBAcMC01hdHotZSBjaXR5MRcwFQYDVQQKDA5SdWJ5IENv --cmUgVGVhbTEVMBMGA1UEAwwMUnVieSBUZXN0IENBMSUwIwYJKoZIhvcNAQkBFhZz -+MIIDjTCCAvagAwIBAgIJALmQor9iaRecMA0GCSqGSIb3DQEBBQUAMIGMMQswCQYD -+VQQGEwJKUDEQMA4GA1UECBMHU2hpbWFuZTEUMBIGA1UEBxMLTWF0ei1lIGNpdHkx -+FzAVBgNVBAoTDlJ1YnkgQ29yZSBUZWFtMRUwEwYDVQQDEwxSdWJ5IFRlc3QgQ0Ex -+JTAjBgkqhkiG9w0BCQEWFnNlY3VyaXR5QHJ1YnktbGFuZy5vcmcwHhcNMTQwMTAz -+MDEzNDE3WhcNMTkwMTAyMDEzNDE3WjCBjDELMAkGA1UEBhMCSlAxEDAOBgNVBAgT -+B1NoaW1hbmUxFDASBgNVBAcTC01hdHotZSBjaXR5MRcwFQYDVQQKEw5SdWJ5IENv -+cmUgVGVhbTEVMBMGA1UEAxMMUnVieSBUZXN0IENBMSUwIwYJKoZIhvcNAQkBFhZz - ZWN1cml0eUBydWJ5LWxhbmcub3JnMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB --gQDOviyfR7rbnJxb8Dg783QgN3Yjn4QcgZC0PgAgNJh+gWlQocNllur6ANqMzFM/ --ujzQUHpatGus0y4Yyipps2pvOMIyqAa2CjCp7gM46QWlGSNUqDy5CK0rciPfkyLE --Rqjq8abpMEo/gznpYo6Lo15niR18dd4Fqlixt3l8EIBthwIDAQABo1AwTjAdBgNV --HQ4EFgQUQclJN7H6YeO61xk92dqMuYLJtGowHwYDVR0jBBgwFoAUQclJN7H6YeO6 --1xk92dqMuYLJtGowDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCGADO5 --3f9fg1lfwyk81xHbELPX0XD7CsZ0hcbq4RXEkvgOEcz/pjwxwixm2P5jk5+wl+b1 --vFyAaJZd63e5I91op0kD/yJIVfE5fCAh/2RS4fbPPLNNLFwDYurFSZkH+o3/e8J1 --DMoktQv1t1c6EPCKu5rokk3Vb8KiKTZheKTcew== -+gQDbddBF3rHfv3GgDrCl5rz0HJ3lJWdkxXvL8a/Gvpqq6n4PzAWv70BpBrLJE51+ -+66IG4up9B8fHmcf71bjrY3diKxgSw1NY0PXHQAwB0SaCNBYJ49xl9Ny7XaVBYOep -+dLrXTLajnMWMia/L6J8F/ur+ZCS/5+3j9tD81uv8BoIQ+wIDAQABo4H0MIHxMB0G -+A1UdDgQWBBToflisE3sDIo2erzILhImAgAwewjCBwQYDVR0jBIG5MIG2gBToflis -+E3sDIo2erzILhImAgAwewqGBkqSBjzCBjDELMAkGA1UEBhMCSlAxEDAOBgNVBAgT -+B1NoaW1hbmUxFDASBgNVBAcTC01hdHotZSBjaXR5MRcwFQYDVQQKEw5SdWJ5IENv -+cmUgVGVhbTEVMBMGA1UEAxMMUnVieSBUZXN0IENBMSUwIwYJKoZIhvcNAQkBFhZz -+ZWN1cml0eUBydWJ5LWxhbmcub3JnggkAuZCiv2JpF5wwDAYDVR0TBAUwAwEB/zAN -+BgkqhkiG9w0BAQUFAAOBgQCPdwZOMXIS7mgJcCfUMYXvEJX5DytmYwg3iG63m0A+ -+GHczhuhharc8y8em1tWSah9W0J9cMlbTN1L+DiDCeg3+LTyB2rh/TWoIAdm+eqIV -+vqbOSWSQjJrKbi6ESB2UGVaURqolm2jCgGC/yy41A+oKZVozOMbMgUbAvDaGljkQ -+fQ== - -----END CERTIFICATE----- -diff --git a/test/net/imap/server.crt b/test/net/imap/server.crt -index d848b26..fa4f994 100644 ---- a/test/net/imap/server.crt -+++ b/test/net/imap/server.crt -@@ -1,17 +1,17 @@ - Certificate: - Data: -- Version: 3 (0x2) -+ Version: 1 (0x0) - Serial Number: 0 (0x0) - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=JP, ST=Shimane, L=Matz-e city, O=Ruby Core Team, CN=Ruby Test CA/emailAddress=security@ruby-lang.org - Validity -- Not Before: Dec 23 10:23:52 2010 GMT -- Not After : Jan 1 10:23:52 2014 GMT -+ Not Before: Jan 3 01:34:17 2014 GMT -+ Not After : Jan 2 01:34:17 2019 GMT - Subject: C=JP, ST=Shimane, O=Ruby Core Team, OU=Ruby Test, CN=localhost - Subject Public Key Info: - Public Key Algorithm: rsaEncryption -- Public-Key: (1024 bit) -- Modulus: -+ RSA Public Key: (1024 bit) -+ Modulus (1024 bit): - 00:db:75:d0:45:de:b1:df:bf:71:a0:0e:b0:a5:e6: - bc:f4:1c:9d:e5:25:67:64:c5:7b:cb:f1:af:c6:be: - 9a:aa:ea:7e:0f:cc:05:af:ef:40:69:06:b2:c9:13: -@@ -22,40 +22,27 @@ Certificate: - af:cb:e8:9f:05:fe:ea:fe:64:24:bf:e7:ed:e3:f6: - d0:fc:d6:eb:fc:06:82:10:fb - Exponent: 65537 (0x10001) -- X509v3 extensions: -- X509v3 Basic Constraints: -- CA:FALSE -- Netscape Comment: -- OpenSSL Generated Certificate -- X509v3 Subject Key Identifier: -- E8:7E:58:AC:13:7B:03:22:8D:9E:AF:32:0B:84:89:80:80:0C:1E:C2 -- X509v3 Authority Key Identifier: -- keyid:41:C9:49:37:B1:FA:61:E3:BA:D7:19:3D:D9:DA:8C:B9:82:C9:B4:6A -- - Signature Algorithm: sha1WithRSAEncryption -- ae:ee:cd:fe:c9:af:48:0b:50:37:ac:6a:f6:68:90:9b:67:df: -- 6f:2d:17:c9:3c:a5:da:ad:39:dc:2a:5b:07:88:26:38:19:30: -- d6:95:cf:10:69:c7:92:14:83:be:f1:b5:8e:6f:d9:91:51:c5: -- 63:ae:1c:89:ac:27:bf:4f:2a:8f:4e:0c:57:42:0a:c9:8e:0c: -- f4:f3:02:f7:ea:44:b6:e4:47:05:af:4e:74:e4:87:87:d9:c8: -- 76:ed:ab:32:7c:f0:31:34:10:14:bc:a6:37:cd:d7:dc:33:da: -- 82:d3:d4:9b:e9:d5:cd:38:cc:fa:81:5f:4e:fd:5f:53:05:5d: -- 76:f9 -+ 85:f5:d3:05:8b:8c:f4:43:1c:88:f2:8f:b2:f2:93:77:b7:3d: -+ 95:c6:a0:34:bc:33:6a:d8:85:5f:3e:86:08:10:c5:5c:c1:76: -+ a3:53:3c:dc:38:98:23:97:e7:da:21:ac:e8:4d:3c:96:70:29: -+ ff:ff:1e:4a:9a:17:2b:db:04:62:b9:ef:ab:ea:a7:a5:e8:7c: -+ b1:d5:ed:30:a8:6c:78:de:51:7e:e3:8a:c2:a4:64:a8:63:a2: -+ bc:fd:43:9c:f3:55:7d:54:c9:6a:d8:53:1c:4b:6b:03:aa:b6: -+ 19:e6:a4:4f:47:00:96:c5:42:59:85:4e:c3:4e:cd:41:82:53: -+ 10:f8 - -----BEGIN CERTIFICATE----- --MIIC3jCCAkegAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjDELMAkGA1UEBhMCSlAx --EDAOBgNVBAgMB1NoaW1hbmUxFDASBgNVBAcMC01hdHotZSBjaXR5MRcwFQYDVQQK --DA5SdWJ5IENvcmUgVGVhbTEVMBMGA1UEAwwMUnVieSBUZXN0IENBMSUwIwYJKoZI --hvcNAQkBFhZzZWN1cml0eUBydWJ5LWxhbmcub3JnMB4XDTEwMTIyMzEwMjM1MloX --DTE0MDEwMTEwMjM1MlowYDELMAkGA1UEBhMCSlAxEDAOBgNVBAgMB1NoaW1hbmUx --FzAVBgNVBAoMDlJ1YnkgQ29yZSBUZWFtMRIwEAYDVQQLDAlSdWJ5IFRlc3QxEjAQ --BgNVBAMMCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA23XQ --Rd6x379xoA6wpea89Byd5SVnZMV7y/Gvxr6aqup+D8wFr+9AaQayyROdfuuiBuLq --fQfHx5nH+9W462N3YisYEsNTWND1x0AMAdEmgjQWCePcZfTcu12lQWDnqXS610y2 --o5zFjImvy+ifBf7q/mQkv+ft4/bQ/Nbr/AaCEPsCAwEAAaN7MHkwCQYDVR0TBAIw --ADAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUw --HQYDVR0OBBYEFOh+WKwTewMijZ6vMguEiYCADB7CMB8GA1UdIwQYMBaAFEHJSTex --+mHjutcZPdnajLmCybRqMA0GCSqGSIb3DQEBBQUAA4GBAK7uzf7Jr0gLUDesavZo --kJtn328tF8k8pdqtOdwqWweIJjgZMNaVzxBpx5IUg77xtY5v2ZFRxWOuHImsJ79P --Ko9ODFdCCsmODPTzAvfqRLbkRwWvTnTkh4fZyHbtqzJ88DE0EBS8pjfN19wz2oLT --1Jvp1c04zPqBX079X1MFXXb5 -+MIICXDCCAcUCAQAwDQYJKoZIhvcNAQEFBQAwgYwxCzAJBgNVBAYTAkpQMRAwDgYD -+VQQIEwdTaGltYW5lMRQwEgYDVQQHEwtNYXR6LWUgY2l0eTEXMBUGA1UEChMOUnVi -+eSBDb3JlIFRlYW0xFTATBgNVBAMTDFJ1YnkgVGVzdCBDQTElMCMGCSqGSIb3DQEJ -+ARYWc2VjdXJpdHlAcnVieS1sYW5nLm9yZzAeFw0xNDAxMDMwMTM0MTdaFw0xOTAx -+MDIwMTM0MTdaMGAxCzAJBgNVBAYTAkpQMRAwDgYDVQQIEwdTaGltYW5lMRcwFQYD -+VQQKEw5SdWJ5IENvcmUgVGVhbTESMBAGA1UECxMJUnVieSBUZXN0MRIwEAYDVQQD -+Ewlsb2NhbGhvc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANt10EXesd+/ -+caAOsKXmvPQcneUlZ2TFe8vxr8a+mqrqfg/MBa/vQGkGsskTnX7rogbi6n0Hx8eZ -+x/vVuOtjd2IrGBLDU1jQ9cdADAHRJoI0Fgnj3GX03LtdpUFg56l0utdMtqOcxYyJ -+r8vonwX+6v5kJL/n7eP20PzW6/wGghD7AgMBAAEwDQYJKoZIhvcNAQEFBQADgYEA -+hfXTBYuM9EMciPKPsvKTd7c9lcagNLwzatiFXz6GCBDFXMF2o1M83DiYI5fn2iGs -+6E08lnAp//8eSpoXK9sEYrnvq+qnpeh8sdXtMKhseN5RfuOKwqRkqGOivP1DnPNV -+fVTJathTHEtrA6q2GeakT0cAlsVCWYVOw07NQYJTEPg= - -----END CERTIFICATE----- --- -1.8.5.1 - diff --git a/ruby-2.2.0-configure.in-use-SSE2.patch b/ruby-2.2.0-configure.in-use-SSE2.patch deleted file mode 100644 index 87858ce..0000000 --- a/ruby-2.2.0-configure.in-use-SSE2.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 40967a5c0b975f3f3ec1538a820985aa61b65b8f Mon Sep 17 00:00:00 2001 -From: nobu -Date: Thu, 9 Jan 2014 11:46:26 +0000 -Subject: [PATCH] configure.in: use SSE2 - -* configure.in: use SSE2 instructions to drop unexpected precisions on - other than mingw. [ruby-core:59472] [Bug #8358] - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - ChangeLog | 5 +++++ - configure.in | 8 ++++++++- - 2 files changed, 13 insertions(+), 0 deletion(-) - -diff --git a/ChangeLog b/ChangeLog -index 7ec6eec..9ba337f 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,3 +1,8 @@ -+Thu Jan 9 20:46:22 2014 Nobuyoshi Nakada -+ -+ * configure.in: use SSE2 instructions to drop unexpected precisions on -+ other than mingw. [ruby-core:59472] [Bug #8358] -+ - Fri Jan 3 10:43:57 2014 Aman Gupta - - * test/net/imap/cacert.pem: generate new CA cert, since the last one -diff --git a/configure.in b/configure.in -index f9e9431..9c95cc4 100644 ---- a/configure.in -+++ b/configure.in -@@ -858,6 +857,14 @@ 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*]], [ -+ RUBY_TRY_CFLAGS(-msse2 -mfpmath=sse, [RUBY_APPEND_OPTION(XCFLAGS, -msse2 -mfpmath=sse)]) -+ ] -+ ) - fi - - AC_ARG_WITH(opt-dir, --- -1.8.5.1 - diff --git a/ruby.spec b/ruby.spec index f157de9..21f63ed 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,7 +1,7 @@ %global major_version 2 %global minor_version 1 -%global teeny_version 0 -%global patch_level 0 +%global teeny_version 1 +%global patch_level 76 %global major_minor_version %{major_version}.%{minor_version} @@ -28,10 +28,10 @@ %endif -%global release 19 +%global release 18 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} -%global rubygems_version 2.2.0 +%global rubygems_version 2.2.2 # The RubyGems library has to stay out of Ruby directory three, since the # RubyGems should be share by all Ruby implementations. @@ -41,11 +41,11 @@ # http://redmine.ruby-lang.org/issues/5313 %global irb_version %{ruby_version} -%global bigdecimal_version 1.2.3 +%global bigdecimal_version 1.2.4 %global io_console_version 0.4.2 %global json_version 1.8.1 %global minitest_version 4.7.5 -%global psych_version 2.0.2 +%global psych_version 2.0.3 %global rake_version 10.1.0 %global rdoc_version 4.1.0 @@ -140,22 +140,6 @@ Patch12: ruby-1.9.3-mkmf-verbose.patch # in support for ABRT. # http://bugs.ruby-lang.org/issues/8566 Patch17: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch -# Fixes possible "ArgumentError: invalid byte sequence in US-ASCII" error in -# TestGemRemoteFetcher#test_download_to_cache. -# http://bugs.ruby-lang.org/issues/9273 -Patch18: ruby-2.1.0-resolv.rb-no-encodings.patch -# Backport regenerated certificates for IMAP tests. -# http://bugs.ruby-lang.org/issues/9341 -Patch19: ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch -# Fix documentation generated on unexpected places. -# https://github.com/rubygems/rubygems/issues/758 -# https://github.com/rubygems/rubygems/commit/e088c6824209d98eccb0f1e6c7e21f26b4a1178d -Patch20: rubygems-2.2.1-Add-BasicSpecification-source_paths.patch -# https://github.com/rubygems/rubygems/commit/2f03b54b63043aadce9e95b83e98b29712bad21f -Patch21: rubygems-2.2.1-Use-source_paths-for-fallback-rdoc-plugin.patch -# TestSprintf#test_float fails on i686 -# http://bugs.ruby-lang.org/issues/8358 -Patch22: ruby-2.2.0-configure.in-use-SSE2.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -416,11 +400,6 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch8 -p1 %patch12 -p1 %patch17 -p1 -%patch18 -p1 -%patch19 -p1 -%patch20 -p1 -%patch21 -p1 -%patch22 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -903,6 +882,9 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Wed Mar 05 2014 Vít Ondruch - 2.1.1-18 +- Update to Ruby 2.1.1. + * Mon Mar 03 2014 Vít Ondruch - 2.1.0-19 - Add RPM dependency generators for RubyGems. diff --git a/rubygems-2.2.1-Add-BasicSpecification-source_paths.patch b/rubygems-2.2.1-Add-BasicSpecification-source_paths.patch deleted file mode 100644 index 3cd1bed..0000000 --- a/rubygems-2.2.1-Add-BasicSpecification-source_paths.patch +++ /dev/null @@ -1,73 +0,0 @@ -From e088c6824209d98eccb0f1e6c7e21f26b4a1178d Mon Sep 17 00:00:00 2001 -From: Eric Hodel -Date: Mon, 6 Jan 2014 14:20:18 -0800 -Subject: [PATCH] Add BasicSpecification#source_paths - -This allows documentation and analysis tools to retrieve paths of source -files in gems. This is needed as the introduction of shared gem -directories means the extension source directory is no longer included -in require_paths (which was meant for $LOAD_PATH, not source code). ---- - lib/rubygems/basic_specification.rb | 18 ++++++++++++++++++ - test/rubygems/test_gem_specification.rb | 16 ++++++++++++++++ - 2 files changed, 34 insertions(+) - -diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb -index a52377f..470a6eb 100644 ---- a/lib/rubygems/basic_specification.rb -+++ b/lib/rubygems/basic_specification.rb -@@ -207,6 +207,24 @@ def require_paths - end - - ## -+ # Returns the paths to the source files for use with analysis and -+ # documentation tools. These paths are relative to full_gem_path. -+ -+ def source_paths -+ paths = raw_require_paths.dup -+ -+ if @extensions then -+ ext_dirs = @extensions.map do |extension| -+ extension.split(File::SEPARATOR, 2).first -+ end.uniq -+ -+ paths.concat ext_dirs -+ end -+ -+ paths.uniq -+ end -+ -+ ## - # Return a Gem::Specification from this gem - - def to_spec -diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb -index 46db0c4..b72a5d1 100644 ---- a/test/rubygems/test_gem_specification.rb -+++ b/test/rubygems/test_gem_specification.rb -@@ -1809,6 +1809,22 @@ def test_source - assert_kind_of Gem::Source::Installed, @a1.source - end - -+ def test_source_paths -+ ext_spec -+ -+ @ext.require_paths = %w[lib ext foo] -+ @ext.extensions << 'bar/baz' -+ -+ expected = %w[ -+ lib -+ ext -+ foo -+ bar -+ ] -+ -+ assert_equal expected, @ext.source_paths -+ end -+ - def test_full_require_paths - ext_spec - --- -1.8.5.1 - diff --git a/rubygems-2.2.1-Use-source_paths-for-fallback-rdoc-plugin.patch b/rubygems-2.2.1-Use-source_paths-for-fallback-rdoc-plugin.patch deleted file mode 100644 index edf40f1..0000000 --- a/rubygems-2.2.1-Use-source_paths-for-fallback-rdoc-plugin.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 2f03b54b63043aadce9e95b83e98b29712bad21f Mon Sep 17 00:00:00 2001 -From: Eric Hodel -Date: Mon, 6 Jan 2014 14:30:07 -0800 -Subject: [PATCH] Use source_paths for fallback rdoc plugin - -Fixes #758 ---- - lib/rubygems/rdoc.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/rubygems/rdoc.rb b/lib/rubygems/rdoc.rb -index 52249dc..633bd89 100644 ---- a/lib/rubygems/rdoc.rb -+++ b/lib/rubygems/rdoc.rb -@@ -193,7 +193,7 @@ def generate - ::RDoc::Parser::C.reset - - args = @spec.rdoc_options -- args.concat @spec.require_paths -+ args.concat @spec.source_paths - args.concat @spec.extra_rdoc_files - - case config_args = Gem.configuration[:rdoc] --- -1.8.5.1 - From 699faa5e257b4448f7dd8fb72c4416a5d957490b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 7 Apr 2014 14:47:45 +0200 Subject: [PATCH 29/30] Fix typo. --- rubygems.req | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rubygems.req b/rubygems.req index 831d7af..4f7a583 100644 --- a/rubygems.req +++ b/rubygems.req @@ -44,7 +44,7 @@ module RubyGemsReq def self.rubygems_dependency(specification) Helpers::requirement_versions_to_rpm(specification.required_rubygems_version).each do |requirement| dependency_string = "ruby(rubygems)" - dependency_strint += " #{specification.required_rubygems_version}" if requirement && requirement.length > 0 + dependency_string += " #{specification.required_rubygems_version}" if requirement && requirement.length > 0 puts dependency_string end end From 0d5d7e9999b737c46f5ec14daa8a2378d4295326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 7 Apr 2014 15:23:37 +0200 Subject: [PATCH 30/30] Use revisions instead of tilde. Tilde is prohibited by FPC: https://fedorahosted.org/fpc/ticket/398 --- rubygems.prov | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rubygems.prov b/rubygems.prov index f23ec3f..b7c9777 100644 --- a/rubygems.prov +++ b/rubygems.prov @@ -9,9 +9,9 @@ module RubyGemsProv def self.normalize_prerelease(version) if version.prerelease? prerelease = version.version.sub /^#{version.release}\./, '' - "#{version.release}~#{prerelease}" + "#{version.release}-0.1.#{prerelease}" else - version.release + "#{version.release}-1" end end end