[Rubygems-developers] [ rubygems-Bugs-27463 ] On freebsd gem install uses install -oroot -gwheel when there are native extension (nokogiri, json)

noreply at rubyforge.org noreply at rubyforge.org
Wed Dec 16 08:17:03 EST 2009


Bugs item #27463, was opened at 2009-11-20 10:49
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=27463&group_id=126

Category: `gem install` command (extensions)
Group: v1.3.x
Status: Closed
Resolution: Rejected
Priority: 3
Submitted By: Josef Pospíšil (damnpepe)
Assigned to: Eric Hodel (drbrain)
Summary: On freebsd gem install uses install -oroot -gwheel when there are native extension (nokogiri, json)

Initial Comment:
When instaling gem as non-super user and it has native extension (nokogiri, json tested) on freebsd, it always fails with (nokogiri example):

install: /home/pepe/.gem/ruby/1.8/gems/nokogiri-1.4.0/lib/nokogiri/nokogiri.so: chown/chgrp: Operation not permitted
*** Error code 71

which is caused by (I think):

/usr/bin/install -c -o root -g wheel -m 0755 nokogiri.so /home/pepe/.gem/ruby/1.8/gems/nokogiri-1.4.0/lib/nokogiri

which in turn is caused by this line in Makefile:

INSTALL = /usr/bin/install -c -o root -g wheel

I tried to find solution, but my OS/extension knowledge is very limited. 

FreeBSD: 7.2-STABLE FreeBSD
Ruby: ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-freebsd7]
gem env:
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.5
  - RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [i386-freebsd7]
  - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: /usr/local/bin/ruby18
  - EXECUTABLE DIRECTORY: /usr/local/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-freebsd-7
  - GEM PATHS:
     - /usr/local/lib/ruby/gems/1.8
     - /home/metee/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://gems.rubyforge.org




----------------------------------------------------------------------

>Comment By: Josef Pospíšil (damnpepe)
Date: 2009-12-16 14:17

Message:
Thanks for help and sorry for longer time to respond.

I actually found that you can set ENV['RB_USER_INSTALL'] to true and it doesn't 
use wheel and root then.

Thanks again for your help.

----------------------------------------------------------------------

Comment By: Eric Hodel (drbrain)
Date: 2009-12-04 06:02

Message:
Contact the the ruby port maintainer on FreeBSD.

You may be able to override it by setting RUBY_CONFIGURE_ARGS.

----------------------------------------------------------------------

Comment By: Luis Lavena (luislavena)
Date: 2009-11-20 12:58

Message:
Have to agree with Marcus,

On OSX, CONFIG['INSTALL'] looks like this:

/usr/bin/install -c

In other OS, like Linux, looks the same.

The value of install was form during the configure and install process of Ruby itself, and is the one being used by mkmf to generate the Makefile.

I would check the way FreeBSD is building Ruby to see if that is the problem.

----------------------------------------------------------------------

Comment By: Marcus Rueckert (darix)
Date: 2009-11-20 12:54

Message:
this is not a bug of rubygems. the value for INSTALL comes from the rbconfig.

ruby -rrbconfig -e 'puts Config::CONFIG["INSTALL"]'

this would be more a bug of the ruby parts on freebsd.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=27463&group_id=126


More information about the Rubygems-developers mailing list