Bug 828537 - Configuration macros are pointing to /usr/local rather than /usr
Summary: Configuration macros are pointing to /usr/local rather than /usr
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: ruby
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jeroen van Meeuwen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-04 21:02 UTC by Darryl L. Pierce
Modified: 2015-06-22 00:07 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-05 05:55:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Darryl L. Pierce 2012-06-04 21:02:35 UTC
Description of problem:
When configuring an RPM, for example, global macros for Ruby packages are configured using the Config::RbConfig class. For example:

%{!?ruby_sitelib: %global ruby_sitelib %(/usr/bin/ruby -rrbconfig  -e 'puts Config::CONFIG["sitelibdir"] ')}

On Fedora 17/Ruby 1.9 this is always pointing to directories under /usr/local. 

On Fedora 16/ruby 1.8 this did not point into the /usr/local directory tree.

As a result, an RPM that depends on using the Ruby executable to determine at build time the correct locations for directories is going to install into /usr/local and produce errors with rpmlint.

Version-Release number of selected component (if applicable):
mcpierce@mcpierce-laptop:qpid-cpp (master) $ rpm -q ruby
ruby-1.9.3.194-10.1.fc17.x86_64

How reproducible:
100%


Steps to Reproduce:
mcpierce@mcpierce-laptop:qpid-cpp (master) $ ruby -rrbconfig  -e 'puts Config::CONFIG["sitelibdir"] '
  
Actual results:
/usr/local/share/ruby/site_ruby


Expected results:
/usr/share/ruby/site_ruby

Additional info:

Comment 1 Vít Ondruch 2012-06-05 05:55:27 UTC
Darryl,

This is not mistake, but change on purpose.

The sitelibdir is directory dedicated for stuff installed by local administrator, therefore it points to /usr/local and the administrator can install software the using setup.rb for example.

However, when you are packaging SW for distribution, you are vendor of the distribution and SW should go into vendorlibdir, which points into /usr. In this case, if you are using extconf.rb for configuration, you should be able to use "ruby extconf.rb --vendor". The macros you mention above should be adjusted properly. Please see the packaging guidelines [1].

While in previous Fedora versions the sitelibdir was used, it was plain wrong. Now the situation is fixed in F17.

[1] https://fedoraproject.org/wiki/Packaging:Ruby#Pure_Ruby_packages


Note You need to log in before you can comment on or make changes to this bug.