From b211914fd0e0041e069f95cf398f7883e671abff Mon Sep 17 00:00:00 2001 From: Krystian Kozak Date: Fri, 1 Jun 2018 13:27:18 +0200 Subject: [PATCH] zabbix: Bump to latest version This upgrade zabbix to the newest version. Changing SQLite for PostgreSQL, because of dropping SQLite support for server/frontend. More info:https://www.zabbix.com/documentation/3.4/manual/installation/upgrade_notes_340#dropping_sqlite_support_for_serverfrontend In addition added required dependencies. More info:https://www.zabbix.com/documentation/3.4/manual/installation/requirements Compile tested: Yes, brcm2708 Run tested: Yes, brcm2708 Signed-off-by: Krystian Kozak --- admin/zabbix/Makefile | 22 ++++++------ .../patches/002-fix-res_send-on-uclibc.patch | 35 ------------------- admin/zabbix/patches/100-musl-compat.patch | 13 +------ 3 files changed, 13 insertions(+), 57 deletions(-) delete mode 100644 admin/zabbix/patches/002-fix-res_send-on-uclibc.patch diff --git a/admin/zabbix/Makefile b/admin/zabbix/Makefile index af5044e08..e28e48d05 100644 --- a/admin/zabbix/Makefile +++ b/admin/zabbix/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=zabbix -PKG_VERSION:=3.2.7 -PKG_RELEASE:=2 +PKG_VERSION:=3.4.10 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=3ea0c299bd69bc728177128740f0476bc1a2c1de438330df5bbd8f5fc6090712 +PKG_HASH:=cdee0fd44e11ae214b2cc252974da22f3627c326ea2c61a0315af95165c52d1b PKG_SOURCE_URL:=@SF/zabbix PKG_LICENSE:=GPL-2.0 @@ -33,7 +33,7 @@ define Package/zabbix/Default SUBMENU:=zabbix MAINTAINER:=Etienne CHAMPETIER USERID:=zabbix=53:zabbix=53 - DEPENDS += $(ICONV_DEPENDS) + DEPENDS += $(ICONV_DEPENDS) +libpcre endef define Package/zabbix-agentd @@ -72,31 +72,31 @@ endef define Package/zabbix-server $(call Package/zabbix/Default) TITLE+= server - DEPENDS += +libsqlite3 + DEPENDS += +pgsql-cli +libevent2 endef define Package/zabbix-proxy $(call Package/zabbix/Default) TITLE+= proxy - DEPENDS += +libsqlite3 + DEPENDS += +pgsql-cli endef define Package/zabbix-extra-mac80211/description An extra package for zabbix-agentd that adds a discovery rule for mac80211 wifi phy and many userparameters. It contains an suid helper to allow zabbix-agentd to still run as zabbix user and not as root. -See http://wiki.openwrt.org/doc/howto/zabbix for ready to use zabbix templates. +See https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use zabbix templates. endef define Package/zabbix-extra-network/description An extra package for zabbix-agentd that adds a discovery rule for openwrt network interfaces. The idea here is to discover only interfaces listed in /etc/config/network (discover br-lan and not eth0.1 and wlan0) -See http://wiki.openwrt.org/doc/howto/zabbix for ready to use zabbix templates. +See https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use zabbix templates. endef define Package/zabbix-extra-wifi/description An extra package for zabbix-agentd that adds a discovery rule for wifi interfaces and many userparameters. As it uses libiwinfo, it works with all wifi devices supported by openwrt. -See http://wiki.openwrt.org/doc/howto/zabbix for ready to use zabbix templates. +See https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use zabbix templates. endef CONFIGURE_ARGS+= \ @@ -105,7 +105,9 @@ CONFIGURE_ARGS+= \ --enable-proxy \ $(call autoconf_bool,CONFIG_IPV6,ipv6) \ --disable-java \ - --with-sqlite3="$(STAGING_DIR)/usr" + --with-postgresql \ + --with-libevent=$(STAGING_DIR)/usr/include/libevent \ + --with-libpcre=$(STAGING_DIR)/usr/include MAKE_FLAGS += ARCH="linux" diff --git a/admin/zabbix/patches/002-fix-res_send-on-uclibc.patch b/admin/zabbix/patches/002-fix-res_send-on-uclibc.patch deleted file mode 100644 index f4b5d33a1..000000000 --- a/admin/zabbix/patches/002-fix-res_send-on-uclibc.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -161,6 +161,10 @@ if test "x$found_resolv" != "xyes"; then - AC_MSG_ERROR([Unable to do DNS lookups (libresolv check failed)]) - fi - LIBS="${LIBS} ${RESOLV_LIBS}" -+AC_SEARCH_LIBS([res_mkquery], [], [AC_DEFINE([HAVE_RES_MKQUERY], 1, [Define if res_mkquery exists])]) -+AC_SEARCH_LIBS([__res_mkquery], [], [AC_DEFINE([HAVE_RES_MKQUERY], 1, [Define if res_mkquery exists])]) -+AC_SEARCH_LIBS([res_send], [], [AC_DEFINE([HAVE_RES_SEND], 1, [Define if res_send exists])]) -+AC_SEARCH_LIBS([__res_send], [], [AC_DEFINE([HAVE_RES_SEND], 1, [Define if res_send exists])]) - - dnl ***************************************************************** - dnl * * ---- a/src/libs/zbxsysinfo/common/net.c -+++ b/src/libs/zbxsysinfo/common/net.c -@@ -471,6 +471,7 @@ static int dns_query(AGENT_REQUEST *requ - return SYSINFO_RET_FAIL; - } - -+#if defined(HAVE_RES_MKQUERY) && defined(HAVE_RES_SEND) - if (-1 == (res = res_mkquery(QUERY, zone, C_IN, type, NULL, 0, NULL, buf, sizeof(buf)))) - { - SET_MSG_RESULT(result, zbx_dsprintf(NULL, "Cannot create DNS query: %s", zbx_strerror(errno))); -@@ -505,6 +506,11 @@ static int dns_query(AGENT_REQUEST *requ - _res.retry = retry; - - res = res_send(buf, res, answer.buffer, sizeof(answer.buffer)); -+#else /* defined(HAVE_RES_QUERY) && defined(HAVE_RES_SEND) */ -+ /* retrand and retry are ignored */ -+ if (-1 == (res = res_query(zone, C_IN, type, answer.buffer, sizeof(answer.buffer)))) -+ return SYSINFO_RET_FAIL; -+#endif - - _res.options = saved_options; - _res.retrans = saved_retrans; diff --git a/admin/zabbix/patches/100-musl-compat.patch b/admin/zabbix/patches/100-musl-compat.patch index 61aeb9e01..58278578d 100644 --- a/admin/zabbix/patches/100-musl-compat.patch +++ b/admin/zabbix/patches/100-musl-compat.patch @@ -9,15 +9,4 @@ sys/socket.h sys/loadavg.h arpa/inet.h \ sys/vmmeter.h strings.h vm/vm_param.h \ sys/time.h kstat.h sys/syscall.h sys/sysmacros.h \ -@@ -63,6 +63,11 @@ AC_CHECK_HEADERS(stdio.h stdlib.h string - Winber.h lber.h ws2tcpip.h inttypes.h sys/file.h grp.h \ - execinfo.h libperfstat.h sys/systemcfg.h sys/mnttab.h mntent.h sys/times.h \ - dlfcn.h sys/utsname.h) -+AC_CHECK_HEADERS(sys/sysinfo.h, [], [], [ -+#ifdef HAVE_LINUX_KERNEL_H -+# include -+#endif -+]) - AC_CHECK_HEADERS(resolv.h, [], [], [ - #ifdef HAVE_SYS_TYPES_H - # include +