]> git.pld-linux.org Git - packages/nagios-nrpe.git/blame - nagios-nrpe.spec
- help very stupid configure find ssl libs
[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
989908be 4Version: 2.15
a9eca6a0 5Release: 3
6095acef
PZ
6License: GPL v2
7Group: Networking
56070b30 8Source0: http://downloads.sourceforge.net/nagios/nrpe-%{version}.tar.gz
989908be 9# Source0-md5: 3921ddc598312983f604541784b35a50
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
475d9adc
ER
34NPRE (Nagios Remote Plugin Executor) is a system daemon that will
35execute various Nagios plugins locally on behalf of a remote
36(monitoring) host that uses the check_nrpe plugin.
6095acef 37
84d968ba
JR
38%description -l pl.UTF-8
39NRPE to dodatek do Nagiosa pozwalający na wywoływanie "lokalnych"
d951bfe3 40wtyczek (takich jak check_disk, check_procs itp.) na zdalnych
84d968ba
JR
41maszynach. Wtyczka check_nrpe jest wywoływana z poziomu Nagiosa i
42wysyła żądania uruchomienia wtyczek do demona NRPE działającego na
43zdalnej maszynie (jako samodzielny demon lub usługa inetd). Obsługuje
44przekazywanie argumentów poleceń do serwera, a także natywne
d951bfe3 45szyfrowanie SSL/TLS (w trybie anonimowego DH).
6095acef 46
0a9173a1 47%package -n nagios-plugin-check_nrpe
6095acef 48Summary: check_nrpe plugin for Nagios
32b335f7 49Summary(pl.UTF-8): Wtyczka check_nrpe dla Nagiosa
6095acef 50Group: Networking
f4d9de42 51Requires: nagios-common
0a9173a1 52Provides: %{name}-plugin = %{version}-%{release}
56070b30 53Obsoletes: nagios-nrpe-plugin < 2.12-6
6095acef 54
0a9173a1 55%description -n nagios-plugin-check_nrpe
475d9adc
ER
56The check_nrpe plugin is called from Nagios and makes plugin execution
57requests to the NRPE daemon running on the remote host. Supports
58passing command arguments to server, as well as native SSL/TLS
59encryption (anonymous DH mode).
6095acef 60
0a9173a1 61%description -n nagios-plugin-check_nrpe -l pl.UTF-8
783f405f 62Wtyczka check_nrpe dla Nagiosa. Pozwala na zdalne uruchamianie wtyczek
84d968ba 63na innych komputerach za pomocą demona nrpe.
6095acef
PZ
64
65%prep
283125e4 66%setup -q -n nrpe-%{version}
a572586a 67%undos contrib/nrpe_check_control.c
e3dd2648 68%patch0 -p1
a572586a 69%patch1 -p1
6095acef
PZ
70
71%build
6095acef 72%configure \
6095acef 73 --with-nrpe-port=%{nsport} \
e8316598 74 --with-nrpe-user=nagios \
56070b30 75 --with-nrpe-group=nagios \
ba61d89b 76 --enable-ssl \
a9eca6a0 77 --with-ssl-lib=%{_libdir} \
ba61d89b 78 --enable-command-args
6095acef
PZ
79
80%{__make} all
81
a572586a
ER
82%{__cc} %{rpmcppflags} %{rpmcflags} %{rpmldflags} contrib/nrpe_check_control.c -o contrib/nrpe_check_control
83
6095acef
PZ
84%install
85rm -rf $RPM_BUILD_ROOT
56070b30 86install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/{plugins,nrpe.d},%{_libdir}/nagios/plugins,%{_sbindir}} \
bdffdf09 87 $RPM_BUILD_ROOT{%{_localstatedir},/var/run/nrpe} \
65eed899 88 $RPM_BUILD_ROOT%{systemdtmpfilesdir}
6095acef 89
56070b30 90cp -p sample-config/nrpe.cfg $RPM_BUILD_ROOT%{_sysconfdir}/nrpe.cfg
5dffe4d7 91sed -e 's,@plugindir@,%{_plugindir},' %{SOURCE2} > $RPM_BUILD_ROOT%{_sysconfdir}/plugins/check_nrpe.cfg
56070b30
ER
92install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/nrpe
93install -p src/nrpe $RPM_BUILD_ROOT%{_sbindir}
94install -p src/check_nrpe $RPM_BUILD_ROOT%{_plugindir}
65eed899 95cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
bdffdf09 96
6095acef
PZ
97%clean
98rm -rf $RPM_BUILD_ROOT
99
6095acef 100%post
50034c16 101/sbin/chkconfig --add nrpe
c18c6a62 102%service nrpe restart
6095acef
PZ
103
104%preun
105if [ "$1" = "0" ] ; then
c18c6a62 106 %service nrpe stop
50034c16 107 /sbin/chkconfig --del nrpe
6095acef
PZ
108fi
109
ce845d3e
ER
110%triggerpostun -- %{name} < 2.6-1.1
111%{__sed} -i -e 's,/var/run/nrpe.pid,/var/run/nrpe/nrpe.pid,' %{_sysconfdir}/nrpe.cfg
112
5dffe4d7
ER
113%triggerpostun -n nagios-plugin-check_nrpe -- nagios-plugin-check_nrpe < 2.12-7.1
114if [ -f %{_sysconfdir}/plugins/nrpe.cfg.rpmsave ]; then
115 cp -f %{_sysconfdir}/plugins/check_nrpe.cfg{,.rpmnew}
116 mv -f %{_sysconfdir}/plugins/{nrpe.cfg.rpmsave,check_nrpe.cfg}
117 sed -i -e 's,-c \$ARG1\$,$ARG1$,' %{_sysconfdir}/plugins/check_nrpe.cfg
118fi
119
6095acef
PZ
120%files
121%defattr(644,root,root,755)
122%doc Changelog LEGAL README* SECURITY
783f405f 123%attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nrpe.cfg
56070b30 124%attr(750,root,nagios) %dir %{_sysconfdir}/nrpe.d
6095acef 125%attr(755,root,root) %{_sbindir}/nrpe
ce845d3e
ER
126%attr(754,root,root) /etc/rc.d/init.d/nrpe
127%dir %attr(775,root,nagios) /var/run/nrpe
65eed899 128%{systemdtmpfilesdir}/%{name}.conf
6095acef 129
0a9173a1 130%files -n nagios-plugin-check_nrpe
6095acef 131%defattr(644,root,root,755)
5dffe4d7 132%attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/plugins/check_nrpe.cfg
8a6ed10e 133%attr(755,root,root) %{_plugindir}/check_nrpe
This page took 0.04528 seconds and 4 git commands to generate.