Update zabbix to 1.6
authorFlorian Fainelli <florian@openwrt.org>
Tue, 30 Sep 2008 17:08:43 +0000 (17:08 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Tue, 30 Sep 2008 17:08:43 +0000 (17:08 +0000)
SVN-Revision: 12815

admin/zabbix/Makefile
admin/zabbix/patches/001-cross_compile.patch [new file with mode: 0644]
admin/zabbix/patches/002-uclibc_loadavg.patch [new file with mode: 0644]

index d52507b..c72a4b0 100644 (file)
@@ -9,9 +9,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zabbix
-PKG_VERSION:=1.3.2
+PKG_VERSION:=1.6
 PKG_RELEASE:=1
-PKG_MD5SUM:=698a07f4e53820e44ef4a72c7c191e92
+PKG_MD5SUM:=39d4c871439b1b4f0429964b4abbfc45
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/zabbix
diff --git a/admin/zabbix/patches/001-cross_compile.patch b/admin/zabbix/patches/001-cross_compile.patch
new file mode 100644 (file)
index 0000000..023c89c
--- /dev/null
@@ -0,0 +1,13 @@
+diff -urN zabbix-1.6/configure zabbix-1.6.new/configure
+--- zabbix-1.6/configure       2008-09-18 22:15:39.000000000 +0200
++++ zabbix-1.6.new/configure   2008-09-30 19:20:43.000000000 +0200
+@@ -4826,8 +4826,7 @@
+   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+ See \`config.log' for more details." >&5
+ echo "$as_me: error: cannot run test program while cross compiling
+-See \`config.log' for more details." >&2;}
+-   { (exit 1); exit 1; }; }
++See \`config.log' for more details." >&2;} }
+ else
+   cat >conftest.$ac_ext <<_ACEOF
diff --git a/admin/zabbix/patches/002-uclibc_loadavg.patch b/admin/zabbix/patches/002-uclibc_loadavg.patch
new file mode 100644 (file)
index 0000000..6439edf
--- /dev/null
@@ -0,0 +1,49 @@
+diff -urN zabbix-1.6/src/libs/zbxsysinfo/linux/cpu.c zabbix-1.6.new/src/libs/zbxsysinfo/linux/cpu.c
+--- zabbix-1.6/src/libs/zbxsysinfo/linux/cpu.c 2008-09-18 22:15:26.000000000 +0200
++++ zabbix-1.6.new/src/libs/zbxsysinfo/linux/cpu.c     2008-09-30 19:32:54.000000000 +0200
+@@ -22,6 +22,45 @@
+ #include "sysinfo.h"
+ #include "stats.h"
++
++/* uclibc and dietlibc do not have this junk -ReneR */
++#if defined (__UCLIBC__) || defined (__dietlibc__)
++static int getloadavg (double loadavg[], int nelem)
++{
++  int fd;
++
++  fd = open ("/proc/loadavg", O_RDONLY);
++  if (fd < 0)
++    return -1;
++  else
++    {
++      char buf[65], *p;
++      ssize_t nread;
++      int i;
++
++      nread = read (fd, buf, sizeof buf - 1);
++      close (fd);
++      if (nread <= 0)
++      return -1;
++      buf[nread - 1] = '\0';
++
++      if (nelem > 3)
++      nelem = 3;
++      p = buf;
++      for (i = 0; i < nelem; ++i)
++      {
++        char *endp;
++        loadavg[i] = strtod (p, &endp);
++        if (endp == p)
++          return -1;
++        p = endp;
++      }
++
++      return i;
++    }
++}
++#endif
++
+ int   SYSTEM_CPU_NUM(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result)
+ {
+       char    mode[128];