Re: Heads up: Rebuild for Ruby 1.9.3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dne 25.1.2012 00:52, Rex Dieter napsal(a):
Mo Morsi wrote:

On 01/24/2012 04:50 AM, Bohuslav Kabrda wrote:
Hi,
since we finally got our Ruby 1.9.3 feature page [1] approved, we are
starting rebuild for Ruby 1.9.3. Everyone who owns a package that depends
on Ruby or Rubygems should rebuild it in the special Koji target
"f17-ruby". This target will be merged into rawhide just before the
branching, which will occur on 2012-02-07. After this deadline, you will
need to go through the standard Bodhi update process. The detailed
instructions on rebuilding the packages, including our suggested changes
can be found in [2]. Feel free to contact me or Vit Ondruch (vondruch at
redhat dot com) or write to ruby-sig mailing lists, if you run into any
kind of problems.


I'm somewhat confused. Has the issue w/ sudo gem install been resolved?
Any citation or bug references for this problem you mention?

-- rex


Let me clear the situation. First of all, this is not issue of "sudo gem install". That command works just fine. That is issue with Bundler. Unfortunately, Bundler is one big hack above RubyGems based on some assumptions which are not true. It can be seen on its code where is a lot of custom logic for specific version o RubyGems and Bundler has a lot more quirks with regard of its usage on package driven systems. It can break for example with every upstream change of RubyGems. Now what is the issue:

Ruby, speaking about upstream as well as 1.8 in Fedora, traditionally broke the FHS. We tried to remove this breakage with Ruby 1.9. RubyGems traditionally installs their binary extensions into the same place as their platform independent code, incompatible with FHS. To be somehow compatible with FHS, this was changed and for Ruby 1.8, the binary extensions were installed into ruby_sitedir. That results in conflicting binary RPMs which conflicts among their versions, although this was never the case for RubyGems packages. So for Ruby 1.9.3 we tried to work on this issue and we modified RubyGems to be able to load the libraries, where the noarch part is placed in share and the binary library in lib, so RPM packaged gems are installed into /usr/share and their binary libraries into /usr/lib. Moreover, we changed how RubyGems works, e.g. by default, "gem install" installs gems into your home directory, so you don't need sudo to work with gems anymore. However, if your are using "gem install" with root users, they are installed into /usr/local/share and their binary libraries are installed into /usr/local/lib.

Now there comes Bundler. Assuming it knows everything about RubyGems, they put together their custom logic how to populate Ruby's load paths, which does not work well with changes we made into RubyGems, i.e. it cannot add the binary extension path to the Ruby's load path, resulting in failure when loading the gem. Nevertheless, this is going to be handled in RPM packaged Bundler and it will work properly as long as user uses RPM packaged Bundler. Once somebody installs upstream version of Bundler, the Bundler fails naturally.

So there are probably 4 solutions to this issue:

1) Always use Bundler provided by Fedora which will works as it should.
2) Force Ruby and RubyGems upstream to properly support FHS. I already provided patches [1] but I need your support.
3) Revert the customized behavior of RubyGems and break FHS.
4) Treat root as regular user and install gem also into root's home directory, but it obviously doesn't make sense.

So obviously I have chosen 1) and trying to move forward with 2). That works most of the times. It breaks only in situation, when you install upstream Bundler using "sudo gem install" and later you want to use some system wide gem with binary extension. If you install gems using "gem install" into your home dir (preferred, default way), it works every time. Mixing of RPMs with other package managers has its limits and this is one of them.


Vit

[1] https://github.com/rubygems/rubygems/issues/210
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux