Building RPMs from spec file

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
danieljamesscott
Posts: 8
Joined: Fri Jan 27, 2017 4:08 am

Building RPMs from spec file

Post by danieljamesscott »

Hi,

I'm trying to build the RPMs using the included spec file. I receive the following error:

Code: Select all

RPM build errors:
  File not found: /var/lib/mysql/build/rpmbuild/BUILDROOT/nagios-plugins-2.1.4-1.x86_64/usr/lib/nagios/plugins/check_dhcp
  File not found: /var/lib/mysql/build/rpmbuild/BUILDROOT/nagios-plugins-2.1.4-1.x86_64/usr/lib/nagios/plugins/check_icmp
  File not found: /var/lib/mysql/build/rpmbuild/BUILDROOT/nagios-plugins-2.1.4-1.x86_64/usr/lib/nagios/plugins/check_ldaps
I've fixed the ldap issue by installing the openssl-devel package, although I'm not sure why it would be trying to install something which wasn't built.

I managed to fix the dhcp and icmp issue by adding 'install root' to the 'make' line 165:

Code: Select all

make AM_INSTALL_PROGRAM_FLAGS="" DESTDIR=${RPM_BUILD_ROOT} install install-root
Is this a suitable fix?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Building RPMs from spec file

Post by tmcdonald »

That's a good question. This is getting a little more into the weeds of the build process than we typically see on the forums. If you have a GitHub account, a good place to ask/post would be our project page:

https://github.com/nagios-plugins/nagios-plugins

This will go right to our devs faster than through the forums.

Otherwise I can relay this to our dev team and see what they have to say.
Former Nagios employee
danieljamesscott
Posts: 8
Joined: Fri Jan 27, 2017 4:08 am

Re: Building RPMs from spec file

Post by danieljamesscott »

tmcdonald wrote:That's a good question. This is getting a little more into the weeds of the build process than we typically see on the forums. If you have a GitHub account, a good place to ask/post would be our project page:

https://github.com/nagios-plugins/nagios-plugins

This will go right to our devs faster than through the forums.

Otherwise I can relay this to our dev team and see what they have to say.
Thanks, but I tried there first... :)

https://github.com/nagios-plugins/nagio ... issues/229

I guess I could add what I've discovered to my issue report. I'll try that and see what happens.

Dan
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Building RPMs from spec file

Post by dwhitfield »

danieljamesscott wrote: Is this a suitable fix?
Are you asking if this is something they will build in or something that will work for you?

I guess more to the point of the support forums: are you currently experiencing an issue? If not, github is probably the place. plugins 2.2.0 came out on January 19, so I suspect it won't be long before they swing around to the outstanding issues for 2.2.1.
danieljamesscott
Posts: 8
Joined: Fri Jan 27, 2017 4:08 am

Re: Building RPMs from spec file

Post by danieljamesscott »

dwhitfield wrote:
Are you asking if this is something they will build in or something that will work for you?

I guess more to the point of the support forums: are you currently experiencing an issue? If not, github is probably the place. plugins 2.2.0 came out on January 19, so I suspect it won't be long before they swing around to the outstanding issues for 2.2.1.
More the latter - I guess I'm really asking if there is any reason that we couldn't add that change to the spec file going forward. So I'll focus my efforts on the github repo.

I see there are some other posts on here which are discussing RPM builds - I'll keep an eye on those too.

Thanks,

Dan
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Building RPMs from spec file

Post by dwhitfield »

What OS are you running? I know one of our devs is looking to become a CentOS maintainer but I don't have an ETA on that.

There's also repo.nagios.com. I'm not 100% sure what all is included, but it might be another source of information.

The maintenance branch on github hasn't had any changes since the 2.2.0 release, so I think we're just in wait-and-see mode right now. I know the devs are working hard on Core right now. I guess what I would say is that if you notice Core coming out and then in the next week you see no movement on plugins, update this thread and we'll see what's going on.
danieljamesscott
Posts: 8
Joined: Fri Jan 27, 2017 4:08 am

Re: Building RPMs from spec file

Post by danieljamesscott »

Unfortunately, it's Amazon Linux, which is sort of CentOS 6 + extra bits and updates.

Thanks, I'll keep an eye out.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Building RPMs from spec file

Post by dwhitfield »

The following are at http://repo.nagios.com/nagios/6/, but as you can see, they are built for XI, not core. I suspect your solution will be better suited than trying to modify what we have, but it's there for you to take a look for ideas.

Code: Select all

[ ]	nagiosxi-nagiosplugins-5-2.9.el6.i386.rpm	22-Jun-2016 14:45 	3.0M	 
[ ]	nagiosxi-nagiosplugins-5-2.9.el6.x86_64.rpm	22-Jun-2016 14:53 	3.2M	 
[ ]	nagiosxi-nagiosplugins-5-3.3.el6.i386.rpm	21-Nov-2016 15:37 	3.0M	 
[ ]	nagiosxi-nagiosplugins-5-3.3.el6.x86_64.rpm	10-Jan-2017 14:53 	3.2M	 
[ ]	nagiosxi-nagiosplugins-5-4.0.1.el6.i386.rpm	12-Jan-2017 17:45 	3.0M	 
[ ]	nagiosxi-nagiosplugins-5-4.0.1.el6.x86_64.rpm	12-Jan-2017 17:48 	3.2M	 
[ ]	nagiosxi-nagiosplugins-5-4.0.2.el6.i386.rpm	13-Jan-2017 12:00 	3.0M	 
[ ]	nagiosxi-nagiosplugins-5-4.0.2.el6.x86_64.rpm	13-Jan-2017 12:00 	3.2M	 
[ ]	nagiosxi-nagiosplugins-5-4.0.el6.i386.rpm	10-Jan-2017 16:27 	1.4M	 
[ ]	nagiosxi-nagiosplugins-5-4.0.el6.x86_64.rpm	10-Jan-2017 15:52 	1.5M	 
danieljamesscott
Posts: 8
Joined: Fri Jan 27, 2017 4:08 am

Re: Building RPMs from spec file

Post by danieljamesscott »

Great, thanks for your help.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Building RPMs from spec file

Post by rkennedy »

I'll leave this open should you have further questions!
Former Nagios Employee
Locked