Upgrade to Ruby 2.5.0.

This commit is contained in:
Vít Ondruch 2018-01-03 12:06:40 +01:00
parent ad05a88747
commit c2db65dbc7
13 changed files with 232 additions and 131 deletions

View File

@ -87,22 +87,33 @@ module Gem
# Remove methods we are going to override. This avoids "method redefined;"
# warnings otherwise issued by Ruby.
remove_method :operating_system_defaults if method_defined? :operating_system_defaults
remove_method :default_dir if method_defined? :default_dir
remove_method :default_path if method_defined? :default_path
remove_method :default_bindir if method_defined? :default_bindir
remove_method :default_ext_dir_for if method_defined? :default_ext_dir_for
##
# Regular user installs into user directory, root manages /usr/local.
def operating_system_defaults
unless opt_build_root?
options = if Process.uid == 0
"--install-dir=#{Gem.default_dirs[:local][:gem_dir]} --bindir #{Gem.default_dirs[:local][:bin_dir]}"
else
"--user-install --bindir #{File.join [Dir.home, 'bin']}"
end
{"gem" => options}
else
{}
end
end
##
# RubyGems default overrides.
def default_dir
if opt_build_root?
Gem.default_dirs[:system][:gem_dir]
elsif Process.uid == 0
Gem.default_dirs[:local][:gem_dir]
else
Gem.user_dir
end
Gem.default_dirs[:system][:gem_dir]
end
def default_path
@ -110,16 +121,6 @@ module Gem
path.unshift Gem.user_dir if File.exist? Gem.user_home
end
def default_bindir
if opt_build_root?
Gem.default_dirs[:system][:bin_dir]
elsif Process.uid == 0
Gem.default_dirs[:local][:bin_dir]
else
File.join [Dir.home, 'bin']
end
end
def default_ext_dir_for base_dir
dir = if rpmbuild?
build_dir = base_dir.chomp Gem.default_dirs[:system][:gem_dir]

View File

@ -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
@@ -1897,7 +1897,7 @@ def configuration(srcdir)
@@ -1899,7 +1899,7 @@ def configuration(srcdir)
SHELL = /bin/sh
# V=0 quiet, V=1 verbose. other values don't work.

View File

@ -6,14 +6,14 @@ Subject: [PATCH] Allow to specify addition preludes by configuration option.
---
Makefile.in | 2 ++
common.mk | 2 +-
configure.in | 7 +++++++
configure.ac | 7 +++++++
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
index 7e8ed82..7916993 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -116,6 +116,8 @@ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@
@@ -119,6 +119,8 @@ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@
XRUBY_RUBYHDRDIR = @XRUBY_RUBYHDRDIR@
BOOTSTRAPRUBY = @BOOTSTRAPRUBY@
@ -26,20 +26,20 @@ diff --git a/common.mk b/common.mk
index 5cfbc3d..3f0a82e 100644
--- a/common.mk
+++ b/common.mk
@@ -144,7 +144,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS)
@@ -147,7 +147,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS)
GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT)
DEFAULT_PRELUDES = $(GEM_PRELUDE)
-PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(DEFAULT_PRELUDES)
+PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(DEFAULT_PRELUDES) $(OPTIONAL_PRELUDES)
-PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(DEFAULT_PRELUDES)
+PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(DEFAULT_PRELUDES) $(OPTIONAL_PRELUDES)
GEM_PRELUDE = $(srcdir)/gem_prelude.rb
PRELUDES = {$(srcdir)}prelude.c {$(srcdir)}miniprelude.c
GOLFPRELUDES = {$(srcdir)}golf_prelude.c
diff --git a/configure.in b/configure.in
index 0e371e2..d4f1dcb 100644
--- a/configure.in
+++ b/configure.in
@@ -4563,6 +4563,13 @@ AC_SUBST(rubyarchhdrdir)dnl
diff --git a/configure.ac b/configure.ac
index 028ef7ca3e..cdeff87871 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4395,6 +4395,13 @@ AC_SUBST(rubyarchhdrdir)dnl
AC_SUBST(sitearchhdrdir)dnl
AC_SUBST(vendorarchhdrdir)dnl

View File

@ -4,15 +4,15 @@ Date: Tue, 1 Oct 2013 12:22:40 +0200
Subject: [PATCH] Allow to configure libruby.so placement.
---
configure.in | 5 +++++
configure.ac | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/configure.in b/configure.in
index 37d9a62..553d4d0 100644
--- a/configure.in
+++ b/configure.in
@@ -3823,6 +3823,11 @@ if test ${multiarch+set}; then
fi
diff --git a/configure.ac b/configure.ac
index 11fc237552..b77e88fc37 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3640,6 +3640,11 @@ AS_IF([test ${multiarch+set}], [
])
archlibdir='${libdir}/${arch}'
+AC_ARG_WITH(archlibdir,

View File

@ -5,16 +5,16 @@ Subject: [PATCH] Prevent duplicated paths when empty version string is
configured.
---
configure.in | 3 ++-
configure.ac | 3 ++-
loadpath.c | 12 ++++++++++++
tool/mkconfig.rb | 2 +-
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/configure.in b/configure.in
index db37cd6..ce8d149 100644
--- a/configure.in
+++ b/configure.in
@@ -4417,7 +4417,8 @@ AS_CASE(["$ruby_version_dir_name"],
diff --git a/configure.ac b/configure.ac
index 999e2d6d5d..11fc237552 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4250,7 +4250,8 @@ AS_CASE(["$ruby_version_dir_name"],
ruby_version_dir=/'${ruby_version_dir_name}'
if test -z "${ruby_version_dir_name}"; then
@ -28,7 +28,7 @@ diff --git a/loadpath.c b/loadpath.c
index 9160031..0d4d953 100644
--- a/loadpath.c
+++ b/loadpath.c
@@ -65,22 +65,34 @@ const char ruby_initial_load_paths[] =
@@ -65,21 +65,33 @@ const char ruby_initial_load_paths[] =
RUBY_SEARCH_PATH "\0"
#endif
#ifndef NO_RUBY_SITE_LIB
@ -58,16 +58,15 @@ index 9160031..0d4d953 100644
RUBY_VENDOR_ARCH_LIB_FOR(RUBY_SITEARCH) "\0"
+#ifndef RUBY_LIB_VERSION_BLANK
RUBY_VENDOR_LIB "\0"
#endif
+#endif
#endif
RUBY_LIB "\0"
#ifdef RUBY_THINARCH
diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
index 07076d4..35e6c3c 100755
--- a/tool/mkconfig.rb
+++ b/tool/mkconfig.rb
@@ -113,7 +113,7 @@
@@ -111,7 +111,7 @@
val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump
case name
when /^prefix$/

View File

@ -4,22 +4,22 @@ Date: Mon, 19 Nov 2012 14:37:28 +0100
Subject: [PATCH] Always use i386.
---
configure.in | 2 ++
configure.ac | 2 ++
1 file changed, 2 insertions(+)
diff --git a/configure.in b/configure.in
index 553d4d0..03a4152 100644
--- a/configure.in
+++ b/configure.in
@@ -4481,6 +4481,8 @@ AC_SUBST(vendorarchdir)dnl
diff --git a/configure.ac b/configure.ac
index b77e88fc37..6bba453e3c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4314,6 +4314,8 @@ AC_SUBST(vendorarchdir)dnl
AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")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
AS_IF([test "${universal_binary-no}" = yes ], [
arch="universal-${target_os}"
if test "${rb_cv_architecture_available}" = yes; then
AS_IF([test "${rb_cv_architecture_available}" = yes], [
--
1.8.3.1

View File

@ -5,17 +5,17 @@ Subject: [PATCH] Allow to install RubyGems into custom location, outside of
Ruby tree.
---
configure.in | 5 +++++
configure.ac | 5 +++++
loadpath.c | 4 ++++
template/verconf.h.tmpl | 3 +++
tool/rbinstall.rb | 9 +++++++++
4 files changed, 21 insertions(+)
tool/rbinstall.rb | 7 +++++++
4 files changed, 19 insertions(+)
diff --git a/configure.in b/configure.in
index 03a4152..0e371e2 100644
--- a/configure.in
+++ b/configure.in
@@ -4453,6 +4453,10 @@ AC_ARG_WITH(vendorarchdir,
diff --git a/configure.ac b/configure.ac
index 6bba453e3c..028ef7ca3e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4286,6 +4286,10 @@ AC_ARG_WITH(vendorarchdir,
[vendorarchdir=$withval],
[vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}])
@ -23,10 +23,10 @@ index 03a4152..0e371e2 100644
+ AS_HELP_STRING([--with-rubygemsdir=DIR], [custom rubygems directory]),
+ [rubygemsdir=$withval])
+
if test "${LOAD_RELATIVE+set}"; then
AS_IF([test "${LOAD_RELATIVE+set}"], [
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
RUBY_EXEC_PREFIX=''
@@ -4477,6 +4481,7 @@ AC_SUBST(sitearchdir)dnl
@@ -4310,6 +4314,7 @@ AC_SUBST(sitearchdir)dnl
AC_SUBST(vendordir)dnl
AC_SUBST(vendorlibdir)dnl
AC_SUBST(vendorarchdir)dnl
@ -67,7 +67,7 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index b47b6e1..0b99408 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -330,6 +330,7 @@ def CONFIG.[](name, mandatory = false)
@@ -331,6 +331,7 @@ def CONFIG.[](name, mandatory = false)
sitearchlibdir = CONFIG["sitearchdir"]
vendorlibdir = CONFIG["vendorlibdir"]
vendorarchlibdir = CONFIG["vendorarchdir"]
@ -75,17 +75,15 @@ index b47b6e1..0b99408 100755
mandir = CONFIG["mandir", true]
docdir = CONFIG["docdir", true]
configure_args = Shellwords.shellwords(CONFIG["configure_args"])
@@ -517,7 +518,15 @@ def CONFIG.[](name, mandatory = false)
@@ -537,7 +538,13 @@ def install(src, cmd)
install?(:local, :comm, :lib) do
prepare "library scripts", rubylibdir
noinst = %w[README* *.txt *.rdoc *.gemspec]
+ noinst += %w[*ubygems.rb rubygems/ datadir.rb] if rubygemsdir
noinst = %w[*.txt *.rdoc *.gemspec]
+ noinst += %w[rubygems.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

View File

@ -11,7 +11,7 @@ diff --git a/common.mk b/common.mk
index 168dc52..20c218a 100644
--- a/common.mk
+++ b/common.mk
@@ -873,9 +873,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE)
@@ -962,9 +962,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE)
$(srcdir)/template/prelude.c.tmpl
$(PRELUDE_C): $(COMPILE_PRELUDE) \

View File

@ -12,15 +12,15 @@ ruby_version_dir_name now specifies custom version string for versioned
directories, e.g. instead of default X.Y.Z, you can specify whatever
string.
---
configure.in | 64 ++++++++++++++++++++++++++++-------------------------
configure.ac | 64 ++++++++++++++++++++++++++++-------------------------
template/ruby.pc.in | 1 +
2 files changed, 35 insertions(+), 30 deletions(-)
diff --git a/configure.in b/configure.in
index db37cd6..6e73fae 100644
--- a/configure.in
+++ b/configure.in
@@ -4368,9 +4368,6 @@ AS_CASE(["$target_os"],
diff --git a/configure.ac b/configure.ac
index 8ea969412f..a00f2b6776 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4201,9 +4201,6 @@ AS_CASE(["$target_os"],
rubyw_install_name='$(RUBYW_INSTALL_NAME)'
])
@ -30,7 +30,7 @@ index db37cd6..6e73fae 100644
rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'}
AC_ARG_WITH(rubyarchprefix,
AS_HELP_STRING([--with-rubyarchprefix=DIR],
@@ -4393,56 +4390,62 @@ AC_ARG_WITH(ridir,
@@ -4226,56 +4223,62 @@ AC_ARG_WITH(ridir,
AC_SUBST(ridir)
AC_SUBST(RI_BASE_NAME)
@ -43,7 +43,7 @@ index db37cd6..6e73fae 100644
-AS_CASE(["$ruby_version"],
- [full], [RUBY_LIB_VERSION_STYLE='3 /* full */'],
- [minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */'])
-if test ${RUBY_LIB_VERSION_STYLE+set}; then
-AS_IF([test ${RUBY_LIB_VERSION_STYLE+set}], [
- {
- echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE"
- echo '#define STRINGIZE(x) x'
@ -53,11 +53,11 @@ index db37cd6..6e73fae 100644
- } > conftest.c
- 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
-], [test -z "${ruby_version}"], [
- AC_MSG_ERROR([No ruby version, No place for bundled libraries])
-else
-], [
- RUBY_LIB_VERSION="${ruby_version}"
-fi
-])
+RUBY_LIB_VERSION_STYLE='3 /* full */'
+{
+echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE"
@ -118,9 +118,9 @@ index db37cd6..6e73fae 100644
- [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}])
+ [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}])
if test "${LOAD_RELATIVE+set}"; then
AS_IF([test "${LOAD_RELATIVE+set}"], [
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
@@ -4459,6 +4462,7 @@ AC_SUBST(sitearchincludedir)dnl
@@ -4292,6 +4295,7 @@ AC_SUBST(sitearchincludedir)dnl
AC_SUBST(arch)dnl
AC_SUBST(sitearch)dnl
AC_SUBST(ruby_version)dnl
@ -137,9 +137,9 @@ index 8a2c066..c81b211 100644
TEENY=@TEENY@
ruby_version=@ruby_version@
+ruby_version_dir_name=@ruby_version_dir_name@
RUBY_API_VERSION=@RUBY_API_VERSION@
RUBY_PROGRAM_VERSION=@RUBY_PROGRAM_VERSION@
RUBY_BASE_NAME=@RUBY_BASE_NAME@
RUBY_VERSION_NAME=@RUBY_VERSION_NAME@
--
2.1.0
@ -245,7 +245,7 @@ diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
index 0428bea..b6e090e 100644
--- a/test/rubygems/test_gem.rb
+++ b/test/rubygems/test_gem.rb
@@ -1124,7 +1124,8 @@ def test_self_use_paths
@@ -1156,7 +1156,8 @@ def test_self_use_paths
def test_self_user_dir
parts = [@userhome, '.gem', Gem.ruby_engine]
@ -255,7 +255,7 @@ index 0428bea..b6e090e 100644
assert_equal File.join(parts), Gem.user_dir
end
@@ -1251,7 +1252,7 @@ def test_self_user_home_user_drive_and_path
@@ -1283,7 +1284,7 @@ def test_self_user_home_user_drive_and_path
def test_self_vendor_dir
expected =
File.join RbConfig::CONFIG['vendordir'], 'gems',
@ -275,14 +275,14 @@ Subject: [PATCH 4/4] Let headers directories follow the configured version
name.
---
configure.in | 2 +-
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.in b/configure.in
index 6e73fae..c842725 100644
--- a/configure.in
+++ b/configure.in
@@ -271,7 +271,7 @@ RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"`
diff --git a/configure.ac b/configure.ac
index a00f2b6776..999e2d6d5d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -164,7 +164,7 @@ RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"`
RUBYW_BASE_NAME=`echo rubyw | sed "$program_transform_name"`
AC_SUBST(RUBY_BASE_NAME)
AC_SUBST(RUBYW_BASE_NAME)

View File

@ -15,7 +15,7 @@ diff --git a/test/fiddle/helper.rb b/test/fiddle/helper.rb
index 1da3d93..65148a1 100644
--- a/test/fiddle/helper.rb
+++ b/test/fiddle/helper.rb
@@ -6,98 +6,6 @@
@@ -6,95 +6,6 @@
libc_so = libm_so = nil
@ -23,9 +23,6 @@ index 1da3d93..65148a1 100644
-when /cygwin/
- libc_so = "cygwin1.dll"
- libm_so = "cygwin1.dll"
-when /x86_64-linux/
- libc_so = "/lib64/libc.so.6"
- libm_so = "/lib64/libm.so.6"
-when /linux/
- libdir = '/lib'
- case [0].pack('L!').size

View File

@ -0,0 +1,80 @@
From 60eb961c25f801ee43ca1be9393ab2f0a0546677 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Tue, 19 Dec 2017 14:00:20 +0100
Subject: [PATCH] Add Gem.operating_system_defaults to allow packagers to
override defaults.
This change allows Ruby packagers to override defaults and lazily query
them.
This is very much the same change as #1644 to treat the
operating_system defaults the same way as platform defaults.
---
lib/rubygems/config_file.rb | 2 +-
lib/rubygems/defaults.rb | 21 ++++++++++++++++++++-
test/rubygems/test_gem.rb | 7 +++++++
3 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/lib/rubygems/config_file.rb b/lib/rubygems/config_file.rb
index a4efed0f5a..deee38e6d9 100644
--- a/lib/rubygems/config_file.rb
+++ b/lib/rubygems/config_file.rb
@@ -48,7 +48,7 @@ class Gem::ConfigFile
# For Ruby packagers to set configuration defaults. Set in
# rubygems/defaults/operating_system.rb
- OPERATING_SYSTEM_DEFAULTS = {}
+ OPERATING_SYSTEM_DEFAULTS = Gem.operating_system_defaults
##
# For Ruby implementers to set configuration defaults. Set in
diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb
index 43d57fc808..b8222877ae 100644
--- a/lib/rubygems/defaults.rb
+++ b/lib/rubygems/defaults.rb
@@ -177,7 +177,26 @@ def self.vendor_dir # :nodoc:
end
##
- # Default options for gem commands.
+ # Default options for gem commands for Ruby packagers.
+ #
+ # The options here should be structured as an array of string "gem"
+ # command names as keys and a string of the default options as values.
+ #
+ # Example:
+ #
+ # def self.operating_system_defaults
+ # {
+ # 'install' => '--no-rdoc --no-ri --env-shebang',
+ # 'update' => '--no-rdoc --no-ri --env-shebang'
+ # }
+ # end
+
+ def self.operating_system_defaults
+ {}
+ end
+
+ ##
+ # Default options for gem commands for Ruby implementers.
#
# The options here should be structured as an array of string "gem"
# command names as keys and a string of the default options as values.
diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
index 3225a05c6b..62b80c4945 100644
--- a/test/rubygems/test_gem.rb
+++ b/test/rubygems/test_gem.rb
@@ -1802,6 +1802,13 @@ def test_use_gemdeps_specific
ENV['RUBYGEMS_GEMDEPS'] = rubygems_gemdeps
end
+ def test_operating_system_defaults
+ operating_system_defaults = Gem.operating_system_defaults
+
+ assert operating_system_defaults != nil
+ assert operating_system_defaults.is_a? Hash
+ end
+
def test_platform_defaults
platform_defaults = Gem.platform_defaults

View File

@ -1,6 +1,6 @@
%global major_version 2
%global minor_version 4
%global teeny_version 2
%global minor_version 5
%global teeny_version 0
%global major_minor_version %{major_version}.%{minor_version}
%global ruby_version %{major_minor_version}.%{teeny_version}
@ -10,7 +10,7 @@
#%%global milestone rc1
# Keep the revision enabled for pre-releases from SVN.
#%%global revision 57159
#%%global revision 61414
%global ruby_archive %{name}-%{ruby_version}
@ -29,26 +29,26 @@
%global rubygems_dir %{_datadir}/rubygems
# Bundled libraries versions
%global rubygems_version 2.6.13
%global rubygems_version 2.7.3
%global molinillo_version 0.5.7
# TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM.
# http://redmine.ruby-lang.org/issues/5313
%global irb_version %{ruby_version}
%global bigdecimal_version 1.3.0
%global did_you_mean_version 1.1.0
%global bigdecimal_version 1.3.4
%global did_you_mean_version 1.2.0
%global io_console_version 0.4.6
%global json_version 2.0.4
%global minitest_version 5.10.1
%global json_version 2.1.0
%global minitest_version 5.10.3
%global net_telnet_version 0.1.1
%global openssl_version 2.0.5
%global power_assert_version 0.4.1
%global psych_version 2.2.2
%global rake_version 12.0.0
%global rdoc_version 5.0.0
%global test_unit_version 3.2.3
%global xmlrpc_version 0.2.1
%global openssl_version 2.1.0
%global power_assert_version 1.1.1
%global psych_version 3.0.2
%global rake_version 12.3.0
%global rdoc_version 6.0.1
%global test_unit_version 3.2.7
%global xmlrpc_version 0.3.0
# Might not be needed in the future, if we are lucky enough.
# https://bugzilla.redhat.com/show_bug.cgi?id=888262
@ -131,6 +131,9 @@ Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch
# hardening features of glibc (rhbz#1361037).
# https://bugs.ruby-lang.org/issues/12666
Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch
# Add Gem.operating_system_defaults to allow packagers to override defaults.
# https://github.com/rubygems/rubygems/pull/2116
Patch10: ruby-2.5.0-Add-Gem.operating_system_defaults.patch
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Suggests: rubypick
@ -216,7 +219,6 @@ Requires: rubygem(psych) >= %{psych_version}
Provides: gem = %{version}-%{release}
Provides: ruby(rubygems) = %{version}-%{release}
# https://github.com/rubygems/rubygems/pull/1189#issuecomment-121600910
Provides: bundled(rubygem(molinillo)) = %{molinillo_version}
Provides: bundled(rubygem-molinillo) = %{molinillo_version}
BuildArch: noarch
@ -334,6 +336,7 @@ License: MIT
Requires: ruby(release)
Requires: ruby(rubygems) >= %{rubygems_version}
Provides: rubygem(did_you_mean) = %{version}-%{release}
BuildArch: noarch
%description -n rubygem-did_you_mean
"did you mean?" experience in Ruby: the error message will tell you the right
@ -448,6 +451,7 @@ Group: Development/Libraries
Requires: ruby(release)
Requires: ruby(rubygems) >= %{rubygems_version}
Provides: rubygem(net-telnet) = %{version}-%{release}
BuildArch: noarch
%description -n rubygem-net-telnet
Provides telnet client functionality.
@ -511,6 +515,7 @@ rm -rf ext/fiddle/libffi*
%patch6 -p1
%patch7 -p1
%patch9 -p1
%patch10 -p1
# Provide an example of usage of the tapset:
cp -a %{SOURCE3} .
@ -690,25 +695,24 @@ sed -i 's/^/%lang(ja) /' .ruby-doc.ja
%check
%if 0%{?with_hardening_test}
# Temporary change the hardening check on PPC64LE as long as the checksec is
# is providing incorrect output.
# https://bugzilla.redhat.com/show_bug.cgi?id=1479302
%ifnarch ppc64le
# Check Ruby hardening.
checksec -f libruby.so.%{ruby_version} | \
grep "Full RELRO.*Canary found.*NX enabled.*DSO.*No RPATH.*No RUNPATH.*Yes.*\d*.*\d*.*libruby.so.%{ruby_version}"
%else
checksec -f libruby.so.%{ruby_version} | \
grep "Full RELRO.*Canary found.*NX enabled.*DSO.*No RPATH.*No RUNPATH.*No.*\d*.*\d*.*libruby.so.%{ruby_version}"
%endif
%endif
# Check RubyGems version correctness.
# Check RubyGems version.
[ "`make runruby TESTRUN_SCRIPT='bin/gem -v' | tail -1`" == '%{rubygems_version}' ]
# Check Molinillo version correctness.
[ "`make runruby TESTRUN_SCRIPT=\"-e \\\"module Gem; module Resolver; end; end; require 'rubygems/resolver/molinillo/lib/molinillo/gem_metadata'; puts Gem::Resolver::Molinillo::VERSION\\\"\" | tail -1`" \
# Check Rubygems bundled dependencies versions.
# Molinillo.
[ "`make runruby TESTRUN_SCRIPT=\"-e \\\" \
module Gem; module Resolver; end; end; \
require 'rubygems/resolver/molinillo/lib/molinillo/gem_metadata'; \
puts Gem::Resolver::Molinillo::VERSION\\\"\" | tail -1`" \
== '%{molinillo_version}' ]
# 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).
@ -727,6 +731,11 @@ DISABLE_TESTS=""
# Once seen: http://koji.fedoraproject.org/koji/taskinfo?taskID=12556650
DISABLE_TESTS="$DISABLE_TESTS -x test_fork.rb"
# Disable failing TestResolvMDNS#test_mdns_each_address test,
# which fails on Koji.
# https://bugs.ruby-lang.org/issues/14175
sed -i '/def test_mdns_each_address$/,/^ end$/ s/^/#/' test/resolv/test_mdns.rb
make check TESTS="-v $DISABLE_TESTS"
%post libs -p /sbin/ldconfig
@ -789,7 +798,6 @@ make check TESTS="-v $DISABLE_TESTS"
%{ruby_libdir}/net
%{ruby_libdir}/optparse
%{ruby_libdir}/racc
%{ruby_libdir}/rbconfig
%{ruby_libdir}/rexml
%{ruby_libdir}/rinda
%{ruby_libdir}/ripper
@ -886,9 +894,6 @@ make check TESTS="-v $DISABLE_TESTS"
%dir %{ruby_libarchdir}/io
%{ruby_libarchdir}/io/nonblock.so
%{ruby_libarchdir}/io/wait.so
%dir %{ruby_libarchdir}/mathn
%{ruby_libarchdir}/mathn/complex.so
%{ruby_libarchdir}/mathn/rational.so
%{ruby_libarchdir}/nkf.so
%{ruby_libarchdir}/objspace.so
%{ruby_libarchdir}/pathname.so
@ -912,10 +917,8 @@ make check TESTS="-v $DISABLE_TESTS"
%files -n rubygems
%{_bindir}/gem
%dir %{rubygems_dir}
%{rubygems_dir}/rbconfig
%{rubygems_dir}/rubygems
%{rubygems_dir}/rubygems.rb
%{rubygems_dir}/ubygems.rb
# Explicitly include only RubyGems directory strucure to avoid accidentally
# packaged content.
@ -932,6 +935,24 @@ make check TESTS="-v $DISABLE_TESTS"
%exclude %{gem_dir}/cache/*
# TODO: Gemify these libraries
%{gem_dir}/specifications/default/cmath-1.0.0.gemspec
%{gem_dir}/specifications/default/csv-1.0.0.gemspec
%{gem_dir}/specifications/default/date-1.0.0.gemspec
%{gem_dir}/specifications/default/dbm-1.0.0.gemspec
%{gem_dir}/specifications/default/etc-1.0.0.gemspec
%{gem_dir}/specifications/default/fcntl-1.0.0.gemspec
%{gem_dir}/specifications/default/fiddle-1.0.0.gemspec
%{gem_dir}/specifications/default/fileutils-1.0.2.gemspec
%{gem_dir}/specifications/default/gdbm-2.0.0.gemspec
%{gem_dir}/specifications/default/ipaddr-1.2.0.gemspec
%{gem_dir}/specifications/default/scanf-1.0.0.gemspec
%{gem_dir}/specifications/default/sdbm-1.0.0.gemspec
%{gem_dir}/specifications/default/stringio-0.0.1.gemspec
%{gem_dir}/specifications/default/strscan-1.0.0.gemspec
%{gem_dir}/specifications/default/webrick-1.4.2.gemspec
%{gem_dir}/specifications/default/zlib-1.0.0.gemspec
%files -n rubygems-devel
%{_rpmconfigdir}/macros.d/macros.rubygems
%{_rpmconfigdir}/fileattrs/rubygems.attr
@ -1027,14 +1048,19 @@ make check TESTS="-v $DISABLE_TESTS"
%files -n rubygem-xmlrpc
%license %{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/LICENSE.txt
%dir %{gem_dir}/gems/xmlrpc-%{xmlrpc_version}
%exclude %{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/.*
%{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/Gemfile
%{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/Rakefile
%doc %{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/README.md
%{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/bin
%{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/lib
%{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/xmlrpc.gemspec
%{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec
%changelog
* Tue Jan 02 2018 Vít Ondruch <vondruch@redhat.com> - 2.5.0-1
- Upgrade to Ruby 2.5.0.
* Fri Oct 27 2017 Jun Aruga <jaruga@redhat.com> - 2.4.2-86
- Add macro to remove rubypick dependency.
- Improve "with" conditional statement as inline.

View File

@ -1 +1 @@
SHA512 (ruby-2.4.2.tar.xz) = c1d42272fb0d94b693452e703b0ea4942bf59cbd4b08ba83bf039f54be97ebc88511632413da0164970b4cf97bc302bccb88aab48edfa8fa147498e7ee741595
SHA512 (ruby-2.5.0.tar.xz) = 55714a33d7661fe8b432f73c34fd67b49699f8b79df1cbd680a74899124d31111ab0f444677672aac1ba725820182940d485efb2db0bf2bc96737c5d40c54578