summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Marlowe <mattm@gentoo.org>2011-10-09 05:08:28 +0000
committerMatthew Marlowe <mattm@gentoo.org>2011-10-09 05:08:28 +0000
commit5a9d6eea84e2e7e7865b352d8a34584852ad3b9d (patch)
tree1660c934cabd1fc5376f6c80d2aab6078c97e7e3 /net-analyzer/zabbix
parentImport from Science overlay and rewrite (diff)
downloadhistorical-5a9d6eea84e2e7e7865b352d8a34584852ad3b9d.tar.gz
historical-5a9d6eea84e2e7e7865b352d8a34584852ad3b9d.tar.bz2
historical-5a9d6eea84e2e7e7865b352d8a34584852ad3b9d.zip
Fix oracle use flag dependencies for Zabbix 1.8.7 and 1.8.8 per Bug #386457
Package-Manager: portage-2.1.10.22/cvs/Linux x86_64
Diffstat (limited to 'net-analyzer/zabbix')
-rw-r--r--net-analyzer/zabbix/ChangeLog9
-rw-r--r--net-analyzer/zabbix/Manifest16
-rw-r--r--net-analyzer/zabbix/zabbix-1.8.7-r1.ebuild315
-rw-r--r--net-analyzer/zabbix/zabbix-1.8.8-r1.ebuild315
4 files changed, 649 insertions, 6 deletions
diff --git a/net-analyzer/zabbix/ChangeLog b/net-analyzer/zabbix/ChangeLog
index 7b8a2c744e23..d57d0fab4fb6 100644
--- a/net-analyzer/zabbix/ChangeLog
+++ b/net-analyzer/zabbix/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-analyzer/zabbix
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/ChangeLog,v 1.62 2011/10/08 19:34:59 phajdan.jr Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/ChangeLog,v 1.63 2011/10/09 05:08:28 mattm Exp $
+
+*zabbix-1.8.8-r1 (09 Oct 2011)
+*zabbix-1.8.7-r1 (09 Oct 2011)
+
+ 09 Oct 2011; Matthew Marlowe <mattm@gentoo.org> +zabbix-1.8.7-r1.ebuild,
+ +zabbix-1.8.8-r1.ebuild:
+ Fix oracle use flag dependencies for Zabbix 1.8.7 and 1.8.8 per Bug #386457
08 Oct 2011; Pawel Hajdan jr <phajdan.jr@gentoo.org> zabbix-1.8.7.ebuild:
x86 stable wrt security bug #386175
diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest
index f1c6c54b44a1..7aafccba7f29 100644
--- a/net-analyzer/zabbix/Manifest
+++ b/net-analyzer/zabbix/Manifest
@@ -1,5 +1,5 @@
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA512
+Hash: SHA1
AUX 1.4.6/init.d/zabbix-agentd 582 RMD160 051a6bf6e8d8181258f99ddb3964881ff78d0954 SHA1 757d60d5f681ea9dd2c32347f6eb787d2c23a5ce SHA256 e6b10adda63ff234bd3c11fd19fd30970dcbda292b2fcfa1c382d9d0b7a795f1
AUX 1.4.6/init.d/zabbix-server 564 RMD160 f05bfbcbfc163db19076656e995ddc72fbb7a78e SHA1 141f08ae3966fd935df89589eea62554c3b69bb3 SHA256 eb5ea05e53d8bbf502cf3f6b873c9275dba793446b0f5ab11ed7a169d757b3c9
@@ -37,16 +37,22 @@ DIST zabbix-1.9.5.tar.gz 6321068 RMD160 ec607d019d926e44d4755afca331bef190386217
EBUILD zabbix-1.8.3.ebuild 8118 RMD160 f256bdf8b859a37dfa49178765cd9a0666a927fc SHA1 65ced1c2a92225849956618db9b3474564938bc1 SHA256 3f55306944c6d1ec5adbc1b1ade1aea196c02cd32c05d2f52486690018c13c77
EBUILD zabbix-1.8.5.ebuild 8124 RMD160 0a3c1c36db5bb3c7c3f384c5cd9a8e39fe9d798e SHA1 7651512da9bdc4a081f3bfa594dd69fe34ab439c SHA256 48012774399ac86849b615b40d05c30a6d2fdf7118ccebdb264df61626bb9c6c
EBUILD zabbix-1.8.6.ebuild 8122 RMD160 e03017a44059f6affe79bf1e36fce72ba32913ae SHA1 6cc45f8cb947efb540e1cc89cc5ba9cf5a5155d6 SHA256 613c10b78fd9413c4c70f90f068b16e267334ea709c5d5ff22499703eeb6dc54
+EBUILD zabbix-1.8.7-r1.ebuild 8171 RMD160 f8944fffa757ddd61ba150ecdbfc8d643e2f727d SHA1 5e1c57754a04e52783c10d93c845d909a85f5db7 SHA256 9ca8927de1f5cfa5dc8a3fac2334ca60fe31fefef5565a4321a276e0bbd483b3
EBUILD zabbix-1.8.7.ebuild 8125 RMD160 1b791d97a715bfeb577c1f00dd6f311518583d92 SHA1 ad340f52f04866a604e312807f3b61ef5c3e0155 SHA256 1133418555de2284c25895d33f025df408c3cda78aa49b17340237849859e906
+EBUILD zabbix-1.8.8-r1.ebuild 8171 RMD160 4c0cedf03997d12025c1f4e035befdcb793e4de1 SHA1 e0acbde2dbfdd28fdd8ea6e99f9d68a3c3f19993 SHA256 9a425bbd578f40cb715dbcf4f714f695c80f111b45f2a33fecda417fd13a0e27
EBUILD zabbix-1.8.8.ebuild 8121 RMD160 5bb4ca5dd45068a25c349798425102f969554f0a SHA1 61aab36c053d5e83b095ff24d9f930247fec94ee SHA256 2c671d83a6bd0d7cba10713847d745a080090c8341adca7395c66a2be551a3ee
EBUILD zabbix-1.9.4.ebuild 8115 RMD160 18c3265f38f04a844787a4182669b330c473d170 SHA1 c12cdd8d1b02e191058e9382c1e2deb402d885c0 SHA256 31f60b965a9051cc9ad7e32f94fb249fd4542a07488ee21b838b4ae3da85cdbf
EBUILD zabbix-1.9.5.ebuild 8115 RMD160 ec34aa9a3b211e61e96867421fb0fdd14c367681 SHA1 59900f4498d454c59afc153ca424ac1fa21a274c SHA256 e48d6ed515fdf854c3572486c66305cdcec8c8c31ca2565a6ba1eec7429821d6
-MISC ChangeLog 12879 RMD160 cd16facae9681e3c98163dedb5ad4e8f519f856d SHA1 94ad2d2872e38231d91da23b38905ca94ababd47 SHA256 3bbf3b42ed2067f9edca3d689948f41b0ebb057670856969fc6735b50e9e22b1
+MISC ChangeLog 13118 RMD160 aec1c668c6e3da5c88b91f2f8f60f80b12e3c47e SHA1 097030b3e2dbf85fa4e11711f77ef9db2ef33237 SHA256 a6aa349de08cb5d55ff0f57c20db77a4febd88639ee910582b237447316c6a2d
MISC metadata.xml 990 RMD160 edaffb17a34b9015c48eaf1ae61ef676b9bfdf63 SHA1 1eb2d630b542283f5460a49327dc93fee2de5663 SHA256 b5f00181c6943bf7dc15acf9b7dd21453d7cc0402a55bb2385b3fc0de6520f6f
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
-iEYEAREKAAYFAk6QpekACgkQuUQtlDBCeQJdjgCcDeIM6/YxpNFwTVOjQhSFr/iN
-UAMAnRP8UalPr4TX0JLn9D5LUBdcFuqU
-=NIUw
+iQEcBAEBAgAGBQJOkSxZAAoJEC1LWXx4YDenZzMIAITNd06qeDSQYS6B7+Ldj79W
+HB8N/Cky/Uq263Cug3sKq6V22WnU7UEA2UEn+2ArKaEQ9XEYR+aqoZ+1CfHSqAsS
+TyFqBqDRwnEPcILAFEKTL40q+XkYtygJ9wnEB2MY1jQqOnA9WnH7YEqL5EpJ192O
+1TDRsZpas7RWIiWfcsw/zhMs8l7H1DBHW5gyg3txjWfN8pmnhWKJliie/wqHVXox
+4Y3S0j/K3fy1Ktih6z9N59x12yr975Kpu0X4IdToXZXrH79oIDAGF4joiYQWK7lM
+EqfRrd0KeFYGHuVsD1lXGOW7PgLAWCqFFiSZOJRfyIQSsnR7DWcB4qsFroPgleM=
+=J/n8
-----END PGP SIGNATURE-----
diff --git a/net-analyzer/zabbix/zabbix-1.8.7-r1.ebuild b/net-analyzer/zabbix/zabbix-1.8.7-r1.ebuild
new file mode 100644
index 000000000000..825c70cbdaef
--- /dev/null
+++ b/net-analyzer/zabbix/zabbix-1.8.7-r1.ebuild
@@ -0,0 +1,315 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.7-r1.ebuild,v 1.1 2011/10/09 05:08:28 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/"
+SRC_URI="http://prdownloads.sourceforge.net/zabbix/${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 +sqlite3"
+
+COMMON_DEPEND="snmp? ( net-analyzer/net-snmp )
+ ldap? (
+ net-nds/openldap
+ =dev-libs/cyrus-sasl-2*
+ net-libs/gnutls
+ )
+ mysql? ( virtual/mysql )
+ sqlite3? ( =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 )"
+
+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() {
+ epatch "${FILESDIR}/${PN}-1.8.3-as-needed.patch"
+ eautoreconf
+}
+
+pkg_setup() {
+ if use server || use proxy ; then
+ local dbnum dbtypes="mysql oracle postgres sqlite3" 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="$(egetent passwd zabbix | cut -d : -f 6 )"
+ 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() {
+ econf \
+ $(use_enable server) \
+ $(use_enable proxy) \
+ $(use_enable agent) \
+ $(use_enable ipv6) \
+ $(use_with ldap) \
+ $(use_with snmp net-snmp) \
+ $(use_with mysql) \
+ $(use_with postgres pgsql) \
+ $(use_with oracle) \
+ $(use_with 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
+}
diff --git a/net-analyzer/zabbix/zabbix-1.8.8-r1.ebuild b/net-analyzer/zabbix/zabbix-1.8.8-r1.ebuild
new file mode 100644
index 000000000000..a818e715e924
--- /dev/null
+++ b/net-analyzer/zabbix/zabbix-1.8.8-r1.ebuild
@@ -0,0 +1,315 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/zabbix-1.8.8-r1.ebuild,v 1.1 2011/10/09 05:08:28 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/"
+SRC_URI="http://prdownloads.sourceforge.net/zabbix/${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 +sqlite3"
+
+COMMON_DEPEND="snmp? ( net-analyzer/net-snmp )
+ ldap? (
+ net-nds/openldap
+ =dev-libs/cyrus-sasl-2*
+ net-libs/gnutls
+ )
+ mysql? ( virtual/mysql )
+ sqlite3? ( =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 )"
+
+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() {
+ epatch "${FILESDIR}/${PN}-1.8.3-as-needed.patch"
+ eautoreconf
+}
+
+pkg_setup() {
+ if use server || use proxy ; then
+ local dbnum dbtypes="mysql oracle postgres sqlite3" 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="$(egetent passwd zabbix | cut -d : -f 6 )"
+ 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() {
+ econf \
+ $(use_enable server) \
+ $(use_enable proxy) \
+ $(use_enable agent) \
+ $(use_enable ipv6) \
+ $(use_with ldap) \
+ $(use_with snmp net-snmp) \
+ $(use_with mysql) \
+ $(use_with postgres pgsql) \
+ $(use_with oracle) \
+ $(use_with 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
+}