gem install --build-root

Vít Ondruch vondruch at redhat.com
Wed Sep 30 12:23:48 UTC 2015


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-build-root.patch
Type: text/x-patch
Size: 1569 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/ruby-sig/attachments/20150930/e47f7f8b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: enable-build-root.patch
Type: text/x-patch
Size: 492 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/ruby-sig/attachments/20150930/e47f7f8b/attachment-0001.bin>


More information about the ruby-sig mailing list