[Rubygems-developers] problem packaging rubybgems 1.0.1, install --prefix changed?

Marcus Rueckert darix at web.de
Wed Jan 16 15:20:38 EST 2008

On 2008-01-16 13:00:31 -0700, Jeremy Hinegardner wrote:
> I'm packaging rubygems 1.0.1 up as an rpm for our internal server builds
> and I'm encountering a problem.  In 0.9.4 the setup.rb was the standard
> setup.rb from Minero Aoki and to install into a fake root directory 
> you would do 'ruby setup.rb install --prefix=$INSTALL_DIR' and
> everything would be installed relative to $INSTALL_DIR.  That is, things
> would be installed into:
>     $INSTALL_DIR/usr/bin
>     $INSTALL_DIR/usr/lib/ruby/site_lib/1.8/
> Now in 1.0.1 a completely different setup.rb is used with a different
> 'install --prefix' behavoir.  Without --prefix everything will install
> just fine, into a normal system, but not into a system for packaging.
> Now if I use --prefix=$INSTALL_DIR I get:
>     $INSTALL_DIR/bin
>     $INSTALL_DIR/lib
> This ends up installing rubygems.rb into $INSTALL_DIR/lib/rubygems.rb
> which is definitately not where it needs to go.
> So, my question is, what is the proper approach to tell setup.rb to
> install relative to a root directory?  That is, what would be the best
> way to now package up rubygems for distribution via RPM?
> Is this a bug?  Or is this a plan for the future?  Would a patch for
> setup.rb for say --installdir be appropriate?  I'll be happy to file
> this in the tracker and put together a patch if necessary.
> I guess in this case, for now I'll be falling back to 0.9.4 for now
> until we can resolve this issue.

i just solved that issue actually. :)

see the attached patch. my %install section looks like:
  GEM_HOME=%{buildroot}%{_libdir}/ruby/gems/%{rb_ver}/ \
      ruby -rvendor-specific setup.rb --buildroot=%{buildroot}

i am also working on a patch to allow
"gem install --buildroot=%{buildroot} somegem"

it works already with locally available gems but fails with remote gems.

hope this helps


           openSUSE - SUSE Linux is my linux
               openSUSE is good for you
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rubygems-1.0.1_install_into_buildroot.patch
Type: text/x-patch
Size: 1468 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/rubygems-developers/attachments/20080116/95f95948/attachment.bin 

More information about the Rubygems-developers mailing list