469dd71
%define nsport 5666
469dd71
469dd71
Name: nrpe
630395d
Version: 2.12
653ea76
Release: 12%{?dist}
469dd71
Summary: Host/service/network monitoring agent for Nagios
469dd71
469dd71
Group: Applications/System
eb2fe8e
License: GPLv2
469dd71
URL: http://www.nagios.org
4206742
Source0: http://dl.sourceforge.net/nagios/%{name}-%{version}.tar.gz
4206742
Source1: nrpe.sysconfig
469dd71
Patch0: nrpe-initreload.patch
4206742
Patch1:	nrpe-read-extra-conf.patch
88f09da
Patch2: nrpe-directory_for_configs.diff
4206742
469dd71
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
469dd71
653ea76
BuildRequires: openssl-devel
653ea76
653ea76
%if 0%{?rhel}
653ea76
BuildRequires: tcp_wrappers
653ea76
%else
653ea76
BuildRequires: tcp_wrappers-devel
653ea76
%endif
469dd71
469dd71
Requires(pre): %{_sbindir}/useradd
469dd71
Requires(preun): /sbin/service, /sbin/chkconfig
469dd71
Requires(post): /sbin/chkconfig, /sbin/service
469dd71
Requires(postun): /sbin/service
4206742
Provides: nagios-nrpe = %{version}-%{release}
469dd71
469dd71
%description
469dd71
Nrpe is a system daemon that will execute various Nagios plugins
469dd71
locally on behalf of a remote (monitoring) host that uses the
88f09da
check_nrpe plugin.  Various plugins that can be executed by the
469dd71
daemon are available at:
469dd71
http://sourceforge.net/projects/nagiosplug
469dd71
469dd71
This package provides the core agent.
469dd71
469dd71
%package -n nagios-plugins-nrpe
469dd71
Group: Applications/System
469dd71
Summary: Provides nrpe plugin for Nagios
469dd71
Requires: nagios-plugins
4206742
Provides: check_nrpe = %{version}-%{release}
469dd71
469dd71
%description -n nagios-plugins-nrpe
469dd71
Nrpe is a system daemon that will execute various Nagios plugins
469dd71
locally on behalf of a remote (monitoring) host that uses the
88f09da
check_nrpe plugin.  Various plugins that can be executed by the
469dd71
daemon are available at:
469dd71
http://sourceforge.net/projects/nagiosplug
469dd71
469dd71
This package provides the nrpe plugin for Nagios-related applications.
469dd71
469dd71
%prep
469dd71
%setup -q
469dd71
%patch0 -p0
4206742
%patch1 -p0 -b .sysconfig
88f09da
%patch2 -p1 -b .dir
469dd71
469dd71
%build
469dd71
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \
469dd71
./configure \
469dd71
	--with-init-dir=%{_initrddir} \
469dd71
	--with-nrpe-port=%{nsport} \
469dd71
	--with-nrpe-user=nrpe \
469dd71
	--with-nrpe-group=nrpe \
469dd71
	--bindir=%{_sbindir} \
469dd71
	--libdir=/doesnt/matter/ \
469dd71
	--libexecdir=%{_libdir}/nagios/plugins \
469dd71
	--datadir=%{_datadir}/nagios \
469dd71
	--sysconfdir=%{_sysconfdir}/nagios \
469dd71
	--localstatedir=%{_localstatedir}/log/nagios \
469dd71
	--enable-command-args
469dd71
make %{?_smp_mflags} all
469dd71
sed -i "s/# chkconfig: 2345/# chkconfig: - /" init-script
469dd71
469dd71
%install
469dd71
rm -rf %{buildroot}
4206742
install -D -p -m 0755 init-script %{buildroot}/%{_initrddir}/nrpe
4206742
install -D -p -m 0644 sample-config/nrpe.cfg %{buildroot}/%{_sysconfdir}/nagios/nrpe.cfg
4206742
install -D -p -m 0755 src/nrpe %{buildroot}/%{_sbindir}/nrpe
4206742
install -D -p -m 0755 src/check_nrpe %{buildroot}/%{_libdir}/nagios/plugins/check_nrpe
4206742
install -D -p -m 0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/sysconfig/%{name}
88f09da
install -d %{buildroot}%{_sysconfdir}/nrpe.d
88f09da
469dd71
469dd71
%clean
469dd71
rm -rf %{buildroot}
469dd71
469dd71
%pre
469dd71
%{_sbindir}/useradd -c "NRPE user for the NRPE service" -d / -r -s /sbin/nologin nrpe 2> /dev/null || :
469dd71
469dd71
%preun
469dd71
if [ $1 = 0 ]; then
469dd71
	/sbin/service %{name} stop > /dev/null 2>&1 || :
469dd71
	/sbin/chkconfig --del %{name} || :
469dd71
fi
469dd71
469dd71
%post
469dd71
/sbin/chkconfig --add %{name} || :
469dd71
469dd71
%postun
469dd71
if [ "$1" -ge "1" ]; then
469dd71
	/sbin/service %{name} condrestart > /dev/null 2>&1 || :
469dd71
fi
469dd71
469dd71
%files
469dd71
%defattr(-,root,root,-)
469dd71
%{_initrddir}/nrpe
469dd71
%{_sbindir}/nrpe
469dd71
%dir %{_sysconfdir}/nagios
88f09da
%dir %{_sysconfdir}/nrpe.d
469dd71
%config(noreplace) %{_sysconfdir}/nagios/nrpe.cfg
4206742
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
6132981
%doc Changelog LEGAL README README.SSL SECURITY docs/NRPE.pdf
469dd71
469dd71
%files -n nagios-plugins-nrpe
469dd71
%defattr(-,root,root,-)
653ea76
%{_libdir}/nagios/plugins/check_nrpe
6132981
%doc Changelog LEGAL README
469dd71
469dd71
%changelog
653ea76
* Mon Oct 26 2009 Peter Lemenkov <lemenkov@gmail.com> - 2.12-12
653ea76
- Do not own %%{_libdir}/nagios/plugins ( bz# 528974 )
653ea76
- Fixed building against tcp_wrappers in Fedora ( bz# 528974 )
653ea76
88f09da
* Thu Sep 24 2009 Peter Lemenkov <lemenkov@gmail.com> - 2.12-11
88f09da
- Fixed BZ# 515324
88f09da
f42f7a8
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 2.12-10
f42f7a8
- rebuilt with new openssl
f42f7a8
abccfa0
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.12-9
abccfa0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
abccfa0
4d70cc0
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.12-8
4d70cc0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
4d70cc0
6132981
* Sun Feb 21 2009 Mike McGrath <mmcgrath@redhat.com> - 2.12-7
6132981
- Re-fix for 477527
6132981
4206742
* Mon Feb  2 2009 Peter Lemenkov <lemenkov@gmail.com> - 2.12-6
4206742
- Fixed BZ# 449174
4206742
- Clean up (in order to disable rpmlint warnings)
4206742
2371f12
* Sat Jan 17 2009 Tomas Mraz <tmraz@redhat.com> - 2.12-5
2371f12
- rebuild with new openssl
2371f12
3c31801
* Sun Dec 21 2008 Mike McGrath <mmcgrath@redhat.com> - 2.12-4
3c31801
- Added some doc lines for ticket 477527
3c31801
e672340
* Fri Dec 19 2008 Mike McGrath <mmcgrath@redhat.com> - 2.12-3
e672340
- Added Provides: nagios-nrpe
e672340
dc1dcd2
* Fri Dec 19 2008 Mike McGrath <mmcgrath@redhat.com> - 2.12-2
630395d
- Upstreamreleased new version
630395d
f94d369
* Tue Feb 12 2008 Mike McGrath <mmcgrath@redhat.com> - 2.7-6
f94d369
- Rebuild for gcc43
f94d369
676acf5
* Wed Dec 05 2007 Release Engineering <rel-eng at fedoraproject dot org> - 2.7-5
676acf5
 - Rebuild for deps
676acf5
eb2fe8e
* Wed Aug 22 2007 Mike McGrath <mmcgrath@redhat.com> 2.7-4
eb2fe8e
- License Change
eb2fe8e
- Rebuild for BuildID
eb2fe8e
efaaa77
* Fri Feb 23 2007 Mike McGrath <mmcgrath@redhat.com> 2.7-1
efaaa77
- Upstream released new version
efaaa77
469dd71
* Sun Jul 23 2006 Mike McGrath <imlinux@gmail.com> 2.5.2-3
469dd71
- no longer owns libdir/nagios
469dd71
- buildrequires tcp_wrappers
469dd71
469dd71
* Sun Jul 23 2006 Mike McGrath <imlinux@gmail.com> 2.5.2-2
469dd71
- Specify bogus libdir so rpmlint won't complain
469dd71
469dd71
* Mon Jul 03 2006 Mike McGrath <imlinux@gmail.com> 2.5.2-1
469dd71
- Upstream released new version
469dd71
469dd71
* Mon Mar 12 2006 Mike McGrath <imlinux@gmail.com> 2.4-3
469dd71
- Added description to useradd statement
469dd71
469dd71
* Sun Mar 05 2006 Mike McGrath <imlinux@gmail.com> 2.4-2
469dd71
- Added proper SMP build flags
469dd71
- Added %{?dist} tag
469dd71
- Added reload to nrpe script
469dd71
- Updated to 2.4, changes include: 
469dd71
- Added option to allow week random seed (Gerhard Lausser)
469dd71
- Added optional command line prefix (Sean Finney)
469dd71
- Added ability to reload config file with SIGHUP
469dd71
- Fixed bug with location of dh.h include file
469dd71
- Fixed bug with disconnect message in debug mode
469dd71
469dd71
* Sat Feb 04 2006 Mike McGrath <imlinux@gmail.com> 2.3-1
469dd71
- Created a Fedora friendly spec file
469dd71
469dd71
* Mon Jan 23 2006 Andreas Kasenides ank<@>cs.ucy.ac.cy
469dd71
- fixed nrpe.cfg relocation to sample-config
469dd71
- replaced Copyright label with License
469dd71
- added --enable-command-args to enable remote arg passing (if desired can be disabled by commenting out)
469dd71
469dd71
* Wed Nov 12 2003 Ingimar Robertsson <iar@skyrr.is>
469dd71
- Added adding of nagios group if it does not exist.
469dd71
469dd71
* Tue Jan 07 2003 James 'Showkilr' Peterson <showkilr@showkilr.com>
469dd71
- Removed the lines which removed the nagios user and group from the system
469dd71
- changed the patch release version from 3 to 1
469dd71
469dd71
* Mon Jan 06 2003 James 'Showkilr' Peterson <showkilr@showkilr.com>
469dd71
- Removed patch files required for nrpe 1.5
469dd71
- Update spec file for version 1.6 (1.6-1)
469dd71
469dd71
* Sat Dec 28 2002 James 'Showkilr' Peterson <showkilr@showkilr.com>
469dd71
- First RPM build (1.5-1)