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

Donavan Pantke avatar at spellboundnet.com
Thu Jan 17 14:35:01 EST 2008

Marcus Rueckert wrote:
> 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)
Can you give a good example gem that exhibits all the bad behavior? At
this point I'm very curious about differentiating behaviors, and want to
see if those problems could be eliminated.
> --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.
If we could get behaviors to match, --build-root would just be a synonym
for --install-dir and --bin-dir (Which I'm in the process of writing).
> 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.
I have some ideas about this, I'll post those off list because it's
totally off-topic for this list.

>     darix

More information about the Rubygems-developers mailing list