Bugs: Browse | Submit New | Admin

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

Date:
2009-11-20 09:49
Priority:
3
Submitted By:
Josef Pospíšil (damnpepe)
Assigned To:
Eric Hodel (drbrain)
Category:
`gem install` command (extensions)
State:
Closed
Summary:
On freebsd gem install uses install -oroot -gwheel when there are native extension (nokogiri, json)

Detailed description
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


Add A Comment: Notepad

Please login


Followup

Message
Date: 2009-12-16 13:17
Sender: Josef Pospíšil

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.
Date: 2009-12-04 05:02
Sender: Eric Hodel

Contact the the ruby port maintainer on FreeBSD.

You may be able to override it by setting RUBY_CONFIGURE_ARGS.
Date: 2009-11-20 11:58
Sender: Luis Lavena

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.
Date: 2009-11-20 11:54
Sender: Marcus Rueckert

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.

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
close_date2009-12-16 13:172009-12-16 13:17damnpepe
status_idOpen2009-12-04 05:02drbrain
resolution_idNone2009-12-04 05:02drbrain
assigned_tonone2009-12-04 05:02drbrain
close_date2009-12-04 05:022009-12-04 05:02drbrain