Nagios core rpmbuild spec file: my own UID, GID, location

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.
Locked
yomiko
Posts: 22
Joined: Mon Aug 21, 2017 6:45 pm

Nagios core rpmbuild spec file: my own UID, GID, location

Post by yomiko »

I am new to using rpmbuild to build my own rpm.

I would like to build Nagios core using my own UID, GID, & install location.

Say I use nagios-4.3.2.tar.
After I untar'ed the file, there is a spec dir (nagios.spec). Could someone give me some tips on where I make the changes?

I could change all references to user nagios to "my own uid" and group nagios to "my own gid" in places like:

--with-nagios-user="nagios" \
--with-nagios-group="nagios" \

But what about the install dir which typically located at /usr/local/nagios?

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

Re: Nagios core rpmbuild spec file: my own UID, GID, locatio

Post by dwhitfield »

One of the devs can step in if there's a better way, but I think your best bet is just to replace the instances of /usr/local/nagios: https://github.com/NagiosEnterprises/na ... gios&type=

The comment below exists in the spec file, which is my primary reason for the suggestion above:

Code: Select all

# /usr/local/nagios is hardcoded in many places
Locked