1 |
commit: 3717919581fab87cbc6feace595d33be29e4ec2d |
2 |
Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 27 06:34:06 2023 +0000 |
4 |
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 27 06:34:06 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37179195 |
7 |
|
8 |
net-analyzer/zabbix: dropped obsolete ebuilds |
9 |
|
10 |
Bug: https://bugs.gentoo.org/888968 |
11 |
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org> |
12 |
|
13 |
net-analyzer/zabbix/Manifest | 10 - |
14 |
net-analyzer/zabbix/metadata.xml | 1 - |
15 |
net-analyzer/zabbix/zabbix-5.0.29.ebuild | 398 ------------------------------ |
16 |
net-analyzer/zabbix/zabbix-6.0.10.ebuild | 411 ------------------------------- |
17 |
net-analyzer/zabbix/zabbix-6.0.11.ebuild | 397 ----------------------------- |
18 |
net-analyzer/zabbix/zabbix-6.2.4.ebuild | 411 ------------------------------- |
19 |
net-analyzer/zabbix/zabbix-6.2.5.ebuild | 397 ----------------------------- |
20 |
7 files changed, 2025 deletions(-) |
21 |
|
22 |
diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest |
23 |
index 0edca27187e1..83079ba83e3f 100644 |
24 |
--- a/net-analyzer/zabbix/Manifest |
25 |
+++ b/net-analyzer/zabbix/Manifest |
26 |
@@ -1,22 +1,12 @@ |
27 |
DIST zabbix-4.0.44.tar.gz 17713321 BLAKE2B 1f75f99430846cfc029d5e541ede7ef8c019a42af0ab6d70be3170052b723877ca54f6554cd9a29f7f436fb6e9d5ffd02913a1b12ad45a2a8ed00432738e5660 SHA512 223d6fdd352e5731487797d839c1741209eae79af78a058d3ba29e5a9eaab5cbf91072ad827bdd676696d3ea518c638d7fd515bff2a257aef3a7ad38f41b3cb6 |
28 |
-DIST zabbix-5.0.29-go-deps.tar.xz 34421032 BLAKE2B 35809df9e2d9186813ec079d31206bccd8e4bf6da0376e1e87a65ccb17345bc3f8e81820cbad7700ab2596ede4fe604867337b89d74ac3254eeccacc128a4708 SHA512 6553612cc1b7a01cd6b43378f7a5e15fd99245ecc23d1345a0a780ba506073ac2b8b68e96599f56ea7a01052d74b14f6e2f29ca9a97d71748fe285583531f82d |
29 |
-DIST zabbix-5.0.29.tar.gz 21471836 BLAKE2B e38f3b7c38900d80ca0497326f9979e793d04fd34d716673e76ea65723e0019caa7e1e92e581ac6423f77a2fff7554250c728721c125596b1c9a17b0c860346b SHA512 60e707d79ee9f92b69aecabc97e92ad04d0d66839ceed250788f111db4128a66197b9c528bde8cb4f4f92e6a5502ff31c6d838e3c1d3b81ce6b7910879915b61 |
30 |
DIST zabbix-5.0.30-go-deps.tar.xz 34398308 BLAKE2B f987ec0518a070d9480be7a57a8101f6c65f89ff0cdf513cb19b5d79e88c410782df87e732c7d838e6db6dd933cc855c027fc8351855121a57e0a2912ed0bda2 SHA512 eb1ad8c3983e475229887a2561f6e55ed3a4c1be270221fc12c0d0fcba7f2ad661f984f16f5f5d9684496c35c6daebd93dd13f5e898244af90d9ad9bffb911c6 |
31 |
DIST zabbix-5.0.30.tar.gz 21505195 BLAKE2B e6876b896e61feccdcfa05a9bc2ae57345957e8e4dc2e2c3d635e917cc525c9cf4dad5e45821e6677f766654bd702b8baac8b65a4fc286af816fbf2b2e076a0c SHA512 2f744fc1ba42ea0602cc90c91342f531c55cb1f76eda47c6e928e74dc595f7bd885f69abb52c6eb1b20e65bd6c3c46c299d6cfee2c3442db137561060386a31e |
32 |
DIST zabbix-5.0.31-go-deps.tar.xz 34443128 BLAKE2B 38bf33002e6dbae95b39579383f8bb6998b0408434f140b1bb31e7cadf07a0363ac6234a820ec306cc12f764fc43d250a45ffd159a315dc494d0871ae6167660 SHA512 4d54ff09ccb356b3080240065598cc93d11a11c8faef0c6a22ec923face789cf2bee95ddaf62d0ecd74bd0807060fb4fcbcfa71b1ffcb8723096b1164d7c25ae |
33 |
DIST zabbix-5.0.31.tar.gz 21567566 BLAKE2B 076090e07856df0dc2603d75fb7cc9862e40b9e6bda89094cf687aa00719a0df7cf7fd93bc973cb38cbbb31b6b723efd3dc5aa6dde00b4f4a5b118331795bfeb SHA512 7409e23313a6c5f6f4f1e1c0ba0ccfec88aa2687caa25673709bf05b9e287a535ea417551dee0f9d2fbd571adfe843a700ee45ee3dc72752cdeab12ec4c54644 |
34 |
-DIST zabbix-6.0.10-go-deps.tar.xz 27482516 BLAKE2B 64b9f2d093aaa8b7b1b39d4736f9b087fdcc518b1a5eced7a46bfe5a1ea2c1bc2d3641ab8e61d4fca8f036a8a96d8c8b56fe9dab17b356b8c5e507f77f10b864 SHA512 15b4799d8934155112469f4a571b8f015a0779b7c946a49cebb4b513ff7553989cd71704e403ae3fdf18646235fc40daf14bb9481d493ad8e6b53146fd7f3f27 |
35 |
-DIST zabbix-6.0.10.tar.gz 39516402 BLAKE2B 00e81dcea63433cb93ef9bd77094bef89f7d604d8c07b9da5959c79d54f026b1256f486395229e0232aa96271b72fd9f3c67e08dfb96321be398b8b4fa832f6f SHA512 4fc70d89f61f50e5a6b9bbd1a25d9cac6d734872d3558df83b01abe04832773cdbab6e0f214045c117b6e2fcd7ae3fba08701be942cf18344e6b5a78151665d6 |
36 |
-DIST zabbix-6.0.11-go-deps.tar.xz 27480580 BLAKE2B 443ecbd9fd0d66cacc75f53d5f56ae996bce52e04827de97948ffc6a3e02888b4b5122eba2425465624e34bc628992f7a520bc8e0281444baed0aa1631f3bec1 SHA512 0936626b658f1811e8aebdd59ca506b33f1a95696018b088cfe04479386ecbcfe4c6c7fac6d26487e28d36cb6283028312c3bc2d27bde8cf54698236d3bc6ba4 |
37 |
-DIST zabbix-6.0.11.tar.gz 40388383 BLAKE2B e6ded007285aac58bb4c29075ac8d34f6ab0db1a74702269b63dc8772ebdf8b2986737fa91d39c9e8bacee5e1e12d7d7bb9580221f9b4917cbc829784639201d SHA512 decb9fcf5de8f0d81cd0b16b6a5e341742c97baed0faf2d5f22bba98fd9fad4e154360724b5aedc378d5b5e2c64eda36f308e3eb6e6f8e80a5cf082ea95ebef6 |
38 |
DIST zabbix-6.0.12-go-deps.tar.xz 27481268 BLAKE2B cfeca38b63a6271b4ff6819143e0214d3b468e3f7b681cc0bde443192e84ec4b66eb9b8ce38be01fa74a186f8904dfe73af04ad98007880e9ad6aab5c4b978b3 SHA512 c021efe15b61eeebad855ee9d8081f06796d126f3215bac4cb8a36384185aa2a67c0af580b5fcd830e6da832eb1057c02621c71569e30735fb0bef172f26d3b4 |
39 |
DIST zabbix-6.0.12.tar.gz 40419443 BLAKE2B 18e328a3361947292b3c78fc75dbcfc464f3419fb35bd0895049c90d26d362edbe0a727d1ab955f428ec812d6f38f68717f3c635216aff0468f188321b476495 SHA512 7cd254282523002d2e4d86295258ea0f56921b54c88d604300104f32ea5807c0b39b5550a9dd98e03ad41adf4dd8e93a7b1deb200d513283dca51d49d46bda4d |
40 |
DIST zabbix-6.0.13-go-deps.tar.xz 17974536 BLAKE2B 296ae034ccf0f6cd1d83379c46ad87d80faf3d897d807d948312989e044dc4d159aabab27999730ed255be3c7d5aa6b70927bcfb888f9969b36994c68246c14b SHA512 279aeed128e00dab8f1824ed7186ddc914615f7756a96c049bff0321997c9e412007c56701a036a1a25029aa7c4f878ad4566e95abbf766ee353666a6a588370 |
41 |
DIST zabbix-6.0.13.tar.gz 41075557 BLAKE2B 41db999c52d3ca596861d8850d594e639159b8c7090b47dd824be5b2695a6f1ebc0399643de8fb25af4081ab294c6fefe7ec9c0025ba4e4d17d44aa16d8b233a SHA512 188622c0c04029eac376ebf60c96ed9d67923bc1f40eff75666a241bb534cb744aca8c51ff4b79d508dfadb9e758f80d9dc46016217bcb5a67e8ede7e645788e |
42 |
-DIST zabbix-6.2.4-go-deps.tar.xz 27489292 BLAKE2B 174c822aa1488fd2dfb726ed2cd5d2e86147404793ae97c6d45554de7cdf36073aa28a988e967798afb6681d1c054252433fcbae68816ccca79401383d4cc4e5 SHA512 6c1fa17663aaf91e234c34f7019b6f5b3720ab6c4300ece1ac5404f9f8499b74b6a2f5ab54e2eb0ac221d0df5e5e271762ff2f2f776e782bff0a3c85fe8f6407 |
43 |
-DIST zabbix-6.2.4.tar.gz 40299367 BLAKE2B ee74829acbac90a37bc3bcf3c95a92a7df1f83099cda7c9ba9ed225d3bdfa0e49667c5aa1522dbdac1ca2da8b621f94d384c857af8c66db87353f044f6ec0420 SHA512 16249f78f09e6c07a993972a7e72ef85083e08adfdcd6383b51a60ad172a48bdb4510a09dc82e8a36c5d748d3db155d3e4ca14909e2f2b4104bde200f151a596 |
44 |
-DIST zabbix-6.2.5-go-deps.tar.xz 27499244 BLAKE2B c8c7e59e0c2d61224bbfd11690a54b411a981e4ab3a39e217a03be83bdae04914898ab7b38c00d3a48900b769eabf51901410247a204915e0e901182c69266f3 SHA512 0c13f15b2ed62a6eb418244560cd40e277d333f17e65ceb9125335408fd632870d260f986b5c76328bc91e6b0b619816836c543f5d87ef5d957904aad722f613 |
45 |
-DIST zabbix-6.2.5.tar.gz 41020695 BLAKE2B 5e21867358cc6c4374695b7da6d74b8c3642bf4e1f41ebcdb2a158c01e5a4b6ffd679728a35badeb3cbefe0968d97577e9141340b32287cb01d89e0f227b964a SHA512 3cf5745942f69eee348c37ddb1bb68937c628ee97d050b0bfed37be66e4a30a6448829cbfa000f9388761e6611af9ae7046fdc63b608f3bcce1575bfa476dd5b |
46 |
DIST zabbix-6.2.6-go-deps.tar.xz 27486336 BLAKE2B e17aa599bc6be82e211f48642c03a73594965dd51a83b7e7e9ccbe949865034348a33cb413824d3d1aabd6aba56751132ef95dc333f75657bce3cc3fa4f1ef01 SHA512 eb18c6a78b0523543b7273c489d2dda94adb983df802b03020374b4bda51a44bf01e92bafe556242710f942474a9547a8366f724187f9a429e28bb94c0fa9c57 |
47 |
DIST zabbix-6.2.6.tar.gz 41038757 BLAKE2B bc2dd394085d2bb32a052f682d7271b14967ca4100ada34a1145e0b137c32036202346a7ee7bed06f62ddf6a6c9b1033b9b1534aef50850a6d49446b40e6aa21 SHA512 03f2396fea0794f0a66a00880e7a46d0295a562fab2cfdd0890b2f9369bb1bfe6ee19398ab062bcdcdd9ef1415a6fa599a1f5e8135fb54ef6855e9f435619097 |
48 |
DIST zabbix-6.2.7-go-deps.tar.xz 17973952 BLAKE2B f7e155040a60ac48236084b404d469bc5c34ab0dd986d3d647960bb6313f8080298f359680d6be23d2cb4c5f7d30bbab773c7fe81e4bde3873215f5e4072bed7 SHA512 e83dcd5cd6a07febf9c6380d311c84a319e3c45314266217837f6b35e540a6c9d4c980ceb7bb995ca8366247ea67d7d3c1b10beab677e4c24c69d83ba9977862 |
49 |
|
50 |
diff --git a/net-analyzer/zabbix/metadata.xml b/net-analyzer/zabbix/metadata.xml |
51 |
index f1d56c470b2a..5a8b28dde8b8 100644 |
52 |
--- a/net-analyzer/zabbix/metadata.xml |
53 |
+++ b/net-analyzer/zabbix/metadata.xml |
54 |
@@ -26,7 +26,6 @@ configure different types of notifications for pre-defined events. |
55 |
<flag name="odbc">Enable Database Monitor and use UnixODBC Library by default</flag> |
56 |
<flag name="openipmi">Enable openipmi things</flag> |
57 |
<flag name="openssl">Use <pkg>dev-libs/openssl</pkg> as TLS backend</flag> |
58 |
- <flag name="pcre2">Use <pkg>dev-libs/libpcre2</pkg> instead of <pkg>dev-libs/libpcre</pkg></flag> |
59 |
<flag name="proxy">Enable proxy support</flag> |
60 |
<flag name="server">Enable zabbix server</flag> |
61 |
<flag name="ssh">SSH v2 based checks</flag> |
62 |
|
63 |
diff --git a/net-analyzer/zabbix/zabbix-5.0.29.ebuild b/net-analyzer/zabbix/zabbix-5.0.29.ebuild |
64 |
deleted file mode 100644 |
65 |
index 901c486faa9c..000000000000 |
66 |
--- a/net-analyzer/zabbix/zabbix-5.0.29.ebuild |
67 |
+++ /dev/null |
68 |
@@ -1,398 +0,0 @@ |
69 |
-# Copyright 1999-2022 Gentoo Authors |
70 |
-# Distributed under the terms of the GNU General Public License v2 |
71 |
- |
72 |
-# To create the go modules tarball: |
73 |
-# cd src/go |
74 |
-# GOMODCACHE="${PWD}"/go-mod go mod download -modcacherw |
75 |
-# tar -acf zabbix-${PV}-go-deps.tar.xz go-mod |
76 |
- |
77 |
-EAPI=8 |
78 |
- |
79 |
-GO_OPTIONAL="yes" |
80 |
-# needed to make webapp-config dep optional |
81 |
-WEBAPP_OPTIONAL="yes" |
82 |
-inherit webapp java-pkg-opt-2 systemd tmpfiles toolchain-funcs go-module user-info |
83 |
- |
84 |
-DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers" |
85 |
-HOMEPAGE="https://www.zabbix.com/" |
86 |
-MY_P=${P/_/} |
87 |
-MY_PV=${PV/_/} |
88 |
-SRC_URI="https://cdn.zabbix.com/${PN}/sources/stable/$(ver_cut 1-2)/${P}.tar.gz |
89 |
- agent2? ( https://dev.gentoo.org/~fordfrog/distfiles/${P}-go-deps.tar.xz ) |
90 |
-" |
91 |
- |
92 |
-LICENSE="GPL-2" |
93 |
-SLOT="0/$(ver_cut 1-2)" |
94 |
-WEBAPP_MANUAL_SLOT="yes" |
95 |
-KEYWORDS="amd64 x86" |
96 |
-IUSE="+agent +agent2 curl frontend gnutls ipv6 java ldap libxml2 mysql odbc openipmi +openssl oracle +postgres proxy server snmp sqlite ssh static" |
97 |
-REQUIRED_USE="|| ( agent agent2 frontend proxy server ) |
98 |
- ?? ( gnutls openssl ) |
99 |
- proxy? ( ^^ ( mysql oracle postgres sqlite ) ) |
100 |
- server? ( ^^ ( mysql oracle postgres ) !sqlite ) |
101 |
- static? ( !oracle !snmp )" |
102 |
- |
103 |
-COMMON_DEPEND=" |
104 |
- curl? ( net-misc/curl ) |
105 |
- gnutls? ( net-libs/gnutls:0= ) |
106 |
- java? ( >=virtual/jdk-1.8:* ) |
107 |
- ldap? ( |
108 |
- =dev-libs/cyrus-sasl-2* |
109 |
- net-libs/gnutls:= |
110 |
- net-nds/openldap:= |
111 |
- ) |
112 |
- libxml2? ( dev-libs/libxml2 ) |
113 |
- mysql? ( dev-db/mysql-connector-c:= ) |
114 |
- odbc? ( dev-db/unixODBC ) |
115 |
- openipmi? ( sys-libs/openipmi ) |
116 |
- openssl? ( dev-libs/openssl:=[-bindist(-)] ) |
117 |
- oracle? ( dev-db/oracle-instantclient[odbc,sdk] ) |
118 |
- postgres? ( dev-db/postgresql:* ) |
119 |
- proxy? ( |
120 |
- dev-libs/libevent:= |
121 |
- sys-libs/zlib |
122 |
- ) |
123 |
- server? ( |
124 |
- dev-libs/libevent:= |
125 |
- sys-libs/zlib |
126 |
- ) |
127 |
- snmp? ( net-analyzer/net-snmp:= ) |
128 |
- sqlite? ( dev-db/sqlite ) |
129 |
- ssh? ( net-libs/libssh2 ) |
130 |
-" |
131 |
- |
132 |
-RDEPEND="${COMMON_DEPEND} |
133 |
- acct-group/zabbix |
134 |
- acct-user/zabbix |
135 |
- java? ( >=virtual/jre-1.8:* ) |
136 |
- mysql? ( virtual/mysql ) |
137 |
- proxy? ( |
138 |
- dev-libs/libpcre |
139 |
- net-analyzer/fping[suid] |
140 |
- ) |
141 |
- server? ( |
142 |
- app-admin/webapp-config |
143 |
- dev-libs/libpcre |
144 |
- net-analyzer/fping[suid] |
145 |
- ) |
146 |
- frontend? ( |
147 |
- app-admin/webapp-config |
148 |
- dev-lang/php:*[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode] |
149 |
- media-libs/gd[png] |
150 |
- virtual/httpd-php:* |
151 |
- mysql? ( dev-lang/php[mysqli] ) |
152 |
- odbc? ( dev-lang/php[odbc] ) |
153 |
- oracle? ( dev-lang/php[oci8-instant-client] ) |
154 |
- postgres? ( dev-lang/php[postgres] ) |
155 |
- sqlite? ( dev-lang/php[sqlite] ) |
156 |
- ) |
157 |
-" |
158 |
-DEPEND="${COMMON_DEPEND} |
159 |
- static? ( |
160 |
- curl? ( net-misc/curl[static-libs] ) |
161 |
- ldap? ( |
162 |
- =dev-libs/cyrus-sasl-2*[static-libs] |
163 |
- net-libs/gnutls[static-libs] |
164 |
- net-nds/openldap[static-libs] |
165 |
- ) |
166 |
- libxml2? ( dev-libs/libxml2[static-libs] ) |
167 |
- mysql? ( dev-db/mysql-connector-c[static-libs] ) |
168 |
- odbc? ( dev-db/unixODBC[static-libs] ) |
169 |
- postgres? ( dev-db/postgresql:*[static-libs] ) |
170 |
- sqlite? ( dev-db/sqlite[static-libs] ) |
171 |
- ssh? ( net-libs/libssh2 ) |
172 |
- ) |
173 |
-" |
174 |
-BDEPEND=" |
175 |
- virtual/pkgconfig |
176 |
- agent2? ( |
177 |
- >=dev-lang/go-1.12 |
178 |
- app-arch/unzip |
179 |
- ) |
180 |
-" |
181 |
- |
182 |
-# upstream tests fail for agent2 |
183 |
-RESTRICT="test" |
184 |
- |
185 |
-PATCHES=( |
186 |
- "${FILESDIR}/${PN}-4.0.18-modulepathfix.patch" |
187 |
- "${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch" |
188 |
- "${FILESDIR}/${PN}-5.0.22-system.sw.packages.patch" |
189 |
-) |
190 |
- |
191 |
-S=${WORKDIR}/${MY_P} |
192 |
- |
193 |
-ZABBIXJAVA_BASE="opt/zabbix_java" |
194 |
- |
195 |
-pkg_setup() { |
196 |
- if use oracle; then |
197 |
- if [ -z "${ORACLE_HOME}" ]; then |
198 |
- eerror |
199 |
- eerror "The environment variable ORACLE_HOME must be set" |
200 |
- eerror "and point to the correct location." |
201 |
- eerror "It looks like you don't have Oracle installed." |
202 |
- eerror |
203 |
- die "Environment variable ORACLE_HOME is not set" |
204 |
- fi |
205 |
- fi |
206 |
- |
207 |
- if use frontend; then |
208 |
- webapp_pkg_setup |
209 |
- fi |
210 |
- |
211 |
- java-pkg-opt-2_pkg_setup |
212 |
-} |
213 |
- |
214 |
-src_prepare() { |
215 |
- default |
216 |
-} |
217 |
- |
218 |
-src_configure() { |
219 |
- econf \ |
220 |
- $(use_enable agent) \ |
221 |
- $(use_enable agent2) \ |
222 |
- $(use_enable ipv6) \ |
223 |
- $(use_enable java) \ |
224 |
- $(use_enable proxy) \ |
225 |
- $(use_enable server) \ |
226 |
- $(use_enable static) \ |
227 |
- $(use_with curl libcurl) \ |
228 |
- $(use_with gnutls) \ |
229 |
- $(use_with ldap) \ |
230 |
- $(use_with libxml2) \ |
231 |
- $(use_with mysql) \ |
232 |
- $(use_with odbc unixodbc) \ |
233 |
- $(use_with openipmi openipmi) \ |
234 |
- $(use_with openssl) \ |
235 |
- $(use_with oracle) \ |
236 |
- $(use_with postgres postgresql) \ |
237 |
- $(use_with snmp net-snmp) \ |
238 |
- $(use_with sqlite sqlite3) \ |
239 |
- $(use_with ssh ssh2) |
240 |
-} |
241 |
- |
242 |
-src_compile() { |
243 |
- if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then |
244 |
- emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" |
245 |
- fi |
246 |
-} |
247 |
- |
248 |
-src_install() { |
249 |
- local dirs=( |
250 |
- /etc/zabbix |
251 |
- /var/lib/zabbix |
252 |
- /var/lib/zabbix/home |
253 |
- /var/lib/zabbix/scripts |
254 |
- /var/lib/zabbix/alertscripts |
255 |
- /var/lib/zabbix/externalscripts |
256 |
- /var/log/zabbix |
257 |
- ) |
258 |
- |
259 |
- for dir in "${dirs[@]}"; do |
260 |
- dodir "${dir}" |
261 |
- keepdir "${dir}" |
262 |
- done |
263 |
- |
264 |
- if use server; then |
265 |
- insinto /etc/zabbix |
266 |
- doins "${S}"/conf/zabbix_server.conf |
267 |
- fperms 0640 /etc/zabbix/zabbix_server.conf |
268 |
- fowners root:zabbix /etc/zabbix/zabbix_server.conf |
269 |
- |
270 |
- newinitd "${FILESDIR}"/zabbix-server-r1.init zabbix-server |
271 |
- |
272 |
- dosbin src/zabbix_server/zabbix_server |
273 |
- |
274 |
- insinto /usr/share/zabbix |
275 |
- doins -r "${S}"/database/ |
276 |
- |
277 |
- systemd_dounit "${FILESDIR}"/zabbix-server.service |
278 |
- newtmpfiles "${FILESDIR}"/zabbix-server.tmpfiles zabbix-server.conf |
279 |
- fi |
280 |
- |
281 |
- if use proxy; then |
282 |
- insinto /etc/zabbix |
283 |
- doins "${S}"/conf/zabbix_proxy.conf |
284 |
- fperms 0640 /etc/zabbix/zabbix_proxy.conf |
285 |
- fowners root:zabbix /etc/zabbix/zabbix_proxy.conf |
286 |
- |
287 |
- newinitd "${FILESDIR}"/zabbix-proxy.init zabbix-proxy |
288 |
- |
289 |
- dosbin src/zabbix_proxy/zabbix_proxy |
290 |
- |
291 |
- insinto /usr/share/zabbix |
292 |
- doins -r "${S}"/database/ |
293 |
- |
294 |
- systemd_dounit "${FILESDIR}"/zabbix-proxy.service |
295 |
- newtmpfiles "${FILESDIR}"/zabbix-proxy.tmpfiles zabbix-proxy.conf |
296 |
- fi |
297 |
- |
298 |
- if use agent; then |
299 |
- insinto /etc/zabbix |
300 |
- doins "${S}"/conf/zabbix_agentd.conf |
301 |
- fperms 0640 /etc/zabbix/zabbix_agentd.conf |
302 |
- fowners root:zabbix /etc/zabbix/zabbix_agentd.conf |
303 |
- |
304 |
- newinitd "${FILESDIR}"/zabbix-agentd.init zabbix-agentd |
305 |
- |
306 |
- dosbin src/zabbix_agent/zabbix_agentd |
307 |
- dobin \ |
308 |
- src/zabbix_sender/zabbix_sender \ |
309 |
- src/zabbix_get/zabbix_get |
310 |
- |
311 |
- systemd_dounit "${FILESDIR}"/zabbix-agentd.service |
312 |
- newtmpfiles "${FILESDIR}"/zabbix-agentd.tmpfiles zabbix-agentd.conf |
313 |
- fi |
314 |
- |
315 |
- if use agent2; then |
316 |
- insinto /etc/zabbix |
317 |
- doins "${S}"/src/go/conf/zabbix_agent2.conf |
318 |
- fperms 0640 /etc/zabbix/zabbix_agent2.conf |
319 |
- fowners root:zabbix /etc/zabbix/zabbix_agent2.conf |
320 |
- |
321 |
- newinitd "${FILESDIR}"/zabbix-agent2.init zabbix-agent2 |
322 |
- |
323 |
- dosbin src/go/bin/zabbix_agent2 |
324 |
- |
325 |
- systemd_dounit "${FILESDIR}"/zabbix-agent2.service |
326 |
- newtmpfiles "${FILESDIR}"/zabbix-agent2.tmpfiles zabbix-agent2.conf |
327 |
- fi |
328 |
- |
329 |
- fowners root:zabbix /etc/zabbix |
330 |
- fowners zabbix:zabbix \ |
331 |
- /var/lib/zabbix \ |
332 |
- /var/lib/zabbix/home \ |
333 |
- /var/lib/zabbix/scripts \ |
334 |
- /var/lib/zabbix/alertscripts \ |
335 |
- /var/lib/zabbix/externalscripts \ |
336 |
- /var/log/zabbix |
337 |
- fperms 0750 \ |
338 |
- /etc/zabbix \ |
339 |
- /var/lib/zabbix \ |
340 |
- /var/lib/zabbix/home \ |
341 |
- /var/lib/zabbix/scripts \ |
342 |
- /var/lib/zabbix/alertscripts \ |
343 |
- /var/lib/zabbix/externalscripts \ |
344 |
- /var/log/zabbix |
345 |
- |
346 |
- dodoc README INSTALL NEWS ChangeLog \ |
347 |
- conf/zabbix_agentd.conf \ |
348 |
- conf/zabbix_proxy.conf \ |
349 |
- conf/zabbix_agentd/userparameter_examples.conf \ |
350 |
- conf/zabbix_agentd/userparameter_mysql.conf \ |
351 |
- conf/zabbix_server.conf |
352 |
- |
353 |
- if use frontend; then |
354 |
- webapp_src_preinst |
355 |
- cp -R ui/* "${D}/${MY_HTDOCSDIR}" |
356 |
- webapp_configfile \ |
357 |
- "${MY_HTDOCSDIR}"/include/db.inc.php \ |
358 |
- "${MY_HTDOCSDIR}"/include/config.inc.php |
359 |
- webapp_src_install |
360 |
- fi |
361 |
- |
362 |
- if use java; then |
363 |
- dodir \ |
364 |
- /${ZABBIXJAVA_BASE} \ |
365 |
- /${ZABBIXJAVA_BASE}/bin \ |
366 |
- /${ZABBIXJAVA_BASE}/lib |
367 |
- keepdir /${ZABBIXJAVA_BASE} |
368 |
- exeinto /${ZABBIXJAVA_BASE}/bin |
369 |
- doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar |
370 |
- exeinto /${ZABBIXJAVA_BASE}/lib |
371 |
- doexe \ |
372 |
- src/zabbix_java/lib/logback-classic-1.2.9.jar \ |
373 |
- src/zabbix_java/lib/logback-console.xml \ |
374 |
- src/zabbix_java/lib/logback-core-1.2.9.jar \ |
375 |
- src/zabbix_java/lib/logback.xml \ |
376 |
- src/zabbix_java/lib/android-json-4.3_r3.1.jar \ |
377 |
- src/zabbix_java/lib/slf4j-api-1.7.32.jar |
378 |
- newinitd "${FILESDIR}"/zabbix-jmx-proxy.init zabbix-jmx-proxy |
379 |
- newconfd "${FILESDIR}"/zabbix-jmx-proxy.conf zabbix-jmx-proxy |
380 |
- fi |
381 |
-} |
382 |
- |
383 |
-pkg_postinst() { |
384 |
- if use server || use proxy ; then |
385 |
- elog |
386 |
- elog "You may need to configure your database for Zabbix" |
387 |
- elog "if you have not already done so." |
388 |
- elog |
389 |
- |
390 |
- zabbix_homedir=$(egethome zabbix) |
391 |
- if [ -n "${zabbix_homedir}" ] && \ |
392 |
- [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then |
393 |
- ewarn |
394 |
- ewarn "The user 'zabbix' should have his homedir changed" |
395 |
- ewarn "to /var/lib/zabbix/home if you want to use" |
396 |
- ewarn "custom alert scripts." |
397 |
- ewarn |
398 |
- ewarn "A real homedir might be needed for configfiles" |
399 |
- ewarn "for custom alert scripts." |
400 |
- ewarn |
401 |
- ewarn "To change the homedir use:" |
402 |
- ewarn " usermod -d /var/lib/zabbix/home zabbix" |
403 |
- ewarn |
404 |
- fi |
405 |
- fi |
406 |
- |
407 |
- if use server; then |
408 |
- tmpfiles_process zabbix-server.conf |
409 |
- |
410 |
- elog |
411 |
- elog "For distributed monitoring you have to run:" |
412 |
- elog |
413 |
- elog "zabbix_server -n <nodeid>" |
414 |
- elog |
415 |
- elog "This will convert database data for use with Node ID" |
416 |
- elog "and also adds a local node." |
417 |
- elog |
418 |
- fi |
419 |
- |
420 |
- if use proxy; then |
421 |
- tmpfiles_process zabbix-proxy.conf |
422 |
- fi |
423 |
- |
424 |
- if use agent; then |
425 |
- tmpfiles_process zabbix-agentd.conf |
426 |
- fi |
427 |
- |
428 |
- if use agent2; then |
429 |
- tmpfiles_process zabbix-agent2.conf |
430 |
- fi |
431 |
- |
432 |
- elog "--" |
433 |
- elog |
434 |
- elog "You may need to add these lines to /etc/services:" |
435 |
- elog |
436 |
- elog "zabbix-agent 10050/tcp Zabbix Agent" |
437 |
- elog "zabbix-agent 10050/udp Zabbix Agent" |
438 |
- elog "zabbix-trapper 10051/tcp Zabbix Trapper" |
439 |
- elog "zabbix-trapper 10051/udp Zabbix Trapper" |
440 |
- elog |
441 |
- |
442 |
- if use server || use proxy ; then |
443 |
- # check for fping |
444 |
- fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) |
445 |
- case "${fping_perms}" in |
446 |
- 4[157][157][157]) |
447 |
- ;; |
448 |
- *) |
449 |
- ewarn |
450 |
- ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," |
451 |
- ewarn "you have to make /usr/sbin/fping setuid root and executable" |
452 |
- ewarn "by everyone. Run the following command to fix it:" |
453 |
- ewarn |
454 |
- ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" |
455 |
- ewarn |
456 |
- ewarn "Please be aware that this might impose a security risk," |
457 |
- ewarn "depending on the code quality of fping." |
458 |
- ewarn |
459 |
- ;; |
460 |
- esac |
461 |
- fi |
462 |
-} |
463 |
- |
464 |
-pkg_prerm() { |
465 |
- (use frontend || use server) && webapp_pkg_prerm |
466 |
-} |
467 |
|
468 |
diff --git a/net-analyzer/zabbix/zabbix-6.0.10.ebuild b/net-analyzer/zabbix/zabbix-6.0.10.ebuild |
469 |
deleted file mode 100644 |
470 |
index 0a0d755be321..000000000000 |
471 |
--- a/net-analyzer/zabbix/zabbix-6.0.10.ebuild |
472 |
+++ /dev/null |
473 |
@@ -1,411 +0,0 @@ |
474 |
-# Copyright 1999-2022 Gentoo Authors |
475 |
-# Distributed under the terms of the GNU General Public License v2 |
476 |
- |
477 |
-# To create the go modules tarball: |
478 |
-# cd src/go |
479 |
-# GOMODCACHE="${PWD}"/go-mod go mod download -modcacherw |
480 |
-# tar -acf zabbix-${PV}-go-deps.tar.xz go-mod |
481 |
- |
482 |
-EAPI=8 |
483 |
- |
484 |
-GO_OPTIONAL="yes" |
485 |
-# needed to make webapp-config dep optional |
486 |
-WEBAPP_OPTIONAL="yes" |
487 |
-inherit webapp java-pkg-opt-2 systemd tmpfiles toolchain-funcs go-module user-info |
488 |
- |
489 |
-DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers" |
490 |
-HOMEPAGE="https://www.zabbix.com/" |
491 |
-MY_P=${P/_/} |
492 |
-MY_PV=${PV/_/} |
493 |
-SRC_URI="https://cdn.zabbix.com/${PN}/sources/stable/$(ver_cut 1-2)/${P}.tar.gz |
494 |
- agent2? ( https://dev.gentoo.org/~fordfrog/distfiles/${P}-go-deps.tar.xz ) |
495 |
-" |
496 |
- |
497 |
-LICENSE="GPL-2" |
498 |
-SLOT="0/$(ver_cut 1-2)" |
499 |
-WEBAPP_MANUAL_SLOT="yes" |
500 |
-KEYWORDS="amd64 x86" |
501 |
-IUSE="agent +agent2 curl frontend gnutls ipv6 java ldap libxml2 mysql odbc openipmi +openssl oracle +pcre2 +postgres proxy server snmp sqlite ssh static" |
502 |
-REQUIRED_USE="|| ( agent agent2 frontend proxy server ) |
503 |
- ?? ( gnutls openssl ) |
504 |
- proxy? ( ^^ ( mysql oracle postgres sqlite ) ) |
505 |
- server? ( ^^ ( mysql oracle postgres ) !sqlite ) |
506 |
- static? ( !oracle !snmp )" |
507 |
- |
508 |
-COMMON_DEPEND=" |
509 |
- curl? ( net-misc/curl ) |
510 |
- gnutls? ( net-libs/gnutls:0= ) |
511 |
- java? ( >=virtual/jdk-1.8:* ) |
512 |
- ldap? ( |
513 |
- =dev-libs/cyrus-sasl-2* |
514 |
- net-libs/gnutls:= |
515 |
- net-nds/openldap:= |
516 |
- ) |
517 |
- libxml2? ( dev-libs/libxml2 ) |
518 |
- mysql? ( dev-db/mysql-connector-c:= ) |
519 |
- odbc? ( dev-db/unixODBC ) |
520 |
- openipmi? ( sys-libs/openipmi ) |
521 |
- openssl? ( dev-libs/openssl:=[-bindist(-)] ) |
522 |
- oracle? ( dev-db/oracle-instantclient[odbc,sdk] ) |
523 |
- postgres? ( dev-db/postgresql:* ) |
524 |
- proxy? ( |
525 |
- dev-libs/libevent:= |
526 |
- sys-libs/zlib |
527 |
- ) |
528 |
- server? ( |
529 |
- dev-libs/libevent:= |
530 |
- sys-libs/zlib |
531 |
- ) |
532 |
- snmp? ( net-analyzer/net-snmp:= ) |
533 |
- sqlite? ( dev-db/sqlite ) |
534 |
- ssh? ( net-libs/libssh2 ) |
535 |
-" |
536 |
- |
537 |
-RDEPEND="${COMMON_DEPEND} |
538 |
- acct-group/zabbix |
539 |
- acct-user/zabbix |
540 |
- java? ( >=virtual/jre-1.8:* ) |
541 |
- mysql? ( virtual/mysql ) |
542 |
- proxy? ( |
543 |
- !pcre2? ( dev-libs/libpcre ) |
544 |
- pcre2? ( dev-libs/libpcre2:= ) |
545 |
- net-analyzer/fping[suid] |
546 |
- ) |
547 |
- server? ( |
548 |
- app-admin/webapp-config |
549 |
- !pcre2? ( dev-libs/libpcre ) |
550 |
- pcre2? ( dev-libs/libpcre2:= ) |
551 |
- net-analyzer/fping[suid] |
552 |
- ) |
553 |
- frontend? ( |
554 |
- app-admin/webapp-config |
555 |
- dev-lang/php:*[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode] |
556 |
- media-libs/gd[png] |
557 |
- virtual/httpd-php:* |
558 |
- mysql? ( dev-lang/php[mysqli] ) |
559 |
- odbc? ( dev-lang/php[odbc] ) |
560 |
- oracle? ( dev-lang/php[oci8-instant-client] ) |
561 |
- postgres? ( dev-lang/php[postgres] ) |
562 |
- sqlite? ( dev-lang/php[sqlite] ) |
563 |
- ) |
564 |
-" |
565 |
-DEPEND="${COMMON_DEPEND} |
566 |
- static? ( |
567 |
- curl? ( net-misc/curl[static-libs] ) |
568 |
- ldap? ( |
569 |
- =dev-libs/cyrus-sasl-2*[static-libs] |
570 |
- net-libs/gnutls[static-libs] |
571 |
- net-nds/openldap[static-libs] |
572 |
- ) |
573 |
- libxml2? ( dev-libs/libxml2[static-libs] ) |
574 |
- mysql? ( dev-db/mysql-connector-c[static-libs] ) |
575 |
- odbc? ( dev-db/unixODBC[static-libs] ) |
576 |
- postgres? ( dev-db/postgresql:*[static-libs] ) |
577 |
- sqlite? ( dev-db/sqlite[static-libs] ) |
578 |
- ssh? ( net-libs/libssh2 ) |
579 |
- ) |
580 |
-" |
581 |
-BDEPEND=" |
582 |
- virtual/pkgconfig |
583 |
- agent2? ( |
584 |
- >=dev-lang/go-1.12 |
585 |
- app-arch/unzip |
586 |
- ) |
587 |
-" |
588 |
- |
589 |
-# upstream tests fail for agent2 |
590 |
-RESTRICT="test" |
591 |
- |
592 |
-PATCHES=( |
593 |
- "${FILESDIR}/${PN}-4.0.18-modulepathfix.patch" |
594 |
- "${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch" |
595 |
- "${FILESDIR}/${PN}-6.0.3-system.sw.packages.patch" |
596 |
-) |
597 |
- |
598 |
-S=${WORKDIR}/${MY_P} |
599 |
- |
600 |
-ZABBIXJAVA_BASE="opt/zabbix_java" |
601 |
- |
602 |
-pkg_setup() { |
603 |
- if use oracle; then |
604 |
- if [ -z "${ORACLE_HOME}" ]; then |
605 |
- eerror |
606 |
- eerror "The environment variable ORACLE_HOME must be set" |
607 |
- eerror "and point to the correct location." |
608 |
- eerror "It looks like you don't have Oracle installed." |
609 |
- eerror |
610 |
- die "Environment variable ORACLE_HOME is not set" |
611 |
- fi |
612 |
- fi |
613 |
- |
614 |
- if use frontend; then |
615 |
- webapp_pkg_setup |
616 |
- fi |
617 |
- |
618 |
- java-pkg-opt-2_pkg_setup |
619 |
-} |
620 |
- |
621 |
-src_configure() { |
622 |
- local econf_args=( |
623 |
- "$(use_enable agent)" |
624 |
- "$(use_enable agent2)" |
625 |
- "$(use_enable ipv6)" |
626 |
- "$(use_enable java)" |
627 |
- "$(use_enable proxy)" |
628 |
- "$(use_enable server)" |
629 |
- "$(use_enable static)" |
630 |
- "$(use_with curl libcurl)" |
631 |
- "$(use_with gnutls)" |
632 |
- "$(use_with ldap)" |
633 |
- "$(use_with libxml2)" |
634 |
- "$(use_with mysql)" |
635 |
- "$(use_with odbc unixodbc)" |
636 |
- "$(use_with openipmi openipmi)" |
637 |
- "$(use_with openssl)" |
638 |
- "$(use_with oracle)" |
639 |
- "$(use_with postgres postgresql)" |
640 |
- "$(use_with snmp net-snmp)" |
641 |
- "$(use_with sqlite sqlite3)" |
642 |
- "$(use_with ssh ssh2)" |
643 |
- ) |
644 |
- |
645 |
- if use pcre2; then |
646 |
- econf_args+=( --with-libpcre2 ) |
647 |
- else |
648 |
- # If pcre2 is not enabled, then use the old pcre library. |
649 |
- econf_args+=( --with-libpcre ) |
650 |
- fi |
651 |
- |
652 |
- econf ${econf_args[@]} |
653 |
-} |
654 |
- |
655 |
-src_compile() { |
656 |
- if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then |
657 |
- emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" |
658 |
- fi |
659 |
-} |
660 |
- |
661 |
-src_install() { |
662 |
- local dirs=( |
663 |
- /etc/zabbix |
664 |
- /var/lib/zabbix |
665 |
- /var/lib/zabbix/home |
666 |
- /var/lib/zabbix/scripts |
667 |
- /var/lib/zabbix/alertscripts |
668 |
- /var/lib/zabbix/externalscripts |
669 |
- /var/log/zabbix |
670 |
- ) |
671 |
- |
672 |
- for dir in "${dirs[@]}"; do |
673 |
- keepdir "${dir}" |
674 |
- done |
675 |
- |
676 |
- if use server; then |
677 |
- insinto /etc/zabbix |
678 |
- doins "${S}"/conf/zabbix_server.conf |
679 |
- fperms 0640 /etc/zabbix/zabbix_server.conf |
680 |
- fowners root:zabbix /etc/zabbix/zabbix_server.conf |
681 |
- |
682 |
- newinitd "${FILESDIR}"/zabbix-server-r1.init zabbix-server |
683 |
- |
684 |
- dosbin src/zabbix_server/zabbix_server |
685 |
- |
686 |
- insinto /usr/share/zabbix |
687 |
- doins -r "${S}"/database/ |
688 |
- |
689 |
- systemd_dounit "${FILESDIR}"/zabbix-server.service |
690 |
- newtmpfiles "${FILESDIR}"/zabbix-server.tmpfiles zabbix-server.conf |
691 |
- fi |
692 |
- |
693 |
- if use proxy; then |
694 |
- insinto /etc/zabbix |
695 |
- doins "${S}"/conf/zabbix_proxy.conf |
696 |
- fperms 0640 /etc/zabbix/zabbix_proxy.conf |
697 |
- fowners root:zabbix /etc/zabbix/zabbix_proxy.conf |
698 |
- |
699 |
- newinitd "${FILESDIR}"/zabbix-proxy.init zabbix-proxy |
700 |
- |
701 |
- dosbin src/zabbix_proxy/zabbix_proxy |
702 |
- |
703 |
- insinto /usr/share/zabbix |
704 |
- doins -r "${S}"/database/ |
705 |
- |
706 |
- systemd_dounit "${FILESDIR}"/zabbix-proxy.service |
707 |
- newtmpfiles "${FILESDIR}"/zabbix-proxy.tmpfiles zabbix-proxy.conf |
708 |
- fi |
709 |
- |
710 |
- if use agent; then |
711 |
- insinto /etc/zabbix |
712 |
- doins "${S}"/conf/zabbix_agentd.conf |
713 |
- fperms 0640 /etc/zabbix/zabbix_agentd.conf |
714 |
- fowners root:zabbix /etc/zabbix/zabbix_agentd.conf |
715 |
- |
716 |
- newinitd "${FILESDIR}"/zabbix-agentd.init zabbix-agentd |
717 |
- |
718 |
- dosbin src/zabbix_agent/zabbix_agentd |
719 |
- dobin \ |
720 |
- src/zabbix_sender/zabbix_sender \ |
721 |
- src/zabbix_get/zabbix_get |
722 |
- |
723 |
- systemd_dounit "${FILESDIR}"/zabbix-agentd.service |
724 |
- newtmpfiles "${FILESDIR}"/zabbix-agentd.tmpfiles zabbix-agentd.conf |
725 |
- fi |
726 |
- if use agent2; then |
727 |
- insinto /etc/zabbix |
728 |
- doins "${S}"/src/go/conf/zabbix_agent2.conf |
729 |
- fperms 0640 /etc/zabbix/zabbix_agent2.conf |
730 |
- fowners root:zabbix /etc/zabbix/zabbix_agent2.conf |
731 |
- keepdir /etc/zabbix/zabbix_agent2.d/plugins.d |
732 |
- |
733 |
- newinitd "${FILESDIR}"/zabbix-agent2.init zabbix-agent2 |
734 |
- |
735 |
- dosbin src/go/bin/zabbix_agent2 |
736 |
- |
737 |
- systemd_dounit "${FILESDIR}"/zabbix-agent2.service |
738 |
- newtmpfiles "${FILESDIR}"/zabbix-agent2.tmpfiles zabbix-agent2.conf |
739 |
- fi |
740 |
- |
741 |
- fowners root:zabbix /etc/zabbix |
742 |
- fowners zabbix:zabbix \ |
743 |
- /var/lib/zabbix \ |
744 |
- /var/lib/zabbix/home \ |
745 |
- /var/lib/zabbix/scripts \ |
746 |
- /var/lib/zabbix/alertscripts \ |
747 |
- /var/lib/zabbix/externalscripts \ |
748 |
- /var/log/zabbix |
749 |
- fperms 0750 \ |
750 |
- /etc/zabbix \ |
751 |
- /var/lib/zabbix \ |
752 |
- /var/lib/zabbix/home \ |
753 |
- /var/lib/zabbix/scripts \ |
754 |
- /var/lib/zabbix/alertscripts \ |
755 |
- /var/lib/zabbix/externalscripts \ |
756 |
- /var/log/zabbix |
757 |
- |
758 |
- dodoc README INSTALL NEWS ChangeLog \ |
759 |
- conf/zabbix_agentd.conf \ |
760 |
- conf/zabbix_proxy.conf \ |
761 |
- conf/zabbix_agentd/userparameter_examples.conf \ |
762 |
- conf/zabbix_agentd/userparameter_mysql.conf \ |
763 |
- conf/zabbix_server.conf |
764 |
- |
765 |
- if use frontend; then |
766 |
- webapp_src_preinst |
767 |
- cp -R ui/* "${D}/${MY_HTDOCSDIR}" |
768 |
- webapp_configfile \ |
769 |
- "${MY_HTDOCSDIR}"/include/db.inc.php \ |
770 |
- "${MY_HTDOCSDIR}"/include/config.inc.php |
771 |
- webapp_src_install |
772 |
- fi |
773 |
- |
774 |
- if use java; then |
775 |
- dodir \ |
776 |
- /${ZABBIXJAVA_BASE} \ |
777 |
- /${ZABBIXJAVA_BASE}/bin \ |
778 |
- /${ZABBIXJAVA_BASE}/lib |
779 |
- keepdir /${ZABBIXJAVA_BASE} |
780 |
- exeinto /${ZABBIXJAVA_BASE}/bin |
781 |
- doexe src/zabbix_java/bin/zabbix-java-gateway-"${MY_PV}".jar |
782 |
- exeinto /${ZABBIXJAVA_BASE}/lib |
783 |
- doexe \ |
784 |
- src/zabbix_java/lib/logback-classic-1.2.9.jar \ |
785 |
- src/zabbix_java/lib/logback-console.xml \ |
786 |
- src/zabbix_java/lib/logback-core-1.2.9.jar \ |
787 |
- src/zabbix_java/lib/logback.xml \ |
788 |
- src/zabbix_java/lib/android-json-4.3_r3.1.jar \ |
789 |
- src/zabbix_java/lib/slf4j-api-1.7.32.jar |
790 |
- newinitd "${FILESDIR}"/zabbix-jmx-proxy.init zabbix-jmx-proxy |
791 |
- newconfd "${FILESDIR}"/zabbix-jmx-proxy.conf zabbix-jmx-proxy |
792 |
- fi |
793 |
-} |
794 |
- |
795 |
-pkg_postinst() { |
796 |
- if use server || use proxy ; then |
797 |
- elog |
798 |
- elog "You may need to configure your database for Zabbix" |
799 |
- elog "if you have not already done so." |
800 |
- elog |
801 |
- |
802 |
- zabbix_homedir=$(egethome zabbix) |
803 |
- if [ -n "${zabbix_homedir}" ] && \ |
804 |
- [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then |
805 |
- ewarn |
806 |
- ewarn "The user 'zabbix' should have his homedir changed" |
807 |
- ewarn "to /var/lib/zabbix/home if you want to use" |
808 |
- ewarn "custom alert scripts." |
809 |
- ewarn |
810 |
- ewarn "A real homedir might be needed for configfiles" |
811 |
- ewarn "for custom alert scripts." |
812 |
- ewarn |
813 |
- ewarn "To change the homedir use:" |
814 |
- ewarn " usermod -d /var/lib/zabbix/home zabbix" |
815 |
- ewarn |
816 |
- fi |
817 |
- fi |
818 |
- |
819 |
- if use server; then |
820 |
- tmpfiles_process zabbix-server.conf |
821 |
- |
822 |
- elog |
823 |
- elog "For distributed monitoring you have to run:" |
824 |
- elog |
825 |
- elog "zabbix_server -n <nodeid>" |
826 |
- elog |
827 |
- elog "This will convert database data for use with Node ID" |
828 |
- elog "and also adds a local node." |
829 |
- elog |
830 |
- |
831 |
- if ! use pcre2; then |
832 |
- ewarn "You are using zabbix with dev-libs/libpcre which is deprecated." |
833 |
- ewarn "Consider switching to dev-libs/libpcre2 (USE=pcre2) as soon as possible." |
834 |
- ewarn "See https://www.zabbix.com/documentation/6.0/en/manual/installation/upgrade_notes_600#pcre2-support" |
835 |
- fi |
836 |
- fi |
837 |
- |
838 |
- if use proxy; then |
839 |
- tmpfiles_process zabbix-proxy.conf |
840 |
- fi |
841 |
- |
842 |
- if use agent; then |
843 |
- tmpfiles_process zabbix-agentd.conf |
844 |
- fi |
845 |
- |
846 |
- if use agent2; then |
847 |
- tmpfiles_process zabbix-agent2.conf |
848 |
- fi |
849 |
- |
850 |
- elog "--" |
851 |
- elog |
852 |
- elog "You may need to add these lines to /etc/services:" |
853 |
- elog |
854 |
- elog "zabbix-agent 10050/tcp Zabbix Agent" |
855 |
- elog "zabbix-agent 10050/udp Zabbix Agent" |
856 |
- elog "zabbix-trapper 10051/tcp Zabbix Trapper" |
857 |
- elog "zabbix-trapper 10051/udp Zabbix Trapper" |
858 |
- elog |
859 |
- |
860 |
- if use server || use proxy ; then |
861 |
- # check for fping |
862 |
- fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) |
863 |
- case "${fping_perms}" in |
864 |
- 4[157][157][157]) |
865 |
- ;; |
866 |
- *) |
867 |
- ewarn |
868 |
- ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," |
869 |
- ewarn "you have to make /usr/sbin/fping setuid root and executable" |
870 |
- ewarn "by everyone. Run the following command to fix it:" |
871 |
- ewarn |
872 |
- ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" |
873 |
- ewarn |
874 |
- ewarn "Please be aware that this might impose a security risk," |
875 |
- ewarn "depending on the code quality of fping." |
876 |
- ewarn |
877 |
- ;; |
878 |
- esac |
879 |
- fi |
880 |
-} |
881 |
- |
882 |
-pkg_prerm() { |
883 |
- (use frontend || use server) && webapp_pkg_prerm |
884 |
-} |
885 |
|
886 |
diff --git a/net-analyzer/zabbix/zabbix-6.0.11.ebuild b/net-analyzer/zabbix/zabbix-6.0.11.ebuild |
887 |
deleted file mode 100644 |
888 |
index 961445bff7c3..000000000000 |
889 |
--- a/net-analyzer/zabbix/zabbix-6.0.11.ebuild |
890 |
+++ /dev/null |
891 |
@@ -1,397 +0,0 @@ |
892 |
-# Copyright 1999-2022 Gentoo Authors |
893 |
-# Distributed under the terms of the GNU General Public License v2 |
894 |
- |
895 |
-# To create the go modules tarball: |
896 |
-# cd src/go |
897 |
-# GOMODCACHE="${PWD}"/go-mod go mod download -modcacherw |
898 |
-# tar -acf zabbix-${PV}-go-deps.tar.xz go-mod |
899 |
- |
900 |
-EAPI=8 |
901 |
- |
902 |
-GO_OPTIONAL="yes" |
903 |
-# needed to make webapp-config dep optional |
904 |
-WEBAPP_OPTIONAL="yes" |
905 |
-inherit webapp java-pkg-opt-2 systemd tmpfiles toolchain-funcs go-module user-info |
906 |
- |
907 |
-DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers" |
908 |
-HOMEPAGE="https://www.zabbix.com/" |
909 |
-MY_P=${P/_/} |
910 |
-MY_PV=${PV/_/} |
911 |
-SRC_URI="https://cdn.zabbix.com/${PN}/sources/stable/$(ver_cut 1-2)/${P}.tar.gz |
912 |
- agent2? ( https://dev.gentoo.org/~fordfrog/distfiles/${P}-go-deps.tar.xz ) |
913 |
-" |
914 |
- |
915 |
-LICENSE="GPL-2" |
916 |
-SLOT="0/$(ver_cut 1-2)" |
917 |
-WEBAPP_MANUAL_SLOT="yes" |
918 |
-KEYWORDS="~amd64 ~x86" |
919 |
-IUSE="agent +agent2 curl frontend gnutls ipv6 java ldap libxml2 mysql odbc openipmi +openssl oracle +postgres proxy server snmp sqlite ssh static" |
920 |
-REQUIRED_USE="|| ( agent agent2 frontend proxy server ) |
921 |
- ?? ( gnutls openssl ) |
922 |
- proxy? ( ^^ ( mysql oracle postgres sqlite ) ) |
923 |
- server? ( ^^ ( mysql oracle postgres ) !sqlite ) |
924 |
- static? ( !oracle !snmp )" |
925 |
- |
926 |
-COMMON_DEPEND=" |
927 |
- curl? ( net-misc/curl ) |
928 |
- gnutls? ( net-libs/gnutls:0= ) |
929 |
- java? ( >=virtual/jdk-1.8:* ) |
930 |
- ldap? ( |
931 |
- =dev-libs/cyrus-sasl-2* |
932 |
- net-libs/gnutls:= |
933 |
- net-nds/openldap:= |
934 |
- ) |
935 |
- libxml2? ( dev-libs/libxml2 ) |
936 |
- mysql? ( dev-db/mysql-connector-c:= ) |
937 |
- odbc? ( dev-db/unixODBC ) |
938 |
- openipmi? ( sys-libs/openipmi ) |
939 |
- openssl? ( dev-libs/openssl:=[-bindist(-)] ) |
940 |
- oracle? ( dev-db/oracle-instantclient[odbc,sdk] ) |
941 |
- postgres? ( dev-db/postgresql:* ) |
942 |
- proxy? ( |
943 |
- dev-libs/libevent:= |
944 |
- sys-libs/zlib |
945 |
- ) |
946 |
- server? ( |
947 |
- dev-libs/libevent:= |
948 |
- sys-libs/zlib |
949 |
- ) |
950 |
- snmp? ( net-analyzer/net-snmp:= ) |
951 |
- sqlite? ( dev-db/sqlite ) |
952 |
- ssh? ( net-libs/libssh2 ) |
953 |
-" |
954 |
- |
955 |
-RDEPEND="${COMMON_DEPEND} |
956 |
- acct-group/zabbix |
957 |
- acct-user/zabbix |
958 |
- java? ( >=virtual/jre-1.8:* ) |
959 |
- mysql? ( virtual/mysql ) |
960 |
- proxy? ( |
961 |
- dev-libs/libpcre2:= |
962 |
- net-analyzer/fping[suid] |
963 |
- ) |
964 |
- server? ( |
965 |
- app-admin/webapp-config |
966 |
- dev-libs/libpcre2:= |
967 |
- net-analyzer/fping[suid] |
968 |
- ) |
969 |
- frontend? ( |
970 |
- app-admin/webapp-config |
971 |
- dev-lang/php:*[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode] |
972 |
- media-libs/gd[png] |
973 |
- virtual/httpd-php:* |
974 |
- mysql? ( dev-lang/php[mysqli] ) |
975 |
- odbc? ( dev-lang/php[odbc] ) |
976 |
- oracle? ( dev-lang/php[oci8-instant-client] ) |
977 |
- postgres? ( dev-lang/php[postgres] ) |
978 |
- sqlite? ( dev-lang/php[sqlite] ) |
979 |
- ) |
980 |
-" |
981 |
-DEPEND="${COMMON_DEPEND} |
982 |
- static? ( |
983 |
- curl? ( net-misc/curl[static-libs] ) |
984 |
- ldap? ( |
985 |
- =dev-libs/cyrus-sasl-2*[static-libs] |
986 |
- net-libs/gnutls[static-libs] |
987 |
- net-nds/openldap[static-libs] |
988 |
- ) |
989 |
- libxml2? ( dev-libs/libxml2[static-libs] ) |
990 |
- mysql? ( dev-db/mysql-connector-c[static-libs] ) |
991 |
- odbc? ( dev-db/unixODBC[static-libs] ) |
992 |
- postgres? ( dev-db/postgresql:*[static-libs] ) |
993 |
- sqlite? ( dev-db/sqlite[static-libs] ) |
994 |
- ssh? ( net-libs/libssh2 ) |
995 |
- ) |
996 |
-" |
997 |
-BDEPEND=" |
998 |
- virtual/pkgconfig |
999 |
- agent2? ( |
1000 |
- >=dev-lang/go-1.12 |
1001 |
- app-arch/unzip |
1002 |
- ) |
1003 |
-" |
1004 |
- |
1005 |
-# upstream tests fail for agent2 |
1006 |
-RESTRICT="test" |
1007 |
- |
1008 |
-PATCHES=( |
1009 |
- "${FILESDIR}/${PN}-4.0.18-modulepathfix.patch" |
1010 |
- "${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch" |
1011 |
- "${FILESDIR}/${PN}-6.0.3-system.sw.packages.patch" |
1012 |
-) |
1013 |
- |
1014 |
-S=${WORKDIR}/${MY_P} |
1015 |
- |
1016 |
-ZABBIXJAVA_BASE="opt/zabbix_java" |
1017 |
- |
1018 |
-pkg_setup() { |
1019 |
- if use oracle; then |
1020 |
- if [ -z "${ORACLE_HOME}" ]; then |
1021 |
- eerror |
1022 |
- eerror "The environment variable ORACLE_HOME must be set" |
1023 |
- eerror "and point to the correct location." |
1024 |
- eerror "It looks like you don't have Oracle installed." |
1025 |
- eerror |
1026 |
- die "Environment variable ORACLE_HOME is not set" |
1027 |
- fi |
1028 |
- fi |
1029 |
- |
1030 |
- if use frontend; then |
1031 |
- webapp_pkg_setup |
1032 |
- fi |
1033 |
- |
1034 |
- java-pkg-opt-2_pkg_setup |
1035 |
-} |
1036 |
- |
1037 |
-src_configure() { |
1038 |
- local econf_args=( |
1039 |
- --with-libpcre2 |
1040 |
- "$(use_enable agent)" |
1041 |
- "$(use_enable agent2)" |
1042 |
- "$(use_enable ipv6)" |
1043 |
- "$(use_enable java)" |
1044 |
- "$(use_enable proxy)" |
1045 |
- "$(use_enable server)" |
1046 |
- "$(use_enable static)" |
1047 |
- "$(use_with curl libcurl)" |
1048 |
- "$(use_with gnutls)" |
1049 |
- "$(use_with ldap)" |
1050 |
- "$(use_with libxml2)" |
1051 |
- "$(use_with mysql)" |
1052 |
- "$(use_with odbc unixodbc)" |
1053 |
- "$(use_with openipmi openipmi)" |
1054 |
- "$(use_with openssl)" |
1055 |
- "$(use_with oracle)" |
1056 |
- "$(use_with postgres postgresql)" |
1057 |
- "$(use_with snmp net-snmp)" |
1058 |
- "$(use_with sqlite sqlite3)" |
1059 |
- "$(use_with ssh ssh2)" |
1060 |
- ) |
1061 |
- |
1062 |
- econf ${econf_args[@]} |
1063 |
-} |
1064 |
- |
1065 |
-src_compile() { |
1066 |
- if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then |
1067 |
- emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" |
1068 |
- fi |
1069 |
-} |
1070 |
- |
1071 |
-src_install() { |
1072 |
- local dirs=( |
1073 |
- /etc/zabbix |
1074 |
- /var/lib/zabbix |
1075 |
- /var/lib/zabbix/home |
1076 |
- /var/lib/zabbix/scripts |
1077 |
- /var/lib/zabbix/alertscripts |
1078 |
- /var/lib/zabbix/externalscripts |
1079 |
- /var/log/zabbix |
1080 |
- ) |
1081 |
- |
1082 |
- for dir in "${dirs[@]}"; do |
1083 |
- keepdir "${dir}" |
1084 |
- done |
1085 |
- |
1086 |
- if use server; then |
1087 |
- insinto /etc/zabbix |
1088 |
- doins "${S}"/conf/zabbix_server.conf |
1089 |
- fperms 0640 /etc/zabbix/zabbix_server.conf |
1090 |
- fowners root:zabbix /etc/zabbix/zabbix_server.conf |
1091 |
- |
1092 |
- newinitd "${FILESDIR}"/zabbix-server-r1.init zabbix-server |
1093 |
- |
1094 |
- dosbin src/zabbix_server/zabbix_server |
1095 |
- |
1096 |
- insinto /usr/share/zabbix |
1097 |
- doins -r "${S}"/database/ |
1098 |
- |
1099 |
- systemd_dounit "${FILESDIR}"/zabbix-server.service |
1100 |
- newtmpfiles "${FILESDIR}"/zabbix-server.tmpfiles zabbix-server.conf |
1101 |
- fi |
1102 |
- |
1103 |
- if use proxy; then |
1104 |
- insinto /etc/zabbix |
1105 |
- doins "${S}"/conf/zabbix_proxy.conf |
1106 |
- fperms 0640 /etc/zabbix/zabbix_proxy.conf |
1107 |
- fowners root:zabbix /etc/zabbix/zabbix_proxy.conf |
1108 |
- |
1109 |
- newinitd "${FILESDIR}"/zabbix-proxy.init zabbix-proxy |
1110 |
- |
1111 |
- dosbin src/zabbix_proxy/zabbix_proxy |
1112 |
- |
1113 |
- insinto /usr/share/zabbix |
1114 |
- doins -r "${S}"/database/ |
1115 |
- |
1116 |
- systemd_dounit "${FILESDIR}"/zabbix-proxy.service |
1117 |
- newtmpfiles "${FILESDIR}"/zabbix-proxy.tmpfiles zabbix-proxy.conf |
1118 |
- fi |
1119 |
- |
1120 |
- if use agent; then |
1121 |
- insinto /etc/zabbix |
1122 |
- doins "${S}"/conf/zabbix_agentd.conf |
1123 |
- fperms 0640 /etc/zabbix/zabbix_agentd.conf |
1124 |
- fowners root:zabbix /etc/zabbix/zabbix_agentd.conf |
1125 |
- |
1126 |
- newinitd "${FILESDIR}"/zabbix-agentd.init zabbix-agentd |
1127 |
- |
1128 |
- dosbin src/zabbix_agent/zabbix_agentd |
1129 |
- dobin \ |
1130 |
- src/zabbix_sender/zabbix_sender \ |
1131 |
- src/zabbix_get/zabbix_get |
1132 |
- |
1133 |
- systemd_dounit "${FILESDIR}"/zabbix-agentd.service |
1134 |
- newtmpfiles "${FILESDIR}"/zabbix-agentd.tmpfiles zabbix-agentd.conf |
1135 |
- fi |
1136 |
- if use agent2; then |
1137 |
- insinto /etc/zabbix |
1138 |
- doins "${S}"/src/go/conf/zabbix_agent2.conf |
1139 |
- fperms 0640 /etc/zabbix/zabbix_agent2.conf |
1140 |
- fowners root:zabbix /etc/zabbix/zabbix_agent2.conf |
1141 |
- keepdir /etc/zabbix/zabbix_agent2.d/plugins.d |
1142 |
- |
1143 |
- newinitd "${FILESDIR}"/zabbix-agent2.init zabbix-agent2 |
1144 |
- |
1145 |
- dosbin src/go/bin/zabbix_agent2 |
1146 |
- |
1147 |
- systemd_dounit "${FILESDIR}"/zabbix-agent2.service |
1148 |
- newtmpfiles "${FILESDIR}"/zabbix-agent2.tmpfiles zabbix-agent2.conf |
1149 |
- fi |
1150 |
- |
1151 |
- fowners root:zabbix /etc/zabbix |
1152 |
- fowners zabbix:zabbix \ |
1153 |
- /var/lib/zabbix \ |
1154 |
- /var/lib/zabbix/home \ |
1155 |
- /var/lib/zabbix/scripts \ |
1156 |
- /var/lib/zabbix/alertscripts \ |
1157 |
- /var/lib/zabbix/externalscripts \ |
1158 |
- /var/log/zabbix |
1159 |
- fperms 0750 \ |
1160 |
- /etc/zabbix \ |
1161 |
- /var/lib/zabbix \ |
1162 |
- /var/lib/zabbix/home \ |
1163 |
- /var/lib/zabbix/scripts \ |
1164 |
- /var/lib/zabbix/alertscripts \ |
1165 |
- /var/lib/zabbix/externalscripts \ |
1166 |
- /var/log/zabbix |
1167 |
- |
1168 |
- dodoc README INSTALL NEWS ChangeLog \ |
1169 |
- conf/zabbix_agentd.conf \ |
1170 |
- conf/zabbix_proxy.conf \ |
1171 |
- conf/zabbix_agentd/userparameter_examples.conf \ |
1172 |
- conf/zabbix_agentd/userparameter_mysql.conf \ |
1173 |
- conf/zabbix_server.conf |
1174 |
- |
1175 |
- if use frontend; then |
1176 |
- webapp_src_preinst |
1177 |
- cp -R ui/* "${D}/${MY_HTDOCSDIR}" |
1178 |
- webapp_configfile \ |
1179 |
- "${MY_HTDOCSDIR}"/include/db.inc.php \ |
1180 |
- "${MY_HTDOCSDIR}"/include/config.inc.php |
1181 |
- webapp_src_install |
1182 |
- fi |
1183 |
- |
1184 |
- if use java; then |
1185 |
- dodir \ |
1186 |
- /${ZABBIXJAVA_BASE} \ |
1187 |
- /${ZABBIXJAVA_BASE}/bin \ |
1188 |
- /${ZABBIXJAVA_BASE}/lib |
1189 |
- keepdir /${ZABBIXJAVA_BASE} |
1190 |
- exeinto /${ZABBIXJAVA_BASE}/bin |
1191 |
- doexe src/zabbix_java/bin/zabbix-java-gateway-"${MY_PV}".jar |
1192 |
- exeinto /${ZABBIXJAVA_BASE}/lib |
1193 |
- doexe \ |
1194 |
- src/zabbix_java/lib/logback-classic-1.2.9.jar \ |
1195 |
- src/zabbix_java/lib/logback-console.xml \ |
1196 |
- src/zabbix_java/lib/logback-core-1.2.9.jar \ |
1197 |
- src/zabbix_java/lib/logback.xml \ |
1198 |
- src/zabbix_java/lib/android-json-4.3_r3.1.jar \ |
1199 |
- src/zabbix_java/lib/slf4j-api-1.7.32.jar |
1200 |
- newinitd "${FILESDIR}"/zabbix-jmx-proxy.init zabbix-jmx-proxy |
1201 |
- newconfd "${FILESDIR}"/zabbix-jmx-proxy.conf zabbix-jmx-proxy |
1202 |
- fi |
1203 |
-} |
1204 |
- |
1205 |
-pkg_postinst() { |
1206 |
- if use server || use proxy ; then |
1207 |
- elog |
1208 |
- elog "You may need to configure your database for Zabbix" |
1209 |
- elog "if you have not already done so." |
1210 |
- elog |
1211 |
- |
1212 |
- zabbix_homedir=$(egethome zabbix) |
1213 |
- if [ -n "${zabbix_homedir}" ] && \ |
1214 |
- [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then |
1215 |
- ewarn |
1216 |
- ewarn "The user 'zabbix' should have his homedir changed" |
1217 |
- ewarn "to /var/lib/zabbix/home if you want to use" |
1218 |
- ewarn "custom alert scripts." |
1219 |
- ewarn |
1220 |
- ewarn "A real homedir might be needed for configfiles" |
1221 |
- ewarn "for custom alert scripts." |
1222 |
- ewarn |
1223 |
- ewarn "To change the homedir use:" |
1224 |
- ewarn " usermod -d /var/lib/zabbix/home zabbix" |
1225 |
- ewarn |
1226 |
- fi |
1227 |
- fi |
1228 |
- |
1229 |
- if use server; then |
1230 |
- tmpfiles_process zabbix-server.conf |
1231 |
- |
1232 |
- elog |
1233 |
- elog "For distributed monitoring you have to run:" |
1234 |
- elog |
1235 |
- elog "zabbix_server -n <nodeid>" |
1236 |
- elog |
1237 |
- elog "This will convert database data for use with Node ID" |
1238 |
- elog "and also adds a local node." |
1239 |
- elog |
1240 |
- fi |
1241 |
- |
1242 |
- if use proxy; then |
1243 |
- tmpfiles_process zabbix-proxy.conf |
1244 |
- fi |
1245 |
- |
1246 |
- if use agent; then |
1247 |
- tmpfiles_process zabbix-agentd.conf |
1248 |
- fi |
1249 |
- |
1250 |
- if use agent2; then |
1251 |
- tmpfiles_process zabbix-agent2.conf |
1252 |
- fi |
1253 |
- |
1254 |
- elog "--" |
1255 |
- elog |
1256 |
- elog "You may need to add these lines to /etc/services:" |
1257 |
- elog |
1258 |
- elog "zabbix-agent 10050/tcp Zabbix Agent" |
1259 |
- elog "zabbix-agent 10050/udp Zabbix Agent" |
1260 |
- elog "zabbix-trapper 10051/tcp Zabbix Trapper" |
1261 |
- elog "zabbix-trapper 10051/udp Zabbix Trapper" |
1262 |
- elog |
1263 |
- |
1264 |
- if use server || use proxy ; then |
1265 |
- # check for fping |
1266 |
- fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) |
1267 |
- case "${fping_perms}" in |
1268 |
- 4[157][157][157]) |
1269 |
- ;; |
1270 |
- *) |
1271 |
- ewarn |
1272 |
- ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," |
1273 |
- ewarn "you have to make /usr/sbin/fping setuid root and executable" |
1274 |
- ewarn "by everyone. Run the following command to fix it:" |
1275 |
- ewarn |
1276 |
- ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" |
1277 |
- ewarn |
1278 |
- ewarn "Please be aware that this might impose a security risk," |
1279 |
- ewarn "depending on the code quality of fping." |
1280 |
- ewarn |
1281 |
- ;; |
1282 |
- esac |
1283 |
- fi |
1284 |
-} |
1285 |
- |
1286 |
-pkg_prerm() { |
1287 |
- (use frontend || use server) && webapp_pkg_prerm |
1288 |
-} |
1289 |
|
1290 |
diff --git a/net-analyzer/zabbix/zabbix-6.2.4.ebuild b/net-analyzer/zabbix/zabbix-6.2.4.ebuild |
1291 |
deleted file mode 100644 |
1292 |
index 0a0d755be321..000000000000 |
1293 |
--- a/net-analyzer/zabbix/zabbix-6.2.4.ebuild |
1294 |
+++ /dev/null |
1295 |
@@ -1,411 +0,0 @@ |
1296 |
-# Copyright 1999-2022 Gentoo Authors |
1297 |
-# Distributed under the terms of the GNU General Public License v2 |
1298 |
- |
1299 |
-# To create the go modules tarball: |
1300 |
-# cd src/go |
1301 |
-# GOMODCACHE="${PWD}"/go-mod go mod download -modcacherw |
1302 |
-# tar -acf zabbix-${PV}-go-deps.tar.xz go-mod |
1303 |
- |
1304 |
-EAPI=8 |
1305 |
- |
1306 |
-GO_OPTIONAL="yes" |
1307 |
-# needed to make webapp-config dep optional |
1308 |
-WEBAPP_OPTIONAL="yes" |
1309 |
-inherit webapp java-pkg-opt-2 systemd tmpfiles toolchain-funcs go-module user-info |
1310 |
- |
1311 |
-DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers" |
1312 |
-HOMEPAGE="https://www.zabbix.com/" |
1313 |
-MY_P=${P/_/} |
1314 |
-MY_PV=${PV/_/} |
1315 |
-SRC_URI="https://cdn.zabbix.com/${PN}/sources/stable/$(ver_cut 1-2)/${P}.tar.gz |
1316 |
- agent2? ( https://dev.gentoo.org/~fordfrog/distfiles/${P}-go-deps.tar.xz ) |
1317 |
-" |
1318 |
- |
1319 |
-LICENSE="GPL-2" |
1320 |
-SLOT="0/$(ver_cut 1-2)" |
1321 |
-WEBAPP_MANUAL_SLOT="yes" |
1322 |
-KEYWORDS="amd64 x86" |
1323 |
-IUSE="agent +agent2 curl frontend gnutls ipv6 java ldap libxml2 mysql odbc openipmi +openssl oracle +pcre2 +postgres proxy server snmp sqlite ssh static" |
1324 |
-REQUIRED_USE="|| ( agent agent2 frontend proxy server ) |
1325 |
- ?? ( gnutls openssl ) |
1326 |
- proxy? ( ^^ ( mysql oracle postgres sqlite ) ) |
1327 |
- server? ( ^^ ( mysql oracle postgres ) !sqlite ) |
1328 |
- static? ( !oracle !snmp )" |
1329 |
- |
1330 |
-COMMON_DEPEND=" |
1331 |
- curl? ( net-misc/curl ) |
1332 |
- gnutls? ( net-libs/gnutls:0= ) |
1333 |
- java? ( >=virtual/jdk-1.8:* ) |
1334 |
- ldap? ( |
1335 |
- =dev-libs/cyrus-sasl-2* |
1336 |
- net-libs/gnutls:= |
1337 |
- net-nds/openldap:= |
1338 |
- ) |
1339 |
- libxml2? ( dev-libs/libxml2 ) |
1340 |
- mysql? ( dev-db/mysql-connector-c:= ) |
1341 |
- odbc? ( dev-db/unixODBC ) |
1342 |
- openipmi? ( sys-libs/openipmi ) |
1343 |
- openssl? ( dev-libs/openssl:=[-bindist(-)] ) |
1344 |
- oracle? ( dev-db/oracle-instantclient[odbc,sdk] ) |
1345 |
- postgres? ( dev-db/postgresql:* ) |
1346 |
- proxy? ( |
1347 |
- dev-libs/libevent:= |
1348 |
- sys-libs/zlib |
1349 |
- ) |
1350 |
- server? ( |
1351 |
- dev-libs/libevent:= |
1352 |
- sys-libs/zlib |
1353 |
- ) |
1354 |
- snmp? ( net-analyzer/net-snmp:= ) |
1355 |
- sqlite? ( dev-db/sqlite ) |
1356 |
- ssh? ( net-libs/libssh2 ) |
1357 |
-" |
1358 |
- |
1359 |
-RDEPEND="${COMMON_DEPEND} |
1360 |
- acct-group/zabbix |
1361 |
- acct-user/zabbix |
1362 |
- java? ( >=virtual/jre-1.8:* ) |
1363 |
- mysql? ( virtual/mysql ) |
1364 |
- proxy? ( |
1365 |
- !pcre2? ( dev-libs/libpcre ) |
1366 |
- pcre2? ( dev-libs/libpcre2:= ) |
1367 |
- net-analyzer/fping[suid] |
1368 |
- ) |
1369 |
- server? ( |
1370 |
- app-admin/webapp-config |
1371 |
- !pcre2? ( dev-libs/libpcre ) |
1372 |
- pcre2? ( dev-libs/libpcre2:= ) |
1373 |
- net-analyzer/fping[suid] |
1374 |
- ) |
1375 |
- frontend? ( |
1376 |
- app-admin/webapp-config |
1377 |
- dev-lang/php:*[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode] |
1378 |
- media-libs/gd[png] |
1379 |
- virtual/httpd-php:* |
1380 |
- mysql? ( dev-lang/php[mysqli] ) |
1381 |
- odbc? ( dev-lang/php[odbc] ) |
1382 |
- oracle? ( dev-lang/php[oci8-instant-client] ) |
1383 |
- postgres? ( dev-lang/php[postgres] ) |
1384 |
- sqlite? ( dev-lang/php[sqlite] ) |
1385 |
- ) |
1386 |
-" |
1387 |
-DEPEND="${COMMON_DEPEND} |
1388 |
- static? ( |
1389 |
- curl? ( net-misc/curl[static-libs] ) |
1390 |
- ldap? ( |
1391 |
- =dev-libs/cyrus-sasl-2*[static-libs] |
1392 |
- net-libs/gnutls[static-libs] |
1393 |
- net-nds/openldap[static-libs] |
1394 |
- ) |
1395 |
- libxml2? ( dev-libs/libxml2[static-libs] ) |
1396 |
- mysql? ( dev-db/mysql-connector-c[static-libs] ) |
1397 |
- odbc? ( dev-db/unixODBC[static-libs] ) |
1398 |
- postgres? ( dev-db/postgresql:*[static-libs] ) |
1399 |
- sqlite? ( dev-db/sqlite[static-libs] ) |
1400 |
- ssh? ( net-libs/libssh2 ) |
1401 |
- ) |
1402 |
-" |
1403 |
-BDEPEND=" |
1404 |
- virtual/pkgconfig |
1405 |
- agent2? ( |
1406 |
- >=dev-lang/go-1.12 |
1407 |
- app-arch/unzip |
1408 |
- ) |
1409 |
-" |
1410 |
- |
1411 |
-# upstream tests fail for agent2 |
1412 |
-RESTRICT="test" |
1413 |
- |
1414 |
-PATCHES=( |
1415 |
- "${FILESDIR}/${PN}-4.0.18-modulepathfix.patch" |
1416 |
- "${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch" |
1417 |
- "${FILESDIR}/${PN}-6.0.3-system.sw.packages.patch" |
1418 |
-) |
1419 |
- |
1420 |
-S=${WORKDIR}/${MY_P} |
1421 |
- |
1422 |
-ZABBIXJAVA_BASE="opt/zabbix_java" |
1423 |
- |
1424 |
-pkg_setup() { |
1425 |
- if use oracle; then |
1426 |
- if [ -z "${ORACLE_HOME}" ]; then |
1427 |
- eerror |
1428 |
- eerror "The environment variable ORACLE_HOME must be set" |
1429 |
- eerror "and point to the correct location." |
1430 |
- eerror "It looks like you don't have Oracle installed." |
1431 |
- eerror |
1432 |
- die "Environment variable ORACLE_HOME is not set" |
1433 |
- fi |
1434 |
- fi |
1435 |
- |
1436 |
- if use frontend; then |
1437 |
- webapp_pkg_setup |
1438 |
- fi |
1439 |
- |
1440 |
- java-pkg-opt-2_pkg_setup |
1441 |
-} |
1442 |
- |
1443 |
-src_configure() { |
1444 |
- local econf_args=( |
1445 |
- "$(use_enable agent)" |
1446 |
- "$(use_enable agent2)" |
1447 |
- "$(use_enable ipv6)" |
1448 |
- "$(use_enable java)" |
1449 |
- "$(use_enable proxy)" |
1450 |
- "$(use_enable server)" |
1451 |
- "$(use_enable static)" |
1452 |
- "$(use_with curl libcurl)" |
1453 |
- "$(use_with gnutls)" |
1454 |
- "$(use_with ldap)" |
1455 |
- "$(use_with libxml2)" |
1456 |
- "$(use_with mysql)" |
1457 |
- "$(use_with odbc unixodbc)" |
1458 |
- "$(use_with openipmi openipmi)" |
1459 |
- "$(use_with openssl)" |
1460 |
- "$(use_with oracle)" |
1461 |
- "$(use_with postgres postgresql)" |
1462 |
- "$(use_with snmp net-snmp)" |
1463 |
- "$(use_with sqlite sqlite3)" |
1464 |
- "$(use_with ssh ssh2)" |
1465 |
- ) |
1466 |
- |
1467 |
- if use pcre2; then |
1468 |
- econf_args+=( --with-libpcre2 ) |
1469 |
- else |
1470 |
- # If pcre2 is not enabled, then use the old pcre library. |
1471 |
- econf_args+=( --with-libpcre ) |
1472 |
- fi |
1473 |
- |
1474 |
- econf ${econf_args[@]} |
1475 |
-} |
1476 |
- |
1477 |
-src_compile() { |
1478 |
- if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then |
1479 |
- emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" |
1480 |
- fi |
1481 |
-} |
1482 |
- |
1483 |
-src_install() { |
1484 |
- local dirs=( |
1485 |
- /etc/zabbix |
1486 |
- /var/lib/zabbix |
1487 |
- /var/lib/zabbix/home |
1488 |
- /var/lib/zabbix/scripts |
1489 |
- /var/lib/zabbix/alertscripts |
1490 |
- /var/lib/zabbix/externalscripts |
1491 |
- /var/log/zabbix |
1492 |
- ) |
1493 |
- |
1494 |
- for dir in "${dirs[@]}"; do |
1495 |
- keepdir "${dir}" |
1496 |
- done |
1497 |
- |
1498 |
- if use server; then |
1499 |
- insinto /etc/zabbix |
1500 |
- doins "${S}"/conf/zabbix_server.conf |
1501 |
- fperms 0640 /etc/zabbix/zabbix_server.conf |
1502 |
- fowners root:zabbix /etc/zabbix/zabbix_server.conf |
1503 |
- |
1504 |
- newinitd "${FILESDIR}"/zabbix-server-r1.init zabbix-server |
1505 |
- |
1506 |
- dosbin src/zabbix_server/zabbix_server |
1507 |
- |
1508 |
- insinto /usr/share/zabbix |
1509 |
- doins -r "${S}"/database/ |
1510 |
- |
1511 |
- systemd_dounit "${FILESDIR}"/zabbix-server.service |
1512 |
- newtmpfiles "${FILESDIR}"/zabbix-server.tmpfiles zabbix-server.conf |
1513 |
- fi |
1514 |
- |
1515 |
- if use proxy; then |
1516 |
- insinto /etc/zabbix |
1517 |
- doins "${S}"/conf/zabbix_proxy.conf |
1518 |
- fperms 0640 /etc/zabbix/zabbix_proxy.conf |
1519 |
- fowners root:zabbix /etc/zabbix/zabbix_proxy.conf |
1520 |
- |
1521 |
- newinitd "${FILESDIR}"/zabbix-proxy.init zabbix-proxy |
1522 |
- |
1523 |
- dosbin src/zabbix_proxy/zabbix_proxy |
1524 |
- |
1525 |
- insinto /usr/share/zabbix |
1526 |
- doins -r "${S}"/database/ |
1527 |
- |
1528 |
- systemd_dounit "${FILESDIR}"/zabbix-proxy.service |
1529 |
- newtmpfiles "${FILESDIR}"/zabbix-proxy.tmpfiles zabbix-proxy.conf |
1530 |
- fi |
1531 |
- |
1532 |
- if use agent; then |
1533 |
- insinto /etc/zabbix |
1534 |
- doins "${S}"/conf/zabbix_agentd.conf |
1535 |
- fperms 0640 /etc/zabbix/zabbix_agentd.conf |
1536 |
- fowners root:zabbix /etc/zabbix/zabbix_agentd.conf |
1537 |
- |
1538 |
- newinitd "${FILESDIR}"/zabbix-agentd.init zabbix-agentd |
1539 |
- |
1540 |
- dosbin src/zabbix_agent/zabbix_agentd |
1541 |
- dobin \ |
1542 |
- src/zabbix_sender/zabbix_sender \ |
1543 |
- src/zabbix_get/zabbix_get |
1544 |
- |
1545 |
- systemd_dounit "${FILESDIR}"/zabbix-agentd.service |
1546 |
- newtmpfiles "${FILESDIR}"/zabbix-agentd.tmpfiles zabbix-agentd.conf |
1547 |
- fi |
1548 |
- if use agent2; then |
1549 |
- insinto /etc/zabbix |
1550 |
- doins "${S}"/src/go/conf/zabbix_agent2.conf |
1551 |
- fperms 0640 /etc/zabbix/zabbix_agent2.conf |
1552 |
- fowners root:zabbix /etc/zabbix/zabbix_agent2.conf |
1553 |
- keepdir /etc/zabbix/zabbix_agent2.d/plugins.d |
1554 |
- |
1555 |
- newinitd "${FILESDIR}"/zabbix-agent2.init zabbix-agent2 |
1556 |
- |
1557 |
- dosbin src/go/bin/zabbix_agent2 |
1558 |
- |
1559 |
- systemd_dounit "${FILESDIR}"/zabbix-agent2.service |
1560 |
- newtmpfiles "${FILESDIR}"/zabbix-agent2.tmpfiles zabbix-agent2.conf |
1561 |
- fi |
1562 |
- |
1563 |
- fowners root:zabbix /etc/zabbix |
1564 |
- fowners zabbix:zabbix \ |
1565 |
- /var/lib/zabbix \ |
1566 |
- /var/lib/zabbix/home \ |
1567 |
- /var/lib/zabbix/scripts \ |
1568 |
- /var/lib/zabbix/alertscripts \ |
1569 |
- /var/lib/zabbix/externalscripts \ |
1570 |
- /var/log/zabbix |
1571 |
- fperms 0750 \ |
1572 |
- /etc/zabbix \ |
1573 |
- /var/lib/zabbix \ |
1574 |
- /var/lib/zabbix/home \ |
1575 |
- /var/lib/zabbix/scripts \ |
1576 |
- /var/lib/zabbix/alertscripts \ |
1577 |
- /var/lib/zabbix/externalscripts \ |
1578 |
- /var/log/zabbix |
1579 |
- |
1580 |
- dodoc README INSTALL NEWS ChangeLog \ |
1581 |
- conf/zabbix_agentd.conf \ |
1582 |
- conf/zabbix_proxy.conf \ |
1583 |
- conf/zabbix_agentd/userparameter_examples.conf \ |
1584 |
- conf/zabbix_agentd/userparameter_mysql.conf \ |
1585 |
- conf/zabbix_server.conf |
1586 |
- |
1587 |
- if use frontend; then |
1588 |
- webapp_src_preinst |
1589 |
- cp -R ui/* "${D}/${MY_HTDOCSDIR}" |
1590 |
- webapp_configfile \ |
1591 |
- "${MY_HTDOCSDIR}"/include/db.inc.php \ |
1592 |
- "${MY_HTDOCSDIR}"/include/config.inc.php |
1593 |
- webapp_src_install |
1594 |
- fi |
1595 |
- |
1596 |
- if use java; then |
1597 |
- dodir \ |
1598 |
- /${ZABBIXJAVA_BASE} \ |
1599 |
- /${ZABBIXJAVA_BASE}/bin \ |
1600 |
- /${ZABBIXJAVA_BASE}/lib |
1601 |
- keepdir /${ZABBIXJAVA_BASE} |
1602 |
- exeinto /${ZABBIXJAVA_BASE}/bin |
1603 |
- doexe src/zabbix_java/bin/zabbix-java-gateway-"${MY_PV}".jar |
1604 |
- exeinto /${ZABBIXJAVA_BASE}/lib |
1605 |
- doexe \ |
1606 |
- src/zabbix_java/lib/logback-classic-1.2.9.jar \ |
1607 |
- src/zabbix_java/lib/logback-console.xml \ |
1608 |
- src/zabbix_java/lib/logback-core-1.2.9.jar \ |
1609 |
- src/zabbix_java/lib/logback.xml \ |
1610 |
- src/zabbix_java/lib/android-json-4.3_r3.1.jar \ |
1611 |
- src/zabbix_java/lib/slf4j-api-1.7.32.jar |
1612 |
- newinitd "${FILESDIR}"/zabbix-jmx-proxy.init zabbix-jmx-proxy |
1613 |
- newconfd "${FILESDIR}"/zabbix-jmx-proxy.conf zabbix-jmx-proxy |
1614 |
- fi |
1615 |
-} |
1616 |
- |
1617 |
-pkg_postinst() { |
1618 |
- if use server || use proxy ; then |
1619 |
- elog |
1620 |
- elog "You may need to configure your database for Zabbix" |
1621 |
- elog "if you have not already done so." |
1622 |
- elog |
1623 |
- |
1624 |
- zabbix_homedir=$(egethome zabbix) |
1625 |
- if [ -n "${zabbix_homedir}" ] && \ |
1626 |
- [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then |
1627 |
- ewarn |
1628 |
- ewarn "The user 'zabbix' should have his homedir changed" |
1629 |
- ewarn "to /var/lib/zabbix/home if you want to use" |
1630 |
- ewarn "custom alert scripts." |
1631 |
- ewarn |
1632 |
- ewarn "A real homedir might be needed for configfiles" |
1633 |
- ewarn "for custom alert scripts." |
1634 |
- ewarn |
1635 |
- ewarn "To change the homedir use:" |
1636 |
- ewarn " usermod -d /var/lib/zabbix/home zabbix" |
1637 |
- ewarn |
1638 |
- fi |
1639 |
- fi |
1640 |
- |
1641 |
- if use server; then |
1642 |
- tmpfiles_process zabbix-server.conf |
1643 |
- |
1644 |
- elog |
1645 |
- elog "For distributed monitoring you have to run:" |
1646 |
- elog |
1647 |
- elog "zabbix_server -n <nodeid>" |
1648 |
- elog |
1649 |
- elog "This will convert database data for use with Node ID" |
1650 |
- elog "and also adds a local node." |
1651 |
- elog |
1652 |
- |
1653 |
- if ! use pcre2; then |
1654 |
- ewarn "You are using zabbix with dev-libs/libpcre which is deprecated." |
1655 |
- ewarn "Consider switching to dev-libs/libpcre2 (USE=pcre2) as soon as possible." |
1656 |
- ewarn "See https://www.zabbix.com/documentation/6.0/en/manual/installation/upgrade_notes_600#pcre2-support" |
1657 |
- fi |
1658 |
- fi |
1659 |
- |
1660 |
- if use proxy; then |
1661 |
- tmpfiles_process zabbix-proxy.conf |
1662 |
- fi |
1663 |
- |
1664 |
- if use agent; then |
1665 |
- tmpfiles_process zabbix-agentd.conf |
1666 |
- fi |
1667 |
- |
1668 |
- if use agent2; then |
1669 |
- tmpfiles_process zabbix-agent2.conf |
1670 |
- fi |
1671 |
- |
1672 |
- elog "--" |
1673 |
- elog |
1674 |
- elog "You may need to add these lines to /etc/services:" |
1675 |
- elog |
1676 |
- elog "zabbix-agent 10050/tcp Zabbix Agent" |
1677 |
- elog "zabbix-agent 10050/udp Zabbix Agent" |
1678 |
- elog "zabbix-trapper 10051/tcp Zabbix Trapper" |
1679 |
- elog "zabbix-trapper 10051/udp Zabbix Trapper" |
1680 |
- elog |
1681 |
- |
1682 |
- if use server || use proxy ; then |
1683 |
- # check for fping |
1684 |
- fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) |
1685 |
- case "${fping_perms}" in |
1686 |
- 4[157][157][157]) |
1687 |
- ;; |
1688 |
- *) |
1689 |
- ewarn |
1690 |
- ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," |
1691 |
- ewarn "you have to make /usr/sbin/fping setuid root and executable" |
1692 |
- ewarn "by everyone. Run the following command to fix it:" |
1693 |
- ewarn |
1694 |
- ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" |
1695 |
- ewarn |
1696 |
- ewarn "Please be aware that this might impose a security risk," |
1697 |
- ewarn "depending on the code quality of fping." |
1698 |
- ewarn |
1699 |
- ;; |
1700 |
- esac |
1701 |
- fi |
1702 |
-} |
1703 |
- |
1704 |
-pkg_prerm() { |
1705 |
- (use frontend || use server) && webapp_pkg_prerm |
1706 |
-} |
1707 |
|
1708 |
diff --git a/net-analyzer/zabbix/zabbix-6.2.5.ebuild b/net-analyzer/zabbix/zabbix-6.2.5.ebuild |
1709 |
deleted file mode 100644 |
1710 |
index 961445bff7c3..000000000000 |
1711 |
--- a/net-analyzer/zabbix/zabbix-6.2.5.ebuild |
1712 |
+++ /dev/null |
1713 |
@@ -1,397 +0,0 @@ |
1714 |
-# Copyright 1999-2022 Gentoo Authors |
1715 |
-# Distributed under the terms of the GNU General Public License v2 |
1716 |
- |
1717 |
-# To create the go modules tarball: |
1718 |
-# cd src/go |
1719 |
-# GOMODCACHE="${PWD}"/go-mod go mod download -modcacherw |
1720 |
-# tar -acf zabbix-${PV}-go-deps.tar.xz go-mod |
1721 |
- |
1722 |
-EAPI=8 |
1723 |
- |
1724 |
-GO_OPTIONAL="yes" |
1725 |
-# needed to make webapp-config dep optional |
1726 |
-WEBAPP_OPTIONAL="yes" |
1727 |
-inherit webapp java-pkg-opt-2 systemd tmpfiles toolchain-funcs go-module user-info |
1728 |
- |
1729 |
-DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers" |
1730 |
-HOMEPAGE="https://www.zabbix.com/" |
1731 |
-MY_P=${P/_/} |
1732 |
-MY_PV=${PV/_/} |
1733 |
-SRC_URI="https://cdn.zabbix.com/${PN}/sources/stable/$(ver_cut 1-2)/${P}.tar.gz |
1734 |
- agent2? ( https://dev.gentoo.org/~fordfrog/distfiles/${P}-go-deps.tar.xz ) |
1735 |
-" |
1736 |
- |
1737 |
-LICENSE="GPL-2" |
1738 |
-SLOT="0/$(ver_cut 1-2)" |
1739 |
-WEBAPP_MANUAL_SLOT="yes" |
1740 |
-KEYWORDS="~amd64 ~x86" |
1741 |
-IUSE="agent +agent2 curl frontend gnutls ipv6 java ldap libxml2 mysql odbc openipmi +openssl oracle +postgres proxy server snmp sqlite ssh static" |
1742 |
-REQUIRED_USE="|| ( agent agent2 frontend proxy server ) |
1743 |
- ?? ( gnutls openssl ) |
1744 |
- proxy? ( ^^ ( mysql oracle postgres sqlite ) ) |
1745 |
- server? ( ^^ ( mysql oracle postgres ) !sqlite ) |
1746 |
- static? ( !oracle !snmp )" |
1747 |
- |
1748 |
-COMMON_DEPEND=" |
1749 |
- curl? ( net-misc/curl ) |
1750 |
- gnutls? ( net-libs/gnutls:0= ) |
1751 |
- java? ( >=virtual/jdk-1.8:* ) |
1752 |
- ldap? ( |
1753 |
- =dev-libs/cyrus-sasl-2* |
1754 |
- net-libs/gnutls:= |
1755 |
- net-nds/openldap:= |
1756 |
- ) |
1757 |
- libxml2? ( dev-libs/libxml2 ) |
1758 |
- mysql? ( dev-db/mysql-connector-c:= ) |
1759 |
- odbc? ( dev-db/unixODBC ) |
1760 |
- openipmi? ( sys-libs/openipmi ) |
1761 |
- openssl? ( dev-libs/openssl:=[-bindist(-)] ) |
1762 |
- oracle? ( dev-db/oracle-instantclient[odbc,sdk] ) |
1763 |
- postgres? ( dev-db/postgresql:* ) |
1764 |
- proxy? ( |
1765 |
- dev-libs/libevent:= |
1766 |
- sys-libs/zlib |
1767 |
- ) |
1768 |
- server? ( |
1769 |
- dev-libs/libevent:= |
1770 |
- sys-libs/zlib |
1771 |
- ) |
1772 |
- snmp? ( net-analyzer/net-snmp:= ) |
1773 |
- sqlite? ( dev-db/sqlite ) |
1774 |
- ssh? ( net-libs/libssh2 ) |
1775 |
-" |
1776 |
- |
1777 |
-RDEPEND="${COMMON_DEPEND} |
1778 |
- acct-group/zabbix |
1779 |
- acct-user/zabbix |
1780 |
- java? ( >=virtual/jre-1.8:* ) |
1781 |
- mysql? ( virtual/mysql ) |
1782 |
- proxy? ( |
1783 |
- dev-libs/libpcre2:= |
1784 |
- net-analyzer/fping[suid] |
1785 |
- ) |
1786 |
- server? ( |
1787 |
- app-admin/webapp-config |
1788 |
- dev-libs/libpcre2:= |
1789 |
- net-analyzer/fping[suid] |
1790 |
- ) |
1791 |
- frontend? ( |
1792 |
- app-admin/webapp-config |
1793 |
- dev-lang/php:*[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode] |
1794 |
- media-libs/gd[png] |
1795 |
- virtual/httpd-php:* |
1796 |
- mysql? ( dev-lang/php[mysqli] ) |
1797 |
- odbc? ( dev-lang/php[odbc] ) |
1798 |
- oracle? ( dev-lang/php[oci8-instant-client] ) |
1799 |
- postgres? ( dev-lang/php[postgres] ) |
1800 |
- sqlite? ( dev-lang/php[sqlite] ) |
1801 |
- ) |
1802 |
-" |
1803 |
-DEPEND="${COMMON_DEPEND} |
1804 |
- static? ( |
1805 |
- curl? ( net-misc/curl[static-libs] ) |
1806 |
- ldap? ( |
1807 |
- =dev-libs/cyrus-sasl-2*[static-libs] |
1808 |
- net-libs/gnutls[static-libs] |
1809 |
- net-nds/openldap[static-libs] |
1810 |
- ) |
1811 |
- libxml2? ( dev-libs/libxml2[static-libs] ) |
1812 |
- mysql? ( dev-db/mysql-connector-c[static-libs] ) |
1813 |
- odbc? ( dev-db/unixODBC[static-libs] ) |
1814 |
- postgres? ( dev-db/postgresql:*[static-libs] ) |
1815 |
- sqlite? ( dev-db/sqlite[static-libs] ) |
1816 |
- ssh? ( net-libs/libssh2 ) |
1817 |
- ) |
1818 |
-" |
1819 |
-BDEPEND=" |
1820 |
- virtual/pkgconfig |
1821 |
- agent2? ( |
1822 |
- >=dev-lang/go-1.12 |
1823 |
- app-arch/unzip |
1824 |
- ) |
1825 |
-" |
1826 |
- |
1827 |
-# upstream tests fail for agent2 |
1828 |
-RESTRICT="test" |
1829 |
- |
1830 |
-PATCHES=( |
1831 |
- "${FILESDIR}/${PN}-4.0.18-modulepathfix.patch" |
1832 |
- "${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch" |
1833 |
- "${FILESDIR}/${PN}-6.0.3-system.sw.packages.patch" |
1834 |
-) |
1835 |
- |
1836 |
-S=${WORKDIR}/${MY_P} |
1837 |
- |
1838 |
-ZABBIXJAVA_BASE="opt/zabbix_java" |
1839 |
- |
1840 |
-pkg_setup() { |
1841 |
- if use oracle; then |
1842 |
- if [ -z "${ORACLE_HOME}" ]; then |
1843 |
- eerror |
1844 |
- eerror "The environment variable ORACLE_HOME must be set" |
1845 |
- eerror "and point to the correct location." |
1846 |
- eerror "It looks like you don't have Oracle installed." |
1847 |
- eerror |
1848 |
- die "Environment variable ORACLE_HOME is not set" |
1849 |
- fi |
1850 |
- fi |
1851 |
- |
1852 |
- if use frontend; then |
1853 |
- webapp_pkg_setup |
1854 |
- fi |
1855 |
- |
1856 |
- java-pkg-opt-2_pkg_setup |
1857 |
-} |
1858 |
- |
1859 |
-src_configure() { |
1860 |
- local econf_args=( |
1861 |
- --with-libpcre2 |
1862 |
- "$(use_enable agent)" |
1863 |
- "$(use_enable agent2)" |
1864 |
- "$(use_enable ipv6)" |
1865 |
- "$(use_enable java)" |
1866 |
- "$(use_enable proxy)" |
1867 |
- "$(use_enable server)" |
1868 |
- "$(use_enable static)" |
1869 |
- "$(use_with curl libcurl)" |
1870 |
- "$(use_with gnutls)" |
1871 |
- "$(use_with ldap)" |
1872 |
- "$(use_with libxml2)" |
1873 |
- "$(use_with mysql)" |
1874 |
- "$(use_with odbc unixodbc)" |
1875 |
- "$(use_with openipmi openipmi)" |
1876 |
- "$(use_with openssl)" |
1877 |
- "$(use_with oracle)" |
1878 |
- "$(use_with postgres postgresql)" |
1879 |
- "$(use_with snmp net-snmp)" |
1880 |
- "$(use_with sqlite sqlite3)" |
1881 |
- "$(use_with ssh ssh2)" |
1882 |
- ) |
1883 |
- |
1884 |
- econf ${econf_args[@]} |
1885 |
-} |
1886 |
- |
1887 |
-src_compile() { |
1888 |
- if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then |
1889 |
- emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" |
1890 |
- fi |
1891 |
-} |
1892 |
- |
1893 |
-src_install() { |
1894 |
- local dirs=( |
1895 |
- /etc/zabbix |
1896 |
- /var/lib/zabbix |
1897 |
- /var/lib/zabbix/home |
1898 |
- /var/lib/zabbix/scripts |
1899 |
- /var/lib/zabbix/alertscripts |
1900 |
- /var/lib/zabbix/externalscripts |
1901 |
- /var/log/zabbix |
1902 |
- ) |
1903 |
- |
1904 |
- for dir in "${dirs[@]}"; do |
1905 |
- keepdir "${dir}" |
1906 |
- done |
1907 |
- |
1908 |
- if use server; then |
1909 |
- insinto /etc/zabbix |
1910 |
- doins "${S}"/conf/zabbix_server.conf |
1911 |
- fperms 0640 /etc/zabbix/zabbix_server.conf |
1912 |
- fowners root:zabbix /etc/zabbix/zabbix_server.conf |
1913 |
- |
1914 |
- newinitd "${FILESDIR}"/zabbix-server-r1.init zabbix-server |
1915 |
- |
1916 |
- dosbin src/zabbix_server/zabbix_server |
1917 |
- |
1918 |
- insinto /usr/share/zabbix |
1919 |
- doins -r "${S}"/database/ |
1920 |
- |
1921 |
- systemd_dounit "${FILESDIR}"/zabbix-server.service |
1922 |
- newtmpfiles "${FILESDIR}"/zabbix-server.tmpfiles zabbix-server.conf |
1923 |
- fi |
1924 |
- |
1925 |
- if use proxy; then |
1926 |
- insinto /etc/zabbix |
1927 |
- doins "${S}"/conf/zabbix_proxy.conf |
1928 |
- fperms 0640 /etc/zabbix/zabbix_proxy.conf |
1929 |
- fowners root:zabbix /etc/zabbix/zabbix_proxy.conf |
1930 |
- |
1931 |
- newinitd "${FILESDIR}"/zabbix-proxy.init zabbix-proxy |
1932 |
- |
1933 |
- dosbin src/zabbix_proxy/zabbix_proxy |
1934 |
- |
1935 |
- insinto /usr/share/zabbix |
1936 |
- doins -r "${S}"/database/ |
1937 |
- |
1938 |
- systemd_dounit "${FILESDIR}"/zabbix-proxy.service |
1939 |
- newtmpfiles "${FILESDIR}"/zabbix-proxy.tmpfiles zabbix-proxy.conf |
1940 |
- fi |
1941 |
- |
1942 |
- if use agent; then |
1943 |
- insinto /etc/zabbix |
1944 |
- doins "${S}"/conf/zabbix_agentd.conf |
1945 |
- fperms 0640 /etc/zabbix/zabbix_agentd.conf |
1946 |
- fowners root:zabbix /etc/zabbix/zabbix_agentd.conf |
1947 |
- |
1948 |
- newinitd "${FILESDIR}"/zabbix-agentd.init zabbix-agentd |
1949 |
- |
1950 |
- dosbin src/zabbix_agent/zabbix_agentd |
1951 |
- dobin \ |
1952 |
- src/zabbix_sender/zabbix_sender \ |
1953 |
- src/zabbix_get/zabbix_get |
1954 |
- |
1955 |
- systemd_dounit "${FILESDIR}"/zabbix-agentd.service |
1956 |
- newtmpfiles "${FILESDIR}"/zabbix-agentd.tmpfiles zabbix-agentd.conf |
1957 |
- fi |
1958 |
- if use agent2; then |
1959 |
- insinto /etc/zabbix |
1960 |
- doins "${S}"/src/go/conf/zabbix_agent2.conf |
1961 |
- fperms 0640 /etc/zabbix/zabbix_agent2.conf |
1962 |
- fowners root:zabbix /etc/zabbix/zabbix_agent2.conf |
1963 |
- keepdir /etc/zabbix/zabbix_agent2.d/plugins.d |
1964 |
- |
1965 |
- newinitd "${FILESDIR}"/zabbix-agent2.init zabbix-agent2 |
1966 |
- |
1967 |
- dosbin src/go/bin/zabbix_agent2 |
1968 |
- |
1969 |
- systemd_dounit "${FILESDIR}"/zabbix-agent2.service |
1970 |
- newtmpfiles "${FILESDIR}"/zabbix-agent2.tmpfiles zabbix-agent2.conf |
1971 |
- fi |
1972 |
- |
1973 |
- fowners root:zabbix /etc/zabbix |
1974 |
- fowners zabbix:zabbix \ |
1975 |
- /var/lib/zabbix \ |
1976 |
- /var/lib/zabbix/home \ |
1977 |
- /var/lib/zabbix/scripts \ |
1978 |
- /var/lib/zabbix/alertscripts \ |
1979 |
- /var/lib/zabbix/externalscripts \ |
1980 |
- /var/log/zabbix |
1981 |
- fperms 0750 \ |
1982 |
- /etc/zabbix \ |
1983 |
- /var/lib/zabbix \ |
1984 |
- /var/lib/zabbix/home \ |
1985 |
- /var/lib/zabbix/scripts \ |
1986 |
- /var/lib/zabbix/alertscripts \ |
1987 |
- /var/lib/zabbix/externalscripts \ |
1988 |
- /var/log/zabbix |
1989 |
- |
1990 |
- dodoc README INSTALL NEWS ChangeLog \ |
1991 |
- conf/zabbix_agentd.conf \ |
1992 |
- conf/zabbix_proxy.conf \ |
1993 |
- conf/zabbix_agentd/userparameter_examples.conf \ |
1994 |
- conf/zabbix_agentd/userparameter_mysql.conf \ |
1995 |
- conf/zabbix_server.conf |
1996 |
- |
1997 |
- if use frontend; then |
1998 |
- webapp_src_preinst |
1999 |
- cp -R ui/* "${D}/${MY_HTDOCSDIR}" |
2000 |
- webapp_configfile \ |
2001 |
- "${MY_HTDOCSDIR}"/include/db.inc.php \ |
2002 |
- "${MY_HTDOCSDIR}"/include/config.inc.php |
2003 |
- webapp_src_install |
2004 |
- fi |
2005 |
- |
2006 |
- if use java; then |
2007 |
- dodir \ |
2008 |
- /${ZABBIXJAVA_BASE} \ |
2009 |
- /${ZABBIXJAVA_BASE}/bin \ |
2010 |
- /${ZABBIXJAVA_BASE}/lib |
2011 |
- keepdir /${ZABBIXJAVA_BASE} |
2012 |
- exeinto /${ZABBIXJAVA_BASE}/bin |
2013 |
- doexe src/zabbix_java/bin/zabbix-java-gateway-"${MY_PV}".jar |
2014 |
- exeinto /${ZABBIXJAVA_BASE}/lib |
2015 |
- doexe \ |
2016 |
- src/zabbix_java/lib/logback-classic-1.2.9.jar \ |
2017 |
- src/zabbix_java/lib/logback-console.xml \ |
2018 |
- src/zabbix_java/lib/logback-core-1.2.9.jar \ |
2019 |
- src/zabbix_java/lib/logback.xml \ |
2020 |
- src/zabbix_java/lib/android-json-4.3_r3.1.jar \ |
2021 |
- src/zabbix_java/lib/slf4j-api-1.7.32.jar |
2022 |
- newinitd "${FILESDIR}"/zabbix-jmx-proxy.init zabbix-jmx-proxy |
2023 |
- newconfd "${FILESDIR}"/zabbix-jmx-proxy.conf zabbix-jmx-proxy |
2024 |
- fi |
2025 |
-} |
2026 |
- |
2027 |
-pkg_postinst() { |
2028 |
- if use server || use proxy ; then |
2029 |
- elog |
2030 |
- elog "You may need to configure your database for Zabbix" |
2031 |
- elog "if you have not already done so." |
2032 |
- elog |
2033 |
- |
2034 |
- zabbix_homedir=$(egethome zabbix) |
2035 |
- if [ -n "${zabbix_homedir}" ] && \ |
2036 |
- [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then |
2037 |
- ewarn |
2038 |
- ewarn "The user 'zabbix' should have his homedir changed" |
2039 |
- ewarn "to /var/lib/zabbix/home if you want to use" |
2040 |
- ewarn "custom alert scripts." |
2041 |
- ewarn |
2042 |
- ewarn "A real homedir might be needed for configfiles" |
2043 |
- ewarn "for custom alert scripts." |
2044 |
- ewarn |
2045 |
- ewarn "To change the homedir use:" |
2046 |
- ewarn " usermod -d /var/lib/zabbix/home zabbix" |
2047 |
- ewarn |
2048 |
- fi |
2049 |
- fi |
2050 |
- |
2051 |
- if use server; then |
2052 |
- tmpfiles_process zabbix-server.conf |
2053 |
- |
2054 |
- elog |
2055 |
- elog "For distributed monitoring you have to run:" |
2056 |
- elog |
2057 |
- elog "zabbix_server -n <nodeid>" |
2058 |
- elog |
2059 |
- elog "This will convert database data for use with Node ID" |
2060 |
- elog "and also adds a local node." |
2061 |
- elog |
2062 |
- fi |
2063 |
- |
2064 |
- if use proxy; then |
2065 |
- tmpfiles_process zabbix-proxy.conf |
2066 |
- fi |
2067 |
- |
2068 |
- if use agent; then |
2069 |
- tmpfiles_process zabbix-agentd.conf |
2070 |
- fi |
2071 |
- |
2072 |
- if use agent2; then |
2073 |
- tmpfiles_process zabbix-agent2.conf |
2074 |
- fi |
2075 |
- |
2076 |
- elog "--" |
2077 |
- elog |
2078 |
- elog "You may need to add these lines to /etc/services:" |
2079 |
- elog |
2080 |
- elog "zabbix-agent 10050/tcp Zabbix Agent" |
2081 |
- elog "zabbix-agent 10050/udp Zabbix Agent" |
2082 |
- elog "zabbix-trapper 10051/tcp Zabbix Trapper" |
2083 |
- elog "zabbix-trapper 10051/udp Zabbix Trapper" |
2084 |
- elog |
2085 |
- |
2086 |
- if use server || use proxy ; then |
2087 |
- # check for fping |
2088 |
- fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) |
2089 |
- case "${fping_perms}" in |
2090 |
- 4[157][157][157]) |
2091 |
- ;; |
2092 |
- *) |
2093 |
- ewarn |
2094 |
- ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," |
2095 |
- ewarn "you have to make /usr/sbin/fping setuid root and executable" |
2096 |
- ewarn "by everyone. Run the following command to fix it:" |
2097 |
- ewarn |
2098 |
- ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" |
2099 |
- ewarn |
2100 |
- ewarn "Please be aware that this might impose a security risk," |
2101 |
- ewarn "depending on the code quality of fping." |
2102 |
- ewarn |
2103 |
- ;; |
2104 |
- esac |
2105 |
- fi |
2106 |
-} |
2107 |
- |
2108 |
-pkg_prerm() { |
2109 |
- (use frontend || use server) && webapp_pkg_prerm |
2110 |
-} |