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