Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 363419 - racc and other gems cannot be unbundled from dev-lang/ruby-1.9.2
Summary: racc and other gems cannot be unbundled from dev-lang/ruby-1.9.2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-13 02:09 UTC by Logan Bowers
Modified: 2011-05-16 18:25 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
New Ruby-1.9.2 build with racc included (ruby-1.9.2-r1.ebuild,6.04 KB, text/plain)
2011-04-13 17:53 UTC, Logan Bowers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Logan Bowers 2011-04-13 02:09:47 UTC
Hello, 

The ebuild for Ruby 1.9.2 incorrectly unbundles gems from the core build of Ruby for unspecified reasons. This does not actually work because, for example, the published racc gem is not the same as the racc code included with the proper ruby distribution and introduces compatibility errors. 

The racc gem is no longer maintained and should never be installed on a new ruby 1.9.x system. More generally, what is the advantage of removing these sub-trees from the ruby install? We're having problems where our application code is not compatible with Gentoo systems because modules that are normally installed as part of core Ruby do not exist. 

Reproducible: Always
Comment 1 Logan Bowers 2011-04-13 17:53:17 UTC
Created attachment 269851 [details]
New Ruby-1.9.2 build with racc included
Comment 2 Logan Bowers 2011-04-13 17:55:28 UTC
I've attached a corrected ebuild. Since racc is now part of the core library and the gem is incompatible with Ruby 1.9, this modified ebuild does not strip it from the main build of Ruby.
Comment 3 Logan Bowers 2011-04-13 17:56:21 UTC
NOTE: The racc gem should be masked for all ruby versions 1.9*
Comment 4 Logan Bowers 2011-04-13 18:41:54 UTC
BTW, here's an example block of ruby code that fails on the Gentoo version of Ruby 1.9 + Rails 3. Note that due to the wonders of monkey-patching, the error is within Net::HTTP::Post and the monkey patch is in the old racc 1.4.5 gem: 

req = Net::HTTP::Post.new('/some/path')
req.set_form_data("key" => "foo\nbar")

req.body == "key=foo%0abar" #false (wrong!)
req.body == "key=foo%0a&key=bar" #true (wrong!)
Comment 5 Peter Abrahamsen 2011-04-13 19:00:44 UTC
This seems reasonable.

More broadly, Gentoo's Ruby installation ought not to break applications' expectations of what it means to have Ruby installed (i.e. what is included), or else they cannot reliably declare their own dependencies.
Comment 6 Hans de Graaff gentoo-dev Security 2011-05-16 18:13:21 UTC
I've looked at this issue and found that all ruby implementations ship these particular files, including ruby 1.8, so I have decided to leave them in ruby 1.9 as well. ruby-1.9.2-r1 has them included. Given that we provide the gem and the c-based parser for the other ruby implementations I don't see a reason to remove the ruby19 target from dev-ruby/racc.
Comment 7 Peter Abrahamsen 2011-05-16 18:25:20 UTC
Thank you!