Fwd: Re: ruby 1.8.7.x for rawhide

Mohammed Morsi mmorsi at redhat.com
Tue Jun 22 17:37:42 UTC 2010


On 06/22/2010 11:08 AM, David Lutterkort wrote:
> On Tue, 2010-06-22 at 12:49 +0200, 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.
>>>        
>> Hi again,
>>
>> rpmlint complains about this conditionally-applied patch:
>>
>>    %ifarch ppc64 s390x sparc64 x86_64
>>    %patch23 -p1
>>    %endif
>>
>> That patch (ruby-1.8.7-multilib.patch) is small enough that
>> I'll include it here, for reference:
>>
>> --- ruby-1.8.7-p249/mkconfig.rb.orig    2010-06-15 11:30:44.000000000 -0400
>> +++ ruby-1.8.7-p249/mkconfig.rb 2010-06-15 11:31:01.000000000 -0400
>> @@ -102,7 +102,7 @@
>>
>>   drive = File::PATH_SEPARATOR == ';'
>>
>> -prefix = '/lib/ruby/' + RUBY_VERSION.sub(/\.\d+$/, '') + '/' + RUBY_PLATFORM
>> +prefix = '/lib64/ruby/' + RUBY_VERSION.sub(/\.\d+$/, '') + '/' + RUBY_PLATFORM
>>
>> It is easy to perform the same task using an unconditional patch,
>> so I wrote this replacement:
>>      
> Couldn't we just get the right value from the environment ? I haven't
> looked if it's already in one of the standard env vars that rpmbuild
> sets up, but if bad comes to worst, couldn't we just do 'export
> LIB_PREFIX=%{_libdir}' in the spec file and then
>
>          prefix = ENV["LIB_PREFIX"].gsub(%r{^/usr}, "") + "/ruby" + RUBY_VERSION.sub(/\.\d+$/, '') + '/' + RUBY_PLATFORM
>
> (There might be a macro more suitable for this than %_libdir)
>
> David
>
> _______________________________________________
> ruby-sig mailing list
> ruby-sig at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/ruby-sig
>    
The macro you were looking for was _lib, but I tried it and it looks 
good (no gsub /usr needed). Thanks for this.

    -Mo


More information about the ruby-sig mailing list