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