Nagios 2.0 RPM?

Chris Stankaitis chris.stankaitis at datawire.net
Wed Dec 15 19:26:49 CET 2004


Andreas Ericsson wrote:

> 
> It's not terribly difficult to create your own. In a RHEL environment 
> you'll most likely want to sooner or later anyways. Google has proven to 
> be an abundant source of information in the past. You might want to try 
> it. Also, there should be a .spec-file included in the nagios dist. Have 
> a look at it and see if that can fit your needs (possibly with a little 
> tweaking).
> 

I got the included spec file working by making the following Hacks, the 
spec file in the Nagios tarball is a v 1.1 spec file.. I don't think 
that anything I did was particulary horrid.. please read my comments and 
throw in your two cents as to the effect of what I did.


1) Commented out the following... was getting "File not found errors in 
build I think they are only used for the nagios-devel RPM which I am not 
interested in.

#%{__install} -m0644 common/locations.h %{buildroot}%{_includedir}/nagios/
#%{__install} -m0644 common/common.h common/config.h common/locations.h 
./cgi/cgiutils.h cgi/popen.h %{buildroot}%{_includedir}/nagios/


2) commented out... does not exist in Nagios 2.0b1 tarball in the 
contrib dir... not that big a deal I'll have to make my own 
conf.d/nagios.conf (will recycle my old nagios 1.x conf)

#%{__install} -m0644 contrib/htaccess.sample 
%{buildroot}%{_sysconfdir}/httpd/conf.d/nagios.conf


3) from this section for some reason I was always getting "file does not 
exist when building RPM... commented out the convercfg and mini_epn...

I know I don't need the convertcfg... I am not 100% sure what the 
mini_epn does... so this is the main thing that I am not sure of, if the 
lack of the mini_epn will break things..


for f in traceroute.cgi; do install -m 775  $f 
/var/tmp/nagios-buildroot/usr/lib/nagios/cgi; done
for f in mini_epn convertcfg; do install -m 775  $f /usr/sbin; done
+ mv /var/tmp/nagios-buildroot/usr/lib/nagios/cgi/convertcfg 
/var/tmp/nagios-buildroot/usr/lib/nagios/
mv: cannot stat 
`/var/tmp/nagios-buildroot/usr/lib/nagios/cgi/convertcfg': No such file 
or directory
error: Bad exit status from /var/tmp/rpm-tmp.97064 (%install)


I commented out the convertcfg, got the same message above for the 
mini_epn, weird thing is that I go into my BUILD Dir and they are 
sitting there in the contrib dir... so it looks like it should work.


%makeinstall -C contrib INSTALL="%{__install}" INSTALL_OPTS="" 
CGIDIR="%{buildroot}%{_libdir}/nagios/cgi"
#%{__mv} -f %{buildroot}%{_libdir}/nagios/cgi/convertcfg 
%{buildroot}%{_libdir}/nagios/
#%{__mv} -f %{buildroot}%{_libdir}/nagios/cgi/mini_epn 
%{buildroot}%{_bindir}




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list