From 0d416a1cc004d0d7f8f0c5874f4b6b9287519e0f Mon Sep 17 00:00:00 2001 From: hauke Date: Wed, 5 Feb 2014 21:27:13 +0000 Subject: [PATCH] Zabbix: update to 2.2.1 With this new version of zabbix we do not need uname and hostname anymore, see https://svn.zabbix.com/browse/ZBX-5616 Only compile tested for now Signed-off-by: Etienne CHAMPETIER git-svn-id: svn://svn.openwrt.org/openwrt/packages@39489 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- admin/zabbix/Makefile | 10 ++-------- admin/zabbix/patches/001-cross_compile.patch | 6 +++--- .../patches/002-fix-res_send-on-uclibc.patch | 14 +++++++------- admin/zabbix/patches/002-uclibc_loadavg.patch | 8 ++++---- .../zabbix/patches/010-change-agentd-config.patch | 8 ++++---- 5 files changed, 20 insertions(+), 26 deletions(-) diff --git a/admin/zabbix/Makefile b/admin/zabbix/Makefile index 5ee8425ac..9088447de 100644 --- a/admin/zabbix/Makefile +++ b/admin/zabbix/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=zabbix -PKG_VERSION:=2.0.8 +PKG_VERSION:=2.2.1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/zabbix -PKG_MD5SUM:=8fef9e6f499295211dd9b2a9db96464b +PKG_MD5SUM:=558497839b13a548f533eb2fc951a4e3 PKG_INSTALL:=1 @@ -99,12 +99,6 @@ 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. endef - -define Package/zabbix-agentd/config - select BUSYBOX_CONFIG_HOSTNAME if !PACKAGE_net-tools-hostname - select BUSYBOX_CONFIG_UNAME if !PACKAGE_coreutils-uname -endef - CONFIGURE_ARGS+= \ --enable-agent \ --enable-server \ diff --git a/admin/zabbix/patches/001-cross_compile.patch b/admin/zabbix/patches/001-cross_compile.patch index 8716e84a6..cf8b6d83f 100644 --- a/admin/zabbix/patches/001-cross_compile.patch +++ b/admin/zabbix/patches/001-cross_compile.patch @@ -1,6 +1,6 @@ ---- a/configure.in 2012-06-21 21:32:23.707912790 +0000 -+++ b/configure.in 2012-06-21 21:33:36.213554564 +0000 -@@ -802,25 +802,8 @@ +--- a/configure.in ++++ b/configure.in +@@ -804,25 +804,8 @@ dnl ************************************ dnl Check for %qu format (FreeBSD 4.x) dnl FreeBSD 4.x does not support %llu diff --git a/admin/zabbix/patches/002-fix-res_send-on-uclibc.patch b/admin/zabbix/patches/002-fix-res_send-on-uclibc.patch index 319065961..7072f0363 100644 --- a/admin/zabbix/patches/002-fix-res_send-on-uclibc.patch +++ b/admin/zabbix/patches/002-fix-res_send-on-uclibc.patch @@ -1,6 +1,6 @@ ---- a/configure.in 2013-02-14 18:29:28.145419003 +0100 -+++ b/configure.in 2013-02-14 18:28:42.873418092 +0100 -@@ -149,6 +149,10 @@ +--- a/configure.in ++++ b/configure.in +@@ -151,6 +151,10 @@ if test "x$found_resolv" != "xyes"; then AC_MSG_ERROR([Unable to do DNS lookups (libresolv check failed)]) fi LIBS="${LIBS} ${RESOLV_LIBS}" @@ -11,9 +11,9 @@ dnl ***************************************************************** dnl * * ---- a/src/libs/zbxsysinfo/common/net.c 2012-06-21 19:49:46.610567432 +0000 -+++ b/src/libs/zbxsysinfo/common/net.c 2012-06-21 19:50:35.816628541 +0000 -@@ -418,6 +418,7 @@ +--- a/src/libs/zbxsysinfo/common/net.c ++++ b/src/libs/zbxsysinfo/common/net.c +@@ -421,6 +421,7 @@ static int dns_query(AGENT_REQUEST *requ #else /* not _WINDOWS */ res_init(); /* initialize always, settings might have changed */ @@ -21,7 +21,7 @@ if (-1 == (res = res_mkquery(QUERY, zone, C_IN, type, NULL, 0, NULL, buf, sizeof(buf)))) return SYSINFO_RET_FAIL; -@@ -436,6 +437,11 @@ +@@ -439,6 +440,11 @@ static int dns_query(AGENT_REQUEST *requ _res.retry = retry; res = res_send(buf, res, answer.buffer, sizeof(answer.buffer)); diff --git a/admin/zabbix/patches/002-uclibc_loadavg.patch b/admin/zabbix/patches/002-uclibc_loadavg.patch index 6effabb75..4bf3f7739 100644 --- a/admin/zabbix/patches/002-uclibc_loadavg.patch +++ b/admin/zabbix/patches/002-uclibc_loadavg.patch @@ -1,5 +1,5 @@ ---- a/src/libs/zbxsysinfo/linux/cpu.c 2013-02-12 12:27:22.000000000 +0100 -+++ b/src/libs/zbxsysinfo/linux/cpu.c 2013-02-14 18:38:02.517429349 +0100 +--- a/src/libs/zbxsysinfo/linux/cpu.c ++++ b/src/libs/zbxsysinfo/linux/cpu.c @@ -21,6 +21,45 @@ #include "sysinfo.h" #include "stats.h" @@ -43,6 +43,6 @@ +} +#endif + - int SYSTEM_CPU_NUM(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result) + int SYSTEM_CPU_NUM(AGENT_REQUEST *request, AGENT_RESULT *result) { - char tmp[16]; + char *type; diff --git a/admin/zabbix/patches/010-change-agentd-config.patch b/admin/zabbix/patches/010-change-agentd-config.patch index 58424e9ac..cf5083e24 100644 --- a/admin/zabbix/patches/010-change-agentd-config.patch +++ b/admin/zabbix/patches/010-change-agentd-config.patch @@ -24,7 +24,7 @@ ### Option: LogFileSize # Maximum size of log file in MB. # 0 - disable automatic log rotation. -@@ -105,6 +99,7 @@ Server=127.0.0.1 +@@ -104,6 +98,7 @@ Server=127.0.0.1 # Range: 0-100 # Default: # StartAgents=3 @@ -32,7 +32,7 @@ ##### Active checks related -@@ -120,8 +115,6 @@ Server=127.0.0.1 +@@ -119,8 +114,6 @@ Server=127.0.0.1 # Default: # ServerActive= @@ -41,7 +41,7 @@ ### Option: Hostname # Unique, case sensitive hostname. # Required for active checks and must match hostname as configured on the server. -@@ -131,8 +124,6 @@ ServerActive=127.0.0.1 +@@ -130,8 +123,6 @@ ServerActive=127.0.0.1 # Default: # Hostname= @@ -50,7 +50,7 @@ ### Option: HostnameItem # Item used for generating Hostname if it is undefined. # Ignored if Hostname is defined. -@@ -213,7 +204,7 @@ Hostname=Zabbix server +@@ -240,7 +231,7 @@ Hostname=Zabbix server # Include= # Include=/usr/local/etc/zabbix_agentd.userparams.conf