Re: Provides: rubygem(name) automation

2011-04-27 Thread Vít Ondruch
Dne 26.4.2011 23:55, Mo Morsi napsal(a):
 On 04/21/2011 05:29 AM, Vít Ondruch wrote:
 Hello everybody,

 Today I was contacted by Aleksandar Kurtakov and he proposed, that he
 would help us to autogenerate the RPM provides. This functionality is
 allowed by RPM 4.9 [1], it means for F15+. This would help Aleksandar
 for better RubyGem integration into rpmstubby [2] and at the end into
 Eclipse Fedora Packager [3].

 Basically we would need to place rubygem.attr (see [4] for maven
 example) file into /usr/lib/rpm/fileattr and script which would generate
 the provides (see [5] for maven example). Since this files are required
 during build, they should be probably part of rubygems package, although
 it has some cavities.

 In theory, this approach could also be used to generate Requires and
 BuildRequires from gem spec file.


 Any thought are highly appreciate.


 Vit

 Looked this over and I like the direction this is going, bringing more
 automated dependency checking and analysis into RPM is a good idea, and
 in conjunction with some additional Fedora policies (this is acceptable
 to start integrating into Fedora correct?), it seems that alot of
 developer effort would be alleviated.


 The biggest concern that I have at this point is the dependency version
 analysis, especially with the Ruby packages.

 For gems we can parse version information out of the gemspec, for
 bundler we can parse it out of the Gemfile, but we'll probably run into
 some cases which this will not be enough, whether the dependencies are
 not (or cannot) be fully represented or where there is no dependency
 list per-se (in which case we might be able to get away with parsing the
 'require's, there is a few ideas on how to do this here [1]).


 One additional question I had is how easy it would be to override the
 dependency generator. Lets say there is a mistake in the generator or a
 use case that it does not work for and/or generated incorrect
 dependencies for, will ruby packagers have to wait until that is
 resolved to submit their packages. Will explicit dependencies in the
 spec override the dependency checker?


In my understanding, there will be always both dependencies listed. One 
set of dependencies will be generated automatically by some dependency 
generator and there will second set of dependencies entered explicitly 
in .spec file.

-Mo

 [1] http://rubyforge.org/pipermail/gem2rpm-devel/2010-September/08.html
 ___
 ruby-sig mailing list
 ruby-sig@lists.fedoraproject.org
 https://admin.fedoraproject.org/mailman/listinfo/ruby-sig

___
ruby-sig mailing list
ruby-sig@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/ruby-sig


Fwd: Re: Provides: rubygem(name) automation

2011-04-27 Thread Vít Ondruch

I am forwarding response from Alex.

 Pu*vodní zpráva 
Pr(edme(t:  Re: Provides: rubygem(name) automation
Datum:  Wed, 27 Apr 2011 12:14:15 +0300
Od: Alexander Kurtakov akurt...@redhat.com
Spolec(nost:Red Hat Inc.
Komu:   Vít Ondruch vondr...@redhat.com
Kopie:  ruby-sig@lists.fedoraproject.org



On 12:07:29 PM Wednesday, April 27, 2011 Vít Ondruch wrote:

 Dne 26.4.2011 23:55, Mo Morsi napsal(a):
   On 04/21/2011 05:29 AM, Vít Ondruch wrote:
   Hello everybody,
 
   Today I was contacted by Aleksandar Kurtakov and he proposed, that he
   would help us to autogenerate the RPM provides. This functionality is
   allowed by RPM 4.9 [1], it means for F15+. This would help Aleksandar
   for better RubyGem integration into rpmstubby [2] and at the end into
   Eclipse Fedora Packager [3].
 
   Basically we would need to place rubygem.attr (see [4] for maven
   example) file into /usr/lib/rpm/fileattr and script which would generate
   the provides (see [5] for maven example). Since this files are required
   during build, they should be probably part of rubygems package, although
   it has some cavities.
 
   In theory, this approach could also be used to generate Requires and
   BuildRequires from gem spec file.
 
 
   Any thought are highly appreciate.
 
 
   Vit
 
   Looked this over and I like the direction this is going, bringing more
   automated dependency checking and analysis into RPM is a good idea, and
   in conjunction with some additional Fedora policies (this is acceptable
   to start integrating into Fedora correct?), it seems that alot of
   developer effort would be alleviated.
 
 
   The biggest concern that I have at this point is the dependency version
   analysis, especially with the Ruby packages.
 
   For gems we can parse version information out of the gemspec, for
   bundler we can parse it out of the Gemfile, but we'll probably run into
   some cases which this will not be enough, whether the dependencies are
   not (or cannot) be fully represented or where there is no dependency
   list per-se (in which case we might be able to get away with parsing the
   'require's, there is a few ideas on how to do this here [1]).
 
 
   One additional question I had is how easy it would be to override the
   dependency generator. Lets say there is a mistake in the generator or a
   use case that it does not work for and/or generated incorrect
   dependencies for, will ruby packagers have to wait until that is
   resolved to submit their packages. Will explicit dependencies in the
   spec override the dependency checker?


* You can disable the dependency generator entirely. See
http://rpm.org/wiki/PackagerDocs/DependencyGenerator
* You can add additional provides manually and let the automatically generated
provides just stay as is. It's not a problem if your manual provide is the
same as the automatically generated one.
You would not have to wait because everything you put in the spec file manually
will simply be there no matter what the dependency generator has done.



 In my understanding, there will be always both dependencies listed. One
 set of dependencies will be generated automatically by some dependency
 generator and there will second set of dependencies entered explicitly
 in .spec file.


That's not exactly true. Ideally after reaching critical mass with automated
provides/requires generated you will not need to add anything manually in most
cases unless there is some obscure case.

P.S. I'm not subscribed so the moderator should approve it or someone resend.

Hope that helps,
Alex




  -Mo
 
   [1]
   http://rubyforge.org/pipermail/gem2rpm-devel/2010-September/08.html
   ___
   ruby-sig mailing list
   ruby-sig@lists.fedoraproject.org
   https://admin.fedoraproject.org/mailman/listinfo/ruby-sig


___
ruby-sig mailing list
ruby-sig@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/ruby-sig

Re: Provides: rubygem(name) automation

2011-04-27 Thread Mo Morsi
On 04/27/2011 05:02 AM, Vít Ondruch wrote:


 One additional question I had is how easy it would be to override the
 dependency generator. Lets say there is a mistake in the generator or a
 use case that it does not work for and/or generated incorrect
 dependencies for, will ruby packagers have to wait until that is
 resolved to submit their packages. Will explicit dependencies in the
 spec override the dependency checker?

 
 In my understanding, there will be always both dependencies listed. One 
 set of dependencies will be generated automatically by some dependency 
 generator and there will second set of dependencies entered explicitly 
 in .spec file.
 


OK this sounds good provided we can override the automatically generated
dependency in the specfile.

For example if the dependency generator says we need rubygem-i18n w/ an
unqualified version, but I know that due to some bug it won't work w/
i18n before version x.y.z, I should be able to add that to the spec and
everything should work dandy.

Another example which might be a little tricker to solve would be if a
gem lists a dependency that we can't ship in Fedora, but isn't strictly
necessary to the functionality of that gem (an additional plugin or
feature for example). If the dependency generator picks this up, we'll
need a way to remove the dependency manually.

When the dependency generator is run will play into this, if we can
patch the sources before the dependencies are generated (though this is
unlikely for BuildRequires), we can remove anything before its passed
into the dependency generator.

Of course, I can't imagine that these issues are Ruby specific, so
perhaps this has already been thought of?

  -Mo
___
ruby-sig mailing list
ruby-sig@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/ruby-sig


Re: Provides: rubygem(name) automation

2011-04-26 Thread Mo Morsi
On 04/21/2011 05:29 AM, Vít Ondruch wrote:
 Hello everybody,
 
 Today I was contacted by Aleksandar Kurtakov and he proposed, that he 
 would help us to autogenerate the RPM provides. This functionality is 
 allowed by RPM 4.9 [1], it means for F15+. This would help Aleksandar 
 for better RubyGem integration into rpmstubby [2] and at the end into 
 Eclipse Fedora Packager [3].
 
 Basically we would need to place rubygem.attr (see [4] for maven 
 example) file into /usr/lib/rpm/fileattr and script which would generate 
 the provides (see [5] for maven example). Since this files are required 
 during build, they should be probably part of rubygems package, although 
 it has some cavities.
 
 In theory, this approach could also be used to generate Requires and 
 BuildRequires from gem spec file.
 
 
 Any thought are highly appreciate.
 
 
 Vit
 

Looked this over and I like the direction this is going, bringing more
automated dependency checking and analysis into RPM is a good idea, and
in conjunction with some additional Fedora policies (this is acceptable
to start integrating into Fedora correct?), it seems that alot of
developer effort would be alleviated.


The biggest concern that I have at this point is the dependency version
analysis, especially with the Ruby packages.

For gems we can parse version information out of the gemspec, for
bundler we can parse it out of the Gemfile, but we'll probably run into
some cases which this will not be enough, whether the dependencies are
not (or cannot) be fully represented or where there is no dependency
list per-se (in which case we might be able to get away with parsing the
'require's, there is a few ideas on how to do this here [1]).


One additional question I had is how easy it would be to override the
dependency generator. Lets say there is a mistake in the generator or a
use case that it does not work for and/or generated incorrect
dependencies for, will ruby packagers have to wait until that is
resolved to submit their packages. Will explicit dependencies in the
spec override the dependency checker?

  -Mo

[1] http://rubyforge.org/pipermail/gem2rpm-devel/2010-September/08.html
___
ruby-sig mailing list
ruby-sig@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/ruby-sig