Dne 22.12.2011 14:17, Mo Morsi napsal(a):
On 12/21/2011 06:36 AM, Bohuslav Kabrda wrote:
> Hi guys,
> I promise that this is my last mail today :)
>
> Together with Vit, we have created a new Ruby packaging guidelines draft [1] and we
would very much like you to go through it, so that we can discuss it here and change it
for the best.
>
> Regards,
> Bohuslav.
>
> [
1]https://fedoraproject.org/wiki/PackagingDrafts/Ruby
> _______________________________________________
> ruby-sig mailing list
> ruby-sig(a)lists.fedoraproject.org
>
https://admin.fedoraproject.org/mailman/listinfo/ruby-sig
Bohuslav, Vit, thank you both greatly for these updated guidelines (as well as anyone
else I missed). Some comments.
- why is ruby-devel required as a BR for all non-gem packages, isn't this only needed
for those packages containing native C code? An if this is legit, doesn't this
obsolete the BR on ruby as that will be pulled in anyways?
We have introduce '/etc/rpm/macros.ruby' file, which provides all macros
used for ruby packaging. As this is clearly no run-time dependency, we
decided to place it into -devel package, therefore the ruby-devel
package is always needed.
So you are right, we should remove the BR: ruby. Good point.
- In the Rubygems section:
"For every dependency on a Gem named|gemdep|, the package must contain a|Requires|
on|rubygem(%{gemdep})| with the same version constraints as the Gem"
Can this be a "should" or can we append a "where possible" onto the
end of this. I've run into situations in the past where the constraints on the
upstream gem are too restrictive, and infact the gem will work with a more lax gem set
which we ship in Fedora
You are right. We should not be as strict. Actually, I believe that we
should not use version unless necessary. We will try to polish this
formulation according to your suggestion.
- "Since the Gem is installed using RPM, you*must* exclude the .gem file"
Can this be a "should" and/or something that is encouraged but not mandatory
(perhaps recommend this be shipped as a supporting file, such as a %doc or a file in a
debug package). Not a blocker for me, but would be nice to provide the original gem as
part of the tarball for local reference
Well, I believe that "should" does not solve anything, because whenever
you'll like to use the gem, you realize, that you are out of luck,
because you are using gem without the cached package by coincidence.
Could you elaborate what is your usecase? I use the local gem only by
calling "gem pristine" and this call should be replaced by RPM
equivalent. So I see no reason to keep the gem. It is just unnecessary
payload.
- In the "RubyGem with extension libraries written in C" section, I feel the
guidelines could use some examples. I understand that these were copied in a large part
from the existing guidelines, but things like "Then at|%build| stage the Ruby
Gem*must* be installed under the directory created at|%prep| stage to get C libraries
compiled under there." are somewhat confusing to me.
Perhaps a simple example of what this would look like in the actual specfile would go a
long way to avoiding repetitive questions
Great idea! I always like to copy/paste examples :)
- Do we still need the "Packaging for gem and non-gem use section", can't
we get rid of that all together?
Well, there is the legacy note which should warn the packagers. Actually
I agree with you that we should get rid of it. However, there are gems
which still have the ruby- subpackage and they would be outlawed by this
change immediately.
What are opinions/suggestions? May be we could setup some deadline, when
we should get rid of them ...
- Should the "Ruby Applications" section be located under "Rubygems".
They should be h2, i.e. on the same structure level as Rubygems.
We can get rid of that and the bit about "these naming
guidelines only apply to ruby packages whose ..." in the "Naming
Guidelines" section by including the following in the initial "Ruby Packaging
Guidelines" section at the very top:
These guidelines only apply to ruby packages whose main purpose is providing a Ruby
library; packages that mainly provide user-level tools that happen to be written in Ruby
do not need to follow these naming guidelines, and should follow the general Packaging
Guidelines instead.
Actually, I like to have separate section, because there is a lot of
confusion what is application and what is not, if something which is
coming packaged as a gem could be application or has to be packaged as
gem. For example, I remember review of "deltacloud-core", which is
available as a gem, however, we extracted the gem out of original
location, enriched it by init scripts etc. So at the end, from the
resulting package, it is not obvious that the upstream is available as a
gem.
So although the section is not exhaustive, I would like to provide
better guidance to somebody, who likes to package something similar.
All in all, mostly small points. Thank you both again for taking the time to update
these, they look really good.
Thank you for your great feedback!
-Mo
_______________________________________________
ruby-sig mailing list
ruby-sig(a)lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/ruby-sig