Author: glen Date: Sun Mar 6 22:34:00 2005 GMT
Module: SPECS Tag: DEVEL
---- Log message:
- add nagios-data group to http in %post
- R: nagios-plugins for main package (it's useless without plugins)
- nice message to first-install-user what to do next
---- Files affected:
SPECS:
nagios.spec (1.36.2.14 -> 1.36.2.15)
---- Diffs:
================================================================
Index: SPECS/nagios.spec
diff -u SPECS/nagios.spec:1.36.2.14 SPECS/nagios.spec:1.36.2.15
--- SPECS/nagios.spec:1.36.2.14 Sun Mar 6 23:14:12 2005
+++ SPECS/nagios.spec Sun Mar 6 23:33:54 2005
@@ -19,7 +19,7 @@
Name: nagios
Version: 2.0
%define _rc b2
-Release: 0.%{_rc}.56
+Release: 0.%{_rc}.62
License: GPL v2
Group: Networking
Source0:
http://dl.sourceforge.net/%{name}/%{name}-%{version}%{_rc}.tar.gz
@@ -44,10 +44,11 @@
%endif
%{?with_mysql:BuildRequires: mysql-devel}
%{?with_pgsql:BuildRequires: postgresql-devel}
-BuildRequires: rpmbuild(macros) >= 1.159
+BuildRequires: rpmbuild(macros) >= 1.177
PreReq: rc-scripts
PreReq: sh-utils
Requires: mailx
+Requires: nagios-plugins
Requires(pre): /usr/bin/getgid
Requires(pre): /bin/id
Requires(pre): /usr/sbin/groupadd
@@ -191,7 +192,7 @@
install sample-config/{nagios,cgi,resource}.cfg $RPM_BUILD_ROOT%{_sysconfdir}
install
sample-config/{contact{s,groups},{misccommand,dependencie,escalation,hostgroup,host,service,timeperiod,checkcommand}s}.cfg
$RPM_BUILD_ROOT%{_sysconfdir}
> $RPM_BUILD_ROOT%{_sysconfdir}/passwd
-> $RPM_BUILD_ROOT%{_sysconfdir}/group
+echo 'nagios:' > $RPM_BUILD_ROOT%{_sysconfdir}/group
# install event handlers
cp -a contrib/eventhandlers $RPM_BUILD_ROOT%{_libdir}/%{name}/eventhandlers
@@ -200,7 +201,7 @@
tar -xvz -C $RPM_BUILD_ROOT%{_datadir}/images/logos -f %{SOURCE4}
# Object data/cache files
-for i in {objects.cache,{comments,downtime,retention,status}.dat}; do
+for i in {objects.cache,{comments,downtime,retention,status}.dat,nagios.tmp};
do
> $RPM_BUILD_ROOT%{_localstatedir}/$i
done
> $RPM_BUILD_ROOT%{_localstatedir}/rw/nagios.cmd
@@ -272,6 +273,8 @@
fi
%post cgi
+%addusertogroup http nagios-data
+
# apache1
if [ -d %{_apache1dir}/conf.d ]; then
ln -sf %{_sysconfdir}/apache-%{name}.conf
%{_apache1dir}/conf.d/99_%{name}.conf
@@ -287,6 +290,14 @@
fi
fi
+if [ "$1" = 1 ]; then
+%banner %{name} -e <<EOF
+NOTE:
+You need to add user to %{_sysconfdir}/passwd and %{_sysconfdir}/group to
acccess nagios via web.
+
+EOF
+fi
+
%preun cgi
if [ "$1" = "0" ]; then
# apache1
@@ -310,17 +321,6 @@
%addusertogroup nagios nagios-data
%addusertogroup nagios icmp
-%addusertogroup http nagios-data
-
-# apache1
-if [ -f /var/lock/subsys/apache ]; then
- /etc/rc.d/init.d/apache restart 1>&2
-fi
-# apache2
-if [ -f /var/lock/subsys/httpd ]; then
- /etc/rc.d/init.d/httpd restart 1>&2
-fi
-
%files
%defattr(644,root,root,755)
%doc Changelog README* UPGRADING INSTALLING LICENSE
@@ -348,6 +348,7 @@
%ghost %{_localstatedir}/rw/nagios.cmd
%ghost %{_localstatedir}/objects.cache
%ghost %{_localstatedir}/*.dat
+%ghost %{_localstatedir}/%{name}.tmp
%defattr(755,root,root,755)
%{_libdir}/%{name}/eventhandlers
@@ -373,6 +374,11 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.36.2.15 2005/03/06 22:33:54 glen
+- add nagios-data group to http in %post
+- R: nagios-plugins for main package (it's useless without plugins)
+- nice message to first-install-user what to do next
+
Revision 1.36.2.14 2005/03/06 22:14:12 glen
- belong to group icmp for /bin/ping
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/nagios.spec?r1=1.36.2.14&r2=1.36.2.15&f=u
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit