Page 1 of 1

nrpe.spec for nrpe 3.0.1.tar.gz

Posted: Thu Sep 15, 2016 4:10 am
by gselvakumar
Hi team,

NRPE 3.0.1 has issue with spec file while using rpmbuild -ta command. First no spec file found. nrpe.spec is unavailable in the tar.gz file. Is there any way the spec file could be included as we need to build rpm package for installation of nrpe agent

Re: nrpe.spec for nrpe 3.0.1.tar.gz

Posted: Thu Sep 15, 2016 10:48 am
by jfrickson
There should be a nrpe.spec.in file. Just run ./configure to create nrpe.spec.

Re: nrpe.spec for nrpe 3.0.1.tar.gz

Posted: Fri Sep 16, 2016 12:32 am
by gselvakumar
Hello jfrickson,

Thank you for you update. after ./configure nrpe.spec file was created. When we tried the rpmbuild -ta 3.0.1.tar.gz it fails because

rpmbuild -ta 3.0.1.tar.gz
error: File /root/nrpe-3.0.1.tar.gz: No such file or directory

Then we had to copy the tar file 3.0.1.tar.gz to nrpe-3.0.1.tar.gz and rpmbuild -ta nrpe-3.0.1.tar.gz. It was successful then.

Is there a way we could change the %define name nrpe in the nrpe.spec file so that we eliminate the copy process.

We are looking at automating the installation of nrpe agent so is there anything we could do to get out of ./configure and this copy file. Thank you for you help.

Re: nrpe.spec for nrpe 3.0.1.tar.gz

Posted: Fri Sep 16, 2016 10:11 am
by jfrickson
gselvakumar wrote:Is there a way we could change the %define name nrpe in the nrpe.spec file so that we eliminate the copy process.

We are looking at automating the installation of nrpe agent so is there anything we could do to get out of ./configure and this copy file. Thank you for you help.
The ./configure step replaces some text in the spec file. Do a diff to see what gets changed. You can probably just run ./configure once, and use the resulting nrpe.spec file for all future rpmbuilds.

In the spec file (either the nrpe.spec.in or the nrpe.spec) you can change the Source0: line from Source0: %{name}-%{version}.tar.gz to Source0: %{version}.tar.gz.