]> git.pld-linux.org Git - packages/nagios-nrpe.git/blame - nagios-nrpe.spec
- release 3 (by relup.sh)
[packages/nagios-nrpe.git] / nagios-nrpe.spec
CommitLineData
9f54c7ed 1Summary: Nagios remote plugin execution service/plugin
32b335f7 2Summary(pl.UTF-8): Demon i wtyczka zdalnego wywoływania wtyczek Nagios
884ffea2 3Name: nagios-nrpe
56070b30 4Version: 2.13
5c427da8 5Release: 4
6095acef
PZ
6License: GPL v2
7Group: Networking
56070b30
ER
8Source0: http://downloads.sourceforge.net/nagios/nrpe-%{version}.tar.gz
9# Source0-md5: e5176d9b258123ce9cf5872e33a77c1a
283125e4 10Source1: nrpe.init
8a6ed10e 11Source2: nrpe-command.cfg
bdffdf09 12Source3: %{name}.tmpfiles
dc04870c 13Patch0: %{name}-config.patch
a572586a 14Patch1: nrpe_check_control.patch
6095acef
PZ
15URL: http://www.nagios.org/
16BuildRequires: autoconf
17BuildRequires: automake
bef67369 18BuildRequires: openssl-devel
f384e93f 19BuildRequires: openssl-tools
c18c6a62 20BuildRequires: rpmbuild(macros) >= 1.268
74881710 21Requires(post,preun): /sbin/chkconfig
fab2344e 22Requires: nagios-common
783f405f 23Requires: rc-scripts
7186fe13 24Provides: nagios-core
c1473eca 25Obsoletes: netsaint-nrpe
884ffea2 26BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
6095acef
PZ
27
28%define _sysconfdir /etc/nagios
29%define _datadir %{_prefix}/share/%{name}
30%define _plugindir %{_libdir}/nagios/plugins
fcdb117d 31%define _libexecdir %{_plugindir}
6095acef 32%define _localstatedir %{_var}/log/nagios
6095acef
PZ
33%define nsport 5666
34
35%description
e47ef220
ER
36NRPE is an addon for Nagios that allows you to execute "local" plugins
37(like check_disk, check_procs, etc.) on remote hosts. The check_nrpe
38plugin is called from Nagios and makes plugin execution requests to
39the NRPE daemon running on the remote host (either as a standalone
40daemon or as a service under inetd). Supports passing command
41arguments to server, as well as native SSL/TLS encryption (anonymous
42DH mode).
6095acef 43
84d968ba
JR
44%description -l pl.UTF-8
45NRPE to dodatek do Nagiosa pozwalający na wywoływanie "lokalnych"
d951bfe3 46wtyczek (takich jak check_disk, check_procs itp.) na zdalnych
84d968ba
JR
47maszynach. Wtyczka check_nrpe jest wywoływana z poziomu Nagiosa i
48wysyła żądania uruchomienia wtyczek do demona NRPE działającego na
49zdalnej maszynie (jako samodzielny demon lub usługa inetd). Obsługuje
50przekazywanie argumentów poleceń do serwera, a także natywne
d951bfe3 51szyfrowanie SSL/TLS (w trybie anonimowego DH).
6095acef 52
0a9173a1 53%package -n nagios-plugin-check_nrpe
6095acef 54Summary: check_nrpe plugin for Nagios
32b335f7 55Summary(pl.UTF-8): Wtyczka check_nrpe dla Nagiosa
6095acef 56Group: Networking
f4d9de42 57Requires: nagios-common
0a9173a1 58Provides: %{name}-plugin = %{version}-%{release}
56070b30 59Obsoletes: nagios-nrpe-plugin < 2.12-6
6095acef 60
0a9173a1 61%description -n nagios-plugin-check_nrpe
6095acef
PZ
62check_nrpe plugin for Nagios. This plugin allows running plugins on
63remote machines using nrpe service.
64
0a9173a1 65%description -n nagios-plugin-check_nrpe -l pl.UTF-8
783f405f 66Wtyczka check_nrpe dla Nagiosa. Pozwala na zdalne uruchamianie wtyczek
84d968ba 67na innych komputerach za pomocą demona nrpe.
6095acef
PZ
68
69%prep
283125e4 70%setup -q -n nrpe-%{version}
a572586a 71%undos contrib/nrpe_check_control.c
e3dd2648 72%patch0 -p1
a572586a 73%patch1 -p1
6095acef
PZ
74
75%build
76%{__aclocal}
77%{__autoconf}
6095acef 78%configure \
6095acef 79 --with-nrpe-port=%{nsport} \
e8316598 80 --with-nrpe-user=nagios \
56070b30 81 --with-nrpe-group=nagios \
ba61d89b
JK
82 --enable-ssl \
83 --enable-command-args
6095acef
PZ
84
85%{__make} all
86
a572586a
ER
87%{__cc} %{rpmcppflags} %{rpmcflags} %{rpmldflags} contrib/nrpe_check_control.c -o contrib/nrpe_check_control
88
6095acef
PZ
89%install
90rm -rf $RPM_BUILD_ROOT
56070b30 91install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/{plugins,nrpe.d},%{_libdir}/nagios/plugins,%{_sbindir}} \
bdffdf09
JR
92 $RPM_BUILD_ROOT{%{_localstatedir},/var/run/nrpe} \
93 $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
6095acef 94
56070b30 95cp -p sample-config/nrpe.cfg $RPM_BUILD_ROOT%{_sysconfdir}/nrpe.cfg
5dffe4d7 96sed -e 's,@plugindir@,%{_plugindir},' %{SOURCE2} > $RPM_BUILD_ROOT%{_sysconfdir}/plugins/check_nrpe.cfg
56070b30
ER
97install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/nrpe
98install -p src/nrpe $RPM_BUILD_ROOT%{_sbindir}
99install -p src/check_nrpe $RPM_BUILD_ROOT%{_plugindir}
6095acef 100
bdffdf09
JR
101install %{SOURCE3} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
102
6095acef
PZ
103%clean
104rm -rf $RPM_BUILD_ROOT
105
6095acef 106%post
50034c16 107/sbin/chkconfig --add nrpe
c18c6a62 108%service nrpe restart
6095acef
PZ
109
110%preun
111if [ "$1" = "0" ] ; then
c18c6a62 112 %service nrpe stop
50034c16 113 /sbin/chkconfig --del nrpe
6095acef
PZ
114fi
115
ce845d3e
ER
116%triggerpostun -- %{name} < 2.6-1.1
117%{__sed} -i -e 's,/var/run/nrpe.pid,/var/run/nrpe/nrpe.pid,' %{_sysconfdir}/nrpe.cfg
118
5dffe4d7
ER
119%triggerpostun -n nagios-plugin-check_nrpe -- nagios-plugin-check_nrpe < 2.12-7.1
120if [ -f %{_sysconfdir}/plugins/nrpe.cfg.rpmsave ]; then
121 cp -f %{_sysconfdir}/plugins/check_nrpe.cfg{,.rpmnew}
122 mv -f %{_sysconfdir}/plugins/{nrpe.cfg.rpmsave,check_nrpe.cfg}
123 sed -i -e 's,-c \$ARG1\$,$ARG1$,' %{_sysconfdir}/plugins/check_nrpe.cfg
124fi
125
6095acef
PZ
126%files
127%defattr(644,root,root,755)
128%doc Changelog LEGAL README* SECURITY
783f405f 129%attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nrpe.cfg
56070b30 130%attr(750,root,nagios) %dir %{_sysconfdir}/nrpe.d
6095acef 131%attr(755,root,root) %{_sbindir}/nrpe
ce845d3e
ER
132%attr(754,root,root) /etc/rc.d/init.d/nrpe
133%dir %attr(775,root,nagios) /var/run/nrpe
bdffdf09 134/usr/lib/tmpfiles.d/%{name}.conf
6095acef 135
0a9173a1 136%files -n nagios-plugin-check_nrpe
6095acef 137%defattr(644,root,root,755)
5dffe4d7 138%attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/plugins/check_nrpe.cfg
8a6ed10e 139%attr(755,root,root) %{_plugindir}/check_nrpe
This page took 0.110255 seconds and 4 git commands to generate.