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