[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: rubygems user install of extensions

Nobuyoshi Nakada

10/1/2006 2:06:00 PM

Hi,

At Mon, 25 Sep 2006 23:44:20 +0900,
Dimitri Aivaliotis wrote in [ruby-talk:216293]:
> My problem is that I am trying to run a gems installation as a non-root
> user, and this doesn't work out-of-the-box for any gems that include the
> building of extensions with mkmf. For each gem (example: mongrel), I need
> to add the following lines to extconf.rb:
>
> require 'etc'
> user = ENV['USER']
> group = Etc.getpwnam(user).gid
>
> module Config
> MAKEFILE_CONFIG["INSTALL"] = "/usr/bin/install -c -o #{user} -g #{group}"
> end

INSTALL should not have -o and -g options by default. Why do
you need those options? Does your /usr/bin/install want to
change owner and group even if run by a non-root user?

--
Nobu Nakada

1 Answer

Nobuyoshi Nakada

10/3/2006 2:50:00 AM

0

Hi,

At Mon, 2 Oct 2006 16:37:08 +0900,
Dimitri Aivaliotis wrote in [ruby-talk:217631]:
> This is from the standard ports install on FreeBSD. I've also posted to
> rubygems-developers and was able to narrow it down to ports' way of setting
> this variable, i.e. it doesn't do this on Linux. So, seeing this as a ports
> problem, I created a PR (http://www.freebsd.org/cgi/query-pr.cgi...),
> and hope for a resolution soon. In the meantime, does anyone know of a
> standard rubygems way to override this or any other variable in the .gemrc
> file?

You could override the definition in Makefile by make
INSTALL='/usr/bin/install -c'.

BTW, do ports have to be built by root? For instance, RPM used
to be built by an ordinary user and ownerships are described in
spec files.

--
Nobu Nakada