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