Build RPM from Source?

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.
jpeery
Posts: 14
Joined: Wed Oct 24, 2012 9:51 am

Build RPM from Source?

Post by jpeery »

Is there documentation or a reference that guides building an rpm from the nrpe and plugins source tar balls?
TIA,
JP
bwallace
Posts: 1146
Joined: Tue Nov 17, 2015 1:57 pm

Re: Build RPM from Source?

Post by bwallace »

No documentation for building an rpm that I know of, but you can use the the 'install from source' doc as a reference in your endeavor
https://support.nagios.com/kb/article.php?id=515
Be sure to check out the Knowledgebase for helpful articles and solutions!
jpeery
Posts: 14
Joined: Wed Oct 24, 2012 9:51 am

Re: Build RPM from Source?

Post by jpeery »

Thanks, that's pretty much what I've been doing, thing is it's been a long time since I've actually built an RPM. There's a lot of references out there, but seems like it should be much easier than I am making it. I've been manually doing install this way for years on thousands of servers, but last weekend one of the peers on my team managed to goof up the install and now I've been asked to build an RPM to just do it all and foolproof it. Begrudgingly aside, I'm confident someone else has done this already and might have some docs or tips. Where it's going to get fun is figuring out how I am going to incorporate the dependencies and our custom settings (allowed host, sudoers, all the custom plugins I've written, etc), AND include the xinetd install all in one big honkin' RPM. Job security I guess :) Anyway, figured it would be worth asking, seems like someone has already done this. Every time someone new starts on my team they are flabbergasted I don't already have an RPM for it, and am roundly chastised. I just assume they've never worked with Nagios and have never done an install- it's beyond me why people can't fathom installing in any method other than RPM, and manage to mess it up, but that's not a discussion or rant appropriate for this venue.
Thanks again,
JP
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Build RPM from Source?

Post by dwhitfield »

might be easier to make a bash script. You've already got the link to do it. You'd have to update it every time there's a new release...but you'd have to do that with an RPM anyway.
jpeery
Posts: 14
Joined: Wed Oct 24, 2012 9:51 am

Re: Build RPM from Source?

Post by jpeery »

Ha, been down that road too, was the first thing I asked, was told that others have screwed up using scripts and I need to make a "fool proof" RPM...
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Build RPM from Source?

Post by dwhitfield »

I know we are working to becoming the maintainers for CentOS. Unfortunately, I don't have an ETA on that. We can certainly leave this open for community input.
jpeery
Posts: 14
Joined: Wed Oct 24, 2012 9:51 am

Re: Build RPM from Source?

Post by jpeery »

That's interesting, I hadn't heard that, exciting news. I've just about got it complete, once everything works I'll post some documentation on what I did and how, might help someone if they find a need to do the same.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Build RPM from Source?

Post by rkennedy »

Stepping into the party late, but a community member wrote up a few great tutorials that you may find handy for the packages. See this link - http://nuxref.com/2013/12/09/installing ... -centos-6/

There are a few other useful articles on his blog that may interest you, depending on your use case.
Former Nagios Employee
jpeery
Posts: 14
Joined: Wed Oct 24, 2012 9:51 am

Re: Build RPM from Source?

Post by jpeery »

That's perfect, thanks! Just what I needed/was looking for.
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Build RPM from Source?

Post by avandemore »

If you would rather package from source, you can use one of the tools like checkinstall to do the tedious work:

https://creudevel.wordpress.com/2014/02 ... entos-6-5/
Previous Nagios employee
Locked