aboutsummaryrefslogtreecommitdiffstats
path: root/main/zabbix
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-06-18 07:44:23 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-06-18 07:44:23 +0000
commit4ddac63af21fd899c1ef9bc39b606da9a8fbbc2c (patch)
tree0fb04f95fcfd8ee669ce42a740db773133d2684d /main/zabbix
parent5867f4ca10690b7fbdbee4d2a01f88d4b8e80dac (diff)
downloadaports-4ddac63af21fd899c1ef9bc39b606da9a8fbbc2c.tar.bz2
aports-4ddac63af21fd899c1ef9bc39b606da9a8fbbc2c.tar.xz
main/zabbix: upgrade to 2.0.0
Diffstat (limited to 'main/zabbix')
-rw-r--r--main/zabbix/APKBUILD40
-rw-r--r--main/zabbix/res_send.patch41
-rw-r--r--main/zabbix/zabbix-dn_skipname.patch44
3 files changed, 64 insertions, 61 deletions
diff --git a/main/zabbix/APKBUILD b/main/zabbix/APKBUILD
index 97c47e3e27..4a2c279ad7 100644
--- a/main/zabbix/APKBUILD
+++ b/main/zabbix/APKBUILD
@@ -1,15 +1,16 @@
# Contributor: Jeff Bilyk <jbilyk at gmail>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=zabbix
-pkgver=1.8.12
-pkgrel=1
+pkgver=2.0.0
+pkgrel=0
pkgdesc="Enterprise-class open source distributed monitoring"
url="http://www.zabbix.com"
arch="all"
license="GPL"
depends="fping"
makedepends="postgresql-dev curl-dev libiconv-dev net-snmp-dev
- sqlite-dev mysql-dev curl-dev"
+ sqlite-dev mysql-dev curl-dev
+ autoconf automake"
install="$pkgname.pre-install"
pkgusers="zabbix"
pkggroups="zabbix"
@@ -20,8 +21,8 @@ source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
zabbix_trapper.conf
zabbix_proxy.conf
zabbix_agentd.conf
- zabbix-dn_skipname.patch
zabbix-getloadavg.patch
+ res_send.patch
zabbix-server.initd
zabbix-agentd.initd
zabbix-proxy.initd
@@ -39,6 +40,7 @@ prepare() {
;;
esac
done
+ aclocal -I m4 && autoconf && autoheader && automake || return 1
}
build() {
@@ -56,7 +58,7 @@ build() {
"
# we run build for each db type
# make sure prepare is same for each db
- for db in pgsql mysql sqlite3; do
+ for db in postgresql mysql sqlite3; do
cd "$srcdir"
msg "Building for $db"
cp -r "$pkgname-$pkgver" "$pkgname-$pkgver-$db"
@@ -93,25 +95,29 @@ package() {
setup() {
pkgdesc="Zabbix images and sql files"
depends=
- mkdir -p "$subpkgdir"/usr/share/zabbix/create
- mv "$srcdir"/$pkgname-$pkgver/create/data \
- "$subpkgdir"/usr/share/zabbix/create
- mv "$srcdir"/$pkgname-$pkgver/create/schema \
- "$subpkgdir"/usr/share/zabbix/create
+ mkdir -p "$subpkgdir"/usr/share/zabbix/ || return 1
+ mv "$_builddir"/database "$subpkgdir"/usr/share/zabbix/
}
_do_db() {
pkgdesc="Zabbix server with $1 database support"
depends=$pkgname
+ local i=
mkdir -p "$subpkgdir"/usr/sbin
mv "$_builddir-$1"/src/zabbix_server/zabbix_server \
"$subpkgdir"/usr/sbin/ || return 1
mv "$_builddir-$1"/src/zabbix_proxy/zabbix_proxy \
"$subpkgdir"/usr/sbin/ || return 1
+ cd "$_builddir"
+ for i in upgrades/dbpatches/*/$1; do
+ [ -e $i ] || continue
+ mkdir -p "$subpkgdir"/usr/share/zabbix/${i%/*}
+ mv "$i" "$subpkgdir"/usr/share/zabbix/$i
+ done
return 0
}
-pgsql() { _do_db pgsql; }
+pgsql() { _do_db postgresql; }
mysql() { _do_db mysql; }
sqlite() { _do_db sqlite3; }
@@ -119,9 +125,9 @@ utils() {
pkgdesc="Zabbix client utilities"
depends=
mkdir -p "$subpkgdir"/usr/bin
- mv "$_builddir-pgsql"/src/zabbix_get/zabbix_get \
+ mv "$_builddir-postgresql"/src/zabbix_get/zabbix_get \
"$subpkgdir"/usr/bin
- mv "$_builddir-pgsql"/src/zabbix_sender/zabbix_sender \
+ mv "$_builddir-postgresql"/src/zabbix_sender/zabbix_sender \
"$subpkgdir"/usr/bin
}
@@ -144,20 +150,20 @@ agent() {
install -D -m0755 "$srcdir"/zabbix-agentd.initd \
"$subpkgdir"/etc/init.d/zabbix-agentd
mkdir -p "$subpkgdir"/usr/sbin
- mv "$_builddir-pgsql"/src/zabbix_agent/zabbix_agent \
+ mv "$_builddir-postgresql"/src/zabbix_agent/zabbix_agent \
"$subpkgdir"/usr/sbin/
- mv "$_builddir-pgsql"/src/zabbix_agent/zabbix_agentd \
+ mv "$_builddir-postgresql"/src/zabbix_agent/zabbix_agentd \
"$subpkgdir"/usr/sbin/
}
-md5sums="610b898e4a0560c924b9b5bf049e4254 zabbix-1.8.12.tar.gz
+md5sums="d34d398beddee0eaa999789100cf74e3 zabbix-2.0.0.tar.gz
26b0401a83bdb1dce29338e5b2786620 zabbix_server.conf
9832a81e134c8e2c11e2a06b7adbf88f zabbix_trapper.conf
0310b92afb3f35c1075fff53db737212 zabbix_proxy.conf
721c18077fa739f956340afca9f067f4 zabbix_agentd.conf
-a55a4d0b2e13c97c280006ba4bee0afa zabbix-dn_skipname.patch
8d1d2e53479173aac0df0c38a4d6afda zabbix-getloadavg.patch
+b80eca2e260cc9e563f4b7a1b30bb158 res_send.patch
d823c2ab6c2bbdd0ebd3511fac4a83b4 zabbix-server.initd
1a5c718bcf815fcf659e14fb0b576a1a zabbix-agentd.initd
a99978139481e69434f78fc3e8c53441 zabbix-proxy.initd"
diff --git a/main/zabbix/res_send.patch b/main/zabbix/res_send.patch
new file mode 100644
index 0000000000..6e0592a2a4
--- /dev/null
+++ b/main/zabbix/res_send.patch
@@ -0,0 +1,41 @@
+Index: src/libs/zbxsysinfo/common/net.c
+===================================================================
+--- ./src/libs/zbxsysinfo/common/net.c (revision 28283)
++++ ./src/libs/zbxsysinfo/common/net.c (working copy)
+@@ -418,6 +418,7 @@
+ #else /* not _WINDOWS */
+ res_init(); /* initialize always, settings might have changed */
+
++#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))))
+ return SYSINFO_RET_FAIL;
+
+@@ -436,7 +437,12 @@
+ _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
++
+ hp = (HEADER *)answer.buffer;
+
+ if (1 == short_answer)
+Index: configure.in
+===================================================================
+--- ./configure.in (revision 28283)
++++ ./configure.in (working copy)
+@@ -149,6 +149,10 @@
+ AC_MSG_ERROR([Unable to DNS lookup functions "${found_resolv}"])
+ 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 * *
diff --git a/main/zabbix/zabbix-dn_skipname.patch b/main/zabbix/zabbix-dn_skipname.patch
deleted file mode 100644
index 5d20639713..0000000000
--- a/main/zabbix/zabbix-dn_skipname.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff --git a/src/libs/zbxsysinfo/common/net.c b/src/libs/zbxsysinfo/common/net.c
-index c8956a6..645fd8c 100644
---- a/src/libs/zbxsysinfo/common/net.c
-+++ b/src/libs/zbxsysinfo/common/net.c
-@@ -26,6 +26,39 @@
-
- #include "net.h"
-
-+#if defined(__UCLIBC__)
-+/*
-+ * Skip over a compressed domain name. Return the size or -1.
-+ */
-+int
-+dn_skipname(const u_char *comp_dn, const u_char *eom)
-+{
-+ const u_char *cp;
-+ int n;
-+
-+ cp = comp_dn;
-+ while (cp < eom && (n = *cp++)) {
-+ /*
-+ * check for indirection
-+ */
-+ switch (n & INDIR_MASK) {
-+ case 0: /* normal case, n == len */
-+ cp += n;
-+ continue;
-+ case INDIR_MASK: /* indirection */
-+ cp++;
-+ break;
-+ default: /* illegal type */
-+ return (-1);
-+ }
-+ break;
-+ }
-+ if (cp > eom)
-+ return (-1);
-+ return (cp - comp_dn);
-+}
-+#endif
-+
- /*
- * 0 - NOT OK
- * 1 - OK