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
_______________________________________________
ruby-sig mailing list
ruby-sig@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/ruby-sig

Reply via email to