]> git.pld-linux.org Git - packages/nagios.git/blame - nagios.spec
up to 4.4.10
[packages/nagios.git] / nagios.spec
CommitLineData
03d5d122
ER
1# TODO
2# - /var/log/nagios/archives -> /var/log/archive/nagios
c90d41c3 3# - bundled jquery in themes
c2fe0fab 4#
b21411a3 5# Conditional build:
e1f9e4d5 6%bcond_without gd # without statusmap and trends, which require gd library
acd5f253 7%bcond_without doc # don't build html docs
8c8f3904
AM
8# reeenable when http://tracker.nagios.org/view.php?id=51 is fixed
9%bcond_with tests
03d5d122 10
86568aa8 11Summary: Open Source host, service and network monitoring program
a02dfee5
ER
12Summary(pl.UTF-8): Program do monitorowania serwerów/usług/sieci
13Summary(pt_BR.UTF-8): Programa para monitoração de máquinas e serviços
1b3d1540 14Name: nagios
98d7be49
AM
15Version: 4.4.10
16Release: 1
ab40d60f 17License: GPL v2+
1b3d1540 18Group: Networking
d91c2bdb 19# https://www.nagios.org/downloads/nagios-core/thanks/?product_download=nagioscore-source
a83427df 20Source0: https://assets.nagios.com/downloads/nagioscore/releases/%{name}-%{version}.tar.gz
98d7be49 21# Source0-md5: 193610ea3995e561c5e9bd9dcdaad529
1b3d1540
TO
22Source1: %{name}-apache.conf
23Source2: %{name}.init
156a07c5 24Source3: %{name}.sysconfig
ffa60ba3 25# http://git.pld-linux.org/projects/nagios-config/
acb82b08
ER
26Source4: %{name}-config-20150805.tar.xz
27# Source4-md5: 16683172c72cc2c09662261c82abef40
9c387eb0 28Source5: %{name}-lighttpd.conf
455492e8
ER
29Source6: http://www.google.com/mapfiles/shadow50.png
30# Source6-md5: eff99f302f21b95a900d321743fce72b
31Source7: http://www.google.com/mapfiles/marker.png
32# Source7-md5: edefef4bdfc29e1c953694651f05b466
33Source8: googlemap.js
d12528d9 34Source9: %{name}wall.php
03bdaa24
AM
35#Patch100: %{name}-git.patch
36# Patch100-md5: 56f785241d0ed9fe51a8170b9dd50272
97ed1b1c 37
b24b4667
ER
38Patch0: %{name}-resources.patch
39Patch1: %{name}-iconv-in-libc.patch
19670bc2 40Patch2: %{name}-webapps.patch
256499e3 41Patch3: long-output.patch
d39e610a 42Patch4: %{name}-cmd-typo.patch
4af19791 43Patch5: config.patch
3392dafc 44Patch6: %{name}-googlemap.patch
667f6304 45
27a9d69f 46Patch8: archivelog-timeformat.patch
26e7e131 47
bf8055c4 48Patch10: system-jquery.patch
252c8c1b 49Patch11: do-not-fetch-rss.patch
a83427df 50URL: https://www.nagios.org/projects/nagios-core/
14ddd08f
JB
51BuildRequires: autoconf
52BuildRequires: automake
acd5f253 53%{?with_doc:BuildRequires: doxygen}
2f5235a6
ER
54BuildRequires: rpmbuild(macros) >= 1.268
55BuildRequires: sed >= 4.0
acb82b08
ER
56BuildRequires: tar >= 1:1.22
57BuildRequires: xz
86522331
AG
58%if %{with gd}
59BuildRequires: gd-devel
60BuildRequires: libjpeg-devel
61BuildRequires: libpng-devel
62%endif
2f5235a6
ER
63%if %{with tests}
64BuildRequires: perl-HTML-Lint
65BuildRequires: perl-Test-WWW-Mechanize-CGI
66%endif
8a91cf36 67Requires(post,preun): /sbin/chkconfig
bc56720c 68Requires: %{name}-common = %{version}-%{release}
d12528d9 69Requires: rc-scripts >= 0.4.5.5
d4363d96 70Requires: sh-utils
f77e54ce 71Suggests: nagios-notify >= 0.13
3392dafc
ER
72Suggests: nagios-plugin-check_load
73Suggests: nagios-plugin-check_ping
74Suggests: nagios-plugins
f0724323 75Provides: nagios-core
1b3d1540 76Obsoletes: netsaint
d4363d96 77Conflicts: iputils-ping < 1:ss020124
56d92939 78BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
1b3d1540 79
e1f9e4d5 80%define _sysconfdir /etc/%{name}
708a261e
ER
81%define cgidir %{_libdir}/%{name}/cgi
82%define htmldir %{_prefix}/share/%{name}
e1f9e4d5 83%define _localstatedir /var/lib/%{name}
09305d70 84%define nagioshome %{_localstatedir}
31f3ed2f
ER
85%define _webapps /etc/webapps
86%define _webapp %{name}
a9824b3a 87
1b3d1540
TO
88%description
89Nagios is a program that will monitor hosts and services on your
90network. It has the ability to email or page you when a problem arises
0cf1a114
TO
91and when a problem is resolved. Nagios is written in C and is designed
92to run under Linux (and some other *NIX variants) as a background
93process, intermittently running checks on various services that you
94specify.
1b3d1540
TO
95
96The actual service checks are performed by separate "plugin" programs
97which return the status of the checks to Nagios. The plugins are
98available in nagios-plugins packages.
99
924840b9
TO
100Nagios is successor to NetSaint.
101
eb034f05
JR
102%description -l pl.UTF-8
103Nagios to program, który monitoruje serwery oraz usługi w naszej
104sieci. Posiada on możliwość wysyłania informacji o wystąpieniu oraz
105rozwiązaniu problemu. Nagios został napisany w C oraz jest
106zaprojektowany do pracy pod Linuksem (i niektórymi innymi uniksami)
107jako proces pracujący w tle i bezustannie wykonujący pewne operacje
108sprawdzające.
1b3d1540 109
eb034f05
JR
110Właściwe sprawdzanie jest wykonywane przez osobne programy
111("wtyczki"), które zwracają informacje o statusie do Nagiosa. Wtyczki
112są dostępne na stronie w pakietach nagios-plugins.
1b3d1540 113
eb034f05 114Nagios jest następcą NetSainta.
924840b9 115
eb034f05
JR
116%description -l pt_BR.UTF-8
117O Nagios é um programa que monitora máquinas e serviços na sua rede.
1b3d1540 118Ele pode enviar um email ou um aviso de pager para o administrador
eb034f05 119quando surgir um problema e quando ele for resolvido. Nagios é escrito
0cf1a114 120em C e foi desenvolvido para rodar em plataformas Linux (e algumas
eb034f05
JR
121variações de *NIX) como um processo em segundo plano, periodicamente
122executando checagens nos diversos serviços que forem especificados.
1b3d1540 123
901d97df
ER
124%package common
125Summary: Common files needed by both nagios and nrpe
a02dfee5 126Summary(pl.UTF-8): Wspólne pliki wymagane zarówno przez nagiosa jak i nrpe
901d97df 127Group: Networking
d4363d96
ER
128Requires(postun): /usr/sbin/groupdel
129Requires(postun): /usr/sbin/userdel
901d97df 130Requires(pre): /bin/id
d4363d96 131Requires(pre): /usr/bin/getgid
901d97df
ER
132Requires(pre): /usr/sbin/groupadd
133Requires(pre): /usr/sbin/groupmod
134Requires(pre): /usr/sbin/useradd
135Requires(pre): /usr/sbin/usermod
7970ec44 136Provides: group(nagcmd)
f77e54ce 137Provides: group(nagios)
d4363d96 138Provides: user(nagios)
901d97df
ER
139
140%description common
141Common files needed by both nagios and nrpe.
142
eb034f05
JR
143%description common -l pl.UTF-8
144Wspólne pliki wymagane zarówno przez nagiosa jak i nrpe.
bee7c8ea 145
1b3d1540
TO
146%package cgi
147Summary: CGI webinterface for Nagios
a02dfee5 148Summary(pl.UTF-8): Interfejs WWW/CGI dla Nagiosa
7c33b67a 149Group: Applications/WWW
bf60adae 150# for dirs... and accessing local logs, nagios config
4a3af0fb 151Requires: %{name} = %{version}-%{release}
1bbdd399 152Requires: %{name}-imagepaks
20145354 153Requires: %{name}-theme
156a07c5 154Requires: group(http)
bf8055c4 155Requires: jquery
d4363d96 156Requires: webapps
e785f9d9 157Requires: webserver
111ce231 158Requires: webserver(access)
e785f9d9
ER
159Requires: webserver(alias)
160Requires: webserver(auth)
161Requires: webserver(cgi)
162Requires: webserver(indexfile)
bf60adae 163Suggests: %{name}-doc
1b3d1540
TO
164
165%description cgi
0964d76f
JB
166CGI webinterface for Nagios.
167
eb034f05 168%description cgi -l pl.UTF-8
0964d76f 169Interfejs CGI dla Nagiosa.
1b3d1540 170
4f43d0aa
ER
171%package mrtggraphs
172Summary: MRTG Graphs: Nagios Statistics
173Group: Applications/Networking
174Requires: %{name} = %{version}-%{release}
175Provides: mrtg-start
c90d41c3 176BuildArch: noarch
4f43d0aa
ER
177
178%description mrtggraphs
179This pacakge graphs several Nagios statistics which can be useful for
180debugging and trending purposes. The nagiostats binary is used to
181generate the data.
182
bf60adae
ER
183%package doc
184Summary: HTML Documentation for Nagios
185Group: Documentation
acd5f253 186BuildArch: noarch
bf60adae
ER
187# does not require base
188
189%description doc
190HTML Documentation for Nagios.
191
a10f2ff5
ER
192%package theme-classicui
193Summary: ClassicUI Nagios theme
7c33b67a 194Group: Applications/WWW
c80fbcb2 195Requires: %{name}-cgi = %{version}-%{release}
fdea6415 196Requires: webserver(php)
60238ce7
JB
197Provides: nagios-theme
198Obsoletes: nagios-theme
c90d41c3 199BuildArch: noarch
20145354 200
a10f2ff5 201%description theme-classicui
20145354
ER
202Original theme from Nagios.
203
a10f2ff5 204%description theme-classicui -l pl.UTF-8
60238ce7
JB
205Oryginalny motyw z Nagiosa.
206
a10f2ff5
ER
207%package theme-default
208Summary: Virtual package to handle Nagios theme migration
209Group: Applications/WWW
210Requires: nagios-theme
8da737aa
ER
211Suggests: nagios-theme-classicui
212Suggests: nagios-theme-exfoliation
213Suggests: nagios-theme-nuvola
a10f2ff5 214Obsoletes: nagios-theme-default < 3.3.1-1.4
c90d41c3 215BuildArch: noarch
a10f2ff5
ER
216
217%description theme-default
218Virtual package to handle Nagios theme migration
219
1b3d1540 220%package devel
e5fcc454 221Summary: Include files that Nagios-related applications may compile against
a02dfee5
ER
222Summary(pl.UTF-8): Pliki nagłówkowe, wykorzystywane przez aplikacje nagiosa
223Summary(pt_BR.UTF-8): Arquivos de cabeçalho necessários para desenvolvimento de aplicativos para o Nagios
1b3d1540 224Group: Development/Libraries
e1f9e4d5 225# doesn't require base
1b3d1540
TO
226
227%description devel
442ef855
ER
228This package contains the header files, static libraries and
229development documentation for Nagios. If you are a NEB-module author
230or wish to write addons for Nagios using Nagios' own API's, you should
231install this package.
1b3d1540 232
eb034f05
JR
233%description devel -l pl.UTF-8
234Ten pakiet dostarcza pliki nagłówkowe, które mogą być wykorzystywane
235przez aplikacje związane z nagiosem podczas kompilacji.
1b3d1540 236
eb034f05
JR
237%description devel -l pt_BR.UTF-8
238Este pacote contém arquivos de cabeçalho usados no desenvolvimento de
1b3d1540
TO
239aplicativos para o Nagios.
240
241%prep
7f0097ee 242%setup -qc -a4
f09aa22f 243mv %{name}-%{version}/* .
0d02e51c 244%undos cgi/*.c
245%undos include/*.h
246%undos base/*
97ed1b1c 247
03bdaa24 248#%patch100 -p1
97ed1b1c 249
3199e473
AM
250patch -p1 < ./contrib/epel-patches/nagios-0010-remove-information-leak.patch || exit 1
251
b24b4667
ER
252%patch0 -p0
253%patch1 -p1
4a3af0fb 254%patch2 -p1
256499e3 255%patch3 -p1
5ddc91b8 256#fixed
0d02e51c 257#%patch4 -p1
744a134f 258%patch5 -p1
455492e8 259%patch6 -p1
667f6304 260
27a9d69f 261%patch8 -p1
26e7e131 262
bf8055c4 263%patch10 -p1
252c8c1b 264%patch11 -p1
156a07c5 265
6e193622 266find -name .cvsignore -o -name .gitignore | xargs rm
fdea6415
ER
267
268mv nagios-config-*/objects/*.cfg sample-config/template-object
269mv nagios-config-*/*.cfg sample-config
270
af765cf5
ER
271# cleanup backups after patching
272find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
273
156a07c5 274sed -i -e '
c80fbcb2 275 s,".*/var/rw/%{name}.cmd,"%{_localstatedir}/rw/%{name}.cmd,
156a07c5
ER
276 s,".*/libexec/eventhandlers,"%{_libdir}/%{name}/eventhandlers,
277' $(find contrib/eventhandlers -type f)
1b3d1540 278
078e0b6e 279sed -e 's,%{_prefix}/lib/,%{_libdir}/,' %{SOURCE1} > apache.conf
9c387eb0 280sed -e 's,%{_prefix}/lib/,%{_libdir}/,' %{SOURCE5} > lighttpd.conf
078e0b6e 281
744a134f
ER
282# fixup cgi config
283%{__sed} -i -e '
284 # kill trailing spaces
285 s, \+$,,
286 # use real paths
c80fbcb2 287 s,/usr/local/%{name}/share,@datadir@,g
744a134f
ER
288 # we want all authorized users have default access
289 s,=nagiosadmin,=*,g
4af19791 290' sample-config/*.cfg.in
744a134f 291
2f5235a6
ER
292#rm t/611cgistatus-hosturgencies.t
293
1b3d1540 294%build
156a07c5 295cp -f /usr/share/automake/config.sub .
a9824b3a
TO
296%{__aclocal}
297%{__autoconf}
2f5235a6
ER
298%if %{with tests}
299cd tap
300%{__libtoolize}
301%{__aclocal}
302%{__autoconf}
303cd ..
304%endif
a9824b3a 305%configure \
b654dd87 306 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
708a261e
ER
307 --bindir=%{_sbindir} \
308 --sbindir=%{cgidir} \
309 --datadir=%{htmldir} \
f941b3c6 310 --with-cgibindir=%{cgidir} \
1b3d1540
TO
311 --with-nagios-user=%{name} \
312 --with-nagios-grp=%{name} \
156a07c5
ER
313 --with-command-user=%{name} \
314 --with-command-grp=%{name} \
315 --with-lockfile=%{_localstatedir}/%{name}.pid \
e56088ed 316 --with-checkresult-dir=%{_var}/spool/%{name}/checkresults \
0964d76f 317 --with-ping_command='/bin/ping -n %%s -c %%d' \
8c8f3904
AM
318 %{!?with_gd:--disable-statusmap --disable-trends} \
319 %{?with_tests:--enable-libtap} \
320 --enable-event-broker
1b3d1540
TO
321
322%{__make} all
323
acd5f253
ER
324%{?with_doc:%{__make} dox}
325
8c8f3904
AM
326%{?with_tests:%{__make} test}
327
1b3d1540
TO
328%install
329rm -rf $RPM_BUILD_ROOT
4a5ea7ae
ER
330install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_webapps}/%{_webapp}} \
331 $RPM_BUILD_ROOT{%{_var}/log/%{name}/archives,%{_localstatedir}/rw} \
bb3c33b3 332 $RPM_BUILD_ROOT%{_sysconfdir}/{plugins,objects,nrpe.d} \
fcd029a6 333 $RPM_BUILD_ROOT%{_libdir}/%{name}/{eventhandlers,plugins,brokers} \
4a5ea7ae
ER
334%if "%{_lib}" != "lib"
335 $RPM_BUILD_ROOT%{_prefix}/lib/%{name}/{eventhandlers,plugins} \
336%endif
1b3d1540 337
442ef855 338%{__make} install-unstripped install-devel \
1b3d1540
TO
339 DESTDIR=$RPM_BUILD_ROOT \
340 INSTALL_OPTS="" \
341 INIT_OPTS="" \
342 COMMAND_OPTS=""
343
6e193622 344install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
5ddc91b8 345cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
156a07c5
ER
346
347# install templated configuration files
c80fbcb2 348for a in %{name}.cfg resource.cfg commands.cfg contactgroups.cfg contacts.cfg templates.cfg timeperiods.cfg; do
5ddc91b8 349 cp -p sample-config/$a $RPM_BUILD_ROOT%{_sysconfdir}
fdea6415 350done
c0350ebc 351
31f3ed2f 352# webserver files
5ddc91b8 353cp -p apache.conf $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf
218b60a4 354cp -p apache.conf $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf
5ddc91b8
ER
355cp -p lighttpd.conf $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/lighttpd.conf
356cp -p sample-config/cgi.cfg $RPM_BUILD_ROOT%{_webapps}/%{_webapp}
357cp -p %{SOURCE6} $RPM_BUILD_ROOT%{htmldir}/images
358cp -p %{SOURCE7} $RPM_BUILD_ROOT%{htmldir}/images
359cp -p %{SOURCE8} $RPM_BUILD_ROOT%{htmldir}/images
4e60ae1d 360cp -p %{SOURCE9} $RPM_BUILD_ROOT%{htmldir}
31f3ed2f
ER
361> $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/passwd
362echo 'nagios:' > $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/group
156a07c5 363
fdea6415 364# install event handlers, sample config
4a5ea7ae 365install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
156a07c5 366cp -a contrib/eventhandlers $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
fdea6415
ER
367cp -a sample-config $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
368find $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} -name '*.in' | xargs rm
156a07c5 369
4f43d0aa
ER
370# mrtg script
371install -d $RPM_BUILD_ROOT/etc/mrtg/conf.d
86568aa8 372cp -p sample-config/mrtg.cfg $RPM_BUILD_ROOT/etc/mrtg/conf.d/%{name}.cfg
4f43d0aa 373
156a07c5 374# Object data/cache files
e6b8c4d6 375for i in {objects.{cache,precache},{retention,status}.dat,%{name}.{tmp,pid}}; do
156a07c5 376 > $RPM_BUILD_ROOT%{_localstatedir}/$i
b0a1a45f 377done
c80fbcb2 378> $RPM_BUILD_ROOT%{_localstatedir}/rw/%{name}.cmd
86568aa8 379> $RPM_BUILD_ROOT%{_localstatedir}/rw/%{name}.qh
e58661fb 380
bf60adae 381install -d $RPM_BUILD_ROOT%{_docdir}/%{name}
ea02e8bf 382%{?with_doc:%{__cp} -a Documentation/html/* $RPM_BUILD_ROOT%{_docdir}/%{name}}
bf60adae 383
1b3d1540
TO
384%clean
385rm -rf $RPM_BUILD_ROOT
386
1b3d1540 387%post
f9b2b5a9 388for i in %{_localstatedir}/{objects.{cache,precache},{retention,status}.dat}; do
156a07c5
ER
389 [ ! -f $i ] && touch $i
390 chown root:nagios $i
391 chmod 664 $i
392done
393
fe2307cb 394/sbin/chkconfig --add %{name}
09b7a682 395%service %{name} restart "Nagios service"
fe2307cb 396
1b3d1540
TO
397%preun
398if [ "$1" = "0" ] ; then
fe2307cb 399 %service %{name} stop
1b3d1540
TO
400 /sbin/chkconfig --del %{name}
401fi
402
901d97df 403%pre common
7970ec44 404# rename group netsaint -> nagios
3392dafc 405if [ "$(getgid netsaint 2>/dev/null)" = "72" ]; then
901d97df
ER
406 /usr/sbin/groupmod -n nagios netsaint
407fi
7970ec44 408# rename group nagios-data -> nagcmd
3392dafc 409if [ "$(getgid nagios-data 2>/dev/null)" = "147" ]; then
7970ec44
ER
410 /usr/sbin/groupmod -n nagcmd nagios-data
411fi
901d97df 412%groupadd -g 72 nagios
7970ec44 413%groupadd -g 147 -f nagcmd
3392dafc 414if [ -n "$(id -u netsaint 2>/dev/null)" ] && [ "$(id -u netsaint)" = "72" ]; then
62e44782 415 /usr/sbin/usermod -d %{nagioshome} -l nagios -c "Nagios Daemon" -G nagcmd netsaint
901d97df 416fi
62e44782 417%useradd -u 72 -d %{nagioshome} -s /bin/false -c "Nagios Daemon" -g nagios -G nagcmd nagios
09305d70
ER
418# update nagios user home
419home=$(IFS=:; set -- $(getent passwd nagios); echo $6)
420if [ "$home" != %{nagioshome} ]; then
421 /usr/sbin/usermod -d %{nagioshome} nagios
422fi
901d97df
ER
423
424%postun common
4b3055f2 425if [ "$1" = "0" ]; then
56d92939 426 %userremove nagios
427 %groupremove nagios
7970ec44 428 %groupremove nagcmd
4b3055f2 429fi
430
7441a39b 431%post cgi
156a07c5
ER
432if [ "$1" = 1 ]; then
433%banner %{name} -e <<EOF
434NOTE:
31f3ed2f 435You need to add user to %{_webapps}/%{_webapp}/passwd and
fe2307cb 436%{_webapps}/%{_webapp}/group to access Nagios via web.
156a07c5
ER
437
438EOF
439fi
440
91b73a43 441%triggerin cgi -- apache1 < 1.3.37-3, apache1-base
7970ec44 442%addusertogroup http nagcmd
31f3ed2f 443%webapp_register apache %{_webapp}
26c807b6 444
91b73a43 445%triggerun cgi -- apache1 < 1.3.37-3, apache1-base
31f3ed2f 446%webapp_unregister apache %{_webapp}
26c807b6 447
218b60a4 448%triggerin cgi -- apache < 2.2.0, apache-base
7970ec44 449%addusertogroup http nagcmd
31f3ed2f 450%webapp_register httpd %{_webapp}
26c807b6 451
218b60a4 452%triggerun cgi -- apache < 2.2.0, apache-base
31f3ed2f 453%webapp_unregister httpd %{_webapp}
156a07c5 454
e785f9d9 455%triggerin cgi -- lighttpd
7970ec44 456%addusertogroup lighttpd nagcmd
e785f9d9
ER
457%webapp_register lighttpd %{_webapp}
458
459%triggerun cgi -- lighttpd
460%webapp_unregister lighttpd %{_webapp}
461
156a07c5
ER
462%triggerpostun -- nagios-cgi < 2.0-0.b3.21
463chown root:http %{_sysconfdir}/cgi.cfg
464
e56088ed 465%triggerpostun -- nagios < 3.1.2-4
fdea6415 466# restore lost files
53326298 467for a in dependencies.cfg services.cfg serviceextinfo.cfg hosts.cfg hostgroups.cfg hostextinfo.cfg escalations.cfg checkcommands.cfg misccommands.cfg; do
fdea6415
ER
468 if [ -f %{_sysconfdir}/$a.rpmsave -a ! -f %{_sysconfdir}/$a ]; then
469 mv -f %{_sysconfdir}/$a{.rpmsave,}
31f3ed2f
ER
470 fi
471done
c80fbcb2 472%{__sed} -i -e 's,^check_result_path=.*,check_result_path=%{_var}/spool/%{name}/checkresults,' %{_sysconfdir}/%{name}.cfg
31f3ed2f 473
09305d70
ER
474
475%triggerpostun -- nagios-common < 4.0.8-2.2
476%banner -e %{name}-common <<EOF
477
478IMPORTANT: nagios user home changed to %{nagioshome}, you may need to move files from previous location %{_libdir}/%{name}.
479
480EOF
481
1b3d1540
TO
482%files
483%defattr(644,root,root,755)
156a07c5 484%doc Changelog README* UPGRADING INSTALLING LICENSE
9ac20a2e 485%attr(750,root,nagios) %dir %{_sysconfdir}/objects
3392dafc
ER
486
487# leave main nagios config readable for -cgi.
c80fbcb2 488%attr(640,root,nagcmd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.cfg
3392dafc
ER
489
490%attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/commands.cfg
491%attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/contactgroups.cfg
492%attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/contacts.cfg
493%attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/resource.cfg
494%attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/templates.cfg
495%attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/timeperiods.cfg
156a07c5 496
3f16fe73 497%attr(754,root,root) /etc/rc.d/init.d/%{name}
156a07c5
ER
498%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
499
708a261e
ER
500%attr(755,root,root) %{_sbindir}/%{name}
501%attr(755,root,root) %{_sbindir}/nagiostats
fcd029a6 502%dir %{_libdir}/%{name}/brokers
156a07c5 503
7970ec44
ER
504%attr(770,root,nagcmd) %dir %{_var}/log/%{name}
505%attr(770,root,nagcmd) %dir %{_var}/log/%{name}/archives
156a07c5 506
7970ec44
ER
507%attr(770,root,nagcmd) %dir %{_localstatedir}
508%attr(2770,root,nagcmd) %dir %{_localstatedir}/rw
c80fbcb2 509%attr(660,nagios,nagcmd) %ghost %{_localstatedir}/rw/%{name}.cmd
86568aa8 510%attr(660,nagios,nagcmd) %ghost %{_localstatedir}/rw/%{name}.qh
3e125558 511%attr(664,root,nagios) %ghost %{_localstatedir}/objects.cache
19cc8e59 512%attr(664,root,nagios) %ghost %{_localstatedir}/objects.precache
3e125558
ER
513%attr(664,root,nagios) %ghost %{_localstatedir}/*.dat
514%attr(664,root,nagios) %ghost %{_localstatedir}/%{name}.tmp
e6b8c4d6 515%attr(664,root,nagios) %ghost %{_localstatedir}/%{name}.pid
156a07c5 516
7e556525 517%attr(770,root,nagcmd) %dir %{_var}/spool/%{name}/checkresults
3d336594 518
156a07c5
ER
519%{_examplesdir}/%{name}-%{version}
520
901d97df
ER
521%files common
522%defattr(644,root,root,755)
7970ec44 523%attr(750,root,nagcmd) %dir %{_sysconfdir}
1e0c0567 524%attr(750,root,nagios) %dir %{_sysconfdir}/plugins
bb3c33b3 525%attr(750,root,nagios) %dir %{_sysconfdir}/nrpe.d
901d97df
ER
526%dir %{_libdir}/%{name}
527%dir %{_libdir}/%{name}/plugins
156a07c5 528%dir %{_libdir}/%{name}/eventhandlers
1b3d1540 529
4a5ea7ae
ER
530%if "%{_lib}" != "lib"
531%dir %{_prefix}/lib/%{name}
532%dir %{_prefix}/lib/%{name}/plugins
533%dir %{_prefix}/lib/%{name}/eventhandlers
534%endif
535
7e556525 536%attr(770,root,nagcmd) %dir %{_var}/spool/%{name}
2ea9f2fa 537
4f43d0aa
ER
538%files mrtggraphs
539%defattr(644,root,root,755)
540%config(noreplace) %verify(not md5 mtime size) /etc/mrtg/conf.d/%{name}.cfg
541
ea02e8bf 542%if %{with doc}
bf60adae
ER
543%files doc
544%defattr(644,root,root,755)
545%{_docdir}/%{name}
ea02e8bf 546%endif
bf60adae 547
1b3d1540
TO
548%files cgi
549%defattr(644,root,root,755)
31f3ed2f
ER
550%dir %attr(750,root,http) %{_webapps}/%{_webapp}
551%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/apache.conf
552%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/httpd.conf
e785f9d9 553%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/lighttpd.conf
31f3ed2f
ER
554%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/cgi.cfg
555%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/passwd
556%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/group
708a261e
ER
557%dir %{cgidir}
558%attr(755,root,root) %{cgidir}/*.cgi
559
560%dir %{htmldir}
561%dir %{htmldir}/includes
562%dir %{htmldir}/images
563%dir %{htmldir}/stylesheets
564%{htmldir}/robots.txt
565%{htmldir}/contexthelp
fa363e1f 566%{htmldir}/jsonquery.html
708a261e
ER
567%{htmldir}/media
568%{htmldir}/ssi
569%{htmldir}/images/favicon.ico
570%{htmldir}/images/marker.png
571%{htmldir}/images/shadow50.png
4e60ae1d 572%{htmldir}/nagioswall.php
20145354 573
b51ad6f6 574%{htmldir}/angularjs
667f6304 575%{htmldir}/bootstrap-3.3.7
b51ad6f6
ER
576%{htmldir}/d3
577%{htmldir}/spin
578%{htmldir}/graph-header.html
579%{htmldir}/histogram-form.html
580%{htmldir}/histogram-graph.html
581%{htmldir}/histogram-links.html
582%{htmldir}/histogram.html
583%{htmldir}/infobox.html
584%{htmldir}/map-directive.html
585%{htmldir}/map-form.html
586%{htmldir}/map-links.html
587%{htmldir}/map-popup.html
588%{htmldir}/trends-form.html
589%{htmldir}/trends-graph.html
590%{htmldir}/trends-host-yaxis.html
591%{htmldir}/trends-links.html
592%{htmldir}/trends-service-yaxis.html
593%{htmldir}/trends.html
594
a10f2ff5 595%files theme-classicui
20145354 596%defattr(644,root,root,755)
66a71233 597%exclude %{htmldir}/nagioswall.php
708a261e
ER
598%{htmldir}/*.php
599%{htmldir}/includes/*
600%{htmldir}/images/*
601%exclude %{htmldir}/images/favicon.ico
602%exclude %{htmldir}/images/marker.png
603%exclude %{htmldir}/images/shadow50.png
604%{htmldir}/stylesheets/*
1b3d1540 605
a10f2ff5
ER
606%files theme-default
607%defattr(644,root,root,755)
608
1b3d1540
TO
609%files devel
610%defattr(644,root,root,755)
611%dir %{_includedir}/%{name}
612%{_includedir}/%{name}/*.h
442ef855
ER
613%{_includedir}/%{name}/lib
614%{_libdir}/libnagios.a
This page took 0.319547 seconds and 4 git commands to generate.