Page 1 of 1

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

Posted: Mon Dec 18, 2017 2:47 pm
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!

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

Posted: Mon Dec 18, 2017 5:26 pm
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