Compare commits

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

53 commits

Author SHA1 Message Date
Vít Ondruch
b132173eee Ignore some files. 2016-01-05 10:20:24 +01:00
Vít Ondruch
dbe59b580e Upgrade to Ruby 2.3.0. 2016-01-05 09:49:13 +01:00
Vít Ondruch
d4b03f966e Upgrade to Ruby 2.3.0 (r53264). 2015-12-23 16:01:27 +01:00
Vít Ondruch
1e3da942ee Refactor SystemTap test. 2015-12-23 13:39:38 +01:00
Pavel Valena
c44e3d7195 Create systemtap tests 2015-12-23 10:30:15 +01:00
Vít Ondruch
a417d6a7ea Upgrade to Ruby 2.3.0 preview2 (r53111). 2015-12-14 11:49:44 +01:00
Vít Ondruch
f5eb6e18a9 Move the ABRT hook test into separate file. 2015-12-13 20:13:47 +01:00
Vít Ondruch
51e140e916 Ensure that abrt hook is used. 2015-12-11 10:56:11 +01:00
Vít Ondruch
c2abbe315f Fix ABRT hook autoloading. 2015-12-10 15:41:36 +01:00
Vít Ondruch
e3dd260e9b Upgrade to Ruby 2.3.0 preview1 (r52759). 2015-11-27 13:58:30 +01:00
Vít Ondruch
d7c22b9071 Upgrade to Ruby 2.3.0 preview1 (r52539). 2015-11-12 16:40:34 +01:00
Vít Ondruch
3369e6cd9e Re-enable SetTracefunc tests, since glibc patch was reverted (rhbz#1229659). 2015-11-02 10:52:11 +01:00
Vít Ondruch
5aaf677f62 Upgrade to Ruby 2.3.0 (r52392). 2015-10-30 14:38:33 +01:00
Vít Ondruch
a8a2f902f9 Check the Molinillo version. 2015-10-19 13:29:57 +02:00
Vít Ondruch
1c2ed12dbc Move the bundling virtual provides into ruby-libs. 2015-10-19 13:27:50 +02:00
Vít Ondruch
5ca1e48525 Upgrade to Ruby 2.3.0 (r52191). 2015-10-19 13:26:19 +02:00
Vít Ondruch
063ccdbd36 Use weak dependencies. 2015-10-15 17:09:34 +02:00
Vít Ondruch
68e54df6f9 Use --build-root parameter for %gem_install macro. 2015-10-13 15:45:30 +02:00
Vít Ondruch
7363e13e95 Fix --build-root parameter. 2015-10-13 15:45:02 +02:00
Vít Ondruch
5e775d5b36 Check RubyGems package version is correctness. 2015-10-13 15:44:08 +02:00
Vít Ondruch
4cabfa5ecd Upgrade to Ruby 2.3.0 (r52116). 2015-10-13 12:25:13 +02:00
Vít Ondruch
5fb941b6b1 Add bundling note and provides. 2015-10-12 17:00:01 +02:00
Vít Ondruch
487910a429 Upgrade to Ruby 2.3.0 (r51990). 2015-10-01 10:24:00 +02:00
Vít Ondruch
cb68f5b0a0 Upgrade to Ruby 2.3.0 (r51856).
Add did_you_mean subpackage.
2015-09-15 10:43:11 +02:00
Vít Ondruch
beb96df0f8 Add virtual provides for CCAN copylibs. 2015-09-10 14:19:11 +02:00
Michal Toman
5de5e64fb6 Add support for MIPS architecture to config.h 2015-09-04 14:59:19 +02:00
Vít Ondruch
c5ef1c85a6 Upgrade to Ruby 2.3.0 (r51741). 2015-09-03 09:20:39 +02:00
Vít Ondruch
4c8987c685 Upgrade to Ruby 2.3.0 (r51650). 2015-08-21 11:57:19 +02:00
Vít Ondruch
3259fec09c Upgrade to Ruby 2.3.0 (r51643). 2015-08-19 18:41:59 +02:00
Vít Ondruch
0670e2643a Don't duplicate documentation references. 2015-08-19 18:38:50 +02:00
Vít Ondruch
308d9dde3e Upgrade to Ruby 2.3.0 (r51358). 2015-07-24 10:25:07 +02:00
Vít Ondruch
080db3b208 Fix test broken by disable SSLv3 in OpenSSL. 2015-07-23 14:13:36 +02:00
Vít Ondruch
f340dfd422 Upgrade to Ruby 2.3.0 (r50909). 2015-06-15 13:03:29 +02:00
Vít Ondruch
b4b6c00b6b Upgrade to Ruby 2.3.0 (r50815).
Move gemified net-telnet into subpackage.
2015-06-11 14:33:33 +02:00
Vít Ondruch
219a5cc1c1 Fix the git BR following the git package split. 2015-06-10 15:21:46 +02:00
Vít Ondruch
f1c39c258f Tcl/Tk switch is not needed anymore. 2015-05-11 12:34:10 +02:00
Vít Ondruch
b3c4462754 Upgrade to Ruby 2.3.0 (r50427). 2015-05-05 13:04:23 +02:00
Vít Ondruch
d80a997514 Upgrade to Ruby 2.3.0 (r50329). 2015-04-17 10:02:39 +02:00
Vít Ondruch
06a694b247 Upgrade to Ruby 2.3.0 (r50153). 2015-04-02 16:18:38 +02:00
Vít Ondruch
36ef4abcf2 Use patches submitted upstream. 2015-04-01 17:08:04 +02:00
Vít Ondruch
6fbf02c6ff Upgrade to Ruby 2.3.0 (r50092). 2015-03-26 17:23:37 +01:00
Vít Ondruch
b23effe978 Upstream is moving documentation around, lets follow them. 2015-03-26 17:16:08 +01:00
Vít Ondruch
d096b7d67d dtrace does not appear in RbConfig anymore :(. 2015-03-26 17:13:01 +01:00
Vít Ondruch
77a06297c1 Upgrade to Ruby 2.3.0 (r50089). 2015-03-26 13:54:14 +01:00
Vít Ondruch
9e47922fba Fix libruby.so versions in SystemTap scripts (rhbz#1202232). 2015-03-24 14:04:02 +01:00
Vít Ondruch
f540fd4d1a Clarify Rake's license. 2015-03-11 13:00:46 +01:00
Vít Ondruch
9f767bacbc License clarifications. 2015-03-09 17:21:51 +01:00
Vít Ondruch
fc71a4ab8c Provides %{ruby_libarchdir} and %{gem_archdir} are now ignored by RPM. 2015-02-23 17:38:02 +01:00
Vít Ondruch
cb6be58447 Upgrade to Ruby 2.3.0 (r49705). 2015-02-23 17:07:59 +01:00
Vít Ondruch
f52580cb04 Fix directory ownership. 2015-02-05 17:45:00 +01:00
Vít Ondruch
4418ad2f78 Upgrade to Ruby 2.3.0 (r49495). 2015-02-04 16:47:09 +01:00
Vít Ondruch
e7f3c86e5a Initialize all load paths in operating_system.rb 2015-02-04 13:56:13 +01:00
Vít Ondruch
2d95badf6a Upgrade to Ruby 2.3.0 (r49485). 2015-02-03 16:20:24 +01:00
15 changed files with 620 additions and 180 deletions

4
.gitignore vendored
View file

@ -1,2 +1,4 @@
/*/
/ruby-2.*.tar.bz2
/ruby-2.2.0.tar.xz
/ruby-2.*.tar.xz
/*.rpm

View file

@ -44,6 +44,14 @@
#include "ruby/config-sparc.h"
#elif defined(__aarch64__)
#include "ruby/config-aarch64.h"
#elif defined(__mips64) && defined(__MIPSEL__)
#include "ruby/config-mips64el.h"
#elif defined(__mips64)
#include "ruby/config-mips64.h"
#elif defined(__mips) && defined(__MIPSEL__)
#include "ruby/config-mipsel.h"
#elif defined(__mips)
#include "ruby/config-mips.h"
#else
#error "The ruby-devel package is not usable with the architecture."
#endif

View file

@ -20,8 +20,7 @@ CONFIGURE_ARGS="--with-cflags='%{optflags}' $CONFIGURE_ARGS" \\\
gem install \\\
-V \\\
--local \\\
--install-dir %{-d*}%{!?-d:.%{gem_dir}} \\\
--bindir .%{_bindir} \\\
--build-root %{-d*}%{!?-d:.} \\\
--force \\\
--document=ri,rdoc \\\
%{-n*}%{!?-n:%{gem_name}-%{version}.gem} \

View file

@ -13,12 +13,28 @@ module Gem
end
private :previous_but_one_dir_to
##
# Detects --install-dir option specified on command line.
def opt_install_dir?
@opt_install_dir ||= ARGV.include?('--install-dir') || ARGV.include?('-i')
end
private :opt_install_dir?
##
# Detects --build-root option specified on command line.
def opt_build_root?
@opt_build_root ||= ARGV.include?('--build-root')
end
private :opt_build_root?
##
# Tries to detect, if arguments and environment variables suggest that
# 'gem install' is executed from rpmbuild.
def rpmbuild?
(ARGV.include?('--install-dir') || ARGV.include?('-i')) && ENV['RPM_PACKAGE_NAME']
@rpmbuild ||= ENV['RPM_PACKAGE_NAME'] && (opt_install_dir? || opt_build_root?)
end
private :rpmbuild?
@ -46,8 +62,10 @@ module Gem
RbConfig::CONFIG['libdir']
end
@default_dirs ||= Hash.new do |hash, key|
hash[key] = if path = default_locations[key]
@default_dirs ||= default_locations.inject(Hash.new) do |hash, location|
destination, path = location
hash[destination] = if path
{
:bin_dir => File.join(path, RbConfig::CONFIG['bindir'].split(File::SEPARATOR).last),
:gem_dir => File.join(path, RbConfig::CONFIG['datadir'].split(File::SEPARATOR).last, 'gems'),
@ -60,6 +78,8 @@ module Gem
:ext_dir => ''
}
end
hash
end
end
@ -76,7 +96,9 @@ module Gem
# RubyGems default overrides.
def default_dir
if Process.uid == 0
if opt_build_root?
Gem.default_dirs[:system][:gem_dir]
elsif Process.uid == 0
Gem.default_dirs[:local][:gem_dir]
else
Gem.user_dir
@ -89,7 +111,9 @@ module Gem
end
def default_bindir
if Process.uid == 0
if opt_build_root?
Gem.default_dirs[:system][:bin_dir]
elsif Process.uid == 0
Gem.default_dirs[:local][:bin_dir]
else
File.join [Dir.home, 'bin']

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

View file

@ -13,9 +13,9 @@ diff --git a/Makefile.in b/Makefile.in
index 7e8ed82..7916993 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -114,6 +114,8 @@ XRUBY_LIBDIR = @XRUBY_LIBDIR@
XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@
@@ -116,6 +116,8 @@ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@
XRUBY_RUBYHDRDIR = @XRUBY_RUBYHDRDIR@
BOOTSTRAPRUBY = @BOOTSTRAPRUBY@
+OPTIONAL_PRELUDES = @OPTIONAL_PRELUDES@
+
@ -26,7 +26,7 @@ diff --git a/common.mk b/common.mk
index 5cfbc3d..3f0a82e 100644
--- a/common.mk
+++ b/common.mk
@@ -115,7 +115,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS)
@@ -127,7 +127,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
@@ -4160,6 +4160,13 @@ AC_SUBST(rubyarchhdrdir)dnl
@@ -4334,6 +4334,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
@@ -3379,6 +3379,11 @@ if test ${multiarch+set}; then
@@ -3592,6 +3592,11 @@ if test ${multiarch+set}; then
fi
archlibdir='${libdir}/${arch}'

View file

@ -5,71 +5,25 @@ Subject: [PATCH] Prevent duplicated paths when empty version string is
configured.
---
configure.in | 15 +++++++++------
configure.in | 3 ++-
loadpath.c | 12 ++++++++++++
tool/mkconfig.rb | 2 +-
3 files changed, 22 insertions(+), 7 deletions(-)
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/configure.in b/configure.in
index 17ed3ed..5843651 100644
index db37cd6..ce8d149 100644
--- a/configure.in
+++ b/configure.in
@@ -3966,8 +3966,6 @@ AS_CASE(["$target_os"],
rubyw_install_name='$(RUBYW_INSTALL_NAME)'
])
@@ -4188,7 +4188,8 @@ AS_CASE(["$ruby_version_dir_name"],
ruby_version_dir=/'${ruby_version_dir_name}'
-rubylibdir='${rubylibprefix}/${ruby_version}'
-rubyarchdir=${multiarch+'${rubyarchprefix}/${ruby_version}'}${multiarch-'${rubylibdir}/${arch}'}
rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'}
AC_ARG_WITH(rubyarchprefix,
@@ -3997,6 +3995,7 @@ AC_ARG_WITH(ruby-version,
[ruby_version=full])
unset RUBY_LIB_VERSION
unset RUBY_LIB_VERSION_STYLE
+ruby_version_suffix=/'${ruby_version}'
AS_CASE(["$ruby_version"],
[full], [RUBY_LIB_VERSION_STYLE='3 /* full */'],
[minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */'])
@@ -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
if test -z "${ruby_version_dir_name}"; then
- AC_MSG_ERROR([No ruby version, No place for bundled libraries])
+ unset ruby_version_suffix
+ unset ruby_version_dir
+ AC_DEFINE(RUBY_LIB_VERSION_BLANK, 1)
else
RUBY_LIB_VERSION="${ruby_version}"
fi
AC_SUBST(RUBY_LIB_VERSION_STYLE)
AC_SUBST(RUBY_LIB_VERSION)
+rubylibdir='${rubylibprefix}'${ruby_version_suffix}
+rubyarchdir=${multiarch+'${rubyarchprefix}'${ruby_version_suffix}}${multiarch-'${rubylibdir}/${arch}'}
+
AC_ARG_WITH(sitedir,
AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]], "no" to disable site directory]),
[sitedir=$withval],
[sitedir='${rubylibprefix}/site_ruby'])
-sitelibdir='${sitedir}/${ruby_version}'
+sitelibdir='${sitedir}'${ruby_version_suffix}
AC_ARG_WITH(sitearchdir,
AS_HELP_STRING([--with-sitearchdir=DIR],
[architecture dependent site libraries in DIR [[SITEDIR/SITEARCH]], "no" to disable site directory]),
[sitearchdir=$withval],
- [sitearchdir=${multiarch+'${rubysitearchprefix}/site_ruby/${ruby_version}'}${multiarch-'${sitelibdir}/${sitearch}'}])
+ [sitearchdir=${multiarch+'${rubysitearchprefix}/site_ruby'${ruby_version_suffix}}${multiarch-'${sitelibdir}/${sitearch}'}])
AC_ARG_WITH(vendordir,
AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]], "no" to disable vendor directory]),
[vendordir=$withval],
[vendordir='${rubylibprefix}/vendor_ruby'])
-vendorlibdir='${vendordir}/${ruby_version}'
+vendorlibdir='${vendordir}'${ruby_version_suffix}
AC_ARG_WITH(vendorarchdir,
AS_HELP_STRING([--with-vendorarchdir=DIR],
rubylibdir='${rubylibprefix}'${ruby_version_dir}
diff --git a/loadpath.c b/loadpath.c
index 9160031..0d4d953 100644
--- a/loadpath.c
@ -113,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
@@ -123,7 +123,7 @@ File.foreach "config.status" do |line|
@@ -122,7 +122,7 @@ def config.write(arg)
val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump
case name
when /^prefix$/

View file

@ -11,8 +11,8 @@ diff --git a/configure.in b/configure.in
index 553d4d0..03a4152 100644
--- a/configure.in
+++ b/configure.in
@@ -4078,6 +4078,8 @@ AC_SUBST(vendorarchdir)dnl
@@ -4252,6 +4252,8 @@ AC_SUBST(vendorarchdir)dnl
AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl
AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl
+target_cpu=`echo $target_cpu | sed s/i.86/i386/`

View file

@ -15,9 +15,9 @@ diff --git a/configure.in b/configure.in
index 03a4152..0e371e2 100644
--- a/configure.in
+++ b/configure.in
@@ -4052,6 +4052,10 @@ AC_ARG_WITH(vendorarchdir,
@@ -4224,6 +4224,10 @@ AC_ARG_WITH(vendorarchdir,
[vendorarchdir=$withval],
[vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}])
[vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}])
+AC_ARG_WITH(rubygemsdir,
+ AS_HELP_STRING([--with-rubygemsdir=DIR], [custom rubygems directory]),
@ -26,14 +26,14 @@ index 03a4152..0e371e2 100644
if test "${LOAD_RELATIVE+set}"; then
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
RUBY_EXEC_PREFIX=''
@@ -4075,6 +4079,7 @@ AC_SUBST(sitearchdir)dnl
@@ -4248,6 +4252,7 @@ AC_SUBST(sitearchdir)dnl
AC_SUBST(vendordir)dnl
AC_SUBST(vendorlibdir)dnl
AC_SUBST(vendorarchdir)dnl
+AC_SUBST(rubygemsdir)dnl
AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl
AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl
diff --git a/loadpath.c b/loadpath.c
index 623dc9d..74c5d9e 100644
--- a/loadpath.c
@ -53,7 +53,7 @@ diff --git a/template/verconf.h.tmpl b/template/verconf.h.tmpl
index 79c003e..34f2382 100644
--- a/template/verconf.h.tmpl
+++ b/template/verconf.h.tmpl
@@ -34,6 +34,9 @@
@@ -36,6 +36,9 @@
% if C["RUBY_SEARCH_PATH"]
#define RUBY_SEARCH_PATH "${RUBY_SEARCH_PATH}"
% end
@ -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
@@ -317,6 +317,7 @@ sitelibdir = CONFIG["sitelibdir"]
@@ -328,6 +328,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"])
@@ -505,7 +506,15 @@ end
@@ -506,7 +507,15 @@ def CONFIG.[](name, mandatory = false)
install?(:local, :comm, :lib) do
prepare "library scripts", rubylibdir
noinst = %w[README* *.txt *.rdoc *.gemspec]

View file

@ -0,0 +1,28 @@
From 07eb5f5e775dec01a92a8b13910eaced9e8ee0cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Tue, 2 Dec 2014 10:56:58 +0100
Subject: [PATCH] Generate preludes using miniruby.
---
common.mk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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)
$(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)
$(ECHO) generating $@
- $(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \
+ $(Q) $(MINIRUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \
$(srcdir)/template/prelude.c.tmpl $(PRELUDE_SCRIPTS)
{$(VPATH)}golf_prelude.c: $(COMPILE_PRELUDE) {$(srcdir)}golf_prelude.rb
--
2.6.3

View file

@ -0,0 +1,300 @@
From 4fc1be3af3f58621bb751c9e63c208b15c0e8d16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Tue, 31 Mar 2015 16:21:04 +0200
Subject: [PATCH 1/4] Use ruby_version_dir_name for versioned directories.
This disallows changing the ruby_version constant by --with-ruby-version
configuration options. The two places version numbers are disallowed as
well, since there are a lot of places which cannot handle this format
properly.
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 ++++++++++++++++++++++++++++-------------------------
template/ruby.pc.in | 1 +
2 files changed, 37 insertions(+), 32 deletions(-)
diff --git a/configure.in b/configure.in
index db37cd6..6e73fae 100644
--- a/configure.in
+++ b/configure.in
@@ -4137,9 +4137,6 @@ AS_CASE(["$target_os"],
rubyw_install_name='$(RUBYW_INSTALL_NAME)'
])
-rubylibdir='${rubylibprefix}/${ruby_version}'
-rubyarchdir=${multiarch+'${rubyarchprefix}/${ruby_version}'}${multiarch-'${rubylibdir}/${arch}'}
-
rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'}
AC_ARG_WITH(rubyarchprefix,
AS_HELP_STRING([--with-rubyarchprefix=DIR],
@@ -4162,58 +4159,64 @@ AC_ARG_WITH(ridir,
AC_SUBST(ridir)
AC_SUBST(RI_BASE_NAME)
-AC_ARG_WITH(ruby-version,
- AS_HELP_STRING([--with-ruby-version=STR], [ruby version string for version specific directories [[full]] (full|minor|STR)]),
- [ruby_version=$withval],
- [ruby_version=full])
unset RUBY_LIB_VERSION
-unset RUBY_LIB_VERSION_STYLE
-AS_CASE(["$ruby_version"],
- [full], [RUBY_LIB_VERSION_STYLE='3 /* full */'],
- [minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */'])
-if test ${RUBY_LIB_VERSION_STYLE+set}; then
- {
- 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
- AC_MSG_ERROR([No ruby version, No place for bundled libraries])
-else
- RUBY_LIB_VERSION="${ruby_version}"
-fi
+RUBY_LIB_VERSION_STYLE='3 /* full */'
+{
+echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE"
+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
+
+RUBY_LIB_VERSION="${ruby_version}"
+
AC_SUBST(RUBY_LIB_VERSION_STYLE)
AC_SUBST(RUBY_LIB_VERSION)
+AC_ARG_WITH(ruby-version,
+ AS_HELP_STRING([--with-ruby-version=STR], [ruby version string for version specific directories [[full]] (full|STR)]),
+ [ruby_version_dir_name=$withval],
+ [ruby_version_dir_name=full])
+AS_CASE(["$ruby_version_dir_name"],
+ [full], [ruby_version_dir_name='${ruby_version}'])
+
+ruby_version_dir=/'${ruby_version_dir_name}'
+
+if test -z "${ruby_version_dir_name}"; then
+ AC_MSG_ERROR([No ruby version, No place for bundled libraries])
+fi
+
+rubylibdir='${rubylibprefix}'${ruby_version_dir}
+rubyarchdir=${multiarch+'${rubyarchprefix}'${ruby_version_dir}}${multiarch-'${rubylibdir}/${arch}'}
+
AC_ARG_WITH(sitedir,
AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]], "no" to disable site directory]),
[sitedir=$withval],
[sitedir='${rubylibprefix}/site_ruby'])
-sitelibdir='${sitedir}/${ruby_version}'
+sitelibdir='${sitedir}'${ruby_version_dir}
AC_ARG_WITH(sitearchdir,
AS_HELP_STRING([--with-sitearchdir=DIR],
[architecture dependent site libraries in DIR [[SITEDIR/SITEARCH]], "no" to disable site directory]),
[sitearchdir=$withval],
- [sitearchdir=${multiarch+'${rubysitearchprefix}/site_ruby/${ruby_version}'}${multiarch-'${sitelibdir}/${sitearch}'}])
+ [sitearchdir=${multiarch+'${rubysitearchprefix}/site_ruby'${ruby_version_dir}}${multiarch-'${sitelibdir}/${sitearch}'}])
AC_ARG_WITH(vendordir,
AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]], "no" to disable vendor directory]),
[vendordir=$withval],
[vendordir='${rubylibprefix}/vendor_ruby'])
-vendorlibdir='${vendordir}/${ruby_version}'
+vendorlibdir='${vendordir}'${ruby_version_dir}
AC_ARG_WITH(vendorarchdir,
AS_HELP_STRING([--with-vendorarchdir=DIR],
[architecture dependent vendor libraries in DIR [[VENDORDIR/SITEARCH]], "no" to disable vendor directory]),
[vendorarchdir=$withval],
- [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}])
+ [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}])
if test "${LOAD_RELATIVE+set}"; then
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
@@ -4230,6 +4233,7 @@ AC_SUBST(sitearchincludedir)dnl
AC_SUBST(arch)dnl
AC_SUBST(sitearch)dnl
AC_SUBST(ruby_version)dnl
+AC_SUBST(ruby_version_dir_name)dnl
AC_SUBST(rubylibdir)dnl
AC_SUBST(rubyarchdir)dnl
AC_SUBST(sitedir)dnl
diff --git a/template/ruby.pc.in b/template/ruby.pc.in
index 8a2c066..c81b211 100644
--- a/template/ruby.pc.in
+++ b/template/ruby.pc.in
@@ -9,6 +9,7 @@ MAJOR=@MAJOR@
MINOR=@MINOR@
TEENY=@TEENY@
ruby_version=@ruby_version@
+ruby_version_dir_name=@ruby_version_dir_name@
RUBY_PROGRAM_VERSION=@RUBY_PROGRAM_VERSION@
RUBY_BASE_NAME=@RUBY_BASE_NAME@
RUBY_VERSION_NAME=@RUBY_VERSION_NAME@
--
2.1.0
From 518850aba6eee76de7715aae8d37330e34b01983 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Tue, 31 Mar 2015 16:37:26 +0200
Subject: [PATCH 2/4] Add ruby_version_dir_name support for RDoc.
---
lib/rdoc/ri/paths.rb | 2 +-
tool/rbinstall.rb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/rdoc/ri/paths.rb b/lib/rdoc/ri/paths.rb
index 970cb91..5bf8230 100644
--- a/lib/rdoc/ri/paths.rb
+++ b/lib/rdoc/ri/paths.rb
@@ -10,7 +10,7 @@ module RDoc::RI::Paths
#:stopdoc:
require 'rbconfig'
- version = RbConfig::CONFIG['ruby_version']
+ version = RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']
BASE = if RbConfig::CONFIG.key? 'ridir' then
File.join RbConfig::CONFIG['ridir'], version
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)
install?(:doc, :rdoc) do
if $rdocdir
- ridatadir = File.join(CONFIG['ridir'], CONFIG['ruby_version'], "system")
+ ridatadir = File.join(CONFIG['ridir'], CONFIG['ruby_version_dir_name'] || CONFIG['ruby_version'], "system")
prepare "rdoc", ridatadir
install_recursive($rdocdir, ridatadir, :mode => $data_mode)
end
--
2.1.0
From f8d136f9a46d1fe87eba622ab9665935d05e981b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Tue, 31 Mar 2015 16:37:44 +0200
Subject: [PATCH 3/4] Add ruby_version_dir_name support for RubyGems.
---
lib/rubygems/defaults.rb | 11 ++++++-----
test/rubygems/test_gem.rb | 5 +++--
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb
index 55ca080..75eea2b 100644
--- a/lib/rubygems/defaults.rb
+++ b/lib/rubygems/defaults.rb
@@ -32,20 +32,20 @@ def self.default_dir
[
File.dirname(RbConfig::CONFIG['sitedir']),
'Gems',
- RbConfig::CONFIG['ruby_version']
+ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']
]
elsif RbConfig::CONFIG['rubylibprefix'] then
[
RbConfig::CONFIG['rubylibprefix'],
'gems',
- RbConfig::CONFIG['ruby_version']
+ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']
]
else
[
RbConfig::CONFIG['libdir'],
ruby_engine,
'gems',
- RbConfig::CONFIG['ruby_version']
+ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']
]
end
@@ -75,7 +75,8 @@ def self.default_rubygems_dirs
def self.user_dir
parts = [Gem.user_home, '.gem', ruby_engine]
- parts << RbConfig::CONFIG['ruby_version'] unless RbConfig::CONFIG['ruby_version'].empty?
+ ruby_version_dir_name = RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']
+ parts << ruby_version_dir_name unless ruby_version_dir_name.empty?
File.join parts
end
@@ -172,7 +173,7 @@ def self.vendor_dir # :nodoc:
return nil unless RbConfig::CONFIG.key? 'vendordir'
File.join RbConfig::CONFIG['vendordir'], 'gems',
- RbConfig::CONFIG['ruby_version']
+ 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
def test_self_user_dir
parts = [@userhome, '.gem', Gem.ruby_engine]
- parts << RbConfig::CONFIG['ruby_version'] unless RbConfig::CONFIG['ruby_version'].empty?
+ ruby_version_dir_name = RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']
+ parts << ruby_version_dir_name unless ruby_version_dir_name.empty?
assert_equal File.join(parts), Gem.user_dir
end
@@ -1090,7 +1091,7 @@ def test_self_user_home_user_drive_and_path
def test_self_vendor_dir
expected =
File.join RbConfig::CONFIG['vendordir'], 'gems',
- RbConfig::CONFIG['ruby_version']
+ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']
assert_equal expected, Gem.vendor_dir
end
--
2.1.0
From 88c38a030c22dbf9422ece847bdfbf87d6659313 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Wed, 1 Apr 2015 14:55:37 +0200
Subject: [PATCH 4/4] Let headers directories follow the configured version
name.
---
configure.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.in b/configure.in
index 6e73fae..c842725 100644
--- a/configure.in
+++ b/configure.in
@@ -274,7 +274,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)
-AC_SUBST(RUBY_VERSION_NAME, '${RUBY_BASE_NAME}-${ruby_version}')
+AC_SUBST(RUBY_VERSION_NAME, '${RUBY_BASE_NAME}-${ruby_version_dir_name}')
AC_CANONICAL_TARGET
test x"$target_alias" = x &&
--
2.1.0

257
ruby.spec
View file

@ -1,5 +1,5 @@
%global major_version 2
%global minor_version 2
%global minor_version 3
%global teeny_version 0
%global major_minor_version %{major_version}.%{minor_version}
@ -7,10 +7,10 @@
%global ruby_release %{ruby_version}
# Specify the named version. It has precedense to revision.
#%%global milestone rc1
#%%global milestone preview2
# Keep the revision enabled for pre-releases from SVN.
#%%global revision 48936
#%%global revision 53264
%global ruby_archive %{name}-%{ruby_version}
@ -21,28 +21,32 @@
%endif
%global release 5
%global release 50
%{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}}
%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.
%global rubygems_dir %{_datadir}/rubygems
# Bundled libraries versions
%global rubygems_version 2.5.1
%global molinillo_version 0.4.0
# 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.6
%global io_console_version 0.4.3
%global json_version 1.8.1
%global minitest_version 5.4.3
%global power_assert_version 0.2.2
%global psych_version 2.0.8
%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.0
%global test_unit_version 3.0.8
%global rdoc_version 4.2.1
%global net_telnet_version 0.1.1
%global test_unit_version 3.1.5
# Might not be needed in the future, if we are lucky enough.
# https://bugzilla.redhat.com/show_bug.cgi?id=888262
@ -61,8 +65,11 @@ Name: ruby
Version: %{ruby_version}
Release: %{release_string}
Group: Development/Languages
# Public Domain for example for: include/ruby/st.h, strftime.c, ...
License: (Ruby or BSD) and Public Domain
# Public Domain for example for: include/ruby/st.h, strftime.c, missing/*, ...
# MIT and CCO: ccan/*
# zlib: ext/digest/md5/md5.*, ext/nkf/nkf-utf8/nkf.c
# UCD: some of enc/trans/**/*.src
License: (Ruby or BSD) and Public Domain and MIT and CC0 and zlib and UCD
URL: http://ruby-lang.org/
Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{major_minor_version}/%{ruby_archive}.tar.xz
Source1: operating_system.rb
@ -81,23 +88,28 @@ Source7: config.h
Source8: rubygems.attr
Source9: rubygems.req
Source10: rubygems.prov
# SystemTap sanity test case.
Source11: test_systemtap.rb
# ABRT hoook test case.
Source12: test_abrt.rb
# SystemTap tests.
Source13: test_systemtap.rb
# The load directive is supported since RPM 4.12, i.e. F21+. The build process
# fails on older Fedoras.
%{?load:%{SOURCE4}}
%{?load:%{SOURCE5}}
# Fix ruby_version abuse.
# https://bugs.ruby-lang.org/issues/11002
Patch0: ruby-2.3.0-ruby_version.patch
# http://bugs.ruby-lang.org/issues/7807
Patch0: ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch
Patch1: ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch
# Allows to override libruby.so placement. Hopefully we will be able to return
# to plain --with-rubyarchprefix.
# http://bugs.ruby-lang.org/issues/8973
Patch1: ruby-2.1.0-Enable-configuration-of-archlibdir.patch
Patch2: 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
Patch3: ruby-2.1.0-always-use-i386.patch
# Allows to install RubyGems into custom directory, outside of Ruby's tree.
# http://bugs.ruby-lang.org/issues/5617
Patch4: ruby-2.1.0-custom-rubygems-location.patch
@ -107,14 +119,15 @@ 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
# Use miniruby to regenerate prelude.c.
# https://bugs.ruby-lang.org/issues/10554
Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: ruby(rubygems) >= %{rubygems_version}
# Make the bigdecimal gem a runtime dependency of Ruby to avoid problems
# with user-installed gems, that don't require it in gemspec/Gemfile
# See https://bugzilla.redhat.com/show_bug.cgi?id=829209
# and http://bugs.ruby-lang.org/issues/6123
Requires: rubygem(bigdecimal) >= %{bigdecimal_version}
Suggests: rubypick
Recommends: ruby(rubygems) >= %{rubygems_version}
Recommends: rubygem(bigdecimal) >= %{bigdecimal_version}
Recommends: rubygem(did_you_mean) >= %{did_you_mean_version}
BuildRequires: autoconf
BuildRequires: gdbm-devel
@ -127,15 +140,13 @@ BuildRequires: tk-devel
BuildRequires: procps
BuildRequires: %{_bindir}/dtrace
# RubyGems test suite optional dependencies.
BuildRequires: %{_bindir}/git
BuildRequires: git
BuildRequires: %{_bindir}/cmake
# 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
@ -158,9 +169,17 @@ Group: Development/Libraries
License: Ruby or BSD
Provides: ruby(release) = %{ruby_release}
# Virtual provides for CCAN copylibs.
# https://fedorahosted.org/fpc/ticket/364
Provides: bundled(ccan-build_assert)
Provides: bundled(ccan-check_type)
Provides: bundled(ccan-container_of)
Provides: bundled(ccan-list)
%description libs
This package includes the libruby, necessary to run Ruby.
# TODO: Rename or not rename to ruby-rubygems?
%package -n rubygems
Summary: The Ruby standard for packaging ruby libraries
@ -168,13 +187,14 @@ Version: %{rubygems_version}
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}
Recommends: rubygem(rdoc) >= %{rdoc_version}
Recommends: rubygem(io-console) >= %{io_console_version}
Requires: rubygem(psych) >= %{psych_version}
Provides: gem = %{version}-%{release}
Provides: ruby(rubygems) = %{version}-%{release}
# https://github.com/rubygems/rubygems/pull/1189#issuecomment-121600910
Provides: bundled(rubygem(molinillo)) = %{molinillo_version}
Provides: bundled(rubygem-molinillo) = %{molinillo_version}
BuildArch: noarch
%description -n rubygems
@ -188,6 +208,8 @@ Version: %{rubygems_version}
Group: Development/Libraries
License: Ruby or MIT
Requires: ruby(rubygems) = %{version}-%{release}
# Needed for RDoc documentation format generation.
Requires: rubygem(json) >= %{json_version}
BuildArch: noarch
%description -n rubygems-devel
@ -198,7 +220,7 @@ Macros and development tools for packaging RubyGems.
Summary: Ruby based make-like utility
Version: %{rake_version}
Group: Development/Libraries
License: Ruby or MIT
License: MIT
Requires: ruby(release)
Requires: ruby(rubygems) >= %{rubygems_version}
Provides: rake = %{version}-%{release}
@ -228,11 +250,12 @@ from the terminal.
Summary: A tool to generate HTML and command-line documentation for Ruby projects
Version: %{rdoc_version}
Group: Development/Libraries
License: GPLv2 and Ruby and MIT
# SIL: lib/rdoc/generator/template/darkfish/css/fonts.css
License: GPLv2 and Ruby and MIT and SIL
Requires: ruby(release)
Requires: ruby(rubygems) >= %{rubygems_version}
Requires: ruby(irb) = %{irb_version}
Requires: rubygem(json) >= %{json_version}
Recommends: rubygem(json) >= %{json_version}
Provides: rdoc = %{version}-%{release}
Provides: ri = %{version}-%{release}
Provides: rubygem(rdoc) = %{version}-%{release}
@ -276,6 +299,20 @@ floating point arithmetic often introduces subtle errors because of the
conversion between base 10 and base 2.
%package -n rubygem-did_you_mean
Summary: "Did you mean?" experience in Ruby
Version: %{did_you_mean_version}
Group: Development/Libraries
License: MIT
Requires: ruby(release)
Requires: ruby(rubygems) >= %{rubygems_version}
Provides: rubygem(did_you_mean) = %{version}-%{release}
%description -n rubygem-did_you_mean
"did you mean?" experience in Ruby: the error message will tell you the right
one when you misspelled something.
%package -n rubygem-io-console
Summary: IO/Console is a simple console utilizing library
Version: %{io_console_version}
@ -293,7 +330,8 @@ provide higher layer features, such like curses and readline.
Summary: This is a JSON implementation as a Ruby extension in C
Version: %{json_version}
Group: Development/Libraries
License: Ruby or GPLv2
# UCD: ext/json/generator/generator.c
License: (Ruby or GPLv2) and UCD
Requires: ruby(release)
Requires: ruby(rubygems) >= %{rubygems_version}
Provides: rubygem(json) = %{version}-%{release}
@ -330,8 +368,6 @@ 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}
@ -343,7 +379,9 @@ Provides: rubygem(power_assert) = %{version}-%{release}
BuildArch: noarch
%description -n rubygem-power_assert
Power Assert for Ruby.
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 rubygem-psych
@ -362,6 +400,25 @@ 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 rubygem-net-telnet
Summary: Provides telnet client functionality
Version: %{net_telnet_version}
Group: Development/Libraries
Requires: ruby(release)
Requires: ruby(rubygems) >= %{rubygems_version}
Provides: rubygem(net-telnet) = %{version}-%{release}
%description -n rubygem-net-telnet
Provides telnet client functionality.
This class also has, through delegation, all the methods of a socket object
(by default, a TCPSocket, but can be set by the Proxy option to new()). This
provides methods such as close() to end the session and sysread() to read data
directly from the host, instead of via the waitfor() mechanism. Note that if
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 rubygem-test-unit
@ -402,9 +459,11 @@ rm -rf ext/fiddle/libffi*
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
# Provide an example of usage of the tapset:
cp -a %{SOURCE3} .
@ -431,17 +490,12 @@ autoconf
--with-vendorarchhdrdir='$(vendorhdrdir)/$(arch)' \
--with-rubygemsdir='%{rubygems_dir}' \
--with-ruby-pc='%{name}.pc' \
--with-tcltkversion=8.6 \
--disable-rpath \
--enable-shared \
--with-ruby-version='' \
--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=
@ -503,10 +557,6 @@ mkdir -p %{buildroot}%{_exec_prefix}/lib{,64}/gems/%{name}
# Move bundled rubygems to %%gem_dir and %%gem_extdir_mri
# make symlinks for io-console and bigdecimal, which are considered to be part of stdlib by other Gems
mkdir -p %{buildroot}%{gem_dir}/gems/rake-%{rake_version}/lib
mv %{buildroot}%{ruby_libdir}/rake* %{buildroot}%{gem_dir}/gems/rake-%{rake_version}/lib
mv %{buildroot}%{gem_dir}/specifications/default/rake-%{rake_version}.gemspec %{buildroot}%{gem_dir}/specifications
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
@ -544,61 +594,49 @@ ln -s %{_libdir}/gems/%{name}/psych-%{psych_version}/psych.so %{buildroot}%{ruby
# Adjust the gemspec files so that the gems will load properly
sed -i '/^end$/ i\
s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/rake-%{rake_version}.gemspec
sed -i '/^end$/ i\
s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/rdoc-%{rdoc_version}.gemspec
sed -i '/^end$/ i\
s.require_paths = ["lib"]\
s.extensions = ["bigdecimal.so"]' %{buildroot}%{gem_dir}/specifications/bigdecimal-%{bigdecimal_version}.gemspec
sed -i '/^end$/ i\
s.require_paths = ["lib"]\
s.extensions = ["io/console.so"]' %{buildroot}%{gem_dir}/specifications/io-console-%{io_console_version}.gemspec
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
# Push the .gemspecs through the RubyGems to let them write the stub headers.
# This speeds up loading of libraries and avoids warnings in Spring:
# https://github.com/rubygems/rubygems/pull/694
for s in rake-%{rake_version}.gemspec rdoc-%{rdoc_version}.gemspec json-%{json_version}.gemspec; do
s="%{buildroot}%{gem_dir}/specifications/$s"
make runruby TESTRUN_SCRIPT="-rubygems \
-e \"spec = Gem::Specification.load(%{$s})\" \
-e \"File.write %{$s}, spec.to_ruby\""
done
# Move man pages into proper location
mv %{buildroot}%{gem_dir}/gems/rake-%{rake_version}/doc/rake.1 %{buildroot}%{_mandir}/man1
# 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}|" \
%{SOURCE2} > %{buildroot}%{tapset_dir}/libruby.so.%{ruby_version}.stp
sed -e "s|@LIBRARY_PATH@|%{tapset_libdir}/libruby.so.%{major_minor_version}|" \
%{SOURCE2} > %{buildroot}%{tapset_dir}/libruby.so.%{major_minor_version}.stp
# Escape '*/' in comment.
sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{ruby_version}.stp
sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{major_minor_version}.stp
# Prepare -doc subpackage file lists.
find doc -maxdepth 1 -type f ! -name '.*' ! -name '*.ja*' > .ruby-doc.en
echo 'doc/images' >> .ruby-doc.en
echo 'doc/syntax' >> .ruby-doc.en
find doc -maxdepth 1 -type f -name '*.ja*' > .ruby-doc.ja
echo 'doc/irb' >> .ruby-doc.ja
echo 'doc/pty' >> .ruby-doc.ja
sed -i 's/^/%doc /' .ruby-doc.*
sed -i 's/^/%lang(ja) /' .ruby-doc.ja
%check
# Sanity check that SystemTap (dtrace) was detected.
make runruby TESTRUN_SCRIPT=%{SOURCE11}
DISABLE_TESTS=""
# Check RubyGems version correctness.
[ "`make runruby TESTRUN_SCRIPT='bin/gem -v' | tail -1`" == '%{rubygems_version}' ]
# Check Molinillo version correctness.
[ "`make runruby TESTRUN_SCRIPT=\"-e \\\"module Gem; module Resolver; end; end; require 'rubygems/resolver/molinillo/lib/molinillo/gem_metadata'; puts Gem::Resolver::Molinillo::VERSION\\\"\" | tail -1`" \
== '%{molinillo_version}' ]
# test_debug(TestRubyOptions) fails due to LoadError reported in debug mode,
# when abrt.rb cannot be required (seems to be easier way then customizing
# the test suite).
touch abrt.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
# Check if abrt hook is required.
make runruby TESTRUN_SCRIPT=%{SOURCE12}
# 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
# Check if systemtap is supported.
make runruby TESTRUN_SCRIPT=%{SOURCE13}
DISABLE_TESTS=""
make check TESTS="-v $DISABLE_TESTS"
@ -626,8 +664,6 @@ make check TESTS="-v $DISABLE_TESTS"
%lang(ja) %doc COPYING.ja
%doc GPL
%doc LEGAL
%doc README.EXT
%lang(ja) %doc README.EXT.ja
%{_rpmconfigdir}/macros.d/macros.ruby
@ -641,9 +677,7 @@ make check TESTS="-v $DISABLE_TESTS"
%doc GPL
%doc LEGAL
%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}
@ -688,6 +722,8 @@ make check TESTS="-v $DISABLE_TESTS"
# Platform specific libraries.
%{_libdir}/libruby.so.*
%dir %{ruby_libarchdir}
%dir %{ruby_libarchdir}/cgi
%{ruby_libarchdir}/cgi/escape.so
%{ruby_libarchdir}/continuation.so
%{ruby_libarchdir}/coverage.so
%{ruby_libarchdir}/date_core.so
@ -731,6 +767,7 @@ make check TESTS="-v $DISABLE_TESTS"
%dir %{ruby_libarchdir}/enc/trans
%{ruby_libarchdir}/enc/trans/big5.so
%{ruby_libarchdir}/enc/trans/chinese.so
%{ruby_libarchdir}/enc/trans/ebcdic.so
%{ruby_libarchdir}/enc/trans/emoji.so
%{ruby_libarchdir}/enc/trans/emoji_iso2022_kddi.so
%{ruby_libarchdir}/enc/trans/emoji_sjis_docomo.so
@ -752,7 +789,9 @@ make check TESTS="-v $DISABLE_TESTS"
%{ruby_libarchdir}/enc/utf_16le.so
%{ruby_libarchdir}/enc/utf_32be.so
%{ruby_libarchdir}/enc/utf_32le.so
%{ruby_libarchdir}/enc/windows_1250.so
%{ruby_libarchdir}/enc/windows_1251.so
%{ruby_libarchdir}/enc/windows_1252.so
%{ruby_libarchdir}/enc/windows_31j.so
%{ruby_libarchdir}/etc.so
%{ruby_libarchdir}/fcntl.so
@ -772,6 +811,7 @@ make check TESTS="-v $DISABLE_TESTS"
%{ruby_libarchdir}/pty.so
%dir %{ruby_libarchdir}/racc
%{ruby_libarchdir}/racc/cparse.so
%dir %{ruby_libarchdir}/rbconfig
%{ruby_libarchdir}/rbconfig.rb
%{ruby_libarchdir}/rbconfig/sizeof.so
%{ruby_libarchdir}/readline.so
@ -832,11 +872,9 @@ make check TESTS="-v $DISABLE_TESTS"
%{gem_dir}/specifications/rdoc-%{rdoc_version}.gemspec
%{_mandir}/man1/ri*
%files doc
%files doc -f .ruby-doc.en -f .ruby-doc.ja
%doc README.md
%lang(ja) %doc README.ja.md
%doc ChangeLog
%doc doc/ChangeLog-*
%doc ruby-exercise.stp
%{_datadir}/ri
@ -847,6 +885,11 @@ make check TESTS="-v $DISABLE_TESTS"
%{gem_dir}/gems/bigdecimal-%{bigdecimal_version}
%{gem_dir}/specifications/bigdecimal-%{bigdecimal_version}.gemspec
%files -n rubygem-did_you_mean
%{gem_dir}/gems/did_you_mean-%{did_you_mean_version}
%exclude %{gem_dir}/gems/did_you_mean-%{did_you_mean_version}/.*
%{gem_dir}/specifications/did_you_mean-%{did_you_mean_version}.gemspec
%files -n rubygem-io-console
%{ruby_libdir}/io
%{ruby_libarchdir}/io/console.so
@ -877,6 +920,11 @@ make check TESTS="-v $DISABLE_TESTS"
%{gem_dir}/gems/psych-%{psych_version}
%{gem_dir}/specifications/psych-%{psych_version}.gemspec
%files -n rubygem-net-telnet
%{gem_dir}/gems/net-telnet-%{net_telnet_version}
%exclude %{gem_dir}/gems/net-telnet-%{net_telnet_version}/.*
%{gem_dir}/specifications/net-telnet-%{net_telnet_version}.gemspec
%files -n rubygem-test-unit
%{gem_dir}/gems/test-unit-%{test_unit_version}
%{gem_dir}/specifications/test-unit-%{test_unit_version}.gemspec
@ -891,6 +939,21 @@ make check TESTS="-v $DISABLE_TESTS"
%{ruby_libdir}/tkextlib
%changelog
* Mon Jan 04 2016 Vít Ondruch <vondruch@redhat.com> - 2.3.0-50
- Upgrade to Ruby 2.3.0.
- Fix ABRT hook autoloading.
- Initialize all load paths in operating_system.rb.
- Fix directory ownership.
- Fix the git BR following the git package split.
- Move gemified net-telnet into subpackage.
- Add did_you_mean subpackage.
- Add support for MIPS architecture to config.h.
- Add virtual provides for CCAN copylibs.
- Use weak dependencies.
* Tue Dec 22 2015 Pavel Valena <pvalena@redhat.com> - 2.3.0-0.7.preview2
- Add systemtap tests.
* Tue Feb 03 2015 Vít Ondruch <vondruch@redhat.com> - 2.2.0-5
- Make operating_system.rb more robust.
- Add RubyGems stub headers for bundled gems.

7
test_abrt.rb Normal file
View file

@ -0,0 +1,7 @@
if !!$LOADED_FEATURES.detect { |f| f =~ /abrt\.rb/ }
exit true
else
puts 'ERROR: ABRT hook was not loaded.'
exit false
end

View file

@ -1,9 +1,64 @@
require 'rbconfig'
require 'set'
if RbConfig::CONFIG.select {|k, v| v =~ /dtrace/}.size == 1
exit true
else
puts 'ERROR: SystemTap (dtrace) support was not detected.'
LIBRUBY_SO = 'libruby.so'
PROBES_D = 'probes.d'
###
# Detect SystemTap section headers presence.
stap_headers = [
'\.stapsdt\.base',
'\.note\.stapsdt'
]
header_regexp = %r{ (#{stap_headers.join('|')}) }
section_headers = `readelf -S "#{LIBRUBY_SO}"`
detected_stap_headers = section_headers.scan(header_regexp).flatten
# Assume there are both headers until this is proven wrong ;)
unless detected_stap_headers.size == 2
puts 'ERROR: SystemTap (DTrace) headers were not detected in resulting library.'
exit false
end
###
# Find if every declared probe is propagated to resulting library.
# Colect probes specified in probes.d file.
probes = []
File.open(PROBES_D) do |file|
file.each_line do |line|
if probe = line[/probe (\S+)\(.*\);/, 1]
probes << probe
end
end
end
probes = Set.new probes
# These probes are excluded by VM_COLLECT_USAGE_DETAILS ifdef.
EXCLUDE_PROBES = Set.new %w(insn insn__operand)
unless EXCLUDE_PROBES.subset? probes
puts 'ERROR: Change in SystemTap (DTrace) probes definition file detected.'
exit false
end
probes -= EXCLUDE_PROBES
# Detect probes in resulting library.
probe_regexp = %r{
^\s*stapsdt\s*0[xX][0-9a-fA-F]+\tNT_STAPSDT \(SystemTap probe descriptors\)$
^\s*Provider: ruby$
^\s*Name: (\S+)$
}
notes = `readelf -n "#{LIBRUBY_SO}"`
detected_probes = Set.new notes.scan(probe_regexp).flatten
# Both sets must be equal, otherwise something is wrong.
unless probes == detected_probes
puts 'ERROR: SystemTap (DTrace) probes were not correctly propagated into resulting library.'
exit false
end