summaryrefslogtreecommitdiff
path: root/net-analyzer/zabbix
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /net-analyzer/zabbix
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'net-analyzer/zabbix')
-rw-r--r--net-analyzer/zabbix/Manifest18
-rw-r--r--net-analyzer/zabbix/files/zabbix-5.4.12-system.sw.packages.patch35
-rw-r--r--net-analyzer/zabbix/zabbix-4.0.38-r2.ebuild11
-rw-r--r--net-analyzer/zabbix/zabbix-4.0.41.ebuild367
-rw-r--r--net-analyzer/zabbix/zabbix-5.0.22.ebuild11
-rw-r--r--net-analyzer/zabbix/zabbix-5.0.24.ebuild (renamed from net-analyzer/zabbix/zabbix-5.4.12.ebuild)65
-rw-r--r--net-analyzer/zabbix/zabbix-6.0.3.ebuild12
-rw-r--r--net-analyzer/zabbix/zabbix-6.0.5.ebuild415
8 files changed, 856 insertions, 78 deletions
diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest
index 0d2eb9507ad5..d6264b3ef728 100644
--- a/net-analyzer/zabbix/Manifest
+++ b/net-analyzer/zabbix/Manifest
@@ -1,7 +1,6 @@
AUX zabbix-3.0.30-security-disable-PidFile.patch 1378 BLAKE2B c1efdfd0b223987c9d9bf1a3f7731f0bdfeb42d1641bbf4387d70ece757f5cb2fb88bafb87f6938a5efbec091f73d5fde0450e8aa0edc3143d589df5efbe5d19 SHA512 854b198b980e4b58dc6149e285bfa6361ab2a10b83a6d8f07b46754316d6764669e68da8018b402b59317ed95b50a13d25f68f28c4c33d76f0ef1e8dedc8da99
AUX zabbix-4.0.18-modulepathfix.patch 330 BLAKE2B 99b3f1082e220ff842e4c4c86e8fcf57666443dd1e124412f167548ab886352077e1f0548e49cf77f28a51d20cc37dc980448eb87c9e7814ac73dcbfe43388e0 SHA512 75330dddde2f47553ac6a6f71d6f2383ab34c0d64ac5dbe45dd31707d8797d1400215d698072df3a0f0eaf862f00509791a6a0eaa43a0f686657d885c03465b5
AUX zabbix-5.0.22-system.sw.packages.patch 1573 BLAKE2B b0105ba6ddd6d503e4be8829422496c0e38cfbca2e8a72548a7f25e94a3b603a378d15cdceb08a5a3ea652d8a6b70ac7772be04c1fc28e38a8501f985f5bb18b SHA512 813b643d43c48a2a69245aaf8088acf2873d0686754bdc1c85f1034aee21b97a1637497c0ce013a93aff3b2832104b11c883f1188db8cb46f2aa8c8d6a149315
-AUX zabbix-5.4.12-system.sw.packages.patch 1573 BLAKE2B 7aa96aa88a1783b94dc81b0253cf2094490547b49815ef73fa1c6e2d5742590ffbcf1ea064a506ef397300636e012a61416ffb4d0fb2eaecf186375556dce0d7 SHA512 7d56bfc332d1b07e12d59ec4c3279ed387f7cd6f71e8d119e68e9380283d91b739c2a9a585be62a147af08e4d1ac933f0a99dab411b22fb86e88c069a160d2ed
AUX zabbix-6.0.3-system.sw.packages.patch 1573 BLAKE2B 891fc64ed00e3d3d85ee360a04ff285a0efe1aa0720605ebcfe9fd99dca3b94ca8a5809995a944543f0c3dc56e418db809aae73236d822ae50d5e4cda4857374 SHA512 bf3b0ad920008ef907f1c5218f5000cfc3cbacca1b2ffb161ff7c63cf9209144c6efc648822790d4fe3cc2e309e4fc198a2c6a088eec1b57d036cd636989841f
AUX zabbix-agent2.init 507 BLAKE2B 6235831aca66cb2b097c0260ba8c0151c4a98fadc836cff14a248a77f5a0d013b5e6cf56605f63c9b41541daad4f842da74d80658f0a20b38be507909605af77 SHA512 91eaac170c9234229f2969b0d899dc7ffc21aa99aa8b3593b91f52afe786f6cc81c1279bf78b4456c8e462cea924630ee87e4ce7d6f2128c42e778907751e98e
AUX zabbix-agent2.service 277 BLAKE2B 46ec792441c57c6fb7cad391d736672a3d93cbb9c92c5e3d90de3a5c7502a789359bd9752b8740fd73a626e4ed96272231730a87b179a4e0d13f8fb48571f606 SHA512 8f467e9d7a4ce82dc387ef1ef6ac8c39e943d0bbce938e186bdfa7e207959d9159a9d446b30d39d627b7400ceeb9c4d322b06ad063b42d0edc5bbef4043230f7
@@ -18,14 +17,19 @@ AUX zabbix-server-r1.init 598 BLAKE2B 53026be133378595e83de14f939eda655d871f8caa
AUX zabbix-server.service 429 BLAKE2B 1727ad52441b8e1ef31ee0f7faaa9d9964ee4ca5e2ef61de4715c25b0e0c97a627e6735a67c4114484950f0334fffa344d94f9192ada63887a21b617122eaf0d SHA512 d20fa4aa3a545d2f36388d7cac78c70c5610f5e7529348447e6fa6bacc33f42dd6e1c37c50b1c2711900a3f29bbbbb0ebc7c54f04d3de717aadad48e18c46e28
AUX zabbix-server.tmpfiles 35 BLAKE2B 98e917ef03bd6dc5d73e5cbdb140c7e115c7593d5cebf2df9bf3d15713b16c6a44b165a3f68fd36a9119163144a2761457d16ce318bd094ed76ae6040c8b09df SHA512 3c63a2791e6ac77cb3144eb47a275cc8748f5c8943a076052300d6964994b95b18d60f504584fdcb683739dc514261402895e3f30ae2fbdb218acbc42c3d72df
DIST zabbix-4.0.38.tar.gz 17558387 BLAKE2B 1ddf27d76734128ddd197eb9dffeb59018282464a7322973dc4102992c0ade003d4d0291194f5b5a487d83a702917d6f0036636e56acc424bd7a7d6beb3f787c SHA512 0d38a74336c9e46b3f9985aca3508312dd5b15affeadee3497ebf8d5e59b4fa7b99ff28819b01878cbc5c9c304c1992a6a91d73f35bf1a333ae2ee561e0d7e1f
+DIST zabbix-4.0.41.tar.gz 17641873 BLAKE2B f3bb40e78662c68f0752233a72ad71d2a7ffae03a0e334736c0b9037fe3566d1b3c4c09fd3183456ae3266ac84f2cbc57c73d5e0e1853f86ebd8eafc42e0b4bb SHA512 7df356c6e99a94876abd05e708eb350448593018017eb2e3434403505a48651ddd6b40b69d84bb49b8eed5cb945c2b974fd44b85dc27fc5c3141d1cdad1b371f
DIST zabbix-5.0.22-go-deps.tar.xz 34395200 BLAKE2B 3065878d5d61617f52ec48381a248ea13a603c13bb1cc18b6fde4e81f47bfd9dc4bafe34303e4bb46f1d7e9809d0b17acf48b782c11162fdcf04f0de89402f2b SHA512 fc30d33066248fe7c9049fec7538e1d1880d9c23d10516032027ea90e90a7531288990a33a48cbab2722a6ca67f49f79507cce7351d2c026317fc58843d4868e
DIST zabbix-5.0.22.tar.gz 21245241 BLAKE2B d2343fc5dbc4112ef77c75bd00b8344a363a8e2acc6623a009ebd24d7116377a66d2ca94f22dee386fbee1fa9822ce7e08287cb1336fe939bd2b621fe57b5b1f SHA512 d326ed5dd81b44adf80e8cc01d32b3b7ebed0b8ffddc2870e76ffcd010513f2b2bbe4586681e5c5ab5202f88c7861078efad537bb852ee52d5c00b7712cc2aab
-DIST zabbix-5.4.12-go-deps.tar.xz 35810488 BLAKE2B 26a7995bbe6b40a1912f90e1ea572a0de96f9182928d2401054fc1935c9ecac25ee90cb44c7b1b0f71a8c56e4477752b2bffebca7a331fbdc341a7a9ca1eca6c SHA512 bd5882b1bfc4d75c2b42170bbab5cca5e8795f3ff001b62444faf5d1601c5ef54da0198c83253fefd5c2c465f78a9ddb2a4aa13699d198337af935a80756c991
-DIST zabbix-5.4.12.tar.gz 24513065 BLAKE2B fe289b58384c9b956fcbada940220c5288022457b7eb5b0a7ce2f86df777e2d84a45fc4d4f17f43aecac4466dc0e9d9941e0070cd00b3688b26821123d2301da SHA512 5f4862540e15f88efa52002b9ec6d7251a35e94f8e5f6f8b6090f5827a574411c813732a88a08fbcc3c24033011d678b953a7a78260aef702454269537232c7b
+DIST zabbix-5.0.24-go-deps.tar.xz 34371892 BLAKE2B 273978d3a4dd46e4d41d892f3217ae2ee0d2bfe9bed753283b5fdf3a13e6cb8f912a4726b92cc2637cb8103c63141f24d3c49c884f54598a9c4d99bed3830552 SHA512 bfafb96c6d69ad2c775add9392117c384a633b334ad447e1ec61cf6f01bd72ded0870d778650ff18a912f6ca3bc98f581052464353b22350eaf724bddc29f8d8
+DIST zabbix-5.0.24.tar.gz 21296805 BLAKE2B 16c3fe6ef0732d627c70555b80961308ba9049978efc51c44162e5ceb940369ce36f87f33e6725de789c97d29edb2d0b4c2b2e58ac56a95e1b644cff13d2f64b SHA512 5ad70fdd189ce2630c019df6edad70fbfa7d2b0f72b42ae1950fb844f3edadf87c3108eefa7f3d343d4c3464d8aa58036dfbcab4109682d40b455788019dd62b
DIST zabbix-6.0.3-go-deps.tar.xz 35806596 BLAKE2B bf86722b1ee26237e42b4b3b5558415e0eb29dbe675b70585c8bb06c0b1e469ed9887e425778503c1d42ee2bd938b085f544d0696d080e04957dcb5794b7afa4 SHA512 0a5a051561dee2f3e42f18fff9127e3c8a0b5a7cae3a828a880866feac81a21ef71ba83c53f9e5a37fb3eee78475974b2f30ba5398012aeca6adf8d3cea74399
DIST zabbix-6.0.3.tar.gz 33135282 BLAKE2B d2cb50678710e96737e72ddb4b0b02d4695f872df6cab2edfd50d343ffc0103eec3191bfa02d8421e29c583f6d478598effc22a0f8d3f76b57a9ac3b4e4369fe SHA512 f93a7b4b19d2a1561e42ef67378bfb94a5edaae5b9bba8f2214de3bad1bf9d7efcb32da9f1b3ee820cc6bdc68308286606c4ceb7e1ba0ab42e24045c56f8ce47
-EBUILD zabbix-4.0.38-r2.ebuild 9387 BLAKE2B 2daf464895d6232c3cfa301b4fd55b895eed1e37cbfa9349398b430bedaab657413e2c12f04bcae4e23782cedef347560edecde1503531d18b4203040e7b07f0 SHA512 39e1563e5aec3c88c9cc3b23335b0db7c6201755a7ffa15eaee02b23838081d81c345e1bdfc608efcd2f6fb5d3306a863701f29c44ce0fcff8930579bc0345a5
-EBUILD zabbix-5.0.22.ebuild 9957 BLAKE2B 618de5b0dbde7ce038ec3883fd234a1b66bc232d8ee4bbffaf0bb8516ac3fd0adf2867fb10367c72d30a0a791fd6d0f2a2e53daedd86c57c2f4cfea503ff226a SHA512 dd49296d2c4d940501855c4c34859af782a77f3fb6c6ace77173441df926d5340b6272d8d53f717b7416f8360974916ac5cf4933c011c5499e2423856a7505cd
-EBUILD zabbix-5.4.12.ebuild 9996 BLAKE2B e0116a6944159f7aba95f852067ded7c19dc5e9f05c0befb639b2f62ea6d4966f17be391b8d23c528224aa75310529af1d70621d3943534342f80d127c575359 SHA512 298b9da040d6f75d1fcf5cb2c9c9a8b0df1481201f0852a49bef43e25f5a37cd72f712d503ae42e3ae9479b28af366407b398d30a3be1806ac142fac072b310f
-EBUILD zabbix-6.0.3.ebuild 10504 BLAKE2B 4760011182e3dba112f626b33979021bab6e356f07f67064ff0653aa89a95e47bcd2555097c6f12053d6e017caabe0129d744bf5e7e7d4cd2af863c1a38c5105 SHA512 b845beb96c769ee54d1677478c941f4229d8b6570724606c87c1a9e2815153ea546fe565773a0f0a6882710f66145638d9242ba41b91926b40343fdf6045607a
+DIST zabbix-6.0.5-go-deps.tar.xz 36045828 BLAKE2B 71827dfb5313b986ed23c5c1d7a99a020feabe81b6ee8c7c13d7fda40ce8f5f6d7de26a05daba5fa2e589fc2577f2bcc0961d4f8f0881faaaa986f13e4ae0a16 SHA512 6c8f6731cc29df4d5870cfab71c809e5c844ebc88649b9d25fb6ef7c3671e2a247aad1a24dcaa4cbb35039cce57cfabfa7ac56473bd5b9317bb5ecaa0cbd2d53
+DIST zabbix-6.0.5.tar.gz 33778804 BLAKE2B 5bc2c370895c4744b6deb9d7c0501d890ffb2c343992ca2cee25872e29f0465e808905bf1a9c86749a2bfe56fa05aac521c1cff0549686426e7bd412dbd9ce58 SHA512 c4a431ba9c22ccb59c6eaac4147e40390e5e9a1f7a13638f2daa3dab3a75145104e711585b374eed0e663a3dc495d4b3b74c78b7676baafbfcca983f645054e8
+EBUILD zabbix-4.0.38-r2.ebuild 9414 BLAKE2B b0abe7853c37cd78b5c2176eaafb891407b2a0cd9e7dea933d313a6f0f71188f59d1c86951bed73c445c954215bdec48fce47373d842d5e1cc6268e0e1b678c5 SHA512 509a7802245e0605ebc5424806594fa8ff9d73af492761f65a70985a86236f367358d40c67f1ca644647d5c4930b48f3351b4daae53cc2a39b89a79decac925e
+EBUILD zabbix-4.0.41.ebuild 9416 BLAKE2B c594ca9fb069ef5dc5ef2dfa4f5136e0a66257dd171b056a9073391451b4742e04d4bb38da379f0c0998a30d3a1c0ca8138f62909bba57ba06cb4130521f9b0b SHA512 a650f9c0496c8e2ffd76bd2e1b37071c097aba69f6bb71612570fca5c71049b8f51e3865152205e73c1889a2b1fbdaca192c36109ab1ebd111698f0f90b1eebd
+EBUILD zabbix-5.0.22.ebuild 9984 BLAKE2B b226c3369896e9b37304e62564598745def257e964ee126dd15201f0848b128ff8e49586cdf5242b0f4c680eb0eb3708a2679faf308c317033aa70d645287114 SHA512 595a07aff09e6743a52717e01e78a0963cd1fd647171a50d76d5d6b248aa9e59d5fc9f10c0b378384cecd9125575cef87103ecabb076fbe2942c5c683772cbdf
+EBUILD zabbix-5.0.24.ebuild 10144 BLAKE2B 8654a84618f3e5ab22ca790bebc7db5badb60c0bea942027b74e50422be47f39380a873a2e01deadd58b9aa978b30392811fb6de88291416f15073d291163d85 SHA512 0a67f7c92f94eddd9be23aef921ad3306b2093f77a26a9cc9234cc0ce764e24ea292f221ba0f751148eea557974dd0f9a35c87ef748040d84dd2b4dc66740d14
+EBUILD zabbix-6.0.3.ebuild 10576 BLAKE2B c9b2bd52b451da1b8cc19c1d816f0bc40dc3fdf05a7aa3dbc00bb2d74ba172e0b7f340daacba0db1e1ec15ce40eb888e86ac4ca765294218217357aae2bfbe34 SHA512 7389732ed4f6e1e58bf4e7424329d8034f1f859e7a77db6ca234b9eb06e05f2966dbf2eb68e74222f4969b9cb830f6b37e7bbbd432d154bdd67634a1e964bd10
+EBUILD zabbix-6.0.5.ebuild 10736 BLAKE2B 48df3088111b7f76838b064a9bc239577b0d7526b3dd9daa82fbf2dbb8d39dbbe41e629e45342ca70538f26cf47dd7ca856cdae97d20a8bcd892f52b6746d50f SHA512 08ea68bb9224bb5eeea1e138952ebc63c6f25152f7386c3b8ed79d2c2f74b8d0626c485e139b31a9508563e212e51030d1348ef62935695946dde6e113cf64ed
MISC metadata.xml 1713 BLAKE2B d0c1fe7a3627dca5b11601ac5bc360f43476d4a14aefaa7eae021faa636cdd5b5054a4556c8c81933ad6d3638781942e51c01a550463e7b14946004fa8be3366 SHA512 8e5be31d41c1f749cda5b889ec7a1185428d88e21201c02d7066b4416ba3c6d4a9ddc23812e7caeb313dbc2b3ad7c9fd39eae141498ed137b8048fd41d6520d8
diff --git a/net-analyzer/zabbix/files/zabbix-5.4.12-system.sw.packages.patch b/net-analyzer/zabbix/files/zabbix-5.4.12-system.sw.packages.patch
deleted file mode 100644
index 54a5299ee791..000000000000
--- a/net-analyzer/zabbix/files/zabbix-5.4.12-system.sw.packages.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From ee5ed14f0f858eb0f776f5b8c4c1a1e740787bfa Mon Sep 17 00:00:00 2001
-From: Alexey Shvetsov <alexxy@gentoo.org>
-Date: Mon, 21 Mar 2022 11:23:54 +0300
-Subject: [PATCH] Allow to use system.sw.packages on gentoo linux
-
-Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
----
- src/go/plugins/system/sw/sw.go | 1 +
- src/libs/zbxsysinfo/linux/software.c | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/src/go/plugins/system/sw/sw.go b/src/go/plugins/system/sw/sw.go
-index 6ff354fd711..db9a4b763f7 100644
---- a/src/go/plugins/system/sw/sw.go
-+++ b/src/go/plugins/system/sw/sw.go
-@@ -163,6 +163,7 @@ func getManagers() []manager {
- {"pkgtools", "[ -d /var/log/packages ] && echo true", "ls /var/log/packages", parseRegex},
- {"rpm", "rpm --version 2> /dev/null", "rpm -qa", parseRegex},
- {"pacman", "pacman --version 2> /dev/null", "pacman -Q", parseRegex},
-+ {"portage", "emerge --version 2> /dev/null", "qlist -IRCv", parseRegex},
- }
- }
-
-diff --git a/src/libs/zbxsysinfo/linux/software.c b/src/libs/zbxsysinfo/linux/software.c
-index 24f8e93eed8..8dcf01a3e47 100644
---- a/src/libs/zbxsysinfo/linux/software.c
-+++ b/src/libs/zbxsysinfo/linux/software.c
-@@ -176,6 +176,7 @@ static ZBX_PACKAGE_MANAGER package_managers[] =
- {"pkgtools", "[ -d /var/log/packages ] && echo true", "ls /var/log/packages", NULL},
- {"rpm", "rpm --version 2> /dev/null", "rpm -qa", NULL},
- {"pacman", "pacman --version 2> /dev/null", "pacman -Q", NULL},
-+ {"portage", "emerge --version 2> /dev/null", "qlist -IRCv", NULL},
- {NULL}
- };
-
diff --git a/net-analyzer/zabbix/zabbix-4.0.38-r2.ebuild b/net-analyzer/zabbix/zabbix-4.0.38-r2.ebuild
index 235e44ac1c32..b6f830af64d9 100644
--- a/net-analyzer/zabbix/zabbix-4.0.38-r2.ebuild
+++ b/net-analyzer/zabbix/zabbix-4.0.38-r2.ebuild
@@ -40,7 +40,10 @@ COMMON_DEPEND="
openssl? ( dev-libs/openssl:=[-bindist(-)] )
oracle? ( dev-db/oracle-instantclient[odbc,sdk] )
postgres? ( dev-db/postgresql:* )
- proxy? ( sys-libs/zlib )
+ proxy? (
+ dev-libs/libevent:=
+ sys-libs/zlib
+ )
server? (
dev-libs/libevent:=
sys-libs/zlib
@@ -56,10 +59,12 @@ RDEPEND="${COMMON_DEPEND}
acct-user/zabbix
java? ( >=virtual/jre-1.8:* )
mysql? ( virtual/mysql )
- proxy? ( net-analyzer/fping[suid] )
+ proxy? (
+ dev-libs/libpcre
+ net-analyzer/fping[suid]
+ )
server? (
app-admin/webapp-config
- dev-libs/libevent
dev-libs/libpcre
net-analyzer/fping[suid]
)
diff --git a/net-analyzer/zabbix/zabbix-4.0.41.ebuild b/net-analyzer/zabbix/zabbix-4.0.41.ebuild
new file mode 100644
index 000000000000..1e0af68937f8
--- /dev/null
+++ b/net-analyzer/zabbix/zabbix-4.0.41.ebuild
@@ -0,0 +1,367 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# needed to make webapp-config dep optional
+WEBAPP_OPTIONAL="yes"
+inherit webapp java-pkg-opt-2 systemd toolchain-funcs tmpfiles user-info
+
+DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
+HOMEPAGE="https://www.zabbix.com/"
+MY_P=${P/_/}
+MY_PV=${PV/_/}
+SRC_URI="https://cdn.zabbix.com/${PN}/sources/stable/4.0/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+WEBAPP_MANUAL_SLOT="yes"
+KEYWORDS="~amd64 ~x86"
+IUSE="+agent curl frontend gnutls ipv6 java ldap libxml2 mbedtls mysql odbc openipmi +openssl oracle +postgres proxy server snmp sqlite ssh static xmpp"
+REQUIRED_USE="|| ( agent frontend proxy server )
+ ?? ( gnutls mbedtls openssl )
+ proxy? ( ^^ ( mysql oracle postgres sqlite ) )
+ server? ( ^^ ( mysql oracle postgres ) !sqlite )
+ static? ( !oracle !snmp )"
+
+COMMON_DEPEND="
+ curl? ( net-misc/curl )
+ gnutls? ( net-libs/gnutls:0= )
+ java? ( >=virtual/jdk-1.8:* )
+ ldap? (
+ =dev-libs/cyrus-sasl-2*
+ net-libs/gnutls:=
+ net-nds/openldap:=
+ )
+ libxml2? ( dev-libs/libxml2 )
+ mbedtls? ( net-libs/mbedtls:0= )
+ 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 )
+ xmpp? ( dev-libs/iksemel )
+"
+
+RDEPEND="${COMMON_DEPEND}
+ acct-group/zabbix
+ acct-user/zabbix
+ java? ( >=virtual/jre-1.8:* )
+ mysql? ( virtual/mysql )
+ proxy? (
+ dev-libs/libpcre
+ net-analyzer/fping[suid]
+ )
+ server? (
+ app-admin/webapp-config
+ dev-libs/libpcre
+ net-analyzer/fping[suid]
+ )
+ frontend? (
+ app-admin/webapp-config
+ dev-lang/php:*[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
+ media-libs/gd[png]
+ virtual/httpd-php:*
+ mysql? ( dev-lang/php[mysqli] )
+ odbc? ( dev-lang/php[odbc] )
+ oracle? ( dev-lang/php[oci8-instant-client] )
+ postgres? ( dev-lang/php[postgres] )
+ sqlite? ( dev-lang/php[sqlite] )
+ )
+"
+DEPEND="${COMMON_DEPEND}
+ static? (
+ curl? ( net-misc/curl[static-libs] )
+ ldap? (
+ =dev-libs/cyrus-sasl-2*[static-libs]
+ net-libs/gnutls[static-libs]
+ net-nds/openldap[static-libs]
+ )
+ libxml2? ( dev-libs/libxml2[static-libs] )
+ mysql? ( dev-db/mysql-connector-c[static-libs] )
+ odbc? ( dev-db/unixODBC[static-libs] )
+ postgres? ( dev-db/postgresql:*[static-libs] )
+ sqlite? ( dev-db/sqlite[static-libs] )
+ ssh? ( net-libs/libssh2 )
+ )
+"
+BDEPEND="
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.0.18-modulepathfix.patch"
+ "${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+ZABBIXJAVA_BASE="opt/zabbix_java"
+
+pkg_setup() {
+ if use oracle; then
+ if [ -z "${ORACLE_HOME}" ]; then
+ eerror
+ eerror "The environment variable ORACLE_HOME must be set"
+ eerror "and point to the correct location."
+ eerror "It looks like you don't have Oracle installed."
+ eerror
+ die "Environment variable ORACLE_HOME is not set"
+ fi
+ fi
+
+ if use frontend; then
+ webapp_pkg_setup
+ fi
+
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ default
+}
+
+src_configure() {
+ econf \
+ $(use_enable agent) \
+ $(use_enable ipv6) \
+ $(use_enable java) \
+ $(use_enable proxy) \
+ $(use_enable server) \
+ $(use_enable static) \
+ $(use_with curl libcurl) \
+ $(use_with gnutls) \
+ $(use_with ldap) \
+ $(use_with libxml2) \
+ $(use_with mbedtls) \
+ $(use_with mysql) \
+ $(use_with odbc unixodbc) \
+ $(use_with openipmi openipmi) \
+ $(use_with openssl) \
+ $(use_with oracle) \
+ $(use_with postgres postgresql) \
+ $(use_with snmp net-snmp) \
+ $(use_with sqlite sqlite3) \
+ $(use_with ssh ssh2) \
+ $(use_with xmpp jabber)
+}
+
+src_compile() {
+ if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
+ emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)"
+ fi
+}
+
+src_install() {
+ local dirs=(
+ /etc/zabbix
+ /var/lib/zabbix
+ /var/lib/zabbix/home
+ /var/lib/zabbix/scripts
+ /var/lib/zabbix/alertscripts
+ /var/lib/zabbix/externalscripts
+ /var/log/zabbix
+ )
+
+ for dir in "${dirs[@]}"; do
+ dodir "${dir}"
+ keepdir "${dir}"
+ done
+
+ if use server; then
+ insinto /etc/zabbix
+ doins "${S}"/conf/zabbix_server.conf
+ fperms 0640 /etc/zabbix/zabbix_server.conf
+ fowners root:zabbix /etc/zabbix/zabbix_server.conf
+
+ newinitd "${FILESDIR}"/zabbix-server-r1.init zabbix-server
+
+ dosbin src/zabbix_server/zabbix_server
+
+ insinto /usr/share/zabbix
+ doins -r "${S}"/database/
+
+ systemd_dounit "${FILESDIR}"/zabbix-server.service
+ newtmpfiles "${FILESDIR}"/zabbix-server.tmpfiles zabbix-server.conf
+ fi
+
+ if use proxy; then
+ insinto /etc/zabbix
+ doins "${S}"/conf/zabbix_proxy.conf
+ fperms 0640 /etc/zabbix/zabbix_proxy.conf
+ fowners root:zabbix /etc/zabbix/zabbix_proxy.conf
+
+ newinitd "${FILESDIR}"/zabbix-proxy.init zabbix-proxy
+
+ dosbin src/zabbix_proxy/zabbix_proxy
+
+ insinto /usr/share/zabbix
+ doins -r "${S}"/database/
+
+ systemd_dounit "${FILESDIR}"/zabbix-proxy.service
+ newtmpfiles "${FILESDIR}"/zabbix-proxy.tmpfiles zabbix-proxy.conf
+ fi
+
+ if use agent; then
+ insinto /etc/zabbix
+ doins "${S}"/conf/zabbix_agentd.conf
+ fperms 0640 /etc/zabbix/zabbix_agentd.conf
+ fowners root:zabbix /etc/zabbix/zabbix_agentd.conf
+
+ newinitd "${FILESDIR}"/zabbix-agentd.init zabbix-agentd
+
+ dosbin src/zabbix_agent/zabbix_agentd
+ dobin \
+ src/zabbix_sender/zabbix_sender \
+ src/zabbix_get/zabbix_get
+
+ systemd_dounit "${FILESDIR}"/zabbix-agentd.service
+ newtmpfiles "${FILESDIR}"/zabbix-agentd.tmpfiles zabbix-agentd.conf
+ fi
+
+ fowners root:zabbix /etc/zabbix
+ fowners zabbix:zabbix \
+ /var/lib/zabbix \
+ /var/lib/zabbix/home \
+ /var/lib/zabbix/scripts \
+ /var/lib/zabbix/alertscripts \
+ /var/lib/zabbix/externalscripts \
+ /var/log/zabbix
+ fperms 0750 \
+ /etc/zabbix \
+ /var/lib/zabbix \
+ /var/lib/zabbix/home \
+ /var/lib/zabbix/scripts \
+ /var/lib/zabbix/alertscripts \
+ /var/lib/zabbix/externalscripts \
+ /var/log/zabbix
+
+ dodoc README INSTALL NEWS ChangeLog \
+ conf/zabbix_agentd.conf \
+ conf/zabbix_proxy.conf \
+ conf/zabbix_agentd/userparameter_examples.conf \
+ conf/zabbix_agentd/userparameter_mysql.conf \
+ conf/zabbix_server.conf
+
+ if use frontend; then
+ webapp_src_preinst
+ cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}"
+ webapp_configfile \
+ "${MY_HTDOCSDIR}"/include/db.inc.php \
+ "${MY_HTDOCSDIR}"/include/config.inc.php
+ webapp_src_install
+ fi
+
+ if use java; then
+ dodir \
+ /${ZABBIXJAVA_BASE} \
+ /${ZABBIXJAVA_BASE}/bin \
+ /${ZABBIXJAVA_BASE}/lib
+ keepdir /${ZABBIXJAVA_BASE}
+ exeinto /${ZABBIXJAVA_BASE}/bin
+ doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar
+ exeinto /${ZABBIXJAVA_BASE}/lib
+ doexe \
+ src/zabbix_java/lib/logback-classic-1.2.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 (e.g. ~/.sendxmpprc when"
+ ewarn "using sendxmpp for Jabber alerts)."
+ ewarn
+ ewarn "To change the homedir use:"
+ ewarn " usermod -d /var/lib/zabbix/home zabbix"
+ ewarn
+ fi
+ fi
+
+ if use server; then
+ tmpfiles_process zabbix-server.conf
+
+ elog
+ elog "For distributed monitoring you have to run:"
+ elog
+ elog "zabbix_server -n <nodeid>"
+ elog
+ elog "This will convert database data for use with Node ID"
+ elog "and also adds a local node."
+ elog
+ fi
+
+ if use proxy; then
+ tmpfiles_process zabbix-proxy.conf
+ fi
+
+ if use agent; then
+ tmpfiles_process zabbix-agentd.conf
+ fi
+
+ elog "--"
+ elog
+ elog "You may need to add these lines to /etc/services:"
+ elog
+ elog "zabbix-agent 10050/tcp Zabbix Agent"
+ elog "zabbix-agent 10050/udp Zabbix Agent"
+ elog "zabbix-trapper 10051/tcp Zabbix Trapper"
+ elog "zabbix-trapper 10051/udp Zabbix Trapper"
+ elog
+
+ if use server || use proxy ; then
+ # check for fping
+ fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
+ case "${fping_perms}" in
+ 4[157][157][157])
+ ;;
+ *)
+ ewarn
+ ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
+ ewarn "you have to make /usr/sbin/fping setuid root and executable"
+ ewarn "by everyone. Run the following command to fix it:"
+ ewarn
+ ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
+ ewarn
+ ewarn "Please be aware that this might impose a security risk,"
+ ewarn "depending on the code quality of fping."
+ ewarn
+ ;;
+ esac
+ fi
+}
+
+pkg_prerm() {
+ (use frontend || use server) && webapp_pkg_prerm
+}
diff --git a/net-analyzer/zabbix/zabbix-5.0.22.ebuild b/net-analyzer/zabbix/zabbix-5.0.22.ebuild
index f3fd1ee264b3..8af8fafcd005 100644
--- a/net-analyzer/zabbix/zabbix-5.0.22.ebuild
+++ b/net-analyzer/zabbix/zabbix-5.0.22.ebuild
@@ -43,7 +43,10 @@ COMMON_DEPEND="
openssl? ( dev-libs/openssl:=[-bindist(-)] )
oracle? ( dev-db/oracle-instantclient[odbc,sdk] )
postgres? ( dev-db/postgresql:* )
- proxy? ( sys-libs/zlib )
+ proxy? (
+ dev-libs/libevent:=
+ sys-libs/zlib
+ )
server? (
dev-libs/libevent:=
sys-libs/zlib
@@ -58,10 +61,12 @@ RDEPEND="${COMMON_DEPEND}
acct-user/zabbix
java? ( >=virtual/jre-1.8:* )
mysql? ( virtual/mysql )
- proxy? ( net-analyzer/fping[suid] )
+ proxy? (
+ dev-libs/libpcre
+ net-analyzer/fping[suid]
+ )
server? (
app-admin/webapp-config
- dev-libs/libevent
dev-libs/libpcre
net-analyzer/fping[suid]
)
diff --git a/net-analyzer/zabbix/zabbix-5.4.12.ebuild b/net-analyzer/zabbix/zabbix-5.0.24.ebuild
index 13f0b6d9bc42..d3c97bb80618 100644
--- a/net-analyzer/zabbix/zabbix-5.4.12.ebuild
+++ b/net-analyzer/zabbix/zabbix-5.0.24.ebuild
@@ -1,6 +1,11 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+# To create the go modules tarball:
+# cd src/go
+# GOMODCACHE="${PWD}"/go-mod go mod download -modcacherw
+# tar -acf zabbix-${PV}-go-deps.tar.xz go-mod
+
EAPI=8
GO_OPTIONAL="yes"
@@ -19,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 server snmp sqlite ssh static"
REQUIRED_USE="|| ( agent agent2 frontend proxy server )
?? ( gnutls openssl )
@@ -43,7 +48,10 @@ COMMON_DEPEND="
openssl? ( dev-libs/openssl:=[-bindist(-)] )
oracle? ( dev-db/oracle-instantclient[odbc,sdk] )
postgres? ( dev-db/postgresql:* )
- proxy? ( sys-libs/zlib )
+ proxy? (
+ dev-libs/libevent:=
+ sys-libs/zlib
+ )
server? (
dev-libs/libevent:=
sys-libs/zlib
@@ -58,10 +66,12 @@ RDEPEND="${COMMON_DEPEND}
acct-user/zabbix
java? ( >=virtual/jre-1.8:* )
mysql? ( virtual/mysql )
- proxy? ( net-analyzer/fping[suid] )
+ proxy? (
+ dev-libs/libpcre
+ net-analyzer/fping[suid]
+ )
server? (
app-admin/webapp-config
- dev-libs/libevent
dev-libs/libpcre
net-analyzer/fping[suid]
)
@@ -107,7 +117,7 @@ RESTRICT="test"
PATCHES=(
"${FILESDIR}/${PN}-4.0.18-modulepathfix.patch"
"${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch"
- "${FILESDIR}/${PN}-5.4.12-system.sw.packages.patch"
+ "${FILESDIR}/${PN}-5.0.22-system.sw.packages.patch"
)
S=${WORKDIR}/${MY_P}
@@ -139,26 +149,26 @@ src_prepare() {
src_configure() {
econf \
- "$(use_enable agent)" \
- "$(use_enable agent2)" \
- "$(use_enable ipv6)" \
- "$(use_enable java)" \
- "$(use_enable proxy)" \
- "$(use_enable server)" \
- "$(use_enable static)" \
- "$(use_with curl libcurl)" \
- "$(use_with gnutls)" \
- "$(use_with ldap)" \
- "$(use_with libxml2)" \
- "$(use_with mysql)" \
- "$(use_with odbc unixodbc)" \
- "$(use_with openipmi openipmi)" \
- "$(use_with openssl)" \
- "$(use_with oracle)" \
- "$(use_with postgres postgresql)" \
- "$(use_with snmp net-snmp)" \
- "$(use_with sqlite sqlite3)" \
- "$(use_with ssh ssh2)"
+ $(use_enable agent) \
+ $(use_enable agent2) \
+ $(use_enable ipv6) \
+ $(use_enable java) \
+ $(use_enable proxy) \
+ $(use_enable server) \
+ $(use_enable static) \
+ $(use_with curl libcurl) \
+ $(use_with gnutls) \
+ $(use_with ldap) \
+ $(use_with libxml2) \
+ $(use_with mysql) \
+ $(use_with odbc unixodbc) \
+ $(use_with openipmi openipmi) \
+ $(use_with openssl) \
+ $(use_with oracle) \
+ $(use_with postgres postgresql) \
+ $(use_with snmp net-snmp) \
+ $(use_with sqlite sqlite3) \
+ $(use_with ssh ssh2)
}
src_compile() {
@@ -233,6 +243,7 @@ src_install() {
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
@@ -287,7 +298,7 @@ src_install() {
/${ZABBIXJAVA_BASE}/lib
keepdir /${ZABBIXJAVA_BASE}
exeinto /${ZABBIXJAVA_BASE}/bin
- doexe src/zabbix_java/bin/zabbix-java-gateway-"${MY_PV}".jar
+ 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 \
@@ -310,7 +321,7 @@ pkg_postinst() {
zabbix_homedir=$(egethome zabbix)
if [ -n "${zabbix_homedir}" ] && \
- [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
+ [ "${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"
diff --git a/net-analyzer/zabbix/zabbix-6.0.3.ebuild b/net-analyzer/zabbix/zabbix-6.0.3.ebuild
index c739d2e69d10..2c899addb40c 100644
--- a/net-analyzer/zabbix/zabbix-6.0.3.ebuild
+++ b/net-analyzer/zabbix/zabbix-6.0.3.ebuild
@@ -43,7 +43,10 @@ COMMON_DEPEND="
openssl? ( dev-libs/openssl:=[-bindist(-)] )
oracle? ( dev-db/oracle-instantclient[odbc,sdk] )
postgres? ( dev-db/postgresql:* )
- proxy? ( sys-libs/zlib )
+ proxy? (
+ dev-libs/libevent:=
+ sys-libs/zlib
+ )
server? (
dev-libs/libevent:=
sys-libs/zlib
@@ -58,10 +61,13 @@ RDEPEND="${COMMON_DEPEND}
acct-user/zabbix
java? ( >=virtual/jre-1.8:* )
mysql? ( virtual/mysql )
- proxy? ( net-analyzer/fping[suid] )
+ proxy? (
+ !pcre2? ( dev-libs/libpcre )
+ pcre2? ( dev-libs/libpcre2:= )
+ net-analyzer/fping[suid]
+ )
server? (
app-admin/webapp-config
- dev-libs/libevent
!pcre2? ( dev-libs/libpcre )
pcre2? ( dev-libs/libpcre2:= )
net-analyzer/fping[suid]
diff --git a/net-analyzer/zabbix/zabbix-6.0.5.ebuild b/net-analyzer/zabbix/zabbix-6.0.5.ebuild
new file mode 100644
index 000000000000..c3f2fa649574
--- /dev/null
+++ b/net-analyzer/zabbix/zabbix-6.0.5.ebuild
@@ -0,0 +1,415 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# To create the go modules tarball:
+# cd src/go
+# GOMODCACHE="${PWD}"/go-mod go mod download -modcacherw
+# tar -acf zabbix-${PV}-go-deps.tar.xz go-mod
+
+EAPI=8
+
+GO_OPTIONAL="yes"
+# needed to make webapp-config dep optional
+WEBAPP_OPTIONAL="yes"
+inherit webapp java-pkg-opt-2 systemd tmpfiles toolchain-funcs go-module user-info
+
+DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
+HOMEPAGE="https://www.zabbix.com/"
+MY_P=${P/_/}
+MY_PV=${PV/_/}
+SRC_URI="https://cdn.zabbix.com/${PN}/sources/stable/$(ver_cut 1-2)/${P}.tar.gz
+ agent2? ( https://dev.gentoo.org/~fordfrog/distfiles/${P}-go-deps.tar.xz )
+"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+WEBAPP_MANUAL_SLOT="yes"
+KEYWORDS="~amd64 ~x86"
+IUSE="agent +agent2 curl frontend gnutls ipv6 java ldap libxml2 mysql odbc openipmi +openssl oracle +pcre2 +postgres proxy server snmp sqlite ssh static"
+REQUIRED_USE="|| ( agent agent2 frontend proxy server )
+ ?? ( gnutls openssl )
+ proxy? ( ^^ ( mysql oracle postgres sqlite ) )
+ server? ( ^^ ( mysql oracle postgres ) !sqlite )
+ static? ( !oracle !snmp )"
+
+COMMON_DEPEND="
+ curl? ( net-misc/curl )
+ gnutls? ( net-libs/gnutls:0= )
+ java? ( >=virtual/jdk-1.8:* )
+ ldap? (
+ =dev-libs/cyrus-sasl-2*
+ net-libs/gnutls:=
+ net-nds/openldap:=
+ )
+ libxml2? ( dev-libs/libxml2 )
+ mysql? ( dev-db/mysql-connector-c:= )
+ odbc? ( dev-db/unixODBC )
+ openipmi? ( sys-libs/openipmi )
+ openssl? ( dev-libs/openssl:=[-bindist(-)] )
+ oracle? ( dev-db/oracle-instantclient[odbc,sdk] )
+ postgres? ( dev-db/postgresql:* )
+ proxy? (
+ 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? (
+ !pcre2? ( dev-libs/libpcre )
+ pcre2? ( dev-libs/libpcre2:= )
+ net-analyzer/fping[suid]
+ )
+ server? (
+ app-admin/webapp-config
+ !pcre2? ( dev-libs/libpcre )
+ pcre2? ( 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.0.3-system.sw.packages.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+ZABBIXJAVA_BASE="opt/zabbix_java"
+
+pkg_setup() {
+ if use oracle; then
+ if [ -z "${ORACLE_HOME}" ]; then
+ eerror
+ eerror "The environment variable ORACLE_HOME must be set"
+ eerror "and point to the correct location."
+ eerror "It looks like you don't have Oracle installed."
+ eerror
+ die "Environment variable ORACLE_HOME is not set"
+ fi
+ fi
+
+ if use frontend; then
+ webapp_pkg_setup
+ fi
+
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ default
+}
+
+src_configure() {
+ local econf_args=(
+ "$(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)"
+ )
+
+ if use pcre2; then
+ econf_args+=( --with-libpcre2 )
+ else
+ # If pcre2 is not enabled, then use the old pcre library.
+ econf_args+=( --with-libpcre )
+ fi
+
+ 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
+ dodir "${dir}"
+ keepdir "${dir}"
+ done
+
+ if use server; then
+ insinto /etc/zabbix
+ doins "${S}"/conf/zabbix_server.conf
+ fperms 0640 /etc/zabbix/zabbix_server.conf
+ fowners root:zabbix /etc/zabbix/zabbix_server.conf
+
+ newinitd "${FILESDIR}"/zabbix-server-r1.init zabbix-server
+
+ dosbin src/zabbix_server/zabbix_server
+
+ insinto /usr/share/zabbix
+ doins -r "${S}"/database/
+
+ systemd_dounit "${FILESDIR}"/zabbix-server.service
+ newtmpfiles "${FILESDIR}"/zabbix-server.tmpfiles zabbix-server.conf
+ fi
+
+ if use proxy; then
+ insinto /etc/zabbix
+ doins "${S}"/conf/zabbix_proxy.conf
+ fperms 0640 /etc/zabbix/zabbix_proxy.conf
+ fowners root:zabbix /etc/zabbix/zabbix_proxy.conf
+
+ newinitd "${FILESDIR}"/zabbix-proxy.init zabbix-proxy
+
+ dosbin src/zabbix_proxy/zabbix_proxy
+
+ insinto /usr/share/zabbix
+ doins -r "${S}"/database/
+
+ systemd_dounit "${FILESDIR}"/zabbix-proxy.service
+ newtmpfiles "${FILESDIR}"/zabbix-proxy.tmpfiles zabbix-proxy.conf
+ fi
+
+ if use agent; then
+ insinto /etc/zabbix
+ doins "${S}"/conf/zabbix_agentd.conf
+ fperms 0640 /etc/zabbix/zabbix_agentd.conf
+ fowners root:zabbix /etc/zabbix/zabbix_agentd.conf
+
+ newinitd "${FILESDIR}"/zabbix-agentd.init zabbix-agentd
+
+ dosbin src/zabbix_agent/zabbix_agentd
+ dobin \
+ src/zabbix_sender/zabbix_sender \
+ src/zabbix_get/zabbix_get
+
+ systemd_dounit "${FILESDIR}"/zabbix-agentd.service
+ newtmpfiles "${FILESDIR}"/zabbix-agentd.tmpfiles zabbix-agentd.conf
+ fi
+ if use agent2; then
+ insinto /etc/zabbix
+ doins "${S}"/src/go/conf/zabbix_agent2.conf
+ fperms 0640 /etc/zabbix/zabbix_agent2.conf
+ fowners root:zabbix /etc/zabbix/zabbix_agent2.conf
+
+ newinitd "${FILESDIR}"/zabbix-agent2.init zabbix-agent2
+
+ dosbin src/go/bin/zabbix_agent2
+
+ systemd_dounit "${FILESDIR}"/zabbix-agent2.service
+ newtmpfiles "${FILESDIR}"/zabbix-agent2.tmpfiles zabbix-agent2.conf
+ fi
+
+ fowners root:zabbix /etc/zabbix
+ fowners zabbix:zabbix \
+ /var/lib/zabbix \
+ /var/lib/zabbix/home \
+ /var/lib/zabbix/scripts \
+ /var/lib/zabbix/alertscripts \
+ /var/lib/zabbix/externalscripts \
+ /var/log/zabbix
+ fperms 0750 \
+ /etc/zabbix \
+ /var/lib/zabbix \
+ /var/lib/zabbix/home \
+ /var/lib/zabbix/scripts \
+ /var/lib/zabbix/alertscripts \
+ /var/lib/zabbix/externalscripts \
+ /var/log/zabbix
+
+ dodoc README INSTALL NEWS ChangeLog \
+ conf/zabbix_agentd.conf \
+ conf/zabbix_proxy.conf \
+ conf/zabbix_agentd/userparameter_examples.conf \
+ conf/zabbix_agentd/userparameter_mysql.conf \
+ conf/zabbix_server.conf
+
+ if use frontend; then
+ webapp_src_preinst
+ cp -R ui/* "${D}/${MY_HTDOCSDIR}"
+ webapp_configfile \
+ "${MY_HTDOCSDIR}"/include/db.inc.php \
+ "${MY_HTDOCSDIR}"/include/config.inc.php
+ webapp_src_install
+ fi
+
+ if use java; then
+ dodir \
+ /${ZABBIXJAVA_BASE} \
+ /${ZABBIXJAVA_BASE}/bin \
+ /${ZABBIXJAVA_BASE}/lib
+ keepdir /${ZABBIXJAVA_BASE}
+ exeinto /${ZABBIXJAVA_BASE}/bin
+ doexe src/zabbix_java/bin/zabbix-java-gateway-"${MY_PV}".jar
+ exeinto /${ZABBIXJAVA_BASE}/lib
+ doexe \
+ src/zabbix_java/lib/logback-classic-1.2.9.jar \
+ src/zabbix_java/lib/logback-console.xml \
+ src/zabbix_java/lib/logback-core-1.2.9.jar \
+ src/zabbix_java/lib/logback.xml \
+ src/zabbix_java/lib/android-json-4.3_r3.1.jar \
+ src/zabbix_java/lib/slf4j-api-1.7.32.jar
+ newinitd "${FILESDIR}"/zabbix-jmx-proxy.init zabbix-jmx-proxy
+ newconfd "${FILESDIR}"/zabbix-jmx-proxy.conf zabbix-jmx-proxy
+ fi
+}
+
+pkg_postinst() {
+ if use server || use proxy ; then
+ elog
+ elog "You may need to configure your database for Zabbix"
+ elog "if you have not already done so."
+ elog
+
+ zabbix_homedir=$(egethome zabbix)
+ if [ -n "${zabbix_homedir}" ] && \
+ [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
+ ewarn
+ ewarn "The user 'zabbix' should have his homedir changed"
+ ewarn "to /var/lib/zabbix/home if you want to use"
+ ewarn "custom alert scripts."
+ ewarn
+ ewarn "A real homedir might be needed for configfiles"
+ ewarn "for custom alert scripts."
+ ewarn
+ ewarn "To change the homedir use:"
+ ewarn " usermod -d /var/lib/zabbix/home zabbix"
+ ewarn
+ fi
+ fi
+
+ if use server; then
+ tmpfiles_process zabbix-server.conf
+
+ elog
+ elog "For distributed monitoring you have to run:"
+ elog
+ elog "zabbix_server -n <nodeid>"
+ elog
+ elog "This will convert database data for use with Node ID"
+ elog "and also adds a local node."
+ elog
+
+ if ! use pcre2; then
+ ewarn "You are using zabbix with dev-libs/libpcre which is deprecated."
+ ewarn "Consider switching to dev-libs/libpcre2 (USE=pcre2) as soon as possible."
+ ewarn "See https://www.zabbix.com/documentation/6.0/en/manual/installation/upgrade_notes_600#pcre2-support"
+ fi
+ fi
+
+ if use proxy; then
+ tmpfiles_process zabbix-proxy.conf
+ fi
+
+ if use agent; then
+ tmpfiles_process zabbix-agentd.conf
+ fi
+
+ if use agent2; then
+ tmpfiles_process zabbix-agent2.conf
+ fi
+
+ elog "--"
+ elog
+ elog "You may need to add these lines to /etc/services:"
+ elog
+ elog "zabbix-agent 10050/tcp Zabbix Agent"
+ elog "zabbix-agent 10050/udp Zabbix Agent"
+ elog "zabbix-trapper 10051/tcp Zabbix Trapper"
+ elog "zabbix-trapper 10051/udp Zabbix Trapper"
+ elog
+
+ if use server || use proxy ; then
+ # check for fping
+ fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
+ case "${fping_perms}" in
+ 4[157][157][157])
+ ;;
+ *)
+ ewarn
+ ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
+ ewarn "you have to make /usr/sbin/fping setuid root and executable"
+ ewarn "by everyone. Run the following command to fix it:"
+ ewarn
+ ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
+ ewarn
+ ewarn "Please be aware that this might impose a security risk,"
+ ewarn "depending on the code quality of fping."
+ ewarn
+ ;;
+ esac
+ fi
+}
+
+pkg_prerm() {
+ (use frontend || use server) && webapp_pkg_prerm
+}