--- /dev/null
+--- nagios-3.1.2/sample-config/cgi.cfg.in 2009-08-03 18:30:03.896753761 +0300
++++ svn/nagios-config/trunk/cgi.cfg 2009-08-03 18:25:38.142614386 +0300
+@@ -1,8 +1,6 @@
+ #################################################################
+ #
+-# CGI.CFG - Sample CGI Configuration File for Nagios @VERSION@
+-#
+-# Last Modified: 06-17-2009
++# CGI.CFG - CGI Configuration File for Nagios
+ #
+ #################################################################
+
+@@ -46,9 +45,9 @@
+ # This option determines whether or not a context-sensitive
+ # help icon will be displayed for most of the CGIs.
+ # Values: 0 = disables context-sensitive help
+ # 1 = enables context-sensitive help
+
+-show_context_help=0
++show_context_help=1
+
+
+
+@@ -269,7 +233,7 @@
+ # OS and distribution, so you may have to tweak this to
+ # work on your system.
+
+-ping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$
++ping_syntax=/usr/bin/ping -n -U -c 5 $HOSTADDRESS$
+
+
+
+@@ -359,4 +323,4 @@
+ #splunk_url=http://127.0.0.1:8000/
+
+
+-
++# vim:ts=8:sw=8:syn=cfg
--- /dev/null
+--- nagios-3.1.2/sample-config/cgi.cfg.in 2009-08-03 18:30:03.896753761 +0300
++++ svn/nagios-config/trunk/cgi.cfg 2009-08-03 18:25:38.142614386 +0300
+@@ -1,8 +1,6 @@
+ #################################################################
+ #
+-# CGI.CFG - Sample CGI Configuration File for Nagios @VERSION@
+-#
+-# Last Modified: 06-17-2009
++# CGI.CFG - CGI Configuration File for Nagios
+ #
+ #################################################################
+
+@@ -46,9 +45,9 @@
+ # This option determines whether or not a context-sensitive
+ # help icon will be displayed for most of the CGIs.
+ # Values: 0 = disables context-sensitive help
+ # 1 = enables context-sensitive help
+
+-show_context_help=0
++show_context_help=1
+
+
+
+@@ -269,7 +233,7 @@
+ # OS and distribution, so you may have to tweak this to
+ # work on your system.
+
+-ping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$
++ping_syntax=/usr/bin/ping -n -U -c 5 $HOSTADDRESS$
+
+
+
+@@ -359,4 +323,4 @@
+ #splunk_url=http://127.0.0.1:8000/
+
+
+-
++# vim:ts=8:sw=8:syn=cfg
Patch2: %{name}-webapps.patch
Patch3: %{name}-cgi-http_charset.patch
Patch4: %{name}-cmd-typo.patch
+Patch5: cgi.cfg.patch
URL: http://www.nagios.org/
BuildRequires: autoconf
BuildRequires: automake
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p1
sed -i -e '
s,".*/var/rw/nagios.cmd,"%{_localstatedir}/rw/nagios.cmd,
sed -e 's,%{_prefix}/lib/,%{_libdir}/,' %{SOURCE1} > apache.conf
sed -e 's,%{_prefix}/lib/,%{_libdir}/,' %{SOURCE6} > lighttpd.conf
+# fixup cgi config
+%{__sed} -i -e '
+ # kill trailing spaces
+ s, \+$,,
+ # use real paths
+ s,/usr/local/nagios/share,@datadir@,g
+ # we want all authorized users have default access
+ s,=nagiosadmin,=*,g
+' sample-config/cgi.cfg.in
+
%build
cp -f /usr/share/automake/config.sub .
%{__aclocal}
install apache.conf $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf
install apache.conf $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf
install lighttpd.conf $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/lighttpd.conf
-mv $RPM_BUILD_ROOT{%{_sysconfdir}/cgi.cfg,%{_webapps}/%{_webapp}}
+rm $RPM_BUILD_ROOT%{_sysconfdir}/cgi.cfg
+cp -a sample-config/cgi.cfg $RPM_BUILD_ROOT%{_webapps}/%{_webapp}
> $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/passwd
echo 'nagios:' > $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/group