gem install --build-root

Vít Ondruch vondruch at redhat.com
Tue Oct 13 13:50:07 UTC 2015


As it turns out, the call of %gem_install in %install section is broken
already for some time due to [1] and in case, the fix should be as easy
as stripping %{gem_instdir}, hence I applied both patches into
private-ruby-2.3 branch and the changes will get available as soon as
Ruby 2.3 is released.


Vít


[1] https://github.com/rdoc/rdoc/pull/341





Dne 30.9.2015 v 14:23 Vít Ondruch napsal(a):
> Hi everybody,
>
> Recently, there was submitted patch [1] for gem2rpm requesting to use
> "gem install --build-root" option. This made me to investigate the
> situation. It is actually more then one year since this option was
> introduced into RubyGems [2] and the intentions is quite nice for
> packaging. But there are two things:
>
> 1) Unfortunately, this option does not work on Fedora as expected, since
> we never install gems into /usr/share/gems, where the RPM packaged gems
> reside, but we install them either into user home or /usr/local,
> depending on current user. So it might be reasonable to make the
> --build-root option to work as designed (see fix-build-root.patch
> attachment).
>
> 2) Once the --build-root option works, we could use it in our
> macros.rubygems instead the --install-dir --bindir combo (see
> enable-build-root.patch attachment). But although this would mean slight
> simplification of %gem_install macro, it would break every
> old/unmaintained .spec file, which still contains something like:
>
> %install
> %gem_install -n %{SOURCE0} -d %{buildroot}%{gem_dir}
>
> i.e. the %gem_install is called in %install section.
>
> Now the question is if the changes are worth of the effort. It does not
> seem that --build-root is widely used, since nobody complained yet.
> Moreover, the change in %gem_install macro might break things (although
> the gems are probably unmaintained anyway, so we could get rid of them).
> So what is your opinion? Should I go for (1), (1) and (2) or non?
>
> If there is no significant response, I'll probably go for both patches.
> Please let me know.
>
>
> Vít
>
>
> [1] https://github.com/fedora-ruby/gem2rpm/pull/51
> [2] https://github.com/rubygems/rubygems/pull/965
>
>
> _______________________________________________
> ruby-sig mailing list
> ruby-sig at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/ruby-sig

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/ruby-sig/attachments/20151013/170af154/attachment.html>


More information about the ruby-sig mailing list