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