summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2022-06-06 08:55:13 +0200
committerMiroslav Šulc <fordfrog@gentoo.org>2022-06-06 08:55:25 +0200
commit998dd773b2e83a2cac3512d798ce2b6de8b464a2 (patch)
treeb29a94a18445ac434ea5e8d49bc4081c349e9c9d
parentmedia-gfx/graphite2: Stabilize 1.3.14_p20210810-r1 arm, #849890 (diff)
downloadgentoo-998dd773.tar.gz
gentoo-998dd773.tar.bz2
gentoo-998dd773.zip
net-analyzer/zabbix: bump to 5.0.24
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
-rw-r--r--net-analyzer/zabbix/Manifest2
-rw-r--r--net-analyzer/zabbix/zabbix-5.0.24.ebuild393
2 files changed, 395 insertions, 0 deletions
diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest
index eec944700c25..8879a87e573f 100644
--- a/net-analyzer/zabbix/Manifest
+++ b/net-analyzer/zabbix/Manifest
@@ -1,6 +1,8 @@
DIST zabbix-4.0.38.tar.gz 17558387 BLAKE2B 1ddf27d76734128ddd197eb9dffeb59018282464a7322973dc4102992c0ade003d4d0291194f5b5a487d83a702917d6f0036636e56acc424bd7a7d6beb3f787c SHA512 0d38a74336c9e46b3f9985aca3508312dd5b15affeadee3497ebf8d5e59b4fa7b99ff28819b01878cbc5c9c304c1992a6a91d73f35bf1a333ae2ee561e0d7e1f
DIST zabbix-5.0.22-go-deps.tar.xz 34395200 BLAKE2B 3065878d5d61617f52ec48381a248ea13a603c13bb1cc18b6fde4e81f47bfd9dc4bafe34303e4bb46f1d7e9809d0b17acf48b782c11162fdcf04f0de89402f2b SHA512 fc30d33066248fe7c9049fec7538e1d1880d9c23d10516032027ea90e90a7531288990a33a48cbab2722a6ca67f49f79507cce7351d2c026317fc58843d4868e
DIST zabbix-5.0.22.tar.gz 21245241 BLAKE2B d2343fc5dbc4112ef77c75bd00b8344a363a8e2acc6623a009ebd24d7116377a66d2ca94f22dee386fbee1fa9822ce7e08287cb1336fe939bd2b621fe57b5b1f SHA512 d326ed5dd81b44adf80e8cc01d32b3b7ebed0b8ffddc2870e76ffcd010513f2b2bbe4586681e5c5ab5202f88c7861078efad537bb852ee52d5c00b7712cc2aab
+DIST zabbix-5.0.24-go-deps.tar.xz 34371892 BLAKE2B 273978d3a4dd46e4d41d892f3217ae2ee0d2bfe9bed753283b5fdf3a13e6cb8f912a4726b92cc2637cb8103c63141f24d3c49c884f54598a9c4d99bed3830552 SHA512 bfafb96c6d69ad2c775add9392117c384a633b334ad447e1ec61cf6f01bd72ded0870d778650ff18a912f6ca3bc98f581052464353b22350eaf724bddc29f8d8
+DIST zabbix-5.0.24.tar.gz 21296805 BLAKE2B 16c3fe6ef0732d627c70555b80961308ba9049978efc51c44162e5ceb940369ce36f87f33e6725de789c97d29edb2d0b4c2b2e58ac56a95e1b644cff13d2f64b SHA512 5ad70fdd189ce2630c019df6edad70fbfa7d2b0f72b42ae1950fb844f3edadf87c3108eefa7f3d343d4c3464d8aa58036dfbcab4109682d40b455788019dd62b
DIST zabbix-6.0.3-go-deps.tar.xz 35806596 BLAKE2B bf86722b1ee26237e42b4b3b5558415e0eb29dbe675b70585c8bb06c0b1e469ed9887e425778503c1d42ee2bd938b085f544d0696d080e04957dcb5794b7afa4 SHA512 0a5a051561dee2f3e42f18fff9127e3c8a0b5a7cae3a828a880866feac81a21ef71ba83c53f9e5a37fb3eee78475974b2f30ba5398012aeca6adf8d3cea74399
DIST zabbix-6.0.3.tar.gz 33135282 BLAKE2B d2cb50678710e96737e72ddb4b0b02d4695f872df6cab2edfd50d343ffc0103eec3191bfa02d8421e29c583f6d478598effc22a0f8d3f76b57a9ac3b4e4369fe SHA512 f93a7b4b19d2a1561e42ef67378bfb94a5edaae5b9bba8f2214de3bad1bf9d7efcb32da9f1b3ee820cc6bdc68308286606c4ceb7e1ba0ab42e24045c56f8ce47
DIST zabbix-6.0.5-go-deps.tar.xz 36045828 BLAKE2B 71827dfb5313b986ed23c5c1d7a99a020feabe81b6ee8c7c13d7fda40ce8f5f6d7de26a05daba5fa2e589fc2577f2bcc0961d4f8f0881faaaa986f13e4ae0a16 SHA512 6c8f6731cc29df4d5870cfab71c809e5c844ebc88649b9d25fb6ef7c3671e2a247aad1a24dcaa4cbb35039cce57cfabfa7ac56473bd5b9317bb5ecaa0cbd2d53
diff --git a/net-analyzer/zabbix/zabbix-5.0.24.ebuild b/net-analyzer/zabbix/zabbix-5.0.24.ebuild
new file mode 100644
index 000000000000..941ae8016cfc
--- /dev/null
+++ b/net-analyzer/zabbix/zabbix-5.0.24.ebuild
@@ -0,0 +1,393 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# To create the go modules tarball:
+# cd src/go
+# GOMODCACHE="${PWD}"/go-mod go mod download -modcacherw
+# tar -acf zabbix-${PV}-go-deps.tar.xz go-mod
+
+EAPI=8
+
+GO_OPTIONAL="yes"
+# needed to make webapp-config dep optional
+WEBAPP_OPTIONAL="yes"
+inherit webapp java-pkg-opt-2 systemd tmpfiles toolchain-funcs go-module 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/$(ver_cut 1-2)/${P}.tar.gz
+ agent2? ( https://dev.gentoo.org/~fordfrog/distfiles/${P}-go-deps.tar.xz )
+"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+WEBAPP_MANUAL_SLOT="yes"
+KEYWORDS="~amd64 ~x86"
+IUSE="+agent +agent2 curl frontend gnutls ipv6 java ldap libxml2 mysql odbc openipmi +openssl oracle +postgres proxy server snmp sqlite ssh static"
+REQUIRED_USE="|| ( agent agent2 frontend proxy server )
+ ?? ( gnutls openssl )
+ proxy? ( ^^ ( mysql oracle postgres sqlite ) )
+ server? ( ^^ ( mysql oracle postgres ) !sqlite )
+ static? ( !oracle !snmp )"
+
+COMMON_DEPEND="
+ curl? ( net-misc/curl )
+ gnutls? ( net-libs/gnutls:0= )
+ 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 )
+ openssl? ( dev-libs/openssl:=[-bindist(-)] )
+ oracle? ( dev-db/oracle-instantclient[odbc,sdk] )
+ 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 )
+"
+
+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
+ agent2? (
+ >=dev-lang/go-1.12
+ app-arch/unzip
+ )
+"
+
+# upstream tests fail for agent2
+RESTRICT="test"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.0.18-modulepathfix.patch"
+ "${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch"
+ "${FILESDIR}/${PN}-5.0.22-system.sw.packages.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
+ 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 agent2) \
+ $(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 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)
+}
+
+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-r1.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
+
+ if use agent2; then
+ insinto /etc/zabbix
+ doins "${S}"/src/go/conf/zabbix_agent2.conf
+ fperms 0640 /etc/zabbix/zabbix_agent2.conf
+ fowners root:zabbix /etc/zabbix/zabbix_agent2.conf
+
+ newinitd "${FILESDIR}"/zabbix-agent2.init zabbix-agent2
+
+ dosbin src/go/bin/zabbix_agent2
+
+ systemd_dounit "${FILESDIR}"/zabbix-agent2.service
+ newtmpfiles "${FILESDIR}"/zabbix-agent2.tmpfiles zabbix-agent2.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 ui/* "${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.9.jar \
+ src/zabbix_java/lib/logback-console.xml \
+ src/zabbix_java/lib/logback-core-1.2.9.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.32.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."
+ 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
+
+ if use agent2; then
+ tmpfiles_process zabbix-agent2.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
+}