[Rubygems-developers] [Patch] temporary buildroot support for gem install

Marcus Rueckert darix at web.de
Wed Jun 28 11:11:15 EDT 2006


On 2006-06-28 09:34:31 -0400, Jim Weirich wrote:
> > gem install --build-root %{buildroot} /path/to/some.gem
> 
> How is this different from doing:
> 
>    gem install --install-dir %{buildroot} /path/to/some.gem
> 
> For example, on my mac:
> 
>    $ gem install rake --install-dir ~/mygems
>    Successfully installed rake-0.7.1
>    Installing ri documentation for rake-0.7.1...
>    Installing RDoc documentation for rake-0.7.1...
> 
> This installed rake into the ~/mygems directory without any root access 
> at all.

much different.
in my case you get:
[[[
$ gem install --build-root /var/tmp/rubygem-rake-0.7.1 *gem
Successfully installed rake, version 0.7.1
Installing ri documentation for rake-0.7.1...
Installing RDoc documentation for rake-0.7.1...
$ find /var/tmp/rubygem-rake-0.7.1 -type d  
/var/tmp/rubygem-rake-0.7.1
/var/tmp/rubygem-rake-0.7.1/usr
/var/tmp/rubygem-rake-0.7.1/usr/lib
/var/tmp/rubygem-rake-0.7.1/usr/lib/ruby
/var/tmp/rubygem-rake-0.7.1/usr/lib/ruby/gems
]]]

the rpm build grabs the files from there. if you install the rpm later
you have it in the normal gem paths. that gives proper interoperability
with gem later.

this is not about user installations. this is about packaging as non root user.

> > I already build 49 rpms from gem with that patch. :)
> > 
> > Known bugs:
> > "gem install --build-root $PWD/inst -r somegem" fails with
> > [[[
> > ERROR:  While executing gem ... (Errno::EACCES)
> > Permission denied - /usr/lib/ruby/gems/1.8/cache/sparklines-0.2.7.gem
> > ]]]
> > 
> > Do you consider that bug important?
> 
> The current 0.8.xx release of RubyGems incorrectly attempts to install 
> program/script wrappers into the system bin directory, even when the 
> install directory is the non-system one.  The 0.9.0 release fixes that 
> error (I plan to release 0.9.0 today sometime).

my patch handles the bin-dir issue properly. :)
i just didnt handle cache for remote downloads yet.
atm the buildroot patch only works properly with locally available gems.

darix

-- 
           openSUSE - SUSE Linux is my linux
               openSUSE is good for you
                   www.opensuse.org


More information about the Rubygems-developers mailing list