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