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

Marcus Rueckert darix at web.de
Thu Jan 17 04:58:20 EST 2008

On 2008-01-16 22:07:29 -0500, Donavan Pantke wrote:
> OK, I can understand wanting a buildroot-style prefix for installing RubyGems 
> itself, but I don't understand the practical need for a buildroot for 
> installing gems. The only difference I see with a buildroot install and 
> using --install-dir is that the binaries are dropped in the bin directory of 
> the install dir instead of the system bindir. Wouldn't the following be 
> perfectly legit in in a spec file?
> mkdir -p $RPM_BUILD_ROOT/usr/lib/ruby/site_lib/1.8/
> mkdir -p $RPM_BUILD_ROOT/%{bindir}
> gem install -i $RPM_BUILD_ROOT/usr/lib/ruby/site_lib/1.8/ some_gem

if you go that road, you want:
gem install --install-dir=%{buildroot}$(gem environment gemdir) foo.gem

> mv $RPM_BUILD_ROOT/usr/lib/ruby/site_lib/1.8/some_gem_bin 
> $RPM_BUILD_ROOT/%{bindir}
> This is the kind of predicatable behavior that I've been trying to accomplish 
> with my previous patches. Let me know what you think.

oh it makes a difference.
if you use --install-dir it copies the bin files to a wrong place. uses
a different lib dir (and totally ignores stuff like biarch systems)

--build-root just prefixes everything with the temporary root dir and we
are done. no manually copying stuff around. no constructing paths
manually. and all that.

now that i upgraded my package to 1.0.1, i will checkout your patches.
from the previous mail i think i will use some kind of custom default.rb
during testing. (similar to my -rvendor-specific stuff for non-gem ruby
libs) so the user gets the normal gem dir and my stuff ends up in the
vendor_gem dir. but binaries should e.g. always be installed into the
ruby bin dir. i will report back.


           openSUSE - SUSE Linux is my linux
               openSUSE is good for you

More information about the Rubygems-developers mailing list