summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2021-06-30 13:57:58 +0200
committerMiroslav Šulc <fordfrog@gentoo.org>2021-06-30 13:57:58 +0200
commitaae3a31f1a6ac2dfc315ccf0ad2daa48c59b250e (patch)
treeda653415092a4e43f224e9a10d93b19f96aeb165 /net-analyzer
parentnet-analyzer/zabbix: bump to 5.0.13 (diff)
downloadgentoo-aae3a31f1a6ac2dfc315ccf0ad2daa48c59b250e.tar.gz
gentoo-aae3a31f1a6ac2dfc315ccf0ad2daa48c59b250e.tar.bz2
gentoo-aae3a31f1a6ac2dfc315ccf0ad2daa48c59b250e.zip
net-analyzer/zabbix: bump to 4.0.32
Package-Manager: Portage-3.0.20, 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.32.ebuild360
2 files changed, 361 insertions, 0 deletions
diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest
index 4637d6219d01..373ec9f4e6e3 100644
--- a/net-analyzer/zabbix/Manifest
+++ b/net-analyzer/zabbix/Manifest
@@ -251,6 +251,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.30.tar.gz 17599032 BLAKE2B 1084ad3e680fff7798c803492d9e719c6c6fd2503db30d4a60a000c9dfac057bb1d5bb947dfac580947ce3d8f051aeb6a8183642808120d2795722c39b8e1a85 SHA512 b26c532e3b1b3402af0433ab29a36efaa1a34e8541797bcb37118ff352d4c29548765ebd10fa8da6b3371b1e3cbdcfb4b1cdb5c6a143b3ce9301db47d425fa36
DIST zabbix-4.0.31.tar.gz 17600018 BLAKE2B 6b3dd8bdc465fc610756b93cd033e0ade607af718a2914928d5a10cef648ac3c8276c75403fa889b00b4ec1485069240462f8f2c2aaff9767a2914e4b32c6817 SHA512 b4dc02b76f438ca922caee8a04c119c0958d7431622b36a2c26da2ed1a2fdc87e5e7abfcded033a852f6ee018e999f8fceea1a89a67b97d4c160e01a536d2663
+DIST zabbix-4.0.32.tar.gz 17606713 BLAKE2B 48d0f8fdc3f538701383f0c246152df8d000aeb194669edf855dd96f0ee4b0a27d14a373d555cdda4f3ca9057f4abbb51d5184167bc4858ce798bf17284e0c74 SHA512 af3c3306c2ed1d47d980f0581324274b4bee6fe6bac657e7cba90d6079ad1a83d57d5279aeed54e63f28764d02476be881972667e84e1c8a85d90c659384766a
DIST zabbix-5.0.12.tar.gz 20404121 BLAKE2B b458f8dfae5f1c2cc0b8d4d06a41633f00ab0749288e36e50fc13377a544ee01634f2b603cda901fe35600eb883caf084e1d0f72931561996336022e0c8d33ff SHA512 e26012c177d72bc75e63653b6ce4e1c21cf83e123edc0931635887002dbe713637177d95d15e493923416d1f277dd373bf9f568ea31ac9b1b93dc6bbb59ed15c
DIST zabbix-5.0.13.tar.gz 21076927 BLAKE2B 4c5a503fba87fbb0882a60378721e9156a9ffc374b5a127fbaa08aeb23d40aefbf4324b6a00d9c53d65714eb88e04730dc9f43bbc6baedd8b844b29359aca76a SHA512 846607e9c409cb996eb6aed0beaa29fa37450ca61a2e533e477b3bb16fd3c3fd90a59cff1e7234e0dc47276cce052e022f1663c1928e0e4295bff44002720e47
DIST zabbix-5.0.8.tar.gz 19474050 BLAKE2B 1043efca2f373553728206837949bce5f5ea32328c6289e4028f65e6f1ed76560c1ffbd610eec9855f050d0330bcd3b364a983db896285729f30a693d5ae6c6f SHA512 19601ace704c8a887ffc9b57da8825d8a28a5d064aac3e59480994bee4156db186d37ecf4bee2208bbafc0cb76c0c7f47de964f99953ce78d0187457255d92e9
diff --git a/net-analyzer/zabbix/zabbix-4.0.32.ebuild b/net-analyzer/zabbix/zabbix-4.0.32.ebuild
new file mode 100644
index 000000000000..d1235337a343
--- /dev/null
+++ b/net-analyzer/zabbix/zabbix-4.0.32.ebuild
@@ -0,0 +1,360 @@
+# 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
+ 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 "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
+}