Hide Forgot
From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc2) Gecko/20020510 Description of problem: Ruby RPM defines 'sitedir' to be under /usr/local, which is just plain wrong on a package-managed system. RPMs of modules compiled against this version will also installed into /usr/local, rather than into /usr. This is undesirable. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. install Ruby RPM 2. Run: ruby -e 'puts $:' 3. Actual Results: Library include path was shown to expect /usr/local, which should not be touched by RPM based systems. Expected Results: sitedir should not be defined to be in /usr/local. It should be left as the default at compile time, i.e. --with-sitedir= should not be passed to ./configure. Additional info: --- ruby.spec Tue Mar 19 09:00:19 2002 +++ ruby.spec~ Mon May 13 02:12:33 2002 @@ -1,10 +1,10 @@ %define manver 1.4.6 %define rubyxver 1.6 -%define sitedir %{_prefix}/local/lib/site_ruby/%{rubyxver} +%define sitedir %{_prefix}/lib/site_ruby/%{rubyxver} Name: ruby Version: 1.6.7 -Release: 2 +Release: 6 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -130,16 +136,14 @@ rb_cv_func_strtod=no ./configure \ %endif --prefix=%{_prefix} \ - --mandir='${prefix}/share/man' \ + --mandir=%{_mandir} \ --sysconfdir=%{_sysconfdir} \ --localstatedir=%{_localstatedir} \ - --with-sitedir='${prefix}/local/lib/site_ruby/%{rubyxver}' \ --with-default-kcode=none \ --with-dbm-include=/usr/include/db1 \ --enable-shared \ --enable-ipv6 \ - --with-lookup-order-hack=INET \ - %{_target_cpu}-%{_target_os} + --with-lookup-order-hack=INET make make test @@ -321,7 +325,7 @@ %post libs /sbin/ldconfig -if [ -w %{_prefix}/local/lib -a ! -e %{sitedir} ]; then +if [ -w %{_prefix}/lib -a ! -e %{sitedir} ]; then mkdir -p %{sitedir} %{sitedir}/%{_target_cpu}-%{_target_os} chown root.root %{sitedir} %{sitedir}/%{_target_cpu}-%{_target_os} chmod 2775 %{sitedir} %{sitedir}/%{_target_cpu}-%{_target_os} @@ -333,7 +337,7 @@ if [ -w %{sitedir} -a -e %{sitedir}/%{_target_cpu}-%{_target_os} ]; then rmdir %{sitedir}/%{_target_cpu}-%{_target_os} 2>/dev/null || true fi - if [ -w %{_prefix}/local/lib -a -e %{sitedir} ]; then + if [ -w %{_prefix}/lib -a -e %{sitedir} ]; then rmdir %{sitedir} 2>/dev/null || true fi fi
Created attachment 57066 [details] Amended .spec file for Ruby
Created attachment 57067 [details] patch from ruby-talk #38613
Created attachment 57068 [details] patch from ruby-talk #38620
I just uploaded a new ruby RPM to the /libc6 contrib area of incoming. This RPM (ruby-1.6.7-7) not only fixes the problems I've reported here, but also includes some patches from the ruby-talk mailing list, plus a header file patch that enables packages like ruby-FXRuby to build. Actually, you'll find many Ruby module RPMs uploaded to the contrib area, all of which were made by me. Feel free to use them.
Perhaps it's moot at this point, but RPM does not indicate ownership of the directories created by the ruby package: # rpm -qf /usr/local/lib/site_ruby file /usr/local/lib/site_ruby is not owned by any package # rpm -qf /usr/local/lib/site_ruby/1.6/ file /usr/local/lib/site_ruby/1.6 is not owned by any package # rpm -qf /usr/local/lib/site_ruby/1.6/i386-linux/ file /usr/local/lib/site_ruby/1.6/i386-linux is not owned by any package FYI.
Well, the packages as RPM should uses Config::CONFIG['rubylibdir']. I'll be going to do so at least if we provide some rpm related with Ruby. and site_ruby should be used to install some Ruby script by the users. so /usr/local is appropriate for that. see also FHS 2.2 Section 4.9 for more details.
*** Bug 72021 has been marked as a duplicate of this bug. ***
should be fixed in 1.6.7-10