diff options
author | Miroslav Šulc <fordfrog@gentoo.org> | 2021-08-31 14:34:45 +0200 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2021-08-31 14:34:45 +0200 |
commit | a475c807b941b7f1787fae0be319f68796b29697 (patch) | |
tree | 7774bb86898ba58da8c21a6751df3373506ead9d /net-analyzer | |
parent | net-analyzer/zabbix: bump to 5.0.15 (diff) | |
download | gentoo-a475c807b941b7f1787fae0be319f68796b29697.tar.gz gentoo-a475c807b941b7f1787fae0be319f68796b29697.tar.bz2 gentoo-a475c807b941b7f1787fae0be319f68796b29697.zip |
net-analyzer/zabbix: bump to 4.0.33
Package-Manager: Portage-3.0.22, Repoman-3.0.3
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/zabbix/Manifest | 1 | ||||
-rw-r--r-- | net-analyzer/zabbix/zabbix-4.0.33.ebuild | 370 |
2 files changed, 371 insertions, 0 deletions
diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest index 039ca188c526..944980431088 100644 --- a/net-analyzer/zabbix/Manifest +++ b/net-analyzer/zabbix/Manifest @@ -253,6 +253,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.31.tar.gz 17600018 BLAKE2B 6b3dd8bdc465fc610756b93cd033e0ade607af718a2914928d5a10cef648ac3c8276c75403fa889b00b4ec1485069240462f8f2c2aaff9767a2914e4b32c6817 SHA512 b4dc02b76f438ca922caee8a04c119c0958d7431622b36a2c26da2ed1a2fdc87e5e7abfcded033a852f6ee018e999f8fceea1a89a67b97d4c160e01a536d2663 DIST zabbix-4.0.32.tar.gz 17606713 BLAKE2B 48d0f8fdc3f538701383f0c246152df8d000aeb194669edf855dd96f0ee4b0a27d14a373d555cdda4f3ca9057f4abbb51d5184167bc4858ce798bf17284e0c74 SHA512 af3c3306c2ed1d47d980f0581324274b4bee6fe6bac657e7cba90d6079ad1a83d57d5279aeed54e63f28764d02476be881972667e84e1c8a85d90c659384766a +DIST zabbix-4.0.33.tar.gz 17614916 BLAKE2B e9edb516a4780daa2d4ced5a0753d597fabbb009d8109fb93dcdf8c738011459ee2bab65784998289bc13d21a40ec4c325eb72337a38f3940473ec347f9020ed SHA512 9ef74f50eefe6c9d8fb0d8cb8df9040331489520e2bb2df2cf83d7e698e6b99c2af1d31fdb385594a8696e3b186321cc8b9fddd654182a8a6e34eb5bf0f29fdd 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.14.tar.gz 21159722 BLAKE2B 627e64138335b2a3b679a69f21d778df1eb5bbf5455d8d2b0244f6194d3c79d2afe2227cc5093f34b783f63a7bc5c8e204ba39f4474493b67c3e91f7aafbc97b SHA512 9b373592918755174c33e0e348d5fcc21076903abe9149dec48a1b8779435e7afd7bc3db77deed98765ee4205253ee1314301d49db80cd103c730435f5299989 diff --git a/net-analyzer/zabbix/zabbix-4.0.33.ebuild b/net-analyzer/zabbix/zabbix-4.0.33.ebuild new file mode 100644 index 000000000000..b4467228139f --- /dev/null +++ b/net-analyzer/zabbix/zabbix-4.0.33.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 +} |