From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 62BD0158086 for ; Fri, 24 Dec 2021 09:40:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A232C2BC010; Fri, 24 Dec 2021 09:40:21 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5654D2BC010 for ; Fri, 24 Dec 2021 09:40:21 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E531D3432A6 for ; Fri, 24 Dec 2021 09:40:19 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 62A071BF for ; Fri, 24 Dec 2021 09:40:18 +0000 (UTC) From: "Miroslav Šulc" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Miroslav Šulc" Message-ID: <1640338807.e3bb4c2aad8ccef0ba5f21082d371a47119c6332.fordfrog@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/zabbix/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-analyzer/zabbix/Manifest net-analyzer/zabbix/zabbix-4.0.37.ebuild X-VCS-Directories: net-analyzer/zabbix/ X-VCS-Committer: fordfrog X-VCS-Committer-Name: Miroslav Šulc X-VCS-Revision: e3bb4c2aad8ccef0ba5f21082d371a47119c6332 X-VCS-Branch: master Date: Fri, 24 Dec 2021 09:40:18 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 6b372c4d-9f42-48aa-bcce-1f5cd64c726b X-Archives-Hash: 1e01c306a7ed652399739d8f2c66ca44 commit: e3bb4c2aad8ccef0ba5f21082d371a47119c6332 Author: Miroslav Šulc gentoo org> AuthorDate: Fri Dec 24 09:40:07 2021 +0000 Commit: Miroslav Šulc gentoo org> CommitDate: Fri Dec 24 09:40:07 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3bb4c2a net-analyzer/zabbix: bump to 4.0.37 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Miroslav Šulc gentoo.org> net-analyzer/zabbix/Manifest | 1 + net-analyzer/zabbix/zabbix-4.0.37.ebuild | 366 +++++++++++++++++++++++++++++++ 2 files changed, 367 insertions(+) diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest index a6e2050d34a3..030463f8d622 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.35.tar.gz 17619679 BLAKE2B df90b7479ebb8ad706b090e25aca59448a90dd41aca154457ce7efd46b783a6802cd64594848cb87cf93b750b162e3cebf521db226572c864604e6b0f592cac6 SHA512 ec8956a7849fd861c1f01bef476bd9db315ca4909b7224b9740055202df5e76a8fe317e916034f8bbbe7bacd7daa434ce26c0b810b1fef809927ac7afba52268 DIST zabbix-4.0.36.tar.gz 17619115 BLAKE2B e64cc78c589cf42dd72e20be18a723fbcce8890de0ccf48d2328b744533c3a9b8d4cb7dd93b5e7b4f7f31c724b2aa797a70d5e6eb8db53ece9ad9a39edae4fb4 SHA512 39ff2a58ea189b75891bf59ebb0e4d85c97595f9754684622f4d3e3f5614ca38408ecf10e62c4055dc1bde3fbca621e41152bb7006c539fb88ca40b1969c49d2 +DIST zabbix-4.0.37.tar.gz 17552391 BLAKE2B c5f3b200e8dda2b4a961a78a3ba8cd97a6e07744c4e16acde3a740559cb70649660b5652d36cf42e87f28d03e14803c4efe9e585583834f7a765fcbf0e5953b9 SHA512 007e7664a6fe1e9b3e76f95c5cfdb9744a27139d243b6fcb78c2e84f01ccdc788130f824514d29f1557724761557e459924d22cb33bb35fe740b5fdc6746ef0e DIST zabbix-5.0.17.tar.gz 21326776 BLAKE2B fbf0af5bfd98c0e1a9a39799adb5ae4837278909065d4a2aef914052dd66d893063c1ea1b1c90b53833fec900e7dd0d3c3af4548cf432a488ece07a676f4eca6 SHA512 f7a23b51c3d2fb5f80ec888dc9eaf592dd13de3a61b9d065e6d54e1bb406e18ffef1b8e9d3ef516b2034d94fb7330bd80c2cb7b7d22eed7e57021bc66e1ee159 DIST zabbix-5.0.18.tar.gz 21377940 BLAKE2B 4143dd2b5c4b04795e2f1b43637e541e3108abd19b489cf720b8256cc3d992bc20e2693846ee53d138df22b1404f6cc86dcb22f1e0805dda444172f18f1c48a7 SHA512 84a6684e413bd9180bab3e19a286c5113e41dab036fe76cded4a7ffeb931314648260c5e379ddea07cfb5a95b05e630a4c5952b5f96cfe03a5022e61f6da8095 DIST zabbix-5.0.19.tar.gz 21367685 BLAKE2B 4e6b52d4ace766f700894d1eb6c7adf8e13ac72fe2534a48625302ffa6aea02734f8e81ee781a1d1aa0e6e375428919609edfca6094f17912123a7ed96e22af0 SHA512 b7223c656f8830e302ccc6321ff19e580eed199355ca9070ac2b59375e0794d17de1dfa4e1600ef6ac5a72e8abd2b80191b2f58fa77f25096dee52e6e40940b9 diff --git a/net-analyzer/zabbix/zabbix-4.0.37.ebuild b/net-analyzer/zabbix/zabbix-4.0.37.ebuild new file mode 100644 index 000000000000..d3edede455f2 --- /dev/null +++ b/net-analyzer/zabbix/zabbix-4.0.37.ebuild @@ -0,0 +1,366 @@ +# 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 ) !sqlite ) + 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_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-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 + + 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 " + 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 +}