From 835bcc89f9cbb404b89383d71112ea0413d8de19 Mon Sep 17 00:00:00 2001 From: Vít Ondruch Date: Oct 07 2013 11:08:54 +0000 Subject: Update versions of significantly updated patches. --- diff --git a/ruby-1.9.3-always-use-i386.patch b/ruby-1.9.3-always-use-i386.patch deleted file mode 100644 index 10e3d99..0000000 --- a/ruby-1.9.3-always-use-i386.patch +++ /dev/null @@ -1,25 +0,0 @@ -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. - ---- - configure.in | 2 ++ - 1 file changed, 2 insertions(+) - -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 - - AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl - -+target_cpu=`echo $target_cpu | sed s/i.86/i386/` -+ - if test "${universal_binary-no}" = yes ; then - arch="universal-${target_os}" - AC_CACHE_CHECK(whether __ARCHITECTURE__ is available, rb_cv_architecture_available, --- -1.8.3.1 - diff --git a/ruby-1.9.3-custom-rubygems-location.patch b/ruby-1.9.3-custom-rubygems-location.patch deleted file mode 100644 index 05a0d01..0000000 --- a/ruby-1.9.3-custom-rubygems-location.patch +++ /dev/null @@ -1,96 +0,0 @@ -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 | 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 03a4152..0e371e2 100644 ---- a/configure.in -+++ b/configure.in -@@ -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 "${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 - - 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 b47b6e1..0b99408 100755 ---- a/tool/rbinstall.rb -+++ b/tool/rbinstall.rb -@@ -317,6 +317,7 @@ sitelibdir = CONFIG["sitelibdir"] - sitearchlibdir = CONFIG["sitearchdir"] - vendorlibdir = CONFIG["vendorlibdir"] - vendorarchlibdir = CONFIG["vendorarchdir"] -+rubygemsdir = CONFIG["rubygemsdir"] - mandir = CONFIG["mandir", true] - docdir = CONFIG["docdir", true] - configure_args = Shellwords.shellwords(CONFIG["configure_args"]) -@@ -505,7 +506,15 @@ end - install?(:local, :comm, :lib) do - prepare "library scripts", rubylibdir - noinst = %w[README* *.txt *.rdoc *.gemspec] -+ noinst += %w[*ubygems.rb rubygems/ datadir.rb] if rubygemsdir - install_recursive(File.join(srcdir, "lib"), rubylibdir, :no_install => noinst, :mode => $data_mode) -+ if rubygemsdir -+ noinst = %w[obsolete.rb] -+ install_recursive(File.join(srcdir, "lib", "rubygems"), File.join(rubygemsdir, "rubygems"), :mode => $data_mode) -+ install_recursive(File.join(srcdir, "lib", "rbconfig"), File.join(rubygemsdir, "rbconfig"), :no_install => noinst, :mode => $data_mode) -+ install(File.join(srcdir, "lib", "ubygems.rb"), File.join(rubygemsdir, "ubygems.rb"), :mode => $data_mode) -+ install(File.join(srcdir, "lib", "rubygems.rb"), File.join(rubygemsdir, "rubygems.rb"), :mode => $data_mode) -+ end - end - - install?(:local, :arch, :lib) do --- -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 deleted file mode 100644 index 498a792..0000000 --- a/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ /dev/null @@ -1,98 +0,0 @@ -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 | 15 +++++++++------ - loadpath.c | 4 ++++ - 2 files changed, 13 insertions(+), 6 deletions(-) - -diff --git a/configure.in b/configure.in -index 881449e..37d9a62 100644 ---- a/configure.in -+++ b/configure.in -@@ -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}'} - - 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 - #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 -@@ -74,7 +76,9 @@ const char ruby_initial_load_paths[] = - #endif - - #ifndef NO_RUBY_VENDOR_LIB -+#ifndef RUBY_LIB_VERSION_BLANK - RUBY_VENDOR_LIB2 "\0" -+#endif - #ifdef RUBY_THINARCH - RUBY_VENDOR_ARCH_LIB_FOR(RUBY_THINARCH) "\0" - #endif --- -1.8.3.1 - 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 new file mode 100644 index 0000000..498a792 --- /dev/null +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -0,0 +1,98 @@ +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 | 15 +++++++++------ + loadpath.c | 4 ++++ + 2 files changed, 13 insertions(+), 6 deletions(-) + +diff --git a/configure.in b/configure.in +index 881449e..37d9a62 100644 +--- a/configure.in ++++ b/configure.in +@@ -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}'} + + 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 + #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 +@@ -74,7 +76,9 @@ const char ruby_initial_load_paths[] = + #endif + + #ifndef NO_RUBY_VENDOR_LIB ++#ifndef RUBY_LIB_VERSION_BLANK + RUBY_VENDOR_LIB2 "\0" ++#endif + #ifdef RUBY_THINARCH + RUBY_VENDOR_ARCH_LIB_FOR(RUBY_THINARCH) "\0" + #endif +-- +1.8.3.1 + diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch new file mode 100644 index 0000000..10e3d99 --- /dev/null +++ b/ruby-2.1.0-always-use-i386.patch @@ -0,0 +1,25 @@ +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. + +--- + configure.in | 2 ++ + 1 file changed, 2 insertions(+) + +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 + + AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl + ++target_cpu=`echo $target_cpu | sed s/i.86/i386/` ++ + if test "${universal_binary-no}" = yes ; then + arch="universal-${target_os}" + AC_CACHE_CHECK(whether __ARCHITECTURE__ is available, rb_cv_architecture_available, +-- +1.8.3.1 + diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch new file mode 100644 index 0000000..05a0d01 --- /dev/null +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -0,0 +1,96 @@ +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 | 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 03a4152..0e371e2 100644 +--- a/configure.in ++++ b/configure.in +@@ -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 "${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 + + 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 b47b6e1..0b99408 100755 +--- a/tool/rbinstall.rb ++++ b/tool/rbinstall.rb +@@ -317,6 +317,7 @@ sitelibdir = CONFIG["sitelibdir"] + sitearchlibdir = CONFIG["sitearchdir"] + vendorlibdir = CONFIG["vendorlibdir"] + vendorarchlibdir = CONFIG["vendorarchdir"] ++rubygemsdir = CONFIG["rubygemsdir"] + mandir = CONFIG["mandir", true] + docdir = CONFIG["docdir", true] + configure_args = Shellwords.shellwords(CONFIG["configure_args"]) +@@ -505,7 +506,15 @@ end + install?(:local, :comm, :lib) do + prepare "library scripts", rubylibdir + noinst = %w[README* *.txt *.rdoc *.gemspec] ++ noinst += %w[*ubygems.rb rubygems/ datadir.rb] if rubygemsdir + install_recursive(File.join(srcdir, "lib"), rubylibdir, :no_install => noinst, :mode => $data_mode) ++ if rubygemsdir ++ noinst = %w[obsolete.rb] ++ install_recursive(File.join(srcdir, "lib", "rubygems"), File.join(rubygemsdir, "rubygems"), :mode => $data_mode) ++ install_recursive(File.join(srcdir, "lib", "rbconfig"), File.join(rubygemsdir, "rbconfig"), :no_install => noinst, :mode => $data_mode) ++ install(File.join(srcdir, "lib", "ubygems.rb"), File.join(rubygemsdir, "ubygems.rb"), :mode => $data_mode) ++ install(File.join(srcdir, "lib", "rubygems.rb"), File.join(rubygemsdir, "rubygems.rb"), :mode => $data_mode) ++ end + end + + install?(:local, :arch, :lib) do +-- +1.8.3.1 + 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.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch deleted file mode 100644 index ad0f0bf..0000000 --- a/rubygems-2.0.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.0.0-binary-extensions.patch b/rubygems-2.0.0-binary-extensions.patch deleted file mode 100644 index 5c212e7..0000000 --- a/rubygems-2.0.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 - 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 new file mode 100644 index 0000000..ad0f0bf --- /dev/null +++ b/rubygems-2.2.0-Do-not-modify-global-Specification.dirs-during-insta.patch @@ -0,0 +1,29 @@ +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 new file mode 100644 index 0000000..5c212e7 --- /dev/null +++ b/rubygems-2.2.0-binary-extensions.patch @@ -0,0 +1,179 @@ +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 +