[ruby] Upgrade to Ruby 2.2.0.
Vít Ondruch
vondruch at fedoraproject.org
Thu Jan 15 09:41:24 UTC 2015
commit 9195984ef3a89b856569605333bce28c5454bd47
Author: Vít Ondruch <vondruch at redhat.com>
Date: Thu Jan 15 09:47:15 2015 +0100
Upgrade to Ruby 2.2.0.
- Explicitly list RubyGems directories to avoid accidentaly packaged content.
- Split test-unit and power_assert gems into separate sub-packages.
- Drop libdb dependency in favor of gdbm.
ruby-1.9.3-mkmf-verbose.patch | 2 +-
ruby-1.9.3.p195-fix-webrick-tests.patch | 25 ---
...ecify-additional-preludes-by-configuratio.patch | 23 +-
...-2.1.0-Enable-configuration-of-archlibdir.patch | 2 +-
...licated-paths-when-empty-version-string-i.patch | 10 +-
ruby-2.1.0-always-use-i386.patch | 4 +-
ruby-2.1.0-custom-rubygems-location.patch | 24 +-
...-2.2.0-Don-t-use-obsolete-SSLv3-for-tests.patch | 38 ----
ruby.spec | 222 ++++++++++---------
sources | 2 +-
test_systemtap.rb | 9 +
11 files changed, 160 insertions(+), 201 deletions(-)
---
diff --git a/ruby-1.9.3-mkmf-verbose.patch b/ruby-1.9.3-mkmf-verbose.patch
index 120ee37..13148ce 100644
--- a/ruby-1.9.3-mkmf-verbose.patch
+++ b/ruby-1.9.3-mkmf-verbose.patch
@@ -11,7 +11,7 @@ diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 682eb46..e6b1445 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
-@@ -1829,7 +1829,7 @@ SRC
+@@ -1858,7 +1858,7 @@ SRC
SHELL = /bin/sh
# V=0 quiet, V=1 verbose. other values don't work.
diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch
index 6a425ea..b30ad4f 100644
--- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch
+++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch
@@ -4,41 +4,42 @@ Date: Fri, 4 Oct 2013 22:13:11 +0200
Subject: [PATCH] Allow to specify addition preludes by configuration option.
---
- Makefile.in | 1 +
+ Makefile.in | 2 ++
common.mk | 2 +-
configure.in | 7 +++++++
- 3 files changed, 9 insertions(+), 1 deletion(-)
+ 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
-@@ -114,6 +114,7 @@ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@
+@@ -114,6 +114,8 @@ XRUBY_LIBDIR = @XRUBY_LIBDIR@
+ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@
XRUBY_RUBYHDRDIR = @XRUBY_RUBYHDRDIR@
- DEFAULT_PRELUDES = $(GEM_PRELUDE)
+OPTIONAL_PRELUDES = @OPTIONAL_PRELUDES@
-
++
#### End of system configuration section. ####
+ MAJOR= @MAJOR@
diff --git a/common.mk b/common.mk
index 5cfbc3d..3f0a82e 100644
--- a/common.mk
+++ b/common.mk
-@@ -109,7 +109,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT)
-
+@@ -115,7 +115,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)
- GEM_PRELUDE = $(srcdir)/gem_prelude.rb
- PRELUDES = prelude.c miniprelude.c
- GOLFPRELUDES = golf_prelude.c
+ 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
-@@ -3914,6 +3914,13 @@ AC_SUBST(rubyarchhdrdir)dnl
+@@ -4160,6 +4160,13 @@ AC_SUBST(rubyarchhdrdir)dnl
AC_SUBST(sitearchhdrdir)dnl
AC_SUBST(vendorarchhdrdir)dnl
diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch
index 4a4919c..6863f07 100644
--- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch
+++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch
@@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in
index 37d9a62..553d4d0 100644
--- a/configure.in
+++ b/configure.in
-@@ -3143,6 +3143,11 @@ if test ${multiarch+set}; then
+@@ -3379,6 +3379,11 @@ if test ${multiarch+set}; then
fi
archlibdir='${libdir}/${arch}'
diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch
index 89f5890..570d4d7 100644
--- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch
+++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch
@@ -14,7 +14,7 @@ diff --git a/configure.in b/configure.in
index 17ed3ed..5843651 100644
--- a/configure.in
+++ b/configure.in
-@@ -3718,8 +3718,6 @@ AS_CASE(["$target_os"],
+@@ -3966,8 +3966,6 @@ AS_CASE(["$target_os"],
rubyw_install_name='$(RUBYW_INSTALL_NAME)'
])
@@ -23,7 +23,7 @@ index 17ed3ed..5843651 100644
rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'}
AC_ARG_WITH(rubyarchprefix,
-@@ -3749,6 +3747,7 @@ AC_ARG_WITH(ruby-version,
+@@ -3997,6 +3995,7 @@ AC_ARG_WITH(ruby-version,
[ruby_version=full])
unset RUBY_LIB_VERSION
unset RUBY_LIB_VERSION_STYLE
@@ -31,7 +31,7 @@ index 17ed3ed..5843651 100644
AS_CASE(["$ruby_version"],
[full], [RUBY_LIB_VERSION_STYLE='3 /* full */'],
[minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */'])
-@@ -3765,30 +3764,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then
+@@ -4013,30 +4012,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
@@ -39,7 +39,7 @@ index 17ed3ed..5843651 100644
+ unset ruby_version_suffix
+ AC_DEFINE(RUBY_LIB_VERSION_BLANK, 1)
else
- RUBY_LIB_VERSION="\"${ruby_version}\""
+ RUBY_LIB_VERSION="${ruby_version}"
fi
AC_SUBST(RUBY_LIB_VERSION_STYLE)
AC_SUBST(RUBY_LIB_VERSION)
@@ -113,7 +113,7 @@ diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
index 07076d4..35e6c3c 100755
--- a/tool/mkconfig.rb
+++ b/tool/mkconfig.rb
-@@ -121,7 +121,7 @@ File.foreach "config.status" do |line|
+@@ -123,7 +123,7 @@ File.foreach "config.status" do |line|
val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump
case name
when /^prefix$/
diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch
index 78e9697..210adb1 100644
--- a/ruby-2.1.0-always-use-i386.patch
+++ b/ruby-2.1.0-always-use-i386.patch
@@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in
index 553d4d0..03a4152 100644
--- a/configure.in
+++ b/configure.in
-@@ -3830,6 +3830,8 @@ AC_SUBST(vendorarchdir)dnl
+@@ -4078,6 +4078,8 @@ AC_SUBST(vendorarchdir)dnl
AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl
@@ -19,7 +19,7 @@ index 553d4d0..03a4152 100644
+
if test "${universal_binary-no}" = yes ; then
arch="universal-${target_os}"
- AC_CACHE_CHECK(whether __ARCHITECTURE__ is available, rb_cv_architecture_available,
+ if test "${rb_cv_architecture_available}" = yes; then
--
1.8.3.1
diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch
index 55c7448..41de23f 100644
--- a/ruby-2.1.0-custom-rubygems-location.patch
+++ b/ruby-2.1.0-custom-rubygems-location.patch
@@ -5,17 +5,17 @@ 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 +++++++++
+ configure.in | 5 +++++
+ loadpath.c | 4 ++++
+ template/verconf.h.tmpl | 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
-@@ -3804,6 +3804,10 @@ AC_ARG_WITH(vendorarchdir,
+@@ -4052,6 +4052,10 @@ AC_ARG_WITH(vendorarchdir,
[vendorarchdir=$withval],
[vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}])
@@ -26,7 +26,7 @@ index 03a4152..0e371e2 100644
if test "${LOAD_RELATIVE+set}"; then
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
RUBY_EXEC_PREFIX=''
-@@ -3827,6 +3831,7 @@ AC_SUBST(sitearchdir)dnl
+@@ -4075,6 +4079,7 @@ AC_SUBST(sitearchdir)dnl
AC_SUBST(vendordir)dnl
AC_SUBST(vendorlibdir)dnl
AC_SUBST(vendorarchdir)dnl
@@ -49,10 +49,10 @@ index 623dc9d..74c5d9e 100644
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
+diff --git a/template/verconf.h.tmpl b/template/verconf.h.tmpl
index 79c003e..34f2382 100644
---- a/template/verconf.h.in
-+++ b/template/verconf.h.in
+--- a/template/verconf.h.tmpl
++++ b/template/verconf.h.tmpl
@@ -34,6 +34,9 @@
% if C["RUBY_SEARCH_PATH"]
#define RUBY_SEARCH_PATH "${RUBY_SEARCH_PATH}"
@@ -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
-@@ -324,6 +324,7 @@ sitelibdir = CONFIG["sitelibdir"]
+@@ -317,6 +317,7 @@ sitelibdir = CONFIG["sitelibdir"]
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"])
-@@ -512,7 +513,15 @@ end
+@@ -505,7 +506,15 @@ end
install?(:local, :comm, :lib) do
prepare "library scripts", rubylibdir
noinst = %w[README* *.txt *.rdoc *.gemspec]
@@ -90,7 +90,7 @@ index b47b6e1..0b99408 100755
+ end
end
- install?(:local, :arch, :lib) do
+ install?(:local, :comm, :hdr, :'comm-hdr') do
--
1.8.3.1
diff --git a/ruby.spec b/ruby.spec
index 9329c39..cfe4cc6 100644
--- a/ruby.spec
+++ b/ruby.spec
@@ -1,16 +1,16 @@
%global major_version 2
-%global minor_version 1
-%global teeny_version 5
+%global minor_version 2
+%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 44362
+#%%global revision 48936
%global ruby_archive %{name}-%{ruby_version}
@@ -21,10 +21,10 @@
%endif
-%global release 26
+%global release 1
%{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}}
-%global rubygems_version 2.2.2
+%global rubygems_version 2.4.5
# The RubyGems library has to stay out of Ruby directory three, since the
# RubyGems should be share by all Ruby implementations.
@@ -34,13 +34,15 @@
# http://redmine.ruby-lang.org/issues/5313
%global irb_version %{ruby_version}
-%global bigdecimal_version 1.2.4
-%global io_console_version 0.4.2
+%global bigdecimal_version 1.2.6
+%global io_console_version 0.4.3
%global json_version 1.8.1
-%global minitest_version 4.7.5
-%global psych_version 2.0.5
-%global rake_version 10.1.0
-%global rdoc_version 4.1.0
+%global minitest_version 5.4.3
+%global power_assert_version 0.2.2
+%global psych_version 2.0.8
+%global rake_version 10.4.2
+%global rdoc_version 4.2.0
+%global test_unit_version 3.0.8
# Might not be needed in the future, if we are lucky enough.
# https://bugzilla.redhat.com/show_bug.cgi?id=888262
@@ -62,7 +64,7 @@ Group: Development/Languages
# Public Domain for example for: include/ruby/st.h, strftime.c, ...
License: (Ruby or BSD) and Public Domain
URL: http://ruby-lang.org/
-Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{major_minor_version}/%{ruby_archive}.tar.bz2
+Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{major_minor_version}/%{ruby_archive}.tar.xz
Source1: operating_system.rb
# TODO: Try to push SystemTap support upstream.
Source2: libruby.stp
@@ -79,6 +81,8 @@ Source7: config.h
Source8: rubygems.attr
Source9: rubygems.req
Source10: rubygems.prov
+# SystemTap sanity test case.
+Source11: test_systemtap.rb
# The load directive is supported since RPM 4.12, i.e. F21+. The build process
# fails on older Fedoras.
@@ -94,11 +98,8 @@ 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.
Patch2: ruby-2.1.0-always-use-i386.patch
-# Fixes random WEBRick test failures.
-# https://bugs.ruby-lang.org/issues/6573.
-Patch3: ruby-1.9.3.p195-fix-webrick-tests.patch
# Allows to install RubyGems into custom directory, outside of Ruby's tree.
-# http://redmine.ruby-lang.org/issues/5617
+# http://bugs.ruby-lang.org/issues/5617
Patch4: ruby-2.1.0-custom-rubygems-location.patch
# Make mkmf verbose by default
Patch5: ruby-1.9.3-mkmf-verbose.patch
@@ -106,12 +107,6 @@ Patch5: ruby-1.9.3-mkmf-verbose.patch
# in support for ABRT.
# http://bugs.ruby-lang.org/issues/8566
Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch
-# Test are broken due to SSLv3 disabled in Fedora.
-# https://bugs.ruby-lang.org/issues/10046
-Patch7: ruby-2.2.0-Don-t-use-obsolete-SSLv3-for-tests.patch
-# Disable sse2, already applied upstream
-# https://bugzilla.redhat.com/show_bug.cgi?id=1101811
-Patch8: ruby-nosse2.patch
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: ruby(rubygems) >= %{rubygems_version}
@@ -123,7 +118,6 @@ Requires: rubygem(bigdecimal) >= %{bigdecimal_version}
BuildRequires: autoconf
BuildRequires: gdbm-devel
-BuildRequires: libdb-devel
BuildRequires: libffi-devel
BuildRequires: openssl-devel
BuildRequires: libyaml-devel
@@ -175,6 +169,8 @@ Group: Development/Libraries
License: Ruby or MIT
Requires: ruby(release)
Requires: rubygem(rdoc) >= %{rdoc_version}
+# TODO: This seems to be optional now.
+# https://github.com/rubygems/rubygems/commit/68da16dd7508c5c4010bfe32f99422568d3d582f
Requires: rubygem(io-console) >= %{io_console_version}
Requires: rubygem(psych) >= %{psych_version}
Provides: gem = %{version}-%{release}
@@ -334,6 +330,22 @@ minitest/pride shows pride in testing and adds coloring to your test
output.
+# The Summary/Description fields are rather poor.
+# https://github.com/k-tsj/power_assert/issues/3
+%package -n rubygem-power_assert
+Summary: Power Assert for Ruby
+Version: %{power_assert_version}
+Group: Development/Libraries
+License: Ruby or BSD
+Requires: ruby(release)
+Requires: ruby(rubygems) >= %{rubygems_version}
+Provides: rubygem(power_assert) = %{version}-%{release}
+BuildArch: noarch
+
+%description -n rubygem-power_assert
+Power Assert for Ruby.
+
+
%package -n rubygem-psych
Summary: A libyaml wrapper for Ruby
Version: %{psych_version}
@@ -349,8 +361,25 @@ 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.
-# TODO:
-# %%pacakge -n rubygem-test-unit
+
+# The Summary/Description fields are rather poor.
+# https://github.com/test-unit/test-unit/issues/73
+%package -n rubygem-test-unit
+Summary: Improved version of Test::Unit bundled in Ruby 1.8.x
+Version: %{test_unit_version}
+Group: Development/Libraries
+# lib/test/unit/diff.rb is a double license of the Ruby license and PSF license.
+# lib/test-unit.rb is a dual license of the Ruby license and LGPLv2.1 or later.
+License: (Ruby or BSD) and (Ruby or BSD or Python) and (Ruby or BSD or LGPLv2+)
+Requires: ruby(release)
+Requires: ruby(rubygems) >= %{rubygems_version}
+Provides: rubygem(test-unit) = %{version}-%{release}
+BuildArch: noarch
+
+%description -n 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.
%package tcltk
@@ -365,15 +394,16 @@ Tcl/Tk interface for the object-oriented scripting language Ruby.
%prep
%setup -q -n %{ruby_archive}
+# Remove bundled libraries to be sure they are not used.
+rm -rf ext/psych/yaml
+rm -rf ext/fiddle/libffi*
+
%patch0 -p1
%patch1 -p1
%patch2 -p1
-%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
-%patch7 -p1
-%patch8 -p1
# Provide an example of usage of the tapset:
cp -a %{SOURCE3} .
@@ -407,6 +437,10 @@ autoconf
--enable-multiarch \
--with-prelude=./abrt_prelude.rb \
+# Avoid regeneration of prelude.c due to patch6 applied to common.mk.
+# https://bugs.ruby-lang.org/issues/10554
+touch prelude.c
+
# Q= makes the build output more verbose and allows to check Fedora
# compiler options.
make %{?_smp_mflags} COPY="cp -p" Q=
@@ -432,12 +466,14 @@ for cert in \
Class3PublicPrimaryCertificationAuthority.pem \
DigiCertHighAssuranceEVRootCA.pem \
EntrustnetSecureServerCertificationAuthority.pem \
- GeoTrustGlobalCA.pem
+ GeoTrustGlobalCA.pem \
+ AddTrustExternalCARoot.pem \
+ AddTrustExternalCARoot-2048.pem
do
rm %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert
done
-# Move macros file insto proper place and replace the %%{name} macro, since it
+# Move macros file into proper place and replace the %%{name} macro, since it
# would be wrongly evaluated during build of other packages.
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d
install -m 644 %{SOURCE4} %{buildroot}%{_rpmconfigdir}/macros.d/macros.ruby
@@ -496,22 +532,14 @@ mv %{buildroot}%{ruby_libdir}/json* %{buildroot}%{gem_dir}/gems/json-%{json_vers
mv %{buildroot}%{ruby_libarchdir}/json/ %{buildroot}%{_libdir}/gems/%{name}/json-%{json_version}/
mv %{buildroot}%{gem_dir}/specifications/default/json-%{json_version}.gemspec %{buildroot}%{gem_dir}/specifications
-mkdir -p %{buildroot}%{gem_dir}/gems/minitest-%{minitest_version}/lib
-mv %{buildroot}%{ruby_libdir}/minitest %{buildroot}%{gem_dir}/gems/minitest-%{minitest_version}/lib
-mv %{buildroot}%{gem_dir}/specifications/default/minitest-%{minitest_version}.gemspec %{buildroot}%{gem_dir}/specifications
-
mkdir -p %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib
mkdir -p %{buildroot}%{_libdir}/gems/%{name}/psych-%{psych_version}
mv %{buildroot}%{ruby_libdir}/psych* %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib
mv %{buildroot}%{ruby_libarchdir}/psych.so %{buildroot}%{_libdir}/gems/%{name}/psych-%{psych_version}/
mv %{buildroot}%{gem_dir}/specifications/default/psych-%{psych_version}.gemspec %{buildroot}%{gem_dir}/specifications
-# The links should replace directory, which RPM cannot handle and it is causing
-# issues during upgrade from F18 to F19. As a workaround the links are placed
-# into vendor direcories. This could be changed back as soon as F18 is EOLed.
-# https://bugzilla.redhat.com/show_bug.cgi?id=988490
-ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych %{buildroot}%{ruby_vendorlibdir}/psych
-ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych.rb %{buildroot}%{ruby_vendorlibdir}/psych.rb
-ln -s %{_libdir}/gems/%{name}/psych-%{psych_version}/psych.so %{buildroot}%{ruby_vendorarchdir}/psych.so
+ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych %{buildroot}%{ruby_libdir}/psych
+ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych.rb %{buildroot}%{ruby_libdir}/psych.rb
+ln -s %{_libdir}/gems/%{name}/psych-%{psych_version}/psych.so %{buildroot}%{ruby_libarchdir}/psych.so
# Adjust the gemspec files so that the gems will load properly
sed -i '/^end$/ i\
@@ -532,9 +560,6 @@ sed -i '/^end$/ i\
s.require_paths = ["lib"]\
s.extensions = ["json/ext/parser.so", "json/ext/generator.so"]' %{buildroot}%{gem_dir}/specifications/json-%{json_version}.gemspec
-sed -i '/^end$/ i\
- s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/minitest-%{minitest_version}.gemspec
-
# Install a tapset and fix up the path to the library.
mkdir -p %{buildroot}%{tapset_dir}
sed -e "s|@LIBRARY_PATH@|%{tapset_libdir}/libruby.so.%{ruby_version}|" \
@@ -543,31 +568,16 @@ sed -e "s|@LIBRARY_PATH@|%{tapset_libdir}/libruby.so.%{ruby_version}|" \
sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{ruby_version}.stp
%check
-DISABLE_TESTS=""
+# Sanity check that SystemTap (dtrace) was detected.
+make runruby TESTRUN_SCRIPT=%{SOURCE11}
-%ifarch armv7l armv7hl armv7hnl
-# test_call_double(DL::TestDL) fails on ARM HardFP
-# http://bugs.ruby-lang.org/issues/6592
-DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS"
-%endif
+DISABLE_TESTS=""
# test_debug(TestRubyOptions) fails due to LoadError reported in debug mode,
# when abrt.rb cannot be required (seems to be easier way then customizing
# the test suite).
touch abrt.rb
-# TestSignal#test_hup_me hangs up the test suite.
-# http://bugs.ruby-lang.org/issues/8997
-sed -i '/def test_hup_me/,/end if Process.respond_to/ s/^/#/' test/ruby/test_signal.rb
-
-# Fix "Could not find 'minitest'" error.
-# http://bugs.ruby-lang.org/issues/9259
-sed -i "/^ gem 'minitest', '~> 4.0'/ s/^/#/" lib/rubygems/test_case.rb
-
-# Segmentation fault.
-# https://bugs.ruby-lang.org/issues/9198
-sed -i '/^ def test_machine_stackoverflow/,/^ end/ s/^/#/' test/ruby/test_exception.rb
-
# Don't test wrap ciphers to prevent "OpenSSL::Cipher::CipherError: wrap mode
# not allowed" error.
# https://bugs.ruby-lang.org/issues/10229
@@ -576,6 +586,7 @@ sed -i '/assert(OpenSSL::Cipher::Cipher.new(name).is_a?(OpenSSL::Cipher::Cipher)
# Test is broken due to SSLv3 disabled in Fedora.
# https://bugs.ruby-lang.org/issues/10046
+sed -i '/def test_ctx_client_session_cb$/,/^ end$/ s/^/#/' test/openssl/test_ssl_session.rb
sed -i '/def test_ctx_server_session_cb$/,/^ end$/ s/^/#/' test/openssl/test_ssl_session.rb
make check TESTS="-v $DISABLE_TESTS"
@@ -585,13 +596,13 @@ make check TESTS="-v $DISABLE_TESTS"
%postun libs -p /sbin/ldconfig
%files
+%doc BSDL
%doc COPYING
%lang(ja) %doc COPYING.ja
%doc GPL
%doc LEGAL
%{_bindir}/erb
%{_bindir}/%{name}%{?with_rubypick:-mri}
-%{_bindir}/testrb
%{_mandir}/man1/erb*
%{_mandir}/man1/ruby*
@@ -599,7 +610,9 @@ make check TESTS="-v $DISABLE_TESTS"
%exclude %{_libdir}/libruby-static.a
%files devel
-%doc COPYING*
+%doc BSDL
+%doc COPYING
+%lang(ja) %doc COPYING.ja
%doc GPL
%doc LEGAL
%doc README.EXT
@@ -616,8 +629,8 @@ make check TESTS="-v $DISABLE_TESTS"
%lang(ja) %doc COPYING.ja
%doc GPL
%doc LEGAL
-%doc README
-%lang(ja) %doc README.ja
+%doc README.md
+%lang(ja) %doc README.ja.md
%doc NEWS
%doc doc/NEWS-*
# Exclude /usr/local directory since it is supposed to be managed by
@@ -635,10 +648,9 @@ make check TESTS="-v $DISABLE_TESTS"
%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}/date
%{ruby_libdir}/digest
-%{ruby_libdir}/dl
%{ruby_libdir}/drb
%{ruby_libdir}/fiddle
%exclude %{ruby_libdir}/irb
@@ -654,9 +666,9 @@ make check TESTS="-v $DISABLE_TESTS"
%{ruby_libdir}/rss
%{ruby_libdir}/shell
%{ruby_libdir}/syslog
-%{ruby_libdir}/test
%exclude %{ruby_libdir}/tk
%exclude %{ruby_libdir}/tkextlib
+%{ruby_libdir}/unicode_normalize
%{ruby_libdir}/uri
%{ruby_libdir}/webrick
%{ruby_libdir}/xmlrpc
@@ -676,9 +688,6 @@ make check TESTS="-v $DISABLE_TESTS"
%{ruby_libarchdir}/digest/rmd160.so
%{ruby_libarchdir}/digest/sha1.so
%{ruby_libarchdir}/digest/sha2.so
-%dir %{ruby_libarchdir}/dl
-%{ruby_libarchdir}/dl.so
-%{ruby_libarchdir}/dl/callback.so
%dir %{ruby_libarchdir}/enc
%{ruby_libarchdir}/enc/big5.so
%{ruby_libarchdir}/enc/cp949.so
@@ -768,37 +777,24 @@ make check TESTS="-v $DISABLE_TESTS"
%{tapset_root}
-# TODO rubygems 2.0.0 does not create test-unit gemspec
-# TODO for now put this in ruby-libs rpm
-# TODO check if the following can be removed after
-# TODO test-unit rebuild
+%files -n rubygems
+%{_bindir}/gem
+%{rubygems_dir}
+
+# Explicitly include only RubyGems directory strucure to avoid accidentally
+# packaged content.
%dir %{gem_dir}
+%dir %{gem_dir}/build_info
+%dir %{gem_dir}/cache
+%dir %{gem_dir}/doc
+%dir %{gem_dir}/extensions
+%dir %{gem_dir}/gems
%dir %{gem_dir}/specifications
%dir %{gem_dir}/specifications/default
-%{gem_dir}/specifications/default/test-unit-*.gemspec
+%dir %{_exec_prefix}/lib*/gems
+%dir %{_exec_prefix}/lib*/gems/ruby
-%files -n rubygems
-%{_bindir}/gem
-%{rubygems_dir}
-%{gem_dir}
-%exclude %{gem_dir}/gems/*
-%{_exec_prefix}/lib*/gems
-%exclude %{_exec_prefix}/lib*/gems/%{name}/bigdecimal-%{bigdecimal_version}
-%exclude %{_exec_prefix}/lib*/gems/%{name}/io-console-%{io_console_version}
-%exclude %{_exec_prefix}/lib*/gems/%{name}/json-%{json_version}
-%exclude %{_exec_prefix}/lib*/gems/%{name}/psych-%{psych_version}
-%exclude %{gem_dir}/gems/rake-%{rake_version}
-%exclude %{gem_dir}/gems/rdoc-%{rdoc_version}
-%exclude %{gem_dir}/specifications/bigdecimal-%{bigdecimal_version}.gemspec
-%exclude %{gem_dir}/specifications/io-console-%{io_console_version}.gemspec
-%exclude %{gem_dir}/specifications/json-%{json_version}.gemspec
-%exclude %{gem_dir}/specifications/minitest-%{minitest_version}.gemspec
-%exclude %{gem_dir}/specifications/rake-%{rake_version}.gemspec
-%exclude %{gem_dir}/specifications/rdoc-%{rdoc_version}.gemspec
-%exclude %{gem_dir}/specifications/psych-%{psych_version}.gemspec
-# TODO rubygems 2.0.0 does not create test-unit gemspec
-# TODO where to put test-unit-*.gemspec??
-%exclude %{gem_dir}/specifications/default/test-unit-*.gemspec
+%exclude %{gem_dir}/cache/*
%files -n rubygems-devel
%{_rpmconfigdir}/macros.d/macros.rubygems
@@ -826,8 +822,8 @@ make check TESTS="-v $DISABLE_TESTS"
%{_mandir}/man1/ri*
%files doc
-%doc README
-%lang(ja) %doc README.ja
+%doc README.md
+%lang(ja) %doc README.ja.md
%doc ChangeLog
%doc doc/ChangeLog-*
%doc ruby-exercise.stp
@@ -854,16 +850,26 @@ make check TESTS="-v $DISABLE_TESTS"
%files -n rubygem-minitest
%{gem_dir}/gems/minitest-%{minitest_version}
+%exclude %{gem_dir}/gems/minitest-%{minitest_version}/.*
%{gem_dir}/specifications/minitest-%{minitest_version}.gemspec
+%files -n rubygem-power_assert
+%{gem_dir}/gems/power_assert-%{power_assert_version}
+%exclude %{gem_dir}/gems/power_assert-%{power_assert_version}/.*
+%{gem_dir}/specifications/power_assert-%{power_assert_version}.gemspec
+
%files -n rubygem-psych
-%{ruby_vendorlibdir}/psych
-%{ruby_vendorlibdir}/psych.rb
-%{ruby_vendorarchdir}/psych.so
+%{ruby_libdir}/psych
+%{ruby_libdir}/psych.rb
+%{ruby_libarchdir}/psych.so
%{_libdir}/gems/%{name}/psych-%{psych_version}
%{gem_dir}/gems/psych-%{psych_version}
%{gem_dir}/specifications/psych-%{psych_version}.gemspec
+%files -n rubygem-test-unit
+%{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
@@ -874,6 +880,12 @@ make check TESTS="-v $DISABLE_TESTS"
%{ruby_libdir}/tkextlib
%changelog
+* Fri Jan 02 2015 Vít Ondruch <vondruch at redhat.com> - 2.2.0-1
+- Upgrade to Ruby 2.2.0.
+- Explicitly list RubyGems directories to avoid accidentaly packaged content.
+- Split test-unit and power_assert gems into separate sub-packages.
+- Drop libdb dependency in favor of gdbm.
+
* Fri Dec 26 2014 Orion Poplwski <orion at cora.nwra.com> - 2.1.5-26
- Disbable sse2 on i668 (bug #1101811)
diff --git a/sources b/sources
index 2f388ee..3d0ea17 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-a7c3e5fec47eff23091b566e9e1dac1b ruby-2.1.5.tar.bz2
+54b43c6c6c9dd4c4b08ceb03ad0ded7a ruby-2.2.0.tar.xz
diff --git a/test_systemtap.rb b/test_systemtap.rb
new file mode 100644
index 0000000..aa8df4e
--- /dev/null
+++ b/test_systemtap.rb
@@ -0,0 +1,9 @@
+require 'rbconfig'
+
+if RbConfig::CONFIG.select {|k, v| v =~ /dtrace/}.size == 1
+ exit true
+else
+ puts 'ERROR: SystemTap (dtrace) support was not detected.'
+
+ exit false
+end
More information about the scm-commits
mailing list