Attached below are a few scripts which I threw together to help us package cloudforms and to continue improving the gem -> rpm and bundler -> yum conversion process.
The first rhgc.rb [1] extends the Fedora Gemfile checker I previously sent out to compare a local gemfile against a variety of other services including koji, distgit, bodhi, and more. The services and urls which it queries is fully configurable from the command line so that the user can easily customize what they want to check and where (either in Fedora or RHEL). This script can be easily adapted going forward to setup bots and/or git hooks which will send emails / error out / or do whatever else should dependencies not be satisfied.
The second yrc.rb [2] is my first attempt at gem binary dependency analysis against the local RH-based platform. Essentially it hooks into / overrides the normal binary gem building process (mkmf) to look for errors when resolving dependencies, attempting to use yum to determine which packages satisfy them. Multiple packages may satisfy a dependency, for example both mysql-devel and mariadb-devel come up as satifying the mysql header deps, but this should allow packagers to quickly lookup packages that need to be included as BuildRequires in the rpm spec. This is just a start, there is more we can do on this front in terms of dependency resolution, using pkg-config [3] and extending gem2rpm with this functionality for example.
Hope these help, -Mo
[1] https://gist.github.com/movitto/6086381 [2] https://gist.github.com/movitto/6086386 [3] https://github.com/ruby-gnome2/pkg-config
On Fri, Jul 26, 2013 at 7:54 AM, Mo Morsi mmorsi@redhat.com wrote:
The first rhgc.rb [1] extends the Fedora Gemfile checker I previously sent out to compare a local gemfile against a variety of other services including koji, distgit, bodhi, and more.
This script is really great. Thanks for publishing.
There are a couple deps for rhgc.rb that are not yet in Fedora. I've published unofficial RPMs for these [1, 2]
Two of the three deps (rubygem-sanitize and rubygem-pkgwat) I've borrowed from Axilleas [3, 4]. There is also a blocker accepting to pkgwat into Fedora, because the upstream author has not specified a license anywhere in the code. Anyone know the pkgwat Gem author? [5]
- Ken
[1] http://fedorapeople.org/~ktdreyer/rhgc/ [2] http://fedorapeople.org/cgit/ktdreyer/public_git/rubygem-gemnasium-parser.gi... [3] https://github.com/axilleas/fedora/pull/1 [4] https://github.com/axilleas/fedora/pull/2 [5] https://github.com/daviddavis/pkgwat/issues/9
Dne 26.7.2013 15:54, Mo Morsi napsal(a):
The second yrc.rb [2] is my first attempt at gem binary dependency analysis against the local RH-based platform.
Yay, would be awesome to add something like this into gem-nice-install [1]
Vít
ruby-sig@lists.fedoraproject.org