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