]> git.pld-linux.org Git - packages/nagios.git/commitdiff
- use upstream cgi.cfg as base auto/ac/nagios-3_1_2-2
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 3 Aug 2009 15:38:08 +0000 (15:38 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    cgi.cfg.patch -> 1.1
    config.patch -> 1.1
    nagios.spec -> 1.126

cgi.cfg.patch [new file with mode: 0644]
config.patch [new file with mode: 0644]
nagios.spec

diff --git a/cgi.cfg.patch b/cgi.cfg.patch
new file mode 100644 (file)
index 0000000..b2bb52d
--- /dev/null
@@ -0,0 +1,38 @@
+--- 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
diff --git a/config.patch b/config.patch
new file mode 100644 (file)
index 0000000..b2bb52d
--- /dev/null
@@ -0,0 +1,38 @@
+--- 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
index a766aec48283b89e39787807da69e6c849ffc679..5e191bcdd4e1885bbb5b230c093d7c55261ec4bb 100644 (file)
@@ -27,6 +27,7 @@ Patch1:               %{name}-iconv-in-libc.patch
 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
@@ -179,6 +180,7 @@ aplicativos para o Nagios.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 
 sed -i -e '
        s,".*/var/rw/nagios.cmd,"%{_localstatedir}/rw/nagios.cmd,
@@ -188,6 +190,16 @@ sed -i -e '
 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}
@@ -239,7 +251,8 @@ sed -i -e 's,%{_prefix}/lib/,%{_libdir}/,' $RPM_BUILD_ROOT%{_sysconfdir}/resourc
 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
 
This page took 0.113265 seconds and 4 git commands to generate.