X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=nagios-nrpe.spec;h=7d95fb2ba359abcd3d0d1604d9cadb5b61438812;hb=ba61d89b833d41a7a15affdec6b2be9d82e0ad0c;hp=21f146afd9cc9095ce74097351f9facc13205d17;hpb=5777885f3c21b08df71d953853fd872aba95b824;p=packages%2Fnagios-nrpe.git diff --git a/nagios-nrpe.spec b/nagios-nrpe.spec index 21f146a..7d95fb2 100644 --- a/nagios-nrpe.spec +++ b/nagios-nrpe.spec @@ -1,55 +1,54 @@ -%define nsusr nagios -%define nsgrp nagios Summary: Nagios remote plugin execution service/plugin Summary(pl): Demon i wtyczka zdalnego wywo³ywania wtyczek Nagios Name: nagios-nrpe -Version: 2.0 +Version: 2.4 Release: 1 License: GPL v2 Group: Networking Source0: http://dl.sourceforge.net/nagios/nrpe-%{version}.tar.gz -# Source0-md5: 70ef9502a3b7e49fa520dbceabfa04d0 +# Source0-md5: 187c9870119f7e1a64274e44aeef08aa Source1: nrpe.init URL: http://www.nagios.org/ BuildRequires: autoconf BuildRequires: automake -Requires(pre): /usr/bin/getgid -Requires(pre): /bin/id -Requires(pre): /usr/sbin/groupadd -Requires(pre): /usr/sbin/useradd +BuildRequires: openssl-tools +BuildRequires: rpmbuild(macros) >= 1.202 Requires(post,postun): /sbin/chkconfig +Requires: nagios-common Requires: nagios-plugins -Provides: group(%{nsgrp}) -Provides: user(%{nsusr}) +Requires: rc-scripts +Provides: nagios-core Obsoletes: netsaint-nrpe BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _sysconfdir /etc/nagios %define _datadir %{_prefix}/share/%{name} %define _plugindir %{_libdir}/nagios/plugins +%define _libexecdir %{_plugindir} %define _localstatedir %{_var}/log/nagios %define nsport 5666 %description -Nagios nrpe allows you to remotely execute plugins on other hosts -and report the plugin output back to the monitoring host. +Nagios nrpe allows you to remotely execute plugins on other hosts and +report the plugin output back to the monitoring host. %description -l pl -Nagios npre pozwala zdalnie uruchamiaæ wtyczki na innych hostach, -a wynik ich dzia³ania zwracaæ spowrotem do hosta monitoruj±cego. +Nagios npre pozwala zdalnie uruchamiaæ wtyczki na innych hostach, a +wynik ich dzia³ania zwracaæ z powrotem do hosta monitoruj±cego. %package plugin Summary: check_nrpe plugin for Nagios Summary(pl): Wtyczka check_nrpe dla Nagiosa Group: Networking +Requires: nagios-core %description plugin check_nrpe plugin for Nagios. This plugin allows running plugins on remote machines using nrpe service. %description plugin -l pl -Wtyczka check_nrpe dla Nagiosa. Pozwala na zdalne uruchamianie -wtyczek na innych komputerach za pomoc± demona nrpe. +Wtyczka check_nrpe dla Nagiosa. Pozwala na zdalne uruchamianie wtyczek +na innych komputerach za pomoc± demona nrpe. %prep %setup -q -n nrpe-%{version} @@ -61,15 +60,10 @@ wtyczek na innych komputerach za pomoc %configure \ --with-init-dir=/etc/rc.d/init.d \ --with-nrpe-port=%{nsport} \ - --with-nrpe-user=%{nsusr} \ - --with-nrpe-grp=%{nsgrp} \ - --prefix=%{_prefix} \ - --exec-prefix=%{_sbindir} \ - --bindir=%{_sbindir} \ - --libexecdir=%{_plugindir} \ - --datadir=%{_prefix}/share/nagios \ - --sysconfdir=%{_sysconfdir} \ - --localstatedir=%{_localstatedir} + --with-nrpe-user=nagios \ + --with-nrpe-grp=nagios \ + --enable-ssl \ + --enable-command-args %{__make} all @@ -78,7 +72,7 @@ rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir},%{_libdir}/nagios/plugins,%{_sbindir}} \ $RPM_BUILD_ROOT%{_localstatedir} -install nrpe.cfg $RPM_BUILD_ROOT/etc/nagios/nrpe.cfg +install sample-config/nrpe.cfg $RPM_BUILD_ROOT%{_sysconfdir}/nrpe.cfg install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/nrpe install src/nrpe $RPM_BUILD_ROOT%{_sbindir} install src/check_nrpe $RPM_BUILD_ROOT%{_plugindir} @@ -86,53 +80,27 @@ install src/check_nrpe $RPM_BUILD_ROOT%{_plugindir} %clean rm -rf $RPM_BUILD_ROOT -%pre -if [ -n "`getgid %{nsgrp}`" ]; then - if [ "`getgid %{nsgrp}`" != "72" ]; then - echo "Error: group %{nsgrp} doesn't have gid=72. Correct this before installing %{name}." 1>&2 - exit 1 - fi -else - /usr/sbin/groupadd -g 72 -f %{nsgrp} -fi -if [ -n "`id -u %{nsusr} 2>/dev/null`" ]; then - if [ "`id -u %{nsusr}`" != "72" ]; then - echo "Error: user %{nsusr} doesn't have uid=72. Correct this before installing %{name}." 1>&2 - exit 1 - fi -else - /usr/sbin/useradd -u 72 -d %{_libdir}/%{name} -s /bin/false -c "%{name} User" -g %{nsgrp} %{nsusr} 1>&2 -fi - %post -/sbin/chkconfig --add %{name} -if [ -f /var/lock/subsys/%{name} ]; then - /etc/rc.d/init.d/%{name} restart 1>&2 +/sbin/chkconfig --add nrpe +if [ -f /var/lock/subsys/nrpe ]; then + /etc/rc.d/init.d/nrpe restart 1>&2 fi %preun if [ "$1" = "0" ] ; then - if [ -f /var/lock/subsys/%{name} ]; then - /etc/rc.d/init.d/%{name} stop 1>&2 + if [ -f /var/lock/subsys/nrpe ]; then + /etc/rc.d/init.d/nrpe stop 1>&2 fi - /sbin/chkconfig --del %{name} -fi - -%postun -if [ "$1" = "0" ]; then - %userremove %{nsusr} - %groupremove %{nsgrp} + /sbin/chkconfig --del nrpe fi %files %defattr(644,root,root,755) %doc Changelog LEGAL README* SECURITY -%attr(754,root,root) /etc/rc.d/init.d/%{name} -%attr(751,root,%{nsgrp}) %dir %{_sysconfdir} -%attr(644,root,%{nsgrp}) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/nrpe.cfg +%attr(754,root,root) /etc/rc.d/init.d/nrpe +%attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nrpe.cfg %attr(755,root,root) %{_sbindir}/nrpe %files plugin %defattr(644,root,root,755) -%dir %{_plugindir} %attr(755,root,root) %{_plugindir}/*