]>
Commit | Line | Data |
---|---|---|
03d5d122 ER |
1 | # TODO |
2 | # - /var/log/nagios/archives -> /var/log/archive/nagios | |
c2fe0fab | 3 | # |
b21411a3 | 4 | # Conditional build: |
e1f9e4d5 | 5 | %bcond_without gd # without statusmap and trends, which require gd library |
8c8f3904 AM |
6 | # reeenable when http://tracker.nagios.org/view.php?id=51 is fixed |
7 | %bcond_with tests | |
03d5d122 | 8 | |
1b3d1540 | 9 | Summary: Host/service/network monitoring program |
a02dfee5 ER |
10 | Summary(pl.UTF-8): Program do monitorowania serwerów/usług/sieci |
11 | Summary(pt_BR.UTF-8): Programa para monitoração de máquinas e serviços | |
1b3d1540 | 12 | Name: nagios |
492b6411 | 13 | Version: 3.2.3 |
7116ea37 | 14 | Release: 2 |
ab40d60f | 15 | License: GPL v2+ |
1b3d1540 | 16 | Group: Networking |
3392dafc | 17 | Source0: http://downloads.sourceforge.net/nagios/%{name}-%{version}.tar.gz |
492b6411 | 18 | # Source0-md5: fe1be46e6976a52acdb021a782b5d04b |
1b3d1540 TO |
19 | Source1: %{name}-apache.conf |
20 | Source2: %{name}.init | |
156a07c5 | 21 | Source3: %{name}.sysconfig |
9c387eb0 ER |
22 | Source4: %{name}-config-20090914.tar.bz2 |
23 | # Source4-md5: 605f1cd28c00db961dad6f529d849f16 | |
24 | Source5: %{name}-lighttpd.conf | |
455492e8 ER |
25 | Source6: http://www.google.com/mapfiles/shadow50.png |
26 | # Source6-md5: eff99f302f21b95a900d321743fce72b | |
27 | Source7: http://www.google.com/mapfiles/marker.png | |
28 | # Source7-md5: edefef4bdfc29e1c953694651f05b466 | |
29 | Source8: googlemap.js | |
b24b4667 ER |
30 | Patch0: %{name}-resources.patch |
31 | Patch1: %{name}-iconv-in-libc.patch | |
19670bc2 | 32 | Patch2: %{name}-webapps.patch |
f29ace4f | 33 | Patch3: %{name}-cgi-http_charset.patch |
d39e610a | 34 | Patch4: %{name}-cmd-typo.patch |
4af19791 | 35 | Patch5: config.patch |
3392dafc | 36 | Patch6: %{name}-googlemap.patch |
7116ea37 | 37 | Patch7: nagios-doc-usermacros.patch |
1b3d1540 | 38 | URL: http://www.nagios.org/ |
14ddd08f JB |
39 | BuildRequires: autoconf |
40 | BuildRequires: automake | |
86522331 AG |
41 | %if %{with gd} |
42 | BuildRequires: gd-devel | |
43 | BuildRequires: libjpeg-devel | |
44 | BuildRequires: libpng-devel | |
45 | %endif | |
d4363d96 | 46 | BuildRequires: rpmbuild(macros) >= 1.268 |
bc56720c | 47 | BuildRequires: sed >= 4.0 |
8a91cf36 | 48 | Requires(post,preun): /sbin/chkconfig |
bc56720c | 49 | Requires: %{name}-common = %{version}-%{release} |
d4363d96 ER |
50 | Requires: rc-scripts |
51 | Requires: sh-utils | |
f77e54ce | 52 | Suggests: nagios-notify >= 0.13 |
3392dafc ER |
53 | Suggests: nagios-plugin-check_load |
54 | Suggests: nagios-plugin-check_ping | |
55 | Suggests: nagios-plugins | |
f0724323 | 56 | Provides: nagios-core |
1b3d1540 | 57 | Obsoletes: netsaint |
d4363d96 | 58 | Conflicts: iputils-ping < 1:ss020124 |
56d92939 | 59 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
1b3d1540 | 60 | |
e1f9e4d5 JB |
61 | %define _sysconfdir /etc/%{name} |
62 | %define _bindir %{_prefix}/sbin | |
63 | %define _sbindir %{_libdir}/%{name}/cgi | |
64 | %define _datadir %{_prefix}/share/%{name} | |
65 | %define _localstatedir /var/lib/%{name} | |
31f3ed2f ER |
66 | %define _webapps /etc/webapps |
67 | %define _webapp %{name} | |
a9824b3a | 68 | |
1b3d1540 TO |
69 | %description |
70 | Nagios is a program that will monitor hosts and services on your | |
71 | network. It has the ability to email or page you when a problem arises | |
0cf1a114 TO |
72 | and when a problem is resolved. Nagios is written in C and is designed |
73 | to run under Linux (and some other *NIX variants) as a background | |
74 | process, intermittently running checks on various services that you | |
75 | specify. | |
1b3d1540 TO |
76 | |
77 | The actual service checks are performed by separate "plugin" programs | |
78 | which return the status of the checks to Nagios. The plugins are | |
79 | available in nagios-plugins packages. | |
80 | ||
924840b9 TO |
81 | Nagios is successor to NetSaint. |
82 | ||
eb034f05 JR |
83 | %description -l pl.UTF-8 |
84 | Nagios to program, który monitoruje serwery oraz usługi w naszej | |
85 | sieci. Posiada on możliwość wysyłania informacji o wystąpieniu oraz | |
86 | rozwiązaniu problemu. Nagios został napisany w C oraz jest | |
87 | zaprojektowany do pracy pod Linuksem (i niektórymi innymi uniksami) | |
88 | jako proces pracujący w tle i bezustannie wykonujący pewne operacje | |
89 | sprawdzające. | |
1b3d1540 | 90 | |
eb034f05 JR |
91 | Właściwe sprawdzanie jest wykonywane przez osobne programy |
92 | ("wtyczki"), które zwracają informacje o statusie do Nagiosa. Wtyczki | |
93 | są dostępne na stronie w pakietach nagios-plugins. | |
1b3d1540 | 94 | |
eb034f05 | 95 | Nagios jest następcą NetSainta. |
924840b9 | 96 | |
eb034f05 JR |
97 | %description -l pt_BR.UTF-8 |
98 | O Nagios é um programa que monitora máquinas e serviços na sua rede. | |
1b3d1540 | 99 | Ele pode enviar um email ou um aviso de pager para o administrador |
eb034f05 | 100 | quando surgir um problema e quando ele for resolvido. Nagios é escrito |
0cf1a114 | 101 | em C e foi desenvolvido para rodar em plataformas Linux (e algumas |
eb034f05 JR |
102 | variações de *NIX) como um processo em segundo plano, periodicamente |
103 | executando checagens nos diversos serviços que forem especificados. | |
1b3d1540 | 104 | |
901d97df ER |
105 | %package common |
106 | Summary: Common files needed by both nagios and nrpe | |
a02dfee5 | 107 | Summary(pl.UTF-8): Wspólne pliki wymagane zarówno przez nagiosa jak i nrpe |
901d97df | 108 | Group: Networking |
d4363d96 ER |
109 | Requires(postun): /usr/sbin/groupdel |
110 | Requires(postun): /usr/sbin/userdel | |
901d97df | 111 | Requires(pre): /bin/id |
d4363d96 | 112 | Requires(pre): /usr/bin/getgid |
901d97df ER |
113 | Requires(pre): /usr/sbin/groupadd |
114 | Requires(pre): /usr/sbin/groupmod | |
115 | Requires(pre): /usr/sbin/useradd | |
116 | Requires(pre): /usr/sbin/usermod | |
7970ec44 | 117 | Provides: group(nagcmd) |
f77e54ce | 118 | Provides: group(nagios) |
d4363d96 | 119 | Provides: user(nagios) |
901d97df ER |
120 | |
121 | %description common | |
122 | Common files needed by both nagios and nrpe. | |
123 | ||
eb034f05 JR |
124 | %description common -l pl.UTF-8 |
125 | Wspólne pliki wymagane zarówno przez nagiosa jak i nrpe. | |
bee7c8ea | 126 | |
1b3d1540 TO |
127 | %package cgi |
128 | Summary: CGI webinterface for Nagios | |
a02dfee5 | 129 | Summary(pl.UTF-8): Interfejs WWW/CGI dla Nagiosa |
7c33b67a | 130 | Group: Applications/WWW |
bf60adae | 131 | # for dirs... and accessing local logs, nagios config |
4a3af0fb | 132 | Requires: %{name} = %{version}-%{release} |
1bbdd399 | 133 | Requires: %{name}-imagepaks |
20145354 | 134 | Requires: %{name}-theme |
156a07c5 | 135 | Requires: group(http) |
d4363d96 | 136 | Requires: webapps |
e785f9d9 | 137 | Requires: webserver |
111ce231 | 138 | Requires: webserver(access) |
e785f9d9 ER |
139 | Requires: webserver(alias) |
140 | Requires: webserver(auth) | |
141 | Requires: webserver(cgi) | |
142 | Requires: webserver(indexfile) | |
bf60adae | 143 | Suggests: %{name}-doc |
1b3d1540 TO |
144 | |
145 | %description cgi | |
0964d76f JB |
146 | CGI webinterface for Nagios. |
147 | ||
eb034f05 | 148 | %description cgi -l pl.UTF-8 |
0964d76f | 149 | Interfejs CGI dla Nagiosa. |
1b3d1540 | 150 | |
bf60adae ER |
151 | %package doc |
152 | Summary: HTML Documentation for Nagios | |
153 | Group: Documentation | |
154 | # does not require base | |
155 | ||
156 | %description doc | |
157 | HTML Documentation for Nagios. | |
158 | ||
20145354 ER |
159 | %package theme-default |
160 | Summary: Default Nagios theme | |
a02dfee5 | 161 | Summary(pl.UTF-8): Domyślny motyw Nagiosa |
7c33b67a | 162 | Group: Applications/WWW |
73072fcf | 163 | Requires: nagios-cgi = %{version}-%{release} |
fdea6415 | 164 | Requires: webserver(php) |
60238ce7 JB |
165 | Provides: nagios-theme |
166 | Obsoletes: nagios-theme | |
20145354 ER |
167 | |
168 | %description theme-default | |
169 | Original theme from Nagios. | |
170 | ||
eb034f05 | 171 | %description theme-default -l pl.UTF-8 |
60238ce7 JB |
172 | Oryginalny motyw z Nagiosa. |
173 | ||
1b3d1540 | 174 | %package devel |
e5fcc454 | 175 | Summary: Include files that Nagios-related applications may compile against |
a02dfee5 ER |
176 | Summary(pl.UTF-8): Pliki nagłówkowe, wykorzystywane przez aplikacje nagiosa |
177 | Summary(pt_BR.UTF-8): Arquivos de cabeçalho necessários para desenvolvimento de aplicativos para o Nagios | |
1b3d1540 | 178 | Group: Development/Libraries |
e1f9e4d5 | 179 | # doesn't require base |
1b3d1540 TO |
180 | |
181 | %description devel | |
e5fcc454 | 182 | This package provides include files that Nagios-related applications |
1b3d1540 TO |
183 | may compile against. |
184 | ||
eb034f05 JR |
185 | %description devel -l pl.UTF-8 |
186 | Ten pakiet dostarcza pliki nagłówkowe, które mogą być wykorzystywane | |
187 | przez aplikacje związane z nagiosem podczas kompilacji. | |
1b3d1540 | 188 | |
eb034f05 JR |
189 | %description devel -l pt_BR.UTF-8 |
190 | Este pacote contém arquivos de cabeçalho usados no desenvolvimento de | |
1b3d1540 TO |
191 | aplicativos para o Nagios. |
192 | ||
193 | %prep | |
9c387eb0 | 194 | %setup -q -a4 |
b24b4667 ER |
195 | %patch0 -p0 |
196 | %patch1 -p1 | |
4a3af0fb | 197 | %patch2 -p1 |
f29ace4f | 198 | %patch3 -p1 |
d39e610a | 199 | %patch4 -p1 |
744a134f | 200 | %patch5 -p1 |
455492e8 | 201 | %patch6 -p1 |
7116ea37 | 202 | %patch7 -p1 |
156a07c5 | 203 | |
6e193622 | 204 | find -name .cvsignore -o -name .gitignore | xargs rm |
fdea6415 ER |
205 | |
206 | mv nagios-config-*/objects/*.cfg sample-config/template-object | |
207 | mv nagios-config-*/*.cfg sample-config | |
208 | ||
af765cf5 ER |
209 | # cleanup backups after patching |
210 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
211 | ||
156a07c5 ER |
212 | sed -i -e ' |
213 | s,".*/var/rw/nagios.cmd,"%{_localstatedir}/rw/nagios.cmd, | |
214 | s,".*/libexec/eventhandlers,"%{_libdir}/%{name}/eventhandlers, | |
215 | ' $(find contrib/eventhandlers -type f) | |
1b3d1540 | 216 | |
078e0b6e | 217 | sed -e 's,%{_prefix}/lib/,%{_libdir}/,' %{SOURCE1} > apache.conf |
9c387eb0 | 218 | sed -e 's,%{_prefix}/lib/,%{_libdir}/,' %{SOURCE5} > lighttpd.conf |
078e0b6e | 219 | |
744a134f ER |
220 | # fixup cgi config |
221 | %{__sed} -i -e ' | |
222 | # kill trailing spaces | |
223 | s, \+$,, | |
224 | # use real paths | |
225 | s,/usr/local/nagios/share,@datadir@,g | |
226 | # we want all authorized users have default access | |
227 | s,=nagiosadmin,=*,g | |
4af19791 | 228 | ' sample-config/*.cfg.in |
744a134f | 229 | |
1b3d1540 | 230 | %build |
156a07c5 | 231 | cp -f /usr/share/automake/config.sub . |
a9824b3a TO |
232 | %{__aclocal} |
233 | %{__autoconf} | |
234 | %configure \ | |
b654dd87 | 235 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ |
1b3d1540 TO |
236 | --with-nagios-user=%{name} \ |
237 | --with-nagios-grp=%{name} \ | |
156a07c5 ER |
238 | --with-command-user=%{name} \ |
239 | --with-command-grp=%{name} \ | |
240 | --with-lockfile=%{_localstatedir}/%{name}.pid \ | |
e56088ed | 241 | --with-checkresult-dir=%{_var}/spool/%{name}/checkresults \ |
0964d76f | 242 | --with-ping_command='/bin/ping -n %%s -c %%d' \ |
8c8f3904 AM |
243 | %{!?with_gd:--disable-statusmap --disable-trends} \ |
244 | %{?with_tests:--enable-libtap} \ | |
245 | --enable-event-broker | |
1b3d1540 TO |
246 | |
247 | %{__make} all | |
248 | ||
8c8f3904 AM |
249 | %{?with_tests:%{__make} test} |
250 | ||
1b3d1540 TO |
251 | %install |
252 | rm -rf $RPM_BUILD_ROOT | |
4a5ea7ae ER |
253 | install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_webapps}/%{_webapp}} \ |
254 | $RPM_BUILD_ROOT{%{_var}/log/%{name}/archives,%{_localstatedir}/rw} \ | |
fdea6415 | 255 | $RPM_BUILD_ROOT%{_sysconfdir}/{plugins,objects} \ |
4a5ea7ae ER |
256 | $RPM_BUILD_ROOT%{_libdir}/%{name}/{eventhandlers,plugins} \ |
257 | %if "%{_lib}" != "lib" | |
258 | $RPM_BUILD_ROOT%{_prefix}/lib/%{name}/{eventhandlers,plugins} \ | |
259 | %endif | |
1b3d1540 | 260 | |
4a5ea7ae | 261 | install -d $RPM_BUILD_ROOT%{_includedir}/%{name} |
6e193622 | 262 | cp -a include/*.h $RPM_BUILD_ROOT%{_includedir}/%{name} |
1b3d1540 | 263 | |
aca04140 | 264 | %{__make} install-unstripped \ |
1b3d1540 TO |
265 | DESTDIR=$RPM_BUILD_ROOT \ |
266 | INSTALL_OPTS="" \ | |
267 | INIT_OPTS="" \ | |
268 | COMMAND_OPTS="" | |
269 | ||
6e193622 ER |
270 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
271 | cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name} | |
156a07c5 ER |
272 | |
273 | # install templated configuration files | |
fdea6415 ER |
274 | for a in nagios.cfg resource.cfg commands.cfg contactgroups.cfg contacts.cfg templates.cfg timeperiods.cfg; do |
275 | cp -a sample-config/$a $RPM_BUILD_ROOT%{_sysconfdir} | |
276 | done | |
c0350ebc | 277 | |
31f3ed2f | 278 | # webserver files |
6e193622 ER |
279 | cp -a apache.conf $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf |
280 | cp -a apache.conf $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf | |
281 | cp -a lighttpd.conf $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/lighttpd.conf | |
744a134f | 282 | cp -a sample-config/cgi.cfg $RPM_BUILD_ROOT%{_webapps}/%{_webapp} |
455492e8 ER |
283 | cp -a %{SOURCE6} $RPM_BUILD_ROOT%{_datadir}/images |
284 | cp -a %{SOURCE7} $RPM_BUILD_ROOT%{_datadir}/images | |
285 | cp -a %{SOURCE8} $RPM_BUILD_ROOT%{_datadir}/images | |
31f3ed2f ER |
286 | > $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/passwd |
287 | echo 'nagios:' > $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/group | |
156a07c5 | 288 | |
fdea6415 | 289 | # install event handlers, sample config |
4a5ea7ae | 290 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
156a07c5 | 291 | cp -a contrib/eventhandlers $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
fdea6415 ER |
292 | cp -a sample-config $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
293 | find $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} -name '*.in' | xargs rm | |
156a07c5 ER |
294 | |
295 | # Object data/cache files | |
19cc8e59 | 296 | for i in {objects.{cache,precache},{comments,downtime,retention,status}.dat,nagios.tmp}; do |
156a07c5 | 297 | > $RPM_BUILD_ROOT%{_localstatedir}/$i |
b0a1a45f | 298 | done |
156a07c5 | 299 | > $RPM_BUILD_ROOT%{_localstatedir}/rw/nagios.cmd |
e58661fb | 300 | |
bf60adae ER |
301 | install -d $RPM_BUILD_ROOT%{_docdir}/%{name} |
302 | mv $RPM_BUILD_ROOT{%{_datadir}/docs/*,%{_docdir}/%{name}} | |
303 | ||
1b3d1540 TO |
304 | %clean |
305 | rm -rf $RPM_BUILD_ROOT | |
306 | ||
1b3d1540 | 307 | %post |
19cc8e59 | 308 | for i in %{_localstatedir}/{objects.{cache,precache},{comments,downtime,retention,status}.dat}; do |
156a07c5 ER |
309 | [ ! -f $i ] && touch $i |
310 | chown root:nagios $i | |
311 | chmod 664 $i | |
312 | done | |
313 | ||
fe2307cb | 314 | /sbin/chkconfig --add %{name} |
09b7a682 | 315 | %service %{name} restart "Nagios service" |
fe2307cb | 316 | |
1b3d1540 TO |
317 | %preun |
318 | if [ "$1" = "0" ] ; then | |
fe2307cb | 319 | %service %{name} stop |
1b3d1540 TO |
320 | /sbin/chkconfig --del %{name} |
321 | fi | |
322 | ||
901d97df | 323 | %pre common |
7970ec44 | 324 | # rename group netsaint -> nagios |
3392dafc | 325 | if [ "$(getgid netsaint 2>/dev/null)" = "72" ]; then |
901d97df ER |
326 | /usr/sbin/groupmod -n nagios netsaint |
327 | fi | |
7970ec44 | 328 | # rename group nagios-data -> nagcmd |
3392dafc | 329 | if [ "$(getgid nagios-data 2>/dev/null)" = "147" ]; then |
7970ec44 ER |
330 | /usr/sbin/groupmod -n nagcmd nagios-data |
331 | fi | |
901d97df | 332 | %groupadd -g 72 nagios |
7970ec44 | 333 | %groupadd -g 147 -f nagcmd |
3392dafc | 334 | if [ -n "$(id -u netsaint 2>/dev/null)" ] && [ "$(id -u netsaint)" = "72" ]; then |
7970ec44 | 335 | /usr/sbin/usermod -d %{_libdir}/nagios -l nagios -c "Nagios Daemon" -G nagcmd netsaint |
901d97df | 336 | fi |
7970ec44 | 337 | %useradd -u 72 -d %{_libdir}/nagios -s /bin/false -c "Nagios Daemon" -g nagios -G nagcmd nagios |
901d97df ER |
338 | |
339 | %postun common | |
4b3055f2 | 340 | if [ "$1" = "0" ]; then |
56d92939 | 341 | %userremove nagios |
342 | %groupremove nagios | |
7970ec44 | 343 | %groupremove nagcmd |
4b3055f2 | 344 | fi |
345 | ||
7441a39b | 346 | %post cgi |
156a07c5 ER |
347 | if [ "$1" = 1 ]; then |
348 | %banner %{name} -e <<EOF | |
349 | NOTE: | |
31f3ed2f | 350 | You need to add user to %{_webapps}/%{_webapp}/passwd and |
fe2307cb | 351 | %{_webapps}/%{_webapp}/group to access Nagios via web. |
156a07c5 ER |
352 | |
353 | EOF | |
354 | fi | |
355 | ||
91b73a43 | 356 | %triggerin cgi -- apache1 < 1.3.37-3, apache1-base |
7970ec44 | 357 | %addusertogroup http nagcmd |
31f3ed2f | 358 | %webapp_register apache %{_webapp} |
26c807b6 | 359 | |
91b73a43 | 360 | %triggerun cgi -- apache1 < 1.3.37-3, apache1-base |
31f3ed2f | 361 | %webapp_unregister apache %{_webapp} |
26c807b6 | 362 | |
44abff38 | 363 | %triggerin cgi -- apache < 2.2.0, apache-base |
7970ec44 | 364 | %addusertogroup http nagcmd |
31f3ed2f | 365 | %webapp_register httpd %{_webapp} |
26c807b6 | 366 | |
44abff38 | 367 | %triggerun cgi -- apache < 2.2.0, apache-base |
31f3ed2f | 368 | %webapp_unregister httpd %{_webapp} |
156a07c5 | 369 | |
e785f9d9 | 370 | %triggerin cgi -- lighttpd |
7970ec44 | 371 | %addusertogroup lighttpd nagcmd |
e785f9d9 ER |
372 | %webapp_register lighttpd %{_webapp} |
373 | ||
374 | %triggerun cgi -- lighttpd | |
375 | %webapp_unregister lighttpd %{_webapp} | |
376 | ||
156a07c5 ER |
377 | %triggerpostun -- nagios-cgi < 2.0-0.b3.21 |
378 | chown root:http %{_sysconfdir}/cgi.cfg | |
379 | ||
e56088ed | 380 | %triggerpostun -- nagios < 3.1.2-4 |
fdea6415 | 381 | # restore lost files |
53326298 | 382 | for a in dependencies.cfg services.cfg serviceextinfo.cfg hosts.cfg hostgroups.cfg hostextinfo.cfg escalations.cfg checkcommands.cfg misccommands.cfg; do |
fdea6415 ER |
383 | if [ -f %{_sysconfdir}/$a.rpmsave -a ! -f %{_sysconfdir}/$a ]; then |
384 | mv -f %{_sysconfdir}/$a{.rpmsave,} | |
31f3ed2f ER |
385 | fi |
386 | done | |
e56088ed | 387 | %{__sed} -i -e 's,^check_result_path=.*,check_result_path=%{_var}/spool/%{name}/checkresults,' %{_sysconfdir}/nagios.cfg |
31f3ed2f | 388 | |
1b3d1540 TO |
389 | %files |
390 | %defattr(644,root,root,755) | |
156a07c5 | 391 | %doc Changelog README* UPGRADING INSTALLING LICENSE |
9ac20a2e | 392 | %attr(750,root,nagios) %dir %{_sysconfdir}/objects |
3392dafc ER |
393 | |
394 | # leave main nagios config readable for -cgi. | |
395 | %attr(640,root,nagcmd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nagios.cfg | |
396 | ||
397 | %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/commands.cfg | |
398 | %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/contactgroups.cfg | |
399 | %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/contacts.cfg | |
400 | %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/resource.cfg | |
401 | %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/templates.cfg | |
402 | %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/timeperiods.cfg | |
156a07c5 | 403 | |
3f16fe73 | 404 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
156a07c5 ER |
405 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} |
406 | ||
e1f9e4d5 | 407 | %attr(755,root,root) %{_bindir}/%{name} |
156a07c5 ER |
408 | %attr(755,root,root) %{_bindir}/nagiostats |
409 | ||
7970ec44 ER |
410 | %attr(770,root,nagcmd) %dir %{_var}/log/%{name} |
411 | %attr(770,root,nagcmd) %dir %{_var}/log/%{name}/archives | |
156a07c5 | 412 | |
7970ec44 ER |
413 | %attr(770,root,nagcmd) %dir %{_localstatedir} |
414 | %attr(2770,root,nagcmd) %dir %{_localstatedir}/rw | |
415 | %attr(660,nagios,nagcmd) %ghost %{_localstatedir}/rw/nagios.cmd | |
3e125558 | 416 | %attr(664,root,nagios) %ghost %{_localstatedir}/objects.cache |
19cc8e59 | 417 | %attr(664,root,nagios) %ghost %{_localstatedir}/objects.precache |
3e125558 ER |
418 | %attr(664,root,nagios) %ghost %{_localstatedir}/*.dat |
419 | %attr(664,root,nagios) %ghost %{_localstatedir}/%{name}.tmp | |
156a07c5 | 420 | |
3d336594 | 421 | %dir %{_var}/spool |
f57d3787 | 422 | %attr(770,root,nagios) %dir %{_var}/spool/%{name} |
e56088ed | 423 | %attr(770,root,nagios) %dir %{_var}/spool/%{name}/checkresults |
3d336594 | 424 | |
156a07c5 ER |
425 | %{_examplesdir}/%{name}-%{version} |
426 | ||
901d97df ER |
427 | %files common |
428 | %defattr(644,root,root,755) | |
7970ec44 | 429 | %attr(750,root,nagcmd) %dir %{_sysconfdir} |
1e0c0567 | 430 | %attr(750,root,nagios) %dir %{_sysconfdir}/plugins |
901d97df ER |
431 | %dir %{_libdir}/%{name} |
432 | %dir %{_libdir}/%{name}/plugins | |
156a07c5 | 433 | %dir %{_libdir}/%{name}/eventhandlers |
1b3d1540 | 434 | |
4a5ea7ae ER |
435 | %if "%{_lib}" != "lib" |
436 | %dir %{_prefix}/lib/%{name} | |
437 | %dir %{_prefix}/lib/%{name}/plugins | |
438 | %dir %{_prefix}/lib/%{name}/eventhandlers | |
439 | %endif | |
440 | ||
bf60adae ER |
441 | %files doc |
442 | %defattr(644,root,root,755) | |
443 | %{_docdir}/%{name} | |
444 | ||
1b3d1540 TO |
445 | %files cgi |
446 | %defattr(644,root,root,755) | |
31f3ed2f ER |
447 | %dir %attr(750,root,http) %{_webapps}/%{_webapp} |
448 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/apache.conf | |
449 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/httpd.conf | |
e785f9d9 | 450 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/lighttpd.conf |
31f3ed2f ER |
451 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/cgi.cfg |
452 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/passwd | |
453 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/group | |
156a07c5 ER |
454 | %dir %{_sbindir} |
455 | %attr(755,root,root) %{_sbindir}/*.cgi | |
20145354 ER |
456 | |
457 | %dir %{_datadir} | |
37af85b3 | 458 | %dir %{_datadir}/includes |
73072fcf ER |
459 | %dir %{_datadir}/images |
460 | %dir %{_datadir}/stylesheets | |
20145354 | 461 | %{_datadir}/robots.txt |
73072fcf | 462 | %{_datadir}/contexthelp |
73072fcf ER |
463 | %{_datadir}/media |
464 | %{_datadir}/ssi | |
9c387eb0 | 465 | %{_datadir}/images/favicon.ico |
455492e8 ER |
466 | %{_datadir}/images/marker.png |
467 | %{_datadir}/images/shadow50.png | |
20145354 ER |
468 | |
469 | %files theme-default | |
470 | %defattr(644,root,root,755) | |
37af85b3 AM |
471 | %{_datadir}/*.php |
472 | %{_datadir}/includes/* | |
73072fcf | 473 | %{_datadir}/images/* |
9c387eb0 | 474 | %exclude %{_datadir}/images/favicon.ico |
455492e8 ER |
475 | %exclude %{_datadir}/images/marker.png |
476 | %exclude %{_datadir}/images/shadow50.png | |
73072fcf | 477 | %{_datadir}/stylesheets/* |
1b3d1540 TO |
478 | |
479 | %files devel | |
480 | %defattr(644,root,root,755) | |
481 | %dir %{_includedir}/%{name} | |
482 | %{_includedir}/%{name}/*.h |