[packages/zabbix] Version: 3.4.4

jajcus jajcus at pld-linux.org
Thu Dec 14 13:51:27 CET 2017


commit 4ffaba5270eddca738009f961439e462b4ab2d19
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date:   Thu Dec 14 13:50:56 2017 +0100

    Version: 3.4.4

 link_order.patch     | 19 +++++++++++++++++++
 sqlite3_dbname.patch | 37 ++++++++++++-------------------------
 zabbix.spec          | 52 ++++++----------------------------------------------
 3 files changed, 37 insertions(+), 71 deletions(-)
---
diff --git a/zabbix.spec b/zabbix.spec
index f815315..01d3a49 100644
--- a/zabbix.spec
+++ b/zabbix.spec
@@ -14,12 +14,12 @@
 Summary:	Zabbix - network monitoring software
 Summary(pl.UTF-8):	Zabbix - oprogramowanie do monitorowania sieci
 Name:		zabbix
-Version:	3.2.6
+Version:	3.4.4
 Release:	1
 License:	GPL v2+
 Group:		Networking/Utilities
 Source0:	http://downloads.sourceforge.net/zabbix/%{name}-%{version}.tar.gz
-# Source0-md5:	87428256f7e48b8bf10a926df27a34c8
+# Source0-md5:	3211dd373fa3424be3ab3a0ee9c48816
 Source1:	%{name}-apache.conf
 Source2:	%{name}_server.service
 Source3:	%{name}_agentd.service
@@ -28,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}
@@ -268,26 +271,6 @@ 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:	zabbix-server-mysql
-Obsoletes:	zabbix-server-postgresql
-
-%description server-sqlite3
-This package provides the Zabbix server binary for use with SQLite 3
-database.
-
-NOTE: Support for SQLite 3 is EXPERIMENTAL and not recommended.
-
-%description server-sqlite3 -l pl.UTF-8
-Ten pakiet zawiera serwer Zabbiksa z obsługą bazy danych SQLite 3.
-
-INFO: Wsparcie dla SQLite 3 jest EKSPERYMENTALNE i nie rekomendowane.
-
 %package java
 Summary:	Zabbix Java Gateway
 Group:		Networking/Utilities
@@ -302,6 +285,7 @@ This package provides the Zabbix Java Gateway.
 
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 
@@ -485,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
 
@@ -648,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)
diff --git a/link_order.patch b/link_order.patch
new file mode 100644
index 0000000..31a165b
--- /dev/null
+++ b/link_order.patch
@@ -0,0 +1,19 @@
+diff -durN zabbix-3.4.4.orig/src/zabbix_server/Makefile.am zabbix-3.4.4/src/zabbix_server/Makefile.am
+--- zabbix-3.4.4.orig/src/zabbix_server/Makefile.am	2017-11-09 11:37:30.000000000 +0100
++++ zabbix-3.4.4/src/zabbix_server/Makefile.am	2017-12-14 13:26:08.000000000 +0100
+@@ -51,7 +51,6 @@
+ 	selfmon/libzbxselfmon.a \
+ 	vmware/libzbxvmware.a \
+ 	taskmanager/libzbxtaskmanager.a \
+-	ipmi/libipmi.a \
+ 	scripts/libzbxscripts.a \
+ 	preprocessor/libpreprocessor.a \
+ 	$(top_srcdir)/src/libs/zbxsysinfo/libzbxserversysinfo.a \
+@@ -75,6 +74,7 @@
+ 	$(top_srcdir)/src/libs/zbxjson/libzbxjson.a \
+ 	$(top_srcdir)/src/libs/zbxhttp/libzbxhttp.a \
+ 	$(top_srcdir)/src/libs/zbxipcservice/libzbxipcservice.a \
++	ipmi/libipmi.a \
+ 	$(top_srcdir)/src/libs/zbxexec/libzbxexec.a \
+ 	$(top_srcdir)/src/libs/zbxicmpping/libzbxicmpping.a \
+ 	$(top_srcdir)/src/libs/zbxdbupgrade/libzbxdbupgrade.a \
diff --git a/sqlite3_dbname.patch b/sqlite3_dbname.patch
index aeb8942..0a349ae 100644
--- a/sqlite3_dbname.patch
+++ b/sqlite3_dbname.patch
@@ -1,7 +1,7 @@
-diff -dur zabbix-3.2.0.orig/conf/zabbix_proxy.conf zabbix-3.2.0/conf/zabbix_proxy.conf
---- zabbix-3.2.0.orig/conf/zabbix_proxy.conf	2016-10-01 17:44:08.000000000 +0200
-+++ zabbix-3.2.0/conf/zabbix_proxy.conf	2016-10-01 18:00:48.000000000 +0200
-@@ -126,6 +126,7 @@
+diff -dur -x '*~' -x '*.orig' -x '*.rej' zabbix-3.4.4.orig/conf/zabbix_proxy.conf zabbix-3.4.4/conf/zabbix_proxy.conf
+--- zabbix-3.4.4.orig/conf/zabbix_proxy.conf	2017-12-14 13:15:25.000000000 +0100
++++ zabbix-3.4.4/conf/zabbix_proxy.conf	2017-12-14 13:15:42.000000000 +0100
+@@ -152,6 +152,7 @@
  ### Option: DBName
  #	Database name.
  #	For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.
@@ -9,38 +9,25 @@ diff -dur zabbix-3.2.0.orig/conf/zabbix_proxy.conf zabbix-3.2.0/conf/zabbix_prox
  #	Warning: do not attempt to use the same database Zabbix server is using.
  #
  # Mandatory: yes
-diff -dur zabbix-3.2.0.orig/conf/zabbix_server.conf zabbix-3.2.0/conf/zabbix_server.conf
---- zabbix-3.2.0.orig/conf/zabbix_server.conf	2016-10-01 17:44:08.000000000 +0200
-+++ zabbix-3.2.0/conf/zabbix_server.conf	2016-10-01 17:50:32.000000000 +0200
-@@ -79,6 +79,8 @@
- ### Option: DBName
- #	Database name.
- #	For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.
-+#	If provided name does not contain '/' or ':' (no a path or special
-+#	type) a .db file in /var/lib/zabbix will be used.
- #
- # Mandatory: yes
- # Default:
-diff -dur zabbix-3.2.0.orig/src/libs/zbxdb/db.c zabbix-3.2.0/src/libs/zbxdb/db.c
---- zabbix-3.2.0.orig/src/libs/zbxdb/db.c	2016-09-13 14:20:56.000000000 +0200
-+++ zabbix-3.2.0/src/libs/zbxdb/db.c	2016-10-01 17:59:19.000000000 +0200
-@@ -295,6 +295,7 @@
+diff -dur -x '*~' -x '*.orig' -x '*.rej' zabbix-3.4.4.orig/src/libs/zbxdb/db.c zabbix-3.4.4/src/libs/zbxdb/db.c
+--- zabbix-3.4.4.orig/src/libs/zbxdb/db.c	2017-11-09 11:37:31.000000000 +0100
++++ zabbix-3.4.4/src/libs/zbxdb/db.c	2017-12-14 13:16:29.000000000 +0100
+@@ -294,6 +294,7 @@
  	DB_ROW		row;
  #elif defined(HAVE_SQLITE3)
  	char		*p, *path = NULL;
 +	char		dbname_buf[1024];
  #endif
  
- 	/* Allow executing statements during a connection initialization. Make sure to mark transaction as failed. */
-@@ -581,6 +582,11 @@
- #elif defined(HAVE_SQLITE3)
+ #ifndef HAVE_MYSQL
+@@ -608,6 +609,10 @@
+ 	ZBX_UNUSED(password);
  	ZBX_UNUSED(dbschema);
- 
+ 	ZBX_UNUSED(port);
 +	if (!strchr(dbname, '/') && !strchr(dbname, ':')) {
 +		zbx_snprintf(dbname_buf, sizeof(dbname_buf), "/var/lib/zabbix/%s.db", dbname);
 +		dbname = dbname_buf;
 +	}
-+
  #ifdef HAVE_FUNCTION_SQLITE3_OPEN_V2
  	if (SQLITE_OK != sqlite3_open_v2(dbname, &conn, SQLITE_OPEN_READWRITE, NULL))
  #else
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/zabbix.git/commitdiff/4ffaba5270eddca738009f961439e462b4ab2d19



More information about the pld-cvs-commit mailing list