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