How to create RPM package for gem

Hi Dev,

I have implemented one new Gem but i need to create RPM package for that
gem. I tried to create using fpm gem and generated but when i tried to
install using yum it is giving dependency error. Please let me know what to
do to fix this error

$ yum install
rubygem-foreman_compute_resources_statistics_view-1.0.0-1.noarch.rpm

Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can
use subscription-manager to register.
Setting up Install Process
Examining
rubygem-foreman_compute_resources_statistics_view-1.0.0-1.noarch.rpm:
rubygem-foreman_compute_resources_statistics_view-1.0.0-1.noarch
Marking
rubygem-foreman_compute_resources_statistics_view-1.0.0-1.noarch.rpm to be
installed
Resolving Dependencies
–> Running transaction check
—> Package rubygem-foreman_compute_resources_statistics_view.noarch
0:1.0.0-1 will be installed
–> Processing Dependency: rubygem(deface) >= 0 for package:
rubygem-foreman_compute_resources_statistics_view-1.0.0-1.noarch
–> Finished Dependency Resolution
Error: Package:
rubygem-foreman_compute_resources_statistics_view-1.0.0-1.noarch
(/rubygem-foreman_compute_resources_statistics_view-1.0.0-1.noarch)
Requires: rubygem(deface) >= 0
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

My gem required deface gem so i used reqiire 'deface' in my gem

Attached my gem

Regards,
Nagarjuna

foreman_compute_resources_statistics_view-1.0.0.gem (10.5 KB)

Hello,

Foreman is running under ruby193 Software Collection on RHEL6, therefore
your plugin must be packaged under ruby193 as well.

Therefore you need to prepare and build it with ruby193 scl. Good
example can be any supported plugin we ship:

You need to have all this SCL macros and then to build the package with
ruby193 flag.

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Developer_Guide/scl-utils.html

You should be able to build in Fedora COPR too, we've successfully built
Foreman for RHEL6 there. If you select EPEL6 chroot and add Foreman and
RHSCL 1.0 (CentOS) repository, it should work. Make sure you have
scl-utils and ruby193-build packages in.

Is your plugin open-source software? The name looks interesting :slight_smile:

LZ

··· On Tue, Jul 08, 2014 at 02:16:32AM -0700, Nagarjuna Rachaneni wrote: > Hi Dev, > > I have implemented one new Gem but i need to create RPM package for that > gem. I tried to create using fpm gem and generated but when i tried to > install using yum it is giving dependency error. Please let me know what to > do to fix this error > > $ yum install > rubygem-foreman_compute_resources_statistics_view-1.0.0-1.noarch.rpm > > Loaded plugins: product-id, security, subscription-manager > This system is not registered to Red Hat Subscription Management. You can > use subscription-manager to register. > Setting up Install Process > Examining > rubygem-foreman_compute_resources_statistics_view-1.0.0-1.noarch.rpm: > rubygem-foreman_compute_resources_statistics_view-1.0.0-1.noarch > Marking > rubygem-foreman_compute_resources_statistics_view-1.0.0-1.noarch.rpm to be > installed > Resolving Dependencies > --> Running transaction check > ---> Package rubygem-foreman_compute_resources_statistics_view.noarch > 0:1.0.0-1 will be installed > --> Processing Dependency: rubygem(deface) >= 0 for package: > rubygem-foreman_compute_resources_statistics_view-1.0.0-1.noarch > --> Finished Dependency Resolution > Error: Package: > rubygem-foreman_compute_resources_statistics_view-1.0.0-1.noarch > (/rubygem-foreman_compute_resources_statistics_view-1.0.0-1.noarch) > Requires: rubygem(deface) >= 0 > You could try using --skip-broken to work around the problem > You could try running: rpm -Va --nofiles --nodigest > > > My gem required deface gem so i used reqiire 'deface' in my gem > > Attached my gem > > > Regards, > Nagarjuna > > > -- > You received this message because you are subscribed to the Google Groups "foreman-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an email to foreman-dev+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout.


Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman

Hello Lukas Zapletal ,

Sorry for late reply. Yes we are planing to make this GEM as open source.
This gem will display the usage statistics of compute resource(currently it
supports Libvirt, Ovirt, VmWare). We also developing some other plugins
which can be open source.

Regards,

Nagarjuna

··· On Tuesday, 8 July 2014 16:58:39 UTC+5:30, Lukas Zapletal wrote: > > Hello, > > Foreman is running under ruby193 Software Collection on RHEL6, therefore > your plugin must be packaged under ruby193 as well. > > Therefore you need to prepare and build it with ruby193 scl. Good > example can be any supported plugin we ship: > > > https://github.com/theforeman/foreman-packaging/blob/rpm/develop/rubygem-foreman_bootdisk/rubygem-foreman_bootdisk.spec > > You need to have all this SCL macros and then to build the package with > ruby193 flag. > > > https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Developer_Guide/scl-utils.html > > You should be able to build in Fedora COPR too, we've successfully built > Foreman for RHEL6 there. If you select EPEL6 chroot and add Foreman and > RHSCL 1.0 (CentOS) repository, it should work. Make sure you have > scl-utils and ruby193-build packages in. > > Is your plugin open-source software? The name looks interesting :-) > > LZ > > On Tue, Jul 08, 2014 at 02:16:32AM -0700, Nagarjuna Rachaneni wrote: > > Hi Dev, > > > > I have implemented one new Gem but i need to create RPM package for that > > gem. I tried to create using fpm gem and generated but when i tried to > > install using yum it is giving dependency error. Please let me know what > to > > do to fix this error > > > > $ yum install > > rubygem-foreman_compute_resources_statistics_view-1.0.0-1.noarch.rpm > > > > Loaded plugins: product-id, security, subscription-manager > > This system is not registered to Red Hat Subscription Management. You > can > > use subscription-manager to register. > > Setting up Install Process > > Examining > > rubygem-foreman_compute_resources_statistics_view-1.0.0-1.noarch.rpm: > > rubygem-foreman_compute_resources_statistics_view-1.0.0-1.noarch > > Marking > > rubygem-foreman_compute_resources_statistics_view-1.0.0-1.noarch.rpm to > be > > installed > > Resolving Dependencies > > --> Running transaction check > > ---> Package rubygem-foreman_compute_resources_statistics_view.noarch > > 0:1.0.0-1 will be installed > > --> Processing Dependency: rubygem(deface) >= 0 for package: > > rubygem-foreman_compute_resources_statistics_view-1.0.0-1.noarch > > --> Finished Dependency Resolution > > Error: Package: > > rubygem-foreman_compute_resources_statistics_view-1.0.0-1.noarch > > (/rubygem-foreman_compute_resources_statistics_view-1.0.0-1.noarch) > > Requires: rubygem(deface) >= 0 > > You could try using --skip-broken to work around the problem > > You could try running: rpm -Va --nofiles --nodigest > > > > > > My gem required deface gem so i used reqiire 'deface' in my gem > > > > Attached my gem > > > > > > Regards, > > Nagarjuna > > > > > > -- > > You received this message because you are subscribed to the Google > Groups "foreman-dev" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to foreman-dev...@googlegroups.com . > > For more options, visit https://groups.google.com/d/optout. > > > > -- > Later, > > Lukas "lzap" Zapletal > irc: lzap #theforeman >