summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2021-10-22 12:15:40 +0200
committerMiroslav Šulc <fordfrog@gentoo.org>2021-10-22 12:16:23 +0200
commite74dcf7ea24cfddc3346eb72d9fe324f29dc06ea (patch)
treebda5fedb917ca204392197359eabec22c3b458ec /net-analyzer
parentsys-auth/sssd: Stabilize 2.5.2-r1 x86, #813750 (diff)
downloadgentoo-e74dcf7ea24cfddc3346eb72d9fe324f29dc06ea.tar.gz
gentoo-e74dcf7ea24cfddc3346eb72d9fe324f29dc06ea.tar.bz2
gentoo-e74dcf7ea24cfddc3346eb72d9fe324f29dc06ea.zip
net-analyzer/zabbix: bump to 4.0.35
Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/zabbix/Manifest1
-rw-r--r--net-analyzer/zabbix/zabbix-4.0.35.ebuild370
2 files changed, 371 insertions, 0 deletions
diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest
index 9cfef32457a3..e84081e7b53d 100644
--- a/net-analyzer/zabbix/Manifest
+++ b/net-analyzer/zabbix/Manifest
@@ -238,6 +238,7 @@ DIST gopkg.in%2Fyaml.v2%2F@v%2Fv2.2.8.zip 80666 BLAKE2B ff3645b71cedd41b9fef6e5d
DIST honnef.co%2Fgo%2Ftools%2F@v%2Fv0.0.1-2019.2.3.mod 300 BLAKE2B 3e3f5a2be0918cbaacd5e43e59fcc6c7c6999645f0c9214cd5a522c31d34b6d3dad61e3ddae8ccdb2f3f0d90b406c047802ee3d9d54dc40fe6eff9cd35620792 SHA512 0c8aa788d0c03d6d049f0dd7468d0f81ce2131ccedd5a5a3a18362b7d30eef7ef325277844eefe4b707b1ad71c6f83a44e110b7af7b98e05406d347237a7bafb
DIST zabbix-4.0.33.tar.gz 17614916 BLAKE2B e9edb516a4780daa2d4ced5a0753d597fabbb009d8109fb93dcdf8c738011459ee2bab65784998289bc13d21a40ec4c325eb72337a38f3940473ec347f9020ed SHA512 9ef74f50eefe6c9d8fb0d8cb8df9040331489520e2bb2df2cf83d7e698e6b99c2af1d31fdb385594a8696e3b186321cc8b9fddd654182a8a6e34eb5bf0f29fdd
DIST zabbix-4.0.34.tar.gz 17614409 BLAKE2B 6e0997e232d57c638e61f2c0617b071d7c7fed5faab37fdc38adc29569f203d816cd60361c46e9f47993ecbd38f052a0378aef68f4785f7e30ae656775044730 SHA512 547df1d0ec8b0831499bb0233236ef13ab3666ef48aabccd8733d2d093f6822200c09184445001403639066e9149f5133226082078b8a818b02f4323d4e55e3b
+DIST zabbix-4.0.35.tar.gz 17619679 BLAKE2B df90b7479ebb8ad706b090e25aca59448a90dd41aca154457ce7efd46b783a6802cd64594848cb87cf93b750b162e3cebf521db226572c864604e6b0f592cac6 SHA512 ec8956a7849fd861c1f01bef476bd9db315ca4909b7224b9740055202df5e76a8fe317e916034f8bbbe7bacd7daa434ce26c0b810b1fef809927ac7afba52268
DIST zabbix-5.0.15.tar.gz 21297290 BLAKE2B 9e533e37eb6da83c6e9c4797c2f584fe1ca36fd62b0ffb5583145b5a14f8d2f9fcc5e5fcca0d2ce28376e2c2217cf2f8132abd7da244d70a051ad3eac16cb358 SHA512 0584d0581a1216e5f06af4e7b16fa7db1bad787348be38a9209223182b026b1bc6d0b28649250c9aa7184fb2da7c7995413993d1d96acae81ed786f9d3e45e79
DIST zabbix-5.0.16.tar.gz 21312183 BLAKE2B a3950f468815df34484750d4f398f161f7a35d41c2c7044181673f696c52ad0a30bec547b92cd84ad780c9eccc904c71f9858bc3e593a78a891d20217aeb051c SHA512 786b1781fe8cbe41eae11172bcaf1474d280757f9f0e278232dcc5534d69815a1c8bfdf58f1f9e2c8ebd3ccc4a75d3b16bbce3d0e87c9c9d3c5a53f75406710c
DIST zabbix-5.4.4.tar.gz 24266079 BLAKE2B 5be8f922329853b9742bd1b8bcedd2eb331137fd37fdd9186846f41ff89047b27bff55dcdf1ab6d18e0d9d5b6ea8266dff542b2feef31d8a9e0023cbd0c2a351 SHA512 6b5b012bc0c53502d97bc260f7c7f0293edba194fb05c65b05c5b4084cd3f05b00ba5e1c1ead1e42be39d740dc5c617a001c2d459c8157c1cab7136fb0054883
diff --git a/net-analyzer/zabbix/zabbix-4.0.35.ebuild b/net-analyzer/zabbix/zabbix-4.0.35.ebuild
new file mode 100644
index 000000000000..b4467228139f
--- /dev/null
+++ b/net-analyzer/zabbix/zabbix-4.0.35.ebuild
@@ -0,0 +1,370 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# needed to make webapp-config dep optional
+WEBAPP_OPTIONAL="yes"
+inherit webapp java-pkg-opt-2 systemd toolchain-funcs tmpfiles user-info
+
+DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
+HOMEPAGE="https://www.zabbix.com/"
+MY_P=${P/_/}
+MY_PV=${PV/_/}
+SRC_URI="https://cdn.zabbix.com/${PN}/sources/stable/4.0/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+WEBAPP_MANUAL_SLOT="yes"
+KEYWORDS="~amd64 ~x86"
+IUSE="+agent curl frontend gnutls ipv6 java ldap libxml2 mbedtls mysql odbc openipmi +openssl oracle +postgres proxy server snmp sqlite ssh ssl static xmpp"
+REQUIRED_USE="|| ( agent frontend proxy server )
+ ssl? ( ^^ ( gnutls mbedtls openssl ) )
+ proxy? ( ^^ ( mysql oracle postgres sqlite ) )
+ server? ( ^^ ( mysql oracle postgres ) )
+ static? ( !oracle !snmp )"
+
+COMMON_DEPEND="
+ curl? ( net-misc/curl )
+ java? ( >=virtual/jdk-1.8:* )
+ ldap? (
+ =dev-libs/cyrus-sasl-2*
+ net-libs/gnutls
+ net-nds/openldap
+ )
+ libxml2? ( dev-libs/libxml2 )
+ mysql? ( dev-db/mysql-connector-c )
+ odbc? ( dev-db/unixODBC )
+ openipmi? ( sys-libs/openipmi )
+ oracle? ( dev-db/oracle-instantclient-basic )
+ postgres? ( dev-db/postgresql:* )
+ proxy? ( sys-libs/zlib )
+ server? (
+ dev-libs/libevent
+ sys-libs/zlib
+ )
+ snmp? ( net-analyzer/net-snmp )
+ sqlite? ( dev-db/sqlite )
+ ssh? ( net-libs/libssh2 )
+ ssl? (
+ gnutls? ( net-libs/gnutls:0= )
+ mbedtls? ( net-libs/mbedtls:0= )
+ openssl? ( dev-libs/openssl:=[-bindist(-)] )
+ )
+ xmpp? ( dev-libs/iksemel )
+"
+
+RDEPEND="${COMMON_DEPEND}
+ acct-group/zabbix
+ acct-user/zabbix
+ java? ( >=virtual/jre-1.8:* )
+ mysql? ( virtual/mysql )
+ proxy? ( net-analyzer/fping[suid] )
+ server? (
+ app-admin/webapp-config
+ dev-libs/libevent
+ dev-libs/libpcre
+ net-analyzer/fping[suid]
+ )
+ frontend? (
+ app-admin/webapp-config
+ dev-lang/php:*[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
+ media-libs/gd[png]
+ virtual/httpd-php:*
+ mysql? ( dev-lang/php[mysqli] )
+ odbc? ( dev-lang/php[odbc] )
+ oracle? ( dev-lang/php[oci8-instant-client] )
+ postgres? ( dev-lang/php[postgres] )
+ sqlite? ( dev-lang/php[sqlite] )
+ )
+"
+DEPEND="${COMMON_DEPEND}
+ static? (
+ curl? ( net-misc/curl[static-libs] )
+ ldap? (
+ =dev-libs/cyrus-sasl-2*[static-libs]
+ net-libs/gnutls[static-libs]
+ net-nds/openldap[static-libs]
+ )
+ libxml2? ( dev-libs/libxml2[static-libs] )
+ mysql? ( dev-db/mysql-connector-c[static-libs] )
+ odbc? ( dev-db/unixODBC[static-libs] )
+ postgres? ( dev-db/postgresql:*[static-libs] )
+ sqlite? ( dev-db/sqlite[static-libs] )
+ ssh? ( net-libs/libssh2 )
+ )
+"
+BDEPEND="
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.0.18-modulepathfix.patch"
+ "${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+ZABBIXJAVA_BASE="opt/zabbix_java"
+
+pkg_setup() {
+ 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
+
+ if use frontend; then
+ webapp_pkg_setup
+ fi
+
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ default
+}
+
+src_configure() {
+ econf \
+ $(use_enable agent) \
+ $(use_enable ipv6) \
+ $(use_enable java) \
+ $(use_enable proxy) \
+ $(use_enable server) \
+ $(use_enable static) \
+ $(use_with curl libcurl) \
+ $(use_with gnutls) \
+ $(use_with ldap) \
+ $(use_with libxml2) \
+ $(use_with mbedtls) \
+ $(use_with mysql) \
+ $(use_with odbc unixodbc) \
+ $(use_with openipmi openipmi) \
+ $(use_with openssl) \
+ $(use_with oracle) \
+ $(use_with postgres postgresql) \
+ $(use_with snmp net-snmp) \
+ $(use_with sqlite sqlite3) \
+ $(use_with ssh ssh2) \
+ $(use_with xmpp jabber)
+}
+
+src_compile() {
+ if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
+ emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)"
+ fi
+}
+
+src_install() {
+ local dirs=(
+ /etc/zabbix
+ /var/lib/zabbix
+ /var/lib/zabbix/home
+ /var/lib/zabbix/scripts
+ /var/lib/zabbix/alertscripts
+ /var/lib/zabbix/externalscripts
+ /var/log/zabbix
+ )
+
+ for dir in "${dirs[@]}"; do
+ dodir "${dir}"
+ keepdir "${dir}"
+ done
+
+ if use server; then
+ insinto /etc/zabbix
+ doins "${S}"/conf/zabbix_server.conf
+ fperms 0640 /etc/zabbix/zabbix_server.conf
+ fowners root:zabbix /etc/zabbix/zabbix_server.conf
+
+ newinitd "${FILESDIR}"/zabbix-server.init zabbix-server
+
+ dosbin src/zabbix_server/zabbix_server
+
+ insinto /usr/share/zabbix
+ doins -r "${S}"/database/
+
+ systemd_dounit "${FILESDIR}"/zabbix-server.service
+ newtmpfiles "${FILESDIR}"/zabbix-server.tmpfiles zabbix-server.conf
+ fi
+
+ if use proxy; then
+ insinto /etc/zabbix
+ doins "${S}"/conf/zabbix_proxy.conf
+ fperms 0640 /etc/zabbix/zabbix_proxy.conf
+ fowners root:zabbix /etc/zabbix/zabbix_proxy.conf
+
+ newinitd "${FILESDIR}"/zabbix-proxy.init zabbix-proxy
+
+ dosbin src/zabbix_proxy/zabbix_proxy
+
+ insinto /usr/share/zabbix
+ doins -r "${S}"/database/
+
+ systemd_dounit "${FILESDIR}"/zabbix-proxy.service
+ newtmpfiles "${FILESDIR}"/zabbix-proxy.tmpfiles zabbix-proxy.conf
+ fi
+
+ if use agent; then
+ insinto /etc/zabbix
+ doins "${S}"/conf/zabbix_agentd.conf
+ fperms 0640 /etc/zabbix/zabbix_agentd.conf
+ fowners root:zabbix /etc/zabbix/zabbix_agentd.conf
+
+ newinitd "${FILESDIR}"/zabbix-agentd.init zabbix-agentd
+
+ dosbin src/zabbix_agent/zabbix_agentd
+ dobin \
+ src/zabbix_sender/zabbix_sender \
+ src/zabbix_get/zabbix_get
+
+ systemd_dounit "${FILESDIR}"/zabbix-agentd.service
+ newtmpfiles "${FILESDIR}"/zabbix-agentd.tmpfiles zabbix-agentd.conf
+ fi
+
+ fowners root:zabbix /etc/zabbix
+ fowners zabbix: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_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_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-1.2.3.jar \
+ src/zabbix_java/lib/logback-console.xml \
+ src/zabbix_java/lib/logback-core-1.2.3.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.7.30.jar
+ newinitd "${FILESDIR}"/zabbix-jmx-proxy.init zabbix-jmx-proxy
+ newconfd "${FILESDIR}"/zabbix-jmx-proxy.conf zabbix-jmx-proxy
+ fi
+}
+
+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
+ tmpfiles_process zabbix-server.conf
+
+ 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
+
+ if use proxy; then
+ tmpfiles_process zabbix-proxy.conf
+ fi
+
+ if use agent; then
+ tmpfiles_process zabbix-agentd.conf
+ 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
+
+ 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
+}
+
+pkg_prerm() {
+ (use frontend || use server) && webapp_pkg_prerm
+}