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
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:
- 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).
- 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@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/ruby-sig
On Wed, Sep 30, 2015 at 2:23 PM, Vít Ondruch vondruch@redhat.com wrote:
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.
For me in general this is just a cosmetic change. And above else it offers less functionality (depending on one macro that does two things at once).
I don't mind the change, but I would probably ignore it.
Josef
ruby-sig@lists.fedoraproject.org