Compare commits

...
Sign in to create a new pull request.

27 commits

Author SHA1 Message Date
Vít Ondruch
c70d1f6b88 Fix psych.so symlink. 2015-01-05 10:13:22 +01:00
Vít Ondruch
5a6322e4fb Fix RubyGems version. 2015-01-02 16:43:15 +01:00
Vít Ondruch
1bc3d3a4ec Upgrade to Ruby 2.2.0. 2015-01-02 16:35:22 +01:00
Vít Ondruch
a9419c8c4b Upgrade to Ruby 2.2.0 (r48899). 2014-12-23 14:41:48 +01:00
Vít Ondruch
7097d0fbcc Upgrade to Ruby 2.2.0 (rc1). 2014-12-19 15:10:53 +01:00
Vít Ondruch
653216f634 Mobe Psych symlinks back to %{ruby_libdir}.
This reverts commit 3a0654b687.
2014-12-18 13:46:26 +01:00
Vít Ondruch
475c740c64 The issue was resolved by r48844. 2014-12-18 13:34:22 +01:00
Vít Ondruch
e4cf284bcd Execute SystemTap sanity check. 2014-12-17 18:33:58 +01:00
Vít Ondruch
f9ae9cbc98 Remove bundled libyaml to be sure it is not used. 2014-12-17 17:07:20 +01:00
Vít Ondruch
304def6856 Drop libdb dependency in favor of gdbm. 2014-12-17 17:06:14 +01:00
Vít Ondruch
8869002b19 Upgrade to Ruby 2.2.0 (r48879). 2014-12-17 13:54:48 +01:00
Vít Ondruch
2fa5bddf12 Upgrade to Ruby 2.2.0 (r48741). 2014-12-09 09:46:51 +01:00
Vít Ondruch
b651e4837e Upgrade to Ruby 2.2.0-preview2. 2014-12-02 17:35:13 +01:00
Vít Ondruch
2cd1c80dbf Upgrade to Ruby 2.2.0 (r48476). 2014-11-18 17:20:32 +01:00
Vít Ondruch
8c0bc69d65 Fix release in changelog. 2014-11-11 09:32:09 +01:00
Vít Ondruch
16d9da4c30 Upgrade to Ruby 2.2.0 (r48365). 2014-11-10 17:51:55 +01:00
Vít Ondruch
63db21d33e Upgrade to Ruby 2.2.0 (r47940). 2014-10-15 13:45:43 +02:00
Vít Ondruch
fa33e440f6 Ignore dot files. 2014-10-15 13:44:27 +02:00
Vít Ondruch
0f05318653 Include only vendor directories, not their content. 2014-10-14 11:25:42 +02:00
Vít Ondruch
37788299d5 Upgrade to Ruby 2.2.0 (r47902). 2014-10-14 09:56:15 +02:00
Vít Ondruch
aa1612bdea Fix RubyGems version. 2014-09-15 18:09:00 +02:00
Vít Ondruch
212709a903 Upgrade to Ruby 2.2.0 (r47594). 2014-09-15 16:48:16 +02:00
Vít Ondruch
86042c7862 Upgrade to Ruby 2.2.0 (r47525). 2014-09-11 17:14:07 +02:00
Vít Ondruch
36dc26c4c7 Upgrade to Ruby 2.2.0 (r47372). 2014-09-05 10:52:30 +02:00
Vít Ondruch
8fa17d3469 Remove MD5 workaround, since this issue was resolved upstream
https://bugs.ruby-lang.org/issues/9154
2014-08-28 13:20:41 +02:00
Vít Ondruch
6cdbb78865 List RubyGems directories and extract test-unit and power_assert into sub-packages.
- Explicitly list RubyGems directories to avoid accidentaly packaged content.
- Split test-unit and power_assert gems into separate sub-packages.
2014-08-28 12:27:18 +02:00
Vít Ondruch
cf46bd78a1 Upgrade to Ruby 2.2.0 (r47288). 2014-08-28 10:15:46 +02:00
10 changed files with 170 additions and 180 deletions

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
@@ -1828,7 +1828,7 @@ SRC
@@ -1858,7 +1858,7 @@ SRC
SHELL = /bin/sh
# V=0 quiet, V=1 verbose. other values don't work.

View file

@ -1,25 +0,0 @@
From 2db9ad4a090d0c82e30afa44c623e3c5c99f7a37 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Mon, 19 Nov 2012 14:37:28 +0100
Subject: [PATCH] Fix WEBrick tests.
---
test/runner.rb | 2 ++
1 file changed, 2 insertions(+)
diff --git a/test/runner.rb b/test/runner.rb
index 94beb44..db4dfe9 100644
--- a/test/runner.rb
+++ b/test/runner.rb
@@ -2,6 +2,8 @@ require 'rbconfig'
require 'test/unit'
+require_relative 'ruby/envutil'
+
src_testdir = File.dirname(File.realpath(__FILE__))
$LOAD_PATH << src_testdir
module Gem
--
1.8.3.1

View file

@ -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
@@ -3841,6 +3841,13 @@ AC_SUBST(rubyarchhdrdir)dnl
@@ -4160,6 +4160,13 @@ AC_SUBST(rubyarchhdrdir)dnl
AC_SUBST(sitearchhdrdir)dnl
AC_SUBST(vendorarchhdrdir)dnl

View file

@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in
index 37d9a62..553d4d0 100644
--- a/configure.in
+++ b/configure.in
@@ -3071,6 +3071,11 @@ if test ${multiarch+set}; then
@@ -3379,6 +3379,11 @@ if test ${multiarch+set}; then
fi
archlibdir='${libdir}/${arch}'

View file

@ -14,7 +14,7 @@ diff --git a/configure.in b/configure.in
index 17ed3ed..5843651 100644
--- a/configure.in
+++ b/configure.in
@@ -3645,8 +3645,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,
@@ -3676,6 +3674,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 */'])
@@ -3692,30 +3691,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$/

View file

@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in
index 553d4d0..03a4152 100644
--- a/configure.in
+++ b/configure.in
@@ -3757,6 +3757,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

View file

@ -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
@@ -3731,6 +3731,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=''
@@ -3754,6 +3754,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

View file

@ -1,14 +0,0 @@
Index: ext/fiddle/extconf.rb
===================================================================
--- ext/fiddle/extconf.rb (revision 46484)
+++ ext/fiddle/extconf.rb (revision 46485)
@@ -7,7 +7,8 @@
pkg_config("libffi")
if ver = pkg_config("libffi", "modversion")
ver = ver.gsub(/-rc\d+/, '') # If ver contains rc version, just ignored.
- $defs.push(%{-DRUBY_LIBFFI_MODVERSION=#{ '%d%03d%03d' % ver.split('.') }})
+ ver = (ver.split('.') + [0,0])[0,3]
+ $defs.push(%{-DRUBY_LIBFFI_MODVERSION=#{ '%d%03d%03d' % ver }})
end
unless have_header('ffi.h')

237
ruby.spec
View file

@ -1,16 +1,16 @@
%global major_version 2
%global minor_version 1
%global teeny_version 2
%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 24
%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,9 +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
# Fix build with libffi 3.1
# https://bugs.ruby-lang.org/issues/9897
Patch7: ruby-r46485-libffi31.patch
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: ruby(rubygems) >= %{rubygems_version}
@ -120,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
@ -172,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}
@ -331,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}
@ -346,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
@ -362,14 +394,15 @@ Tcl/Tk interface for the object-oriented scripting language Ruby.
%prep
%setup -q -n %{ruby_archive}
# Remove bundled libyaml to be sure it is not used.
rm -rf ext/psych/yaml
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p0
# Provide an example of usage of the tapset:
cp -a %{SOURCE3} .
@ -403,6 +436,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=
@ -428,12 +465,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
@ -492,22 +531,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\
@ -528,9 +559,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}|" \
@ -539,51 +567,41 @@ 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
# Sanity check that SystemTap (dtrace) was detected.
make runruby TESTRUN_SCRIPT=%{SOURCE11} || exit 1
DISABLE_TESTS=""
%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"
# Workaround OpenSSL::TestPKeyRSA#test_sign_verify_memory_leak timeouts on ARM.
# https://bugs.ruby-lang.org/issues/9984
sed -i -e 's|20_000|10_000|g' test/openssl/test_pkey_rsa.rb
%endif
# 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
# Don't test wrap ciphers to prevent "OpenSSL::Cipher::CipherError: wrap mode
# not allowed" error.
# https://bugs.ruby-lang.org/issues/10229
sed -i '/assert(OpenSSL::Cipher::Cipher.new(name).is_a?(OpenSSL::Cipher::Cipher))/i \
next if /wrap/ =~ name' test/openssl/test_cipher.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
# 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
# Segmentation fault.
# https://bugs.ruby-lang.org/issues/9198
sed -i '/^ def test_machine_stackoverflow/,/^ end/ s/^/#/' test/ruby/test_exception.rb
# Allow MD5 in OpenSSL.
# https://bugs.ruby-lang.org/issues/9154
OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS"
make check TESTS="-v $DISABLE_TESTS"
%post libs -p /sbin/ldconfig
%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*
@ -591,7 +609,9 @@ OPENSSL_ENABLE_MD5_VERIFY=1 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
@ -608,16 +628,16 @@ OPENSSL_ENABLE_MD5_VERIFY=1 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
# local system administrator.
%exclude %{ruby_sitelibdir}
%exclude %{ruby_sitearchdir}
%{ruby_vendorlibdir}
%{ruby_vendorarchdir}
%dir %{ruby_vendorlibdir}
%dir %{ruby_vendorarchdir}
# List all these files explicitly to prevent surprises
# Platform independent libraries.
@ -627,10 +647,9 @@ OPENSSL_ENABLE_MD5_VERIFY=1 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
@ -646,9 +665,9 @@ OPENSSL_ENABLE_MD5_VERIFY=1 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
@ -668,9 +687,6 @@ OPENSSL_ENABLE_MD5_VERIFY=1 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
@ -760,37 +776,24 @@ OPENSSL_ENABLE_MD5_VERIFY=1 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
%dir %{gem_dir}
%dir %{gem_dir}/specifications
%dir %{gem_dir}/specifications/default
%{gem_dir}/specifications/default/test-unit-*.gemspec
%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
# 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
%dir %{_exec_prefix}/lib*/gems
%dir %{_exec_prefix}/lib*/gems/ruby
%exclude %{gem_dir}/cache/*
%files -n rubygems-devel
%{_rpmconfigdir}/macros.d/macros.rubygems
@ -818,8 +821,8 @@ OPENSSL_ENABLE_MD5_VERIFY=1 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
@ -846,16 +849,26 @@ OPENSSL_ENABLE_MD5_VERIFY=1 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
@ -866,6 +879,12 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS"
%{ruby_libdir}/tkextlib
%changelog
* Fri Jan 02 2015 Vít Ondruch <vondruch@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.
* Mon Aug 25 2014 Vít Ondruch <vondruch@redhat.com> - 2.1.2-24
- Use load macro introduced in RPM 4.12.

9
test_systemtap.rb Normal file
View file

@ -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