summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Marlowe <mattm@gentoo.org>2012-04-09 05:51:43 +0000
committerMatthew Marlowe <mattm@gentoo.org>2012-04-09 05:51:43 +0000
commit9694a0a6f5dbc00d25786b4d99e9ad1ffc4a8315 (patch)
tree0f42c9b2d166ee7e21a9c66621a67ae67d5c52bd /net-analyzer/zabbix
parentAdd optional dependency on dev-python/coverage, #388443. (diff)
downloadhistorical-9694a0a6f5dbc00d25786b4d99e9ad1ffc4a8315.tar.gz
historical-9694a0a6f5dbc00d25786b4d99e9ad1ffc4a8315.tar.bz2
historical-9694a0a6f5dbc00d25786b4d99e9ad1ffc4a8315.zip
Fixed bug# 411225 which addresses support for database content monitoring via ODBC. Added support for iodbc and odbc use flags. Reviewed all other use flags and relevant descriptions in metadata.xml. Clarified some entries. Allow those who want to build static zabbix binaries to do so.
Package-Manager: portage-2.1.10.56/cvs/Linux x86_64
Diffstat (limited to 'net-analyzer/zabbix')
-rw-r--r--net-analyzer/zabbix/ChangeLog14
-rw-r--r--net-analyzer/zabbix/Manifest19
-rw-r--r--net-analyzer/zabbix/metadata.xml6
-rw-r--r--net-analyzer/zabbix/zabbix-1.8.11-r1.ebuild332
4 files changed, 359 insertions, 12 deletions
diff --git a/net-analyzer/zabbix/ChangeLog b/net-analyzer/zabbix/ChangeLog
index d65f53cfca49..1ac69a111acf 100644
--- a/net-analyzer/zabbix/ChangeLog
+++ b/net-analyzer/zabbix/ChangeLog
@@ -1,6 +1,18 @@
# ChangeLog for net-analyzer/zabbix
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/ChangeLog,v 1.81 2012/03/21 06:01:49 mattm Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/ChangeLog,v 1.82 2012/04/09 05:51:43 mattm Exp $
+
+ 09 Apr 2012; Matthew Marlowe <mattm@gentoo.org> +zabbix-1.8.11-r1.ebuild,
+ metadata.xml:
+ Added support for static binary build and reviewed all use flags and
+ clarified descriptions in metadata
+
+*zabbix-1.8.11-r1 (09 Apr 2012)
+
+ 09 Apr 2012; Matthew Marlowe <mattm@gentoo.org> +zabbix-1.8.11-r1.ebuild,
+ metadata.xml:
+ add support for odbc and iodbc use flags to enable zabbix database monitoring
+ with either unixodbc or iodbc libraries
21 Mar 2012; Matthew Marlowe <mattm@gentoo.org>
-files/zabbix-1.8.2-as-needed.patch, -files/zabbix-1.8.3-as-needed.patch,
diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest
index 2b18b8ee7bf7..9b0b8bca67ad 100644
--- a/net-analyzer/zabbix/Manifest
+++ b/net-analyzer/zabbix/Manifest
@@ -29,17 +29,18 @@ DIST zabbix-1.8.10.tar.gz 4217417 RMD160 96e776956d7055f99458314dbb931be5d1f9a97
DIST zabbix-1.8.11.tar.gz 4224738 RMD160 d2e8749a43b0846a7bc93a21c6546dad0d66b678 SHA1 2efb94e0b57f1ddbb38ef3f8da225d88effb0689 SHA256 c45819b97082799bb253e4c6a3937affd07a2cd2744d860d657107aa4a3e772b
EBUILD zabbix-1.8.10-r1.ebuild 8161 RMD160 b62ec935694c559d4fd1a02c270e1957e6f027b7 SHA1 90e518d4be861758870103553184e4bb6c6f1ec4 SHA256 79a8f426499fb9e0d131e7ec78d4f2da56ea3fc22a45c330e23cf568c18148d5
EBUILD zabbix-1.8.10-r2.ebuild 8167 RMD160 43e67575801ed253ac3858c1ae066acfedbb8aa8 SHA1 96525b3b9b0fa9c44877480f47e21453eb95a929 SHA256 facc46552511754d96281c502988cf147708fb7cb1ad66f9d37f86bc8792784c
+EBUILD zabbix-1.8.11-r1.ebuild 8506 RMD160 0d717f3add5a2f73287b63334042cce627e794a6 SHA1 0ec2bbcee8a2f703fc33eefe2d4d33cbd0f1c508 SHA256 0300d0ee707a7a50f9b027a4b9f3bab81c695b2b767759bec834bb5cbc628ce8
EBUILD zabbix-1.8.11.ebuild 8114 RMD160 2d80d2e73501096a5774c03968c6e086aef698aa SHA1 57770f513980bae90ce4c8f147f29549b8504eda SHA256 fb0c86e6369b249945df479e2c0feb78cb50d9672212de9e842c5ff64ad77956
-MISC ChangeLog 18043 RMD160 95f02ec85a8d86a63449d79291c6065bc93214a6 SHA1 b2f3eb8ceaf65f246a0c0517e5a15fd12654c3b6 SHA256 0f3323e0d6b339e995779e7f21403adecdc22b5f14388eadde82520111975416
-MISC metadata.xml 902 RMD160 855ca31ebc8bbe4fe4165da544c53bd7c096e5e0 SHA1 8c2f1f99b3dfad50da24bcc27963559cdb6f8518 SHA256 21dc542955656eccf41cf5cb11ed6d92155dd948c3f5ea60dddc2ff8a4934ad3
+MISC ChangeLog 18492 RMD160 43a72734dc27e201af18af3c191df3d2006adba0 SHA1 6ae445246381123ca16b1d7ace38cba4c008430a SHA256 1f5ef11271750e718f2a0c779c557ea58d19791019c18200b5792f4c67a69a0b
+MISC metadata.xml 1124 RMD160 2a35a1a699b77bee194104b41f00ed0fa012c73f SHA1 4a9412e13311be49d508547cd8dabd21e9d9739f SHA256 1b571c8c32c799251116c7ece845e97afd48a4bfa99b01410a580e83175aa521
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
-iQEcBAEBAgAGBQJPaW7YAAoJEC1LWXx4YDenUuUH/iaYKXoc7dmCe+8WImTewCCE
-WmhVjXx5t9xBWZ8AYIwDl3rCh5boyvtsfW+rz9mcmx868djZ9re7+yBejgnlzx1j
-MLj/uGk2I4zXBjQ04HzPu+yx4/p9DtU9gWt0kScZ0TLFsIy2qqY0jJUIclNJF/Nm
-wrKllDsBcM12cAB8VF40TJOt05pCVyB/dFooiAlypkNTpqXBfywOb/Xsz6YxfXDq
-2u9jGiq3Z2QKD9C/Py3gIHGFN7RAl1tImp98/w+cN02gEccpge8Egnr452Zxk4DV
-cQhpiGGTKQRgkz5E+HEjTeabPFTIKFiTekxV9JGXk77+zuXtSp3sNHEzfKkyeLc=
-=3p6a
+iQEcBAEBAgAGBQJPgnj8AAoJEC1LWXx4YDenaqIH/154Rb6PI0fYpUP29nbY56c2
+MuMDNmVkwOaGkmZ9r56B+3rQPSOxSXvMxTC/bj8m4bCHdnEcqBxUvRV8AJdpfP5u
+vt7ijDLhMqQwnLzXxFbC7u5MPoXxH2FixSU1XQRw/b0l5Eauwd7HDMDjRYfeu3Q7
+o6lJAXu6yFn1OlxaG5qpKH2I8+uV00MjGEaAzIlJ9D28B//Hzhj7eJs/qyRfPzk1
+4SY6Jhwpw8OgTQ8dTIugtQuG/ksAW2N+xeQfTUk7INP0Cb1g+jb+HtugrfRJEulT
+fSWp4WjHJvQOWPjYxzeKkCxE4u5VvOsA4eTrz2uvx2XX0+26wffwjeTRtoxCRTM=
+=s87A
-----END PGP SIGNATURE-----
diff --git a/net-analyzer/zabbix/metadata.xml b/net-analyzer/zabbix/metadata.xml
index eb85777590e6..629f28a58fff 100644
--- a/net-analyzer/zabbix/metadata.xml
+++ b/net-analyzer/zabbix/metadata.xml
@@ -17,7 +17,9 @@ configure different types of notifications for pre-defined events.
<flag name='proxy'>Enable proxy support</flag>
<flag name='openipmi'>Enable openipmi things</flag>
<flag name='server'>Enable zabbix server</flag>
- <flag name='ssh'>Enable ssh.run items</flag>
-
+ <flag name='ssh'>SSH v2 based checks</flag>
+ <flag name='odbc'>Enable Database Monitor and use UnixODBC Library by default</flag>
+ <flag name='iodbc'>Use iodbc rather than unixodbc for ODBC functions</flag>
+ <flag name='static'>Build statically linked binaries</flag>
</use>
</pkgmetadata>
diff --git a/net-analyzer/zabbix/zabbix-1.8.11-r1.ebuild b/net-analyzer/zabbix/zabbix-1.8.11-r1.ebuild
new file mode 100644
index 000000000000..635a7a6252cd
--- /dev/null
+++ b/net-analyzer/zabbix/zabbix-1.8.11-r1.ebuild
@@ -0,0 +1,332 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.11-r1.ebuild,v 1.1 2012/04/09 05:51:43 mattm Exp $
+
+EAPI="2"
+
+# needed to make webapp-config dep optional
+WEBAPP_OPTIONAL="yes"
+inherit eutils flag-o-matic webapp depend.php autotools
+
+DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers."
+HOMEPAGE="http://www.zabbix.com/"
+MY_P=${P/_/}
+SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+WEBAPP_MANUAL_SLOT="yes"
+KEYWORDS="~amd64 ~x86"
+IUSE="agent curl frontend ipv6 jabber ldap mysql openipmi oracle postgres proxy server ssh snmp +sqlite iodbc odbc static"
+
+COMMON_DEPEND="snmp? ( net-analyzer/net-snmp )
+ ldap? (
+ net-nds/openldap
+ =dev-libs/cyrus-sasl-2*
+ net-libs/gnutls
+ )
+ mysql? ( virtual/mysql )
+ sqlite? ( =dev-db/sqlite-3* )
+ postgres? ( dev-db/postgresql-base )
+ oracle? ( dev-db/oracle-instantclient-basic )
+ jabber? ( dev-libs/iksemel )
+ curl? ( net-misc/curl )
+ openipmi? ( sys-libs/openipmi )
+ ssh? ( net-libs/libssh2 )
+ odbc? (
+ iodbc? ( dev-db/libiodbc )
+ !iodbc? ( dev-db/unixODBC )
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ proxy? ( net-analyzer/fping )
+ server? ( net-analyzer/fping
+ app-admin/webapp-config )
+ frontend? ( dev-lang/php[bcmath,ctype,sockets,gd,truetype,xml,session]
+ media-libs/gd[png]
+ app-admin/webapp-config )"
+DEPEND="${COMMON_DEPEND}
+ dev-util/pkgconfig"
+
+use frontend && need_php_httpd
+
+src_prepare() {
+ eautoreconf
+}
+
+pkg_setup() {
+ if use server || use proxy ; then
+ local dbnum dbtypes="mysql oracle postgres sqlite" dbtype
+ declare -i dbnum=0
+ for dbtype in ${dbtypes}; do
+ use ${dbtype} && let dbnum++
+ done
+ if [ ${dbnum} -gt 1 ]; then
+ eerror
+ eerror "You can't use more than one database type in Zabbix."
+ eerror "Select exactly one database type out of these: ${dbtypes}"
+ eerror
+ die "Multiple database types selected."
+ elif [ ${dbnum} -lt 1 ]; then
+ eerror
+ eerror "Select exactly one database type out of these: ${dbtypes}"
+ eerror
+ die "No database type selected."
+ fi
+ if use oracle; then
+ if [ -z "${ORACLE_HOME}" ]; then
+ eerror
+ eerror "The environment variable ORACLE_HOME must be set"
+ eerror "and point to the correct location."
+ eerror "It looks like you don't have Oracle installed."
+ eerror
+ die "Environment variable ORACLE_HOME is not set"
+ fi
+ if has_version 'dev-db/oracle-instantclient-basic'; then
+ ewarn
+ ewarn "Please ensure you have a full install of the Oracle client."
+ ewarn "dev-db/oracle-instantclient* is NOT sufficient."
+ ewarn
+ fi
+ fi
+ fi
+
+ if use frontend; then
+ webapp_pkg_setup
+ fi
+
+ enewgroup zabbix
+ enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix
+}
+
+pkg_postinst() {
+ if use server || use proxy ; then
+ elog
+ elog "You need to configure your database for Zabbix."
+ elog
+ elog "Have a look at /usr/share/zabbix/database for"
+ elog "database creation and upgrades."
+ elog
+ elog "For more info read the Zabbix manual at"
+ elog "http://www.zabbix.com/documentation.php"
+ elog
+
+ zabbix_homedir=$(egethome zabbix)
+ if [ -n "${zabbix_homedir}" ] && \
+ [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
+ ewarn
+ ewarn "The user 'zabbix' should have his homedir changed"
+ ewarn "to /var/lib/zabbix/home if you want to use"
+ ewarn "custom alert scripts."
+ ewarn
+ ewarn "A real homedir might be needed for configfiles"
+ ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when"
+ ewarn "using sendxmpp for Jabber alerts)."
+ ewarn
+ ewarn "To change the homedir use:"
+ ewarn " usermod -d /var/lib/zabbix/home zabbix"
+ ewarn
+ fi
+ fi
+
+ if use server; then
+ elog
+ elog "For distributed monitoring you have to run:"
+ elog
+ elog "zabbix_server -n <nodeid>"
+ elog
+ elog "This will convert database data for use with Node ID"
+ elog "and also adds a local node."
+ elog
+ fi
+
+ elog "--"
+ elog
+ elog "Add these lines in the /etc/services :"
+ elog
+ elog "zabbix-agent 10050/tcp Zabbix Agent"
+ elog "zabbix-agent 10050/udp Zabbix Agent"
+ elog "zabbix-trapper 10051/tcp Zabbix Trapper"
+ elog "zabbix-trapper 10051/udp Zabbix Trapper"
+ elog
+
+ # repeat fowners/fperms functionality from src_install()
+ # here to catch wrong permissions on existing files in
+ # the live filesystem (yeah, that sucks).
+ chown -R zabbix:zabbix \
+ "${ROOT}"/etc/zabbix \
+ "${ROOT}"/var/lib/zabbix \
+ "${ROOT}"/var/lib/zabbix/home \
+ "${ROOT}"/var/lib/zabbix/scripts \
+ "${ROOT}"/var/log/zabbix \
+ "${ROOT}"/var/run/zabbix
+ chmod 0750 \
+ "${ROOT}"/etc/zabbix \
+ "${ROOT}"/var/lib/zabbix \
+ "${ROOT}"/var/lib/zabbix/home \
+ "${ROOT}"/var/lib/zabbix/scripts \
+ "${ROOT}"/var/log/zabbix \
+ "${ROOT}"/var/run/zabbix
+
+ chmod 0640 \
+ "${ROOT}"/etc/zabbix/zabbix_*
+
+ if use server || use proxy ; then
+ # check for fping
+ fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
+ case "${fping_perms}" in
+ 4[157][157][157])
+ ;;
+ *)
+ ewarn
+ ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
+ ewarn "you have to make /usr/sbin/fping setuid root and executable"
+ ewarn "by everyone. Run the following command to fix it:"
+ ewarn
+ ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
+ ewarn
+ ewarn "Please be aware that this might impose a security risk,"
+ ewarn "depending on the code quality of fping."
+ ewarn
+ ebeep 3
+ epause 5
+ ;;
+ esac
+ fi
+}
+
+src_configure() {
+
+ local myconf
+
+ if use odbc && use iodbc ; then
+ myconf="${myconf} --with-iodbc --without-unixodbc"
+ elif use odbc && ! use iodbc; then
+ myconf="${myconf} --with-unixodbc --without-iodbc"
+ else
+ myconf="${myconf} --without-unixodbc --without-iodbc"
+ fi
+
+ econf \
+ $myconf \
+ $(use_enable server) \
+ $(use_enable proxy) \
+ $(use_enable agent) \
+ $(use_enable ipv6) \
+ $(use_enable static) \
+ $(use_with ldap) \
+ $(use_with snmp net-snmp) \
+ $(use_with mysql) \
+ $(use_with postgres pgsql) \
+ $(use_with oracle) \
+ $(use_with sqlite sqlite3) \
+ $(use_with jabber) \
+ $(use_with curl libcurl) \
+ $(use_with openipmi openipmi) \
+ $(use_with ssh ssh2) \
+ || die "econf failed"
+}
+
+src_install() {
+ dodir \
+ /etc/zabbix \
+ /var/lib/zabbix \
+ /var/lib/zabbix/home \
+ /var/lib/zabbix/scripts \
+ /var/log/zabbix \
+ /var/run/zabbix
+
+ keepdir \
+ /etc/zabbix \
+ /var/lib/zabbix \
+ /var/lib/zabbix/home \
+ /var/lib/zabbix/scripts \
+ /var/log/zabbix \
+ /var/run/zabbix
+
+ if use server; then
+ insinto /etc/zabbix
+ doins \
+ "${FILESDIR}/1.6.6"/zabbix_server.conf \
+ "${FILESDIR}/1.6.6"/zabbix_trapper.conf
+ doinitd \
+ "${FILESDIR}/1.6.6"/init.d/zabbix-server
+ dosbin \
+ src/zabbix_server/zabbix_server
+ dodir \
+ /usr/share/zabbix/database
+ insinto /usr/share/zabbix/database
+ doins -r \
+ upgrades \
+ create
+ fowners zabbix:zabbix \
+ /etc/zabbix/zabbix_server.conf \
+ /etc/zabbix/zabbix_trapper.conf
+ fperms 0640 \
+ /etc/zabbix/zabbix_server.conf \
+ /etc/zabbix/zabbix_trapper.conf
+ fi
+
+ if use proxy; then
+ doinitd \
+ "${FILESDIR}/1.6.6"/init.d/zabbix-proxy
+ dosbin \
+ src/zabbix_proxy/zabbix_proxy
+ insinto /etc/zabbix
+ doins \
+ "${FILESDIR}/1.6.6"/zabbix_proxy.conf
+ dodir \
+ /usr/share/zabbix/database
+ insinto /usr/share/zabbix/database
+ doins -r \
+ upgrades \
+ create
+ fi
+
+ if use agent; then
+ insinto /etc/zabbix
+ doins \
+ "${FILESDIR}/1.6.6"/zabbix_agent.conf \
+ "${FILESDIR}/1.6.6"/zabbix_agentd.conf
+ doinitd \
+ "${FILESDIR}/1.6.6"/init.d/zabbix-agentd
+ dosbin \
+ src/zabbix_agent/zabbix_agent \
+ src/zabbix_agent/zabbix_agentd
+ dobin \
+ src/zabbix_sender/zabbix_sender \
+ src/zabbix_get/zabbix_get
+ fowners zabbix:zabbix \
+ /etc/zabbix/zabbix_agent.conf \
+ /etc/zabbix/zabbix_agentd.conf
+ fperms 0640 \
+ /etc/zabbix/zabbix_agent.conf \
+ /etc/zabbix/zabbix_agentd.conf
+ fi
+
+ fowners zabbix:zabbix \
+ /etc/zabbix \
+ /var/lib/zabbix \
+ /var/lib/zabbix/home \
+ /var/lib/zabbix/scripts \
+ /var/log/zabbix \
+ /var/run/zabbix
+ fperms 0750 \
+ /etc/zabbix \
+ /var/lib/zabbix \
+ /var/lib/zabbix/home \
+ /var/lib/zabbix/scripts \
+ /var/log/zabbix \
+ /var/run/zabbix
+
+ dodoc README INSTALL NEWS ChangeLog
+
+ if use frontend; then
+ webapp_src_preinst
+ cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}"
+ webapp_postinst_txt en "${FILESDIR}/"1.6.6/postinstall-en.txt
+ webapp_configfile \
+ "${MY_HTDOCSDIR}"/include/db.inc.php \
+ "${MY_HTDOCSDIR}"/include/config.inc.php
+ webapp_src_install
+ fi
+}