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