thanks for your reply.
----- Original Message -----
Thanks for sending this to get the ball rolling!
On Thu, Mar 29, 2012 at 06:53:21AM -0400, Bohuslav Kabrda wrote:
> as it was said on the fpc meeting, I'm writing to comment on the
> section "Some Notes" in Toshio's draft of new Ruby packaging
> guidelines .
> [citing the lines from "Some Notes" one by one]
> - "Need to move the rubygems library into the per-interpreter
> directories as it is a non-gem library."
> As we have said with Mo Morsi, Rubygems library should stay out of
> Ruby directory structure.
> -- Prooves to Rubygems and JRuby upstreams that Rubygems library
> can be unbundled from Ruby and it makes sense to work on merging
> the JRuby changes in Rubygems upstream to make one general
> Rubygems library (that should therefore be
> -- As noted by Toshio on the fpc meeting, our system-wide Rubygems
> are currently only used by MRI Ruby. But as I've said, we need to
> take steps gradually to convince the upstreams of feasibility of
> such changes and not to break anything. It is true, that JRuby
> currently ships with it's own modified (non-compatible) version of
> Rubygems, but we are working to merge their changes into Rubygems
> upstream. So yes, currently in F17, there is only the MRI Ruby
> using the system-wide Rubygems, but the support for JRuby is
> comming (perhaps F18?). If we are discussing this only from F17
> point of view, we still may want to package Rubinius there (it is
> on our todo list, although not that high as JRuby) and Rubinius
> _would_ be able to use the system-wide Rubygems - that is another
> reason why Rubygems should stay where they are even in Fedora 17.
> -- Toshio says that he doesn't like special-casing and Rubygems
> should ship inside each of the Ruby implementations, until we make
> all the changes to have system-wide Rubygems, that work with all
> Ruby implementations (I hope I am not misinterpreting you, if yes,
> then please correct me). I'd like to add, that it is very hard to
> convince Rubygems upstream to make any changes that we need and we
> must have something to show them it's worth the work to merge the
> JRuby changes in.
> -- Any others?
So, this is pretty close to my reasoning. I don't like
things without a good reason. It makes explanations longer and trips
up when they look at a particular well-known package as an example of
do something. (And meets resistance and causes extra work if that
special-case is ever removed ;-). That said, I'm not overly attached
this -- if there is a *good* reason for special casing, that's fine
A good reason for special casing should:
* apply to the rubygem library but not to other non-gem libraries
what makes it special)
* help us achieve some goal (the goal in the times I can think of
to get a particular package into Fedora but this could be a
* differ as little from standard packaging guidelines and other,
special cases as possible (to minimize the amount that packagers,
reviewers, and sysadmins have to learn to deal with this specific
I think we have pieces of this but I'm not quite to the point where I
we have all of these reasons covered.
- Proving to rubygem upstream that we can have common code. This
be one goal that we're trying to achieve.
- Working towards a single code-base for ruby and jruby (and
Also seems to be a goal to achieve.
What we're not getting at with these two reasons is why the rubygem
is special compared to other non-gem libraries and whether a
exists to do this that deviates less from the standard guidelines.
For the first question, the idea that the rubygem module is vastly
popular than other non-gem modules was advanced as a possibility. In
talking with vondruch on IRC, he pushed this idea even further to
the idea that non-gem ruby libraries are a legacy format. rubygems
be considered the format for ruby libraries. A few non-gem libraries
exist because no one exists upstream to port them over but by and
have very little importance. What sets the rubygem library itself
here is the bootstrapping issue. The rubygem library can't be
a gem because it is needed in order to load libraries packaged as
If we decide that that's the basis of why the rubygem library is
that leaves us with the last question of whether we can package this
I can think of two alternatives that seem more standard and still
the goals. I'll present them so we can either come up with new goals
will make them not work or we can see that the special-case in mind
1) As of ruby-1.9, the rubygem module is shipped as part of the ruby
standard library which is an acknowledgement by upstream that
is needed to install almost any other ruby library. We should
patch the rubygem library in the ruby standard library with the
to make it compatible across interpreters.
That's not as easy as it sounds. In terms of sustainability, this may become a
nightmare to support, because we are talking about a pretty decent amount of patches. That
is why we are trying to make Rubygems upstream merge the JRuby modifications.
The various ruby
interpreters have to fork the standard library when they create
interpreters so the more we work with the standard library
make the standard library version of modules not need patches per
interpreter, the more everyone benefits. We can do this work
pushing a third-party module for rubygems or installing into a
I see your point here, but the standard library itself is not completely implemented in
Ruby (in MRI Ruby, it has C extensions, in JRuby, it has jars). So we can put some effort
into this, but it's not completely achievable, just considering the per-interpreter
extensions. The Rubygems library is however 100 % Ruby and therefore can be adapted to
work with all the interpreters (I took the time to go through all the JRuby modifications
and it's obvious, that these can be merged with some amount of work). That is one of
the reasons why it makes sense to take Rubygems out and make them
2) Ship a rubygem package that has separate subpackages for each
interpreter that places the code into the vendorlib for each
Apply patches to this as needed to get to the place where we have
code running on all interpreters. This seems pretty close to what
doing now -- it's just that we don't need to install into a
location that all the ruby interpreters need to know about.
Interpreter-dependent Rubygems were the case up to F16, but this whole idea is about not
doing it this way. As I have already mentioned, applying interpreter-specific patches may
become very hard to maintain (should we have one Rubygems package with subpackages), so I
wouldn't see that as an option.
Really, having one Rubygems interpreter-independent package is the best direction that we
can take this.
> - "Need to rebuild ruby and rubygems package to use the
> -- I think that depends on whether the Rubygems library is moved,
> so let's put it aside for the moment and discuss it afterwards.
> - "Need to rebuild rubygem packages to use the new
> interpreter-neutral rubygem library location."
> -- Same as above.
> - "Should there be more information about jruby, etc in the
> introductory portion (naming and" [unfinished]
> -- I think it would be good to postpone this until we have better
> integration with the other Ruby implementations. So far, no one
> has requested any JRuby specific packages or anything connected
> with JRuby, so I would leave that for a separate discussion/fpc
> - "gem2rpm and rpmdev-newrpmspec can be updated with the new
> -- Yes, we will do that once the guidelines are complete. I hope
> that the gem2rpm part of guidelines will then be added back.
yep, all of these sound like reasonable answers.
packaging mailing list
Bohuslav "Slavek" Kabrda.