From 47e020e3829c163d346483a5d0a80a9dc2d6ef08 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Jun 09 2010 09:13:27 +0000 Subject: Removed obsoletes --- diff --git a/nagios.spec b/nagios.spec index d9629a0..1107551 100644 --- a/nagios.spec +++ b/nagios.spec @@ -1,6 +1,6 @@ Name: nagios Version: 3.2.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Host/service/network monitoring program Group: Applications/System @@ -38,9 +38,6 @@ Requires(pre): user(nagios) Requires: group(nagios) Requires(pre): group(nagios) -# That was the last version w/o nagios-common, so we need to obsolete it for -# proper upgrade procedure -Obsoletes: %{name} < 3.2.1-2 Summary: Nagios monitors hosts and services and yells if somethings breaks Summary(de): Nagios überwacht Dienste und Rechner und meldet Ihnen Ausfälle @@ -79,18 +76,18 @@ Requires(pre): shadow-utils Requires(post): shadow-utils Provides: user(nagios) Provides: group(nagios) -# That was the last version w/o nagios-common, so we need to obsolete it for -# proper upgrade procedure -Obsoletes: %{name} < 3.2.1-2 + %description common Provides common directories, uid and gid among nagios-related packages. + %package devel Group: Applications/System Summary: Provides include files that Nagios-related applications may compile against Requires: %{name} = %{version}-%{release} + %description devel Nagios is a program that will monitor hosts and services on your network. It has the ability to email or page you when a problem arises @@ -102,12 +99,14 @@ that you specify. This package provides include files that Nagios-related applications may compile against. + %prep %setup -q %patch1 -p1 -b .fedora %patch2 -p1 -b .selinux_relabel %patch3 -p1 -b .fix_status_retcode + %build %configure \ --prefix=%{_datadir}/%{name} \ @@ -143,6 +142,7 @@ make %{?_smp_mflags} all %{__cp} -f %{SOURCE6} UpgradeToVersion3.sh echo >> html/stylesheets/common.css + %install rm -rf %{buildroot} make DESTDIR=%{buildroot} INSTALL_OPTS="" COMMAND_OPTS="" install-config @@ -175,9 +175,11 @@ make DESTDIR=%{buildroot} INSTALL_OPTS="" COMMAND_OPTS="" install-config %{__rm} -f %{buildroot}/%{_datadir}/%{name}/html/Makefile %{__mv} %{buildroot}/%{_sysconfdir}/%{name}/resource.cfg %{buildroot}/%{_sysconfdir}/%{name}/private/resource.cfg + %clean rm -rf %{buildroot} > /dev/null 2>&1 + %pre common getent group nagios >/dev/null || groupadd -r nagios getent passwd nagios >/dev/null || useradd -r -g nagios -d %{_localstatedir}/spool/%{name} -s /sbin/nologin nagios @@ -190,16 +192,20 @@ if [ $1 = 0 ]; then /sbin/chkconfig --del %{name} || : fi + %post /sbin/chkconfig --add %{name} || : /sbin/service httpd condrestart > /dev/null 2>&1 || : + %post common %{_sbindir}/usermod -a -G %{name} apache || : + %postun /sbin/service httpd condrestart > /dev/null 2>&1 || : + %files %defattr(-,root,root,-) %dir %{_sysconfdir}/%{name} @@ -230,16 +236,22 @@ fi %attr(0755,nagios,nagios) %dir %{_localstatedir}/log/%{name}/spool/ %attr(0755,nagios,nagios) %dir %{_localstatedir}/log/%{name}/spool/checkresults + %files common %defattr(-,root,root,-) %dir %{_libdir}/%{name} %attr(0755,nagios,nagios) %dir %{_localstatedir}/spool/%{name} + %files devel %defattr(-,root,root) %{_includedir}/%{name} + %changelog +* Wed Jun 9 2010 Peter Lemenkov - 3.2.1-5 +- Removed obsoletes: nagios < 3.2.1-2 + * Tue Jun 01 2010 Marcela Maslanova - 3.2.1-4 - Mass rebuild with perl-5.12.0