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