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