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