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