From 75b09f7e8d53c7766b5797964ab5ca30189b57a2 Mon Sep 17 00:00:00 2001 From: Vít Ondruch Date: Sep 02 2015 11:17:02 +0000 Subject: Update to Ruby 2.2.3. --- 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.spec b/ruby.spec index fa11c0c..d9e5791 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 40 +%global release 44 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5 @@ -110,9 +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 # 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 @@ -418,7 +415,6 @@ rm -rf ext/fiddle/libffi* %patch4 -p1 %patch5 -p1 %patch6 -p1 -%patch7 -p1 %patch9 %patch10 %patch11 @@ -897,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. + * Mon May 04 2015 Vít Ondruch - 2.2.2-40 - Fix upgrade path (rubygem-io-console's version was recently bumped in F21 and makes the higher release to win). 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