From a84d5163f0b7067d72c74d04a0cef4b48847623e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 23 Jul 2015 14:09:03 +0200 Subject: [PATCH 01/16] Fix test broken by disabled SSLv3 in OpenSSL. --- ...3-in-test-as-it-is-insecure-and-may-.patch | 25 +++++++++++++++++++ ...-when-testing-SSL-session-cache-call.patch | 23 +++++++++++++++++ ...2.3.0-fix-test-ctx-client-session-cb.patch | 13 ++++++++++ ruby.spec | 13 ++++++---- 4 files changed, 69 insertions(+), 5 deletions(-) create mode 100644 ruby-2.3.0-Don-t-force-SSLv3-in-test-as-it-is-insecure-and-may-.patch create mode 100644 ruby-2.3.0-Use-OP_NO_TICKET-when-testing-SSL-session-cache-call.patch create mode 100644 ruby-2.3.0-fix-test-ctx-client-session-cb.patch diff --git a/ruby-2.3.0-Don-t-force-SSLv3-in-test-as-it-is-insecure-and-may-.patch b/ruby-2.3.0-Don-t-force-SSLv3-in-test-as-it-is-insecure-and-may-.patch new file mode 100644 index 0000000..efd947f --- /dev/null +++ b/ruby-2.3.0-Don-t-force-SSLv3-in-test-as-it-is-insecure-and-may-.patch @@ -0,0 +1,25 @@ +From b9fa5fc9a14e6c889c9a0fa9c9386b2018f2314c Mon Sep 17 00:00:00 2001 +From: Jeremy Evans +Date: Fri, 17 Jul 2015 11:25:09 -0600 +Subject: [PATCH 4/8] Don't force SSLv3 in test, as it is insecure and may not + be supported + +LibreSSL disables SSLv3 by default, and there's no reason this code +should require SSLv3. + +diff --git test/openssl/test_ssl_session.rb test/openssl/test_ssl_session.rb +index 0c384c7..d4713d9 100644 +--- test/openssl/test_ssl_session.rb ++++ test/openssl/test_ssl_session.rb +@@ -355,7 +355,7 @@ __EOS__ + 3.times do + sock = TCPSocket.new("127.0.0.1", port) + begin +- ssl = OpenSSL::SSL::SSLSocket.new(sock, OpenSSL::SSL::SSLContext.new("SSLv3")) ++ ssl = OpenSSL::SSL::SSLSocket.new(sock, OpenSSL::SSL::SSLContext.new) + ssl.sync_close = true + ssl.session = last_client_session if last_client_session + ssl.connect +-- +2.4.5 + diff --git a/ruby-2.3.0-Use-OP_NO_TICKET-when-testing-SSL-session-cache-call.patch b/ruby-2.3.0-Use-OP_NO_TICKET-when-testing-SSL-session-cache-call.patch new file mode 100644 index 0000000..d5e90ae --- /dev/null +++ b/ruby-2.3.0-Use-OP_NO_TICKET-when-testing-SSL-session-cache-call.patch @@ -0,0 +1,23 @@ +From fb08c34eee2c883a01ab0dda2a2e34a290516a2a Mon Sep 17 00:00:00 2001 +From: Jeremy Evans +Date: Fri, 17 Jul 2015 11:31:45 -0600 +Subject: [PATCH 5/8] Use OP_NO_TICKET when testing SSL session cache callbacks + +This fixes the test when using LibreSSL and possibly some +configurations of OpenSSL. + +diff --git test/openssl/test_ssl_session.rb test/openssl/test_ssl_session.rb +index d4713d9..58fa20b 100644 +--- test/openssl/test_ssl_session.rb ++++ test/openssl/test_ssl_session.rb +@@ -316,6 +316,7 @@ __EOS__ + + ctx_proc = Proc.new { |ctx, ssl| + ctx.session_cache_mode = OpenSSL::SSL::SSLContext::SESSION_CACHE_SERVER ++ ctx.options = OpenSSL::SSL::OP_NO_TICKET + last_server_session = nil + + # get_cb is called whenever a client proposed to resume a session but +-- +2.4.5 + diff --git a/ruby-2.3.0-fix-test-ctx-client-session-cb.patch b/ruby-2.3.0-fix-test-ctx-client-session-cb.patch new file mode 100644 index 0000000..0757a52 --- /dev/null +++ b/ruby-2.3.0-fix-test-ctx-client-session-cb.patch @@ -0,0 +1,13 @@ +Index: test/openssl/test_ssl_session.rb +=================================================================== +--- test/openssl/test_ssl_session.rb (revision 49098) ++++ test/openssl/test_ssl_session.rb (revision 49099) +@@ -278,7 +278,7 @@ + + def test_ctx_client_session_cb + called = {} +- ctx = OpenSSL::SSL::SSLContext.new("SSLv3") ++ ctx = OpenSSL::SSL::SSLContext.new + ctx.session_cache_mode = OpenSSL::SSL::SSLContext::SESSION_CACHE_CLIENT + + ctx.session_new_cb = lambda { |ary| diff --git a/ruby.spec b/ruby.spec index 00cc467..2dec272 100644 --- a/ruby.spec +++ b/ruby.spec @@ -117,6 +117,11 @@ Patch7: ruby-2.2.1-use-statfs.patch # https://github.com/rubygems/rubygems/issues/1289 # https://github.com/ruby/ruby/commit/6398515adfc86813686605019a3e22d49cd95517 Patch8: ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch +# Don't use SSLv3 for tests. +# https://bugs.ruby-lang.org/issues/10046 +Patch9: ruby-2.3.0-fix-test-ctx-client-session-cb.patch +Patch10: ruby-2.3.0-Don-t-force-SSLv3-in-test-as-it-is-insecure-and-may-.patch +Patch11: ruby-2.3.0-Use-OP_NO_TICKET-when-testing-SSL-session-cache-call.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -419,6 +424,9 @@ rm -rf ext/fiddle/libffi* %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 +%patch10 +%patch11 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -602,11 +610,6 @@ DISABLE_TESTS="" # the test suite). touch abrt.rb -# Test is broken due to SSLv3 disabled in Fedora. -# https://bugs.ruby-lang.org/issues/10046 -sed -i '/def test_ctx_client_session_cb$/,/^ end$/ s/^/#/' test/openssl/test_ssl_session.rb -sed -i '/def test_ctx_server_session_cb$/,/^ end$/ s/^/#/' test/openssl/test_ssl_session.rb - make check TESTS="-v $DISABLE_TESTS" %post libs -p /sbin/ldconfig From 15b51a227c252b468188ef13b3968caadd49d04f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 1 Sep 2015 14:24:51 +0200 Subject: [PATCH 02/16] Update to Ruby 2.2.3. --- .gitignore | 1 + ruby-1.9.3-mkmf-verbose.patch | 2 +- ...-additional-preludes-by-configuratio.patch | 4 +- ...0-Enable-configuration-of-archlibdir.patch | 2 +- ...ed-paths-when-empty-version-string-i.patch | 6 +- ruby-2.1.0-always-use-i386.patch | 2 +- ruby-2.1.0-custom-rubygems-location.patch | 4 +- ruby-2.2.1-use-statfs.patch | 141 ------------------ ..._remote_fetcher.rb-get-rid-of-errors.patch | 30 ---- ruby.spec | 16 +- sources | 2 +- 11 files changed, 17 insertions(+), 193 deletions(-) delete mode 100644 ruby-2.2.1-use-statfs.patch delete mode 100644 ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch diff --git a/.gitignore b/.gitignore index 4b77c7b..db108f0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /ruby-2.2.0.tar.xz /ruby-2.2.1.tar.xz /ruby-2.2.2.tar.xz +/ruby-2.2.3.tar.xz diff --git a/ruby-1.9.3-mkmf-verbose.patch b/ruby-1.9.3-mkmf-verbose.patch index 13148ce..0f2a742 100644 --- a/ruby-1.9.3-mkmf-verbose.patch +++ b/ruby-1.9.3-mkmf-verbose.patch @@ -11,7 +11,7 @@ diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 682eb46..e6b1445 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb -@@ -1858,7 +1858,7 @@ SRC +@@ -1859,7 +1859,7 @@ SRC SHELL = /bin/sh # V=0 quiet, V=1 verbose. other values don't work. diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index b30ad4f..6eb6122 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 @@ -26,7 +26,7 @@ diff --git a/common.mk b/common.mk index 5cfbc3d..3f0a82e 100644 --- a/common.mk +++ b/common.mk -@@ -115,7 +115,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS) +@@ -117,7 +117,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS) GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT) DEFAULT_PRELUDES = $(GEM_PRELUDE) @@ -39,7 +39,7 @@ diff --git a/configure.in b/configure.in index 0e371e2..d4f1dcb 100644 --- a/configure.in +++ b/configure.in -@@ -4160,6 +4160,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -4169,6 +4169,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 6863f07..b54f8e0 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 -@@ -3379,6 +3379,11 @@ if test ${multiarch+set}; then +@@ -3385,6 +3385,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 570d4d7..b401158 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -14,7 +14,7 @@ diff --git a/configure.in b/configure.in index 17ed3ed..5843651 100644 --- a/configure.in +++ b/configure.in -@@ -3966,8 +3966,6 @@ AS_CASE(["$target_os"], +@@ -3975,8 +3975,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -23,7 +23,7 @@ index 17ed3ed..5843651 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, -@@ -3997,6 +3995,7 @@ AC_ARG_WITH(ruby-version, +@@ -4006,6 +4004,7 @@ AC_ARG_WITH(ruby-version, [ruby_version=full]) unset RUBY_LIB_VERSION unset RUBY_LIB_VERSION_STYLE @@ -31,7 +31,7 @@ index 17ed3ed..5843651 100644 AS_CASE(["$ruby_version"], [full], [RUBY_LIB_VERSION_STYLE='3 /* full */'], [minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */']) -@@ -4013,30 +4012,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then +@@ -4022,30 +4021,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 210adb1..f8e61f5 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 -@@ -4078,6 +4078,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -4087,6 +4087,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 41de23f..c21c858 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 -@@ -4052,6 +4052,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -4061,6 +4061,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='' -@@ -4075,6 +4079,7 @@ AC_SUBST(sitearchdir)dnl +@@ -4084,6 +4088,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-2.2.1-use-statfs.patch b/ruby-2.2.1-use-statfs.patch deleted file mode 100644 index 168e5d7..0000000 --- a/ruby-2.2.1-use-statfs.patch +++ /dev/null @@ -1,141 +0,0 @@ -diff --git a/ChangeLog b/ChangeLog -index 909c092..9f09144 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -70,1 +70,6 @@ -+Tue Mar 24 17:30:12 2015 Nobuyoshi Nakada -+ -+ * ext/-test-/file/fs.c (get_fsname): return filesystem name by -+ statfs/statvfs. [ruby-core:68624] [Bug #10998] -+ - Thu Feb 26 15:48:41 2015 NAKAMURA Usaku -diff --git a/ext/-test-/file/extconf.rb b/ext/-test-/file/extconf.rb -index 4e134dd..be4a2fb 100644 ---- a/ext/-test-/file/extconf.rb -+++ b/ext/-test-/file/extconf.rb -@@ -1,4 +1,18 @@ - $INCFLAGS << " -I$(topdir) -I$(top_srcdir)" -+ -+headers = %w[sys/param.h sys/mount.h sys/vfs.h].select {|h| have_header(h)} -+if have_type("struct statfs", headers) -+ have_struct_member("struct statfs", "f_fstypename", headers) -+ have_struct_member("struct statfs", "f_type", headers) -+end -+ -+headers = %w[sys/statvfs.h] -+if have_type("struct statvfs", headers) -+ have_struct_member("struct statvfs", "f_fstypename", headers) -+ have_struct_member("struct statvfs", "f_basetype", headers) -+ have_struct_member("struct statvfs", "f_type", headers) -+end -+ - $srcs = Dir[File.join($srcdir, "*.{#{SRC_EXT.join(%q{,})}}")] - inits = $srcs.map {|s| File.basename(s, ".*")} - inits.delete("init") -diff --git a/ext/-test-/file/fs.c b/ext/-test-/file/fs.c -index 4a41bf3..94d96d3 100644 ---- a/ext/-test-/file/fs.c -+++ b/ext/-test-/file/fs.c -@@ -1,55 +1,64 @@ - #include "ruby/ruby.h" - #include "ruby/io.h" - --#ifdef __linux__ --# define HAVE_GETMNTENT -+#ifdef HAVE_SYS_MOUNT_H -+#include -+#endif -+#ifdef HAVE_SYS_VFS_H -+#include - #endif - --#ifdef HAVE_GETMNTENT --# include --# include -+#if defined HAVE_STRUCT_STATFS_F_FSTYPENAME -+typedef struct statfs statfs_t; -+# define STATFS(f, s) statfs((f), (s)) -+# define HAVE_STRUCT_STATFS_T_F_FSTYPENAME 1 -+#elif defined(HAVE_STRUCT_STATVFS_F_FSTYPENAME) /* NetBSD */ -+typedef struct statvfs statfs_t; -+# define STATFS(f, s) statvfs((f), (s)) -+# define HAVE_STRUCT_STATFS_T_F_FSTYPENAME 1 -+#elif defined(HAVE_STRUCT_STATVFS_F_BASETYPE) /* AIX, HP-UX, Solaris */ -+typedef struct statvfs statfs_t; -+# define STATFS(f, s) statvfs((f), (s)) -+# define HAVE_STRUCT_STATFS_T_F_FSTYPENAME 1 -+# define f_fstypename f_basetype -+#elif defined HAVE_STRUCT_STATFS_F_TYPE -+typedef struct statfs statfs_t; -+# define STATFS(f, s) statfs((f), (s)) -+#elif defined HAVE_STRUCT_STATVFS_F_TYPE -+typedef struct statvfs statfs_t; -+# define STATFS(f, s) statvfs((f), (s)) - #endif - - VALUE - get_fsname(VALUE self, VALUE str) - { --#ifdef HAVE_GETMNTENT -- const char *path; -- struct mntent mntbuf; -- static const int buflen = 4096; -- char *buf = alloca(buflen); -- int len = 0; -- FILE *fp; --#define FSNAME_LEN 100 -- char name[FSNAME_LEN] = ""; -+#ifdef STATFS -+ statfs_t st; -+# define CSTR(s) rb_str_new_cstr(s) - - FilePathValue(str); -- path = RSTRING_PTR(str); -- fp = setmntent("/etc/mtab", "r"); -- if (!fp) rb_sys_fail("setmntent(/etb/mtab)");; -- -- while (getmntent_r(fp, &mntbuf, buf, buflen)) { -- int i; -- char *mnt_dir = mntbuf.mnt_dir; -- for (i=0; mnt_dir[i]; i++) { -- if (mnt_dir[i] != path[i]) { -- goto next_entry; -- } -- } -- if (i >= len) { -- len = i; -- strlcpy(name, mntbuf.mnt_type, FSNAME_LEN); -- } --next_entry: -- ; -+ str = rb_str_encode_ospath(str); -+ if (STATFS(StringValueCStr(str), &st) == -1) { -+ rb_sys_fail_str(str); -+ } -+# ifdef HAVE_STRUCT_STATFS_T_F_FSTYPENAME -+ if (st.f_fstypename[0]) -+ return CSTR(st.f_fstypename); -+# endif -+ switch (st.f_type) { -+ case 0x9123683E: /* BTRFS_SUPER_MAGIC */ -+ return CSTR("btrfs"); -+ case 0x7461636f: /* OCFS2_SUPER_MAGIC */ -+ return CSTR("ocfs"); -+ case 0xEF53: /* EXT2_SUPER_MAGIC EXT3_SUPER_MAGIC EXT4_SUPER_MAGIC */ -+ return CSTR("ext4"); -+ case 0x58465342: /* XFS_SUPER_MAGIC */ -+ return CSTR("xfs"); -+ case 0x01021994: /* TMPFS_MAGIC */ -+ return CSTR("tmpfs"); - } -- endmntent(fp); -- -- if (!len) rb_sys_fail("no matching entry");; -- return rb_str_new_cstr(name); --#else -- return Qnil; - #endif -+ return Qnil; - } - - void diff --git a/ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch b/ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch deleted file mode 100644 index 0427b05..0000000 --- a/ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 6398515adfc86813686605019a3e22d49cd95517 Mon Sep 17 00:00:00 2001 -From: nobu -Date: Fri, 19 Jun 2015 06:04:00 +0000 -Subject: [PATCH] test_gem_remote_fetcher.rb: get rid of errors - -* test/rubygems/test_gem_remote_fetcher.rb (start_ssl_server): - temporary measure for "dh key too small" error of OpenSSL - 1.0.2c+. - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - test/rubygems/test_gem_remote_fetcher.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/rubygems/test_gem_remote_fetcher.rb b/test/rubygems/test_gem_remote_fetcher.rb -index 6b29e18..63dd8fe 100644 ---- a/test/rubygems/test_gem_remote_fetcher.rb -+++ b/test/rubygems/test_gem_remote_fetcher.rb -@@ -898,7 +898,7 @@ gems: - server.mount_proc("/insecure_redirect") { |req, res| - res.set_redirect(WEBrick::HTTPStatus::MovedPermanently, req.query['to']) - } -- server.ssl_context.tmp_dh_callback = proc { OpenSSL::PKey::DH.new 128 } -+ server.ssl_context.tmp_dh_callback = proc {|_, _, k| OpenSSL::PKey::DH.new(k) } - t = Thread.new do - begin - server.start --- -2.4.3 - diff --git a/ruby.spec b/ruby.spec index 2dec272..4b2be96 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 %global minor_version 2 -%global teeny_version 2 +%global teeny_version 3 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -21,7 +21,7 @@ %endif -%global release 43 +%global release 44 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5 @@ -110,13 +110,6 @@ Patch5: ruby-1.9.3-mkmf-verbose.patch # in support for ABRT. # http://bugs.ruby-lang.org/issues/8566 Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch -# can_seek_data does not work correctly in chroot for Kernel 3.19+. -# https://bugs.ruby-lang.org/issues/10998 -Patch7: ruby-2.2.1-use-statfs.patch -# Fix "dh key too small" error of OpenSSL 1.0.2c+. -# https://github.com/rubygems/rubygems/issues/1289 -# https://github.com/ruby/ruby/commit/6398515adfc86813686605019a3e22d49cd95517 -Patch8: ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch # Don't use SSLv3 for tests. # https://bugs.ruby-lang.org/issues/10046 Patch9: ruby-2.3.0-fix-test-ctx-client-session-cb.patch @@ -422,8 +415,6 @@ rm -rf ext/fiddle/libffi* %patch4 -p1 %patch5 -p1 %patch6 -p1 -%patch7 -p1 -%patch8 -p1 %patch9 %patch10 %patch11 @@ -902,6 +893,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Tue Sep 01 2015 Vít Ondruch - 2.2.3-44 +- Update to Ruby 2.2.3. + * Tue Jun 23 2015 Vít Ondruch - 2.2.2-43 - Fix for "dh key too small" error of OpenSSL 1.0.2+. diff --git a/sources b/sources index d24389c..dbae8f0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -dbce9b9d79d90f213ba8d448b0b6ed86 ruby-2.2.2.tar.xz +2a8bc1f46aba8938add70f742e8af1ff ruby-2.2.3.tar.xz From a5509d0e6dc794c7c92039507d50cffda85c5b8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 2 Sep 2015 15:47:20 +0200 Subject: [PATCH 03/16] Fix RubyGems version. --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 4b2be96..5d21789 100644 --- a/ruby.spec +++ b/ruby.spec @@ -24,7 +24,7 @@ %global release 44 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} -%global rubygems_version 2.4.5 +%global rubygems_version 2.4.5.1 # The RubyGems library has to stay out of Ruby directory three, since the # RubyGems should be share by all Ruby implementations. From 3ce8f985fce45f5709205cb9ccb332ce3028f728 Mon Sep 17 00:00:00 2001 From: Michal Toman Date: Fri, 4 Sep 2015 14:23:36 +0200 Subject: [PATCH 04/16] Add support for MIPS architecture to config.h --- config.h | 8 ++++++++ ruby.spec | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/config.h b/config.h index b34e398..39e4a5c 100644 --- a/config.h +++ b/config.h @@ -44,6 +44,14 @@ #include "ruby/config-sparc.h" #elif defined(__aarch64__) #include "ruby/config-aarch64.h" +#elif defined(__mips64) && defined(__MIPSEL__) +#include "ruby/config-mips64el.h" +#elif defined(__mips64) +#include "ruby/config-mips64.h" +#elif defined(__mips) && defined(__MIPSEL__) +#include "ruby/config-mipsel.h" +#elif defined(__mips) +#include "ruby/config-mips.h" #else #error "The ruby-devel package is not usable with the architecture." #endif diff --git a/ruby.spec b/ruby.spec index 5d21789..4eeaac3 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 44 +%global release 45 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5.1 @@ -893,6 +893,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Fri Sep 04 2015 Michal Toman - 2.2.3-45 +- Add support for MIPS architecture to config.h + * Tue Sep 01 2015 Vít Ondruch - 2.2.3-44 - Update to Ruby 2.2.3. From 91f189190b04f88f9e431dc05e6f23448d9dce3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 10 Dec 2015 15:30:53 +0100 Subject: [PATCH 05/16] Fix ABRT hook autoloading. --- ...2.3-Generate-preludes-using-miniruby.patch | 28 +++++++++++++++++++ ruby.spec | 13 +++++---- 2 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 ruby-2.2.3-Generate-preludes-using-miniruby.patch diff --git a/ruby-2.2.3-Generate-preludes-using-miniruby.patch b/ruby-2.2.3-Generate-preludes-using-miniruby.patch new file mode 100644 index 0000000..81b7c5b --- /dev/null +++ b/ruby-2.2.3-Generate-preludes-using-miniruby.patch @@ -0,0 +1,28 @@ +From 9fedac991e717f0103d092275ac301e58c5cf010 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 2 Dec 2014 10:56:58 +0100 +Subject: [PATCH] Generate preludes using miniruby. + +--- + common.mk | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/common.mk b/common.mk +index 76f1621..b0f6e28 100644 +--- a/common.mk ++++ b/common.mk +@@ -782,9 +782,9 @@ $(PRELUDE_C): $(COMPILE_PRELUDE) \ + $(PRELUDE_C): $(COMPILE_PRELUDE) \ + {$(srcdir)}lib/rubygems/defaults.rb \ + {$(srcdir)}lib/rubygems/core_ext/kernel_gem.rb \ +- $(PRELUDE_SCRIPTS) $(LIB_SRCS) ++ $(PRELUDE_SCRIPTS) $(PREP) $(LIB_SRCS) + $(ECHO) generating $@ +- $(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \ ++ $(Q) $(MINIRUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \ + $(srcdir)/template/prelude.c.tmpl $(PRELUDE_SCRIPTS) + + {$(VPATH)}golf_prelude.c: $(COMPILE_PRELUDE) {$(srcdir)}golf_prelude.rb +-- +2.1.0 + diff --git a/ruby.spec b/ruby.spec index 4eeaac3..6eabb43 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 45 +%global release 46 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5.1 @@ -110,6 +110,9 @@ Patch5: ruby-1.9.3-mkmf-verbose.patch # in support for ABRT. # http://bugs.ruby-lang.org/issues/8566 Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +# Use miniruby to regenerate prelude.c. +# https://bugs.ruby-lang.org/issues/10554 +Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch # Don't use SSLv3 for tests. # https://bugs.ruby-lang.org/issues/10046 Patch9: ruby-2.3.0-fix-test-ctx-client-session-cb.patch @@ -415,6 +418,7 @@ rm -rf ext/fiddle/libffi* %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 %patch9 %patch10 %patch11 @@ -450,10 +454,6 @@ autoconf --enable-multiarch \ --with-prelude=./abrt_prelude.rb \ -# Avoid regeneration of prelude.c due to patch6 applied to common.mk. -# https://bugs.ruby-lang.org/issues/10554 -touch prelude.c - # Q= makes the build output more verbose and allows to check Fedora # compiler options. make %{?_smp_mflags} COPY="cp -p" Q= @@ -893,6 +893,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Thu Dec 10 2015 Vít Ondruch - 2.2.3-46 +- Fix ABRT hook autoloading. + * Fri Sep 04 2015 Michal Toman - 2.2.3-45 - Add support for MIPS architecture to config.h From 6f72a0e6f3c12b96e157ff415fa2926a204542ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 11 Dec 2015 10:56:00 +0100 Subject: [PATCH 06/16] Ensure that abrt hook is used. --- ruby.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ruby.spec b/ruby.spec index 6eabb43..697cd47 100644 --- a/ruby.spec +++ b/ruby.spec @@ -594,6 +594,9 @@ sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{m # Sanity check that SystemTap (dtrace) was detected. make runruby TESTRUN_SCRIPT=%{SOURCE11} +# Check if abrt hook is required. +LD_LIBRARY_PATH=. RUBYOPT=-I.:lib:.ext/x86_64-linux/ ./ruby -d -e '' |& grep abrt + DISABLE_TESTS="" # test_debug(TestRubyOptions) fails due to LoadError reported in debug mode, From da295712c5f2c9fae64d420a2f2167e0404c4360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Sun, 13 Dec 2015 19:36:58 +0100 Subject: [PATCH 07/16] Move the ABRT hook test into separate file. --- ruby.spec | 18 ++++++++++-------- test_abrt.rb | 7 +++++++ 2 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 test_abrt.rb diff --git a/ruby.spec b/ruby.spec index 697cd47..7c561a8 100644 --- a/ruby.spec +++ b/ruby.spec @@ -86,6 +86,8 @@ Source9: rubygems.req Source10: rubygems.prov # SystemTap sanity test case. Source11: test_systemtap.rb +# ABRT hoook test case. +Source12: test_abrt.rb # The load directive is supported since RPM 4.12, i.e. F21+. The build process # fails on older Fedoras. @@ -591,19 +593,19 @@ sed -e "s|@LIBRARY_PATH@|%{tapset_libdir}/libruby.so.%{major_minor_version}|" \ sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{major_minor_version}.stp %check -# Sanity check that SystemTap (dtrace) was detected. -make runruby TESTRUN_SCRIPT=%{SOURCE11} - -# Check if abrt hook is required. -LD_LIBRARY_PATH=. RUBYOPT=-I.:lib:.ext/x86_64-linux/ ./ruby -d -e '' |& grep abrt - -DISABLE_TESTS="" - # 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). touch abrt.rb +# Sanity check that SystemTap (dtrace) was detected. +make runruby TESTRUN_SCRIPT=%{SOURCE11} + +# Check if abrt hook is required. +make runruby TESTRUN_SCRIPT=%{SOURCE12} + +DISABLE_TESTS="" + make check TESTS="-v $DISABLE_TESTS" %post libs -p /sbin/ldconfig diff --git a/test_abrt.rb b/test_abrt.rb new file mode 100644 index 0000000..6d110ba --- /dev/null +++ b/test_abrt.rb @@ -0,0 +1,7 @@ +if !!$LOADED_FEATURES.detect { |f| f =~ /abrt\.rb/ } + exit true +else + puts 'ERROR: ABRT hook was not loaded.' + + exit false +end From 5bbe8360a50bb5a30ff3019d9955451fa0714982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 21 Dec 2015 13:07:52 +0100 Subject: [PATCH 08/16] Update to Ruby 2.2.4. --- .gitignore | 1 + ...3-in-test-as-it-is-insecure-and-may-.patch | 25 ------------------- ...-when-testing-SSL-session-cache-call.patch | 23 ----------------- ...2.3.0-fix-test-ctx-client-session-cb.patch | 13 ---------- ruby.spec | 15 ++++------- sources | 2 +- 6 files changed, 7 insertions(+), 72 deletions(-) delete mode 100644 ruby-2.3.0-Don-t-force-SSLv3-in-test-as-it-is-insecure-and-may-.patch delete mode 100644 ruby-2.3.0-Use-OP_NO_TICKET-when-testing-SSL-session-cache-call.patch delete mode 100644 ruby-2.3.0-fix-test-ctx-client-session-cb.patch diff --git a/.gitignore b/.gitignore index db108f0..81f7fc1 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /ruby-2.2.1.tar.xz /ruby-2.2.2.tar.xz /ruby-2.2.3.tar.xz +/ruby-2.2.4.tar.xz diff --git a/ruby-2.3.0-Don-t-force-SSLv3-in-test-as-it-is-insecure-and-may-.patch b/ruby-2.3.0-Don-t-force-SSLv3-in-test-as-it-is-insecure-and-may-.patch deleted file mode 100644 index efd947f..0000000 --- a/ruby-2.3.0-Don-t-force-SSLv3-in-test-as-it-is-insecure-and-may-.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b9fa5fc9a14e6c889c9a0fa9c9386b2018f2314c Mon Sep 17 00:00:00 2001 -From: Jeremy Evans -Date: Fri, 17 Jul 2015 11:25:09 -0600 -Subject: [PATCH 4/8] Don't force SSLv3 in test, as it is insecure and may not - be supported - -LibreSSL disables SSLv3 by default, and there's no reason this code -should require SSLv3. - -diff --git test/openssl/test_ssl_session.rb test/openssl/test_ssl_session.rb -index 0c384c7..d4713d9 100644 ---- test/openssl/test_ssl_session.rb -+++ test/openssl/test_ssl_session.rb -@@ -355,7 +355,7 @@ __EOS__ - 3.times do - sock = TCPSocket.new("127.0.0.1", port) - begin -- ssl = OpenSSL::SSL::SSLSocket.new(sock, OpenSSL::SSL::SSLContext.new("SSLv3")) -+ ssl = OpenSSL::SSL::SSLSocket.new(sock, OpenSSL::SSL::SSLContext.new) - ssl.sync_close = true - ssl.session = last_client_session if last_client_session - ssl.connect --- -2.4.5 - diff --git a/ruby-2.3.0-Use-OP_NO_TICKET-when-testing-SSL-session-cache-call.patch b/ruby-2.3.0-Use-OP_NO_TICKET-when-testing-SSL-session-cache-call.patch deleted file mode 100644 index d5e90ae..0000000 --- a/ruby-2.3.0-Use-OP_NO_TICKET-when-testing-SSL-session-cache-call.patch +++ /dev/null @@ -1,23 +0,0 @@ -From fb08c34eee2c883a01ab0dda2a2e34a290516a2a Mon Sep 17 00:00:00 2001 -From: Jeremy Evans -Date: Fri, 17 Jul 2015 11:31:45 -0600 -Subject: [PATCH 5/8] Use OP_NO_TICKET when testing SSL session cache callbacks - -This fixes the test when using LibreSSL and possibly some -configurations of OpenSSL. - -diff --git test/openssl/test_ssl_session.rb test/openssl/test_ssl_session.rb -index d4713d9..58fa20b 100644 ---- test/openssl/test_ssl_session.rb -+++ test/openssl/test_ssl_session.rb -@@ -316,6 +316,7 @@ __EOS__ - - ctx_proc = Proc.new { |ctx, ssl| - ctx.session_cache_mode = OpenSSL::SSL::SSLContext::SESSION_CACHE_SERVER -+ ctx.options = OpenSSL::SSL::OP_NO_TICKET - last_server_session = nil - - # get_cb is called whenever a client proposed to resume a session but --- -2.4.5 - diff --git a/ruby-2.3.0-fix-test-ctx-client-session-cb.patch b/ruby-2.3.0-fix-test-ctx-client-session-cb.patch deleted file mode 100644 index 0757a52..0000000 --- a/ruby-2.3.0-fix-test-ctx-client-session-cb.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: test/openssl/test_ssl_session.rb -=================================================================== ---- test/openssl/test_ssl_session.rb (revision 49098) -+++ test/openssl/test_ssl_session.rb (revision 49099) -@@ -278,7 +278,7 @@ - - def test_ctx_client_session_cb - called = {} -- ctx = OpenSSL::SSL::SSLContext.new("SSLv3") -+ ctx = OpenSSL::SSL::SSLContext.new - ctx.session_cache_mode = OpenSSL::SSL::SSLContext::SESSION_CACHE_CLIENT - - ctx.session_new_cb = lambda { |ary| diff --git a/ruby.spec b/ruby.spec index 7c561a8..3e4f698 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 %global minor_version 2 -%global teeny_version 3 +%global teeny_version 4 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -21,7 +21,7 @@ %endif -%global release 46 +%global release 47 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5.1 @@ -115,11 +115,6 @@ Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch # Use miniruby to regenerate prelude.c. # https://bugs.ruby-lang.org/issues/10554 Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch -# Don't use SSLv3 for tests. -# https://bugs.ruby-lang.org/issues/10046 -Patch9: ruby-2.3.0-fix-test-ctx-client-session-cb.patch -Patch10: ruby-2.3.0-Don-t-force-SSLv3-in-test-as-it-is-insecure-and-may-.patch -Patch11: ruby-2.3.0-Use-OP_NO_TICKET-when-testing-SSL-session-cache-call.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -421,9 +416,6 @@ rm -rf ext/fiddle/libffi* %patch5 -p1 %patch6 -p1 %patch7 -p1 -%patch9 -%patch10 -%patch11 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -898,6 +890,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon Dec 21 2015 Vít Ondruch - 2.2.4-47 +- Update to Ruby 2.2.4. + * Thu Dec 10 2015 Vít Ondruch - 2.2.3-46 - Fix ABRT hook autoloading. diff --git a/sources b/sources index dbae8f0..94b8135 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2a8bc1f46aba8938add70f742e8af1ff ruby-2.2.3.tar.xz +350bfd495e1974cf752de9f4566c7911 ruby-2.2.4.tar.xz From ed84560c576d2d7cf94d911644dbd8c871f53f5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 2 May 2016 15:00:24 +0200 Subject: [PATCH 09/16] Update to Ruby 2.2.5. --- .gitignore | 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 +- ...sts-depends-on-Europe-Moscow-removed.patch | 63 +++++++++++++++++++ ruby.spec | 13 +++- sources | 2 +- 9 files changed, 84 insertions(+), 11 deletions(-) create mode 100644 ruby-2.2.6-Tests-depends-on-Europe-Moscow-removed.patch diff --git a/.gitignore b/.gitignore index 81f7fc1..de6ff53 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /ruby-2.2.2.tar.xz /ruby-2.2.3.tar.xz /ruby-2.2.4.tar.xz +/ruby-2.2.5.tar.xz 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 6eb6122..4808d49 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 @@ -39,7 +39,7 @@ diff --git a/configure.in b/configure.in index 0e371e2..d4f1dcb 100644 --- a/configure.in +++ b/configure.in -@@ -4169,6 +4169,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -4209,6 +4209,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 b54f8e0..dba73bd 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 -@@ -3385,6 +3385,11 @@ if test ${multiarch+set}; then +@@ -3425,6 +3425,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 b401158..a0f26ce 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -14,7 +14,7 @@ diff --git a/configure.in b/configure.in index 17ed3ed..5843651 100644 --- a/configure.in +++ b/configure.in -@@ -3975,8 +3975,6 @@ AS_CASE(["$target_os"], +@@ -4015,8 +4015,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -23,7 +23,7 @@ index 17ed3ed..5843651 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, -@@ -4006,6 +4004,7 @@ AC_ARG_WITH(ruby-version, +@@ -4046,6 +4044,7 @@ AC_ARG_WITH(ruby-version, [ruby_version=full]) unset RUBY_LIB_VERSION unset RUBY_LIB_VERSION_STYLE @@ -31,7 +31,7 @@ index 17ed3ed..5843651 100644 AS_CASE(["$ruby_version"], [full], [RUBY_LIB_VERSION_STYLE='3 /* full */'], [minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */']) -@@ -4022,30 +4021,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then +@@ -4062,30 +4061,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 f8e61f5..085eea2 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 -@@ -4087,6 +4087,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -4127,6 +4127,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 c21c858..de574fa 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 -@@ -4061,6 +4061,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -4101,6 +4101,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='' -@@ -4084,6 +4088,7 @@ AC_SUBST(sitearchdir)dnl +@@ -4124,6 +4128,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-2.2.6-Tests-depends-on-Europe-Moscow-removed.patch b/ruby-2.2.6-Tests-depends-on-Europe-Moscow-removed.patch new file mode 100644 index 0000000..a3ff8c6 --- /dev/null +++ b/ruby-2.2.6-Tests-depends-on-Europe-Moscow-removed.patch @@ -0,0 +1,63 @@ +From d16ff5c412b90b2766be97a5d3d689c5a18528d3 Mon Sep 17 00:00:00 2001 +From: usa +Date: Fri, 29 Apr 2016 11:12:17 +0000 +Subject: [PATCH] merge revision(s) 54706: + + * test/ruby/test_time_tz.rb: Tests depends on Europe/Moscow removed + to avoid test failures due to the tzdata change. + https://github.com/eggert/tz/commit/8ee11a301cf173afb0c76e0315b9f9ec8ebb9d95 + Found by naruse. + + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@54815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + ChangeLog | 7 +++++++ + test/ruby/test_time_tz.rb | 13 ------------- + 2 files changed, 7 insertions(+), 13 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index fe09b1e..1351c74 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,10 @@ ++Fri Apr 29 20:11:38 2016 Tanaka Akira ++ ++ * test/ruby/test_time_tz.rb: Tests depends on Europe/Moscow removed ++ to avoid test failures due to the tzdata change. ++ https://github.com/eggert/tz/commit/8ee11a301cf173afb0c76e0315b9f9ec8ebb9d95 ++ Found by naruse. ++ + Tue Apr 26 13:38:31 2016 NAKAMURA Usaku + + * README.EXT{,.ja}: `nul` should be uppercase. +diff --git a/test/ruby/test_time_tz.rb b/test/ruby/test_time_tz.rb +index fb1ab9b..96a03b7 100644 +--- a/test/ruby/test_time_tz.rb ++++ b/test/ruby/test_time_tz.rb +@@ -169,13 +169,6 @@ def test_europe_lisbon + } + end if has_lisbon_tz + +- def test_europe_moscow +- with_tz(tz="Europe/Moscow") { +- assert_time_constructor(tz, "1992-03-29 00:00:00 +0400", :local, [1992,3,28,23,0,0]) +- assert_time_constructor(tz, "1992-03-29 00:59:59 +0400", :local, [1992,3,28,23,59,59]) +- } +- end +- + def test_pacific_kiritimati + with_tz(tz="Pacific/Kiritimati") { + assert_time_constructor(tz, "1994-12-31 23:59:59 -1000", :local, [1994,12,31,23,59,59]) +@@ -355,12 +348,6 @@ def self.gen_zdump_test(data) + Europe/London Sun Aug 10 01:00:00 1947 UTC = Sun Aug 10 02:00:00 1947 BST isdst=1 gmtoff=3600 + Europe/London Sun Nov 2 01:59:59 1947 UTC = Sun Nov 2 02:59:59 1947 BST isdst=1 gmtoff=3600 + Europe/London Sun Nov 2 02:00:00 1947 UTC = Sun Nov 2 02:00:00 1947 GMT isdst=0 gmtoff=0 +-Europe/Moscow Sat Jan 18 23:59:59 1992 UTC = Sun Jan 19 01:59:59 1992 MSK isdst=0 gmtoff=7200 +-Europe/Moscow Sun Jan 19 00:00:00 1992 UTC = Sun Jan 19 03:00:00 1992 MSK isdst=0 gmtoff=10800 +-Europe/Moscow Sat Mar 28 19:59:59 1992 UTC = Sat Mar 28 22:59:59 1992 MSK isdst=0 gmtoff=10800 +-Europe/Moscow Sat Mar 28 20:00:00 1992 UTC = Sun Mar 29 00:00:00 1992 MSD isdst=1 gmtoff=14400 +-Europe/Moscow Sat Sep 26 18:59:59 1992 UTC = Sat Sep 26 22:59:59 1992 MSD isdst=1 gmtoff=14400 +-Europe/Moscow Sat Sep 26 19:00:00 1992 UTC = Sat Sep 26 22:00:00 1992 MSK isdst=0 gmtoff=10800 + Pacific/Kiritimati Sun Jan 1 09:59:59 1995 UTC = Sat Dec 31 23:59:59 1994 LINT isdst=0 gmtoff=-36000 + Pacific/Kiritimati Sun Jan 1 10:00:00 1995 UTC = Mon Jan 2 00:00:00 1995 LINT isdst=0 gmtoff=50400 + End diff --git a/ruby.spec b/ruby.spec index 3e4f698..adbb60c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 %global minor_version 2 -%global teeny_version 4 +%global teeny_version 5 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -21,7 +21,7 @@ %endif -%global release 47 +%global release 48 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5.1 @@ -115,6 +115,9 @@ Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch # Use miniruby to regenerate prelude.c. # https://bugs.ruby-lang.org/issues/10554 Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch +# Ignore Europe/Moscow TZ test, which fails due to change in tzdata. +# https://github.com/ruby/ruby/commit/d16ff5c412b90b2766be97a5d3d689c5a18528d3 +Patch8: ruby-2.2.6-Tests-depends-on-Europe-Moscow-removed.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -416,6 +419,7 @@ rm -rf ext/fiddle/libffi* %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -750,7 +754,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libarchdir}/enc/utf_16le.so %{ruby_libarchdir}/enc/utf_32be.so %{ruby_libarchdir}/enc/utf_32le.so +%{ruby_libarchdir}/enc/windows_1250.so %{ruby_libarchdir}/enc/windows_1251.so +%{ruby_libarchdir}/enc/windows_1252.so %{ruby_libarchdir}/enc/windows_31j.so %{ruby_libarchdir}/etc.so %{ruby_libarchdir}/fcntl.so @@ -890,6 +896,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon May 02 2016 Vít Ondruch - 2.2.5-48 +- Update to Ruby 2.2.5. + * Mon Dec 21 2015 Vít Ondruch - 2.2.4-47 - Update to Ruby 2.2.4. diff --git a/sources b/sources index 94b8135..fffe26d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -350bfd495e1974cf752de9f4566c7911 ruby-2.2.4.tar.xz +4b9506c37e908b5b17215b66b2760438 ruby-2.2.5.tar.xz From 21d58b05be2c71e870a5a1b06da8b8ebe538ee8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 2 May 2016 17:24:27 +0200 Subject: [PATCH 10/16] Fix random TestRubyOptimization#test_tailcall_inhibited_by_rescue failures. --- ...om-test-failure-introduced-by-r54698.patch | 40 +++++++++++++++++++ ruby.spec | 5 +++ 2 files changed, 45 insertions(+) create mode 100644 ruby-2.2.6-Fix-random-test-failure-introduced-by-r54698.patch diff --git a/ruby-2.2.6-Fix-random-test-failure-introduced-by-r54698.patch b/ruby-2.2.6-Fix-random-test-failure-introduced-by-r54698.patch new file mode 100644 index 0000000..303d95c --- /dev/null +++ b/ruby-2.2.6-Fix-random-test-failure-introduced-by-r54698.patch @@ -0,0 +1,40 @@ +From cf23ad429da3213fd3b1261c546dfa08e7dba2bf Mon Sep 17 00:00:00 2001 +From: usa +Date: Wed, 27 Apr 2016 13:17:50 +0000 +Subject: [PATCH] * compile.c (new_label_body): missed backporting r54548 in + r54698. this fixes randomly test failure introduced by r54698. cf. [Bug + #12082] + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@54799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + ChangeLog | 6 ++++++ + compile.c | 2 ++ + 2 files changed, 8 insertions(+), 0 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 2cfdb2c2..fe09b1e 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,9 @@ ++Wed Apr 27 22:16:04 2016 NAKAMURA Usaku ++ ++ * compile.c (new_label_body): missed backporting r54548 in r54698. ++ this fixes randomly test failure introduced by r54698. ++ cf. [Bug #12082] ++ + Fri Apr 29 20:11:38 2016 Tanaka Akira + + * test/ruby/test_time_tz.rb: Tests depends on Europe/Moscow removed +diff --git a/compile.c b/compile.c +index 001152a..cc8e748 100644 +--- a/compile.c ++++ b/compile.c +@@ -929,6 +929,8 @@ new_label_body(rb_iseq_t *iseq, long line) + labelobj->label_no = iseq->compile_data->label_no++; + labelobj->sc_state = 0; + labelobj->sp = -1; ++ labelobj->set = 0; ++ labelobj->rescued = LABEL_RESCUE_NONE; + return labelobj; + } + diff --git a/ruby.spec b/ruby.spec index adbb60c..f9f9ec4 100644 --- a/ruby.spec +++ b/ruby.spec @@ -118,6 +118,10 @@ Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch # Ignore Europe/Moscow TZ test, which fails due to change in tzdata. # https://github.com/ruby/ruby/commit/d16ff5c412b90b2766be97a5d3d689c5a18528d3 Patch8: ruby-2.2.6-Tests-depends-on-Europe-Moscow-removed.patch +# Fixes random TestRubyOptimization#test_tailcall_inhibited_by_rescue test +# suite failures. +# https://github.com/ruby/ruby/commit/cf23ad429da3213fd3b1261c546dfa08e7dba2bf +Patch9: ruby-2.2.6-Fix-random-test-failure-introduced-by-r54698.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -420,6 +424,7 @@ rm -rf ext/fiddle/libffi* %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . From 868c72c961805da12b0afc2e3f5379ec8b47d29f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 12 Jul 2016 13:50:14 +0200 Subject: [PATCH 11/16] Make symlinks for json gem. --- ruby.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index f9f9ec4..1a137b1 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 48 +%global release 49 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5.1 @@ -547,6 +547,9 @@ 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}/ mv %{buildroot}%{gem_dir}/specifications/default/json-%{json_version}.gemspec %{buildroot}%{gem_dir}/specifications +ln -s %{gem_dir}/gems/json-%{json_version}/lib/json.rb %{buildroot}%{ruby_libdir}/json.rb +ln -s %{gem_dir}/gems/json-%{json_version}/lib/json %{buildroot}%{ruby_libdir}/json +ln -s %{_libdir}/gems/%{name}/json-%{json_version}/json/ %{buildroot}%{ruby_libarchdir}/json mkdir -p %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib mkdir -p %{buildroot}%{_libdir}/gems/%{name}/psych-%{psych_version} @@ -865,6 +868,8 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/io-console-%{io_console_version}.gemspec %files -n rubygem-json +%{ruby_libdir}/json* +%{ruby_libarchdir}/json* %{_libdir}/gems/%{name}/json-%{json_version} %{gem_dir}/gems/json-%{json_version} %{gem_dir}/specifications/json-%{json_version}.gemspec @@ -901,6 +906,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Tue Jul 12 2016 Vít Ondruch - 2.2.5-49 +- Make symlinks for json gem. + * Mon May 02 2016 Vít Ondruch - 2.2.5-48 - Update to Ruby 2.2.5. From be52f67dcb39210632ac8097cdf9dc580c84eeff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 18 Nov 2016 21:44:26 +0100 Subject: [PATCH 12/16] Update to Ruby 2.2.6. --- .gitignore | 1 + ...om-test-failure-introduced-by-r54698.patch | 40 ------------ ...sts-depends-on-Europe-Moscow-removed.patch | 63 ------------------- ruby.spec | 19 +++--- sources | 2 +- 5 files changed, 9 insertions(+), 116 deletions(-) delete mode 100644 ruby-2.2.6-Fix-random-test-failure-introduced-by-r54698.patch delete mode 100644 ruby-2.2.6-Tests-depends-on-Europe-Moscow-removed.patch diff --git a/.gitignore b/.gitignore index de6ff53..26786f1 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /ruby-2.2.3.tar.xz /ruby-2.2.4.tar.xz /ruby-2.2.5.tar.xz +/ruby-2.2.6.tar.xz diff --git a/ruby-2.2.6-Fix-random-test-failure-introduced-by-r54698.patch b/ruby-2.2.6-Fix-random-test-failure-introduced-by-r54698.patch deleted file mode 100644 index 303d95c..0000000 --- a/ruby-2.2.6-Fix-random-test-failure-introduced-by-r54698.patch +++ /dev/null @@ -1,40 +0,0 @@ -From cf23ad429da3213fd3b1261c546dfa08e7dba2bf Mon Sep 17 00:00:00 2001 -From: usa -Date: Wed, 27 Apr 2016 13:17:50 +0000 -Subject: [PATCH] * compile.c (new_label_body): missed backporting r54548 in - r54698. this fixes randomly test failure introduced by r54698. cf. [Bug - #12082] - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@54799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - ChangeLog | 6 ++++++ - compile.c | 2 ++ - 2 files changed, 8 insertions(+), 0 deletions(-) - -diff --git a/ChangeLog b/ChangeLog -index 2cfdb2c2..fe09b1e 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,3 +1,9 @@ -+Wed Apr 27 22:16:04 2016 NAKAMURA Usaku -+ -+ * compile.c (new_label_body): missed backporting r54548 in r54698. -+ this fixes randomly test failure introduced by r54698. -+ cf. [Bug #12082] -+ - Fri Apr 29 20:11:38 2016 Tanaka Akira - - * test/ruby/test_time_tz.rb: Tests depends on Europe/Moscow removed -diff --git a/compile.c b/compile.c -index 001152a..cc8e748 100644 ---- a/compile.c -+++ b/compile.c -@@ -929,6 +929,8 @@ new_label_body(rb_iseq_t *iseq, long line) - labelobj->label_no = iseq->compile_data->label_no++; - labelobj->sc_state = 0; - labelobj->sp = -1; -+ labelobj->set = 0; -+ labelobj->rescued = LABEL_RESCUE_NONE; - return labelobj; - } - diff --git a/ruby-2.2.6-Tests-depends-on-Europe-Moscow-removed.patch b/ruby-2.2.6-Tests-depends-on-Europe-Moscow-removed.patch deleted file mode 100644 index a3ff8c6..0000000 --- a/ruby-2.2.6-Tests-depends-on-Europe-Moscow-removed.patch +++ /dev/null @@ -1,63 +0,0 @@ -From d16ff5c412b90b2766be97a5d3d689c5a18528d3 Mon Sep 17 00:00:00 2001 -From: usa -Date: Fri, 29 Apr 2016 11:12:17 +0000 -Subject: [PATCH] merge revision(s) 54706: - - * test/ruby/test_time_tz.rb: Tests depends on Europe/Moscow removed - to avoid test failures due to the tzdata change. - https://github.com/eggert/tz/commit/8ee11a301cf173afb0c76e0315b9f9ec8ebb9d95 - Found by naruse. - - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@54815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - ChangeLog | 7 +++++++ - test/ruby/test_time_tz.rb | 13 ------------- - 2 files changed, 7 insertions(+), 13 deletions(-) - -diff --git a/ChangeLog b/ChangeLog -index fe09b1e..1351c74 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,3 +1,10 @@ -+Fri Apr 29 20:11:38 2016 Tanaka Akira -+ -+ * test/ruby/test_time_tz.rb: Tests depends on Europe/Moscow removed -+ to avoid test failures due to the tzdata change. -+ https://github.com/eggert/tz/commit/8ee11a301cf173afb0c76e0315b9f9ec8ebb9d95 -+ Found by naruse. -+ - Tue Apr 26 13:38:31 2016 NAKAMURA Usaku - - * README.EXT{,.ja}: `nul` should be uppercase. -diff --git a/test/ruby/test_time_tz.rb b/test/ruby/test_time_tz.rb -index fb1ab9b..96a03b7 100644 ---- a/test/ruby/test_time_tz.rb -+++ b/test/ruby/test_time_tz.rb -@@ -169,13 +169,6 @@ def test_europe_lisbon - } - end if has_lisbon_tz - -- def test_europe_moscow -- with_tz(tz="Europe/Moscow") { -- assert_time_constructor(tz, "1992-03-29 00:00:00 +0400", :local, [1992,3,28,23,0,0]) -- assert_time_constructor(tz, "1992-03-29 00:59:59 +0400", :local, [1992,3,28,23,59,59]) -- } -- end -- - def test_pacific_kiritimati - with_tz(tz="Pacific/Kiritimati") { - assert_time_constructor(tz, "1994-12-31 23:59:59 -1000", :local, [1994,12,31,23,59,59]) -@@ -355,12 +348,6 @@ def self.gen_zdump_test(data) - Europe/London Sun Aug 10 01:00:00 1947 UTC = Sun Aug 10 02:00:00 1947 BST isdst=1 gmtoff=3600 - Europe/London Sun Nov 2 01:59:59 1947 UTC = Sun Nov 2 02:59:59 1947 BST isdst=1 gmtoff=3600 - Europe/London Sun Nov 2 02:00:00 1947 UTC = Sun Nov 2 02:00:00 1947 GMT isdst=0 gmtoff=0 --Europe/Moscow Sat Jan 18 23:59:59 1992 UTC = Sun Jan 19 01:59:59 1992 MSK isdst=0 gmtoff=7200 --Europe/Moscow Sun Jan 19 00:00:00 1992 UTC = Sun Jan 19 03:00:00 1992 MSK isdst=0 gmtoff=10800 --Europe/Moscow Sat Mar 28 19:59:59 1992 UTC = Sat Mar 28 22:59:59 1992 MSK isdst=0 gmtoff=10800 --Europe/Moscow Sat Mar 28 20:00:00 1992 UTC = Sun Mar 29 00:00:00 1992 MSD isdst=1 gmtoff=14400 --Europe/Moscow Sat Sep 26 18:59:59 1992 UTC = Sat Sep 26 22:59:59 1992 MSD isdst=1 gmtoff=14400 --Europe/Moscow Sat Sep 26 19:00:00 1992 UTC = Sat Sep 26 22:00:00 1992 MSK isdst=0 gmtoff=10800 - Pacific/Kiritimati Sun Jan 1 09:59:59 1995 UTC = Sat Dec 31 23:59:59 1994 LINT isdst=0 gmtoff=-36000 - Pacific/Kiritimati Sun Jan 1 10:00:00 1995 UTC = Mon Jan 2 00:00:00 1995 LINT isdst=0 gmtoff=50400 - End diff --git a/ruby.spec b/ruby.spec index 1a137b1..0087025 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 %global minor_version 2 -%global teeny_version 5 +%global teeny_version 6 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -21,7 +21,7 @@ %endif -%global release 49 +%global release 50 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5.1 @@ -115,13 +115,6 @@ Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch # Use miniruby to regenerate prelude.c. # https://bugs.ruby-lang.org/issues/10554 Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch -# Ignore Europe/Moscow TZ test, which fails due to change in tzdata. -# https://github.com/ruby/ruby/commit/d16ff5c412b90b2766be97a5d3d689c5a18528d3 -Patch8: ruby-2.2.6-Tests-depends-on-Europe-Moscow-removed.patch -# Fixes random TestRubyOptimization#test_tailcall_inhibited_by_rescue test -# suite failures. -# https://github.com/ruby/ruby/commit/cf23ad429da3213fd3b1261c546dfa08e7dba2bf -Patch9: ruby-2.2.6-Fix-random-test-failure-introduced-by-r54698.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -423,8 +416,6 @@ rm -rf ext/fiddle/libffi* %patch5 -p1 %patch6 -p1 %patch7 -p1 -%patch8 -p1 -%patch9 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -484,7 +475,8 @@ for cert in \ EntrustnetSecureServerCertificationAuthority.pem \ GeoTrustGlobalCA.pem \ AddTrustExternalCARoot.pem \ - AddTrustExternalCARoot-2048.pem + AddTrustExternalCARoot-2048.pem \ + GlobalSignRootCA.pem do rm %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert done @@ -906,6 +898,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Fri Nov 18 2016 Vít Ondruch - 2.2.6-50 +- Update to Ruby 2.2.6. + * Tue Jul 12 2016 Vít Ondruch - 2.2.5-49 - Make symlinks for json gem. diff --git a/sources b/sources index fffe26d..add4b51 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4b9506c37e908b5b17215b66b2760438 ruby-2.2.5.tar.xz +7aa1c8021ba811fa75b733f698bd937e ruby-2.2.6.tar.xz From f2f4043b177edc025160ca513af085e049b46af2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 20 Oct 2016 13:55:21 +0200 Subject: [PATCH 13/16] Add gemspec_add_dep and gemspec_remove_dep macros. --- macros.rubygems | 78 +++++++++++++++++++++++++++++++++++++++++++++++++ ruby.spec | 1 + 2 files changed, 79 insertions(+) diff --git a/macros.rubygems b/macros.rubygems index 1043c02..6f8e4f4 100644 --- a/macros.rubygems +++ b/macros.rubygems @@ -35,3 +35,81 @@ gem install \\\ %rubygems_default_filter %{expand: \ %global __provides_exclude_from %{?__provides_exclude_from:%{__provides_exclude_from}|}^%{gem_extdir_mri}/.*\\\\.so$ \ } + +# The 'read' command in gemspec_add _depand gemspec_remove_dep macros is not +# essential, but it is usefull to make the sript appear in build log. + +# Add dependency named gem with version requirements to .gemspec. It adds +# runtime dependency by default. +# -g Specifies name of the gem dependency. +# -s Overrides the default .gemspec location. +# -d Add development dependecy. +# +# The remaining arguments are expected to be version requirements and should +# be valid Ruby code. +%gemspec_add_dep(g:s:d) \ +read -d '' gemspec_add_dep_script << 'EOR' || : \ + gemspec_file = '%{-s*}%{!?-s:./%{gem_name}.gemspec}' \ + \ + name = '%{-g*}' \ + requirements = %{*}%{!?1:nil} \ + \ + type = :%{!?-d:runtime}%{?-d:development} \ + \ + spec = Gem::Specification.load(gemspec_file) \ + abort("#{gemspec_file} is not accessible.") unless spec \ + \ + dep = spec.dependencies.detect { |d| d.type == type && d.name == name } \ + if dep \ + dep.requirement.concat requirements \ + else \ + spec.public_send "add_#{type}_dependency", name, requirements \ + end \ + File.write gemspec_file, spec.to_ruby \ +EOR\ +echo "$gemspec_add_dep_script" | ruby \ +unset -v gemspec_add_dep_script \ +%{nil} + +# Remove dependency named gem with version requirements to .gemspec. It +# removes runtime dependency by default. +# -g Specifies name of the gem dependency. +# -s Overrides the default .gemspec location. +# -d Remove development dependecy. +# +# The remaining arguments are expected to be version requirements and should +# be valid Ruby code. The macro fails if these specific requirements can't be +# removed. +%gemspec_remove_dep(g:s:d) \ +read -d '' gemspec_remove_dep_script << 'EOR' || : \ + gemspec_file = '%{-s*}%{!?-s:./%{gem_name}.gemspec}' \ + \ + name = '%{-g*}' \ + requirements = %{*}%{!?1:nil} \ + \ + type = :%{!?-d:runtime}%{?-d:development} \ + \ + spec = Gem::Specification.load(gemspec_file) \ + abort("#{gemspec_file} is not accessible.") unless spec \ + \ + dep = spec.dependencies.detect { |d| d.type == type && d.name == name } \ + if dep \ + if requirements \ + requirements = Gem::Requirement.create(requirements).requirements \ + requirements.each do |r| \ + unless dep.requirement.requirements.reject! { |dependency_requirements| dependency_requirements == r } \ + abort("Requirement '#{r.first} #{r.last}' was not possible to remove for dependency '#{dep}'!") \ + end \ + end \ + spec.dependencies.delete dep if dep.requirement.requirements.empty? \ + else \ + spec.dependencies.delete dep \ + end \ + else \ + abort("Dependency '#{name}' was not found!") \ + end \ + File.write gemspec_file, spec.to_ruby \ +EOR\ +echo "$gemspec_remove_dep_script" | ruby \ +unset -v gemspec_remove_dep_script \ +%{nil} diff --git a/ruby.spec b/ruby.spec index 0087025..f820811 100644 --- a/ruby.spec +++ b/ruby.spec @@ -900,6 +900,7 @@ make check TESTS="-v $DISABLE_TESTS" %changelog * Fri Nov 18 2016 Vít Ondruch - 2.2.6-50 - Update to Ruby 2.2.6. +- Add gemspec_add_dep and gemspec_remove_dep macros. * Tue Jul 12 2016 Vít Ondruch - 2.2.5-49 - Make symlinks for json gem. From 371685199aca7564ef191240787aa7a257847e72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 21 Oct 2016 12:36:39 +0200 Subject: [PATCH 14/16] Improve macro documentation. --- macros.rubygems | 52 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 18 deletions(-) diff --git a/macros.rubygems b/macros.rubygems index 6f8e4f4..a5fd300 100644 --- a/macros.rubygems +++ b/macros.rubygems @@ -10,9 +10,14 @@ %gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec %gem_docdir %{gem_dir}/doc/%{gem_name}-%{version} -# Install gem into appropriate directory. -# -n Overrides gem file name for installation. -# -d Set installation directory. + +# %gem_install - Install gem into appropriate directory. +# +# Usage: %gem_install [options] +# +# -n Overrides gem file name for installation. +# -d Set installation directory. +# %gem_install(d:n:) \ mkdir -p %{-d*}%{!?-d:.%{gem_dir}} \ \ @@ -27,6 +32,7 @@ gem install \\\ %{-n*}%{!?-n:%{gem_name}-%{version}.gem} \ %{nil} + # For rubygems packages we want to filter out any provides caused by private # libs in %%{gem_archdir}. # @@ -36,17 +42,23 @@ gem install \\\ %global __provides_exclude_from %{?__provides_exclude_from:%{__provides_exclude_from}|}^%{gem_extdir_mri}/.*\\\\.so$ \ } + # The 'read' command in gemspec_add _depand gemspec_remove_dep macros is not # essential, but it is usefull to make the sript appear in build log. -# Add dependency named gem with version requirements to .gemspec. It adds -# runtime dependency by default. -# -g Specifies name of the gem dependency. -# -s Overrides the default .gemspec location. -# -d Add development dependecy. + +# %gemspec_add_dep - Add dependency into .gemspec. +# +# Usage: %gemspec_add_dep -g [options] [requirements] +# +# Add dependency named to .gemspec file. The macro adds runtime +# dependency by default. The [requirements] argument can be used to specify +# the dependency constraints more precisely. It is expected to be valid Ruby +# code. +# +# -s Overrides the default .gemspec location. +# -d Add development dependecy. # -# The remaining arguments are expected to be version requirements and should -# be valid Ruby code. %gemspec_add_dep(g:s:d) \ read -d '' gemspec_add_dep_script << 'EOR' || : \ gemspec_file = '%{-s*}%{!?-s:./%{gem_name}.gemspec}' \ @@ -71,15 +83,19 @@ echo "$gemspec_add_dep_script" | ruby \ unset -v gemspec_add_dep_script \ %{nil} -# Remove dependency named gem with version requirements to .gemspec. It -# removes runtime dependency by default. -# -g Specifies name of the gem dependency. -# -s Overrides the default .gemspec location. -# -d Remove development dependecy. + +# %gemspec_remove_dep - Remove dependency from .gemspec. +# +# Usage: %gemspec_remove_dep -g [options] [requirements] +# +# Remove dependency named from .gemspec file. The macro removes runtime +# dependency by default. The [requirements] argument can be used to specify +# the dependency constraints more precisely. It is expected to be valid Ruby +# code. The macro fails if these specific requirements can't be removed. +# +# -s Overrides the default .gemspec location. +# -d Remove development dependecy. # -# The remaining arguments are expected to be version requirements and should -# be valid Ruby code. The macro fails if these specific requirements can't be -# removed. %gemspec_remove_dep(g:s:d) \ read -d '' gemspec_remove_dep_script << 'EOR' || : \ gemspec_file = '%{-s*}%{!?-s:./%{gem_name}.gemspec}' \ From c14e846c995fa333a29abc5f0e295ffef815e45c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 18 Nov 2016 17:22:30 +0100 Subject: [PATCH 15/16] Ensure there is not forgotten any certificate. --- ruby.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ruby.spec b/ruby.spec index f820811..9d7ddd8 100644 --- a/ruby.spec +++ b/ruby.spec @@ -480,6 +480,8 @@ for cert in \ do rm %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert done +# Ensure there is not forgotten any certificate. +test ! "$(ls -A %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/ 2>/dev/null)" # Move macros file into proper place and replace the %%{name} macro, since it # would be wrongly evaluated during build of other packages. From 9813501744c3e9f8774ca18b7cd2df8790a1ce9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 22 Nov 2016 13:25:46 +0100 Subject: [PATCH 16/16] Exclude json.rb from ruby-libs (rhbz#1397370). --- ruby.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 9d7ddd8..7c88c77 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 50 +%global release 51 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5.1 @@ -661,6 +661,7 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/*.rb %exclude %{ruby_libdir}/*-tk.rb %exclude %{ruby_libdir}/irb.rb +%exclude %{ruby_libdir}/json.rb %exclude %{ruby_libdir}/tcltk.rb %exclude %{ruby_libdir}/tk*.rb %exclude %{ruby_libdir}/psych.rb @@ -900,6 +901,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Tue Nov 22 2016 Vít Ondruch - 2.2.6-51 +- Exclude json.rb from ruby-libs (rhbz#1397370). + * Fri Nov 18 2016 Vít Ondruch - 2.2.6-50 - Update to Ruby 2.2.6. - Add gemspec_add_dep and gemspec_remove_dep macros.