On 02/04/2010 04:18 AM, Jeroen van Meeuwen wrote:
On 02/03/2010 07:39 PM, David Lutterkort wrote:
> Reviving an old discussion.
>
> On Tue, 2009-12-22 at 00:32 +0100, Jeroen van Meeuwen wrote:
>
>> - ruby-1.8.5 as shipped in EL-5
>> - ruby-1.8.6 as shipped in Fedora currently, and most likely also EL-6
>> - ruby-1.9.1 as targeted for Fedora 13
>>
> I don't take it as a given that we need to support two parallel stacks,
> since that leads to major gyrations. Do we have any idea how much
> breakage there is on a 1.9.x stack ?
>
>
Actually, I don't. Most of all upstreams will have had to comply with
the 1.9.x series at some point, and to some extent, 'cause the ruby
developers started using it but I'm completely unfamiliar with how far
they actually are.
Also it's a given that there will always be those projects / developers
that haven't / won't migrate. The question is at what percentage (or
perceived percentage) do we say that's it we're switching over. Even
though it might be tricky to support the parallel stacks I do think 1.8
is still going to be around / used for a while, and it'll probably be a
tough sell to push back at all the upstream communities to update for a
while (afterall most ruby developers just use gem for all their package
management).
Fundamentally a 'ruby version needed' field is needed in the gem spec
and/or as a feature on gemcutter, if some way to derive this info
doesn't exist already. Obviously all the gems would need to be updated
to include this info on a voluntary basis, which still poses a problem,
but would at least help push this dependency problem/solution to the
package source / upstream.
> There's only ~ 250 ruby and rubygem packages in Fedora - how
about some
> sort of mass rebuild of these against a 1.9.x to see how badly things
> break ?
>
>
For one though, ruby-shadow is one of those libs that apparently noone
ever uses or actively works on. We'd be looking at a potential small
heap of these kinds of problems.
Also we need to consider gems to be packaged, just because a
non-1.9-compliant gem isn't in Fedora yet, doesn't mean there won't be
need for it sometime in the future.
>> - The ruby-<m>.<m>.<t> packages are going to provide:
>>
>> 1) ruby(ABI) =<major>.<minor>
>> 2) ruby(ABI) =<major>.<minor>.<teeny>
>> 3) ruby(API) =<major>.<minor>
>> 4) ruby(API) =<major>.<minor>.<teeny>
>>
>> The Ruby ABI is pretty stable in between teeny versions, but much less
>> so for the Ruby API.
>>
> I assume that the ABI/API distinction is there so that pure-ruby
> packages can depend on ruby(api) and only binary packages require
> ruby(abi).
>
> Is that really necessary ? And how would packagers use that in a
> meaningful way ? Do we have examples from 1.8.x where that distinction
> would have been useful ? I think the main reason for these fine-grained
> distinctions is the desire for parallel Ruby stacks.
>
>
While the ABI has always been stable pretty much, the 1.8.x series has
had some minor yet significant API changes. Long story short, I'm not
trusting upstream to handle this very well, even within a stable stream,
and so I want to provide a safe-guard for us and our consumers.
Agree on provide a buffer for upstream changes, but also not sure about
the API/ABI distinction. Are these maintained / managed separately in
the upstream community? If every API release has a corresponding ABI
release, even if it doesn't have any changes, it seems making the
distinction would just add complexity. Are there other examples of where
this is done?
One would want to be able to specifically require the
Major.Minor.Teeny
version of the stack in order to prevent the problem from happening (and
being able to act proactively by "missing dependency"). For us, we can
still go with Major.Minor requirements for 99% of all cases.
>> - Search paths are going to look similar to:
>>
>> /usr/local/lib{,64}/ruby/<major>.<minor>.<teeny>/
>> /usr/local/lib{,64}/ruby/<major>.<minor>/
>> /usr/local/lib{,64}/ruby/
>> /usr/local/share/ruby/<major>.<minor>.<teeny>/
>> /usr/local/share/ruby/<major>.<minor>/
>> /usr/local/share/ruby/
>> /usr/lib{,64}/ruby/<major>.<minor>.<teeny>/
>> /usr/lib{,64}/ruby/<major>.<minor>/
>> /usr/lib{,64}/ruby/
>> /usr/share/ruby/<major>.<minor>.<teeny>/
>> /usr/share/ruby/<major>.<minor>/
>> /usr/share/ruby/
>>
> Besides the multi-version issues (which we'd probably keep even if we
> only support 1.9.x), there are two issues with these directories:
>
> * Ruby and Fedora have differing conventions for the location of
> binary packages: /usr/lib{,64} for Fedora, and $arch subdirs for
> Ruby
> * Ruby and Fedora have differing conventions for the location of
> local files: /usr/local for Fedora, $sitedir for Ruby
>
> We should cater to the combination of these conventions, not their
> union.
>
>
What we do in Ruby now (the most recent set of packages in my
repositories) is make /usr/share/ be the vendorlib, and /usr/lib64/ be
the vendorarch. The sitelib and sitearch end up in /usr/local/.
This is not the current case w/ ruby / rubygems in the current Fedora
repo correct? Regardless if I yum or gem install a ruby gem, it
currently ends up in /usr/lib/ruby/gems/.
With these new ruby package guidelines is the idea to put a gem in /usr/
when installing it via yum and to put it in/usr/local when installing it
via gem? Getting the major.minor.teeny path down for the rpm/yum
scenario shouldn't be to hard so long as the spec specifies the
dependencies correctly but as far as doing the same via gem might be
trickier as it currently only defaults to the current ruby version's
major.minor. Is this something we would have to patch rubygems to do?
> Finally, I don't think it's all that useful to add
/usr/local variants
> to the search path, just in case somebody wants to use them. 90% of
> 'local' installs will be gem installs into random locations, in which
> people will have to set GEM_PATH/HOME - the other cases can be covered
> with a RUBYLIB setting.
>
> With all that, I'd suggest a loadpath of
>
> /usr/local/lib{,64}/ruby/<major>.<minor>/site_ruby/$arch
> /usr/local/share/ruby/<major>.<minor>/site_ruby
> /usr/lib{,64}/ruby/<major>.<minor>/vendor/$arch
> /usr/lib{,64}/ruby/<major>.<minor>/$arch
> /usr/share/ruby/<major>.<minor>/vendor/
> /usr/share/ruby/<major>.<minor>/
>
>
The $arch, site_ruby and vendor are duplication.
The aforementioned modifications listed are actually done quite easily;
easier and cleaner then the modifications used to be moving everything
to %{_libdir} (but not %{_libdir} for 64-bit).
The question quickly became, how would we want to handle packaging a
.gem or .so package, provided we would have had multiple stacks. Now
that we're dropping that specific hurdle... It's a question of
rebuilding everything.
Would you say the major hurdle right now w/ multiple stacks is testing /
making sure everything works side by side? Multiple version support is
definitely tricky but also needed.
>> Preliminary packages can be found on:
>>
>> For Fedora 12:
>>
>> -
http://www.kanarip.com/custom/f12-ruby/ and
>> -
http://mirror.nl.kanarip.com/custom/f12-ruby/
>>
>> For Fedora Rawhide:
>>
>> -
http://www.kanarip.com/custom/rawhide-ruby/ and
>> -
http://mirror.nl.kanarip.com/custom/rawhide-ruby/
>>
>> That said, these packages could ruin your current Ruby stack (different
>> search paths and all that).
>>
>> Please be so kind as to test these versions and provide me with the
>> necessary feedback, so we can move things along.
>>
> Did you say 'get yourself a rawhide VM' ?
>
>
It doesn't have to be rawhide, just something you're not doing any
serious Ruby work on; that's why I include Fedora 12 packages ;-)
In order to test I need to be able to yum -y remove \*ruby\* every once
in a while, or even the occasional rpm -e --nodeps / rpm -Uvh --force. I
can imagine you would not want to do that on your primary workstation,
and I can only imagine what pains you would create running a dedicated
Rawhide VM for it ;-)
-- Jeroen
How would you say would be the best way to go about testing the support
for the different ruby versions short of finding / picking random
packages / features that are supported in different interpreters? I feel
a formal testing strategy is needed, which is definitely hard given the
scope of what is being done.
I hope to gear my polisher tool to help testing some of this stuff out
for us, hopefully setting up some automated testing environments /
scenarios which we can use to test features. In that same vein, I
briefly looked into rvm, which might help us w/ some of this testing,
though probably not for packaging. It brings the Java approach to ruby
allowing you to package all your gem dependencies w/ your ruby
application. We might be able to leverage the stack isolation for
various Fedora testing purposes, but ultimately dependencies all have to
be independently packaged.
Any thoughts on other ways to help test this stuff?
-Mo