Page 1 of 2

Build RPM from Source?

Posted: Wed Jan 18, 2017 3:39 pm
by jpeery
Is there documentation or a reference that guides building an rpm from the nrpe and plugins source tar balls?
TIA,
JP

Re: Build RPM from Source?

Posted: Wed Jan 18, 2017 3:55 pm
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

Re: Build RPM from Source?

Posted: Wed Jan 18, 2017 4:35 pm
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

Re: Build RPM from Source?

Posted: Wed Jan 18, 2017 4:51 pm
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.

Re: Build RPM from Source?

Posted: Wed Jan 18, 2017 4:57 pm
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...

Re: Build RPM from Source?

Posted: Wed Jan 18, 2017 5:06 pm
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.

Re: Build RPM from Source?

Posted: Thu Jan 19, 2017 8:32 am
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.

Re: Build RPM from Source?

Posted: Thu Jan 19, 2017 5:37 pm
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.

Re: Build RPM from Source?

Posted: Fri Jan 20, 2017 12:12 pm
by jpeery
That's perfect, thanks! Just what I needed/was looking for.

Re: Build RPM from Source?

Posted: Fri Jan 20, 2017 2:34 pm
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/