Page 1 of 1

Failed to package nagios-plugins-2.0.2 via rpmbuild tool

Posted: Wed Jun 18, 2014 4:06 am
by wks3000
I am going to package nagios-plugins-2.0.2 via rpmbuild tool, but failed, it always says:

cp: cannot stat `command.cfg': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.tL1Y37 (%doc)

RPM build errors:
File not found: /root/rpmbuild/BUILDROOT/nagios-plugins-2.0.2-1.x86_64/etc/nagios/command.cfg
Bad exit status from /var/tmp/rpm-tmp.tL1Y37 (%doc)

command is: # rpmbuild -ta nagios-plugins-2.0.2.tar.gz

My host information : CentOS 6.4 x86_64 SMP


For more informations please look at the attachement.

Re: Failed to package nagios-plugins-2.0.2 via rpmbuild tool

Posted: Wed Jun 18, 2014 3:51 pm
by sreinhardt
The quick answer is to:

Code: Select all

tar xzf nagios-plugins-2.0.2.tar.gz
vim nagios-plugins-2.0.2/nagios-plugins.spec
     Remove line 186 that starts with %config
tar czf nagios-plugins-2.0.2.tar.gz nagios-plugins-2.0.2/
rpmbuild -ta nagios-plugins-2.0.2.tar.gz
** I should note that you might run into an issue with %doc on 188, if so simply remove command.cfg from that line also.

The long answer, is that this has been removed via gitignore, and is os and path dependent so the main maintainers (ubuntu and fedora) have their own versions of the command.cfg. Additionally, we need to rework the spec file a bit. This particular command.cfg is really only used for documentation and if nagios has not already installed a commands file.