]> TLD Linux GIT Repositories - packages/zabbix.git/blob - zabbix.spec
- web requires php(openssl)
[packages/zabbix.git] / zabbix.spec
1 # TODO:
2 # - initscript for zabbix-server, zabbix-proxy and zabbix-java
3 #
4 # Conditional build:
5 %bcond_without  agent2  # build Zabbix Agent 2
6 %bcond_without  pgsql   # enable PostgreSQL support
7 %bcond_without  sqlite3 # enable sqlite3 support
8 %bcond_without  mysql   # enable MySQL support
9 %bcond_without  java    # disable java support
10
11 %define databases %{?with_sqlite3:sqlite3} %{?with_pgsql:postgresql} %{?with_mysql:mysql}
12 %define any_database %{with pgsql}%{with mysql}%{with sqlite3}
13
14 %define         _noautoreq 'pear(.*\.php)'
15
16 %define         php_min_version 7.2.5
17
18 %ifnarch %{go_arches}
19 %undefine       with_agent2
20 %endif
21
22 %{?with_java:%{?use_default_jdk}}
23
24 Summary:        Zabbix - network monitoring software
25 Summary(pl.UTF-8):      Zabbix - oprogramowanie do monitorowania sieci
26 Name:           zabbix
27 Version:        6.0.25
28 Release:        1
29 License:        GPL v2+
30 Group:          Networking/Utilities
31 Source0:        https://cdn.zabbix.com/zabbix/sources/stable/6.0/%{name}-%{version}.tar.gz
32 # Source0-md5:  510cb7207048414b71b4fecc9aa50b6b
33 Source1:        %{name}-apache.conf
34 Source2:        %{name}_agentd.init
35 Source3:        %{name}_server.init
36 Source4:        %{name}_proxy.init
37 Source5:        %{name}_agent2.init
38 Source6:        %{name}_agent2.sysconfig
39 Patch0:         tld.patch
40 Patch1:         sqlite3_dbname.patch
41 Patch2:         always_compile_ipc.patch
42 Patch3:         agent2.patch
43 Patch4:         go.patch
44 URL:            https://www.zabbix.com/
45 BuildRequires:  OpenIPMI-devel
46 BuildRequires:  autoconf
47 BuildRequires:  automake >= 1:1.15
48 BuildRequires:  curl-devel
49 %{?with_agent2:BuildRequires:   golang >= 1.13}
50 %{?with_java:%buildrequires_jdk}
51 BuildRequires:  libevent-devel
52 BuildRequires:  libssh2-devel
53 BuildRequires:  libtool
54 BuildRequires:  libxml2-devel
55 %{?with_mysql:BuildRequires:    mysql-devel}
56 BuildRequires:  net-snmp-devel
57 BuildRequires:  openldap-devel >= 2.4.6
58 BuildRequires:  openssl-devel >= 0.9.7d
59 BuildRequires:  pcre-devel
60 %{?with_pgsql:BuildRequires:    postgresql-devel}
61 BuildRequires:  rpmbuild(macros) >= 1.671
62 %{?with_java:BuildRequires:     rpm-tld-macros-javaprov}
63 %{?with_sqlite3:BuildRequires:  sqlite3-devel}
64 BuildRequires:  unixODBC-devel
65 BuildRequires:  zlib-devel
66 Requires(postun):       /usr/sbin/groupdel
67 Requires(postun):       /usr/sbin/userdel
68 Requires(pre):  /bin/id
69 Requires(pre):  /usr/bin/getgid
70 Requires(pre):  /usr/sbin/groupadd
71 Requires(pre):  /usr/sbin/useradd
72 Provides:       group(zabbix)
73 Provides:       user(zabbix)
74 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
75
76 %define         _sysconfdir     /etc/%{name}
77 %define         _appdir         %{_datadir}/%{name}
78 %define         _webapps        /etc/webapps
79 %define         _webapp         %{name}
80
81 %description
82 Zabbix is software that monitors numerous parameters of a network and
83 the servers on that network. It is a useful tool for monitoring the
84 health and integrity of servers. Zabbix uses a flexible notification
85 mechanism that allows users to configure email based alerts for
86 virtually any event. All monitored parameters are stored in a
87 database. Zabbix offers excellent reporting and data visualisation
88 features based on the stored data. Zabbix supports both polling and
89 trapping. All Zabbix reports and statistics, as well as configuration
90 parameters, are accessed through a web-based front end.
91
92 %description -l pl.UTF-8
93 Zabbix to oprogramowanie do monitorowania licznych parametrów sieci i
94 serwerów sieciowych. Jest przydatny przy monitorowaniu działania
95 serwerów. Jorzysta z elastycznego mechanizmu powiadamiania, który
96 pozwala użytkownikom konfigurować powiadamianie pocztą elektroniczną
97 dla praktycznie wszelkich zdarzeń. Monitorowane parametry są
98 przechowywane w bazie danych. W oparciu o przechowywane dane Zabbix
99 oferuje świetne raportowanie i funkcje wizualizacji. Wspiera zarówno
100 odpytywanie jak i pułapkowanie. Dostęp do wszystkich raportów i
101 statystyk Zabbixa jest możliwy poprzez interfejs oparty o WWW.
102
103 %package agentd
104 Summary:        Zabbix Agent
105 Summary(pl.UTF-8):      Agenta Zabbixa
106 Group:          Networking/Utilities
107 Requires:       %{name} = %{version}-%{release}
108 Obsoletes:      zabbix-agent-inetd
109 Obsoletes:      zabbix-agent-standalone
110 Requires(post,preun):   /sbin/chkconfig
111 Requires:       rc-scripts
112
113 %description agentd
114 Zabbix agent collects data from the local system for a Zabbix server.
115
116 %description agentd -l pl.UTF-8
117 Agent zbiera dane z lokalnej maszyny dla serwera Zabbix.
118
119 %package agent2
120 Summary:        Zabbix Agent 2
121 Summary(pl.UTF-8):      Agent 2 Zabbixa
122 Group:          Networking/Utilities
123 Requires:       %{name} = %{version}-%{release}
124 Requires(post,preun):   /sbin/chkconfig
125 Requires:       rc-scripts
126
127 %description agent2
128 Zabbix agent collects data from the local system for a Zabbix server.
129
130 %description agent2 -l pl.UTF-8
131 Agent zbiera dane z lokalnej maszyny dla serwera Zabbix.
132
133 %package web
134 Summary:        Web frontend for Zabbix
135 Summary(pl.UTF-8):      Interfejs Web dla Zabbixa
136 Group:          Applications/WWW
137 Requires:       php(bcmath)
138 Requires:       php(core) >= %{php_min_version}
139 Requires:       php(ctype)
140 Requires:       php(gd)
141 Requires:       php(gettext)
142 Requires:       php(json)
143 Requires:       php(mbstring)
144 Requires:       php(openssl)
145 Requires:       php(pcre)
146 Requires:       php(session)
147 Requires:       php(sockets)
148 Requires:       php(xml)
149 Requires:       php(xmlreader)
150 Requires:       php(xmlwriter)
151 Requires:       webapps
152 Requires:       webserver(alias)
153 Requires:       webserver(indexfile)
154 Requires:       webserver(php)
155 Suggests:       php(mysql)
156 Suggests:       php(pgsql)
157 Suggests:       php(sqlite3)
158 # used with sqlite3
159 Suggests:       php(sysvsem)
160 BuildArch:      noarch
161
162 %description web
163 This package provides web based (PHP) frontend for Zabbix.
164
165 %description web -l pl.UTF-8
166 Ten pakiet dostarcza napisany w PHP frontend dla Zabbixa.
167
168 %package proxy
169 Summary:        Zabbix proxy
170 Summary(pl.UTF-8):      Proxy do Zabbixa
171 Group:          Networking/Utilities
172 Requires:       %{name} = %{version}-%{release}
173 Requires:       zabbix-proxy(db) = %{version}-%{release}
174
175 %description proxy
176 This package provides the Zabbix proxy.
177
178 %description proxy -l pl.UTF-8
179 Ten pakiet zawiera proxy Zabbix.
180
181 %package proxy-mysql
182 Summary:        MySQL support for Zabbix proxy
183 Summary(pl.UTF-8):      Obsługa MySQL dla proxy do Zabbixa
184 Group:          Networking/Utilities
185 Provides:       %{name}-proxy(db) = %{version}-%{release}
186 Obsoletes:      zabbix-proxy-postgresql
187 Obsoletes:      zabbix-proxy-sqlite3
188
189 %description proxy-mysql
190 This package provides the Zabbix proxy binary with MySQL support.
191
192 %description proxy-mysql -l pl.UTF-8
193 Ten pakiet zawiera proxy Zabbix z obsługą MySQL.
194
195 %package proxy-postgresql
196 Summary:        PostgreSQL support for Zabbix proxy
197 Summary(pl.UTF-8):      Obsługa PostgreSQL dla proxy do Zabbixa
198 Group:          Networking/Utilities
199 Provides:       %{name}-proxy(db) = %{version}-%{release}
200 Obsoletes:      zabbix-proxy-mysql
201 Obsoletes:      zabbix-proxy-sqlite3
202
203 %description proxy-postgresql
204 This package provides the Zabbix proxy binary with PostgreSQL support.
205
206 %description proxy-postgresql -l pl.UTF-8
207 Ten pakiet zawiera proxy Zabbix z obsługą PostgreSQL.
208
209 %package proxy-sqlite3
210 Summary:        SQLite 3 support for Zabbix proxy
211 Summary(pl.UTF-8):      Obsługa SQLite 3 dla proxy do Zabbixa
212 Group:          Networking/Utilities
213 Provides:       %{name}-proxy(db) = %{version}-%{release}
214 Obsoletes:      zabbix-proxy-mysql
215 Obsoletes:      zabbix-proxy-postgresql
216
217 %description proxy-sqlite3
218 This package provides the Zabbix proxy binary with SQLite 3 support.
219
220 %description proxy-sqlite3 -l pl.UTF-8
221 Ten pakiet zawiera proxy Zabbix z obsługą SQLite 3.
222
223 %package server
224 Summary:        Zabbix server
225 Summary(pl.UTF-8):      Serwer Zabbixa
226 Group:          Networking/Utilities
227 Requires:       %{name} = %{version}-%{release}
228 Requires:       %{name}-server(db) = %{version}-%{release}
229 Obsoletes:      zabbix-suckerd
230 Obsoletes:      zabbix-trapper-inetd
231 Obsoletes:      zabbix-trapper-standalone
232
233 %description server
234 This package provides the Zabbix server.
235
236 %description server -l pl.UTF-8
237 Ten pakiet zawiera serwer Zabbixa.
238
239 %package server-mysql
240 Summary:        MySQL support for Zabbix server
241 Summary(pl.UTF-8):      Obsługa MySQL sla serwera Zabbixa
242 Group:          Networking/Utilities
243 Provides:       %{name}-server(db) = %{version}-%{release}
244 Obsoletes:      zabbix-server-postgresql
245 Obsoletes:      zabbix-server-sqlite3
246
247 %description server-mysql
248 This package provides the Zabbix server binary for use with MySQL
249 database.
250
251 %description server-mysql -l pl.UTF-8
252 Ten pakiet zawiera serwer Zabbixa z obsługą bazy danych MySQL.
253
254 %package server-postgresql
255 Summary:        PostgreSQL support for Zabbix server
256 Summary(pl.UTF-8):      Obsługa PostgreSQL sla serwera Zabbixa
257 Group:          Networking/Utilities
258 Provides:       %{name}-server(db) = %{version}-%{release}
259 Obsoletes:      zabbix-server-mysql
260 Obsoletes:      zabbix-server-sqlite3
261
262 %description server-postgresql
263 This package provides the Zabbix server binary for use with PostgreSQL
264 database.
265
266 %description server-postgresql -l pl.UTF-8
267 Ten pakiet zawiera serwer Zabbixa z obsługą bazy danych PostgreSQL.
268
269 %package java
270 Summary:        Zabbix Java Gateway
271 Group:          Networking/Utilities
272 Requires:       %{name} = %{version}-%{release}
273
274 %description java
275 This package provides the Zabbix Java Gateway.
276
277 %prep
278 %setup -q
279
280 %patch0 -p1
281 %patch1 -p1
282 %patch2 -p1
283 %patch3 -p1
284 %patch4 -p1
285
286 %build
287 %{__libtoolize}
288 %{__aclocal} -I m4
289 %{__autoconf}
290 %{__autoheader}
291 %{__automake}
292
293 configure() {
294         %configure \
295         %{?with_java:ac_cv_prog_JAVAC=%{java_home}/bin/javac} \
296         %{?with_java:ac_cv_prog_JAR=%{java_home}/bin/jar} \
297         --enable-agent \
298         %{__enable_disable agent2} \
299         --enable-ipv6 \
300         %{__enable_disable java} \
301         --with-ldap \
302         --with-libcurl \
303         --with-libevent \
304         --with-libpcre2 \
305         --with-libxml2 \
306         --with-net-snmp \
307         --with-openipmi \
308         --with-openssl \
309         --with-ssh2 \
310         --with-unixodbc \
311         "$@"
312 }
313
314 configure \
315         --disable-server \
316         --disable-proxy
317
318 %{__make}
319
320 for database in %{databases} ; do
321         if [ "$database" = "sqlite3" ] ; then
322                 enable_server=""
323         else
324                 enable_server="--enable-server"
325         fi
326         configure \
327                 --with-$database \
328                 $enable_server \
329                 --enable-proxy
330
331         %{__make}
332
333         if [ "$enable_server" ] ; then
334                 %{__make} install \
335                         -C src/zabbix_server \
336                         DESTDIR=$PWD/install-${database}
337         fi
338
339         %{__make} install \
340                 -C src/zabbix_proxy \
341                 DESTDIR=$PWD/install-${database}
342 done
343
344 %install
345 rm -rf $RPM_BUILD_ROOT
346 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig},/etc/webapps/%{_webapp},%{_appdir}} \
347         $RPM_BUILD_ROOT{/var/run/zabbix,/var/log/zabbix}
348
349 %{__make} install \
350         DESTDIR=$RPM_BUILD_ROOT \
351         ZJG_DEST=$RPM_BUILD_ROOT%{_datadir}/zabbix_java
352
353 for database in %{databases} ; do
354         if [ "$database" != "sqlite3" ] ; then
355                 cp -p install-$database/%{_sbindir}/zabbix_server \
356                         $RPM_BUILD_ROOT%{_sbindir}/zabbix_server-$database
357         fi
358         cp -p install-$database/%{_sbindir}/zabbix_proxy \
359                 $RPM_BUILD_ROOT%{_sbindir}/zabbix_proxy-$database
360 done
361
362 if [ -n "$database" ] ; then
363         ln -sf %{_sbindir}/zabbix_server-$database $RPM_BUILD_ROOT%{_sbindir}/zabbix_server
364         ln -sf %{_sbindir}/zabbix_proxy-$database $RPM_BUILD_ROOT%{_sbindir}/zabbix_proxy
365 fi
366
367 cp -r ui $RPM_BUILD_ROOT%{_appdir}
368
369 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf
370 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf
371
372 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/zabbix_agentd
373 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/zabbix_server
374 install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/zabbix_proxy
375 install %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/zabbix_agent2
376 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/zabbix_agent2
377
378 mv $RPM_BUILD_ROOT%{_appdir}/ui/conf $RPM_BUILD_ROOT%{_sysconfdir}/web
379 ln -s %{_sysconfdir}/web $RPM_BUILD_ROOT%{_appdir}/ui/conf
380 touch $RPM_BUILD_ROOT%{_sysconfdir}/web/zabbix.conf.php
381
382 %if %{with java}
383 mv $RPM_BUILD_ROOT%{_datadir}/zabbix_java/settings.sh $RPM_BUILD_ROOT%{_sysconfdir}/zabbix_java.conf
384 ln -s %{_sysconfdir}/zabbix_java.conf $RPM_BUILD_ROOT%{_datadir}/zabbix_java/settings.sh
385 mv $RPM_BUILD_ROOT%{_datadir}/zabbix_java/lib/logback.xml $RPM_BUILD_ROOT%{_sysconfdir}/java-logback.xml
386 ln -s %{_sysconfdir}/java-logback.xml $RPM_BUILD_ROOT%{_datadir}/zabbix_java/lib/logback.xml
387 mv $RPM_BUILD_ROOT%{_datadir}/zabbix_java/lib/logback-console.xml $RPM_BUILD_ROOT%{_sysconfdir}/java-logback-console.xml
388 ln -s %{_sysconfdir}/java-logback-console.xml $RPM_BUILD_ROOT%{_datadir}/zabbix_java/lib/logback-console.xml
389
390 cat >$RPM_BUILD_ROOT%{_sbindir}/zabbix_java-start <<'EOF'
391 #!/bin/sh
392
393 exec %{_datadir}/zabbix_java/startup.sh "$@"
394 EOF
395
396 cat >$RPM_BUILD_ROOT%{_sbindir}/zabbix_java-stop <<'EOF'
397 #!/bin/sh
398
399 exec %{_datadir}/zabbix_java/shutdown.sh "$@"
400 EOF
401 %endif
402
403 %clean
404 rm -rf $RPM_BUILD_ROOT
405
406 %triggerin web -- apache < 2.2.0, apache-base
407 %webapp_register httpd %{_webapp}
408
409 %triggerun web -- apache < 2.2.0, apache-base
410 %webapp_unregister httpd %{_webapp}
411
412 %pre
413 %groupadd -g 111 zabbix
414 %useradd -d / -u 111 -g zabbix -c "Zabbix User" -s /bin/false zabbix
415 %addusertogroup -q zabbix proc
416
417 %postun
418 if [ "$1" = "0" ]; then
419         %userremove zabbix
420         %groupremove zabbix
421 fi
422
423 %post server-mysql
424 if [ "$1" = 1 ]; then
425         %banner -e %{name}-server <<-EOF
426         You should create database for Zabbix.
427
428         Running these should be fine in most cases:
429
430         mysqladmin create zabbix
431         cat %{_docdir}/%{name}-server-mysql-%{version}/schema.sql | mysql zabbix
432         cat %{_docdir}/%{name}-server-mysql-%{version}/images.sql | mysql zabbix
433         cat %{_docdir}/%{name}-server-mysql-%{version}/data.sql | mysql zabbix
434 EOF
435 fi
436 ln -sf %{_sbindir}/zabbix_server-mysql %{_sbindir}/zabbix_server || :
437
438 %post server-postgresql
439 if [ "$1" = 1 ]; then
440         %banner -e %{name}-server <<-EOF
441         You should create database for Zabbix.
442
443         Running these should be fine in most cases:
444
445         createuser -U postgres zabbix
446         createdb -U postgres -O zabbix zabbix
447         cat %{_docdir}/%{name}-server-postgresql-%{version}/schema.sql | psql -U zabbix zabbix
448         cat %{_docdir}/%{name}-server-postgresql-%{version}/images.sql | psql -U zabbix zabbix
449         cat %{_docdir}/%{name}-server-postgresql-%{version}/data.sql | psql -U zabbix zabbix
450 EOF
451 fi
452 ln -sf %{_sbindir}/zabbix_server-postgresql %{_sbindir}/zabbix_server || :
453
454 %post server
455 /sbin/chkconfig --add zabbix_server
456 %service zabbix_server restart
457
458 %postun server
459 if [ "$1" = "0" ]; then
460         %service -q zabbix_server stop
461         /sbin/chkconfig --del zabbix_server
462 fi
463 if [ "$1" = "0" ]; then
464         if [ -L %{_sbindir}/zabbix_server ] ; then
465                 rm -f %{_sbindir}/zabbix_server || :
466         fi
467 fi
468
469 %post agentd
470 /sbin/chkconfig --add zabbix_agentd
471 %service zabbix_agentd restart
472
473 %preun agentd
474 if [ "$1" = "0" ]; then
475         %service -q zabbix_agentd stop
476         /sbin/chkconfig --del zabbix_agentd
477 fi
478
479 %post agent2
480 /sbin/chkconfig --add zabbix_agent2
481 %service zabbix_agent2 restart
482
483 %preun agent2
484 if [ "$1" = "0" ]; then
485         %service -q zabbix_agent2 stop
486         /sbin/chkconfig --del zabbix_agent2
487 fi
488
489 %post proxy-mysql
490 ln -sf %{_sbindir}/zabbix_proxy-mysql %{_sbindir}/zabbix_proxy || :
491
492 %post proxy-postgresql
493 ln -sf %{_sbindir}/zabbix_proxy-postgresql %{_sbindir}/zabbix_proxy || :
494
495 %post proxy-sqlite3
496 ln -sf %{_sbindir}/zabbix_proxy-sqlite3 %{_sbindir}/zabbix_proxy || :
497
498 %post proxy
499 /sbin/chkconfig --add zabbix_server
500 %service zabbix_server restart
501
502 %postun proxy
503 if [ "$1" = "0" ]; then
504         %service -q zabbix_proxy stop
505         /sbin/chkconfig --del zabbix_proxy
506 fi
507 if [ "$1" = "0" ]; then
508         if [ -L %{_sbindir}/zabbix_proxy ] ; then
509                 rm -f %{_sbindir}/zabbix_proxy || :
510         fi
511 fi
512
513 %files
514 %defattr(644,root,root,755)
515 %doc AUTHORS ChangeLog README
516 %attr(755,root,root) %{_bindir}/zabbix_get
517 %attr(755,root,root) %{_bindir}/zabbix_js
518 %attr(755,root,root) %{_bindir}/zabbix_sender
519 %attr(751,root,zabbix) %dir %{_sysconfdir}
520 %attr(751,root,http) %dir %{_sysconfdir}/web
521 %dir %{_appdir}
522 %dir %attr(770,root,zabbix) /var/run/zabbix
523 %dir %attr(775,root,zabbix) /var/log/zabbix
524 %{_mandir}/man1/zabbix_get*
525 %{_mandir}/man1/zabbix_sender*
526
527 %files agentd
528 %defattr(644,root,root,755)
529 %doc conf/zabbix_agentd/*.conf
530 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agentd.conf
531 %dir %attr(751,root,zabbix) %{_sysconfdir}/zabbix_agentd.conf.d
532 %attr(754,root,root) /etc/rc.d/init.d/zabbix_agentd
533 %attr(755,root,root) %{_sbindir}/zabbix_agentd
534 %{_mandir}/man8/zabbix_agentd*
535
536 %if %{with agent2}
537 %files agent2
538 %defattr(644,root,root,755)
539 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent2.conf
540 %dir %attr(751,root,zabbix) %{_sysconfdir}/zabbix_agent2.d
541 %dir %attr(751,root,zabbix) %{_sysconfdir}/zabbix_agent2.d/plugins.d
542 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent2.d/plugins.d/ceph.conf
543 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent2.d/plugins.d/docker.conf
544 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent2.d/plugins.d/memcached.conf
545 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent2.d/plugins.d/modbus.conf
546 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent2.d/plugins.d/mqtt.conf
547 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent2.d/plugins.d/mysql.conf
548 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent2.d/plugins.d/oracle.conf
549 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent2.d/plugins.d/redis.conf
550 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent2.d/plugins.d/smart.conf
551 %attr(754,root,root) /etc/rc.d/init.d/zabbix_agent2
552 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/zabbix_agent2
553 %attr(755,root,root) %{_sbindir}/zabbix_agent2
554 %{_mandir}/man8/zabbix_agent2*
555 %endif
556
557 %files web
558 %defattr(644,root,root,755)
559 %attr(750,root,http) %dir %{_webapps}/%{_webapp}
560 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/apache.conf
561 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/httpd.conf
562 %ghost %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/web/zabbix.conf.php
563 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/web/.htaccess
564 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/web/maintenance.inc.php
565 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/web/zabbix.conf.php.example
566 %{_appdir}/ui
567
568 %if %{any_database}
569 %files proxy
570 %defattr(644,root,root,755)
571 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_proxy.conf
572 %dir %attr(751,root,zabbix) %{_sysconfdir}/zabbix_proxy.conf.d
573 %attr(754,root,root) /etc/rc.d/init.d/zabbix_proxy
574 %ghost %attr(755,root,root) %{_sbindir}/zabbix_proxy
575 %{_mandir}/man8/zabbix_proxy*
576 %endif
577
578 %if %{with mysql}
579 %files proxy-mysql
580 %defattr(644,root,root,755)
581 %attr(755,root,root) %{_sbindir}/zabbix_proxy-mysql
582 %endif
583
584 %if %{with pgsql}
585 %files proxy-postgresql
586 %defattr(644,root,root,755)
587 %attr(755,root,root) %{_sbindir}/zabbix_proxy-postgresql
588 %endif
589
590 %if %{with sqlite3}
591 %files proxy-sqlite3
592 %defattr(644,root,root,755)
593 %attr(755,root,root) %{_sbindir}/zabbix_proxy-sqlite3
594 %endif
595
596
597 %if %{any_database}
598 %files server
599 %defattr(644,root,root,755)
600 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_server.conf
601 %dir %attr(751,root,zabbix) %{_sysconfdir}/zabbix_server.conf.d
602 %attr(754,root,root) /etc/rc.d/init.d/zabbix_server
603 %ghost %attr(755,root,root) %{_sbindir}/zabbix_server
604 %{_mandir}/man8/zabbix_server*
605 %endif
606
607 %if %{with mysql}
608 %files server-mysql
609 %defattr(644,root,root,755)
610 %doc database/mysql/*.sql
611 %attr(755,root,root) %{_sbindir}/zabbix_server-mysql
612 %endif
613
614 %if %{with pgsql}
615 %files server-postgresql
616 %defattr(644,root,root,755)
617 %doc database/postgresql/*.sql
618 %attr(755,root,root) %{_sbindir}/zabbix_server-postgresql
619 %endif
620
621 %if %{with java}
622 %files java
623 %defattr(644,root,root,755)
624 %attr(755,root,root) %{_sbindir}/zabbix_java-start
625 %attr(755,root,root) %{_sbindir}/zabbix_java-stop
626 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_java.conf
627 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/java-logback.xml
628 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/java-logback-console.xml
629 %dir %{_datadir}/zabbix_java
630 %{_datadir}/zabbix_java/bin
631 %{_datadir}/zabbix_java/lib
632 %{_datadir}/zabbix_java/settings.sh
633 %attr(755,root,root) %{_datadir}/zabbix_java/shutdown.sh
634 %attr(755,root,root) %{_datadir}/zabbix_java/startup.sh
635 %endif