From e4769acf6646f4b0ef28cb695cec8ed128aba920 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 15 Dec 2023 14:48:25 +0000 Subject: gentoo auto-resync : 15:12:2023 - 14:48:25 --- net-analyzer/zabbix/Manifest | 13 +- net-analyzer/zabbix/zabbix-5.0.38.ebuild | 2 +- net-analyzer/zabbix/zabbix-6.0.22.ebuild | 2 +- net-analyzer/zabbix/zabbix-6.4.10-r1.ebuild | 386 ++++++++++++++++++++++++++++ net-analyzer/zabbix/zabbix-6.4.10.ebuild | 383 --------------------------- net-analyzer/zabbix/zabbix-6.4.7.ebuild | 383 --------------------------- net-analyzer/zabbix/zabbix-6.4.8-r1.ebuild | 386 ++++++++++++++++++++++++++++ net-analyzer/zabbix/zabbix-6.4.8.ebuild | 383 --------------------------- net-analyzer/zabbix/zabbix-6.4.9-r1.ebuild | 386 ++++++++++++++++++++++++++++ net-analyzer/zabbix/zabbix-6.4.9.ebuild | 383 --------------------------- 10 files changed, 1165 insertions(+), 1542 deletions(-) create mode 100644 net-analyzer/zabbix/zabbix-6.4.10-r1.ebuild delete mode 100644 net-analyzer/zabbix/zabbix-6.4.10.ebuild delete mode 100644 net-analyzer/zabbix/zabbix-6.4.7.ebuild create mode 100644 net-analyzer/zabbix/zabbix-6.4.8-r1.ebuild delete mode 100644 net-analyzer/zabbix/zabbix-6.4.8.ebuild create mode 100644 net-analyzer/zabbix/zabbix-6.4.9-r1.ebuild delete mode 100644 net-analyzer/zabbix/zabbix-6.4.9.ebuild (limited to 'net-analyzer/zabbix') diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest index 25111e3fd28d..6d8d5abbe289 100644 --- a/net-analyzer/zabbix/Manifest +++ b/net-analyzer/zabbix/Manifest @@ -34,21 +34,18 @@ DIST zabbix-6.0.25-go-deps.tar.xz 30379344 BLAKE2B 7ea8fbcfa0fa0476f06fa7dcf8474 DIST zabbix-6.0.25.tar.gz 44109483 BLAKE2B 1b433d119838b33d449a9c9088355e3fe703ab120e1a606daf405c9ac8926c9b24a97f7a95b30c27e11f1673564ed32271b4117ca12822fb1b1edc0e4d70e06f SHA512 0be1ce76754788e05ff73a02f370c2b6b4bc2f69a463a47304ac9504a8cd9da2697c54d897a95b39841ceb38ded0c985f4772e453a393526aca6475c78eb7a1e DIST zabbix-6.4.10-go-deps.tar.xz 33075148 BLAKE2B 42462f881d78cfd926066ca3f181c4a0f10e643fd87e703d87edbfcf21a3fa418335b2b0bf7a8beba41782ded4b672fd0b9cb04566db9b886941ea31eab0950d SHA512 e2ea655e28983af5dc144b19067d28aa022c3824ad77ac247e1503451fe49073870f453dfefb288b74951246acc2994150c257133f9e22029052e4b70e03f3a6 DIST zabbix-6.4.10.tar.gz 45608366 BLAKE2B 5cabb552e6930062b53bde43da83475fd982eedcc9344dcd5c690bd8749631fa0e781d0784105734520e470451377518c9e63cba110bbe52a437d0cf2cdc82ec SHA512 bd8460da2cca3b8a0b4e0adbf5a7a30e74c30667bd95f161ca6159798f788748f5de6a512a3b36f2b47d695daf3e810abcf68b3016af6fd06602075a76cb4ef6 -DIST zabbix-6.4.7-go-deps.tar.xz 20645004 BLAKE2B 49902be533dcf0ccc283f208e5edccf5b5e0afaf501f2a1fe2ae19c60bc603bba4a812a676080044b26eea9f72886c44444fcd4f4471074ad8f726fc4b854f94 SHA512 1e9b89f1c83361c2ef83d589560c64428e62628330ac3e224f8e80f24fc47a38df05d60eca448fa8d5d1ba0c9ce5d93348be858d4e03d7f205b75b6bbf7ef11a -DIST zabbix-6.4.7.tar.gz 44036704 BLAKE2B 0ebd9e4393746469d44a0c4e6eddb2721a3a82b9df5a6388a0eed6d6f685ff983d9949eb41fa71e8982cad9f2c61da141beac55bd2fe18c0a55227a5ddcd0fd8 SHA512 6296ac5873ec4d6c92ff4a89e429ee28645b61c181e1cf5d98612b8d4536a4196baa52c8aaaa7a9ba02f98301f73b3d982a15692a9750f61326968c01a02f7a2 DIST zabbix-6.4.8-go-deps.tar.xz 20645996 BLAKE2B 59e7349fd18ffa76dbb7207b649aad8ebf767423085b603b2a677ad680b1dce4c7474e4892d11df0aa38a7c0b63e3f3944bf612dbbc3eebef6e995220dea4a60 SHA512 a8860440010f85c12325048a3590a0a594af151566b40d88a02656469e2f46a9988fa4c21c6582bcaf37aa096dab9b06d08a45cbba52736732905744c4996d97 DIST zabbix-6.4.8.tar.gz 44165922 BLAKE2B ac01f9fc1546a936bc57d2c97da2ec95bdf6b467d24a4ce6f08d34a40a94725a7f64c62253c1386e58ea601f0d739d8276713a16d0f35a4d9746d68cda21d0af SHA512 712e9f3fdb772475137c7238e8ca26f510180c147b7aa74b29567033f62d4beb00275b96aaf05c978fec341b08c82102ecf1976a5e8af257e848ae3974a6fec9 DIST zabbix-6.4.9-go-deps.tar.xz 33364556 BLAKE2B 8785cea54a5ae3993cfd71499a2cae4af725912928a2f02d5195217ca340a5004cbc61fc58ba747c61749f01e4b67eac77c5bff22b095d4b87d86a6348e6fc7d SHA512 24cd8350c4e5993b4da9ebbf9480841619e13957809720fbc8822e874c4138744492265cafef2838737104fb07698959a3802edbfeb64f5e8de71b7b5a3f5d18 DIST zabbix-6.4.9.tar.gz 45589960 BLAKE2B 7a7c0ace08fec2eae8d0f6d6b27eb22269922cb04f8eba4b84f02677228224c34c9a2c038fab18451cb71aea67a500c5f460b754872ff7d22bb86aa15049b912 SHA512 3caa35ddc5abb6bcdfb2d7e24cb20d27caf2974dbc8897ac8d44b8f4935576bbf00a7a5f962229dd6c7a439f826e292b02d777276264eaaccf870e2dc5440813 -EBUILD zabbix-5.0.38.ebuild 9601 BLAKE2B 1962b4e56ececde58d08a37eaad7779a9e8dba5cd68c09345d87d4be35a855aea573cdb5d67a6d4d88b6909592124ea22d9280123ea9bfb9a3e26df4efd9a02e SHA512 7fe2c61a0bc4b483c28731f5099b46baed4d7ba701c46ac782fdde1a264f12ab2a8b1287a33111334289bfce97cb46683f4c2b4dd850832f38a7e1f390b884bd +EBUILD zabbix-5.0.38.ebuild 9602 BLAKE2B 47b55db6d8d6ccddb0d51ea4125b08afc8496058b9fd23e48b90664c41d6052d22964f31ed5940d9c215f05ca1ba7e662d5d90ff4aade4a3adb5b8992aad1e33 SHA512 a26dc4997a81b3ea9ca38bc6af2a73c123f731c3580d616c332c8ef7b145bbacfd33ce20d877ed11f6a3a6a5db43e90b1add9b3edac2c537dd1f9a622cb37fa7 EBUILD zabbix-5.0.39.ebuild 9602 BLAKE2B 47b55db6d8d6ccddb0d51ea4125b08afc8496058b9fd23e48b90664c41d6052d22964f31ed5940d9c215f05ca1ba7e662d5d90ff4aade4a3adb5b8992aad1e33 SHA512 a26dc4997a81b3ea9ca38bc6af2a73c123f731c3580d616c332c8ef7b145bbacfd33ce20d877ed11f6a3a6a5db43e90b1add9b3edac2c537dd1f9a622cb37fa7 EBUILD zabbix-5.0.40.ebuild 9603 BLAKE2B b0095aaac0463d293195826e08378f8a01f69af09b0b2f5ade582b95799f98ae350e0574f41d0fd45dcc745835e9e96b7e62f3378e00d8e208850c82501109b0 SHA512 4a51aef8decd462f88281f6d271c64433cc3a4e23e700068281876b4d1a07397fddfe402050b9c229188d7a13e3d0ccd81f1f0373935194f96b40e40ce355b45 -EBUILD zabbix-6.0.22.ebuild 9694 BLAKE2B aee3819c747864c2c36af2518c70e7658c70a31cf4d5a0f3246a9c7ac46655ff475b05a2fe0290e2b5f88d6845c304a4f78307b4d2871c0a3b5553ca84547d7a SHA512 4fdb06f68f76f052742487dc15bb8cd199a9a63ab9a7db7d758e799de6ee4d442606859a30bbaf8bbcc8bf234cd0cfc78c0038a24b09f20d45ff5cde5ecb8fd3 +EBUILD zabbix-6.0.22.ebuild 9695 BLAKE2B 3ae220c9be90efe1c9f50b33a0a8fc477bb6fdeef5e1280bdc6470721012c21eba996a54bbdeef07d38c019bcd19f47773e805c258f0a4aa196fe1e7f3d1aba7 SHA512 dc18344e01f63b9e3b9cf92b3bbb599bd6a9e3d049b4aa3c109ce040cf1c1260ea9ff0c911f0ed250cc1332975b7c16c4ea34359bc4e76eed0b69a0c3839edaa EBUILD zabbix-6.0.23.ebuild 9695 BLAKE2B 3ae220c9be90efe1c9f50b33a0a8fc477bb6fdeef5e1280bdc6470721012c21eba996a54bbdeef07d38c019bcd19f47773e805c258f0a4aa196fe1e7f3d1aba7 SHA512 dc18344e01f63b9e3b9cf92b3bbb599bd6a9e3d049b4aa3c109ce040cf1c1260ea9ff0c911f0ed250cc1332975b7c16c4ea34359bc4e76eed0b69a0c3839edaa EBUILD zabbix-6.0.24.ebuild 9696 BLAKE2B a8929cc54c50ba6a1f5a489824d6850a21afbd4a9ac33b019eaa3b03de4c007faf36a32ce1c8ce29ed1b8c14e450edc23ac67fe38ae29c21cd14e989ef1deb9b SHA512 e9eecc67b99bc92a17ea5208e175ae4cba3611ff685bd302b23b3b92f300263d5e2a2414d910f16b68eee1d14a5f7f27c5bcc3fe26501a9ee5fdd7583c1155e2 EBUILD zabbix-6.0.25.ebuild 9696 BLAKE2B a8929cc54c50ba6a1f5a489824d6850a21afbd4a9ac33b019eaa3b03de4c007faf36a32ce1c8ce29ed1b8c14e450edc23ac67fe38ae29c21cd14e989ef1deb9b SHA512 e9eecc67b99bc92a17ea5208e175ae4cba3611ff685bd302b23b3b92f300263d5e2a2414d910f16b68eee1d14a5f7f27c5bcc3fe26501a9ee5fdd7583c1155e2 -EBUILD zabbix-6.4.10.ebuild 9745 BLAKE2B 376dd88695725ee631b38c238cd3b0bc537d807644f5f57105d62c8d1470014bd255bacc21e619f51d0550f7a6fa1453ebb0e6eae77407f0bd9404b13ae3d9e4 SHA512 78764d4e09b32e58335b34c1a613ffbf1c70e659ecace4aaad914b257438f67d7a36e3ac4dbed37ea5b28d95c452b44f05a7553e66c7ba659a0b33f9af7e0eca -EBUILD zabbix-6.4.7.ebuild 9743 BLAKE2B 11e5b4ddc5cc5337e34d947a6b6a1677a6c5ee8a137565c0a98e4b840a5f0bbba0f5f60408f25faeb6e69f2b3f6dd0a9eabdfc2f3ce127085e42c73209509cfc SHA512 0b361a6ef4aae98c579b900b9f12c66b73d0eaf17b859e3be66cac1ea8a17ff043b9a7d95ac89d136c029a1906ef2830db451ee910d3e0c506de3caa65ab3aa1 -EBUILD zabbix-6.4.8.ebuild 9744 BLAKE2B 3301bb0527af4b6b1476e80a2d14d525f0a8900f6b73eb52924d1fcb9e3cf1aee22c0dc30cbe69421bee238a92adfcb7fff4905739571c34e9f0f8783a4bb227 SHA512 8a0bf9ba88b9f0f7e8b25c1faf7eb692e0d29c0f8e6d52420153e591cedd2d8553c49e307e329066591f394ca1f775a78fa6a81ca497de721fb31f66d511b5f8 -EBUILD zabbix-6.4.9.ebuild 9745 BLAKE2B 376dd88695725ee631b38c238cd3b0bc537d807644f5f57105d62c8d1470014bd255bacc21e619f51d0550f7a6fa1453ebb0e6eae77407f0bd9404b13ae3d9e4 SHA512 78764d4e09b32e58335b34c1a613ffbf1c70e659ecace4aaad914b257438f67d7a36e3ac4dbed37ea5b28d95c452b44f05a7553e66c7ba659a0b33f9af7e0eca +EBUILD zabbix-6.4.10-r1.ebuild 9848 BLAKE2B 86d419e05b90e3d3d9b655066697c48f3c471efbf629cfda6d38bbe3a9d585cc548eadb7fa206336a48a00dca4cd8238f8573ed49df6b7f9465c8e0920331587 SHA512 1ef9ba38bd472145398c366d8751e564942059e826bb346056cc8930f211cfa66dc5646c678f1984bdcab7d7ea05ae0ad086768c1307a75f446154e96d0aa202 +EBUILD zabbix-6.4.8-r1.ebuild 9847 BLAKE2B 8d2b0a809e44380247ed97a23a58f86f8b7bf4f7b67a13c8238b11d7fd5e3f8b640c57d46ac8e71f409fb6b4f28a9bd83a558eeefdea419ad53754261bb48ba6 SHA512 87cb289487ee48de60ae29322d653768a6b209af418077de38bdd78ef0be34b58fca53cb795b8af845747330c8aaeb7874cead270ea0ce3a19b2abdf6ecd14aa +EBUILD zabbix-6.4.9-r1.ebuild 9848 BLAKE2B 86d419e05b90e3d3d9b655066697c48f3c471efbf629cfda6d38bbe3a9d585cc548eadb7fa206336a48a00dca4cd8238f8573ed49df6b7f9465c8e0920331587 SHA512 1ef9ba38bd472145398c366d8751e564942059e826bb346056cc8930f211cfa66dc5646c678f1984bdcab7d7ea05ae0ad086768c1307a75f446154e96d0aa202 MISC metadata.xml 1576 BLAKE2B 877e83a97b492fe256f3459332dacb4680b2ddeaaab34c077f1ead5eb387d8f5ef6f7cca85435eedc85cdb0db7243a805a8b49c5ef7b1b7dce39a9213b401eae SHA512 77d805096f0bcf2f3650216c69cb33c7dbbcdfc8b7c56066463ce5436af30dd0e9b8c6d124b59bfdbdac4c18aa628c92f78722920284622065af0ddb6448cd3d diff --git a/net-analyzer/zabbix/zabbix-5.0.38.ebuild b/net-analyzer/zabbix/zabbix-5.0.38.ebuild index b16468daa5d8..f6e20da5e1f4 100644 --- a/net-analyzer/zabbix/zabbix-5.0.38.ebuild +++ b/net-analyzer/zabbix/zabbix-5.0.38.ebuild @@ -24,7 +24,7 @@ SRC_URI="https://cdn.zabbix.com/${PN}/sources/stable/$(ver_cut 1-2)/${P}.tar.gz LICENSE="GPL-2" SLOT="0/$(ver_cut 1-2)" WEBAPP_MANUAL_SLOT="yes" -KEYWORDS="amd64 x86" +KEYWORDS="amd64 ~x86" IUSE="+agent +agent2 curl frontend gnutls ipv6 java ldap libxml2 mysql odbc openipmi +openssl oracle +postgres proxy selinux server snmp sqlite ssh static" REQUIRED_USE="|| ( agent agent2 frontend proxy server ) ?? ( gnutls openssl ) diff --git a/net-analyzer/zabbix/zabbix-6.0.22.ebuild b/net-analyzer/zabbix/zabbix-6.0.22.ebuild index 040a10ca07dd..547968bc7d14 100644 --- a/net-analyzer/zabbix/zabbix-6.0.22.ebuild +++ b/net-analyzer/zabbix/zabbix-6.0.22.ebuild @@ -24,7 +24,7 @@ SRC_URI="https://cdn.zabbix.com/${PN}/sources/stable/$(ver_cut 1-2)/${P}.tar.gz LICENSE="GPL-2" SLOT="0/$(ver_cut 1-2)" WEBAPP_MANUAL_SLOT="yes" -KEYWORDS="amd64 x86" +KEYWORDS="amd64 ~x86" IUSE="agent +agent2 curl frontend gnutls ipv6 java ldap libxml2 mysql odbc openipmi +openssl oracle +postgres proxy selinux server snmp sqlite ssh static" REQUIRED_USE="|| ( agent agent2 frontend proxy server ) ?? ( gnutls openssl ) diff --git a/net-analyzer/zabbix/zabbix-6.4.10-r1.ebuild b/net-analyzer/zabbix/zabbix-6.4.10-r1.ebuild new file mode 100644 index 000000000000..3df03f9f33da --- /dev/null +++ b/net-analyzer/zabbix/zabbix-6.4.10-r1.ebuild @@ -0,0 +1,386 @@ +# Copyright 1999-2023 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 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 ) +" + +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 selinux server snmp sqlite ssh static" +REQUIRED_USE="|| ( agent agent2 frontend proxy server ) + ?? ( gnutls openssl ) + agent2? ( !gnutls ) + 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? ( + 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] ) + 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}-6.4.0-configure-sscanf.patch" + "${FILESDIR}/${PN}-6.4.6-clang16-build-fix.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 + + # 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 oracle)" + "$(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 +} diff --git a/net-analyzer/zabbix/zabbix-6.4.10.ebuild b/net-analyzer/zabbix/zabbix-6.4.10.ebuild deleted file mode 100644 index 5fe722d26411..000000000000 --- a/net-analyzer/zabbix/zabbix-6.4.10.ebuild +++ /dev/null @@ -1,383 +0,0 @@ -# Copyright 1999-2023 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 selinux server snmp sqlite ssh static" -REQUIRED_USE="|| ( agent agent2 frontend proxy server ) - ?? ( gnutls openssl ) - agent2? ( !gnutls ) - 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? ( - 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] ) - 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}-6.4.0-configure-sscanf.patch" - "${FILESDIR}/${PN}-6.4.6-clang16-build-fix.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() { - 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 oracle)" - "$(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 -} diff --git a/net-analyzer/zabbix/zabbix-6.4.7.ebuild b/net-analyzer/zabbix/zabbix-6.4.7.ebuild deleted file mode 100644 index 9463166f372f..000000000000 --- a/net-analyzer/zabbix/zabbix-6.4.7.ebuild +++ /dev/null @@ -1,383 +0,0 @@ -# Copyright 1999-2023 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 selinux server snmp sqlite ssh static" -REQUIRED_USE="|| ( agent agent2 frontend proxy server ) - ?? ( gnutls openssl ) - agent2? ( !gnutls ) - 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? ( - 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] ) - 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}-6.4.0-configure-sscanf.patch" - "${FILESDIR}/${PN}-6.4.6-clang16-build-fix.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() { - 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 oracle)" - "$(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 -} diff --git a/net-analyzer/zabbix/zabbix-6.4.8-r1.ebuild b/net-analyzer/zabbix/zabbix-6.4.8-r1.ebuild new file mode 100644 index 000000000000..228fb40d6482 --- /dev/null +++ b/net-analyzer/zabbix/zabbix-6.4.8-r1.ebuild @@ -0,0 +1,386 @@ +# Copyright 1999-2023 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 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 ) +" + +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 selinux server snmp sqlite ssh static" +REQUIRED_USE="|| ( agent agent2 frontend proxy server ) + ?? ( gnutls openssl ) + agent2? ( !gnutls ) + 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? ( + 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] ) + 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}-6.4.0-configure-sscanf.patch" + "${FILESDIR}/${PN}-6.4.6-clang16-build-fix.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 + + # 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 oracle)" + "$(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 +} diff --git a/net-analyzer/zabbix/zabbix-6.4.8.ebuild b/net-analyzer/zabbix/zabbix-6.4.8.ebuild deleted file mode 100644 index 05728e16dff8..000000000000 --- a/net-analyzer/zabbix/zabbix-6.4.8.ebuild +++ /dev/null @@ -1,383 +0,0 @@ -# Copyright 1999-2023 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 selinux server snmp sqlite ssh static" -REQUIRED_USE="|| ( agent agent2 frontend proxy server ) - ?? ( gnutls openssl ) - agent2? ( !gnutls ) - 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? ( - 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] ) - 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}-6.4.0-configure-sscanf.patch" - "${FILESDIR}/${PN}-6.4.6-clang16-build-fix.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() { - 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 oracle)" - "$(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 -} diff --git a/net-analyzer/zabbix/zabbix-6.4.9-r1.ebuild b/net-analyzer/zabbix/zabbix-6.4.9-r1.ebuild new file mode 100644 index 000000000000..3df03f9f33da --- /dev/null +++ b/net-analyzer/zabbix/zabbix-6.4.9-r1.ebuild @@ -0,0 +1,386 @@ +# Copyright 1999-2023 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 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 ) +" + +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 selinux server snmp sqlite ssh static" +REQUIRED_USE="|| ( agent agent2 frontend proxy server ) + ?? ( gnutls openssl ) + agent2? ( !gnutls ) + 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? ( + 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] ) + 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}-6.4.0-configure-sscanf.patch" + "${FILESDIR}/${PN}-6.4.6-clang16-build-fix.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 + + # 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 oracle)" + "$(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 +} diff --git a/net-analyzer/zabbix/zabbix-6.4.9.ebuild b/net-analyzer/zabbix/zabbix-6.4.9.ebuild deleted file mode 100644 index 5fe722d26411..000000000000 --- a/net-analyzer/zabbix/zabbix-6.4.9.ebuild +++ /dev/null @@ -1,383 +0,0 @@ -# Copyright 1999-2023 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 selinux server snmp sqlite ssh static" -REQUIRED_USE="|| ( agent agent2 frontend proxy server ) - ?? ( gnutls openssl ) - agent2? ( !gnutls ) - 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? ( - 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] ) - 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}-6.4.0-configure-sscanf.patch" - "${FILESDIR}/${PN}-6.4.6-clang16-build-fix.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() { - 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 oracle)" - "$(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 -} -- cgit v1.2.3