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