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