Compare commits

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

87 commits

Author SHA1 Message Date
Vít Ondruch
5c3192eb43 Fix random WEBRick test failures. 2013-02-22 13:43:34 +01:00
Vít Ondruch
7719831647 Fix rubygem-bigdecimal version.
Upstream patch applied, until it is backported for 2.0.0.
2013-02-22 13:39:30 +01:00
Vít Ondruch
0381e73449 Upgrade to Ruby 2.0.0 (r39387). 2013-02-22 13:39:30 +01:00
Vít Ondruch
84dd0dc693 Change to backport error number. 2013-02-22 13:39:30 +01:00
Vít Ondruch
54c8ac4750 One PPC error was fixed, other was introduced. 2013-02-22 13:39:23 +01:00
Vít Ondruch
ed5c126862 Adjust the patch to pass test_archdirs(TestRbConfig).
This is hopefuly better aligned with upstream intentions.
2013-02-22 11:52:15 +01:00
Vít Ondruch
6bbe91338d Revert "Add architecture dependency on ruby-libs to ruby-irb."
This reverts commit d3938ffb0a, since it
produces build error:

BuildError: mismatch when analyzing
ruby-irb-2.0.0.0-0.1.r39357.fc19.noarch.rpm, rpmdiff output was:
removed     REQUIRES ruby-libs(x86-64) = 2.0.0.0
added       REQUIRES ruby-libs(x86-32) = 2.0.0.0
2013-02-22 09:09:33 +01:00
Vít Ondruch
452d82629d Add reference to upstream ticket possibly removing one patch. 2013-02-21 15:52:32 +01:00
Vít Ondruch
366b0e9454 Ensure that rubygem-bigdecimal has higher release then the one from Ruby 1.9.3. 2013-02-21 14:37:50 +01:00
Vít Ondruch
9ccbda6047 Upgrade to Ruby 2.0.0 (r39357). 2013-02-21 14:36:05 +01:00
Vít Ondruch
ab0e460c3c Macros should not be expanded during Ruby build. 2013-02-21 09:58:27 +01:00
Vít Ondruch
d5cde5c082 Create the .%{gem_dir} and allow to override gem installation dir. 2013-02-19 13:52:15 +01:00
Vít Ondruch
27f535fbb2 Introduce %gem_install macro. 2013-02-19 10:13:20 +01:00
Vít Ondruch
ae0567b7b5 Fix installation of binary gems. 2013-02-15 18:06:40 +01:00
Vít Ondruch
2ec849748a Upgrade to Ruby 2.0.0 (r39237). 2013-02-14 17:13:24 +01:00
Vít Ondruch
41d5ec4d1b Upgrade to Ruby 2.0.0 (r39217). 2013-02-14 16:43:57 +01:00
Vít Ondruch
fc22a3a50f Update rubygems --install-dir patch. 2013-02-13 16:33:54 +01:00
Vít Ondruch
9e99bbc4af Upgrade to Ruby 2.0.0 (rc2). 2013-02-12 14:22:11 +01:00
Vít Ondruch
d3938ffb0a Add architecture dependency on ruby-libs to ruby-irb. 2013-02-07 14:44:59 +01:00
Vít Ondruch
46a0c2b2c7 Rename the rubygems patch to follow rubygems version. 2013-02-07 13:25:20 +01:00
Vít Ondruch
6a5a970443 Fix "gem install --install-dir" behavior. 2013-02-07 13:23:42 +01:00
Vít Ondruch
f5ddaaacec Add ruby(runtime_executable) virtual provide, which is later used by RubyPick. 2013-02-06 14:45:54 +01:00
Vít Ondruch
0f8a636163 Upgrade to Ruby 2.0.0 (r39070). 2013-02-06 14:43:39 +01:00
Vít Ondruch
6b249d044c Drop versioned ruby(release) dependencies. 2013-02-04 17:23:28 +01:00
Vít Ondruch
eccebe4d3f Upgrade to Ruby 2.0.0 (r38929). 2013-01-24 16:58:41 +01:00
Vít Ondruch
d7fb70fa9f Rename ruby executable to ruby-mri, to be prepared for RubyPick. 2013-01-24 16:14:51 +01:00
Vít Ondruch
541f694eee Change ruby(abi) -> ruby(release). 2013-01-24 15:42:10 +01:00
Vít Ondruch
badae78597 Let Sed escape in original file. 2013-01-22 17:06:43 +01:00
Vít Ondruch
de0a9ae9f2 Upgrade to Ruby 2.0.0 (r38894).
Enable test_stack_size(TestFiber) on PPC, since it was fixed upstream.
2013-01-22 15:52:00 +01:00
Vít Ondruch
6bc04a3163 Enable most of the PPC test suite. 2013-01-21 18:00:52 +01:00
Vít Ondruch
fd812ccb12 Fix variables provided by ruby.pc (rhbz#789532, comment 8). 2013-01-18 16:28:03 +01:00
Vít Ondruch
a80c9ddd65 Build against libdb instead of libdb4 (rhbz#894022). 2013-01-18 12:37:26 +01:00
Vít Ondruch
155533e0cc Remove unneeded patch. 2013-01-18 12:36:59 +01:00
Vít Ondruch
3e8ccc1ce6 Provide nonversioned packageconfig (rhbz#789532). 2013-01-17 15:10:39 +01:00
Vít Ondruch
baf41b2211 Upgrade to Ruby 2.0.0 (r38848). 2013-01-16 16:17:47 +01:00
Vít Ondruch
7981fb51bb Bump ruby(abi), since rubygems layout is now incompatible anyway. 2013-01-08 16:36:39 +01:00
Vít Ondruch
66fbf7e626 Move rubygems native extension from gems/exts into gems/%{name}.
This allows to provide native extensions for alternative
implementations.
2013-01-08 16:36:22 +01:00
Vít Ondruch
e653c0ad83 Add missing ruby-exercise.stp file. 2013-01-08 13:12:11 +01:00
Vít Ondruch
4ba3f2a2d6 Add example tapset file. 2013-01-08 12:00:25 +01:00
Vít Ondruch
19c6a9831c Escape example command in tapset comment. 2013-01-08 11:59:38 +01:00
Vít Ondruch
289d94d1b9 Upgrade to Ruby 2.0.0 (r38732). 2013-01-07 15:51:12 +01:00
Vít Ondruch
0267112d9c Add small TODO. 2012-12-20 15:32:50 +01:00
Vít Ondruch
cc8acc3809 Make Tapset platform independent. 2012-12-20 14:58:38 +01:00
Vít Ondruch
037d81c06a Add TapSet for Ruby. 2012-12-20 14:50:50 +01:00
Vít Ondruch
27c051a694 Re-enable tests previously disabled due to bugs. 2012-12-18 14:43:23 +01:00
Vít Ondruch
bbb0b61b11 Enable SystemTap support. 2012-12-17 15:43:07 +01:00
Vít Ondruch
6fe6b00adf Update to Ruby 2.0.0 (r38422). 2012-12-17 12:11:01 +01:00
Vít Ondruch
746b720ed4 Try to make -doc subpackage noarch again
The new RDoc should resolve the arch dependent issues
(https://github.com/rdoc/rdoc/issues/71).
2012-12-11 10:53:48 +01:00
Vít Ondruch
fd6e7d558a Upgrade to Ruby 2.0.0 (r38297). 2012-12-10 16:22:43 +01:00
Vít Ondruch
8cf00989c4 Always add the .gemspec lines before end of block. 2012-12-07 17:12:51 +01:00
Vít Ondruch
2bb26f5094 RDoc now depends on JSON. 2012-12-07 16:45:39 +01:00
Vít Ondruch
f20e944d8a Update to Ruby 2.0.0 (r38260). 2012-12-07 14:21:33 +01:00
Vít Ondruch
6443d60ed6 Fix bogus dates in %changelog reported by rpm-4.11. 2012-12-06 14:31:49 +01:00
Vít Ondruch
4569d76cb7 Add TODO to fix ruby_abi for official release. 2012-12-05 16:46:30 +01:00
Vít Ondruch
2c975d30bf Update release name to preview2, which is the most actual. 2012-12-05 16:42:40 +01:00
Vít Ondruch
991b8dedbf Upgrade to Ruby 2.0.0 (r38184). 2012-12-05 15:41:18 +01:00
Vít Ondruch
2f76408f17 Update to Ruby 2.0.0 (r37807). 2012-11-22 16:02:09 +01:00
Vít Ondruch
3d38c645ee Upgrade to Ruby 2.0.0 (r37773). 2012-11-20 17:22:00 +01:00
Vít Ondruch
701f20251f Convert to git formated patch. 2012-11-19 15:16:34 +01:00
Vít Ondruch
6d28b09327 Rebase patches. 2012-11-19 14:32:58 +01:00
Vít Ondruch
bd4a3ae0e5 Add references to upstream commits of RubyGems's uninstaller patch. 2012-11-19 12:49:46 +01:00
Vít Ondruch
25904a9446 Upgrade to Ruby 2.0.0 (r37589). 2012-11-16 11:54:32 +01:00
Vít Ondruch
e1246b9377 RubyGems needs psych for proper functionality.
It is not 100% clear, if RubyGems are the best place to require psych,
but lets see how it will work. In the future, it might get moved into
ruby-libs if needed, but it doesn't look like it should be there ATM,
since it would be unnecessary payload.
2012-11-07 10:17:44 +01:00
Vít Ondruch
3b7600597c Split Psych into rubygem-psych subpackage. 2012-11-06 13:25:16 +01:00
Vít Ondruch
22208df0f5 Remove useless dot from Summary. 2012-11-06 13:22:34 +01:00
Vít Ondruch
6fb463f87d Update infrastructure to allow build of versioned releases.
This will allow to build releases such as preview1 or rc1.
2012-11-05 16:39:11 +01:00
Vít Ondruch
51eee22522 Upgrade to Ruby 2.0.0 (r37421). 2012-11-05 16:38:52 +01:00
Vít Ondruch
205d789f2e Move NEWS to the main package. 2012-10-18 07:28:23 +02:00
Vít Ondruch
d5f9a82113 Added bugzilla issue number. 2012-09-07 09:31:41 +02:00
Vít Ondruch
8fbe4def8e Split documentation into -doc subpackage. 2012-09-06 14:21:12 +02:00
Vít Ondruch
a1b8ff803d Update TODO about rubygems-filesystem. 2012-09-06 09:28:09 +02:00
Vít Ondruch
7ef1432815 Upgrade to Ruby 2.0.0 (r36887). 2012-09-03 14:44:25 +02:00
Vít Ondruch
000d56dcb6 Revert the dependency of ruby-libs on rubygems (rhbz#845011,
rhbz#847482).
2012-09-03 10:26:16 +02:00
Vít Ondruch
9634afbb69 Fixed changelog rhbz reference. 2012-08-01 17:39:00 +02:00
Vít Ondruch
54ef940f3c ruby-libs must require rubygems (rhbz#45011). 2012-08-01 17:36:38 +02:00
Vít Ondruch
a52793dda1 Upgrade to Ruby 2.0.0 (r36213). 2012-06-25 10:02:24 +02:00
Vít Ondruch
bf1a354efc Upgrade to Ruby 2.0.0 (r36169). 2012-06-22 16:54:05 +02:00
Vít Ondruch
421f1d3c9f Enable tests and small ARM tweaks.
The most of the tests are functional now. The only exception is the one
test failing on armv7. Not sure about the PPC though.
2012-06-14 16:23:16 +02:00
Bohuslav Kabrda
decd212d2b Make the bigdecimal gem a runtime dependency of Ruby. 2012-06-14 16:20:34 +02:00
Bohuslav Kabrda
efb81c3bcf Make symlinks for bigdecimal and io-console gems to ruby stdlib dirs (RHBZ 829209). 2012-06-14 16:18:39 +02:00
Bohuslav Kabrda
07726fdd15 Fix license to contain Public Domain.
macros.ruby now contains unexpanded macros.
2012-06-14 16:16:00 +02:00
Vít Ondruch
4f02fd5e50 Remove superfluous slashes. 2012-06-14 16:10:53 +02:00
Vít Ondruch
5c90ae31fe Patch updated to contain !<verconf>! mark.
Moves the RUBYGEMS_DIR macro definition into verconf.h. This change was
requested by nobu at https://bugs.ruby-lang.org/issues/5617
2012-06-06 14:19:36 +02:00
Vít Ondruch
e814bd3766 Upgrade to Ruby 2.0.0 (r35922). 2012-06-06 08:07:43 +02:00
Vít Ondruch
d122868330 Upgrade to Ruby 2.0.0 (r35368). 2012-04-18 19:40:36 +02:00
Vít Ondruch
e05ada2daa Upgrade to Ruby 2.0.0 (r34723). 2012-02-23 09:28:12 +01:00
Vít Ondruch
023fc73511 Initial .spec for Ruby 2.0.0. 2012-02-23 09:14:02 +01:00
19 changed files with 1232 additions and 832 deletions

303
libruby.stp Normal file
View file

@ -0,0 +1,303 @@
/* SystemTap tapset to make it easier to trace Ruby 2.0
*
* All probes provided by Ruby can be listed using following command
* (the path to the library must be adjuste appropriately):
*
* stap -L 'process("@LIBRARY_PATH@").mark("*")'
*/
/**
* probe ruby.array.create - Allocation of new array.
*
* @size: Number of elements (an int)
* @file: The file name where the method is being called (string)
* @line: The line number where the method is being called (int)
*/
probe ruby.array.create =
process("@LIBRARY_PATH@").mark("array__create")
{
size = $arg1
file = user_string($arg2)
line = $arg3
}
/**
* probe ruby.cmethod.entry - Fired just before a method implemented in C is entered.
*
* @classname: Name of the class (string)
* @methodname: The method about bo be executed (string)
* @file: The file name where the method is being called (string)
* @line: The line number where the method is being called (int)
*/
probe ruby.cmethod.entry =
process("@LIBRARY_PATH@").mark("cmethod__entry")
{
classname = user_string($arg1)
methodname = user_string($arg2)
file = user_string($arg3)
line = $arg4
}
/**
* probe ruby.cmethod.return - Fired just after a method implemented in C has returned.
*
* @classname: Name of the class (string)
* @methodname: The executed method (string)
* @file: The file name where the method is being called (string)
* @line: The line number where the method is being called (int)
*/
probe ruby.cmethod.return =
process("@LIBRARY_PATH@").mark("cmethod__return")
{
classname = user_string($arg1)
methodname = user_string($arg2)
file = user_string($arg3)
line = $arg4
}
/**
* probe ruby.find.require.entry - Fired when require starts to search load
* path for suitable file to require.
*
* @requiredfile: The name of the file to be required (string)
* @file: The file name where the method is being called (string)
* @line: The line number where the method is being called (int)
*/
probe ruby.find.require.entry =
process("@LIBRARY_PATH@").mark("find__require__entry")
{
requiredfile = user_string($arg1)
file = user_string($arg2)
line = $arg3
}
/**
* probe ruby.find.require.return - Fired just after require has finished
* search of load path for suitable file to require.
*
* @requiredfile: The name of the file to be required (string)
* @file: The file name where the method is being called (string)
* @line: The line number where the method is being called (int)
*/
probe ruby.find.require.return =
process("@LIBRARY_PATH@").mark("find__require__return")
{
requiredfile = user_string($arg1)
file = user_string($arg2)
line = $arg3
}
/**
* probe ruby.gc.mark.begin - Fired when a GC mark phase is about to start.
*
* It takes no arguments.
*/
probe ruby.gc.mark.begin =
process("@LIBRARY_PATH@").mark("gc__mark__begin")
{
}
/**
* probe ruby.gc.mark.end - Fired when a GC mark phase has ended.
*
* It takes no arguments.
*/
probe ruby.gc.mark.end =
process("@LIBRARY_PATH@").mark("gc__mark__end")
{
}
/**
* probe ruby.gc.sweep.begin - Fired when a GC sweep phase is about to start.
*
* It takes no arguments.
*/
probe ruby.gc.sweep.begin =
process("@LIBRARY_PATH@").mark("gc__sweep__begin")
{
}
/**
* probe ruby.gc.sweep.end - Fired when a GC sweep phase has ended.
*
* It takes no arguments.
*/
probe ruby.gc.sweep.end =
process("@LIBRARY_PATH@").mark("gc__sweep__end")
{
}
/**
* probe ruby.hash.create - Allocation of new hash.
*
* @size: Number of elements (int)
* @file: The file name where the method is being called (string)
* @line: The line number where the method is being called (int)
*/
probe ruby.hash.create =
process("@LIBRARY_PATH@").mark("hash__create")
{
size = $arg1
file = user_string($arg2)
line = $arg3
}
/**
* probe ruby.load.entry - Fired when calls to "load" are made.
*
* @loadedfile: The name of the file to be loaded (string)
* @file: The file name where the method is being called (string)
* @line: The line number where the method is being called (int)
*/
probe ruby.load.entry =
process("@LIBRARY_PATH@").mark("load__entry")
{
loadedfile = user_string($arg1)
file = user_string($arg2)
line = $arg3
}
/**
* probe ruby.load.return - Fired just after require has finished
* search of load path for suitable file to require.
*
* @loadedfile: The name of the file that was loaded (string)
*/
probe ruby.load.return =
process("@LIBRARY_PATH@").mark("load__return")
{
loadedfile = user_string($arg1)
}
/**
* probe ruby.method.entry - Fired just before a method implemented in Ruby is entered.
*
* @classname: Name of the class (string)
* @methodname: The method about bo be executed (string)
* @file: The file name where the method is being called (string)
* @line: The line number where the method is being called (int)
*/
probe ruby.method.entry =
process("@LIBRARY_PATH@").mark("method__entry")
{
classname = user_string($arg1)
methodname = user_string($arg2)
file = user_string($arg3)
line = $arg4
}
/**
* probe ruby.method.return - Fired just after a method implemented in Ruby has returned.
*
* @classname: Name of the class (string)
* @methodname: The executed method (string)
* @file: The file name where the method is being called (string)
* @line: The line number where the method is being called (int)
*/
probe ruby.method.return =
process("@LIBRARY_PATH@").mark("method__return")
{
classname = user_string($arg1)
methodname = user_string($arg2)
file = user_string($arg3)
line = $arg4
}
/**
* probe ruby.object.create - Allocation of new object.
*
* @classname: Name of the class (string)
* @file: The file name where the method is being called (string)
* @line: The line number where the method is being called (int)
*/
probe ruby.object.create =
process("@LIBRARY_PATH@").mark("object__create")
{
classname = user_string($arg1)
file = user_string($arg2)
line = $arg3
}
/**
* probe ruby.parse.begin - Fired just before a Ruby source file is parsed.
*
* @parsedfile: The name of the file to be parsed (string)
* @parsedline: The line number of beginning of parsing (int)
*/
probe ruby.parse.begin =
process("@LIBRARY_PATH@").mark("parse__begin")
{
parsedfile = user_string($arg1)
parsedline = $arg2
}
/**
* probe ruby.parse.end - Fired just after a Ruby source file was parsed.
*
* @parsedfile: The name of parsed the file (string)
* @parsedline: The line number of beginning of parsing (int)
*/
probe ruby.parse.end =
process("@LIBRARY_PATH@").mark("parse__end")
{
parsedfile = user_string($arg1)
parsedline = $arg2
}
/**
* probe ruby.raise - Fired when an exception is raised.
*
* @classname: The class name of the raised exception (string)
* @file: The name of the file where the exception was raised (string)
* @line: The line number in the file where the exception was raised (int)
*/
probe ruby.raise =
process("@LIBRARY_PATH@").mark("raise")
{
classname = user_string($arg1)
file = user_string($arg2)
line = $arg3
}
/**
* probe ruby.require.entry - Fired on calls to rb_require_safe (when a file
* is required).
*
* @requiredfile: The name of the file to be required (string)
* @file: The file that called "require" (string)
* @line: The line number where the call to require was made(int)
*/
probe ruby.require.entry =
process("@LIBRARY_PATH@").mark("require__entry")
{
requiredfile = user_string($arg1)
file = user_string($arg2)
line = $arg3
}
/**
* probe ruby.require.return - Fired just after require has finished
* search of load path for suitable file to require.
*
* @requiredfile: The file that was required (string)
*/
probe ruby.require.return =
process("@LIBRARY_PATH@").mark("require__return")
{
requiredfile = user_string($arg1)
}
/**
* probe ruby.string.create - Allocation of new string.
*
* @size: Number of elements (an int)
* @file: The file name where the method is being called (string)
* @line: The line number where the method is being called (int)
*/
probe ruby.string.create =
process("@LIBRARY_PATH@").mark("string__create")
{
size = $arg1
file = user_string($arg2)
line = $arg3
}

View file

@ -2,15 +2,14 @@ module Gem
class << self
##
# Returns a string representing that part or the directory tree that is
# common to all specified directories.
# Returns full path of previous but one directory of dir in path
# E.g. for '/usr/share/ruby', 'ruby', it returns '/usr'
def common_path(dirs)
paths = dirs.collect {|dir| dir.split(File::SEPARATOR)}
uncommon_idx = paths.transpose.each_with_index.find {|dirnames, idx| dirnames.uniq.length > 1}.last
paths[0][0 ... uncommon_idx].join(File::SEPARATOR)
def previous_but_one_dir_to(path, dir)
split_path = path.split(File::SEPARATOR)
File.join(split_path.take_while { |one_dir| one_dir !~ /^#{dir}$/ }[0..-2])
end
private :common_path
private :previous_but_one_dir_to
##
# Default gems locations allowed on FHS system (/usr, /usr/share).
@ -19,8 +18,8 @@ module Gem
def default_locations
@default_locations ||= {
:system => common_path([ConfigMap[:vendorlibdir], ConfigMap[:vendorarchdir]]),
:local => common_path([ConfigMap[:sitelibdir], ConfigMap[:sitearchdir]])
:system => previous_but_one_dir_to(ConfigMap[:vendordir], ConfigMap[:RUBY_INSTALL_NAME]),
:local => previous_but_one_dir_to(ConfigMap[:sitedir], ConfigMap[:RUBY_INSTALL_NAME])
}
end
@ -29,11 +28,12 @@ module Gem
# platform independent (:gem_dir) and dependent (:ext_dir) files.
def default_dirs
@libdir ||= ConfigMap[:sitelibdir] == ConfigMap[:sitearchdir] ? ConfigMap[:datadir] : ConfigMap[:libdir]
@default_dirs ||= Hash[default_locations.collect do |destination, path|
[destination, {
:bin_dir => File.join(path, ConfigMap[:bindir].split(File::SEPARATOR).last),
:gem_dir => File.join(path, ConfigMap[:datadir].split(File::SEPARATOR).last, 'gems'),
:ext_dir => File.join(path, ConfigMap[:libdir].split(File::SEPARATOR).last, 'gems')
:ext_dir => File.join(path, @libdir.split(File::SEPARATOR).last, 'gems')
}]
end]
end
@ -64,7 +64,7 @@ module Gem
def default_ext_dir_for base_dir
dirs = Gem.default_dirs.detect {|location, paths| paths[:gem_dir] == base_dir}
dirs && File.join(dirs.last[:ext_dir], 'exts')
dirs && File.join(dirs.last[:ext_dir], RbConfig::CONFIG['RUBY_INSTALL_NAME'])
end
end
end

View file

@ -1,188 +0,0 @@
From b0a875862d14244ca41cd1e1e9090f87757aaeb9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Mon, 5 Sep 2011 13:10:47 +0200
Subject: [PATCH] Added configuration flags for site and vendor architecture
specific directories.
---
Makefile.in | 3 +++
configure.in | 40 ++++++++++++++++++++++++++++++++++++++++
tool/mkconfig.rb | 8 ++++++--
version.c | 4 ++++
4 files changed, 53 insertions(+), 2 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index bcdaf5f..f57e4c4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -34,6 +34,9 @@ datadir = @datadir@
archdir = @archdir@
sitearch = @sitearch@
sitedir = @sitedir@
+sitearchdir= @sitearchdir@
+vendordir = @vendordir@
+vendorarchdir = @vendorarchdir@
ruby_version = @ruby_version@
TESTUI = console
diff --git a/configure.in b/configure.in
index 83e5d76..31532bd 100644
--- a/configure.in
+++ b/configure.in
@@ -2811,6 +2811,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do
dir="${SITE_DIR}"
done
+AC_ARG_WITH(sitearchdir,
+ AS_HELP_STRING([--with-sitearchdir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]]]),
+ [sitearchdir=$withval],
+ [sitearchdir='${rubylibprefix}/site_ruby/${arch}'])
+dir="${sitearchdir}"
+until SITEARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITEARCH_DIR}"; do
+ dir="${SITEARCH_DIR}"
+done
+
AC_ARG_WITH(vendordir,
AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]]]),
[vendordir=$withval],
@@ -2820,19 +2829,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do
dir="${VENDOR_DIR}"
done
+AC_ARG_WITH(vendorarchdir,
+ AS_HELP_STRING([--with-vendorarchdir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]]]),
+ [vendorarchdir=$withval],
+ [vendorarchdir='${rubylibprefix}/vendor_ruby/${arch}'])
+dir="${vendorarchdir}"
+until VENDORARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDORARCH_DIR}"; do
+ dir="${VENDORARCH_DIR}"
+done
+
if test "${LOAD_RELATIVE+set}"; then
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
RUBY_EXEC_PREFIX=""
RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
RUBY_ARCH_LIB_PATH="`eval echo "$ARCH_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
RUBY_SITE_LIB_PATH="`eval echo "$SITE_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
+ RUBY_SITE_ARCHLIB_PATH="`eval echo "$SITEARCH_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
RUBY_VENDOR_LIB_PATH="`eval echo "$VENDOR_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
+ RUBY_VENDOR_ARCHLIB_PATH="`eval echo "$VENDORARCH_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
else
RUBY_EXEC_PREFIX="`eval echo \\"$exec_prefix/\\" | sed 's|^NONE/|'"$prefix"'/|;s|/$||'`"
RUBY_LIB_PREFIX="`eval echo \\"$RUBY_LIB_PREFIX\\" | sed 's|^NONE/|'"$prefix"'/|'`"
RUBY_ARCH_LIB_PATH="`eval echo \\"$ARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
RUBY_SITE_LIB_PATH="`eval echo \\"$SITE_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
+ RUBY_SITE_ARCHLIB_PATH="`eval echo \\"$SITEARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
RUBY_VENDOR_LIB_PATH="`eval echo \\"$VENDOR_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
+ RUBY_VENDOR_ARCHLIB_PATH="`eval echo \\"$VENDORARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
fi
pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)'
@@ -2850,6 +2872,13 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"],
[
RUBY_SITE_LIB_PATH="\"${RUBY_SITE_LIB_PATH}\""
])
+AS_CASE(["$RUBY_SITE_ARCHLIB_PATH"],
+ ["$RUBY_LIB_PREFIX/"*], [
+ RUBY_SITE_ARCHLIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_ARCHLIB_PATH\" : \"$pat\"`"'"'
+ ],
+ [
+ RUBY_SITE_ARCHLIB_PATH="\"${RUBY_SITE_ARCHLIB_PATH}\""
+ ])
AS_CASE(["$RUBY_VENDOR_LIB_PATH"],
["$RUBY_LIB_PREFIX/"*], [
RUBY_VENDOR_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_LIB_PATH\" : \"$pat\"`"'"'
@@ -2857,6 +2886,13 @@ AS_CASE(["$RUBY_VENDOR_LIB_PATH"],
[
RUBY_VENDOR_LIB_PATH="\"${RUBY_VENDOR_LIB_PATH}\""
])
+AS_CASE(["$RUBY_VENDOR_ARCHLIB_PATH"],
+ ["$RUBY_LIB_PREFIX/"*], [
+ RUBY_VENDOR_ARCHLIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_ARCHLIB_PATH\" : \"$pat\"`"'"'
+ ],
+ [
+ RUBY_VENDOR_ARCHLIB_PATH="\"${RUBY_VENDOR_ARCHLIB_PATH}\""
+ ])
pat=`echo "$RUBY_EXEC_PREFIX/" | tr -c '\012' .`'\(.*\)'
AS_CASE(["$RUBY_LIB_PREFIX"],
["$RUBY_EXEC_PREFIX/"*], [
@@ -2878,19 +2914,23 @@ if test "x$SITE_DIR" = xno; then
AC_DEFINE(NO_RUBY_SITE_LIB)
else
AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, ${RUBY_SITE_LIB_PATH})
+ AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, ${RUBY_SITE_ARCHLIB_PATH})
fi
if test "x$VENDOR_DIR" = xno; then
AC_DEFINE(NO_RUBY_VENDOR_LIB)
else
AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB, ${RUBY_VENDOR_LIB_PATH})
+ AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCHLIB, ${RUBY_VENDOR_ARCHLIB_PATH})
fi
AC_SUBST(arch)dnl
AC_SUBST(sitearch)dnl
AC_SUBST(ruby_version)dnl
AC_SUBST(archdir)dnl
AC_SUBST(sitedir)dnl
+AC_SUBST(sitearchdir)dnl
AC_SUBST(vendordir)dnl
+AC_SUBST(vendorarchdir)dnl
configure_args=$ac_configure_args
AC_SUBST(configure_args)dnl
diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
index b707c4b..6230720 100755
--- a/tool/mkconfig.rb
+++ b/tool/mkconfig.rb
@@ -44,6 +44,8 @@ v_others = []
continued_line = nil
path_version = "/$(ruby_version)"
archdir_override = "$(vendorlibdir)/$(sitearch)"
+sitearchdir_override = "$(sitelibdir)/$(sitearch)"
+vendorarchdir_override = "$(vendorlibdir)/$(sitearch)"
File.foreach "config.status" do |line|
next if /^#/ =~ line
name = nil
@@ -79,6 +81,8 @@ File.foreach "config.status" do |line|
when /^RUBY_SO_NAME$/; next if $so_name
when /^arch$/; if val.empty? then val = arch else arch = val end
when /^archdir$/; archdir_override = val; next
+ when /^sitearchdir$/; sitearchdir_override = val; next
+ when /^vendorarchdir$/; vendorarchdir_override = val; next
when /^sitearch/; val = '$(arch)' if val.empty?
end
case val
@@ -213,11 +217,11 @@ print <<EOS
EOS
print <<EOS unless v_disabled["sitedir"]
CONFIG["sitelibdir"] = "$(sitedir)#{path_version}"
- CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
+ CONFIG["sitearchdir"] = "#{sitearchdir_override}"
EOS
print <<EOS unless v_disabled["vendordir"]
CONFIG["vendorlibdir"] = "$(vendordir)#{path_version}"
- CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
+ CONFIG["vendorarchdir"] = "#{vendorarchdir_override}"
EOS
print <<EOS
CONFIG["topdir"] = File.dirname(__FILE__)
diff --git a/version.c b/version.c
index 59d4e5e..2558aa0 100644
--- a/version.c
+++ b/version.c
@@ -50,8 +50,12 @@
#ifndef RUBY_ARCHLIB
#define RUBY_ARCHLIB RUBY_LIB "/"RUBY_ARCH
#endif
+#ifndef RUBY_SITE_ARCHLIB
#define RUBY_SITE_ARCHLIB RUBY_SITE_LIB2 "/"RUBY_SITEARCH
+#endif
+#ifndef RUBY_VENDOR_ARCHLIB
#define RUBY_VENDOR_ARCHLIB RUBY_VENDOR_LIB2 "/"RUBY_SITEARCH
+#endif
#ifdef RUBY_THINARCH
#define RUBY_THIN_ARCHLIB RUBY_LIB "/"RUBY_THINARCH
#define RUBY_SITE_THIN_ARCHLIB RUBY_SITE_LIB2 "/"RUBY_THINARCH
--
1.7.6.1

View file

@ -1,6 +1,17 @@
--- a/configure.in.orig 2011-10-18 08:56:21.587594685 +0200
+++ b/configure.in 2011-10-18 08:56:59.751593321 +0200
@@ -2935,6 +2935,8 @@
From 796aa193a0e01f3035361f045ac66486d71f608a 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] Always use i386.
---
configure.in | 2 ++
1 file changed, 2 insertions(+)
diff --git a/configure.in b/configure.in
index 418b0cb..d26fe5b 100644
--- a/configure.in
+++ b/configure.in
@@ -3362,6 +3362,8 @@ AC_SUBST(vendorarchdir)dnl
configure_args=$ac_configure_args
AC_SUBST(configure_args)dnl
@ -9,3 +20,6 @@
if test "${universal_binary-no}" = yes ; then
arch="universal-${target_os}"
AC_CACHE_CHECK(whether __ARCHITECTURE__ is available, rb_cv_architecture_available,
--
1.8.1

View file

@ -1,132 +1,27 @@
From df4253a5b79b63f16f215f2c19f1b9666c4ca01e Mon Sep 17 00:00:00 2001
From 2e15c6bdac1c145cce0c21677477ced8df26718b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Thu, 8 Sep 2011 15:30:05 +0200
Date: Fri, 8 Feb 2013 18:20:50 +0100
Subject: [PATCH] Add configuration arch specific dir flag.
---
Makefile.in | 1 +
configure.in | 20 ++++++++++++++++++++
tool/mkconfig.rb | 4 +++-
version.c | 2 ++
4 files changed, 26 insertions(+), 1 deletions(-)
configure.in | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Makefile.in b/Makefile.in
index bcdaf5f..d61b2ee 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -31,6 +31,7 @@ libexecdir = @libexecdir@
datarootdir = @datarootdir@
datadir = @datadir@
arch = @arch@
+archdir = @archdir@
sitearch = @sitearch@
sitedir = @sitedir@
ruby_version = @ruby_version@
diff --git a/configure.in b/configure.in
index 83e5d76..e6dc38c 100644
index d6af000..1c094a3 100644
--- a/configure.in
+++ b/configure.in
@@ -2793,6 +2793,15 @@ else
RUBY_LIB_VERSION="\"${ruby_version}\""
fi
@@ -3217,6 +3217,10 @@ AC_SUBST(rubylibprefix)
rubylibdir='${rubylibprefix}/${ruby_version}'
rubyarchdir=${multiarch+'${rubyarchprefix}/${ruby_version}'}${multiarch-'${rubylibdir}/${arch}'}
+AC_ARG_WITH(archdir,
+ AS_HELP_STRING([--with-archdir=DIR], [architecture specific ruby libraries [[LIBDIR/RUBY_BASE_NAME/ARCH]]]),
+ [archdir=$withval],
+ [archdir='${rubylibprefix}/${arch}'])
+dir="${archdir}"
+until ARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${ARCH_DIR}"; do
+ dir="${ARCH_DIR}"
+done
+AC_ARG_WITH(rubyarchdir,
+ AS_HELP_STRING([--with-rubyarchdir=DIR], [architecture specific ruby libraries [[LIBDIR/RUBY_BASE_NAME/ARCH]]]),
+ [rubyarchdir=$withval])
+
AC_ARG_WITH(sitedir,
AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]]]),
[sitedir=$withval],
@@ -2815,16 +2824,25 @@ if test "${LOAD_RELATIVE+set}"; then
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
RUBY_EXEC_PREFIX=""
RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
+ RUBY_ARCH_LIB_PATH="`eval echo "$ARCH_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
RUBY_SITE_LIB_PATH="`eval echo "$SITE_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
RUBY_VENDOR_LIB_PATH="`eval echo "$VENDOR_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
else
RUBY_EXEC_PREFIX="`eval echo \\"$exec_prefix/\\" | sed 's|^NONE/|'"$prefix"'/|;s|/$||'`"
RUBY_LIB_PREFIX="`eval echo \\"$RUBY_LIB_PREFIX\\" | sed 's|^NONE/|'"$prefix"'/|'`"
+ RUBY_ARCH_LIB_PATH="`eval echo \\"$ARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
RUBY_SITE_LIB_PATH="`eval echo \\"$SITE_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
RUBY_VENDOR_LIB_PATH="`eval echo \\"$VENDOR_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
fi
pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)'
+AS_CASE(["$RUBY_ARCH_LIB_PATH"],
+ ["$RUBY_LIB_PREFIX/"*], [
+ RUBY_ARCH_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_ARCH_LIB_PATH\" : \"$pat\"`"'"'
+ ],
+ [
+ RUBY_ARCH_LIB_PATH="\"${RUBY_ARCH_LIB_PATH}\""
+ ])
AS_CASE(["$RUBY_SITE_LIB_PATH"],
["$RUBY_LIB_PREFIX/"*], [
RUBY_SITE_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_LIB_PATH\" : \"$pat\"`"'"'
@@ -2855,6 +2873,7 @@ else
fi
AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, "${RUBY_EXEC_PREFIX}")
AC_DEFINE_UNQUOTED(RUBY_LIB_PREFIX, ${RUBY_LIB_PREFIX})
+AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, ${RUBY_ARCH_LIB_PATH})
if test "x$SITE_DIR" = xno; then
AC_DEFINE(NO_RUBY_SITE_LIB)
else
@@ -2869,6 +2888,7 @@ fi
AC_SUBST(arch)dnl
AC_SUBST(sitearch)dnl
AC_SUBST(ruby_version)dnl
+AC_SUBST(archdir)dnl
AC_SUBST(sitedir)dnl
AC_SUBST(vendordir)dnl
diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
index b707c4b..9780ef2 100755
--- a/tool/mkconfig.rb
+++ b/tool/mkconfig.rb
@@ -43,6 +43,7 @@ v_others = []
continued_name = nil
continued_line = nil
path_version = "/$(ruby_version)"
+archdir_override = "$(vendorlibdir)/$(sitearch)"
File.foreach "config.status" do |line|
next if /^#/ =~ line
name = nil
@@ -77,6 +78,7 @@ File.foreach "config.status" do |line|
when /^RUBY_INSTALL_NAME$/; next if $install_name
when /^RUBY_SO_NAME$/; next if $so_name
when /^arch$/; if val.empty? then val = arch else arch = val end
+ when /^archdir$/; archdir_override = val; next
when /^sitearch/; val = '$(arch)' if val.empty?
end
case val
@@ -207,7 +209,7 @@ print(*v_fast)
print(*v_others)
print <<EOS
CONFIG["rubylibdir"] = "$(rubylibprefix)#{path_version}"
- CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
+ CONFIG["archdir"] = "#{archdir_override}"
EOS
print <<EOS unless v_disabled["sitedir"]
CONFIG["sitelibdir"] = "$(sitedir)#{path_version}"
diff --git a/version.c b/version.c
index 59d4e5e..915a0a2 100644
--- a/version.c
+++ b/version.c
@@ -47,7 +47,9 @@
#define RUBY_SITE_LIB2 RUBY_SITE_LIB "/"RUBY_LIB_VERSION
#define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB "/"RUBY_LIB_VERSION
#endif
+#ifndef RUBY_ARCHLIB
#define RUBY_ARCHLIB RUBY_LIB "/"RUBY_ARCH
+#endif
#define RUBY_SITE_ARCHLIB RUBY_SITE_LIB2 "/"RUBY_SITEARCH
#define RUBY_VENDOR_ARCHLIB RUBY_VENDOR_LIB2 "/"RUBY_SITEARCH
#ifdef RUBY_THINARCH
rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'}
AC_ARG_WITH(rubyarchprefix,
AS_HELP_STRING([--with-rubyarchprefix=DIR],
--
1.7.6.1
1.8.1.2

View file

@ -1,31 +0,0 @@
--- ruby-1.9.3-p0/test/ruby/test_bignum.rb.orig 2011-11-10 09:52:59.101925465 +0100
+++ ruby-1.9.3-p0/test/ruby/test_bignum.rb 2011-11-10 09:54:14.580798826 +0100
@@ -378,7 +378,7 @@
assert_equal(true, (2**32).even?)
end
- def interrupt
+ def assert_interrupt
time = Time.now
start_flag = false
end_flag = false
@@ -387,14 +387,16 @@
yield
end_flag = true
end
- sleep 1
+ Thread.pass until start_flag
thread.raise
thread.join rescue nil
- start_flag && !end_flag && Time.now - time < 10
+ time = Time.now - time
+ assert_equal([true, false], [start_flag, end_flag])
+ assert_operator(time, :<, 10)
end
def test_interrupt
- assert(interrupt { (65536 ** 65536).to_s })
+ assert_interrupt {(65536 ** 65536).to_s}
end
def test_too_big_to_s

View file

@ -1,4 +1,4 @@
From 279a693ce4ef3a887ce8d4fa59e0f2616a14d91a Mon Sep 17 00:00:00 2001
From b5e9dc3683cb085aa57e7b12c35a4f21b2cc1482 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Fri, 11 Nov 2011 13:14:45 +0100
Subject: [PATCH] Allow to install RubyGems into custom location, outside of
@ -6,65 +6,52 @@ Subject: [PATCH] Allow to install RubyGems into custom location, outside of
---
configure.in | 8 ++++++++
tool/mkconfig.rb | 1 +
tool/rbinstall.rb | 9 +++++++++
version.c | 4 ++++
4 files changed, 22 insertions(+), 0 deletions(-)
3 files changed, 21 insertions(+)
diff --git a/configure.in b/configure.in
index b1bc951..91c5d0d 100644
index 1627d12..e064b2b 100644
--- a/configure.in
+++ b/configure.in
@@ -2838,6 +2838,13 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do
dir="${VENDORARCH_DIR}"
done
@@ -3292,6 +3292,13 @@ AC_ARG_WITH(vendorarchdir,
[vendorarchdir=$withval],
[vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}])
+AC_ARG_WITH(rubygemsdir,
+ AS_HELP_STRING([--with-rubygemsdir=DIR], [custom rubygems directory]),
+ [rubygemsdir=$withval])
+if test "$rubygemsdir" != ""; then
+ AC_DEFINE_UNQUOTED(RUBYGEMS_DIR,"$rubygemsdir")
+ AC_DEFINE_UNQUOTED(RUBYGEMS_DIR,"$rubygemsdir" !<verconf>!)
+fi
+
if test "${LOAD_RELATIVE+set}"; then
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
RUBY_EXEC_PREFIX=""
@@ -2931,6 +2938,7 @@ AC_SUBST(sitearch)dnl
AC_SUBST(sitearchdir)dnl
unexpand_shvar rubylibprefix exec_prefix libdir RUBY_BASE_NAME
unexpand_shvar rubyarchprefix exec_prefix libdir arch RUBY_BASE_NAME archlibdir rubylibprefix
unexpand_shvar rubysitearchprefix exec_prefix libdir sitearch arch RUBY_BASE_NAME archlibdir sitearchlibdir rubylibprefix
@@ -3358,6 +3365,7 @@ AC_SUBST(sitearchdir)dnl
AC_SUBST(vendordir)dnl
AC_SUBST(vendorlibdir)dnl
AC_SUBST(vendorarchdir)dnl
+AC_SUBST(rubygemsdir)dnl
configure_args=$ac_configure_args
AC_SUBST(configure_args)dnl
diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
index b707c4b..9fecbfb 100755
--- a/tool/mkconfig.rb
+++ b/tool/mkconfig.rb
@@ -84,6 +84,7 @@ File.foreach "config.status" do |line|
when /^sitearchdir$/; sitearchdir_override = val; next
when /^vendorarchdir$/; vendorarchdir_override = val; next
when /^sitearch/; val = '$(arch)' if val.empty?
+ when /^rubygemsdir/; next if val.empty?
end
case val
when /^\$\(ac_\w+\)$/; next
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index 6bfc73e..31dc446 100755
index 92e54c6..c72dfb6 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -300,6 +300,7 @@ sitelibdir = CONFIG["sitelibdir"]
@@ -313,6 +313,7 @@ sitelibdir = CONFIG["sitelibdir"]
sitearchlibdir = CONFIG["sitearchdir"]
vendorlibdir = CONFIG["vendorlibdir"]
vendorarchlibdir = CONFIG["vendorarchdir"]
+rubygemsdir = CONFIG["rubygemsdir"]
mandir = CONFIG["mandir"]
capidir = CONFIG["docdir"]
mandir = CONFIG["mandir", true]
docdir = CONFIG["docdir", true]
configure_args = Shellwords.shellwords(CONFIG["configure_args"])
@@ -487,7 +488,15 @@ end
@@ -500,7 +501,15 @@ end
install?(:local, :comm, :lib) do
prepare "library scripts", rubylibdir
noinst = %w[README* *.txt *.rdoc]
noinst = %w[README* *.txt *.rdoc *.gemspec]
+ noinst += %w[*ubygems.rb rubygems/ datadir.rb] if rubygemsdir
install_recursive(File.join(srcdir, "lib"), rubylibdir, :no_install => noinst, :mode => $data_mode)
+ if rubygemsdir
@ -78,10 +65,10 @@ index 6bfc73e..31dc446 100755
install?(:local, :arch, :lib) do
diff --git a/version.c b/version.c
index 59d4e5e..12ba7e9 100644
index 54c4513..d76100b 100644
--- a/version.c
+++ b/version.c
@@ -103,6 +103,10 @@ const char ruby_initial_load_paths[] =
@@ -99,6 +99,10 @@ const char ruby_initial_load_paths[] =
#endif
#endif
@ -90,8 +77,8 @@ index 59d4e5e..12ba7e9 100644
+#endif
+
RUBY_LIB "\0"
#ifdef RUBY_THIN_ARCHLIB
RUBY_THIN_ARCHLIB "\0"
#ifdef RUBY_THINARCH
RUBY_ARCH_LIB_FOR(RUBY_THINARCH) "\0"
--
1.7.7
1.8.1.2

View file

@ -1,149 +0,0 @@
From fa1a50ad10814f724b8713865dc222724cb955ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Thu, 25 Aug 2011 14:33:51 +0200
Subject: [PATCH] Allow to disable versioned paths.
---
configure.in | 11 +++++++++++
tool/mkconfig.rb | 9 ++++++---
version.c | 10 ++++++++++
3 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/configure.in b/configure.in
index e742e74..86cb68f 100644
--- a/configure.in
+++ b/configure.in
@@ -2963,6 +2963,17 @@ else
fi
AC_SUBST(USE_RUBYGEMS)
+AC_ARG_ENABLE(versioned-paths,
+ AS_HELP_STRING([--disable-versioned-paths], [disable paths with version number]),
+ [enable_versioned_paths="$enableval"], [enable_versioned_paths=yes])
+if test x"$enable_versioned_paths" = xno; then
+ AC_DEFINE(DISABLE_VERSIONED_PATHS, 1)
+ USE_VERSIONED_PATHS=NO
+else
+ USE_VERSIONED_PATHS=YES
+fi
+AC_SUBST(USE_VERSIONED_PATHS)
+
arch_hdrdir="${EXTOUT}/include/${arch}/ruby"
AS_MKDIR_P("${arch_hdrdir}")
config_h="${arch_hdrdir}/config.h"
diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
index a2221f0..47d8c8f 100755
--- a/tool/mkconfig.rb
+++ b/tool/mkconfig.rb
@@ -42,6 +42,7 @@ v_others = []
vars = {}
continued_name = nil
continued_line = nil
+path_version = "/$(ruby_version)"
File.foreach "config.status" do |line|
next if /^#/ =~ line
name = nil
@@ -138,6 +139,8 @@ File.foreach "config.status" do |line|
case name
when "ruby_version"
version = val[/\A"(.*)"\z/, 1]
+ when /^USE_VERSIONED_PATHS$/
+ path_version = nil if /NO/ =~ val
end
end
# break if /^CEOF/
@@ -203,15 +206,15 @@ end
print(*v_fast)
print(*v_others)
print <<EOS
- CONFIG["rubylibdir"] = "$(rubylibprefix)/$(ruby_version)"
+ CONFIG["rubylibdir"] = "$(rubylibprefix)#{path_version}"
CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
EOS
print <<EOS unless v_disabled["sitedir"]
- CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
+ CONFIG["sitelibdir"] = "$(sitedir)#{path_version}"
CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
EOS
print <<EOS unless v_disabled["vendordir"]
- CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
+ CONFIG["vendorlibdir"] = "$(vendordir)#{path_version}"
CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
EOS
print <<EOS
diff --git a/version.c b/version.c
index 59d4e5e..641dc33 100644
--- a/version.c
+++ b/version.c
@@ -38,9 +38,15 @@
#define RUBY_VENDOR_LIB RUBY_LIB_PREFIX"/vendor_ruby"
#endif
+#ifdef DISABLE_VERSIONED_PATHS
+#define RUBY_LIB RUBY_LIB_PREFIX
+#define RUBY_SITE_LIB2 RUBY_SITE_LIB
+#define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB
+#else
#define RUBY_LIB RUBY_LIB_PREFIX "/"RUBY_LIB_VERSION
#define RUBY_SITE_LIB2 RUBY_SITE_LIB "/"RUBY_LIB_VERSION
#define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB "/"RUBY_LIB_VERSION
+#endif
#define RUBY_ARCHLIB RUBY_LIB "/"RUBY_ARCH
#define RUBY_SITE_ARCHLIB RUBY_SITE_LIB2 "/"RUBY_SITEARCH
#define RUBY_VENDOR_ARCHLIB RUBY_VENDOR_LIB2 "/"RUBY_SITEARCH
@@ -75,8 +81,10 @@ const char ruby_initial_load_paths[] =
RUBY_SITE_THIN_ARCHLIB "\0"
#endif
RUBY_SITE_ARCHLIB "\0"
+#ifndef DISABLE_VERSIONED_PATHS
RUBY_SITE_LIB "\0"
#endif
+#endif
#ifndef NO_RUBY_VENDOR_LIB
RUBY_VENDOR_LIB2 "\0"
@@ -84,8 +92,10 @@ const char ruby_initial_load_paths[] =
RUBY_VENDOR_THIN_ARCHLIB "\0"
#endif
RUBY_VENDOR_ARCHLIB "\0"
+#ifndef DISABLE_VERSIONED_PATHS
RUBY_VENDOR_LIB "\0"
#endif
+#endif
RUBY_LIB "\0"
#ifdef RUBY_THIN_ARCHLIB
--
1.7.7.3
diff --git a/lib/rdoc/ri/paths.rb b/lib/rdoc/ri/paths.rb
index a3c65bf..0575730 100644
--- a/lib/rdoc/ri/paths.rb
+++ b/lib/rdoc/ri/paths.rb
@@ -11,9 +11,9 @@ module RDoc::RI::Paths
version = RbConfig::CONFIG['ruby_version']
base = if RbConfig::CONFIG.key? 'ridir' then
- File.join RbConfig::CONFIG['ridir'], version
+ File.join [RbConfig::CONFIG['ridir'], RbConfig::CONFIG['USE_VERSIONED_PATHS'] == 'YES' ? version : nil].compact
else
- File.join RbConfig::CONFIG['datadir'], 'ri', version
+ File.join [RbConfig::CONFIG['datadir'], 'ri', RbConfig::CONFIG['USE_VERSIONED_PATHS'] == 'YES' ? version : nil].compact
end
SYSDIR = File.join base, "system"
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index cec8c9f..fed14d2 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -379,7 +379,7 @@ end
install?(:doc, :rdoc) do
if $rdocdir
- ridatadir = File.join(CONFIG['ridir'], CONFIG['ruby_version'], "system")
+ ridatadir = File.join([CONFIG['ridir'], RbConfig::CONFIG['USE_VERSIONED_PATHS'] == 'YES' ? version : nil, "system"].compact)
prepare "rdoc", ridatadir
install_recursive($rdocdir, ridatadir, :mode => $data_mode)
end
--
1.7.6

View file

@ -1,6 +1,16 @@
diff -up ruby-1.9.3-p0/ext/tk/extconf.rb.orig ruby-1.9.3-p0/ext/tk/extconf.rb
--- ruby-1.9.3-p0/ext/tk/extconf.rb.orig 2011-06-29 16:11:19.000000000 +0200
+++ ruby-1.9.3-p0/ext/tk/extconf.rb 2011-10-18 16:15:59.406299659 +0200
From d006c4d04aecbe80469a26a6114b776e9de4e3c8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Mon, 19 Nov 2012 14:39:19 +0100
Subject: [PATCH] Fix s390x build.
---
ext/tk/extconf.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ext/tk/extconf.rb b/ext/tk/extconf.rb
index 8f3bff8..69e90a1 100644
--- a/ext/tk/extconf.rb
+++ b/ext/tk/extconf.rb
@@ -114,7 +114,7 @@ def is_macosx?
end
@ -10,3 +20,6 @@ diff -up ruby-1.9.3-p0/ext/tk/extconf.rb.orig ruby-1.9.3-p0/ext/tk/extconf.rb
end
def check_tcltk_version(version)
--
1.8.1

View file

@ -1,6 +1,17 @@
--- ruby-1.9.3-p0/lib/mkmf.rb.debug 2011-08-11 15:07:37.000000000 +0900
+++ ruby-1.9.3-p0/lib/mkmf.rb 2012-01-29 21:34:17.000000000 +0900
@@ -1638,7 +1638,7 @@
From ec16398159a161fc77436b4855d489f193b2515b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Mon, 19 Nov 2012 15:14:51 +0100
Subject: [PATCH] Verbose mkmf.
---
lib/mkmf.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 4b6c52e..67a15ee 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -1777,7 +1777,7 @@ SRC
SHELL = /bin/sh
# V=0 quiet, V=1 verbose. other values don't work.
@ -8,4 +19,7 @@
+V = 1
Q1 = $(V:1=)
Q = $(Q1:0=@)
n=$(NULLCMD)
ECHO1 = $(V:1=@#{CONFIG['NULLCMD']})
--
1.8.1.2

View file

@ -1,76 +0,0 @@
--- ruby-1.9.3-p0/lib/rubygems/uninstaller.rb.orig 2011-10-31 10:22:36.321579483 +0100
+++ ruby-1.9.3-p0/lib/rubygems/uninstaller.rb 2011-10-31 10:34:25.563626119 +0100
@@ -51,15 +51,14 @@
@bin_dir = options[:bin_dir]
@format_executable = options[:format_executable]
+ if options[:force]
+ @force_all = true
+ @force_ignore = true
+ end
+
# only add user directory if install_dir is not set
@user_install = false
@user_install = options[:user_install] unless options[:install_dir]
-
- if @user_install then
- Gem.use_paths Gem.user_dir, @gem_home
- else
- Gem.use_paths @gem_home
- end
end
##
@@ -69,10 +68,24 @@
def uninstall
list = Gem::Specification.find_all_by_name(@gem, @version)
+ list, other_repo_specs = list.partition do |spec|
+ @gem_home == spec.base_dir or
+ (@user_install and spec.base_dir == Gem.user_dir)
+ end
+
if list.empty? then
- raise Gem::InstallError, "gem #{@gem.inspect} is not installed"
+ raise Gem::InstallError, "gem #{@gem.inspect} is not installed" if
+ other_repo_specs.empty?
+
+ other_repos = other_repo_specs.map { |spec| spec.base_dir }.uniq
+
+ message = ["#{@gem} is not installed in GEM_HOME, try:"]
+ message.concat other_repos.map { |repo|
+ "\tgem uninstall -i #{repo} #{@gem}"
+ }
- elsif list.size > 1 and @force_all then
+ raise Gem::InstallError, message.join("\n")
+ elsif @force_all then
remove_all list
elsif list.size > 1 then
@@ -250,12 +263,10 @@
msg << "\t#{spec.full_name}"
spec.dependent_gems.each do |dep_spec, dep, satlist|
- msg <<
- ("#{dep_spec.name}-#{dep_spec.version} depends on " +
- "[#{dep.name} (#{dep.requirement})]")
+ msg << "#{dep_spec.name}-#{dep_spec.version} depends on #{dep}"
end
- msg << 'If you remove this gems, one or more dependencies will not be met.'
+ msg << 'If you remove this gem, one or more dependencies will not be met.'
msg << 'Continue with Uninstall?'
return ask_yes_no(msg.join("\n"), true)
end
--- ruby-1.9.3-p0/test/rubygems/test_gem_uninstaller.rb.orig 2011-11-03 08:58:31.411272176 +0100
+++ ruby-1.9.3-p0/test/rubygems/test_gem_uninstaller.rb 2011-11-03 08:58:43.010272351 +0100
@@ -225,7 +225,7 @@
uninstaller = Gem::Uninstaller.new('a')
- use_ui Gem::MockGemUi.new("2\n") do
+ use_ui Gem::MockGemUi.new("2\ny\n") do
uninstaller.uninstall
end

View file

@ -1,24 +0,0 @@
diff --git a/test/webrick/test_cgi.rb b/test/webrick/test_cgi.rb
index 1185316..0ef1b37 100644
--- a/test/webrick/test_cgi.rb
+++ b/test/webrick/test_cgi.rb
@@ -14,6 +14,7 @@ class TestWEBrickCGI < Test::Unit::TestCase
def req.meta_vars
meta = super
meta["RUBYLIB"] = $:.join(File::PATH_SEPARATOR)
+ meta[RbConfig::CONFIG['LIBPATHENV']] = ENV[RbConfig::CONFIG['LIBPATHENV']]
return meta
end
},
diff --git a/test/webrick/test_filehandler.rb b/test/webrick/test_filehandler.rb
index bcdb3df..f78ba5c 100644
--- a/test/webrick/test_filehandler.rb
+++ b/test/webrick/test_filehandler.rb
@@ -252,6 +252,7 @@ class WEBrick::TestFileHandler < Test::Unit::TestCase
def req.meta_vars
meta = super
meta["RUBYLIB"] = $:.join(File::PATH_SEPARATOR)
+ meta[RbConfig::CONFIG['LIBPATHENV']] = ENV[RbConfig::CONFIG['LIBPATHENV']]
return meta
end
},

View file

@ -0,0 +1,13 @@
diff --git a/test/runner.rb b/test/runner.rb
index 49844c7..8e59a85 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

View file

@ -0,0 +1,70 @@
From e943a89efd63dcfb80a0ab8d9a4db37f523f508e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Fri, 8 Feb 2013 22:48:41 +0100
Subject: [PATCH] Prevent duplicated paths when empty version string is
configured.
---
configure.in | 3 +++
version.c | 10 ++++++++++
2 files changed, 13 insertions(+)
diff --git a/configure.in b/configure.in
index 5850bbf..7604bb8 100644
--- a/configure.in
+++ b/configure.in
@@ -3306,6 +3306,9 @@ unexpand_shvar exec_prefix prefix
if test ${RUBY_LIB_VERSION_STYLE+set}; then
AC_DEFINE_UNQUOTED(RUBY_LIB_VERSION_STYLE, $RUBY_LIB_VERSION_STYLE !<verconf>!)
else
+ if test "x${ruby_version}" = 'x'; then
+ AC_DEFINE(RUBY_LIB_VERSION_BLANK, 1)
+ fi
AC_DEFINE_UNQUOTED(RUBY_LIB_VERSION, [$RUBY_LIB_VERSION] !<verconf>!)
fi
AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, ${RUBY_EXEC_PREFIX})
diff --git a/version.c b/version.c
index 282960d..54c4513 100644
--- a/version.c
+++ b/version.c
@@ -39,9 +39,15 @@
#define RUBY_VENDOR_LIB RUBY_LIB_PREFIX"/vendor_ruby"
#endif
+#ifdef RUBY_LIB_VERSION_BLANK
+#define RUBY_LIB RUBY_LIB_PREFIX
+#define RUBY_SITE_LIB2 RUBY_SITE_LIB
+#define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB
+#else
#define RUBY_LIB RUBY_LIB_PREFIX "/"RUBY_LIB_VERSION
#define RUBY_SITE_LIB2 RUBY_SITE_LIB "/"RUBY_LIB_VERSION
#define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB "/"RUBY_LIB_VERSION
+#endif
#ifndef RUBY_ARCH_LIB_FOR
#define RUBY_ARCH_LIB_FOR(arch) RUBY_LIB "/"arch
#endif
@@ -77,8 +83,10 @@ const char ruby_initial_load_paths[] =
RUBY_SITE_ARCH_LIB_FOR(RUBY_THINARCH) "\0"
#endif
RUBY_SITE_ARCH_LIB_FOR(RUBY_SITEARCH) "\0"
+#ifndef RUBY_LIB_VERSION_BLANK
RUBY_SITE_LIB "\0"
#endif
+#endif
#ifndef NO_RUBY_VENDOR_LIB
RUBY_VENDOR_LIB2 "\0"
@@ -86,8 +94,10 @@ const char ruby_initial_load_paths[] =
RUBY_VENDOR_ARCH_LIB_FOR(RUBY_THINARCH) "\0"
#endif
RUBY_VENDOR_ARCH_LIB_FOR(RUBY_SITEARCH) "\0"
+#ifndef RUBY_LIB_VERSION_BLANK
RUBY_VENDOR_LIB "\0"
#endif
+#endif
RUBY_LIB "\0"
#ifdef RUBY_THINARCH
--
1.8.1.2

39
ruby-exercise.stp Normal file
View file

@ -0,0 +1,39 @@
/* Example tapset file.
*
* You can execute the tapset using following command (please adjust the path
* prior running the command, if needed):
*
* stap /usr/share/doc/ruby-2.0.0.0/ruby-exercise.stp -c "ruby -e \"puts 'test'\""
*/
probe ruby.cmethod.entry {
printf("%d -> %s::%s %s:%d\n", tid(), classname, methodname, file, line);
}
probe ruby.cmethod.return {
printf("%d <- %s::%s %s:%d\n", tid(), classname, methodname, file, line);
}
probe ruby.method.entry {
printf("%d -> %s::%s %s:%d\n", tid(), classname, methodname, file, line);
}
probe ruby.method.return {
printf("%d <- %s::%s %s:%d\n", tid(), classname, methodname, file, line);
}
probe ruby.gc.mark.begin { printf("%d gc.mark.begin\n", tid()); }
probe ruby.gc.mark.end { printf("%d gc.mark.end\n", tid()); }
probe ruby.gc.sweep.begin { printf("%d gc.sweep.begin\n", tid()); }
probe ruby.gc.sweep.end { printf("%d gc.sweep.end\n", tid()); }
probe ruby.object.create{
printf("%d obj.create %s %s:%d\n", tid(), classname, file, line);
}
probe ruby.raise {
printf("%d raise %s %s:%d\n", tid(), classname, file, line);
}

427
ruby.spec
View file

@ -1,15 +1,33 @@
%global major_version 1
%global minor_version 9
%global teeny_version 3
%global patch_level 125
%global major_version 2
%global minor_version 0
%global teeny_version 0
%global patch_level 0
%global major_minor_version %{major_version}.%{minor_version}
%global ruby_version %{major_minor_version}.%{teeny_version}
%global ruby_version_patch_level %{major_minor_version}.%{teeny_version}.%{patch_level}
%global ruby_abi %{major_minor_version}.1
%global ruby_release %{ruby_version}
%global ruby_archive %{name}-%{ruby_version}-p%{patch_level}
# Specify the named version. It has precedense to revision.
#%%global milestone preview2
# Keep the revision enabled for pre-releases from SVN.
%global revision 39387
%global ruby_archive %{name}-%{ruby_version}
# If revision and milestone are removed/commented out, the official release build is expected.
%if 0%{?milestone:1}%{?revision:1} != 0
%global development_release %{?milestone}%{?!milestone:%{?revision:r%{revision}}}
%global ruby_archive %{ruby_archive}-%{?milestone}%{?!milestone:%{?revision:r%{revision}}}
%else
%global ruby_archive %{ruby_archive}-p%{patch_level}
%endif
%global release 1
%{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}}
%global ruby_libdir %{_datadir}/%{name}
%global ruby_libarchdir %{_libdir}/%{name}
@ -25,7 +43,7 @@
%global ruby_vendorlibdir %{_datadir}/ruby/%{ruby_vendordir}
%global ruby_vendorarchdir %{_libdir}/ruby/%{ruby_vendordir}
%global rubygems_version 1.8.11
%global rubygems_version 2.0.0
# The RubyGems library has to stay out of Ruby directory three, since the
# RubyGems should be share by all Ruby implementations.
@ -33,66 +51,91 @@
# Specify custom RubyGems root.
%global gem_dir %{_datadir}/gems
# TODO: Should we create arch specific rubygems-filesystem?
# TODO: These folders should go into rubygem-filesystem but how to achieve it,
# since noarch package cannot provide arch dependent subpackages?
# http://rpm.org/ticket/78
%global gem_extdir %{_exec_prefix}/lib{,64}/gems
%global rake_version 0.9.2.2
%global rake_version 0.9.6
# TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM.
# http://redmine.ruby-lang.org/issues/5313
%global irb_version %{ruby_version_patch_level}
%global rdoc_version 3.9.4
%global bigdecimal_version 1.1.0
%global io_console_version 0.3
%global json_version 1.5.4
%global minitest_version 2.5.1
%global rdoc_version 4.0.0
%global bigdecimal_version 1.2.0
%global io_console_version 0.4.1
%global json_version 1.7.7
%global minitest_version 4.3.2
%global psych_version 2.0.0
%global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/;s/armv.*/arm/')
# Might not be needed in the future, if we are lucky enough.
# https://bugzilla.redhat.com/show_bug.cgi?id=888262
%global tapset_root %{_datadir}/systemtap
%global tapset_dir %{tapset_root}/tapset
%global tapset_libdir %(echo %{_libdir} | sed 's/64//')*
%global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/')
Summary: An interpreter of object-oriented scripting language
Name: ruby
Version: %{ruby_version_patch_level}
Release: 1%{?dist}
Release: %{release_string}
Group: Development/Languages
License: Ruby or BSD
# 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.gz
Source1: operating_system.rb
# TODO: Try to push SystemTap support upstream.
Source2: libruby.stp
Source3: ruby-exercise.stp
# http://redmine.ruby-lang.org/issues/5231
Patch0: ruby-1.9.3-disable-versioned-paths.patch
# TODO: Should be submitted upstream?
# http://bugs.ruby-lang.org/issues/7807
Patch0: ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch
# http://bugs.ruby-lang.org/issues/7808
Patch1: ruby-1.9.3-arch-specific-dir.patch
# http://redmine.ruby-lang.org/issues/5281
Patch2: ruby-1.9.3-added-site-and-vendor-arch-flags.patch
# Fixes rubygem-bigdecimla version.
# https://bugs.ruby-lang.org/issues/7761
Patch2: ruby-2.0.0-ext-bigdecimal-bigdecimal.gemspec-bump-to-1.2.0.patch
# Force multiarch directories for i.86 to be always named i386. This solves
# some differencies in build between Fedora and RHEL.
Patch3: ruby-1.9.3-always-use-i386.patch
# http://redmine.ruby-lang.org/issues/5465
Patch4: ruby-1.9.3-fix-s390x-build.patch
# Fix the uninstaller, so that it doesn't say that gem doesn't exist
# when it exists outside of the GEM_HOME (already fixed in the upstream)
Patch5: ruby-1.9.3-rubygems-1.8.11-uninstaller.patch
# http://redmine.ruby-lang.org/issues/5135 - see comment 29
Patch6: ruby-1.9.3-webrick-test-fix.patch
# Already fixed upstream:
# https://github.com/ruby/ruby/commit/f212df564a4e1025f9fb019ce727022a97bfff53
Patch7: ruby-1.9.3-bignum-test-fix.patch
# Fixes random WEBRick test failures.
# https://bugs.ruby-lang.org/issues/6573.
Patch5: 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
Patch8: ruby-1.9.3-custom-rubygems-location.patch
# Add support for installing binary extensions according to FHS.
# https://github.com/rubygems/rubygems/issues/210
Patch9: rubygems-1.8.11-binary-extensions.patch
# Note that 8th patch might be resolved by
# https://bugs.ruby-lang.org/issues/7897
Patch9: rubygems-2.0.0-binary-extensions.patch
# Make mkmf verbose by default
Patch12: ruby-1.9.3-mkmf-verbose.patch
# This slightly changes behavior of "gem install --install-dir" behavior.
# Without this patch, Specifications.dirs is modified and gems installed on
# the system cannot be required anymore. This causes later issues when RDoc
# documentation should be generated, since json gem is sudenly not accessible.
# https://github.com/rubygems/rubygems/pull/452
Patch13: rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch
# This prevents issues, when ruby configuration specifies --with-ruby-version=''.
# https://github.com/rubygems/rubygems/pull/455
Patch14: rubygems-2.0.0-Fixes-for-empty-ruby-version.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}
BuildRequires: autoconf
BuildRequires: gdbm-devel
BuildRequires: ncurses-devel
BuildRequires: db4-devel
BuildRequires: libdb-devel
BuildRequires: libffi-devel
BuildRequires: openssl-devel
BuildRequires: libyaml-devel
@ -100,6 +143,11 @@ BuildRequires: readline-devel
BuildRequires: tk-devel
# Needed to pass test_set_program_name(TestRubyOptions)
BuildRequires: procps
BuildRequires: %{_bindir}/dtrace
# 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}
%description
Ruby is the interpreted scripting language for quick and easy
@ -122,7 +170,7 @@ Ruby or an application embedding Ruby.
Summary: Libraries necessary to run Ruby
Group: Development/Libraries
License: Ruby or BSD
Provides: ruby(abi) = %{ruby_abi}
Provides: ruby(release) = %{ruby_release}
%description libs
This package includes the libruby, necessary to run Ruby.
@ -133,9 +181,10 @@ Summary: The Ruby standard for packaging ruby libraries
Version: %{rubygems_version}
Group: Development/Libraries
License: Ruby or MIT
Requires: ruby(abi) = %{ruby_abi}
Requires: ruby(release)
Requires: rubygem(rdoc) >= %{rdoc_version}
Requires: rubygem(io-console) >= %{io_console_version}
Requires: rubygem(psych) >= %{psych_version}
Provides: gem = %{version}-%{release}
Provides: ruby(rubygems) = %{version}-%{release}
BuildArch: noarch
@ -162,7 +211,7 @@ Summary: Ruby based make-like utility
Version: %{rake_version}
Group: Development/Libraries
License: Ruby or MIT
Requires: ruby(abi) = %{ruby_abi}
Requires: ruby(release)
Requires: ruby(rubygems) >= %{rubygems_version}
Provides: rake = %{version}-%{release}
Provides: rubygem(rake) = %{version}-%{release}
@ -192,19 +241,16 @@ Summary: A tool to generate HTML and command-line documentation for Ruby proj
Version: %{rdoc_version}
Group: Development/Libraries
License: GPLv2 and Ruby and MIT
Requires: ruby(abi) = %{ruby_abi}
Requires: ruby(release)
Requires: ruby(rubygems) >= %{rubygems_version}
Requires: ruby(irb) = %{irb_version}
Requires: rubygem(json) >= %{json_version}
Provides: rdoc = %{version}-%{release}
Provides: ri = %{version}-%{release}
Provides: rubygem(rdoc) = %{version}-%{release}
Obsoletes: ruby-rdoc < %{version}
Obsoletes: ruby-ri < %{version}
# TODO: It seems that ri documentation differs from platform to platform due to
# some encoding bugs, therefore the documentation should be split out of this gem
# or kept platform specific.
# https://github.com/rdoc/rdoc/issues/71
# BuildArch: noarch
BuildArch: noarch
%description -n rubygem-rdoc
RDoc produces HTML and command-line documentation for Ruby projects. RDoc
@ -212,12 +258,22 @@ includes the 'rdoc' and 'ri' tools for generating and displaying online
documentation.
%package doc
Summary: Documentation for %{name}
Group: Documentation
Requires: %{_bindir}/ri
BuildArch: noarch
%description doc
This package contains documentation for %{name}.
%package -n rubygem-bigdecimal
Summary: BigDecimal provides arbitrary-precision floating point decimal arithmetic
Version: %{bigdecimal_version}
Group: Development/Libraries
License: GPL+ or Artistic
Requires: ruby(abi) = %{ruby_abi}
Requires: ruby(release)
Requires: ruby(rubygems) >= %{rubygems_version}
Provides: rubygem(bigdecimal) = %{version}-%{release}
@ -238,7 +294,7 @@ conversion between base 10 and base 2.
Summary: IO/Console is a simple console utilizing library
Version: %{io_console_version}
Group: Development/Libraries
Requires: ruby(abi) = %{ruby_abi}
Requires: ruby(release)
Requires: ruby(rubygems) >= %{rubygems_version}
Provides: rubygem(io-console) = %{version}-%{release}
@ -252,7 +308,7 @@ Summary: This is a JSON implementation as a Ruby extension in C
Version: %{json_version}
Group: Development/Libraries
License: Ruby or GPLv2
Requires: ruby(abi) = %{ruby_abi}
Requires: ruby(release)
Requires: ruby(rubygems) >= %{rubygems_version}
Provides: rubygem(json) = %{version}-%{release}
@ -264,11 +320,11 @@ markup language.
%package -n rubygem-minitest
Summary: Minitest provides a complete suite of testing facilities.
Summary: Minitest provides a complete suite of testing facilities
Version: %{minitest_version}
Group: Development/Libraries
License: MIT
Requires: ruby(abi) = %{ruby_abi}
Requires: ruby(release)
Requires: ruby(rubygems) >= %{rubygems_version}
Provides: rubygem(minitest) = %{version}-%{release}
BuildArch: noarch
@ -288,6 +344,25 @@ minitest/pride shows pride in testing and adds coloring to your test
output.
%package -n rubygem-psych
Summary: A libyaml wrapper for Ruby
Version: %{psych_version}
Group: Development/Libraries
License: MIT
Requires: ruby(release)
Requires: ruby(rubygems) >= %{rubygems_version}
Provides: rubygem(psych) = %{version}-%{release}
%description -n rubygem-psych
Psych is a YAML parser and emitter. Psych leverages
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
%package tcltk
Summary: Tcl/Tk interface for scripting language Ruby
Group: Development/Languages
@ -306,27 +381,33 @@ Tcl/Tk interface for the object-oriented scripting language Ruby.
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
# Provide an example of usage of the tapset:
cp -a %{SOURCE3} .
%build
autoconf
%configure \
--with-rubylibprefix='%{ruby_libdir}' \
--with-archdir='%{ruby_libarchdir}' \
--with-rubyarchdir='%{ruby_libarchdir}' \
--with-sitedir='%{ruby_sitelibdir}' \
--with-sitearchdir='%{ruby_sitearchdir}' \
--with-vendordir='%{ruby_vendorlibdir}' \
--with-vendorarchdir='%{ruby_vendorarchdir}' \
--with-rubyhdrdir='%{_includedir}' \
--with-rubygemsdir='%{rubygems_dir}' \
--with-ruby-pc='%{name}.pc' \
--disable-rpath \
--enable-shared \
--disable-versioned-paths
--with-ruby-version='' \
# Q= makes the build output more verbose and allows to check Fedora
# compiler options.
@ -337,22 +418,29 @@ make %{?_smp_mflags} COPY="cp -p" Q=
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
# Rename the ruby executable. It is replaced by RubyPick.
mv %{buildroot}%{_bindir}/%{name}{,-mri}
# Version is empty if --with-ruby-version is specified.
# http://bugs.ruby-lang.org/issues/7807
sed -i 's/Version: \${ruby_version}/Version: %{ruby_version}/' %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
# Dump the macros into macro.ruby to use them to build other Ruby libraries.
mkdir -p %{buildroot}%{_sysconfdir}/rpm
cat >> %{buildroot}%{_sysconfdir}/rpm/macros.ruby << \EOF
%%ruby_libdir %{_datadir}/%{name}
%%ruby_libarchdir %{_libdir}/%{name}
%%ruby_libdir %%{_datadir}/%{name}
%%ruby_libarchdir %%{_libdir}/%{name}
# This is the local lib/arch and should not be used for packaging.
%%ruby_sitedir site_ruby
%%ruby_sitelibdir %{_prefix}/local/share/ruby/%{ruby_sitedir}
%%ruby_sitearchdir %{_prefix}/local/%{_lib}/ruby/%{ruby_sitedir}
%%ruby_sitelibdir %%{_prefix}/local/share/%{name}/%%{ruby_sitedir}
%%ruby_sitearchdir %%{_prefix}/local/%%{_lib}/%{name}/%%{ruby_sitedir}
# This is the general location for libs/archs compatible with all
# or most of the Ruby versions available in the Fedora repositories.
%%ruby_vendordir vendor_ruby
%%ruby_vendorlibdir %{_datadir}/ruby/%{ruby_vendordir}
%%ruby_vendorarchdir %{_libdir}/ruby/%{ruby_vendordir}
%%ruby_vendorlibdir %%{ruby_libdir}/%%{ruby_vendordir}
%%ruby_vendorarchdir %%{ruby_libarchdir}/%%{ruby_vendordir}
EOF
cat >> %{buildroot}%{_sysconfdir}/rpm/macros.rubygems << \EOF
@ -361,11 +449,27 @@ cat >> %{buildroot}%{_sysconfdir}/rpm/macros.rubygems << \EOF
# Common gem locations and files.
%%gem_instdir %%{gem_dir}/gems/%%{gem_name}-%%{version}
%%gem_extdir %%{_libdir}/gems/exts/%%{gem_name}-%%{version}
%%gem_extdir %%{_libdir}/gems/%{name}/%%{gem_name}-%%{version}
%%gem_libdir %%{gem_instdir}/lib
%%gem_cache %%{gem_dir}/cache/%%{gem_name}-%%{version}.gem
%%gem_spec %%{gem_dir}/specifications/%%{gem_name}-%%{version}.gemspec
%%gem_docdir %%{gem_dir}/doc/%%{gem_name}-%%{version}
# Install gem into appropriate directory.
# -n<gem_file> Overrides gem file name for installation.
# -d<install_dir> Set installation directory.
%%gem_install(d:n:) \
mkdir -p %%{-d*}%%{!?-d:.%%{gem_dir}} \
\
CONFIGURE_ARGS="--with-cflags='%%{optflags}' $CONFIGURE_ARGS" \\\
gem install \\\
-V \\\
--local \\\
--install-dir %%{-d*}%%{!?-d:.%%{gem_dir}} \\\
--bindir .%%{_bindir} \\\
--force \\\
--document=ri,rdoc \\\
%%{-n*}%%{!?-n:%%{gem_name}-%%{version}.gem}
EOF
# Install custom operating_system.rb.
@ -373,62 +477,102 @@ mkdir -p %{buildroot}%{rubygems_dir}/rubygems/defaults
cp %{SOURCE1} %{buildroot}%{rubygems_dir}/rubygems/defaults
# Move gems root into common direcotry, out of Ruby directory structure.
mv %{buildroot}%{ruby_libdir}/gems/%{ruby_abi} %{buildroot}%{gem_dir}
mv %{buildroot}%{ruby_libdir}/gems %{buildroot}%{gem_dir}
# Create folders for gem binary extensions.
mkdir -p %{buildroot}%{gem_extdir}/exts
mkdir -p %{buildroot}%{gem_extdir}/%{name}
# Move bundled rubygems to %%gem_dir and %%gem_extdir
# 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
mkdir -p %{buildroot}%{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib
mkdir -p %{buildroot}%{_libdir}/gems/exts/bigdecimal-%{bigdecimal_version}/lib
mkdir -p %{buildroot}%{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}/lib
mv %{buildroot}%{ruby_libdir}/bigdecimal %{buildroot}%{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib
mv %{buildroot}%{ruby_libarchdir}/bigdecimal.so %{buildroot}%{_libdir}/gems/exts/bigdecimal-%{bigdecimal_version}/lib
mv %{buildroot}%{ruby_libarchdir}/bigdecimal.so %{buildroot}%{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}/lib
mv %{buildroot}%{gem_dir}/specifications/default/bigdecimal-%{bigdecimal_version}.gemspec %{buildroot}%{gem_dir}/specifications
ln -s %{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib/bigdecimal %{buildroot}%{ruby_libdir}/bigdecimal
ln -s %{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}/lib/bigdecimal.so %{buildroot}%{ruby_libarchdir}/bigdecimal.so
mkdir -p %{buildroot}%{gem_dir}/gems/io-console-%{io_console_version}/lib
mkdir -p %{buildroot}%{_libdir}/gems/exts/io-console-%{io_console_version}/lib/io
mkdir -p %{buildroot}%{_libdir}/gems/%{name}/io-console-%{io_console_version}/lib/io
mv %{buildroot}%{ruby_libdir}/io %{buildroot}%{gem_dir}/gems/io-console-%{io_console_version}/lib
mv %{buildroot}%{ruby_libarchdir}/io/console.so %{buildroot}%{_libdir}/gems/exts/io-console-%{io_console_version}/lib/io
mv %{buildroot}%{ruby_libarchdir}/io/console.so %{buildroot}%{_libdir}/gems/%{name}/io-console-%{io_console_version}/lib/io
mv %{buildroot}%{gem_dir}/specifications/default/io-console-%{io_console_version}.gemspec %{buildroot}%{gem_dir}/specifications
ln -s %{gem_dir}/gems/io-console-%{io_console_version}/lib/io %{buildroot}%{ruby_libdir}/io
ln -s %{_libdir}/gems/%{name}/io-console-%{io_console_version}/lib/io/console.so %{buildroot}%{ruby_libarchdir}/io/console.so
mkdir -p %{buildroot}%{gem_dir}/gems/json-%{json_version}/lib
mkdir -p %{buildroot}%{_libdir}/gems/exts/json-%{json_version}/lib
mkdir -p %{buildroot}%{_libdir}/gems/%{name}/json-%{json_version}/lib
mv %{buildroot}%{ruby_libdir}/json* %{buildroot}%{gem_dir}/gems/json-%{json_version}/lib
mv %{buildroot}%{ruby_libarchdir}/json/ %{buildroot}%{_libdir}/gems/exts/json-%{json_version}/lib/
mv %{buildroot}%{ruby_libarchdir}/json/ %{buildroot}%{_libdir}/gems/%{name}/json-%{json_version}/lib/
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}/lib
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}/lib/
mv %{buildroot}%{gem_dir}/specifications/default/psych-%{psych_version}.gemspec %{buildroot}%{gem_dir}/specifications
# Adjust the gemspec files so that the gems will load properly
sed -i '2 a\
s.require_paths = ["lib"]' %{buildroot}/%{gem_dir}/specifications/rake-%{rake_version}.gemspec
sed -i '/^end$/ i\
s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/rake-%{rake_version}.gemspec
sed -i '2 a\
s.require_paths = ["lib"]' %{buildroot}/%{gem_dir}/specifications/rdoc-%{rdoc_version}.gemspec
sed -i '/^end$/ i\
s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/rdoc-%{rdoc_version}.gemspec
sed -i '2 a\
sed -i '/^end$/ i\
s.require_paths = ["lib"]\
s.extensions = ["bigdecimal.so"]' %{buildroot}/%{gem_dir}/specifications/bigdecimal-%{bigdecimal_version}.gemspec
s.extensions = ["bigdecimal.so"]' %{buildroot}%{gem_dir}/specifications/bigdecimal-%{bigdecimal_version}.gemspec
sed -i '2 a\
sed -i '/^end$/ i\
s.require_paths = ["lib"]\
s.extensions = ["io/console.so"]' %{buildroot}/%{gem_dir}/specifications/io-console-%{io_console_version}.gemspec
s.extensions = ["io/console.so"]' %{buildroot}%{gem_dir}/specifications/io-console-%{io_console_version}.gemspec
sed -i '2 a\
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
s.extensions = ["json/ext/parser.so", "json/ext/generator.so"]' %{buildroot}%{gem_dir}/specifications/json-%{json_version}.gemspec
sed -i '2 a\
s.require_paths = ["lib"]' %{buildroot}/%{gem_dir}/specifications/minitest-%{minitest_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}|" \
%{SOURCE2} > %{buildroot}%{tapset_dir}/libruby.so.%{ruby_version}.stp
# Escape '*/' in comment.
sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{ruby_version}.stp
%check
# TODO: Investigate the test failures.
# https://bugs.ruby-lang.org/issues/6036
make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x test_x509cert.rb"
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"
%endif
%ifarch ppc ppc64
# test_spawn_too_long_path(TestProcess) fails with [Errno::ENOENT, Errno::E2BIG, nil] expected but nothing was raised.
# https://bugs.ruby-lang.org/issues/7904
DISABLE_TESTS="-x test_process.rb $DISABLE_TESTS"
%endif
# The TestRbConfig errors, which does not respect configuration options.
# http://bugs.ruby-lang.org/issues/7912
DISABLE_TESTS="-x test_rbconfig.rb $DISABLE_TESTS"
make check TESTS="-v $DISABLE_TESTS"
%post libs -p /sbin/ldconfig
@ -437,17 +581,10 @@ make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x t
%files
%doc COPYING
%lang(ja) %doc COPYING.ja
%doc ChangeLog
%doc GPL
%doc LEGAL
%doc NEWS
%doc README
%lang(ja) %doc README.ja
%doc ToDo
%doc doc/ChangeLog-*
%doc doc/NEWS-*
%{_bindir}/erb
%{_bindir}/ruby
%{_bindir}/%{name}-mri
%{_bindir}/testrb
%{_mandir}/man1/erb*
%{_mandir}/man1/ruby*
@ -470,7 +607,7 @@ make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x t
%{_includedir}/%{_normalized_cpu}-%{_target_os}/ruby
%{_libdir}/libruby.so
%{_libdir}/pkgconfig/ruby-%{major_minor_version}.pc
%{_libdir}/pkgconfig/%{name}.pc
%files libs
%doc COPYING
@ -479,6 +616,8 @@ make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x t
%doc LEGAL
%doc README
%lang(ja) %doc README.ja
%doc NEWS
%doc doc/NEWS-*
# Exclude /usr/local directory since it is supposed to be managed by
# local system administrator.
%exclude %{ruby_sitelibdir}
@ -506,7 +645,6 @@ make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x t
%{ruby_libdir}/net
%{ruby_libdir}/openssl
%{ruby_libdir}/optparse
%{ruby_libdir}/psych
%{ruby_libdir}/racc
%{ruby_libdir}/rbconfig
%{ruby_libdir}/rexml
@ -514,7 +652,7 @@ make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x t
%{ruby_libdir}/ripper
%{ruby_libdir}/rss
%{ruby_libdir}/shell
%{ruby_libdir}/syck
%{ruby_libdir}/syslog
%{ruby_libdir}/test
%exclude %{ruby_libdir}/tk
%exclude %{ruby_libdir}/tkextlib
@ -595,12 +733,12 @@ make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x t
%{ruby_libarchdir}/enc/utf_32be.so
%{ruby_libarchdir}/enc/utf_32le.so
%{ruby_libarchdir}/enc/windows_1251.so
%{ruby_libarchdir}/enc/windows_31j.so
%{ruby_libarchdir}/etc.so
%{ruby_libarchdir}/fcntl.so
%{ruby_libarchdir}/fiber.so
%{ruby_libarchdir}/fiddle.so
%{ruby_libarchdir}/gdbm.so
%{ruby_libarchdir}/iconv.so
%dir %{ruby_libarchdir}/io
%{ruby_libarchdir}/io/nonblock.so
%{ruby_libarchdir}/io/wait.so
@ -611,7 +749,6 @@ make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x t
%{ruby_libarchdir}/objspace.so
%{ruby_libarchdir}/openssl.so
%{ruby_libarchdir}/pathname.so
%{ruby_libarchdir}/psych.so
%{ruby_libarchdir}/pty.so
%dir %{ruby_libarchdir}/racc
%{ruby_libarchdir}/racc/cparse.so
@ -622,21 +759,23 @@ make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x t
%{ruby_libarchdir}/socket.so
%{ruby_libarchdir}/stringio.so
%{ruby_libarchdir}/strscan.so
%{ruby_libarchdir}/syck.so
%{ruby_libarchdir}/syslog.so
%exclude %{ruby_libarchdir}/tcltklib.so
%exclude %{ruby_libarchdir}/tkutil.so
%{ruby_libarchdir}/zlib.so
%{tapset_root}
%files -n rubygems
%{_bindir}/gem
%{rubygems_dir}
%{gem_dir}
%exclude %{gem_dir}/gems/*
%{_exec_prefix}/lib*/gems
%exclude %{_exec_prefix}/lib*/gems/exts/bigdecimal-%{bigdecimal_version}
%exclude %{_exec_prefix}/lib*/gems/exts/io-console-%{io_console_version}
%exclude %{_exec_prefix}/lib*/gems/exts/json-%{json_version}
%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
@ -645,6 +784,7 @@ make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x t
%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
%files -n rubygems-devel
%config(noreplace) %{_sysconfdir}/rpm/macros.rubygems
@ -667,20 +807,31 @@ make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x t
%{gem_dir}/gems/rdoc-%{rdoc_version}
%{gem_dir}/specifications/rdoc-%{rdoc_version}.gemspec
%{_mandir}/man1/ri*
%files doc
%doc README
%lang(ja) %doc README.ja
%doc ChangeLog
%doc doc/ChangeLog-*
%doc ruby-exercise.stp
%{_datadir}/ri
%files -n rubygem-bigdecimal
%{_libdir}/gems/exts/bigdecimal-%{bigdecimal_version}
%{ruby_libdir}/bigdecimal
%{ruby_libarchdir}/bigdecimal.so
%{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}
%{gem_dir}/gems/bigdecimal-%{bigdecimal_version}
%{gem_dir}/specifications/bigdecimal-%{bigdecimal_version}.gemspec
%files -n rubygem-io-console
%{_libdir}/gems/exts/io-console-%{io_console_version}
%{ruby_libdir}/io
%{ruby_libarchdir}/io/console.so
%{_libdir}/gems/%{name}/io-console-%{io_console_version}
%{gem_dir}/gems/io-console-%{io_console_version}
%{gem_dir}/specifications/io-console-%{io_console_version}.gemspec
%files -n rubygem-json
%{_libdir}/gems/exts/json-%{json_version}
%{_libdir}/gems/%{name}/json-%{json_version}
%{gem_dir}/gems/json-%{json_version}
%{gem_dir}/specifications/json-%{json_version}.gemspec
@ -688,6 +839,11 @@ make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x t
%{gem_dir}/gems/minitest-%{minitest_version}
%{gem_dir}/specifications/minitest-%{minitest_version}.gemspec
%files -n rubygem-psych
%{_libdir}/gems/%{name}/psych-%{psych_version}
%{gem_dir}/gems/psych-%{psych_version}
%{gem_dir}/specifications/psych-%{psych_version}.gemspec
%files tcltk
%{ruby_libdir}/*-tk.rb
%{ruby_libdir}/tcltk.rb
@ -698,6 +854,59 @@ make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x t
%{ruby_libdir}/tkextlib
%changelog
* Thu Feb 21 2013 Vít Ondruch <vondruch@redhat.com> - 2.0.0.0-0.1.r39387
- Upgrade to Ruby 2.0.0 (r39387).
- Introduce %%gem_install macro.
* Tue Feb 05 2013 Vít Ondruch <vondruch@redhat.com> - 2.0.0.0-0.1.rc2
- Upgrade to Ruby 2.0.0 (rc2).
- Build against libdb instead of libdb4 (rhbz#894022).
- Provide nonversioned packageconfig (rhbz#789532) and fix provided variables.
- Move native extensions from exts to ruby directory.
- Enable most of the PPC test suite.
- Change ruby(abi) -> ruby(release).
- Rename ruby executable to ruby-mri, to be prepared for RubyPick.
- Add ruby(runtime_executable) virtual provide, which is later used
by RubyPick.
* Mon Dec 10 2012 Vít Ondruch <vondruch@redhat.com> - 2.0.0.0-0.1.r38422
- Upgrade to Ruby 2.0.0 (r38422).
- RDoc now depends on JSON.
- Try to make -doc subpackage noarch again, since the new RDoc should resolve
the arch dependent issues (https://github.com/rdoc/rdoc/issues/71).
- Enable SystemTap support.
- Add TapSet for Ruby.
* Tue Nov 20 2012 Vít Ondruch <vondruch@redhat.com> - 2.0.0.0-0.1.r37773
- Upgrade to Ruby 2.0.0 (r37773).
* Fri Nov 09 2012 Vít Ondruch <vondruch@redhat.com> - 2.0.0.0-0.1.r37589
- Upgrade to Ruby 2.0.0 (r37589).
* Mon Nov 05 2012 Vít Ondruch <vondruch@redhat.com> - 2.0.0.0-0.1.r37421
- Upgrade to Ruby 2.0.0 (r37421).
- Split Psych into rubygem-psych subpackage.
* Thu Sep 06 2012 Vít Ondruch <vondruch@redhat.com> - 2.0.0.0-0.1.r36887
- Upgrade to Ruby 2.0.0 (r36887).
- Split documentation into -doc subpackage (rhbz#854418).
* Mon Jun 11 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 2.0.0.0-0.1.r35922
- Make the bigdecimal gem a runtime dependency of Ruby.
* Mon Jun 11 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 2.0.0.0-0.1.r35922
- Make symlinks for bigdecimal and io-console gems to ruby stdlib dirs (RHBZ 829209).
* Tue May 29 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 2.0.0.0-0.1.r35922
- Fix license to contain Public Domain.
- macros.ruby now contains unexpanded macros.
* Wed Apr 18 2012 Vít Ondruch <vondruch@redhat.com> - 2.0.0.0-0.1.r35368
- Upgrade to Ruby 2.0.0 (r35368).
* Thu Feb 23 2012 Vít Ondruch <vondruch@redhat.com> - 2.0.0.0-0.1.r34723
- Upgrade to Ruby 2.0.0 (r34723).
* Mon Feb 20 2012 Vít Ondruch <vondruch@redhat.com> - 1.9.3.125-1
- Upgrade to Ruby 1.9.3-p125.
@ -717,18 +926,18 @@ make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x t
- Create and own RubyGems directories for binary extensions.
- Fix build with GCC 4.7.
* Wed Jan 16 2012 Vít Ondruch <vondruch@redhat.com> - 1.9.3.0-3
* Mon Jan 16 2012 Vít Ondruch <vondruch@redhat.com> - 1.9.3.0-3
- Fix RHEL build.
- Fixed directory ownership.
- Verose build output.
* Wed Jan 15 2012 Vít Ondruch <vondruch@redhat.com> - 1.9.3.0-2
* Sun Jan 15 2012 Vít Ondruch <vondruch@redhat.com> - 1.9.3.0-2
- Install RubyGems outside of Ruby directory structure.
- RubyGems has not its own -devel subpackage.
- Enhanced macros.ruby and macros.rubygems.
- All tests are green now (bkabrda).
* Tue Jan 14 2012 Vít Ondruch <vondruch@redhat.com> - 1.9.3.0-1
* Sat Jan 14 2012 Vít Ondruch <vondruch@redhat.com> - 1.9.3.0-1
- Initial package
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.7.357-2
@ -742,7 +951,7 @@ make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x t
- dont normalise arm cpus to arm
- there is something weird about how ruby choses where to put bits
* Thu Nov 16 2011 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1.8.7.352-3
* Thu Nov 17 2011 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1.8.7.352-3
- F-17: kill gdbm support for now due to licensing compatibility issue
* Sat Oct 1 2011 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1.8.7.352-2
@ -1027,11 +1236,11 @@ make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x t
* Fri Aug 10 2007 Akira TAGOH <tagoh@redhat.com>
- Update License tag.
* Mon Jul 25 2007 Akira TAGOH <tagoh@redhat.com> - 1.8.6.36-3
* Mon Jun 25 2007 Akira TAGOH <tagoh@redhat.com> - 1.8.6.36-3
- ruby-r12567.patch: backport patch from upstream svn to get rid of
the unnecessary declarations. (#245446)
* Wed Jul 20 2007 Akira TAGOH <tagoh@redhat.com> - 1.8.6.36-2
* Wed Jun 20 2007 Akira TAGOH <tagoh@redhat.com> - 1.8.6.36-2
- New upstream release.
- Fix Etc::getgrgid to get the correct gid as requested. (#236647)
@ -1495,7 +1704,7 @@ make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x t
- Removed ruby_cvs.2000092718.patch and added ruby_cvs.2000100218.patch
(upgraded ruby to latest cvs version).
* Thu Sep 27 2000 akira yamada <akira@vinelinux.org>
* Wed Sep 27 2000 akira yamada <akira@vinelinux.org>
- Updated to upstream version 1.6.1.
- Removed ruby_cvs.2000082901.patch and added ruby_cvs.2000092718.patch
(upgraded ruby to latest cvs version).
@ -1527,7 +1736,7 @@ make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x t
- Removed ruby-list.23190.patch(included into ruby_cvs.patch).
- Added ruby-dev.10054.patch.
* Tue Jun 15 2000 akira yamada <akira@redhat.com>
* Thu Jun 15 2000 akira yamada <akira@redhat.com>
- Updated to version 1.4.4(06/12/2000 CVS).
- Added manuals and FAQs.
- Split into ruby, ruby-devel, ruby-tcltk, ruby-docs, irb.
@ -1573,7 +1782,7 @@ make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x t
* Fri Nov 13 1998 Toru Hoshina <hoshina@best.com>
- Version up.
* Mon Sep 22 1998 Toru Hoshina <hoshina@best.com>
* Tue Sep 22 1998 Toru Hoshina <hoshina@best.com>
- To make a libruby.so.
* Mon Sep 21 1998 Toru Hoshina <hoshina@best.com>

View file

@ -0,0 +1,152 @@
From b95b9942361104dc5b7fd08eb4970f893d8c1a54 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Wed, 13 Feb 2013 13:12:30 +0100
Subject: [PATCH 1/3] Remove duplicated check.
The loaded specifications are rejected already in #gather_dependencies,
so this condition cannot trigger.
---
lib/rubygems/dependency_installer.rb | 3 ---
1 file changed, 3 deletions(-)
diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb
index d811f62..dffa8df 100644
--- a/lib/rubygems/dependency_installer.rb
+++ b/lib/rubygems/dependency_installer.rb
@@ -319,9 +319,6 @@ class Gem::DependencyInstaller
last = @gems_to_install.size - 1
@gems_to_install.each_with_index do |spec, index|
- # REFACTOR more current spec set hardcoding, should be abstracted?
- next if Gem::Specification.include?(spec) and index != last
-
# TODO: make this sorta_verbose so other users can benefit from it
say "Installing gem #{spec.full_name}" if Gem.configuration.really_verbose
--
1.8.1.2
From 2fa9087b1986db6c7945c0f997fed2bfff5ce06a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Wed, 13 Feb 2013 15:47:47 +0100
Subject: [PATCH 2/3] Do not modify global Specification.dirs during
installation.
While gems are installed into --install-dir just fine even without
modifications of Specification.dirs, change in it makes inaccessible
gems already present on the system.
---
lib/rubygems/dependency_installer.rb | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb
index dffa8df..841f26a 100644
--- a/lib/rubygems/dependency_installer.rb
+++ b/lib/rubygems/dependency_installer.rb
@@ -57,17 +57,14 @@ class Gem::DependencyInstaller
# :build_args:: See Gem::Installer::new
def initialize(options = {})
- @install_dir = options[:install_dir] || Gem.dir
if options[:install_dir] then
- # HACK shouldn't change the global settings, needed for -i behavior
- # maybe move to the install command? See also github #442
- Gem::Specification.dirs = @install_dir
- Gem.ensure_gem_subdirectories @install_dir
+ Gem.ensure_gem_subdirectories options[:install_dir]
end
options = DEFAULT_OPTIONS.merge options
+ @install_dir = options[:install_dir]
@bin_dir = options[:bin_dir]
@dev_shallow = options[:dev_shallow]
@development = options[:development]
@@ -91,7 +88,7 @@ class Gem::DependencyInstaller
@installed_gems = []
@toplevel_specs = nil
- @cache_dir = options[:cache_dir] || @install_dir
+ @cache_dir = options[:cache_dir] || @install_dir || Gem.dir
# Set with any errors that SpecFetcher finds while search through
# gemspecs for a dep
@@ -185,7 +182,7 @@ class Gem::DependencyInstaller
# that this isn't dependent only on the currently installed gems
dependency_list.specs.reject! { |spec|
not keep_names.include?(spec.full_name) and
- Gem::Specification.include?(spec)
+ (!@install_dir && Gem::Specification.include?(spec))
}
unless dependency_list.ok? or @ignore_dependencies or @force then
@@ -237,7 +234,7 @@ class Gem::DependencyInstaller
to_do.push t.spec
end
- results.remove_installed! dep
+ results.remove_installed! dep unless @install_dir
@available << results
results.inject_into_list dependency_list
@@ -349,7 +346,7 @@ class Gem::DependencyInstaller
:force => @force,
:format_executable => @format_executable,
:ignore_dependencies => @ignore_dependencies,
- :install_dir => @install_dir,
+ :install_dir => (@install_dir || Gem.dir),
:security_policy => @security_policy,
:user_install => @user_install,
:wrappers => @wrappers,
--
1.8.1.2
From d473204ce920702dd87257db49355929f31530d4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Fri, 15 Feb 2013 17:02:44 +0100
Subject: [PATCH 3/3] Default to Gem.dir as late as possible.
---
lib/rubygems/dependency_installer.rb | 2 +-
lib/rubygems/installer.rb | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb
index 841f26a..abcfa0f 100644
--- a/lib/rubygems/dependency_installer.rb
+++ b/lib/rubygems/dependency_installer.rb
@@ -346,7 +346,7 @@ class Gem::DependencyInstaller
:force => @force,
:format_executable => @format_executable,
:ignore_dependencies => @ignore_dependencies,
- :install_dir => (@install_dir || Gem.dir),
+ :install_dir => @install_dir,
:security_policy => @security_policy,
:user_install => @user_install,
:wrappers => @wrappers,
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index 780a88b..6543130 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -536,13 +536,13 @@ class Gem::Installer
:bin_dir => nil,
:env_shebang => false,
:force => false,
- :install_dir => Gem.dir,
:only_install_dir => false
}.merge options
@env_shebang = options[:env_shebang]
@force = options[:force]
- @gem_home = options[:install_dir]
+ @install_dir = options[:install_dir]
+ @gem_home = options[:install_dir] || Gem.dir
@ignore_dependencies = options[:ignore_dependencies]
@format_executable = options[:format_executable]
@security_policy = options[:security_policy]
--
1.8.1.2

View file

@ -0,0 +1,81 @@
From c9b2eff36728266052ccfff54d3ac0a0624fd0f1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Thu, 14 Feb 2013 11:50:41 +0100
Subject: [PATCH 1/2] Use File.join insteado of manual path creation.
This prevents issues, when File.join in #new_default_spec removes
superfluous slashes while they are kept in expected paths. E.g. the test
would fail if ruby configuration specifies --with-ruby-version=''.
---
test/rubygems/test_gem_commands_contents_command.rb | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/test/rubygems/test_gem_commands_contents_command.rb b/test/rubygems/test_gem_commands_contents_command.rb
index 60df53f..35c9631 100644
--- a/test/rubygems/test_gem_commands_contents_command.rb
+++ b/test/rubygems/test_gem_commands_contents_command.rb
@@ -140,10 +140,10 @@ lib/foo.rb
@cmd.execute
end
- expected = %W[
- #{Gem::ConfigMap[:bindir]}/default_command
- #{Gem::ConfigMap[:rubylibdir]}/default/gem.rb
- #{Gem::ConfigMap[:archdir]}/default_gem.so
+ expected = [
+ File.join(Gem::ConfigMap[:bindir], 'default_command'),
+ File.join(Gem::ConfigMap[:rubylibdir], 'default/gem.rb'),
+ File.join(Gem::ConfigMap[:archdir], 'default_gem.so')
].sort.join "\n"
assert_equal expected, @ui.output.chomp
--
1.8.1.2
From b022cef7b2e6c2d138388a6c2db02cca8c408cc6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Thu, 14 Feb 2013 13:35:20 +0100
Subject: [PATCH 2/2] Do not add last slash to Gem.user_dir if ruby_version
string is empty.
---
lib/rubygems/defaults.rb | 4 +++-
test/rubygems/test_gem.rb | 6 ++++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb
index ea84e5c..05c35bb 100644
--- a/lib/rubygems/defaults.rb
+++ b/lib/rubygems/defaults.rb
@@ -54,7 +54,9 @@ module Gem
# Path for gems in the user's home directory
def self.user_dir
- File.join Gem.user_home, '.gem', ruby_engine, ConfigMap[:ruby_version]
+ parts = [Gem.user_home, '.gem', ruby_engine]
+ parts << ConfigMap[:ruby_version] unless ConfigMap[:ruby_version].empty?
+ File.join parts
end
##
diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
index bf77009..9ee78f7 100644
--- a/test/rubygems/test_gem.rb
+++ b/test/rubygems/test_gem.rb
@@ -1186,8 +1186,10 @@ class TestGem < Gem::TestCase
end
def test_self_user_dir
- assert_equal File.join(@userhome, '.gem', Gem.ruby_engine,
- Gem::ConfigMap[:ruby_version]), Gem.user_dir
+ parts = [@userhome, '.gem', Gem.ruby_engine]
+ parts << Gem::ConfigMap[:ruby_version] unless Gem::ConfigMap[:ruby_version].empty?
+
+ assert_equal File.join(parts), Gem.user_dir
end
def test_self_user_home
--
1.8.1.2

View file

@ -1,17 +1,17 @@
From 5a37a3489491a33f2e7011043fbbcd9a765e1777 Mon Sep 17 00:00:00 2001
From ec90622235ae19b28a327cb50a10e0311e8f3d71 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Thu, 3 Nov 2011 16:43:05 +0100
Subject: [PATCH 1/6] Add dedicate extensions folder into $LOAD_PATH.
Subject: [PATCH 1/9] Add dedicate extensions folder into $LOAD_PATH.
---
lib/rubygems/specification.rb | 37 ++++++++++++++++++++++++++++++-------
1 files changed, 30 insertions(+), 7 deletions(-)
lib/rubygems/specification.rb | 32 ++++++++++++++++++++++++++++++--
1 file changed, 30 insertions(+), 2 deletions(-)
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index 97db19e..263e7d3 100644
index cabdf8d..87b14d2 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -843,6 +843,12 @@ class Gem::Specification
@@ -1256,6 +1256,12 @@ class Gem::Specification
File.join full_gem_path, path
end
@ -24,31 +24,26 @@ index 97db19e..263e7d3 100644
# gem directories must come after -I and ENV['RUBYLIB']
insert_index = Gem.load_path_insert_index
@@ -954,16 +960,16 @@ class Gem::Specification
@@ -1374,11 +1380,16 @@ class Gem::Specification
def contains_requirable_file? file
root = full_gem_path
+ ext = ext_dir
+
+ require_paths.any? do |lib|
suffixes = Gem.suffixes
require_paths.any? do |lib|
- base = "#{root}/#{lib}/#{file}"
- suffixes.any? { |suf| File.file? "#{base}#{suf}" }
+ base = ["#{root}/#{lib}/#{file}"]
+ base << "#{ext}/#{lib}/#{file}" unless extensions.empty?
- require_paths.each do |lib|
- base = "#{root}/#{lib}/#{file}"
- Gem.suffixes.each do |suf|
- path = "#{base}#{suf}"
- return true if File.file? path
+
+ base.any? do |path|
+ Gem.suffixes.any? { |suf| File.file? "#{path}#{suf}" }
+ suffixes.any? { |suf| File.file? "#{path}#{suf}" }
+ end
end
end
-
- return false
end
##
@@ -1273,6 +1279,23 @@ class Gem::Specification
@@ -1674,6 +1685,23 @@ class Gem::Specification
end
##
@ -73,13 +68,13 @@ index 97db19e..263e7d3 100644
#
# Formerly used to indicate this gem was RDoc-capable.
--
1.7.7.3
1.8.1.2
From 671e4285bf9db948bc5f054d7d3d931cdd7a17f8 Mon Sep 17 00:00:00 2001
From e42819f32fc5d935f7e7189ec4be8bdab0a2cf3f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Wed, 16 Nov 2011 13:26:48 +0100
Subject: [PATCH 2/6] Use spec's ext dir for extension installation.
Subject: [PATCH 2/9] Use spec's ext dir for extension installation.
---
lib/rubygems/installer.rb | 2 +-
@ -87,23 +82,23 @@ Subject: [PATCH 2/6] Use spec's ext dir for extension installation.
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index 74d803d..0063c7f 100644
index 780a88b..854c177 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -499,7 +499,7 @@ TEXT
def build_extensions
return if spec.extensions.empty?
say "Building native extensions. This could take a while..."
@@ -645,7 +645,7 @@ TEXT
say "This could take a while..."
end
- dest_path = File.join gem_dir, spec.require_paths.first
+ dest_path = spec.ext_dir
ran_rake = false # only run rake once
spec.extensions.each do |extension|
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index 263e7d3..d31b93b 100644
index 87b14d2..492ddbe 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -1283,16 +1283,15 @@ class Gem::Specification
@@ -1689,16 +1689,15 @@ class Gem::Specification
# eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0
def ext_dir
@ -124,23 +119,23 @@ index 263e7d3..d31b93b 100644
##
--
1.7.7.3
1.8.1.2
From 11b4a0cbadd8b1d3320f838881aa60feb6f848e7 Mon Sep 17 00:00:00 2001
From 0e9dd0655111f7dda805233c79a3771459d9a66a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Wed, 16 Nov 2011 14:52:16 +0100
Subject: [PATCH 3/6] Simplify the extending of $LOAD_PATH for binary gems.
Subject: [PATCH 3/9] Simplify the extending of $LOAD_PATH for binary gems.
---
lib/rubygems/specification.rb | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index d31b93b..e65ea2d 100644
index 492ddbe..c703827 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -843,11 +843,7 @@ class Gem::Specification
@@ -1256,11 +1256,7 @@ class Gem::Specification
File.join full_gem_path, path
end
@ -153,7 +148,7 @@ index d31b93b..e65ea2d 100644
# gem directories must come after -I and ENV['RUBYLIB']
insert_index = Gem.load_path_insert_index
@@ -1291,7 +1287,10 @@ class Gem::Specification
@@ -1697,7 +1693,10 @@ class Gem::Specification
# gem directory. eg: /usr/local/lib/ruby/1.8/gems
def exts_dir
@ -166,13 +161,13 @@ index d31b93b..e65ea2d 100644
##
--
1.7.7.3
1.8.1.2
From 5d46cd2b1ac9517a9cbcfa430261e62bb3a376b8 Mon Sep 17 00:00:00 2001
From 9a8556c609e800d0dbd24af416d613f2e82f323c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Fri, 9 Dec 2011 16:31:04 +0100
Subject: [PATCH 4/6] Fix the binary extension search path construction.
Subject: [PATCH 4/9] Fix the binary extension search path construction.
---
lib/rubygems/installer.rb | 2 +-
@ -180,23 +175,23 @@ Subject: [PATCH 4/6] Fix the binary extension search path construction.
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index 0063c7f..83b8fd5 100644
index 854c177..f1f2ad7 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -499,7 +499,7 @@ TEXT
def build_extensions
return if spec.extensions.empty?
say "Building native extensions. This could take a while..."
@@ -645,7 +645,7 @@ TEXT
say "This could take a while..."
end
- dest_path = spec.ext_dir
+ dest_path = File.join spec.ext_dir, spec.require_paths.first
ran_rake = false # only run rake once
spec.extensions.each do |extension|
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index e65ea2d..8be2ade 100644
index c703827..fa9ea6e 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -843,7 +843,7 @@ class Gem::Specification
@@ -1256,7 +1256,7 @@ class Gem::Specification
File.join full_gem_path, path
end
@ -205,7 +200,7 @@ index e65ea2d..8be2ade 100644
# gem directories must come after -I and ENV['RUBYLIB']
insert_index = Gem.load_path_insert_index
@@ -1279,7 +1279,7 @@ class Gem::Specification
@@ -1685,7 +1685,7 @@ class Gem::Specification
# eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0
def ext_dir
@ -215,23 +210,23 @@ index e65ea2d..8be2ade 100644
##
--
1.7.7.3
1.8.1.2
From 6229583633802b45e5a3e5689ab9077347cd9ef7 Mon Sep 17 00:00:00 2001
From 476c2f90cc6f5f490858f253a9b23eb19d53d2fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Tue, 13 Dec 2011 12:14:54 +0100
Subject: [PATCH 5/6] Remove binary extensions during uninstall.
Subject: [PATCH 5/9] Remove binary extensions during uninstall.
---
lib/rubygems/uninstaller.rb | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
1 file changed, 1 insertion(+)
diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb
index cc32ea4..94d78e0 100644
index d672b9d..5c31a0c 100644
--- a/lib/rubygems/uninstaller.rb
+++ b/lib/rubygems/uninstaller.rb
@@ -213,6 +213,7 @@ class Gem::Uninstaller
@@ -246,6 +246,7 @@ class Gem::Uninstaller
File.writable?(spec.base_dir)
FileUtils.rm_rf spec.full_gem_path
@ -240,13 +235,13 @@ index cc32ea4..94d78e0 100644
# TODO: should this be moved to spec?... I vote eww (also exists in docmgr)
old_platform_name = [spec.name,
--
1.7.7.3
1.8.1.2
From bc40e1b9f60a9a04456e3504ffe6ee600b6da269 Mon Sep 17 00:00:00 2001
From 35dc17e86f701fe1be80d98ace79735c535fd570 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Tue, 13 Dec 2011 14:27:14 +0100
Subject: [PATCH 6/6] Avoid dependency on customized operating_system.rb.
Subject: [PATCH 6/9] Avoid dependency on customized operating_system.rb.
---
lib/rubygems/defaults.rb | 11 +++++++++++
@ -254,10 +249,10 @@ Subject: [PATCH 6/6] Avoid dependency on customized operating_system.rb.
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb
index 20b4198..6d8711f 100644
index ea84e5c..b221954 100644
--- a/lib/rubygems/defaults.rb
+++ b/lib/rubygems/defaults.rb
@@ -87,6 +87,17 @@ module Gem
@@ -101,6 +101,17 @@ module Gem
end
##
@ -272,14 +267,14 @@ index 20b4198..6d8711f 100644
+ end
+
+ ##
# The default system-wide source info cache directory
# A wrapper around RUBY_ENGINE const that may not be defined
def self.default_system_source_cache_dir
def self.ruby_engine
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index 8be2ade..f54210a 100644
index fa9ea6e..2b10499 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -1287,10 +1287,7 @@ class Gem::Specification
@@ -1693,10 +1693,7 @@ class Gem::Specification
# gem directory. eg: /usr/local/lib/ruby/1.8/gems
def exts_dir
@ -292,5 +287,88 @@ index 8be2ade..f54210a 100644
##
--
1.7.7.3
1.8.1.2
From 0937c0b0a3c2ed08ab5b0875f7f95e24157525c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Thu, 7 Feb 2013 13:07:34 +0100
Subject: [PATCH 7/9] Fix binary extensions installation when --install-dir is
specified.
---
lib/rubygems/installer.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index f1f2ad7..e1577fc 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -645,7 +645,7 @@ TEXT
say "This could take a while..."
end
- dest_path = File.join spec.ext_dir, spec.require_paths.first
+ dest_path = File.join(options[:install_dir] ? gem_dir : spec.ext_dir, spec.require_paths.first)
ran_rake = false # only run rake once
spec.extensions.each do |extension|
--
1.8.1.2
From 4d9675cab5decaef3c9f7f91b2f9c9abd2a19cea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Fri, 15 Feb 2013 16:24:29 +0100
Subject: [PATCH 8/9] mkmf does not create folder for binary extensions
anymore.
This was dropped in Ruby r37016 for some reasons :/
---
lib/rubygems/ext/builder.rb | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/rubygems/ext/builder.rb b/lib/rubygems/ext/builder.rb
index d7d953f..812c20c 100644
--- a/lib/rubygems/ext/builder.rb
+++ b/lib/rubygems/ext/builder.rb
@@ -21,6 +21,10 @@ class Gem::Ext::Builder
mf = mf.gsub(/^RUBYLIBDIR\s*=\s*\$[^$]*/, "RUBYLIBDIR = #{dest_path}")
mf = mf.gsub(/\s*\S+\.time$/, "")
+ # Folder creation was dropped in r37016 for some reasons :/
+ target_prefix = mf[/^target_prefix\s*=\s*(.*)/, 1]
+ FileUtils.mkdir_p File.join(dest_path, target_prefix) rescue nil # in case of perms issues -- lame
+
File.open('Makefile', 'wb') {|f| f.print mf}
# try to find make program from Ruby configure arguments first
--
1.8.1.2
From 062a11c59731f5875d5a8821a212c8a41cb84577 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Fri, 15 Feb 2013 17:07:07 +0100
Subject: [PATCH 9/9] Use correct option.
---
lib/rubygems/installer.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index e1577fc..1492c68 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -645,7 +645,7 @@ TEXT
say "This could take a while..."
end
- dest_path = File.join(options[:install_dir] ? gem_dir : spec.ext_dir, spec.require_paths.first)
+ dest_path = File.join(@install_dir ? gem_dir : spec.ext_dir, spec.require_paths.first)
ran_rake = false # only run rake once
spec.extensions.each do |extension|
--
1.8.1.2