]> git.pld-linux.org Git - packages/monitoring-plugins.git/blob - monitoring-plugins.spec
use unified plugin dir
[packages/monitoring-plugins.git] / monitoring-plugins.spec
1 # TODO:
2 # - package requisites for unifished packages -nwstat
3 #   REQUIREMENTS explains the dependencies.
4 # - handle --without-dbi (new package)
5 # - add --without-radius bcond
6 # - check_ide_smart deps
7
8 # Conditional build:
9 %bcond_without  ldap            # build without ldap
10
11 %include        /usr/lib/rpm/macros.perl
12 Summary:        Network Monitoring Plugins for Nagios and compatible
13 Summary(pl.UTF-8):      Wtyczki do monitorowania hostów/usług/sieci dla Nagiosa
14 Name:           monitoring-plugins
15 Version:        2.1.2
16 Release:        1
17 License:        GPL v3+
18 Group:          Networking
19 Source0:        https://www.monitoring-plugins.org/download/%{name}-%{version}.tar.gz
20 # Source0-md5:  4a210f7db012571ea58e214cef74f612
21 # https://git.pld-linux.org/projects/nagios-config
22 Source1:        nagios-plugins-config-20150412.tar.xz
23 # Source1-md5:  2f0f29735345c158d11c2009be3e1478
24 Source2:        nagios-utils.php
25 #Patch:         nagios-plugins-shared.patch # needs finishing
26 Patch0:         nagios-plugins-tainted.patch
27 Patch4:         nagios-plugins-noroot.patch
28 Patch5:         nagios-plugins-check_ping-socket-filter-warning.patch
29 Patch7:         nagios-plugins-pgsql.patch
30 Patch9:         nagios-plugins-check_log_paths.patch
31 Patch13:        nagios-plugins-check_radius_segfault.patch
32 Patch21:        nagios-plugins-check_hpjd-no-paper-out.patch
33 Patch23:        nagios-plugins-check_disk_smb-zero-cap.patch
34 Patch24:        nagios-plugins-paths.patch
35 Patch27:        nagios-plugins-ping.patch
36 URL:            https://www.monitoring-plugins.org/
37 BuildRequires:  autoconf
38 BuildRequires:  automake
39 BuildRequires:  file
40 BuildRequires:  gettext-tools >= 0.15
41 BuildRequires:  libdbi-devel
42 BuildRequires:  libtap-devel
43 BuildRequires:  libtool
44 BuildRequires:  mysql-devel
45 %{?with_ldap:BuildRequires:     openldap-devel >= 2.3.0}
46 BuildRequires:  openssl-devel >= 0.9.7d
47 BuildRequires:  perl-Net-SNMP
48 BuildRequires:  postgresql-devel
49 BuildRequires:  tar >= 1:1.22
50 BuildRequires:  xz
51 %if "%{pld_release}" == "ac"
52 BuildRequires:  radiusclient-devel
53 %else
54 BuildRequires:  radiusclient-ng-devel
55 BuildConflicts: radiusclient-devel
56 %endif
57 BuildRequires:  rpm >= 4.4.9-56
58 BuildRequires:  rpm-perlprov >= 4.1-13
59 BuildRequires:  rpmbuild(macros) >= 1.654
60 Requires:       nagios-common
61 Obsoletes:      netsaint-plugins
62 Conflicts:      nagios < 3.1.2-3
63 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64
65 %define         _sysconfdir             /etc/nagios/plugins
66 %define         plugindir               %{_prefix}/lib/nagios/plugins
67 %define         nrpeddir                /etc/nagios/nrpe.d
68 %define         _noautoprovfiles        utils.pm
69 %define         _noautoreq_perl DBD::Oracle RRD::File packet_utils snmputil utils
70
71 %description
72 Nagios is a program that will monitor hosts and services on your
73 network, and to email or page you when a problem arises or is
74 resolved. Nagios runs on a Unix server as a background or daemon
75 process, intermittently running checks on various services that you
76 specify. The actual service checks are performed by separate "plugin"
77 programs which return the status of the checks to Nagios.
78
79 This package contains the basic plugins necessary for use with the
80 nagios package.
81
82 %description -l pl.UTF-8
83 Nagios to program monitorujący hosty i usługi w sieci i powiadamiający
84 pocztą elektroniczną lub na pager o wystąpieniu lub rozwiązaniu
85 problemów. Nagios działa na serwerze uniksowym w tle lub jako demon,
86 regularnie przeprowadzając kontrolę różnych podanych mu usług. Sama
87 kontrola usług jest wykonywana poprzez oddzielne "wtyczki" - programy
88 zwracajace stan danej usługi do Nagiosa.
89
90 Ten pakiet zawiera podstawowe wtyczki do używania z pakietem nagios.
91
92 %package libs
93 Summary:        Nagios plugins base libraries
94 Summary(pl.UTF-8):      Podstawowe biblioteki wtyczek Nagiosa
95 Group:          Networking
96
97 %description libs
98 This package contains nagios plugins base libraries that plugins
99 depend on.
100
101 %description libs -l pl.UTF-8
102 Ten pakiet zawiera podstawowe biblioteki wtyczek Nagiosa, wymagane
103 przez wtyczki.
104
105 %package devel
106 Summary:        Include files that Nagios plugins may compile against
107 Group:          Development/Libraries
108 # doesn't require base
109
110 %description devel
111 This package provides include files that Nagios plugins may compile
112 against.
113
114 # NOTE for sub package requires:
115 # Requires:     nagios-common for plugins directory and nagios group
116 # and add Requires:     %{name}-libs = %{version}-%{release} for utils.{sh,pm,php}
117 ##############################################################################
118
119 %package mysql
120 Summary:        Nagios plugin to test a MySQL DBMS
121 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania systemu baz danych MySQL
122 Group:          Networking
123 Requires:       nagios-common
124
125 %description mysql
126 This plugin tests a MySQL DBMS to determine whether it is active and
127 accepting queries.
128
129 %description mysql -l pl.UTF-8
130 Ta wtyczka sprawdza serwer baz danych MySQL, aby określić, czy jest
131 aktywny i przyjmuje zapytania.
132
133 %package perl
134 Summary:        Nagios plugins written in Perl
135 Summary(pl.UTF-8):      Wtyczki Nagiosa napisane w Perlu
136 Group:          Networking
137 Requires:       nagios-common
138 # for utils.pm
139 Requires:       %{name}-libs = %{version}-%{release}
140 %if "%{_rpmversion}" >= "5"
141 BuildArch:      noarch
142 %endif
143
144 %description perl
145 This package contains Nagios plugins written in Perl.
146
147 %description perl -l pl.UTF-8
148 Ten pakiet zawiera wtyczki Nagiosa napisane w Perlu.
149
150 %package samba
151 Summary:        Nagios plugin to check remote disk using smbclient
152 Summary(pl.UTF-8):      Wtyczka Nagiosa do zdalnego sprawdzania dysku z użyciem smbclienta
153 Group:          Networking
154 Requires:       nagios-common
155 # for utils.pm
156 Requires:       %{name}-libs = %{version}-%{release}
157 Requires:       samba-client
158 %if "%{_rpmversion}" >= "5"
159 BuildArch:      noarch
160 %endif
161
162 %description samba
163 Perl Check SMB Disk plugin for Nagios.
164
165 %description samba -l pl.UTF-8
166 Perlowa wtyczka dla Nagiosa sprawdzająca dyski SMB.
167
168 %package snmp
169 Summary:        Nagios plugins using SNMP protocol to query information
170 Summary(pl.UTF-8):      Wtyczki Nagiosa używające protokołu SNMP w celu uzyskania informacji
171 Group:          Networking
172 Requires:       nagios-common
173 # for utils.pm
174 Requires:       %{name}-libs = %{version}-%{release}
175 Requires:       net-snmp-utils
176 Requires:       perl-Net-SNMP
177
178 %description snmp
179 Nagios plugins using SNMP protocol to query information.
180
181 %description snmp -l pl.UTF-8
182 Wtyczki Nagiosa używające protokołu SNMP w celu uzyskania informacji.
183
184 %package ssh
185 Summary:        Nagios plugins to check remote services via SSH
186 Summary(pl.UTF-8):      Wtyczki Nagiosa do sprawdzania zdalnych usług po SSH
187 Group:          Networking
188 Requires:       nagios-common
189 Requires:       openssh-clients
190
191 %description ssh
192 This plugin uses SSH to execute commands on a remote host.
193
194 %description ssh -l pl.UTF-8
195 Ta wtyczka używa SSH do wykonywania poleceń na zdalnym hoście.
196
197 %package -n nagios-plugin-check_dig
198 Summary:        Nagios plugin to check DNS servers with dig
199 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania DNS-u przy użyciu programu dig
200 Group:          Networking
201 Requires:       bind-utils
202 Requires:       nagios-common
203 Provides:       nagios-plugins-dig = %{version}-%{release}
204 Obsoletes:      nagios-plugins-dig
205
206 %description -n nagios-plugin-check_dig
207 Test the DNS service on the specified host using dig.
208
209 %description -n nagios-plugin-check_dig -l pl.UTF-8
210 Ta wtyczka sprawdza usługę DNS na podanym hoście przy użyciu programu
211 dig.
212
213 %package -n nagios-plugin-check_dns
214 Summary:        Nagios plugin to check DNS with nslookup
215 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania DNS-u przy użyciu nslookup
216 Group:          Networking
217 Requires:       bind-utils
218 Requires:       nagios-common
219 Provides:       nagios-plugins-dns = %{version}-%{release}
220 Obsoletes:      nagios-plugins-dns
221
222 %description -n nagios-plugin-check_dns
223 This plugin uses the nslookup program to obtain the IP address for the
224 given host/domain query. A optional DNS server to use may be
225 specified. If no DNS server is specified, the default server(s)
226 specified in /etc/resolv.conf will be used.
227
228 %description -n nagios-plugin-check_dns -l pl.UTF-8
229 Ta wtyczka używa programu nslookup do uzyskania adresu IP danego dla
230 danego zapytania o host/domenę. Można opcjonalnie podać serwer DNS,
231 który ma być użyty. Jeśli nie podano serwera DNS, używany jest
232 domyślny serwer (lub serwery) podany w /etc/resolv.conf.
233
234 %package -n nagios-plugin-check_file_age
235 Summary:        Nagios plugin to check local file age and size
236 Group:          Networking
237 Requires:       nagios-common
238 # for utils.pm
239 Requires:       %{name}-libs = %{version}-%{release}
240 %if "%{_rpmversion}" >= "5"
241 BuildArch:      noarch
242 %endif
243
244 %description -n nagios-plugin-check_file_age
245 Nagios plugin to check local file age and size.
246
247 %package -n nagios-plugin-check_fping
248 Summary:        Nagios plugin to check host up state with fping
249 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania działania hosta przy użyciu programu fping
250 Group:          Networking
251 Requires:       fping
252 Requires:       nagios-common
253 Provides:       nagios-plugins-fping = %{version}-%{release}
254 Obsoletes:      nagios-plugins-fping
255
256 %description -n nagios-plugin-check_fping
257 This plugin will use the /bin/fping command to ping the specified host
258 for a fast check if the host is alive.
259
260 %description -n nagios-plugin-check_fping -l pl.UTF-8
261 Ta wtyczka używa polecenia /bin/fping do szybkiego sprawdzenia, czy
262 dany host działa.
263
264 %package -n nagios-plugin-check_game
265 Summary:        Nagios plugin to check status of Internet game servers
266 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania stanu serwerów gier internetowych
267 Group:          Networking
268 Requires:       nagios-common
269 Requires:       qstat
270 Provides:       nagios-plugins-qstat = %{version}-%{release}
271 Obsoletes:      nagios-plugins-qstat
272
273 %description -n nagios-plugin-check_game
274 This plugin uses the 'qstat' command, the popular game server status
275 query tool.
276
277 QStat is a command-line program that displays information about
278 Internet game servers.
279
280 The servers are either down, non-responsive, or running a game. For
281 servers running a game, the server name, map name, current number of
282 players, and response time are displayed. Server rules and player
283 information may also be displayed.
284
285 %description -n nagios-plugin-check_game -l pl.UTF-8
286 Ta wtyczka używa polecenia 'qstat' - popularnego narzędzia do zapytań
287 o stan serwerów gier.
288
289 QStat to program działający z linii poleceń wyświetlający informacje o
290 serwerach gier internetowych.
291
292 Serwery mogą być wyłączone, nie odpowiadać, bądź mieć uruchomioną grę.
293 Dla serwerów z grami wyświetlanea są: nazwa serwera, nazwa mapy,
294 aktualna liczba graczy i czas odpowiedzi. Mogą być dodatkowo
295 wyświetlone reguły serwera i informacje o graczach.
296
297 %package -n nagios-plugin-check_ldap
298 Summary:        Nagios plugin to check LDAP servers
299 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania serwerów LDAP
300 Group:          Networking
301 Requires:       nagios-common
302 Suggests:       openldap
303 Provides:       nagios-plugins-ldap = %{version}-%{release}
304 Obsoletes:      nagios-plugins-ldap
305
306 %description -n nagios-plugin-check_ldap
307 Nagios plugin to check LDAP servers.
308
309 %description -n nagios-plugin-check_ldap -l pl.UTF-8
310 Wtyczka Nagiosa do sprawdzania serwerów LDAP.
311
312 %package -n nagios-plugin-check_load
313 Summary:        Nagios plugin to check uptime using procps
314 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania uptime'u przy użyciu procps
315 Group:          Networking
316 Requires:       nagios-common
317 Requires:       procps
318 Provides:       nagios-plugins-procps = %{version}-%{release}
319 Obsoletes:      nagios-plugins-procps
320
321 %description -n nagios-plugin-check_load
322 Nagios plugin to check uptime using procps.
323
324 %description -n nagios-plugin-check_load -l pl.UTF-8
325 Wtyczka Nagiosa do sprawdzania uptime'u przy użyciu procps.
326
327 %package -n nagios-plugin-check_mailq
328 Summary:        Nagios plugin to check the number of messages in the local mail queue
329 Group:          Networking
330 Requires:       nagios-common
331 # for utils.pm
332 Requires:       %{name}-libs = %{version}-%{release}
333 %if "%{_rpmversion}" >= "5"
334 BuildArch:      noarch
335 %endif
336
337 %description -n nagios-plugin-check_mailq
338 Checks the number of messages in the mail queue (supports multiple
339 sendmail queues, qmail).
340
341 %package -n nagios-plugin-check_nt
342 Summary:        Nagios plugin to check NT server with NSClient
343 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania serwera NT przy użyciu NSClienta
344 Group:          Networking
345 Requires:       %{name}-libs = %{version}-%{release}
346 Requires:       nagios-common
347
348 %description -n nagios-plugin-check_nt
349 Nagios plugin to check NT server with NSClient.
350
351 %description -n nagios-plugin-check_nt -l pl.UTF-8
352 Wtyczka Nagiosa do sprawdzania serwera NT przy użyciu NSClienta.
353
354 %package -n nagios-plugin-check_ntp
355 Summary:        Nagios plugin to check time using NTP protocol
356 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania czasu przy użyciu protokołu NTP
357 Group:          Networking
358 Requires:       nagios-common
359 # for utils.pm
360 Requires:       %{name}-libs = %{version}-%{release}
361 Requires:       ntp-client
362 Provides:       nagios-plugins-ntp = %{version}-%{release}
363 Obsoletes:      nagios-plugins-ntp
364
365 %description -n nagios-plugin-check_ntp
366 Checks the local timestamp offset versus <host> with ntpdate. Checks
367 the jitter/dispersion of clock signal between <host> and its sys.peer
368 with ntpq.
369
370 %description -n nagios-plugin-check_ntp -l pl.UTF-8
371 Ta wtyczka sprawdza przesunięcie lokalnego czasu względem danego hosta
372 przy użyciu ntpdate. Sprawdza wahania/dyspersję sygnału zegara
373 pomiędzy hostem a jego sys.peer przy użyciu ntpq.
374
375 %package -n nagios-plugin-check_pgsql
376 Summary:        Nagios plugin to test a PostgreSQL DBMS
377 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania systemu baz danych PostgreSQL
378 Group:          Networking
379 Requires:       nagios-common
380 Provides:       nagios-plugins-pgsql = %{version}-%{release}
381 Obsoletes:      nagios-plugins-pgsql
382
383 %description -n nagios-plugin-check_pgsql
384 This plugin tests a PostgreSQL DBMS to determine whether it is active
385 and accepting queries. In its current operation, it simply connects to
386 the specified database, and then disconnects. If no database is
387 specified, it connects to the template1 database, which is present in
388 every functioning PostgreSQL DBMS.
389
390 %description -n nagios-plugin-check_pgsql -l pl.UTF-8
391 Ta wtyczka sprawdza serwer baz danych PostgreSQL, aby określić, czy
392 jest aktywny i przyjmuje zapytania. Aktualnie po prostu łączy się do
393 określonej bazy danych i rozłącza. Jeśli nie podano bazy danych, łączy
394 się do bazy danych template1, obecnej w każdym działającym systemie
395 PostgreSQL.
396
397 %package -n nagios-plugin-check_ping
398 Summary:        Nagios plugin to check host up state with ping
399 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania działania hosta przy użyciu programu ping
400 Group:          Networking
401 Requires:       iputils-ping >= 1:s20070202-1
402 Requires:       nagios-common
403
404 %description -n nagios-plugin-check_ping
405 This plugin will use the /bin/ping command to ping the specified host
406 if the host is alive.
407
408 %description -n nagios-plugin-check_ping -l pl.UTF-8
409 Ta wtyczka używa polecenia /bin/ping do sprawdzenia, czy dany host
410 działa.
411
412 %package -n nagios-plugin-check_radius
413 Summary:        Nagios plugin to test a radius server to see if it is accepting connections
414 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania serwera radius pod kątem przyjmowania połączeń
415 Group:          Networking
416 Requires:       nagios-common
417 Requires:       radiusclient
418 Provides:       nagios-plugins-radius = %{version}-%{release}
419 Obsoletes:      nagios-plugins-radius
420
421 %description -n nagios-plugin-check_radius
422 This plugin tests a radius server to see if it is accepting
423 connections.
424
425 %description -n nagios-plugin-check_radius -l pl.UTF-8
426 Ta wtyczka sprawdza serwer usługi radius, aby zobaczyć, czy przyjmuje
427 połączenia.
428
429 %package -n nagios-plugin-check_sensors
430 Summary:        Nagios plugin to check hardware status using the lm_sensors package
431 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania stanu sprzętu przy użyciu pakietu lm_sensors
432 Group:          Networking
433 Requires:       nagios-common
434 # for utils.sh
435 Requires:       %{name}-libs = %{version}-%{release}
436 Requires:       lm_sensors
437 Provides:       nagios-plugins-sensors = %{version}-%{release}
438 Obsoletes:      nagios-plugins-sensors
439 %if "%{_rpmversion}" >= "5"
440 BuildArch:      noarch
441 %endif
442
443 %description -n nagios-plugin-check_sensors
444 This plugin checks hardware status using the lm_sensors package.
445
446 %description -n nagios-plugin-check_sensors -l pl.UTF-8
447 Ta wtyczka sprawdza stan sprzętu przy użyciu pakietu lm_sensors.
448
449 %package -n nagios-plugin-check_dbi
450 Summary:        Nagios plugin to check database with libdbi
451 Group:          Networking
452 Requires:       nagios-common
453 Suggests:       libdbi-drivers-firebird
454 Suggests:       libdbi-drivers-freetds
455 Suggests:       libdbi-drivers-mysql
456 Suggests:       libdbi-drivers-pgsql
457 Suggests:       libdbi-drivers-sqlite
458 Suggests:       libdbi-drivers-sqlite3
459
460 %description -n nagios-plugin-check_dbi
461 Nagios plugin to check database with libdbi.
462
463 # requisite not packaged in PLD
464 %package nwstat
465 Summary:        Nagios plugin nwstat
466 Summary(pl.UTF-8):      Wtyczka nwstat do Nagiosa
467 Group:          Networking
468 Requires:       %{name}-libs = %{version}-%{release}
469 Requires:       mrtgext
470 Requires:       nagios-common
471
472 %description nwstat
473 Nagios plugin using MRTGEXT module
474 <http://forge.novell.com/modules/xfmod/project/?mrtgext>.
475
476 %description nwstat -l pl.UTF-8
477 Wtyczka nagiosa używająca modułu MRTGEXT
478 <http://forge.novell.com/modules/xfmod/project/?mrtgext>.
479
480 %package contrib
481 Summary:        Contributed nagios plugins
482 Summary(pl.UTF-8):      Wtyczki przekazane do projektu Nagios
483 Group:          Networking
484 Requires:       nagios-common
485 # for utils.pm, utils.sh, utils.py
486 Requires:       %{name}-libs = %{version}-%{release}
487 # check_apache
488 Suggests:       perl-URI
489 Suggests:       perl-libwww
490 # check_apc_ups
491 Suggests:       net-snmp-utils
492 # check_arping
493 Suggests:       perl-Net-Arping
494 # check_bgpstate
495 Suggests:       perl-Net-SNMP
496 Suggests:       whois
497 # check_traceroute
498 Suggests:       traceroute
499 # check_traceroute-pure_perl
500 Suggests:       perl-Net-Traceroute
501 # check_temp_fsc
502 Suggests:       perl-SNMP_Session
503 # check_smart
504 Suggests:       smartmontools
505 # check_smb
506 Suggests:       samba
507 # check_adptraid
508 #Suggests:      dptutil
509 # unfinished... more deps are actually needed.
510
511 %description contrib
512 Contributed nagios plugins. Some of them work, some do not. Use at
513 your own risk.
514
515 %description contrib -l pl.UTF-8
516 Wtyczki przekazane do projektu Nagios. Część z nich działa, część nie.
517
518 %prep
519 %setup -q -a1
520 mv nagios-plugins-config-*/* .
521 %patch0 -p1
522 %patch4 -p1
523 %patch5 -p1
524 %patch7 -p1
525 %patch13 -p1
526 %patch21 -p1
527 %patch23 -p1
528 %patch24 -p1
529 %patch27 -p1
530
531 # remove libtool m4 macro copies, breaks when system libtool is older
532 %{__rm} gl/m4/libtool.m4 gl/m4/lt*.m4
533
534 # cleanup backups after patching
535 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
536
537 # force regen in build
538 rm -f configure
539
540 %build
541 if [ ! -f configure ]; then
542         %{__gettextize}
543         %{__libtoolize}
544         %{__aclocal} -I m4 -I gl/m4
545         %{__autoconf}
546         %{__autoheader}
547         %{__automake}
548 fi
549
550 %configure \
551         --libexecdir=%{plugindir} \
552         --enable-libtap=/usr \
553         --with-cgiurl=/nagios/cgi-bin \
554         --with-mysql=/usr \
555         --with-pgsql=/usr \
556         --with-openssl=/usr \
557         --with-ping-command='/bin/ping -n -U -w %%d -c %%d %%s' \
558         --with-ping6-command='/bin/ping6 -n -U -w %%d -c %%d %%s' \
559         --with-ps-command="/bin/ps axwo 'stat uid ppid vsz rss pcpu comm args'" \
560         --with-ps-format="%%s %%d %%d %%d %%d %%f %%s %%n" \
561         --with-ps-cols=8 \
562         --with-ps-varlist="procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos" \
563         --with-proc-meminfo=/proc/meminfo \
564         --with-proc-loadavg=/proc/loadavg \
565         --with-nslookup-command="/usr/bin/nslookup -sil" \
566         --with-uptime-command=/usr/bin/uptime \
567         --with-rpcinfo-command=/usr/sbin/rpcinfo \
568         --with-ntpdate-command=/usr/sbin/ntpdate \
569         --with-smbclient-command=/usr/bin/smbclient \
570         --with-dig-command=/usr/bin/dig \
571         --with-fping-command=/usr/sbin/fping \
572         --with-fping6-command=/usr/sbin/fping6 \
573         --with-qstat-command=/usr/bin/qstat \
574         --with-ssh-command=/usr/bin/ssh \
575         --with-snmpget-command=/usr/bin/snmpget \
576         --with-snmpgetnext-command=/usr/bin/snmpgetnext \
577         --with-df-command='/bin/df -P' \
578         --with-apt-get-command=/usr/bin/apt-get \
579         --with-qmail-qstat-command=/usr/bin/qmail-qstat \
580         --with-mailq-command=/usr/bin/mailq \
581         --without-included-regex
582
583 %{__make}
584
585 %install
586 rm -rf $RPM_BUILD_ROOT
587
588 %{__make} install \
589         DESTDIR=$RPM_BUILD_ROOT
590
591 %{__make} install-root -C plugins-root \
592         DESTDIR=$RPM_BUILD_ROOT
593
594 %{__rm} $RPM_BUILD_ROOT%{plugindir}/check_nwstat
595
596 # for nagios-plugin-check_mysql_perf (at least)
597 install -d $RPM_BUILD_ROOT%{_libdir}
598 cp -p lib/libmonitoringplug.a $RPM_BUILD_ROOT%{_libdir}
599 cp -p gl/libgnu.a $RPM_BUILD_ROOT%{_libdir}
600 cp -p plugins/utils.o $RPM_BUILD_ROOT%{_libdir}
601 cp -p plugins/netutils.o $RPM_BUILD_ROOT%{_libdir}
602 install -d $RPM_BUILD_ROOT%{_includedir}/nagiosplug/{plugins,gl,lib}
603 cp -p *.h $RPM_BUILD_ROOT%{_includedir}/nagiosplug
604 cp -p plugins/*.h $RPM_BUILD_ROOT%{_includedir}/nagiosplug/plugins
605 cp -p gl/*.h $RPM_BUILD_ROOT%{_includedir}/nagiosplug/gl
606 cp -p lib/*.h $RPM_BUILD_ROOT%{_includedir}/nagiosplug/lib
607
608 install -d $RPM_BUILD_ROOT%{_sysconfdir}
609 cp -p commands/*.cfg $RPM_BUILD_ROOT%{_sysconfdir}
610
611 %find_lang %{name}
612
613 # replace USER1 macro with actual value
614 plugins=$(grep -Eoh 'command_line.*USER1\$/[^ ]+' $RPM_BUILD_ROOT%{_sysconfdir}/*.cfg | awk -F/ '{print $NF}' | sort -u)
615 for plugin in $plugins; do
616         sed -i -e "s,\\\$USER1\\\$/$plugin ,%{plugindir}/$plugin ," $RPM_BUILD_ROOT%{_sysconfdir}/*.cfg
617 done
618
619 install -d $RPM_BUILD_ROOT%{nrpeddir}
620 touch $RPM_BUILD_ROOT%{nrpeddir}/check_mailq.cfg
621
622 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{plugindir}/utils.php
623 chmod a-x $RPM_BUILD_ROOT%{plugindir}/utils.*
624
625 %clean
626 rm -rf $RPM_BUILD_ROOT
627
628 %if 0
629 # this is for shared lib
630 %post   libs    -p /sbin/ldconfig
631 %postun libs    -p /sbin/ldconfig
632 %endif
633
634 %triggerin -n nagios-plugin-check_mailq -- nagios-nrpe
635 %nagios_nrpe -a check_mailq -f %{_sysconfdir}/check_mailq.cfg
636
637 %triggerun -n nagios-plugin-check_mailq -- nagios-nrpe
638 %nagios_nrpe -d check_mailq -f %{_sysconfdir}/check_mailq.cfg
639
640 %files -f %{name}.lang
641 %defattr(644,root,root,755)
642 %doc ACKNOWLEDGEMENTS AUTHORS CODING ChangeLog
643 %doc FAQ LEGAL NEWS README REQUIREMENTS SUPPORT THANKS
644
645 # plugins
646 %attr(755,root,root) %{plugindir}/check_apt
647 %attr(755,root,root) %{plugindir}/check_cluster
648 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_disk.cfg
649 %attr(755,root,root) %{plugindir}/check_disk
650 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_dummy.cfg
651 %attr(755,root,root) %{plugindir}/check_dummy
652 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_http.cfg
653 %attr(755,root,root) %{plugindir}/check_http
654 %attr(755,root,root) %{plugindir}/check_ide_smart
655 %attr(755,root,root) %{plugindir}/check_mrtg
656 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_mrtgtraf.cfg
657 %attr(755,root,root) %{plugindir}/check_mrtgtraf
658 %attr(755,root,root) %{plugindir}/check_nagios
659 # req: over-cr >= 0.99.53 http://www.molitor.org/overcr
660 %attr(755,root,root) %{plugindir}/check_overcr
661 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_procs.cfg
662 %attr(755,root,root) %{plugindir}/check_procs
663 %attr(755,root,root) %{plugindir}/check_real
664 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_smtp.cfg
665 %attr(755,root,root) %{plugindir}/check_smtp
666 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_ssh.cfg
667 %attr(755,root,root) %{plugindir}/check_ssh
668 %attr(755,root,root) %{plugindir}/check_time
669 %attr(755,root,root) %{plugindir}/check_ups
670 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_users.cfg
671 %attr(755,root,root) %{plugindir}/check_users
672 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_swap.cfg
673 %attr(755,root,root) %{plugindir}/check_swap
674 %attr(755,root,root) %{plugindir}/check_log
675
676 # check_tcp and symlinks
677 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_tcp.cfg
678 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_telnet.cfg
679 %attr(755,root,root) %{plugindir}/check_tcp
680 %attr(755,root,root) %{plugindir}/check_clamd
681 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_ftp.cfg
682 %attr(755,root,root) %{plugindir}/check_ftp
683 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_imap.cfg
684 %attr(755,root,root) %{plugindir}/check_imap
685 %attr(755,root,root) %{plugindir}/check_jabber
686 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_nntp.cfg
687 %attr(755,root,root) %{plugindir}/check_nntp
688 %attr(755,root,root) %{plugindir}/check_nntps
689 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_pop.cfg
690 %attr(755,root,root) %{plugindir}/check_pop
691 %attr(755,root,root) %{plugindir}/check_simap
692 %attr(755,root,root) %{plugindir}/check_spop
693 %attr(755,root,root) %{plugindir}/check_ssmtp
694 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_udp.cfg
695 %attr(755,root,root) %{plugindir}/check_udp
696 #%attr(755,root,root) %{plugindir}/check_uptime
697
698 # these plugins need suid bit to operate
699 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_dhcp.cfg
700 %attr(755,root,root) %{plugindir}/check_dhcp
701 %attr(755,root,root) %{plugindir}/check_icmp
702
703 # Cannot determine ORACLE_HOME for sid
704 # probably needs some external programs. can't test
705 %attr(755,root,root) %{plugindir}/check_oracle
706
707 %files libs
708 %defattr(644,root,root,755)
709 #%attr(755,root,root) %{_libdir}/libmonitoringplug.so.*.*.*
710 %attr(755,root,root) %{plugindir}/negate
711 %attr(755,root,root) %{plugindir}/urlize
712
713 %{plugindir}/utils.pm
714 %{plugindir}/utils.php
715 %{plugindir}/utils.sh
716
717 %files devel
718 %defattr(644,root,root,755)
719 %{_libdir}/libgnu.a
720 %{_libdir}/libmonitoringplug.a
721 %{_libdir}/netutils.o
722 %{_libdir}/utils.o
723 %{_includedir}/nagiosplug
724
725 %files mysql
726 %defattr(644,root,root,755)
727 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_mysql.cfg
728 %attr(755,root,root) %{plugindir}/check_mysql
729 %attr(755,root,root) %{plugindir}/check_mysql_query
730
731 %files perl
732 %defattr(644,root,root,755)
733 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_ircd.cfg
734 %attr(755,root,root) %{plugindir}/check_ircd
735 %attr(755,root,root) %{plugindir}/check_rpc
736
737 # requires license.dat
738 %attr(755,root,root) %{plugindir}/check_flexlm
739
740 %files samba
741 %defattr(644,root,root,755)
742 %attr(755,root,root) %{plugindir}/check_disk_smb
743
744 # Not to be confused with nagios-snmp-plugins
745 %files snmp
746 %defattr(644,root,root,755)
747 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_snmp.cfg
748 %attr(755,root,root) %{plugindir}/check_snmp
749 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_hpjd.cfg
750 %attr(755,root,root) %{plugindir}/check_hpjd
751 %attr(755,root,root) %{plugindir}/check_ifoperstatus
752 %attr(755,root,root) %{plugindir}/check_ifstatus
753 %attr(755,root,root) %{plugindir}/check_wave
754 %attr(755,root,root) %{plugindir}/check_breeze
755
756 %files ssh
757 %defattr(644,root,root,755)
758 %attr(755,root,root) %{plugindir}/check_by_ssh
759
760 %files -n nagios-plugin-check_dig
761 %defattr(644,root,root,755)
762 %attr(755,root,root) %{plugindir}/check_dig
763
764 %files -n nagios-plugin-check_dns
765 %defattr(644,root,root,755)
766 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_dns.cfg
767 %attr(755,root,root) %{plugindir}/check_dns
768
769 %files -n nagios-plugin-check_file_age
770 %defattr(644,root,root,755)
771 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_file_age.cfg
772 %attr(755,root,root) %{plugindir}/check_file_age
773
774 %files -n nagios-plugin-check_fping
775 %defattr(644,root,root,755)
776 %attr(2755,root,adm) %{plugindir}/check_fping
777
778 %files -n nagios-plugin-check_game
779 %defattr(644,root,root,755)
780 %attr(755,root,root) %{plugindir}/check_game
781
782 %if %{with ldap}
783 %files -n nagios-plugin-check_ldap
784 %defattr(644,root,root,755)
785 %attr(755,root,root) %{plugindir}/check_ldap
786 %attr(755,root,root) %{plugindir}/check_ldaps
787 %endif
788
789 %files -n nagios-plugin-check_load
790 %defattr(644,root,root,755)
791 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_load.cfg
792 %attr(755,root,root) %{plugindir}/check_load
793
794 %files -n nagios-plugin-check_mailq
795 %defattr(644,root,root,755)
796 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_mailq.cfg
797 %attr(755,root,root) %{plugindir}/check_mailq
798 %ghost %{nrpeddir}/check_mailq.cfg
799
800 %files -n nagios-plugin-check_nt
801 %defattr(644,root,root,755)
802 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_nt.cfg
803 %attr(755,root,root) %{plugindir}/check_nt
804
805 %files -n nagios-plugin-check_ntp
806 %defattr(644,root,root,755)
807 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_ntp.cfg
808 %attr(755,root,root) %{plugindir}/check_ntp
809 %attr(755,root,root) %{plugindir}/check_ntp_peer
810 %attr(755,root,root) %{plugindir}/check_ntp_time
811
812 %files -n nagios-plugin-check_pgsql
813 %defattr(644,root,root,755)
814 %attr(755,root,root) %{plugindir}/check_pgsql
815
816 %files -n nagios-plugin-check_ping
817 %defattr(644,root,root,755)
818 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_ping.cfg
819 %attr(2755,root,adm) %{plugindir}/check_ping
820
821 %files -n nagios-plugin-check_radius
822 %defattr(644,root,root,755)
823 %attr(755,root,root) %{plugindir}/check_radius
824
825 %files -n nagios-plugin-check_sensors
826 %defattr(644,root,root,755)
827 %attr(755,root,root) %{plugindir}/check_sensors
828
829 %files -n nagios-plugin-check_dbi
830 %defattr(644,root,root,755)
831 %attr(755,root,root) %{plugindir}/check_dbi
This page took 0.15887 seconds and 3 git commands to generate.