]> git.pld-linux.org Git - packages/zabbix.git/blobdiff - zabbix.spec
Version: 3.4.4
[packages/zabbix.git] / zabbix.spec
index ca734ef792c01ed4442647cd2f68d1b4e0790cd7..01d3a493aa48811ca5e0ae46201700607bccb375 100644 (file)
@@ -8,17 +8,18 @@
 %bcond_without java    # disable java support
 
 %define databases %{?with_pgsql:postgresql} %{?with_mysql:mysql} %{?with_sqlite3:sqlite3}
+%define any_database %{with pgsql}%{with mysql}%{with sqlite3}
 
 %define                php_min_version 5.4.0
 Summary:       Zabbix - network monitoring software
 Summary(pl.UTF-8):     Zabbix - oprogramowanie do monitorowania sieci
 Name:          zabbix
-Version:       3.2.0
-Release:       0.3
+Version:       3.4.4
+Release:       1
 License:       GPL v2+
 Group:         Networking/Utilities
 Source0:       http://downloads.sourceforge.net/zabbix/%{name}-%{version}.tar.gz
-# Source0-md5: e2491b482868059f251902d5f636eacb
+# Source0-md5: 3211dd373fa3424be3ab3a0ee9c48816
 Source1:       %{name}-apache.conf
 Source2:       %{name}_server.service
 Source3:       %{name}_agentd.service
@@ -27,17 +28,20 @@ Source5:    %{name}_java.service
 Source6:       %{name}.tmpfiles
 Patch0:                config.patch
 Patch1:                sqlite3_dbname.patch
+Patch2:                sqlite3_dbname.patch
 URL:           http://zabbix.sourceforge.net/
 BuildRequires: OpenIPMI-devel
 BuildRequires: curl-devel
 BuildRequires: iksemel-devel
 %{?with_java:BuildRequires:    jdk}
+BuildRequires: libevent-devel
 BuildRequires: libssh2-devel
 BuildRequires: libxml2-devel
 %{?with_mysql:BuildRequires:   mysql-devel}
 BuildRequires: net-snmp-devel
 BuildRequires: openldap-devel >= 2.4.6
 BuildRequires: openssl-devel >= 0.9.7d
+BuildRequires: pcre-devel
 %{?with_pgsql:BuildRequires:   postgresql-devel}
 BuildRequires: rpmbuild(macros) >= 1.671
 %{?with_sqlite3:BuildRequires: sqlite3-devel}
@@ -126,10 +130,15 @@ Requires: php(xml)
 Requires:      php(xmlreader)
 Requires:      php(xmlwriter)
 Requires:      webapps
+Requires:      webserver(alias)
+Requires:      webserver(indexfile)
 Requires:      webserver(php)
 Suggests:      php(mysql)
 Suggests:      php(pgsql)
 Suggests:      php(sqlite3)
+# used with sqlite3
+Suggests:      php(sysvsem)
+BuildArch:     noarch
 
 %description frontend-php
 This package provides web based (PHP) frontend for Zabbix.
@@ -153,8 +162,8 @@ Summary:    Zabbix proxy
 Summary(pl.UTF-8):     Proxy do Zabbiksa
 Group:         Networking/Utilities
 Requires:      %{name}-common = %{version}-%{release}
-Requires:      zabbix-proxy(db) = %{version}-%{release}
 Requires:      systemd-units >= 38
+Requires:      zabbix-proxy(db) = %{version}-%{release}
 
 %description proxy
 This package provides the Zabbix proxy.
@@ -167,8 +176,8 @@ Summary:    MySQL support for Zabbix proxy
 Summary(pl.UTF-8):     Obsługa MySQL dla proxy do Zabbiksa
 Group:         Networking/Utilities
 Provides:      %{name}-proxy(db) = %{version}-%{release}
-Obsoletes:     %{name}-proxy-postgresql
-Obsoletes:     %{name}-proxy-sqlite3
+Obsoletes:     zabbix-proxy-postgresql
+Obsoletes:     zabbix-proxy-sqlite3
 
 %description proxy-mysql
 This package provides the Zabbix proxy binary with MySQL support.
@@ -181,8 +190,8 @@ Summary:    PostgreSQL support for Zabbix proxy
 Summary(pl.UTF-8):     Obsługa PostgreSQL dla proxy do Zabbiksa
 Group:         Networking/Utilities
 Provides:      %{name}-proxy(db) = %{version}-%{release}
-Obsoletes:     %{name}-proxy-mysql
-Obsoletes:     %{name}-proxy-sqlite3
+Obsoletes:     zabbix-proxy-mysql
+Obsoletes:     zabbix-proxy-sqlite3
 
 %description proxy-postgresql
 This package provides the Zabbix proxy binary with PostgreSQL support.
@@ -195,8 +204,8 @@ Summary:    SQLite 3 support for Zabbix proxy
 Summary(pl.UTF-8):     Obsługa SQLite 3 dla proxy do Zabbiksa
 Group:         Networking/Utilities
 Provides:      %{name}-proxy(db) = %{version}-%{release}
-Obsoletes:     %{name}-proxy-mysql
-Obsoletes:     %{name}-proxy-postgresql
+Obsoletes:     zabbix-proxy-mysql
+Obsoletes:     zabbix-proxy-postgresql
 
 %description proxy-sqlite3
 This package provides the Zabbix proxy binary with SQLite 3 support.
@@ -237,11 +246,12 @@ Summary:  MySQL support for Zabbix server
 Summary(pl.UTF-8):     Obsługa MySQL sla serwera Zabbiksa
 Group:         Networking/Utilities
 Provides:      %{name}-server(db) = %{version}-%{release}
-Obsoletes:     %{name}-server-postgresql
-Obsoletes:     %{name}-server-sqlite3
+Obsoletes:     zabbix-server-postgresql
+Obsoletes:     zabbix-server-sqlite3
 
 %description server-mysql
-This package provides the Zabbix server binary for use with MySQL database.
+This package provides the Zabbix server binary for use with MySQL
+database.
 
 %description server-mysql -l pl.UTF-8
 Ten pakiet zawiera serwer Zabbiksa z obsługą bazy danych MySQL.
@@ -251,30 +261,16 @@ Summary:  PostgreSQL support for Zabbix server
 Summary(pl.UTF-8):     Obsługa PostgreSQL sla serwera Zabbiksa
 Group:         Networking/Utilities
 Provides:      %{name}-server(db) = %{version}-%{release}
-Obsoletes:     %{name}-server-mysql
-Obsoletes:     %{name}-server-sqlite3
+Obsoletes:     zabbix-server-mysql
+Obsoletes:     zabbix-server-sqlite3
 
 %description server-postgresql
-This package provides the Zabbix server binary for use with PostgreSQL database.
+This package provides the Zabbix server binary for use with PostgreSQL
+database.
 
 %description server-postgresql -l pl.UTF-8
 Ten pakiet zawiera serwer Zabbiksa z obsługą bazy danych PostgreSQL.
 
-%package server-sqlite3
-Summary:       SQLite 3 support for Zabbix server
-Summary(pl.UTF-8):     Obsługa SQLite 3 sla serwera Zabbiksa
-Group:         Networking/Utilities
-Requires(post):        /bin/zcat
-Provides:      %{name}-server(db) = %{version}-%{release}
-Obsoletes:     %{name}-server-mysql
-Obsoletes:     %{name}-server-postgresql
-
-%description server-sqlite3
-This package provides the Zabbix server binary for use with SQLite 3 database.
-
-%description server-sqlite3 -l pl.UTF-8
-Ten pakiet zawiera serwer Zabbiksa z obsługą bazy danych SQLite 3.
-
 %package java
 Summary:       Zabbix Java Gateway
 Group:         Networking/Utilities
@@ -289,6 +285,7 @@ This package provides the Zabbix Java Gateway.
 
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 
@@ -311,7 +308,7 @@ configure() {
 
 configure \
        --disable-server \
-       --disable-proxy 
+       --disable-proxy
 
 %{__make}
 
@@ -434,6 +431,7 @@ rm -rf $RPM_BUILD_ROOT
 %pre common
 %groupadd -g 111 zabbix
 %useradd -d / -u 111 -g zabbix -c "Zabbix User" -s /bin/false zabbix
+%addusertogroup -q zabbix proc
 
 %postun common
 if [ "$1" = "0" ]; then
@@ -471,21 +469,6 @@ EOF
 fi
 ln -sf %{_sbindir}/zabbix_server-postgresql %{_sbindir}/zabbix_server || :
 
-%post server-sqlite3
-if [ "$1" = 1 ]; then
-       if [ ! -f /var/lib/zabbix/zabbix.db ] ; then
-               %banner -e %{name}-server <<-EOF
-               Creating sqlite3 database for Zabbix in /var/lib/zabbix/zabbix.db
-EOF
-               zcat %{_docdir}/%{name}-server-sqlite3-%{version}/schema.sql.gz | sqlite3 /var/lib/zabbix/zabbix.db && \
-               zcat %{_docdir}/%{name}-server-sqlite3-%{version}/images.sql.gz | sqlite3 /var/lib/zabbix/zabbix.db && \
-               zcat %{_docdir}/%{name}-server-sqlite3-%{version}/data.sql.gz | sqlite3 /var/lib/zabbix/zabbix.db && \
-               chown zabbix:zabbix /var/lib/zabbix/zabbix.db && \
-               chmod 644 /var/lib/zabbix/zabbix.db || :
-       fi
-fi
-ln -sf %{_sbindir}/zabbix_server-sqlite3 %{_sbindir}/zabbix_server || :
-
 %post server
 %systemd_post zabbix_server.service
 
@@ -553,7 +536,9 @@ ln -sf %{_sbindir}/zabbix_proxy-sqlite3 %{_sbindir}/zabbix_proxy || :
 
 %files agentd
 %defattr(644,root,root,755)
+%doc conf/zabbix_agentd/*.conf
 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agentd.conf
+%dir %attr(751,root,zabbix) %{_sysconfdir}/zabbix_agentd.conf.d
 %attr(755,root,root) %{_sbindir}/zabbix_agentd
 %{_mandir}/man8/zabbix_agentd*
 %{systemdunitdir}/zabbix_agentd.service
@@ -561,24 +546,28 @@ ln -sf %{_sbindir}/zabbix_proxy-sqlite3 %{_sbindir}/zabbix_proxy || :
 %files frontend-php
 %defattr(644,root,root,755)
 %attr(750,root,http) %dir %{_webapps}/%{_webapp}
-%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/*
-%{_appdir}/frontends/php
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/apache.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/httpd.conf
 %ghost %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/frontend/zabbix.conf.php
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/frontend/.htaccess
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/frontend/maintenance.inc.php
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/frontend/zabbix.conf.php.example
+%{_appdir}/frontends/php
 
 %files get
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/zabbix_get
 %{_mandir}/man1/zabbix_get*
 
+%if %{any_database}
 %files proxy
 %defattr(644,root,root,755)
 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_proxy.conf
+%dir %attr(751,root,zabbix) %{_sysconfdir}/zabbix_proxy.conf.d
 %ghost %attr(755,root,root) %{_sbindir}/zabbix_proxy
 %{_mandir}/man8/zabbix_proxy*
 %{systemdunitdir}/zabbix_proxy.service
+%endif
 
 %if %{with mysql}
 %files proxy-mysql
@@ -603,13 +592,16 @@ ln -sf %{_sbindir}/zabbix_proxy-sqlite3 %{_sbindir}/zabbix_proxy || :
 %attr(755,root,root) %{_bindir}/zabbix_sender
 %{_mandir}/man1/zabbix_sender*
 
+%if %{any_database}
 %files server
 %defattr(644,root,root,755)
 %doc upgrades/dbpatches
 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_server.conf
+%dir %attr(751,root,zabbix) %{_sysconfdir}/zabbix_server.conf.d
 %ghost %attr(755,root,root) %{_sbindir}/zabbix_server
 %{_mandir}/man8/zabbix_server*
 %{systemdunitdir}/zabbix_server.service
+%endif
 
 %if %{with mysql}
 %files server-mysql
@@ -625,15 +617,6 @@ ln -sf %{_sbindir}/zabbix_proxy-sqlite3 %{_sbindir}/zabbix_proxy || :
 %attr(755,root,root) %{_sbindir}/zabbix_server-postgresql
 %endif
 
-%if %{with sqlite3}
-%files server-sqlite3
-%defattr(644,root,root,755)
-%doc database/sqlite3/*.sql
-%attr(755,root,root) %{_sbindir}/zabbix_server-sqlite3
-%dir %attr(771,root,zabbix) /var/lib/zabbix
-%ghost %attr(644,zabbix,zabbix) /var/lib/zabbix/zabbix.db
-%endif
-
 %if %{with java}
 %files java
 %defattr(644,root,root,755)
This page took 0.071703 seconds and 4 git commands to generate.