Upgrade to Ruby 2.4.0.
This commit is contained in:
parent
f148354cb2
commit
7bb9e86d8d
2
config.h
2
config.h
@ -52,6 +52,8 @@
|
||||
#include "ruby/config-mipsel.h"
|
||||
#elif defined(__mips)
|
||||
#include "ruby/config-mips.h"
|
||||
#elif defined(__riscv64)
|
||||
#include "ruby/config-riscv64.h"
|
||||
#else
|
||||
#error "The ruby-devel package is not usable with the architecture."
|
||||
#endif
|
||||
|
112
macros.rubygems
112
macros.rubygems
@ -3,16 +3,21 @@
|
||||
%gem_archdir %{_libdir}/gems
|
||||
|
||||
# Common gem locations and files.
|
||||
%gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}
|
||||
%gem_extdir_mri %{gem_archdir}/ruby/%{gem_name}-%{version}
|
||||
%gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}%{?prerelease}
|
||||
%gem_extdir_mri %{gem_archdir}/ruby/%{gem_name}-%{version}%{?prerelease}
|
||||
%gem_libdir %{gem_instdir}/lib
|
||||
%gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem
|
||||
%gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec
|
||||
%gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}
|
||||
%gem_cache %{gem_dir}/cache/%{gem_name}-%{version}%{?prerelease}.gem
|
||||
%gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}%{?prerelease}.gemspec
|
||||
%gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}%{?prerelease}
|
||||
|
||||
# Install gem into appropriate directory.
|
||||
# -n<gem_file> Overrides gem file name for installation.
|
||||
# -d<install_dir> Set installation directory.
|
||||
|
||||
# %gem_install - Install gem into appropriate directory.
|
||||
#
|
||||
# Usage: %gem_install [options]
|
||||
#
|
||||
# -n <gem_file> Overrides gem file name for installation.
|
||||
# -d <install_dir> Set installation directory.
|
||||
#
|
||||
%gem_install(d:n:) \
|
||||
mkdir -p %{-d*}%{!?-d:.%{gem_dir}} \
|
||||
\
|
||||
@ -23,9 +28,10 @@ gem install \\\
|
||||
--build-root %{-d*}%{!?-d:.} \\\
|
||||
--force \\\
|
||||
--document=ri,rdoc \\\
|
||||
%{-n*}%{!?-n:%{gem_name}-%{version}.gem} \
|
||||
%{-n*}%{!?-n:%{gem_name}-%{version}%{?prerelease}.gem} \
|
||||
%{nil}
|
||||
|
||||
|
||||
# For rubygems packages we want to filter out any provides caused by private
|
||||
# libs in %%{gem_archdir}.
|
||||
#
|
||||
@ -34,3 +40,91 @@ 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.
|
||||
|
||||
|
||||
# %gemspec_add_dep - Add dependency into .gemspec.
|
||||
#
|
||||
# Usage: %gemspec_add_dep -g <gem> [options] [requirements]
|
||||
#
|
||||
# Add dependency named <gem> 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 <gemspec_file> Overrides the default .gemspec location.
|
||||
# -d Add development dependecy.
|
||||
#
|
||||
%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}
|
||||
|
||||
|
||||
# %gemspec_remove_dep - Remove dependency from .gemspec.
|
||||
#
|
||||
# Usage: %gemspec_remove_dep -g <gem> [options] [requirements]
|
||||
#
|
||||
# Remove dependency named <gem> 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 <gemspec_file> Overrides the default .gemspec location.
|
||||
# -d Remove development dependecy.
|
||||
#
|
||||
%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}
|
||||
|
@ -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
|
||||
@@ -1892,7 +1892,7 @@ def configuration(srcdir)
|
||||
@@ -1897,7 +1897,7 @@ def configuration(srcdir)
|
||||
SHELL = /bin/sh
|
||||
|
||||
# V=0 quiet, V=1 verbose. other values don't work.
|
||||
@ -19,7 +19,7 @@ index 682eb46..e6b1445 100644
|
||||
+V = 1
|
||||
Q1 = $(V:1=)
|
||||
Q = $(Q1:0=@)
|
||||
ECHO1 = $(V:1=@#{CONFIG['NULLCMD']})
|
||||
ECHO1 = $(V:1=@ #{CONFIG['NULLCMD']})
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
|
@ -26,7 +26,7 @@ diff --git a/common.mk b/common.mk
|
||||
index 5cfbc3d..3f0a82e 100644
|
||||
--- a/common.mk
|
||||
+++ b/common.mk
|
||||
@@ -127,7 +127,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS)
|
||||
@@ -144,7 +144,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
|
||||
@@ -4374,6 +4374,13 @@ AC_SUBST(rubyarchhdrdir)dnl
|
||||
@@ -4536,6 +4536,13 @@ AC_SUBST(rubyarchhdrdir)dnl
|
||||
AC_SUBST(sitearchhdrdir)dnl
|
||||
AC_SUBST(vendorarchhdrdir)dnl
|
||||
|
||||
|
@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in
|
||||
index 37d9a62..553d4d0 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -3632,6 +3632,11 @@ if test ${multiarch+set}; then
|
||||
@@ -3790,6 +3790,11 @@ if test ${multiarch+set}; then
|
||||
fi
|
||||
|
||||
archlibdir='${libdir}/${arch}'
|
||||
|
@ -14,7 +14,7 @@ diff --git a/configure.in b/configure.in
|
||||
index db37cd6..ce8d149 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -4228,7 +4228,8 @@ AS_CASE(["$ruby_version_dir_name"],
|
||||
@@ -4390,7 +4390,8 @@ AS_CASE(["$ruby_version_dir_name"],
|
||||
ruby_version_dir=/'${ruby_version_dir_name}'
|
||||
|
||||
if test -z "${ruby_version_dir_name}"; then
|
||||
@ -67,7 +67,7 @@ diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
|
||||
index 07076d4..35e6c3c 100755
|
||||
--- a/tool/mkconfig.rb
|
||||
+++ b/tool/mkconfig.rb
|
||||
@@ -122,7 +122,7 @@ def config.write(arg)
|
||||
@@ -113,7 +113,7 @@
|
||||
val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump
|
||||
case name
|
||||
when /^prefix$/
|
||||
|
@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in
|
||||
index 553d4d0..03a4152 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -4292,6 +4292,8 @@ AC_SUBST(vendorarchdir)dnl
|
||||
@@ -4454,6 +4454,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
|
||||
|
||||
|
@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in
|
||||
index 03a4152..0e371e2 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -4264,6 +4264,10 @@ AC_ARG_WITH(vendorarchdir,
|
||||
@@ -4426,6 +4426,10 @@ AC_ARG_WITH(vendorarchdir,
|
||||
[vendorarchdir=$withval],
|
||||
[vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${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=''
|
||||
@@ -4288,6 +4292,7 @@ AC_SUBST(sitearchdir)dnl
|
||||
@@ -4450,6 +4454,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
|
||||
@@ -328,6 +328,7 @@ def CONFIG.[](name, mandatory = false)
|
||||
@@ -330,6 +330,7 @@ def CONFIG.[](name, mandatory = false)
|
||||
sitearchlibdir = CONFIG["sitearchdir"]
|
||||
vendorlibdir = CONFIG["vendorlibdir"]
|
||||
vendorarchlibdir = CONFIG["vendorarchdir"]
|
||||
@ -75,7 +75,7 @@ index b47b6e1..0b99408 100755
|
||||
mandir = CONFIG["mandir", true]
|
||||
docdir = CONFIG["docdir", true]
|
||||
configure_args = Shellwords.shellwords(CONFIG["configure_args"])
|
||||
@@ -506,7 +507,15 @@ def CONFIG.[](name, mandatory = false)
|
||||
@@ -517,7 +518,15 @@ def CONFIG.[](name, mandatory = false)
|
||||
install?(:local, :comm, :lib) do
|
||||
prepare "library scripts", rubylibdir
|
||||
noinst = %w[README* *.txt *.rdoc *.gemspec]
|
||||
|
@ -11,12 +11,12 @@ diff --git a/common.mk b/common.mk
|
||||
index 168dc52..20c218a 100644
|
||||
--- a/common.mk
|
||||
+++ b/common.mk
|
||||
@@ -839,9 +839,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE)
|
||||
@@ -873,9 +873,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE)
|
||||
$(srcdir)/template/prelude.c.tmpl
|
||||
|
||||
$(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)
|
||||
- $(PRELUDE_SCRIPTS)
|
||||
+ $(PRELUDE_SCRIPTS) $(PREP)
|
||||
$(ECHO) generating $@
|
||||
- $(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \
|
||||
+ $(Q) $(MINIRUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 9806021813c9dde4747b0bd6f0ed24bdeede0a4a Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Valena <pvalena@redhat.com>
|
||||
Date: Fri, 15 Jul 2016 13:52:31 +0200
|
||||
Subject: [PATCH] Disable colorized ./configure
|
||||
|
||||
Missing macro AS_FUNCTION_DESCRIBE in Autoconf
|
||||
---
|
||||
Makefile.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 76b61f5..2432884 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -309,7 +309,7 @@ reconfig config.status: $(srcdir)/$(CONFIGURE) $(srcdir)/enc/Makefile.in \
|
||||
@PWD= MINIRUBY="$(MINIRUBY)"; export MINIRUBY; \
|
||||
set $(SHELL) $($@-args); $(reconfig-exec-$(V))
|
||||
|
||||
-$(srcdir)/$(CONFIGURE): $(srcdir)/configure.in $(srcdir)/aclocal.m4
|
||||
+$(srcdir)/$(CONFIGURE): $(srcdir)/configure.in
|
||||
$(CHDIR) $(srcdir) && exec $(AUTOCONF) -o $(@F)
|
||||
|
||||
incs: id.h
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -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 | 68 ++++++++++++++++++++++++++++-------------------------
|
||||
configure.in | 64 ++++++++++++++++++++++++++++-------------------------
|
||||
template/ruby.pc.in | 1 +
|
||||
2 files changed, 37 insertions(+), 32 deletions(-)
|
||||
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
|
||||
@@ -4177,9 +4177,6 @@ AS_CASE(["$target_os"],
|
||||
@@ -4341,9 +4341,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],
|
||||
@@ -4202,58 +4199,64 @@ AC_ARG_WITH(ridir,
|
||||
@@ -4366,56 +4363,62 @@ AC_ARG_WITH(ridir,
|
||||
AC_SUBST(ridir)
|
||||
AC_SUBST(RI_BASE_NAME)
|
||||
|
||||
@ -48,11 +48,9 @@ index db37cd6..6e73fae 100644
|
||||
- echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE"
|
||||
- echo '#define STRINGIZE(x) x'
|
||||
- test -f revision.h -o -f "${srcdir}/revision.h" || echo '#define RUBY_REVISION 0'
|
||||
- echo '#include "verconf.h"'
|
||||
- echo '#include "version.h"'
|
||||
- echo 'ruby_version=RUBY_LIB_VERSION'
|
||||
- } > conftest.c
|
||||
- test -f verconf.h || > verconf.h
|
||||
- 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
|
||||
@ -65,11 +63,9 @@ index db37cd6..6e73fae 100644
|
||||
+echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE"
|
||||
+echo '#define STRINGIZE(x) x'
|
||||
+test -f revision.h -o -f "${srcdir}/revision.h" || echo '#define RUBY_REVISION 0'
|
||||
+echo '#include "verconf.h"'
|
||||
+echo '#include "version.h"'
|
||||
+echo 'ruby_version=RUBY_LIB_VERSION'
|
||||
+} > conftest.c
|
||||
+test -f verconf.h || > verconf.h
|
||||
+ruby_version="`$CPP -I. -I"${srcdir}" -I"${srcdir}/include" conftest.c | sed '/^ruby_version=/!d;s/ //g'`"
|
||||
+eval $ruby_version
|
||||
+
|
||||
@ -124,7 +120,7 @@ index db37cd6..6e73fae 100644
|
||||
|
||||
if test "${LOAD_RELATIVE+set}"; then
|
||||
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
|
||||
@@ -4270,6 +4273,7 @@ AC_SUBST(sitearchincludedir)dnl
|
||||
@@ -4432,6 +4435,7 @@ AC_SUBST(sitearchincludedir)dnl
|
||||
AC_SUBST(arch)dnl
|
||||
AC_SUBST(sitearch)dnl
|
||||
AC_SUBST(ruby_version)dnl
|
||||
@ -175,7 +171,7 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
|
||||
index d4c110e..d39c9a6 100755
|
||||
--- a/tool/rbinstall.rb
|
||||
+++ b/tool/rbinstall.rb
|
||||
@@ -406,7 +406,7 @@ def CONFIG.[](name, mandatory = false)
|
||||
@@ -417,7 +417,7 @@ def CONFIG.[](name, mandatory = false)
|
||||
|
||||
install?(:doc, :rdoc) do
|
||||
if $rdocdir
|
||||
@ -244,12 +240,12 @@ index 55ca080..75eea2b 100644
|
||||
+ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']
|
||||
end
|
||||
|
||||
end
|
||||
##
|
||||
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
|
||||
@@ -963,7 +963,8 @@ def test_self_use_paths
|
||||
@@ -1101,7 +1101,8 @@ def test_self_use_paths
|
||||
|
||||
def test_self_user_dir
|
||||
parts = [@userhome, '.gem', Gem.ruby_engine]
|
||||
@ -259,7 +255,7 @@ index 0428bea..b6e090e 100644
|
||||
|
||||
assert_equal File.join(parts), Gem.user_dir
|
||||
end
|
||||
@@ -1090,7 +1091,7 @@ def test_self_user_home_user_drive_and_path
|
||||
@@ -1228,7 +1229,7 @@ def test_self_user_home_user_drive_and_path
|
||||
def test_self_vendor_dir
|
||||
expected =
|
||||
File.join RbConfig::CONFIG['vendordir'], 'gems',
|
||||
@ -286,7 +282,7 @@ diff --git a/configure.in b/configure.in
|
||||
index 6e73fae..c842725 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -275,7 +275,7 @@ RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"`
|
||||
@@ -271,7 +271,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)
|
||||
|
119
ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch
Normal file
119
ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch
Normal file
@ -0,0 +1,119 @@
|
||||
From 346e147ba6480839b87046e9a9efab0bf6ed3660 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
|
||||
Date: Wed, 10 Aug 2016 17:35:48 +0200
|
||||
Subject: [PATCH] Rely on ldd to detect glibc.
|
||||
|
||||
This is just workaround, since we know we are quite sure this will be successful
|
||||
on Red Hat platforms.
|
||||
|
||||
This workaround rhbz#1361037
|
||||
---
|
||||
test/fiddle/helper.rb | 92 ---------------------------------------------------
|
||||
1 file changed, 92 deletions(-)
|
||||
|
||||
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 @@
|
||||
|
||||
libc_so = libm_so = nil
|
||||
|
||||
-case RUBY_PLATFORM
|
||||
-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
|
||||
- when 4
|
||||
- # 32-bit ruby
|
||||
- libdir = '/lib32' if File.directory? '/lib32'
|
||||
- when 8
|
||||
- # 64-bit ruby
|
||||
- libdir = '/lib64' if File.directory? '/lib64'
|
||||
- end
|
||||
- libc_so = File.join(libdir, "libc.so.6")
|
||||
- libm_so = File.join(libdir, "libm.so.6")
|
||||
-when /mingw/, /mswin/
|
||||
- require "rbconfig"
|
||||
- crtname = RbConfig::CONFIG["RUBY_SO_NAME"][/msvc\w+/] || 'ucrtbase'
|
||||
- libc_so = libm_so = "#{crtname}.dll"
|
||||
-when /darwin/
|
||||
- libc_so = "/usr/lib/libc.dylib"
|
||||
- libm_so = "/usr/lib/libm.dylib"
|
||||
-when /kfreebsd/
|
||||
- libc_so = "/lib/libc.so.0.1"
|
||||
- libm_so = "/lib/libm.so.1"
|
||||
-when /gnu/ #GNU/Hurd
|
||||
- libc_so = "/lib/libc.so.0.3"
|
||||
- libm_so = "/lib/libm.so.6"
|
||||
-when /mirbsd/
|
||||
- libc_so = "/usr/lib/libc.so.41.10"
|
||||
- libm_so = "/usr/lib/libm.so.7.0"
|
||||
-when /freebsd/
|
||||
- libc_so = "/lib/libc.so.7"
|
||||
- libm_so = "/lib/libm.so.5"
|
||||
-when /bsd|dragonfly/
|
||||
- libc_so = "/usr/lib/libc.so"
|
||||
- libm_so = "/usr/lib/libm.so"
|
||||
-when /solaris/
|
||||
- libdir = '/lib'
|
||||
- case [0].pack('L!').size
|
||||
- when 4
|
||||
- # 32-bit ruby
|
||||
- libdir = '/lib' if File.directory? '/lib'
|
||||
- when 8
|
||||
- # 64-bit ruby
|
||||
- libdir = '/lib/64' if File.directory? '/lib/64'
|
||||
- end
|
||||
- libc_so = File.join(libdir, "libc.so")
|
||||
- libm_so = File.join(libdir, "libm.so")
|
||||
-when /aix/
|
||||
- pwd=Dir.pwd
|
||||
- libc_so = libm_so = "#{pwd}/libaixdltest.so"
|
||||
- unless File.exist? libc_so
|
||||
- cobjs=%w!strcpy.o!
|
||||
- mobjs=%w!floats.o sin.o!
|
||||
- funcs=%w!sin sinf strcpy strncpy!
|
||||
- expfile='dltest.exp'
|
||||
- require 'tmpdir'
|
||||
- Dir.mktmpdir do |dir|
|
||||
- begin
|
||||
- Dir.chdir dir
|
||||
- %x!/usr/bin/ar x /usr/lib/libc.a #{cobjs.join(' ')}!
|
||||
- %x!/usr/bin/ar x /usr/lib/libm.a #{mobjs.join(' ')}!
|
||||
- %x!echo "#{funcs.join("\n")}\n" > #{expfile}!
|
||||
- require 'rbconfig'
|
||||
- if RbConfig::CONFIG["GCC"] = 'yes'
|
||||
- lflag='-Wl,'
|
||||
- else
|
||||
- lflag=''
|
||||
- end
|
||||
- flags="#{lflag}-bE:#{expfile} #{lflag}-bnoentry -lm"
|
||||
- %x!#{RbConfig::CONFIG["LDSHARED"]} -o #{libc_so} #{(cobjs+mobjs).join(' ')} #{flags}!
|
||||
- ensure
|
||||
- Dir.chdir pwd
|
||||
- end
|
||||
- end
|
||||
- end
|
||||
-else
|
||||
- libc_so = ARGV[0] if ARGV[0] && ARGV[0][0] == ?/
|
||||
- libm_so = ARGV[1] if ARGV[1] && ARGV[1][0] == ?/
|
||||
- if( !(libc_so && libm_so) )
|
||||
- $stderr.puts("libc and libm not found: #{$0} <libc> <libm>")
|
||||
- end
|
||||
-end
|
||||
-
|
||||
-libc_so = nil if !libc_so || (libc_so[0] == ?/ && !File.file?(libc_so))
|
||||
-libm_so = nil if !libm_so || (libm_so[0] == ?/ && !File.file?(libm_so))
|
||||
-
|
||||
if !libc_so || !libm_so
|
||||
ruby = EnvUtil.rubybin
|
||||
ldd = `ldd #{ruby}`
|
||||
--
|
||||
2.9.2
|
||||
|
@ -1,71 +0,0 @@
|
||||
From 423d042371d0402071c309dc403ea2701600a98b Mon Sep 17 00:00:00 2001
|
||||
From: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
|
||||
Date: Sat, 13 Feb 2016 08:12:21 +0000
|
||||
Subject: [PATCH] no_proxy with whitespaces and leading dots
|
||||
|
||||
* lib/uri/generic.rb (find_proxy): exclude white-spaces and allow
|
||||
for a leading dot in the domain name in no_proxy.
|
||||
[ruby-core:54542] [Feature #8317]
|
||||
|
||||
The previous implementation wouldn't allow for white-spaces nor a leading dot
|
||||
in the domain name. The latter is described in the wget documentation as a valid case.
|
||||
|
||||
By being more strict on the characters, which are counted to a domainname,
|
||||
we allow for white-spaces.
|
||||
Also, a possible leading dot will be handled gracefully.
|
||||
|
||||
[Fix GH-285]
|
||||
|
||||
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
||||
---
|
||||
ChangeLog | 6 ++++++
|
||||
lib/uri/generic.rb | 2 +-
|
||||
test/uri/test_generic.rb | 4 ++++
|
||||
3 files changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ChangeLog b/ChangeLog
|
||||
index 2945679..44116e0 100644
|
||||
--- a/ChangeLog
|
||||
+++ b/ChangeLog
|
||||
@@ -1,3 +1,9 @@
|
||||
+Sat Feb 13 17:11:58 2016 Fabian Wiesel <fabian.wiesel@sap.com>
|
||||
+
|
||||
+ * lib/uri/generic.rb (find_proxy): exclude white-spaces and allow
|
||||
+ for a leading dot in the domain name in no_proxy.
|
||||
+ [ruby-core:54542] [Feature #8317]
|
||||
+
|
||||
Tue Apr 26 02:58:51 2016 Marcus Stollsteimer <sto.mar@web.de>
|
||||
|
||||
* doc/extension.rdoc: Improvements to english grammers.
|
||||
diff --git a/lib/uri/generic.rb b/lib/uri/generic.rb
|
||||
index aba54c1..f2a2d56 100644
|
||||
--- a/lib/uri/generic.rb
|
||||
+++ b/lib/uri/generic.rb
|
||||
@@ -1546,7 +1546,7 @@ def find_proxy
|
||||
|
||||
name = 'no_proxy'
|
||||
if no_proxy = ENV[name] || ENV[name.upcase]
|
||||
- no_proxy.scan(/([^:,]*)(?::(\d+))?/) {|host, port|
|
||||
+ no_proxy.scan(/(?!\.)([^:,\s]+)(?::(\d+))?/) {|host, port|
|
||||
if /(\A|\.)#{Regexp.quote host}\z/i =~ self.host &&
|
||||
(!port || self.port == port.to_i)
|
||||
return nil
|
||||
diff --git a/test/uri/test_generic.rb b/test/uri/test_generic.rb
|
||||
index fcfe1f9..ad189fc 100644
|
||||
--- a/test/uri/test_generic.rb
|
||||
+++ b/test/uri/test_generic.rb
|
||||
@@ -819,6 +819,14 @@ def test_find_proxy
|
||||
assert_equal(URI('http://127.0.0.1:8080'), URI("http://192.0.2.1/").find_proxy)
|
||||
assert_nil(URI("http://192.0.2.2/").find_proxy)
|
||||
}
|
||||
+ with_env('http_proxy'=>'http://127.0.0.1:8080', 'no_proxy'=>'example.org') {
|
||||
+ assert_nil(URI("http://example.org/").find_proxy)
|
||||
+ assert_nil(URI("http://www.example.org/").find_proxy)
|
||||
+ }
|
||||
+ with_env('http_proxy'=>'http://127.0.0.1:8080', 'no_proxy'=>'.example.org') {
|
||||
+ assert_nil(URI("http://example.org/").find_proxy)
|
||||
+ assert_nil(URI("http://www.example.org/").find_proxy)
|
||||
+ }
|
||||
with_env('http_proxy'=>'') {
|
||||
assert_nil(URI("http://192.0.2.1/").find_proxy)
|
||||
assert_nil(URI("ftp://192.0.2.1/").find_proxy)
|
269
ruby.spec
269
ruby.spec
@ -2,18 +2,18 @@
|
||||
%{?scl:%scl_package ruby}
|
||||
|
||||
%global major_version 2
|
||||
%global minor_version 3
|
||||
%global teeny_version 1
|
||||
%global minor_version 4
|
||||
%global teeny_version 0
|
||||
%global major_minor_version %{major_version}.%{minor_version}
|
||||
|
||||
%global ruby_version %{major_minor_version}.%{teeny_version}
|
||||
%global ruby_release %{ruby_version}
|
||||
|
||||
# Specify the named version. It has precedense to revision.
|
||||
#%%global milestone preview2
|
||||
#%%global milestone rc1
|
||||
|
||||
# Keep the revision enabled for pre-releases from SVN.
|
||||
#%%global revision 53264
|
||||
#%%global revision 57159
|
||||
|
||||
%global ruby_archive %{pkg_name}-%{ruby_version}
|
||||
|
||||
@ -23,7 +23,8 @@
|
||||
%global ruby_archive %{ruby_archive}-%{?milestone}%{?!milestone:%{?revision:r%{revision}}}
|
||||
%endif
|
||||
|
||||
%global release 64
|
||||
|
||||
%global release 70
|
||||
%{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}}
|
||||
|
||||
# The RubyGems library has to stay out of Ruby directory three, since the
|
||||
@ -31,24 +32,26 @@
|
||||
%global rubygems_dir %{_datadir}/rubygems
|
||||
|
||||
# Bundled libraries versions
|
||||
%global rubygems_version 2.5.1
|
||||
%global molinillo_version 0.4.0
|
||||
%global rubygems_version 2.6.8
|
||||
%global molinillo_version 0.5.3
|
||||
|
||||
# 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.2.8
|
||||
%global did_you_mean_version 1.0.0
|
||||
%global io_console_version 0.4.5
|
||||
%global json_version 1.8.3
|
||||
%global minitest_version 5.8.3
|
||||
%global power_assert_version 0.2.6
|
||||
%global psych_version 2.0.17
|
||||
%global rake_version 10.4.2
|
||||
%global rdoc_version 4.2.1
|
||||
%global bigdecimal_version 1.3.0
|
||||
%global did_you_mean_version 1.1.0
|
||||
%global io_console_version 0.4.6
|
||||
%global json_version 2.0.2
|
||||
%global minitest_version 5.10.1
|
||||
%global net_telnet_version 0.1.1
|
||||
%global test_unit_version 3.1.5
|
||||
%global openssl_version 2.0.2
|
||||
%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
|
||||
|
||||
# Might not be needed in the future, if we are lucky enough.
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=888262
|
||||
@ -58,6 +61,14 @@
|
||||
|
||||
%global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/')
|
||||
|
||||
%if 0%{?fedora} >= 19
|
||||
%global with_rubypick 1
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora}
|
||||
%global with_checksec 1
|
||||
%endif
|
||||
|
||||
Summary: An interpreter of object-oriented scripting language
|
||||
Name: %{?scl_prefix}ruby
|
||||
Version: %{ruby_version}
|
||||
@ -121,13 +132,10 @@ 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
|
||||
# Disable colorized ./configure due to missing macro AS_FUNCTION_DESCRIBE in Autoconf
|
||||
# http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/m4sugar/m4sh.m4?id=d99fef0e1e8e7a4c04b97fc4c6e0ffb01463622c
|
||||
Patch9: ruby-2.3.0-Disable-colorized-configure.patch
|
||||
# Support in no_proxy for domain names with whitespaces and leading dots
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1384810
|
||||
# https://github.com/ruby/ruby/commit/423d042371d0402071c309dc403ea2701600a98b
|
||||
Patch10: ruby-2.4.0-no_proxy-with-whitespaces-and-leading-dots.patch
|
||||
# Workaround "an invalid stdio handle" error on PPC, due to recently introduced
|
||||
# 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
|
||||
|
||||
Requires: %{?scl_prefix}%{pkg_name}-libs%{?_isa} = %{version}-%{release}
|
||||
Requires: %{?scl_prefix}ruby(rubygems) >= %{rubygems_version}
|
||||
@ -137,6 +145,7 @@ Requires: %{?scl_prefix}ruby(rubygems) >= %{rubygems_version}
|
||||
# and http://bugs.ruby-lang.org/issues/6123
|
||||
Requires: %{?scl_prefix}rubygem(bigdecimal) >= %{bigdecimal_version}
|
||||
Requires: %{?scl_prefix}rubygem(did_you_mean) >= %{did_you_mean_version}
|
||||
Requires: %{?scl_prefix}rubygem(openssl) >= %{openssl_version}
|
||||
%{?scl:BuildRequires: %{scl}-runtime}
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: gdbm-devel
|
||||
@ -144,20 +153,19 @@ BuildRequires: libffi-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: libyaml-devel
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: tk-devel
|
||||
# Needed to pass test_set_program_name(TestRubyOptions)
|
||||
BuildRequires: procps
|
||||
BuildRequires: %{?_root_bindir}%{!?_root_bindir:%{_bindir}}/dtrace
|
||||
# RubyGems test suite optional dependencies.
|
||||
BuildRequires: %{?_root_bindir}%{!?_root_bindir:%{_bindir}}/git
|
||||
BuildRequires: %{?_root_bindir}%{!?_root_bindir:%{_bindir}}/cmake
|
||||
# Required to test hardening.
|
||||
%{?with_checksec:BuildRequires: %{?_root_bindir}%{!?_root_bindir:%{_bindir}}/checksec}
|
||||
|
||||
# This package provides %%{_bindir}/ruby-mri therefore it is marked by this
|
||||
# virtual provide. It can be installed as dependency of rubypick.
|
||||
Provides: ruby(runtime_executable) = %{ruby_release}
|
||||
|
||||
%global __provides_exclude_from ^(%{ruby_libarchdir}|%{gem_archdir})/.*\\.so$
|
||||
|
||||
%description
|
||||
Ruby is the interpreted scripting language for quick and easy
|
||||
object-oriented programming. It has many features to process text
|
||||
@ -193,7 +201,6 @@ This package includes the libruby, necessary to run Ruby.
|
||||
|
||||
|
||||
# TODO: Rename or not rename to ruby-rubygems?
|
||||
|
||||
%package -n %{?scl_prefix}rubygems
|
||||
Summary: The Ruby standard for packaging ruby libraries
|
||||
Version: %{rubygems_version}
|
||||
@ -201,9 +208,8 @@ Group: Development/Libraries
|
||||
License: Ruby or MIT
|
||||
Requires: %{?scl_prefix}ruby(release)
|
||||
Requires: %{?scl_prefix}rubygem(rdoc) >= %{rdoc_version}
|
||||
# TODO: This seems to be optional now.
|
||||
# https://github.com/rubygems/rubygems/commit/68da16dd7508c5c4010bfe32f99422568d3d582f
|
||||
Requires: %{?scl_prefix}rubygem(io-console) >= %{io_console_version}
|
||||
Requires: %{?scl_prefix}rubygem(openssl) >= %{openssl_version}
|
||||
Requires: %{?scl_prefix}rubygem(psych) >= %{psych_version}
|
||||
Provides: %{?scl_prefix}gem = %{version}-%{release}
|
||||
Provides: %{?scl_prefix}ruby(rubygems) = %{version}-%{release}
|
||||
@ -216,6 +222,7 @@ BuildArch: noarch
|
||||
RubyGems is the Ruby standard for publishing and managing third party
|
||||
libraries.
|
||||
|
||||
|
||||
%package -n %{?scl_prefix}rubygems-devel
|
||||
Summary: Macros and development tools for packaging RubyGems
|
||||
Version: %{rubygems_version}
|
||||
@ -230,6 +237,7 @@ BuildArch: noarch
|
||||
%description -n %{?scl_prefix}rubygems-devel
|
||||
Macros and development tools for packaging RubyGems.
|
||||
|
||||
|
||||
%package -n %{?scl_prefix}rubygem-rake
|
||||
Summary: Ruby based make-like utility
|
||||
Version: %{rake_version}
|
||||
@ -245,6 +253,7 @@ BuildArch: noarch
|
||||
Rake is a Make-like program implemented in Ruby. Tasks and dependencies are
|
||||
specified in standard Ruby syntax.
|
||||
|
||||
|
||||
%package irb
|
||||
Summary: The Interactive Ruby
|
||||
Version: %{irb_version}
|
||||
@ -258,6 +267,7 @@ BuildArch: noarch
|
||||
The irb is acronym for Interactive Ruby. It evaluates ruby expression
|
||||
from the terminal.
|
||||
|
||||
|
||||
%package -n %{?scl_prefix}rubygem-rdoc
|
||||
Summary: A tool to generate HTML and command-line documentation for Ruby projects
|
||||
Version: %{rdoc_version}
|
||||
@ -267,6 +277,8 @@ License: GPLv2 and Ruby and MIT and SIL
|
||||
Requires: %{?scl_prefix}ruby(release)
|
||||
Requires: %{?scl_prefix}ruby(rubygems) >= %{rubygems_version}
|
||||
Requires: %{?scl_prefix}ruby(irb) = %{irb_version}
|
||||
# Hardcode the dependency to keep it compatible with dependencies of the
|
||||
# official rubygem-rdoc gem.
|
||||
Requires: %{?scl_prefix}rubygem(json) >= %{json_version}
|
||||
Provides: %{?scl_prefix}rdoc = %{version}-%{release}
|
||||
Provides: %{?scl_prefix}ri = %{version}-%{release}
|
||||
@ -278,6 +290,7 @@ RDoc produces HTML and command-line documentation for Ruby projects. RDoc
|
||||
includes the 'rdoc' and 'ri' tools for generating and displaying online
|
||||
documentation.
|
||||
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for %{pkg_name}
|
||||
Group: Documentation
|
||||
@ -287,6 +300,7 @@ BuildArch: noarch
|
||||
%description doc
|
||||
This package contains documentation for %{pkg_name}.
|
||||
|
||||
|
||||
%package -n %{?scl_prefix}rubygem-bigdecimal
|
||||
Summary: BigDecimal provides arbitrary-precision floating point decimal arithmetic
|
||||
Version: %{bigdecimal_version}
|
||||
@ -308,6 +322,7 @@ because it provides the correct answers people expect–whereas normal binary
|
||||
floating point arithmetic often introduces subtle errors because of the
|
||||
conversion between base 10 and base 2.
|
||||
|
||||
|
||||
%package -n %{?scl_prefix}rubygem-did_you_mean
|
||||
Summary: "Did you mean?" experience in Ruby
|
||||
Version: %{did_you_mean_version}
|
||||
@ -321,6 +336,7 @@ Provides: %{?scl_prefix}rubygem(did_you_mean) = %{version}-%{release}
|
||||
"did you mean?" experience in Ruby: the error message will tell you the right
|
||||
one when you misspelled something.
|
||||
|
||||
|
||||
%package -n %{?scl_prefix}rubygem-io-console
|
||||
Summary: IO/Console is a simple console utilizing library
|
||||
Version: %{io_console_version}
|
||||
@ -333,6 +349,7 @@ Provides: %{?scl_prefix}rubygem(io-console) = %{version}-%{release}
|
||||
IO/Console provides very simple and portable access to console. It doesn't
|
||||
provide higher layer features, such like curses and readline.
|
||||
|
||||
|
||||
%package -n %{?scl_prefix}rubygem-json
|
||||
Summary: This is a JSON implementation as a Ruby extension in C
|
||||
Version: %{json_version}
|
||||
@ -349,6 +366,7 @@ You can think of it as a low fat alternative to XML, if you want to store
|
||||
data to disk or transmit it over a network rather than use a verbose
|
||||
markup language.
|
||||
|
||||
|
||||
%package -n %{?scl_prefix}rubygem-minitest
|
||||
Summary: Minitest provides a complete suite of testing facilities
|
||||
Version: %{minitest_version}
|
||||
@ -373,6 +391,21 @@ framework.
|
||||
minitest/pride shows pride in testing and adds coloring to your test
|
||||
output.
|
||||
|
||||
|
||||
%package -n %{?scl_prefix}rubygem-openssl
|
||||
Summary: OpenSSL provides SSL, TLS and general purpose cryptography
|
||||
Version: %{openssl_version}
|
||||
Group: Development/Libraries
|
||||
License: Ruby or BSD
|
||||
Requires: %{?scl_prefix}ruby(release)
|
||||
Requires: %{?scl_prefix}ruby(rubygems) >= %{rubygems_version}
|
||||
Provides: %{?scl_prefix}rubygem(openssl) = %{version}-%{release}
|
||||
|
||||
%description -n %{?scl_prefix}rubygem-openssl
|
||||
OpenSSL provides SSL, TLS and general purpose cryptography. It wraps the
|
||||
OpenSSL library.
|
||||
|
||||
|
||||
%package -n %{?scl_prefix}rubygem-power_assert
|
||||
Summary: Power Assert for Ruby
|
||||
Version: %{power_assert_version}
|
||||
@ -388,6 +421,7 @@ Power Assert shows each value of variables and method calls in the expression.
|
||||
It is useful for testing, providing which value wasn't correct when the
|
||||
condition is not satisfied.
|
||||
|
||||
|
||||
%package -n %{?scl_prefix}rubygem-psych
|
||||
Summary: A libyaml wrapper for Ruby
|
||||
Version: %{psych_version}
|
||||
@ -403,6 +437,7 @@ libyaml[http://pyyaml.org/wiki/LibYAML] for its YAML parsing and emitting
|
||||
capabilities. In addition to wrapping libyaml, Psych also knows how to
|
||||
serialize and de-serialize most Ruby objects to and from the YAML format.
|
||||
|
||||
|
||||
%package -n %{?scl_prefix}rubygem-net-telnet
|
||||
Summary: Provides telnet client functionality
|
||||
Version: %{net_telnet_version}
|
||||
@ -422,11 +457,8 @@ you do use sysread() directly when in telnet mode, you should probably pass
|
||||
the output through preprocess() to extract telnet command sequences.
|
||||
|
||||
|
||||
# The Summary/Description fields are rather poor.
|
||||
# https://github.com/test-unit/test-unit/issues/73
|
||||
|
||||
%package -n %{?scl_prefix}rubygem-test-unit
|
||||
Summary: Improved version of Test::Unit bundled in Ruby 1.8.x
|
||||
Summary: An xUnit family unit testing framework for Ruby
|
||||
Version: %{test_unit_version}
|
||||
Group: Development/Libraries
|
||||
# lib/test/unit/diff.rb is a double license of the Ruby license and PSF license.
|
||||
@ -439,18 +471,26 @@ Provides: %{?scl_prefix}rubygem(test-unit) = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{?scl_prefix}rubygem-test-unit
|
||||
Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit
|
||||
bundled in Ruby 1.8.x had not been improved but unbundled
|
||||
Test::Unit (test-unit) is improved actively.
|
||||
Test::Unit (test-unit) is unit testing framework for Ruby, based on xUnit
|
||||
principles. These were originally designed by Kent Beck, creator of extreme
|
||||
programming software development methodology, for Smalltalk's SUnit. It allows
|
||||
writing tests, checking results and automated testing in Ruby.
|
||||
|
||||
%package tcltk
|
||||
Summary: Tcl/Tk interface for scripting language Ruby
|
||||
Group: Development/Languages
|
||||
Requires: %{?scl_prefix}%{pkg_name}-libs%{?_isa} = %{ruby_version}
|
||||
Provides: %{?scl_prefix}ruby(tcltk) = %{ruby_version}-%{release}
|
||||
|
||||
%description tcltk
|
||||
Tcl/Tk interface for the object-oriented scripting language Ruby.
|
||||
%package -n %{?scl_prefix}rubygem-xmlrpc
|
||||
Summary: XMLRPC is a lightweight protocol that enables remote procedure calls over HTTP
|
||||
Version: %{xmlrpc_version}
|
||||
Group: Development/Libraries
|
||||
License: Ruby or BSD
|
||||
Requires: %{?scl_prefix}ruby(release)
|
||||
Requires: %{?scl_prefix}ruby(rubygems) >= %{rubygems_version}
|
||||
Provides: %{?scl_prefix}rubygem(xmlrpc) = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{?scl_prefix}rubygem-xmlrpc
|
||||
XMLRPC is a lightweight protocol that enables remote procedure calls over
|
||||
HTTP.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{ruby_archive}
|
||||
@ -468,11 +508,30 @@ rm -rf ext/fiddle/libffi*
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
|
||||
# Allow to use autoconf 2.63.
|
||||
sed -i '/AC_PREREQ/ s/(.*)/(2.62)/' configure.in
|
||||
|
||||
# AS_FOR is not supported on RHEL6, inject our own version.
|
||||
cat >> acinclude.m4 <<\EOF
|
||||
m4_ifndef([AS_FOR], [
|
||||
m4_define([AS_FOR], [
|
||||
m4_pushdef([$1], [$$2])
|
||||
for $2 in $3; do
|
||||
$4
|
||||
done
|
||||
m4_popdef([$1])
|
||||
])
|
||||
])
|
||||
EOF
|
||||
|
||||
# autoconf in RHEL6 does not support AS_FUNCTION_DESCRIBE, but it cannot be
|
||||
# dropped on RHEL7, since the AS_REQUIRE_SHELL_FN changed signatures :/
|
||||
%if 0%{?rhel} == 6
|
||||
sed -i '/AS_FUNCTION_DESCRIBE/ s/^/#/' configure.in
|
||||
sed -i '/AS_FUNCTION_DESCRIBE/ s/^/#/' acinclude.m4
|
||||
%endif
|
||||
|
||||
# Provide an example of usage of the tapset:
|
||||
cp -a %{SOURCE3} .
|
||||
|
||||
@ -481,9 +540,6 @@ cp -a %{SOURCE3} .
|
||||
# https://github.com/ruby/ruby/blob/trunk/tool/compile_prelude.rb#L26
|
||||
cp -a %{SOURCE6} .
|
||||
|
||||
# Disable colorized ./configure
|
||||
rm aclocal.m4
|
||||
|
||||
%build
|
||||
autoconf
|
||||
|
||||
@ -501,6 +557,7 @@ autoconf
|
||||
--with-vendorarchhdrdir='$(vendorhdrdir)/$(arch)' \
|
||||
--with-rubygemsdir='%{rubygems_dir}' \
|
||||
--with-ruby-pc='%{pkg_name}.pc' \
|
||||
--with-compress-debug-sections=no \
|
||||
--disable-rpath \
|
||||
--enable-shared \
|
||||
--with-ruby-version='' \
|
||||
@ -529,15 +586,15 @@ sed -i 's/Version: \${ruby_version}/Version: %{ruby_version}/' %{buildroot}%{_li
|
||||
|
||||
# Kill bundled certificates, as they should be part of ca-certificates.
|
||||
for cert in \
|
||||
Class3PublicPrimaryCertificationAuthority.pem \
|
||||
DigiCertHighAssuranceEVRootCA.pem \
|
||||
EntrustnetSecureServerCertificationAuthority.pem \
|
||||
GeoTrustGlobalCA.pem \
|
||||
AddTrustExternalCARoot.pem \
|
||||
AddTrustExternalCARoot-2048.pem
|
||||
rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem \
|
||||
rubygems.org/AddTrustExternalCARoot.pem \
|
||||
index.rubygems.org/GlobalSignRootCA.pem
|
||||
do
|
||||
rm %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert
|
||||
rm -r $(dirname %{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 %%{pkg_name} macro, since it
|
||||
# would be wrongly evaluated during build of other packages.
|
||||
@ -561,8 +618,7 @@ mv %{buildroot}%{ruby_libdir}/gems %{buildroot}%{gem_dir}
|
||||
mkdir -p %{buildroot}%{_exec_prefix}/lib{,64}/gems/%{pkg_name}
|
||||
|
||||
# Move bundled rubygems to %%gem_dir and %%gem_extdir_mri
|
||||
# make symlinks in ruby_stdlib for unbundled Gems, so that everything works as expected
|
||||
# bigdecimal and io-console are not enough for scl
|
||||
# make symlinks for io-console and bigdecimal, which are considered to be part of stdlib by other Gems
|
||||
mkdir -p %{buildroot}%{gem_dir}/gems/rdoc-%{rdoc_version}/lib
|
||||
mv %{buildroot}%{ruby_libdir}/rdoc* %{buildroot}%{gem_dir}/gems/rdoc-%{rdoc_version}/lib
|
||||
mv %{buildroot}%{gem_dir}/specifications/default/rdoc-%{rdoc_version}.gemspec %{buildroot}%{gem_dir}/specifications
|
||||
@ -594,6 +650,15 @@ ln -s %{gem_dir}/gems/json-%{json_version}/lib/json.rb %{buildroot}%{ruby_libdir
|
||||
ln -s %{gem_dir}/gems/json-%{json_version}/lib/json %{buildroot}%{ruby_libdir}/json
|
||||
ln -s %{_libdir}/gems/%{pkg_name}/json-%{json_version}/json/ %{buildroot}%{ruby_libarchdir}/json
|
||||
|
||||
mkdir -p %{buildroot}%{gem_dir}/gems/openssl-%{openssl_version}/lib
|
||||
mkdir -p %{buildroot}%{_libdir}/gems/%{pkg_name}/openssl-%{openssl_version}
|
||||
mv %{buildroot}%{ruby_libdir}/openssl* %{buildroot}%{gem_dir}/gems/openssl-%{openssl_version}/lib
|
||||
mv %{buildroot}%{ruby_libarchdir}/openssl.so %{buildroot}%{_libdir}/gems/%{pkg_name}/openssl-%{openssl_version}/
|
||||
mv %{buildroot}%{gem_dir}/specifications/default/openssl-%{openssl_version}.gemspec %{buildroot}%{gem_dir}/specifications
|
||||
ln -s %{gem_dir}/gems/openssl-%{openssl_version}/lib/openssl %{buildroot}%{ruby_libdir}/openssl
|
||||
ln -s %{gem_dir}/gems/openssl-%{openssl_version}/lib/openssl.rb %{buildroot}%{ruby_libdir}/openssl.rb
|
||||
ln -s %{_libdir}/gems/%{pkg_name}/openssl-%{openssl_version}/openssl.so %{buildroot}%{ruby_libarchdir}/openssl.so
|
||||
|
||||
mkdir -p %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib
|
||||
mkdir -p %{buildroot}%{_libdir}/gems/%{pkg_name}/psych-%{psych_version}
|
||||
mv %{buildroot}%{ruby_libdir}/psych* %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib
|
||||
@ -640,6 +705,12 @@ make test-all TESTS="%{basename:%{SOURCE14}}"
|
||||
rm -rf ./lib/rubygems/defaults ./%{basename:%{SOURCE14}}
|
||||
EOF}
|
||||
|
||||
%if 0%{?with_checksec}
|
||||
# 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}"
|
||||
%endif
|
||||
|
||||
# Check RubyGems version correctness.
|
||||
[ "`make runruby TESTRUN_SCRIPT='bin/gem -v' | tail -1`" == '%{rubygems_version}' ]
|
||||
# Check Molinillo version correctness.
|
||||
@ -670,26 +741,27 @@ make check TESTS="-v $DISABLE_TESTS"
|
||||
|
||||
%postun libs -p /sbin/ldconfig
|
||||
|
||||
# There is no %license macro on RHEL6.
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1386246
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
|
||||
%files
|
||||
%doc BSDL
|
||||
%doc COPYING
|
||||
%lang(ja) %doc COPYING.ja
|
||||
%doc GPL
|
||||
%doc LEGAL
|
||||
%license BSDL
|
||||
%license COPYING
|
||||
%lang(ja) %license COPYING.ja
|
||||
%license GPL
|
||||
%license LEGAL
|
||||
%{_bindir}/erb
|
||||
%{_bindir}/%{pkg_name}%{?with_rubypick:-mri}
|
||||
%{_mandir}/man1/erb*
|
||||
%{_mandir}/man1/ruby*
|
||||
|
||||
# http://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Static_Libraries
|
||||
%exclude %{_libdir}/libruby-static.a
|
||||
|
||||
%files devel
|
||||
%doc BSDL
|
||||
%doc COPYING
|
||||
%lang(ja) %doc COPYING.ja
|
||||
%doc GPL
|
||||
%doc LEGAL
|
||||
%license BSDL
|
||||
%license COPYING
|
||||
%lang(ja) %license COPYING.ja
|
||||
%license GPL
|
||||
%license LEGAL
|
||||
|
||||
%config(noreplace) %{_root_sysconfdir}/rpm/macros.ruby%{?scl:.%{scl}}
|
||||
|
||||
@ -698,10 +770,10 @@ make check TESTS="-v $DISABLE_TESTS"
|
||||
%{_libdir}/pkgconfig/%{pkg_name}.pc
|
||||
|
||||
%files libs
|
||||
%doc COPYING
|
||||
%lang(ja) %doc COPYING.ja
|
||||
%doc GPL
|
||||
%doc LEGAL
|
||||
%license COPYING
|
||||
%lang(ja) %license COPYING.ja
|
||||
%license GPL
|
||||
%license LEGAL
|
||||
%doc README.md
|
||||
%doc NEWS
|
||||
# Exclude /usr/local directory since it is supposed to be managed by
|
||||
@ -715,19 +787,16 @@ make check TESTS="-v $DISABLE_TESTS"
|
||||
# Platform independent libraries.
|
||||
%dir %{ruby_libdir}
|
||||
%{ruby_libdir}/*.rb
|
||||
%exclude %{ruby_libdir}/*-tk.rb
|
||||
%exclude %{ruby_libdir}/irb.rb
|
||||
%exclude %{ruby_libdir}/tcltk.rb
|
||||
%exclude %{ruby_libdir}/tk*.rb
|
||||
%exclude %{ruby_libdir}/psych.rb
|
||||
%{ruby_libdir}/cgi
|
||||
%{ruby_libdir}/digest
|
||||
%{ruby_libdir}/drb
|
||||
%{ruby_libdir}/fiddle
|
||||
%{ruby_libdir}/forwardable
|
||||
%exclude %{ruby_libdir}/irb
|
||||
%{ruby_libdir}/matrix
|
||||
%{ruby_libdir}/net
|
||||
%{ruby_libdir}/openssl
|
||||
%{ruby_libdir}/optparse
|
||||
%{ruby_libdir}/racc
|
||||
%{ruby_libdir}/rbconfig
|
||||
@ -737,12 +806,9 @@ make check TESTS="-v $DISABLE_TESTS"
|
||||
%{ruby_libdir}/rss
|
||||
%{ruby_libdir}/shell
|
||||
%{ruby_libdir}/syslog
|
||||
%exclude %{ruby_libdir}/tk
|
||||
%exclude %{ruby_libdir}/tkextlib
|
||||
%{ruby_libdir}/unicode_normalize
|
||||
%{ruby_libdir}/uri
|
||||
%{ruby_libdir}/webrick
|
||||
%{ruby_libdir}/xmlrpc
|
||||
%{ruby_libdir}/yaml
|
||||
|
||||
# Platform specific libraries.
|
||||
@ -818,6 +884,9 @@ make check TESTS="-v $DISABLE_TESTS"
|
||||
%{ruby_libarchdir}/enc/windows_1250.so
|
||||
%{ruby_libarchdir}/enc/windows_1251.so
|
||||
%{ruby_libarchdir}/enc/windows_1252.so
|
||||
%{ruby_libarchdir}/enc/windows_1253.so
|
||||
%{ruby_libarchdir}/enc/windows_1254.so
|
||||
%{ruby_libarchdir}/enc/windows_1257.so
|
||||
%{ruby_libarchdir}/enc/windows_31j.so
|
||||
%{ruby_libarchdir}/etc.so
|
||||
%{ruby_libarchdir}/fcntl.so
|
||||
@ -832,7 +901,6 @@ make check TESTS="-v $DISABLE_TESTS"
|
||||
%{ruby_libarchdir}/mathn/rational.so
|
||||
%{ruby_libarchdir}/nkf.so
|
||||
%{ruby_libarchdir}/objspace.so
|
||||
%{ruby_libarchdir}/openssl.so
|
||||
%{ruby_libarchdir}/pathname.so
|
||||
%{ruby_libarchdir}/pty.so
|
||||
%dir %{ruby_libarchdir}/racc
|
||||
@ -847,9 +915,6 @@ make check TESTS="-v $DISABLE_TESTS"
|
||||
%{ruby_libarchdir}/stringio.so
|
||||
%{ruby_libarchdir}/strscan.so
|
||||
%{ruby_libarchdir}/syslog.so
|
||||
%exclude %{ruby_libarchdir}/tcltklib.so
|
||||
%{ruby_libarchdir}/thread.so
|
||||
%exclude %{ruby_libarchdir}/tkutil.so
|
||||
%{ruby_libarchdir}/zlib.so
|
||||
|
||||
%{tapset_root}
|
||||
@ -933,6 +998,14 @@ make check TESTS="-v $DISABLE_TESTS"
|
||||
%exclude %{gem_dir}/gems/minitest-%{minitest_version}/.*
|
||||
%{gem_dir}/specifications/minitest-%{minitest_version}.gemspec
|
||||
|
||||
%files -n %{?scl_prefix}rubygem-openssl
|
||||
%{ruby_libdir}/openssl
|
||||
%{ruby_libdir}/openssl.rb
|
||||
%{ruby_libarchdir}/openssl.so
|
||||
%{_libdir}/gems/%{pkg_name}/openssl-%{openssl_version}
|
||||
%{gem_dir}/gems/openssl-%{openssl_version}
|
||||
%{gem_dir}/specifications/openssl-%{openssl_version}.gemspec
|
||||
|
||||
%files -n %{?scl_prefix}rubygem-power_assert
|
||||
%{gem_dir}/gems/power_assert-%{power_assert_version}
|
||||
%exclude %{gem_dir}/gems/power_assert-%{power_assert_version}/.*
|
||||
@ -955,16 +1028,28 @@ make check TESTS="-v $DISABLE_TESTS"
|
||||
%{gem_dir}/gems/test-unit-%{test_unit_version}
|
||||
%{gem_dir}/specifications/test-unit-%{test_unit_version}.gemspec
|
||||
|
||||
%files tcltk
|
||||
%{ruby_libdir}/*-tk.rb
|
||||
%{ruby_libdir}/tcltk.rb
|
||||
%{ruby_libdir}/tk*.rb
|
||||
%{ruby_libarchdir}/tcltklib.so
|
||||
%{ruby_libarchdir}/tkutil.so
|
||||
%{ruby_libdir}/tk
|
||||
%{ruby_libdir}/tkextlib
|
||||
%files -n %{?scl_prefix}rubygem-xmlrpc
|
||||
%license %{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/LICENSE.txt
|
||||
%dir %{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}/specifications/xmlrpc-%{xmlrpc_version}.gemspec
|
||||
|
||||
%changelog
|
||||
* Mon Jan 02 2017 Vít Ondruch <vondruch@redhat.com> - 2.4.0-70
|
||||
- Upgrade to Ruby 2.4.0.
|
||||
- Workaround "an invalid stdio handle" error on PPC (rhbz#1361037).
|
||||
- Add gemspec_add_dep and gemspec_remove_dep macros.
|
||||
- Move gemified xmlrpc into subpackage.
|
||||
- Move gemified openssl into subpackage.
|
||||
- Make symlinks for json gem.
|
||||
- Tk is removed from stdlib.
|
||||
- Harden package.
|
||||
- Extend 'gem_' macros for pre-release version support.
|
||||
|
||||
* Wed Oct 26 2016 Pavel Valena <pvalena@redhat.com> - 2.3.1-64
|
||||
- Fix: do not fail in operating_system.rb when X_SCLS is empty
|
||||
Resolves: rhbz#1387139
|
||||
|
Loading…
Reference in New Issue
Block a user