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