Fwd: Re: ruby 1.8.7.x for rawhide

Mamoru Tasaka mtasaka at ioa.s.u-tokyo.ac.jp
Wed Jun 23 04:34:38 UTC 2010


Mohammed Morsi wrote, at 06/23/2010 04:09 AM +9:00:
> On 06/22/2010 03:00 PM, Jim Meyering wrote:
>> Mohammed Morsi wrote:
>>
>>> On 06/22/2010 06:44 AM, Jim Meyering wrote:
>>>
>>>> Mohammed Morsi wrote:
>>>>
>>>>
>>>>> I added this patch to my specfile as well, bumped the release, and
>>>>> updated the changelog to include your feedback.
>>>>>
>>>>>
>>>> Thanks for the new version.
>>>> I too am interested in this, and based on your work, have eliminated
>>>> most of the complaints from rpmlint and made a few other improvements.
>>>> Here are the first few changes that affect only your spec file:
>>>>
>>>> summary:
>>>>          remove trailing blanks
>>>>          placate rpmlint
>>>>          ruby_* definitions: do not use trailing slashes in directory names
>>>>          _normalized_cpu: simplify definition
>>>>
>>>>
>>>>
>>> I integrated all these into the spec and bumped the version /
>>> rereleased it. It can be found here
>>>
>>> http://mo.morsi.org/files/ruby-1.8.7.249-3.fc13.src.rpm
>>>
>> Thanks.
>> Not new, but just to confirm...
>>
>> With your new path setup, I see this (from -2):
>>
>>       $ ruby -e 'puts $:'
>>       /usr/lib64/ruby/site_ruby/1.8.7
>>       /usr/lib64/ruby/site_ruby/1.8
>>       /usr/lib64/ruby/site_ruby/1.8.7/x86_64-linux
>>       /usr/lib64/ruby/site_ruby
>>       /usr/lib/ruby/site_ruby/1.8.7
>>       /usr/lib/ruby/site_ruby/1.8
>>       /usr/lib/ruby/site_ruby
>>       /usr/lib64/ruby//1.8.7
>>       /usr/lib64/ruby//1.8
>>       /usr/lib64/ruby//1.8.7/x86_64-linux
>>       /usr/lib64/ruby/
>>       /usr/lib/ruby//1.8.7
>>       /usr/lib/ruby//1.8
>>       /usr/lib/ruby/
>>       .
>>
>> Even removing the 1.8.7 lines, trailing slashes and s,//,/,
>> I still see differences with the reference, 1.8.6 path:
>>
>>       /usr/lib/ruby/site_ruby/1.8
>>       /usr/lib64/ruby/site_ruby/1.8
>>       /usr/lib64/ruby/site_ruby/1.8/x86_64-linux
>>       /usr/lib/ruby/site_ruby
>>       /usr/lib64/ruby/site_ruby
>>       /usr/lib64/site_ruby/1.8
>>       /usr/lib64/site_ruby/1.8/x86_64-linux
>>       /usr/lib64/site_ruby
>>       /usr/lib/ruby/1.8
>>       /usr/lib64/ruby/1.8
>>       /usr/lib64/ruby/1.8/x86_64-linux
>>       .
>>
>> I.e., with your 1.8.7, we'd now search /usr/lib/ruby/site_ruby/1.8 6th.
>> With 1.8.6, we search it first.
>>
>> Is this change deliberate?
>>
> I could be wrong, but I don't think the search path order matters so
> much here, since what goes into each of these dirs is pretty well
> defined and disparate. So long as all the required paths are there,
> whatever required modules will be loaded correctly.
>
> If I'm wrong about this, someone please correct me. If I am, I believe
> this can be easily fixed by changing the order which they are pushed
> onto the include path in the ruby-1.8.7-lib-paths patch

In some cases ruby modules install ruby script and C extension module
in the same name.
- e.g. On i686 ruby-gnome2-0.19.4-2.fc14.i686 installs
   * gnome2.rb under /usr/lib/ruby/site_ruby/1.8/
   * gnome2.so under /usr/lib/ruby/site_ruby/1.8/i386-linux/
In this case, with current 1.8.6.x ruby srpm (and also my 1.8.7.x srpm)
-------------------------------------------------------
[tasaka1 at localhost ~]$ ruby -e 'require "gnome2"'
[tasaka1 at localhost ~]$
-------------------------------------------------------
... no problem. However if we change the order of search path so that
/usr/lib/ruby/site_ruby/1.8/i386-linux/ is to be searched first:
-------------------------------------------------------
[tasaka1 at localhost ~]$ export RUBYLIB=/usr/lib/ruby/site_ruby/1.8/i386-linux/
[tasaka1 at localhost ~]$ ruby -e "require 'gnome2'"
/usr/lib/ruby/site_ruby/1.8/i386-linux/gnome2.so: /usr/lib/ruby/site_ruby/1.8/i386-linux/gnome2.so: undefined symbol: rbgutil_id_module_eval - /usr/lib/ruby/site_ruby/1.8/i386-linux/gnome2.so (LoadError)
	from -e:1
-------------------------------------------------------
so this causes error.
So /usr/lib/ruby/site_ruby/1.8/ must be searched before /usr/lib/ruby/site_ruby/1.8/i386-linux/.

Also with your srpm /usr/lib/ruby/site_ruby/1.8/i386-linux/ does not seem
to be searched (I see only 1.8.7, not 1.8). This causes problems with the binary rpms
which already installs C extension modules under /usr/lib/ruby/site_ruby/1.8/i386-linux/.
We should ensure that we can upgrade 1.8.6.x ruby rpms to 1.8.7.x ones without recompiling
other ruby related rpms.

Regards,
Mamoru



More information about the ruby-sig mailing list