Bug 828537 - Configuration macros are pointing to /usr/local rather than /usr
Configuration macros are pointing to /usr/local rather than /usr
Product: Fedora
Classification: Fedora
Component: ruby (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jeroen van Meeuwen
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-06-04 17:02 EDT by Darryl L. Pierce
Modified: 2015-06-21 20:07 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-06-05 01:55:27 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Darryl L. Pierce 2012-06-04 17:02:35 EDT
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

How reproducible:

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

Expected results:

Additional info:
Comment 1 Vít Ondruch 2012-06-05 01:55:27 EDT

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.