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