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 (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6685B1580FD for ; Sat, 21 Dec 2024 11:40:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A8909E07E6; Sat, 21 Dec 2024 11:40:24 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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 0F11DE07E6 for ; Sat, 21 Dec 2024 11:40:24 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 E381933E3A9 for ; Sat, 21 Dec 2024 11:40:22 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4885D1AB5 for ; Sat, 21 Dec 2024 11:40:21 +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: <1734781213.7e91ace309e73a5565517673863aa71db4a04db0.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-7.0.7.ebuild X-VCS-Directories: net-analyzer/zabbix/ X-VCS-Committer: fordfrog X-VCS-Committer-Name: Miroslav Šulc X-VCS-Revision: 7e91ace309e73a5565517673863aa71db4a04db0 X-VCS-Branch: master Date: Sat, 21 Dec 2024 11:40:21 +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: 2e39e743-1abc-45ea-ab15-0a0d758855ed X-Archives-Hash: 2f9b563955401325ca797089ce5d8860 commit: 7e91ace309e73a5565517673863aa71db4a04db0 Author: Miroslav Šulc gentoo org> AuthorDate: Sat Dec 21 11:40:13 2024 +0000 Commit: Miroslav Šulc gentoo org> CommitDate: Sat Dec 21 11:40:13 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e91ace3 net-analyzer/zabbix: bump to 7.0.7 Signed-off-by: Miroslav Šulc gentoo.org> net-analyzer/zabbix/Manifest | 2 + net-analyzer/zabbix/zabbix-7.0.7.ebuild | 371 ++++++++++++++++++++++++++++++++ 2 files changed, 373 insertions(+) diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest index 268479c498c7..9a5c543d9c72 100644 --- a/net-analyzer/zabbix/Manifest +++ b/net-analyzer/zabbix/Manifest @@ -6,6 +6,8 @@ DIST zabbix-6.4.20-go-deps.tar.xz 34456784 BLAKE2B d703a985d578580af16810dd7c030 DIST zabbix-6.4.20.tar.gz 47050234 BLAKE2B 06e523d51e49625285bd6cfbed4ba790218f69eeddbb57e6b635ff7ed6f710dce5b3c9fd5b9333bfb1e582187b5a6c3b3400763eb129fe6c03f52b55c4521499 SHA512 cde89b8bf4b5e6c39a8a7e661e7c229da9f189bf6ffd9960505daf3d63627d7bc12d420a9262244d789b30ceda34b7668e49ec9d52b8eea7144b9897871d1ae0 DIST zabbix-7.0.6-go-deps.tar.xz 34172684 BLAKE2B f0f3f5af7f1c5d849e86b05e4bf1be48dbb78fd233e9c2b5b731ed6cf0257bd00b0ad54fa8b56f8355094af03910bb2f556d5cc3624b3c1b63dc2d5a3735a2a4 SHA512 51f64599259ad911e1befc14c3fa347f02a58c44f69694fd6ed70a6f7d0e405c7f800b8236d2d3dc0b64a09eedb6291f5509b847790f10ad6c225fd4246a5ea9 DIST zabbix-7.0.6.tar.gz 44028175 BLAKE2B ecdaf4e2a0a949e216e662a8e691bf5627c7369b83e9d91bd9e26a99137b0741950c5910a146915689e8a761ed14facc425dc703fec080007c490c10b40d33ed SHA512 ea74e1b45487333579cfe3c421d9467895efc3ce511fc4795b6e18950128ee9ead6599934b7dcb3aa393f32fd81847b48c61924196d111e99f26f65b620d83aa +DIST zabbix-7.0.7-go-deps.tar.xz 34173780 BLAKE2B 2b99762800cc2c7f1364f05b1ebf61083f3244bf9b7efa716450ed72cf2e52b554a3c4da639d645705cc5d733c670dfdba6bd3260a93cb34681c21db083093bf SHA512 a8d9acb2b22501fad5b3cbac5eef6af4c385030df686e52a35d6c156453564a3a95a161defc40ffc5b241a1dca7693398cb2144ed92a7ed6d4d03fdd0aa2d106 +DIST zabbix-7.0.7.tar.gz 44142959 BLAKE2B 506addefd46d3765206c2268a16fca453be0eb6511ca69f38089b43e2a34c0836a8f458be08a41af18f71d96884cadf72f5c87e9681892154a45cfe35a1378f2 SHA512 670144e89554251a4e45e358fef2185d90bb610b318f637e6f9113685a983c574224d1a39e0b2a521d489a40a185712bad0c4809e39a61cbaa20477255244373 DIST zabbix-7.2.0-go-deps.tar.xz 34463060 BLAKE2B aed6fc85ab7cf93eb01766ca919bc1dc6354c1c1c23c1b50c1ad7c5cac9eabc97fe7971181d6fdfe013952fd29fe2f91801f0945dc50455ef313fbab4871d41c SHA512 fb2549eb721a0425435e80291ede82b7107bef087c9f6a8c835405ceb9cc5d47409543cdbd9bf39b4321a27c71f23112ce47ae881d552c4a17da61f71ea2377d DIST zabbix-7.2.0.tar.gz 40284122 BLAKE2B 92140e4a23d46a6ad3bf24941f719acf793ee0e597c5a098d6afa25cbef3bcd9f063a8fb39645f6469febef3dea90ab69cc9c9501b8490576de2ffb7427b520a SHA512 be8f3a7f58af15ab5b0ee5e47666fdf7888937d99bbe8f491be1ab668f3812237c652f4ebbdbdcfd747a9b90fe489ffbbe2c199468ab19c618f4e3bda12cc5fb DIST zabbix-7.2.1-go-deps.tar.xz 34175908 BLAKE2B 204abe329feb80c10bc3da8a62ab7e9b4601878812209590236f149976147a9c97c9885e9d248fcccba938c98429d65276380e432928b4d24437d3ccd89243eb SHA512 6b625e4096d008bdd279fc16152f9e0c48b36ac97ffc1da8ca6c57666c21c6f7cd9c65808c577a43966b55602a81bef734bd0aa395bd81d975061615aa3e906b diff --git a/net-analyzer/zabbix/zabbix-7.0.7.ebuild b/net-analyzer/zabbix/zabbix-7.0.7.ebuild new file mode 100644 index 000000000000..f90e2783580f --- /dev/null +++ b/net-analyzer/zabbix/zabbix-7.0.7.ebuild @@ -0,0 +1,371 @@ +# Copyright 1999-2024 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 $(pwd | grep -Eo 'zabbix-[0-9.]+')-go-deps.tar.xz go-mod + +EAPI=8 + +GO_OPTIONAL="yes" +# needed to make webapp-config dep optional +WEBAPP_OPTIONAL="yes" +inherit autotools 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 ) +" + +S=${WORKDIR}/${MY_P} + +LICENSE="AGPL-3" +SLOT="0/$(ver_cut 1-2)" +WEBAPP_MANUAL_SLOT="yes" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="agent +agent2 curl frontend gnutls ipv6 java ldap libxml2 mysql odbc openipmi +openssl +postgres proxy selinux server snmp sqlite ssh static" +REQUIRED_USE="|| ( agent agent2 frontend proxy server ) + ?? ( gnutls openssl ) + agent2? ( !gnutls ) + proxy? ( ^^ ( mysql postgres sqlite ) ) + server? ( ^^ ( mysql postgres ) !sqlite ) + static? ( !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(-)] ) + postgres? ( dev-db/postgresql:* ) + proxy? ( + dev-libs/libevent:= + 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? ( + dev-libs/libpcre2:= + net-analyzer/fping[suid] + ) + selinux? ( sec-policy/selinux-zabbix ) + server? ( + app-admin/webapp-config + dev-libs/libpcre2:= + 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] ) + 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}-6.4.0-configure-sscanf.patch" +) + +ZABBIXJAVA_BASE="opt/zabbix_java" + +pkg_setup() { + if use frontend; then + webapp_pkg_setup + fi + + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + default + + # Since we patch configure.ac with e.g., ${PN}-6.4.0-configure-sscanf.patch". + eautoreconf +} + +src_configure() { + local econf_args=( + --with-libpcre2 + "$(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 postgres postgresql)" + "$(use_with snmp net-snmp)" + "$(use_with sqlite sqlite3)" + "$(use_with ssh ssh2)" + ) + + econf ${econf_args[@]} +} + +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 + 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 + keepdir /etc/zabbix/zabbix_agent2.d/plugins.d + + 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 " + 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 +} + +pkg_prerm() { + (use frontend || use server) && webapp_pkg_prerm +}