From: Matthew Marlowe Date: Mon, 2 Feb 2015 19:29:32 +0000 (+0000) Subject: Bumping Zabbix 2.0.14, 2.2.8, and 2.4.3 to accomodate security bug 534606. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a91f8e99045e249f88e3c99212292cb474b06aa7;p=gentoo.git Bumping Zabbix 2.0.14, 2.2.8, and 2.4.3 to accomodate security bug 534606. Package-Manager: portage-2.2.15/cvs/Linux x86_64 --- diff --git a/net-analyzer/zabbix/ChangeLog b/net-analyzer/zabbix/ChangeLog index de1175dc046d..e22368f7530e 100644 --- a/net-analyzer/zabbix/ChangeLog +++ b/net-analyzer/zabbix/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-analyzer/zabbix -# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/ChangeLog,v 1.175 2014/12/28 16:12:30 titanofold Exp $ +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/ChangeLog,v 1.176 2015/02/02 19:29:17 mattm Exp $ + +*zabbix-2.0.14 (02 Feb 2015) +*zabbix-2.4.3 (02 Feb 2015) +*zabbix-2.2.8 (02 Feb 2015) + + 02 Feb 2015; Matthew Marlowe +zabbix-2.0.14.ebuild, + +zabbix-2.2.8.ebuild, +zabbix-2.4.3.ebuild: + Bumping Zabbix 2.0.14, 2.2.8, and 2.4.3 to accomodate security bug 534606. 28 Dec 2014; Aaron W. Swenson zabbix-2.0.12-r1.ebuild, zabbix-2.0.13.ebuild, zabbix-2.2.5.ebuild, diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest index 2c9464e07813..7889678d71d3 100644 --- a/net-analyzer/zabbix/Manifest +++ b/net-analyzer/zabbix/Manifest @@ -1,6 +1,3 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - AUX 1.4.6/init.d/zabbix-agentd 581 SHA256 5afaed3880c7f8d1a13d51d963f2758a0bc3ec982c667cc2aad9c84d44753452 SHA512 4d29435590d42374dc7428f09617ddbcc6e551850651f4d057a20b39689c041dcf3966b18efcec1c4478e44b9995ec3c55b1f3d3e27ba9ff5b96f0aef076da7a WHIRLPOOL 197096795bdb5387f62687b52894d86a10002a4e9bab11b28a71c3f0e575daebe6827d14b48983c9c0c3f49491a12751789ccc43e7e0e4e80ad60aac156eaf23 AUX 1.4.6/init.d/zabbix-server 563 SHA256 8c2bc6b7dc1fb80e6b24536f7acb7ba102975b345da055cc19e33adfcdb95976 SHA512 897134b640ed2bd070fa3c29b9fdda368f6451179908fcd00aa2ee8710ea64556e6fcc1592e40a7050b323b56b67837004c1411c326ff4024f949089f980429b WHIRLPOOL e84983ddd78c29f76d8aed51b54f63db70a00637b6102cab065e36178c01f227770e19d999e0fae201ea266178221f40e141fb010f8171c787e2d78da6767372 AUX 1.4.6/postinstall-en.txt 147 SHA256 3855cb33f7ca570a44e42d578894aba9ebe22fd2992f9f009ca954286f4ba38f SHA512 aa2dcda94d75c77a2369a45bc94011fb033589ed20230149e459658788d1cee5bf2fc80bdcec13702477dbff47639e1c6300e1f41ded134cad397333a1d3f329 WHIRLPOOL 33407c71a6fff74995761bdc59336dcd3835b6575ac6c84a534fae4e6ecbc2d364608bf249f71b0fde7c326eea16a064a00c1e3ca435f5898481212efcf67dab @@ -58,20 +55,19 @@ AUX zabbix-server.service 281 SHA256 53465d624fc5cd4d00586119234c2d3d763b63a2721 AUX zabbix-server.tmpfiles 35 SHA256 d0516a64ad0841dac41faf0ca709ff16405346f1e9d1bcb00dcffe37ac6b689b SHA512 3c63a2791e6ac77cb3144eb47a275cc8748f5c8943a076052300d6964994b95b18d60f504584fdcb683739dc514261402895e3f30ae2fbdb218acbc42c3d72df WHIRLPOOL f8a3202aa65ecdf733cd8f9208c294dd2086d4de11682c01bd18f7122b0c3d2e1e3da4775020beca68f5bb9be8e14f57c50b0c18ecbad3c2c23237d3572e3b39 DIST zabbix-2.0.12.tar.gz 13699618 SHA256 f9237297b37d41eb0ed4f0b2e1f3f2e30dc17fe19d3bbd57fb06d5f6f8acd8b7 SHA512 0b6b27eae51c991cfdc916dbcfc43e6425f44935ffb1a7fd642d0ee62813e2209a7be62ca6803b033a9371df054e3e102cc7d5591f488fb1e4f2b6b5f2977d04 WHIRLPOOL c153afc541661d54665238cc6b412d126372cbf08e2d867981976e28bb452c3c0602f1ed2387aa362b6ff3c0363e8e0d80ea519874703082691ba108e5ebbe26 DIST zabbix-2.0.13.tar.gz 13798473 SHA256 e4e98ddae2e01531a05d58d4795afe87b9f1c0b77d777b706afe2ae8e6e012e2 SHA512 bc8997edf956b987d4ecc4cefd1cedcceb666366257c57f186af02c7747d5b5a5ca0045c06c444970a957556dee8cb4c73c262e1716edd0989307893a8e0125e WHIRLPOOL 40d8c7d16497e2b8ba87bff0eff6c21d71ea67b38aaf083161124cfa6a46e778fc53691b3e120783feec33ba5e6f00d05aac6527502c717e2a4923c3583461d8 +DIST zabbix-2.0.14.tar.gz 13718062 SHA256 ee6ed7ac109cd3196309217137a8f8bd031e3c4e0696f1f1f4fa1957db0c6be1 SHA512 7b5074506fa3128452f0287ad8886f7b4eb7377081ec7548d4a5101866ab1c6fa7e9ba983b027630a1d6b46487e419707fa0b57be1bb79d232520d6645f63a60 WHIRLPOOL f7f05dacdc26bef4bbc37517b871ba726e55510e606706d755db0d40d46fd252d2ed024b1fc81131f8fc725cb44eedf6e905524c3ce26eb028161a221f682414 DIST zabbix-2.2.5.tar.gz 14960556 SHA256 1e33f54d4accc5b6a0dccf4a308d27dc82de245567dffef823f9add9fa7d81b5 SHA512 0e229a2502f1332775db2107556b5e62267bcdf05dc483957960f563877ed970aef7ed465123576849413305e54309d83eeb75dd1f522c93cf09cd4b75265514 WHIRLPOOL 0a6b81f4e23ad8c8247b5356aa31bc4dfbd364642a647b9dff3216a0141cd2287b75731f396d26083aa412669a7efdb6f24fcb8592b4773c4a21d02b2f369681 DIST zabbix-2.2.7.tar.gz 15029191 SHA256 95452ca314966ccfbccb0c5775873ab565fe1b545b51bb631074377fa0f156c6 SHA512 ad3e545d180914801f10bbf9f250a2a42d28d13d0b60cb65c772f6458b4ad71c4139e622e0b70aded32c83ad96c0837bad5ad229d76b146d93b598fea857645e WHIRLPOOL 9df8fcf952371eab1265e56ec964bc4cc36eb3362a4668bb0a814178c18b408b1e41ab733cc433f76a10d319eb2739c41f9be49e97c69efd86af64a832e92e08 +DIST zabbix-2.2.8.tar.gz 14939846 SHA256 abe8bb1f209d43718ee48c0d639f4e7966d451ea5e1dd1a82733c094b6471da2 SHA512 3448897982044ae054e9e994d8111c0c80bf6d2635bdb450f41ffce4fa5469e2c842a1a6297ad64bda5db1183a8de97c8da2b3fabec5f070fdc38bdceb4f9b8f WHIRLPOOL 17f23bbbac9f17dca6b1facfb8341ae85eca4201b6da08f9d1f3c19ef2b9e2c5657a5274e8af27149c71ebf85a3a43fd68cf7bfe64774b39cb667fbc9428a473 DIST zabbix-2.4.1.tar.gz 14730972 SHA256 e47b328c2babcc7c37b27c96732b5f6ac28a935901acf8a3d340887ba64bece4 SHA512 8cf19262503ade91188cc6a9653fd2f13c966cc2638b9c36f1ecfb989707fc991cfa3bfa487b0c8a230caa6e344105a4494fd3981d8b09c07048842369e71dc2 WHIRLPOOL 5907ef1eb71c175879e93be7151a1c313a5a90d05ffdd1a2189beb22133fa08d24fb72749e0e9a13fa7a6a5b3eb0470d0331e05cd15e2f77ffdb616d5aaf24ec +DIST zabbix-2.4.3.tar.gz 14712892 SHA256 3791a98cbb7c8906ad37c284a49a8be5f431e18c684bacd37bd32f7b4a492d05 SHA512 df1713d9d8d21c326f55bd033f105614356a69bbd81a21e80e8d82eb2842435fd9a7291c4f168502feacb38318b47db39f7fe161b956976967c7a68ffcbc49cb WHIRLPOOL 7ef0ccd175569091706e9873708c24a87db916758706ec67696de61128b15ac96af0c82ffea4da41e935fadc66c618d7098ae7f81d884deccce66ea17396aeee EBUILD zabbix-2.0.12-r1.ebuild 10609 SHA256 1e747f212188bcbc3c26ff48e4ba705c4c99a0ed5605d952517ec5095e7f0ebf SHA512 c2a698fa3da431ddd5a9fa8ba75aaca916be223cd11914c963aeace7b5deabcac9d82017a819cf4244b7d8e409267de2c531fc3e932607a0bf3001c16133b3a7 WHIRLPOOL 2e2a8bbc9f22f9e09444429f8b7483a6cff59e4bcbcc81143b783d8e269d0561b65c5055bcce36f44e4c9b751bbc78fc1e83a2f4d061ae1a722516de1f5cdcd4 EBUILD zabbix-2.0.13.ebuild 10558 SHA256 e2ab7177d7ec04ff05b92be73cae5e619637d21386309f3807820d65dd6af420 SHA512 cd754ff64e35ed401ca9c73134820035c2accbb724ebe04620331bee6759c27b536295e91fd7071b46cbb22d053e1422898c5b7368e4f9267942909596778ab4 WHIRLPOOL bb0dec58ce597b3887f4aca30adad360cefc71dfab650920033cd69adf517e54420830cac4e2b490a4e7a96fccbcd48bba0f919b5f05fd23d06c4b2a4544fe5b +EBUILD zabbix-2.0.14.ebuild 10553 SHA256 312518c97ba37a25cab58c2dcb35f911c2f927c64e70494404a1cd9b0f88ac61 SHA512 927341150ff8b7f8acc59a2e2c07f53628865a11cc54d333ba4e87386a621d7485d4a49aa5d14e72874d95d6c29a6f1394a5ecb7c540afa3774d56b3b06e333a WHIRLPOOL 6423d44b6496b4415da32db240c67420aa8133aff5d6e168234eb8b11e9d98bded96c7fcce6b77fa6b00c07f809549c3398ad851a51381c5973202916e160113 EBUILD zabbix-2.2.5.ebuild 10179 SHA256 cbdc95062f05f8bab5062911a360524d5abdbab5c51165e8d29a70ecaeb753ec SHA512 e3f5b75aa9d53963453f1e2afca426f01a947609c7795d1bd21a7deedfd7d90247f3628b2817bbdbcf5da1d7337b6fb5ff5a4ab0b1a6903631c841bbf0597f5e WHIRLPOOL 21029eb6acc6a09dec74effa5098e037bf53da5dccf01202062a1377f3a07a283c53c6200ca0b1d20c70479c60b281aa425f895424f28ea91e3a36950ded11a4 EBUILD zabbix-2.2.7.ebuild 10129 SHA256 0e6c156b5ce53fab1f23b2d24cd0d3e7da4d6979444fda62cbf389d66d9f476c SHA512 9e3b176862054ae5f239f3324d5fbcf056499620ff371ab18cca3e99208258bef44fd41be34085f64a00ca43664e8b70260715dfa493e03208a4ef31a876c63b WHIRLPOOL dd2d994216a1514fec51d993eab456a124234a01eeba1c4f55cf31010354b01b8fe91763a4bfb75a48a9f6e6a55b08bf846ee9caabc2dbc08381c2bcf977173e +EBUILD zabbix-2.2.8.ebuild 10124 SHA256 e2d1dc6fc1a257c0b5dacbe19195ebf1f22e73c6279d98e239e496a5fa804380 SHA512 762dd07ebf764ceafa2a70c9739dbb7c0ec048140e7190c4684d1a3786d7718c9874aea84d5aff07d92d86ba6ff21a8977941838be8aa5d7cf06d6f91245a2cd WHIRLPOOL 63133a4863ecf3e23ac5b6cf9aa7eba08630c32a5c3b1a2ea7e55e3259e3ec3995d86c802b8abe5fd3df3947a4795265e9ff748210dba69a5e47b2f2129239d3 EBUILD zabbix-2.4.1.ebuild 10118 SHA256 19a5ebc763ec5ec3afafab53ddfcac66cf5c7f1c80a43e0151a13ae07b20cacf SHA512 f57370b395e19353e24bf6afb1e223ffeededa1025dd378b73d8db0c6baf49a6a27c025327e68e5e25a7da8b2f1a37ef966d30b98de09ad2f6d20ddfc0f9eb78 WHIRLPOOL 19212367f69f2ff2ea6871dda53453c766d55f9787d13990ee1064a3cacb16d856853c5256ba61fd9ef600de7cb35a1975e97925d9638f47c30892d5d38733eb -MISC ChangeLog 39975 SHA256 50927238aadb0ca493ab00d334db869218d15b3178a6b6eeed1b7845ac4dd5ab SHA512 2be5bc492acb1755681a16a8f3252222c6555f0b3efe4a460479bb0db1385116d47236aabeccd0a3cc94677ff1d894441a741ee8618fc795b80b20e66f04fc36 WHIRLPOOL b865dda84b4a8d726dc7b13d66be39ff855655aa164a7a852c030bbc34b55b075864004b7caaf115feba0f3d3ab0a0eeb9bdf6414a4efee781f3106129f56371 +EBUILD zabbix-2.4.3.ebuild 10113 SHA256 89622f47e373d5daec5a966fa8cd598067fd6777f099e5e2af89c0a50ca993c2 SHA512 e32a7b9bfb7a0d393d9cec0a593988d12380dfd3c6ca9b28d30aefec1f738e0f616da5338a402c2425b9a582268578a03a8010a517ee15d9b14236d2fb677e77 WHIRLPOOL 7259531748d3a85e211662228c85af8572d8e16490bcc9ccd7025acf79ab9cc3f0c2496948934f046a7bf6aad93d6a1d84ca430c7e01c8edcc130c30cc450502 +MISC ChangeLog 40253 SHA256 afe53d9bfac14a6b67e895b0bfb53eb1733ab52bbd0f49fd60f2a18dbb1da8ca SHA512 5b0b1d9ac322aec653f702e409073936bcbf34bc7b01266ed6d5c1d5820020aee54d5a4f6599f06c176e70ba383c4d87acf2cefffcb35b2dbb328050d965a2ca WHIRLPOOL c3b52069dc854ad6dd49220f6eb4f668e7e1d42a75fc49cd1bb9c0ae9388e150756edbafa193d2b2fc76e2eb5ea7e21518ff694270d18ae630bf9ccf358616a7 MISC metadata.xml 1221 SHA256 94d1841cf3efb9a709dbc9ee160a29c394a1c0f5af5069fe1466f9f08796c72d SHA512 3d3ed8e75fcd9f521402a9734d5bd19c163a7a5d33cef3b20b6e476416fc352a91a62782ecc0ed032efbafd5f07f6ac08e28a88fb766095a1bba146f8f50b5e5 WHIRLPOOL ae2d69cab99c364721ca2e806fc5e02d1dbe72ad48bea43b4d1a0fd49c00cc2b94ea6ea85f4f5a9ff90522a90ade17fe816fe85ca7a16e755d02239d4426da92 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2 - -iF4EAREIAAYFAlSgK/IACgkQVxOqA9G7/aAKJAD8DEixJqsVXo9vxYM6rAWFeVB2 -dz+PW9vhdNNagKWfUGoBAJkWrdpaSM+OyCSXu4BaeIIWmJBOY47fS/GFjqR8pTQb -=fSm4 ------END PGP SIGNATURE----- diff --git a/net-analyzer/zabbix/zabbix-2.0.14.ebuild b/net-analyzer/zabbix/zabbix-2.0.14.ebuild new file mode 100644 index 000000000000..f887be072e00 --- /dev/null +++ b/net-analyzer/zabbix/zabbix-2.0.14.ebuild @@ -0,0 +1,394 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/zabbix-2.0.14.ebuild,v 1.1 2015/02/02 19:29:17 mattm Exp $ + +EAPI="5" + +# needed to make webapp-config dep optional +WEBAPP_OPTIONAL="yes" +inherit flag-o-matic webapp depend.php autotools java-pkg-opt-2 user toolchain-funcs + +DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers" +HOMEPAGE="http://www.zabbix.com/" +MY_P=${P/_/} +MY_PV=${PV/_/} +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 java 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-5.0 ) + sqlite? ( >=dev-db/sqlite-3.3.5 ) + postgres? ( >=dev-db/postgresql-8.3.0 ) + oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 ) + jabber? ( dev-libs/iksemel ) + curl? ( net-misc/curl ) + openipmi? ( sys-libs/openipmi ) + ssh? ( net-libs/libssh2 ) + java? ( >=virtual/jdk-1.4 ) + odbc? ( + iodbc? ( dev-db/libiodbc ) + !iodbc? ( dev-db/unixODBC ) + )" + +RDEPEND="${COMMON_DEPEND} + proxy? ( <=net-analyzer/fping-2.9 ) + server? ( <=net-analyzer/fping-2.9 + app-admin/webapp-config ) + java? ( + >=virtual/jre-1.4 + dev-java/slf4j-api + dev-java/json-simple + ) + frontend? ( + dev-lang/php[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode] + || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] ) + media-libs/gd[png] + app-admin/webapp-config )" +DEPEND="${COMMON_DEPEND} + virtual/pkgconfig" + +S=${WORKDIR}/${MY_P} + +ZABBIXJAVA_BASE="opt/zabbix_java" + +java_prepare() { + cd "${S}/src/zabbix_java/lib" + rm -v *.jar || die + + java-pkg_jar-from slf4j-api + java-pkg_jar-from json-simple +} + +src_prepare() { + epatch "${FILESDIR}/2.0/patches/zbx282.patch" + 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 may need to configure your database for Zabbix," + elog "if you have not already done so. Most minor version" + elog "zabbix updates do not require db changes. However, " + elog "you should read the release notes to be sure." + elog + elog "Have a look at /usr/share/zabbix for" + elog "database creation and upgrades." + elog + elog "Execute schema, images, and data sql files in that order." + elog + elog "For more info read the Zabbix manual at" + elog "http://www.zabbix.com/documentation.php" + elog + elog "New use flags: java, odbc, iodbc" + 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 " + elog + elog "This will convert database data for use with Node ID" + elog "and also adds a local node." + elog + fi + + elog "--" + elog + elog "You may need to add these lines to /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 + + elog "Feel free to download or contribute gentoo specific zabbix templates" + elog "via https://github.com/deploylinux/gentooZabbixTemplates (WIP)." + + # 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 + chmod 0750 \ + "${ROOT}"/etc/zabbix \ + "${ROOT}"/var/lib/zabbix \ + "${ROOT}"/var/lib/zabbix/home \ + "${ROOT}"/var/lib/zabbix/scripts \ + "${ROOT}"/var/log/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 + ;; + 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_enable java) \ + $(use_with ldap) \ + $(use_with snmp net-snmp) \ + $(use_with mysql) \ + $(use_with postgres postgresql) \ + $(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 + + keepdir \ + /etc/zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/log/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}/2.0"/init.d/zabbix-server + dosbin \ + src/zabbix_server/zabbix_server + dodir \ + /usr/share/zabbix + insinto /usr/share/zabbix + doins -r \ + database \ + upgrades + #remove unneeded files left over from wholesale copy (bug #433708) + rm "${ED}"/usr/share/zabbix/{database,upgrades}/Makefile{,.in,.am} + 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}/2.0"/init.d/zabbix-proxy + dosbin \ + src/zabbix_proxy/zabbix_proxy + insinto /etc/zabbix + doins \ + "${FILESDIR}/2.0"/zabbix_proxy.conf + dodir \ + /usr/share/zabbix + insinto /usr/share/zabbix + doins -r \ + database \ + upgrades + 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}/2.0"/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 + fperms 0750 \ + /etc/zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/log/zabbix + + dodoc README INSTALL NEWS ChangeLog \ + conf/zabbix_agent.conf \ + conf/zabbix_agentd.conf \ + conf/zabbix_proxy.conf \ + conf/zabbix_agentd/userparameter_examples.conf \ + conf/zabbix_agentd/userparameter_mysql.conf \ + conf/zabbix_server.conf + + 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 + + if use java; then + dodir \ + /${ZABBIXJAVA_BASE} \ + /${ZABBIXJAVA_BASE}/bin \ + /${ZABBIXJAVA_BASE}/lib + keepdir /${ZABBIXJAVA_BASE} + exeinto /${ZABBIXJAVA_BASE}/bin + doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar + exeinto /${ZABBIXJAVA_BASE}/lib + doexe \ + src/zabbix_java/lib/logback-classic-0.9.27.jar \ + src/zabbix_java/lib/logback-console.xml \ + src/zabbix_java/lib/logback-core-0.9.27.jar \ + src/zabbix_java/lib/logback.xml \ + src/zabbix_java/lib/org-json-2010-12-28.jar \ + src/zabbix_java/lib/slf4j-api-1.6.1.jar + exeinto /${ZABBIXJAVA_BASE}/ + doexe \ + src/zabbix_java/settings.sh \ + src/zabbix_java/startup.sh \ + src/zabbix_java/shutdown.sh + fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE} + fi + +} + +src_compile() { + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then + emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed" + fi +} diff --git a/net-analyzer/zabbix/zabbix-2.2.8.ebuild b/net-analyzer/zabbix/zabbix-2.2.8.ebuild new file mode 100644 index 000000000000..5f66bc375f6f --- /dev/null +++ b/net-analyzer/zabbix/zabbix-2.2.8.ebuild @@ -0,0 +1,363 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/zabbix-2.2.8.ebuild,v 1.1 2015/02/02 19:29:17 mattm Exp $ + +EAPI="5" + +# needed to make webapp-config dep optional +WEBAPP_OPTIONAL="yes" +inherit flag-o-matic webapp depend.php autotools java-pkg-opt-2 user systemd toolchain-funcs + +DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers" +HOMEPAGE="http://www.zabbix.com/" +MY_P=${P/_/} +MY_PV=${PV/_/} +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 java curl frontend ipv6 jabber ldap libxml2 mysql openipmi oracle postgres proxy server ssh snmp sqlite odbc static" + +COMMON_DEPEND="snmp? ( net-analyzer/net-snmp ) + ldap? ( + net-nds/openldap + =dev-libs/cyrus-sasl-2* + net-libs/gnutls + ) + mysql? ( >=virtual/mysql-5.0.3 ) + sqlite? ( >=dev-db/sqlite-3.3.5 ) + postgres? ( >=dev-db/postgresql-8.3.0 ) + oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 ) + jabber? ( dev-libs/iksemel ) + libxml2? ( dev-libs/libxml2 ) + curl? ( net-misc/curl ) + openipmi? ( sys-libs/openipmi ) + ssh? ( net-libs/libssh2 ) + java? ( >=virtual/jdk-1.4 ) + odbc? ( dev-db/unixODBC )" + +RDEPEND="${COMMON_DEPEND} + proxy? ( <=net-analyzer/fping-2.9 ) + server? ( <=net-analyzer/fping-2.9 + app-admin/webapp-config ) + java? ( + >=virtual/jre-1.4 + dev-java/slf4j-api + ) + frontend? ( + >=dev-lang/php-5.3.0[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode] + || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] ) + media-libs/gd[png] + app-admin/webapp-config )" +DEPEND="${COMMON_DEPEND} + virtual/pkgconfig" + +S=${WORKDIR}/${MY_P} + +ZABBIXJAVA_BASE="opt/zabbix_java" + +java_prepare() { + cd "${S}/src/zabbix_java/lib" + rm -v *.jar || die + + java-pkg_jar-from slf4j-api +} + +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 may need to configure your database for Zabbix," + elog "if you have not already done so. " + 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 " + elog + elog "This will convert database data for use with Node ID" + elog "and also adds a local node." + elog + fi + + elog "--" + elog + elog "You may need to add these lines to /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 + + elog "Feel free to download or contribute gentoo specific zabbix templates" + elog "via https://github.com/deploylinux/gentooZabbixTemplates (WIP)." + + # 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 + chmod 0750 \ + "${ROOT}"/etc/zabbix \ + "${ROOT}"/var/lib/zabbix \ + "${ROOT}"/var/lib/zabbix/home \ + "${ROOT}"/var/lib/zabbix/scripts \ + "${ROOT}"/var/log/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 + ;; + esac + fi +} + +src_configure() { + + econf \ + $(use_enable server) \ + $(use_enable proxy) \ + $(use_enable agent) \ + $(use_enable ipv6) \ + $(use_enable static) \ + $(use_enable java) \ + $(use_with ldap) \ + $(use_with snmp net-snmp) \ + $(use_with mysql) \ + $(use_with postgres postgresql) \ + $(use_with oracle) \ + $(use_with sqlite sqlite3) \ + $(use_with jabber) \ + $(use_with curl libcurl) \ + $(use_with openipmi openipmi) \ + $(use_with ssh ssh2) \ + $(use_with libxml2) \ + $(use_with odbc unixodbc) \ + || die "econf failed" +} + +src_install() { + dodir \ + /etc/zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/lib/zabbix/alertscripts \ + /var/lib/zabbix/externalscripts \ + /var/log/zabbix + + keepdir \ + /etc/zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/lib/zabbix/alertscripts \ + /var/lib/zabbix/externalscripts \ + /var/log/zabbix + + if use server; then + insinto /etc/zabbix + doins "${FILESDIR}/2.2"/zabbix_server.conf + doinitd "${FILESDIR}/2.2"/init.d/zabbix-server + dosbin src/zabbix_server/zabbix_server + fowners zabbix:zabbix /etc/zabbix/zabbix_server.conf + fperms 0640 /etc/zabbix/zabbix_server.conf + dodir /usr/share/zabbix + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/ + systemd_dounit "${FILESDIR}/zabbix-server.service" + systemd_newtmpfilesd "${FILESDIR}/zabbix-server.tmpfiles" zabbix-server.conf + fi + + if use proxy; then + doinitd \ + "${FILESDIR}/2.2"/init.d/zabbix-proxy + dosbin \ + src/zabbix_proxy/zabbix_proxy + insinto /etc/zabbix + doins \ + "${FILESDIR}/2.2"/zabbix_proxy.conf + dodir /usr/share/zabbix + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/ + systemd_dounit "${FILESDIR}/zabbix-proxy.service" + systemd_newtmpfilesd "${FILESDIR}/zabbix-proxy.tmpfiles" zabbix-proxy.conf + fi + + if use agent; then + insinto /etc/zabbix + doins \ + "${FILESDIR}/2.2"/zabbix_agent.conf \ + "${FILESDIR}/2.2"/zabbix_agentd.conf + doinitd "${FILESDIR}/2.2"/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 + systemd_dounit "${FILESDIR}/zabbix-agentd.service" + systemd_newtmpfilesd "${FILESDIR}/zabbix-agentd.tmpfiles" zabbix-agentd.conf + fi + + fowners zabbix:zabbix \ + /etc/zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/lib/zabbix/alertscripts \ + /var/lib/zabbix/externalscripts \ + /var/log/zabbix + fperms 0750 \ + /etc/zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/lib/zabbix/alertscripts \ + /var/lib/zabbix/externalscripts \ + /var/log/zabbix + + dodoc README INSTALL NEWS ChangeLog \ + conf/zabbix_agent.conf \ + conf/zabbix_agentd.conf \ + conf/zabbix_proxy.conf \ + conf/zabbix_agentd/userparameter_examples.conf \ + conf/zabbix_agentd/userparameter_mysql.conf \ + conf/zabbix_server.conf + + 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 + + if use java; then + dodir \ + /${ZABBIXJAVA_BASE} \ + /${ZABBIXJAVA_BASE}/bin \ + /${ZABBIXJAVA_BASE}/lib + keepdir /${ZABBIXJAVA_BASE} + exeinto /${ZABBIXJAVA_BASE}/bin + doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar + exeinto /${ZABBIXJAVA_BASE}/lib + doexe \ + src/zabbix_java/lib/logback-classic-0.9.27.jar \ + src/zabbix_java/lib/logback-console.xml \ + src/zabbix_java/lib/logback-core-0.9.27.jar \ + src/zabbix_java/lib/logback.xml \ + src/zabbix_java/lib/android-json-4.3_r3.1.jar \ + src/zabbix_java/lib/slf4j-api-1.6.1.jar + exeinto /${ZABBIXJAVA_BASE}/ + doexe \ + src/zabbix_java/settings.sh \ + src/zabbix_java/startup.sh \ + src/zabbix_java/shutdown.sh + fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE} + fi + +} + +src_compile() { + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then + emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed" + fi +} diff --git a/net-analyzer/zabbix/zabbix-2.4.3.ebuild b/net-analyzer/zabbix/zabbix-2.4.3.ebuild new file mode 100644 index 000000000000..480503bf3b7e --- /dev/null +++ b/net-analyzer/zabbix/zabbix-2.4.3.ebuild @@ -0,0 +1,363 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/zabbix-2.4.3.ebuild,v 1.1 2015/02/02 19:29:17 mattm Exp $ + +EAPI="5" + +# needed to make webapp-config dep optional +WEBAPP_OPTIONAL="yes" +inherit flag-o-matic webapp depend.php autotools java-pkg-opt-2 user systemd toolchain-funcs + +DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers" +HOMEPAGE="http://www.zabbix.com/" +MY_P=${P/_/} +MY_PV=${PV/_/} +SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +WEBAPP_MANUAL_SLOT="yes" +KEYWORDS="" +IUSE="agent java curl frontend ipv6 jabber ldap libxml2 mysql openipmi oracle postgres proxy server ssh snmp sqlite odbc static" + +COMMON_DEPEND="snmp? ( net-analyzer/net-snmp ) + ldap? ( + net-nds/openldap + =dev-libs/cyrus-sasl-2* + net-libs/gnutls + ) + mysql? ( >=virtual/mysql-5.0.3 ) + sqlite? ( >=dev-db/sqlite-3.3.5 ) + postgres? ( >=dev-db/postgresql-8.3.0 ) + oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 ) + jabber? ( dev-libs/iksemel ) + libxml2? ( dev-libs/libxml2 ) + curl? ( net-misc/curl ) + openipmi? ( sys-libs/openipmi ) + ssh? ( net-libs/libssh2 ) + java? ( >=virtual/jdk-1.4 ) + odbc? ( dev-db/unixODBC )" + +RDEPEND="${COMMON_DEPEND} + proxy? ( <=net-analyzer/fping-2.9 ) + server? ( <=net-analyzer/fping-2.9 + app-admin/webapp-config ) + java? ( + >=virtual/jre-1.6 + dev-java/slf4j-api + ) + frontend? ( + >=dev-lang/php-5.3.0[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode] + || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] ) + media-libs/gd[png] + app-admin/webapp-config )" +DEPEND="${COMMON_DEPEND} + virtual/pkgconfig" + +S=${WORKDIR}/${MY_P} + +ZABBIXJAVA_BASE="opt/zabbix_java" + +java_prepare() { + cd "${S}/src/zabbix_java/lib" + rm -v *.jar || die + + java-pkg_jar-from slf4j-api +} + +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 may need to configure your database for Zabbix," + elog "if you have not already done so. " + 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 " + elog + elog "This will convert database data for use with Node ID" + elog "and also adds a local node." + elog + fi + + elog "--" + elog + elog "You may need to add these lines to /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 + + elog "Feel free to download or contribute gentoo specific zabbix templates" + elog "via https://github.com/deploylinux/gentooZabbixTemplates (WIP)." + + # 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 + chmod 0750 \ + "${ROOT}"/etc/zabbix \ + "${ROOT}"/var/lib/zabbix \ + "${ROOT}"/var/lib/zabbix/home \ + "${ROOT}"/var/lib/zabbix/scripts \ + "${ROOT}"/var/log/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 + ;; + esac + fi +} + +src_configure() { + + econf \ + $(use_enable server) \ + $(use_enable proxy) \ + $(use_enable agent) \ + $(use_enable ipv6) \ + $(use_enable static) \ + $(use_enable java) \ + $(use_with ldap) \ + $(use_with snmp net-snmp) \ + $(use_with mysql) \ + $(use_with postgres postgresql) \ + $(use_with oracle) \ + $(use_with sqlite sqlite3) \ + $(use_with jabber) \ + $(use_with curl libcurl) \ + $(use_with openipmi openipmi) \ + $(use_with ssh ssh2) \ + $(use_with libxml2) \ + $(use_with odbc unixodbc) \ + || die "econf failed" +} + +src_install() { + dodir \ + /etc/zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/lib/zabbix/alertscripts \ + /var/lib/zabbix/externalscripts \ + /var/log/zabbix + + keepdir \ + /etc/zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/lib/zabbix/alertscripts \ + /var/lib/zabbix/externalscripts \ + /var/log/zabbix + + if use server; then + insinto /etc/zabbix + doins "${FILESDIR}/2.4"/zabbix_server.conf + doinitd "${FILESDIR}/2.4"/init.d/zabbix-server + dosbin src/zabbix_server/zabbix_server + fowners zabbix:zabbix /etc/zabbix/zabbix_server.conf + fperms 0640 /etc/zabbix/zabbix_server.conf + dodir /usr/share/zabbix + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/ + systemd_dounit "${FILESDIR}/zabbix-server.service" + systemd_newtmpfilesd "${FILESDIR}/zabbix-server.tmpfiles" zabbix-server.conf + fi + + if use proxy; then + doinitd \ + "${FILESDIR}/2.4"/init.d/zabbix-proxy + dosbin \ + src/zabbix_proxy/zabbix_proxy + insinto /etc/zabbix + doins \ + "${FILESDIR}/2.4"/zabbix_proxy.conf + dodir /usr/share/zabbix + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/ + systemd_dounit "${FILESDIR}/zabbix-proxy.service" + systemd_newtmpfilesd "${FILESDIR}/zabbix-proxy.tmpfiles" zabbix-proxy.conf + fi + + if use agent; then + insinto /etc/zabbix + doins \ + "${FILESDIR}/2.4"/zabbix_agent.conf \ + "${FILESDIR}/2.4"/zabbix_agentd.conf + doinitd "${FILESDIR}/2.4"/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 + systemd_dounit "${FILESDIR}/zabbix-agentd.service" + systemd_newtmpfilesd "${FILESDIR}/zabbix-agentd.tmpfiles" zabbix-agentd.conf + fi + + fowners zabbix:zabbix \ + /etc/zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/lib/zabbix/alertscripts \ + /var/lib/zabbix/externalscripts \ + /var/log/zabbix + fperms 0750 \ + /etc/zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/lib/zabbix/alertscripts \ + /var/lib/zabbix/externalscripts \ + /var/log/zabbix + + dodoc README INSTALL NEWS ChangeLog \ + conf/zabbix_agent.conf \ + conf/zabbix_agentd.conf \ + conf/zabbix_proxy.conf \ + conf/zabbix_agentd/userparameter_examples.conf \ + conf/zabbix_agentd/userparameter_mysql.conf \ + conf/zabbix_server.conf + + 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 + + if use java; then + dodir \ + /${ZABBIXJAVA_BASE} \ + /${ZABBIXJAVA_BASE}/bin \ + /${ZABBIXJAVA_BASE}/lib + keepdir /${ZABBIXJAVA_BASE} + exeinto /${ZABBIXJAVA_BASE}/bin + doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar + exeinto /${ZABBIXJAVA_BASE}/lib + doexe \ + src/zabbix_java/lib/logback-classic-0.9.27.jar \ + src/zabbix_java/lib/logback-console.xml \ + src/zabbix_java/lib/logback-core-0.9.27.jar \ + src/zabbix_java/lib/logback.xml \ + src/zabbix_java/lib/android-json-4.3_r3.1.jar \ + src/zabbix_java/lib/slf4j-api-1.6.1.jar + exeinto /${ZABBIXJAVA_BASE}/ + doexe \ + src/zabbix_java/settings.sh \ + src/zabbix_java/startup.sh \ + src/zabbix_java/shutdown.sh + fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE} + fi + +} + +src_compile() { + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then + emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed" + fi +}