1 |
commit: b5a6e082349adea21e3a5d416eac8f7e491d5c2a |
2 |
Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 5 14:26:41 2020 +0000 |
4 |
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 5 14:26:41 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5a6e082 |
7 |
|
8 |
net-analyzer/zabbix: removed vulnerable 3.0.31 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/733118 |
11 |
Package-Manager: Portage-3.0.1, Repoman-2.3.23 |
12 |
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org> |
13 |
|
14 |
net-analyzer/zabbix/zabbix-3.0.31.ebuild | 350 ------------------------------- |
15 |
1 file changed, 350 deletions(-) |
16 |
|
17 |
diff --git a/net-analyzer/zabbix/zabbix-3.0.31.ebuild b/net-analyzer/zabbix/zabbix-3.0.31.ebuild |
18 |
deleted file mode 100644 |
19 |
index ca1bbd3d949..00000000000 |
20 |
--- a/net-analyzer/zabbix/zabbix-3.0.31.ebuild |
21 |
+++ /dev/null |
22 |
@@ -1,350 +0,0 @@ |
23 |
-# Copyright 1999-2020 Gentoo Authors |
24 |
-# Distributed under the terms of the GNU General Public License v2 |
25 |
- |
26 |
-EAPI=7 |
27 |
- |
28 |
-# needed to make webapp-config dep optional |
29 |
-WEBAPP_OPTIONAL="yes" |
30 |
-inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs |
31 |
- |
32 |
-DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers" |
33 |
-HOMEPAGE="https://www.zabbix.com/" |
34 |
-MY_P=${P/_/} |
35 |
-MY_PV=${PV/_/} |
36 |
-SRC_URI="https://cdn.zabbix.com/stable/${PV}/${P}.tar.gz" |
37 |
-LICENSE="GPL-2" |
38 |
-SLOT="0" |
39 |
-WEBAPP_MANUAL_SLOT="yes" |
40 |
-KEYWORDS="amd64 x86" |
41 |
-IUSE="+agent java curl frontend ipv6 xmpp ldap libxml2 mysql openipmi oracle +postgres proxy server ssh ssl snmp sqlite odbc static" |
42 |
-REQUIRED_USE="|| ( agent frontend proxy server ) |
43 |
- proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) ) |
44 |
- server? ( ^^ ( mysql oracle postgres odbc ) ) |
45 |
- static? ( !oracle !snmp )" |
46 |
- |
47 |
-COMMON_DEPEND=" |
48 |
- curl? ( net-misc/curl ) |
49 |
- java? ( >=virtual/jdk-1.8:* ) |
50 |
- ldap? ( |
51 |
- =dev-libs/cyrus-sasl-2* |
52 |
- net-libs/gnutls |
53 |
- net-nds/openldap |
54 |
- ) |
55 |
- libxml2? ( dev-libs/libxml2 ) |
56 |
- mysql? ( dev-db/mysql-connector-c ) |
57 |
- odbc? ( dev-db/unixODBC ) |
58 |
- openipmi? ( sys-libs/openipmi ) |
59 |
- oracle? ( dev-db/oracle-instantclient-basic ) |
60 |
- postgres? ( dev-db/postgresql:* ) |
61 |
- proxy? ( sys-libs/zlib ) |
62 |
- server? ( |
63 |
- dev-libs/libevent |
64 |
- sys-libs/zlib |
65 |
- ) |
66 |
- snmp? ( net-analyzer/net-snmp ) |
67 |
- sqlite? ( dev-db/sqlite ) |
68 |
- ssh? ( net-libs/libssh2 ) |
69 |
- ssl? ( dev-libs/openssl:=[-bindist] ) |
70 |
- xmpp? ( dev-libs/iksemel ) |
71 |
-" |
72 |
- |
73 |
-RDEPEND="${COMMON_DEPEND} |
74 |
- java? ( >=virtual/jre-1.8:* ) |
75 |
- mysql? ( virtual/mysql ) |
76 |
- proxy? ( net-analyzer/fping[suid] ) |
77 |
- server? ( |
78 |
- app-admin/webapp-config |
79 |
- dev-libs/libevent |
80 |
- dev-libs/libpcre |
81 |
- net-analyzer/fping[suid] |
82 |
- ) |
83 |
- frontend? ( |
84 |
- app-admin/webapp-config |
85 |
- dev-lang/php:*[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode] |
86 |
- media-libs/gd[png] |
87 |
- virtual/httpd-php:* |
88 |
- mysql? ( dev-lang/php[mysqli] ) |
89 |
- odbc? ( dev-lang/php[odbc] ) |
90 |
- oracle? ( dev-lang/php[oci8-instant-client] ) |
91 |
- postgres? ( dev-lang/php[postgres] ) |
92 |
- sqlite? ( dev-lang/php[sqlite] ) |
93 |
- ) |
94 |
-" |
95 |
-DEPEND="${COMMON_DEPEND} |
96 |
- static? ( |
97 |
- curl? ( net-misc/curl[static-libs] ) |
98 |
- ldap? ( |
99 |
- =dev-libs/cyrus-sasl-2*[static-libs] |
100 |
- net-libs/gnutls[static-libs] |
101 |
- net-nds/openldap[static-libs] |
102 |
- ) |
103 |
- libxml2? ( dev-libs/libxml2[static-libs] ) |
104 |
- mysql? ( dev-db/mysql-connector-c[static-libs] ) |
105 |
- odbc? ( dev-db/unixODBC[static-libs] ) |
106 |
- postgres? ( dev-db/postgresql:*[static-libs] ) |
107 |
- sqlite? ( dev-db/sqlite[static-libs] ) |
108 |
- ssh? ( net-libs/libssh2 ) |
109 |
- ) |
110 |
-" |
111 |
-BDEPEND=" |
112 |
- virtual/pkgconfig |
113 |
-" |
114 |
- |
115 |
-PATCHES=( |
116 |
- "${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch" |
117 |
- "${FILESDIR}/${PN}-3.0.30-mysql8.patch" |
118 |
-) |
119 |
- |
120 |
-S=${WORKDIR}/${MY_P} |
121 |
- |
122 |
-ZABBIXJAVA_BASE="opt/zabbix_java" |
123 |
- |
124 |
-pkg_setup() { |
125 |
- if use oracle; then |
126 |
- if [ -z "${ORACLE_HOME}" ]; then |
127 |
- eerror |
128 |
- eerror "The environment variable ORACLE_HOME must be set" |
129 |
- eerror "and point to the correct location." |
130 |
- eerror "It looks like you don't have Oracle installed." |
131 |
- eerror |
132 |
- die "Environment variable ORACLE_HOME is not set" |
133 |
- fi |
134 |
- if has_version 'dev-db/oracle-instantclient-basic'; then |
135 |
- ewarn |
136 |
- ewarn "Please ensure you have a full install of the Oracle client." |
137 |
- ewarn "dev-db/oracle-instantclient* is NOT sufficient." |
138 |
- ewarn |
139 |
- fi |
140 |
- fi |
141 |
- |
142 |
- if use frontend; then |
143 |
- webapp_pkg_setup |
144 |
- fi |
145 |
- |
146 |
- enewgroup zabbix |
147 |
- enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix |
148 |
- |
149 |
- java-pkg-opt-2_pkg_setup |
150 |
-} |
151 |
- |
152 |
-src_prepare() { |
153 |
- default |
154 |
-} |
155 |
- |
156 |
-src_configure() { |
157 |
- econf \ |
158 |
- $(use_enable agent) \ |
159 |
- $(use_enable ipv6) \ |
160 |
- $(use_enable java) \ |
161 |
- $(use_enable proxy) \ |
162 |
- $(use_enable server) \ |
163 |
- $(use_enable static) \ |
164 |
- $(use_with curl libcurl) \ |
165 |
- $(use_with ldap) \ |
166 |
- $(use_with libxml2) \ |
167 |
- $(use_with mysql) \ |
168 |
- $(use_with odbc unixodbc) \ |
169 |
- $(use_with openipmi openipmi) \ |
170 |
- $(use_with oracle) \ |
171 |
- $(use_with postgres postgresql) \ |
172 |
- $(use_with snmp net-snmp) \ |
173 |
- $(use_with sqlite sqlite3) \ |
174 |
- $(use_with ssh ssh2) \ |
175 |
- $(use_with ssl openssl) \ |
176 |
- $(use_with xmpp jabber) |
177 |
-} |
178 |
- |
179 |
-src_compile() { |
180 |
- if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then |
181 |
- emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" |
182 |
- fi |
183 |
-} |
184 |
- |
185 |
-src_install() { |
186 |
- local dirs=( |
187 |
- /etc/zabbix |
188 |
- /var/lib/zabbix |
189 |
- /var/lib/zabbix/home |
190 |
- /var/lib/zabbix/scripts |
191 |
- /var/lib/zabbix/alertscripts |
192 |
- /var/lib/zabbix/externalscripts |
193 |
- /var/log/zabbix |
194 |
- ) |
195 |
- |
196 |
- for dir in "${dirs[@]}"; do |
197 |
- dodir "${dir}" |
198 |
- keepdir "${dir}" |
199 |
- done |
200 |
- |
201 |
- if use server; then |
202 |
- insinto /etc/zabbix |
203 |
- doins "${S}"/conf/zabbix_server.conf |
204 |
- fperms 0640 /etc/zabbix/zabbix_server.conf |
205 |
- fowners root:zabbix /etc/zabbix/zabbix_server.conf |
206 |
- |
207 |
- newinitd "${FILESDIR}"/zabbix-server.init zabbix-server |
208 |
- |
209 |
- dosbin src/zabbix_server/zabbix_server |
210 |
- |
211 |
- insinto /usr/share/zabbix |
212 |
- doins -r "${S}"/database/ |
213 |
- |
214 |
- systemd_dounit "${FILESDIR}"/zabbix-server.service |
215 |
- systemd_newtmpfilesd "${FILESDIR}"/zabbix-server.tmpfiles zabbix-server.conf |
216 |
- fi |
217 |
- |
218 |
- if use proxy; then |
219 |
- insinto /etc/zabbix |
220 |
- doins "${S}"/conf/zabbix_proxy.conf |
221 |
- fperms 0640 /etc/zabbix/zabbix_proxy.conf |
222 |
- fowners root:zabbix /etc/zabbix/zabbix_proxy.conf |
223 |
- |
224 |
- newinitd "${FILESDIR}"/zabbix-proxy.init zabbix-proxy |
225 |
- |
226 |
- dosbin src/zabbix_proxy/zabbix_proxy |
227 |
- |
228 |
- insinto /usr/share/zabbix |
229 |
- doins -r "${S}"/database/ |
230 |
- |
231 |
- systemd_dounit "${FILESDIR}"/zabbix-proxy.service |
232 |
- systemd_newtmpfilesd "${FILESDIR}"/zabbix-proxy.tmpfiles zabbix-proxy.conf |
233 |
- fi |
234 |
- |
235 |
- if use agent; then |
236 |
- insinto /etc/zabbix |
237 |
- doins "${S}"/conf/zabbix_agentd.conf |
238 |
- fperms 0640 /etc/zabbix/zabbix_agentd.conf |
239 |
- fowners root:zabbix /etc/zabbix/zabbix_agentd.conf |
240 |
- |
241 |
- newinitd "${FILESDIR}"/zabbix-agentd.init zabbix-agentd |
242 |
- |
243 |
- dosbin src/zabbix_agent/zabbix_agentd |
244 |
- dobin \ |
245 |
- src/zabbix_sender/zabbix_sender \ |
246 |
- src/zabbix_get/zabbix_get |
247 |
- |
248 |
- systemd_dounit "${FILESDIR}"/zabbix-agentd.service |
249 |
- systemd_newtmpfilesd "${FILESDIR}"/zabbix-agentd.tmpfiles zabbix-agentd.conf |
250 |
- fi |
251 |
- |
252 |
- fowners root:zabbix /etc/zabbix |
253 |
- fowners zabbix:zabbix \ |
254 |
- /var/lib/zabbix \ |
255 |
- /var/lib/zabbix/home \ |
256 |
- /var/lib/zabbix/scripts \ |
257 |
- /var/lib/zabbix/alertscripts \ |
258 |
- /var/lib/zabbix/externalscripts \ |
259 |
- /var/log/zabbix |
260 |
- fperms 0750 \ |
261 |
- /etc/zabbix \ |
262 |
- /var/lib/zabbix \ |
263 |
- /var/lib/zabbix/home \ |
264 |
- /var/lib/zabbix/scripts \ |
265 |
- /var/lib/zabbix/alertscripts \ |
266 |
- /var/lib/zabbix/externalscripts \ |
267 |
- /var/log/zabbix |
268 |
- |
269 |
- dodoc README INSTALL NEWS ChangeLog \ |
270 |
- conf/zabbix_agentd.conf \ |
271 |
- conf/zabbix_proxy.conf \ |
272 |
- conf/zabbix_agentd/userparameter_examples.conf \ |
273 |
- conf/zabbix_agentd/userparameter_mysql.conf \ |
274 |
- conf/zabbix_server.conf |
275 |
- |
276 |
- if use frontend; then |
277 |
- webapp_src_preinst |
278 |
- cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}" |
279 |
- webapp_configfile \ |
280 |
- "${MY_HTDOCSDIR}"/include/db.inc.php \ |
281 |
- "${MY_HTDOCSDIR}"/include/config.inc.php |
282 |
- webapp_src_install |
283 |
- fi |
284 |
- |
285 |
- if use java; then |
286 |
- dodir \ |
287 |
- /${ZABBIXJAVA_BASE} \ |
288 |
- /${ZABBIXJAVA_BASE}/bin \ |
289 |
- /${ZABBIXJAVA_BASE}/lib |
290 |
- keepdir /${ZABBIXJAVA_BASE} |
291 |
- exeinto /${ZABBIXJAVA_BASE}/bin |
292 |
- doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar |
293 |
- exeinto /${ZABBIXJAVA_BASE}/lib |
294 |
- doexe \ |
295 |
- src/zabbix_java/lib/logback-classic-0.9.27.jar \ |
296 |
- src/zabbix_java/lib/logback-console.xml \ |
297 |
- src/zabbix_java/lib/logback-core-0.9.27.jar \ |
298 |
- src/zabbix_java/lib/logback.xml \ |
299 |
- src/zabbix_java/lib/android-json-4.3_r3.1.jar \ |
300 |
- src/zabbix_java/lib/slf4j-api-1.6.1.jar |
301 |
- newinitd "${FILESDIR}"/zabbix-jmx-proxy.init zabbix-jmx-proxy |
302 |
- newconfd "${FILESDIR}"/zabbix-jmx-proxy.conf zabbix-jmx-proxy |
303 |
- fi |
304 |
-} |
305 |
- |
306 |
-pkg_postinst() { |
307 |
- if use server || use proxy ; then |
308 |
- elog |
309 |
- elog "You may need to configure your database for Zabbix" |
310 |
- elog "if you have not already done so." |
311 |
- elog |
312 |
- |
313 |
- zabbix_homedir=$(egethome zabbix) |
314 |
- if [ -n "${zabbix_homedir}" ] && \ |
315 |
- [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then |
316 |
- ewarn |
317 |
- ewarn "The user 'zabbix' should have his homedir changed" |
318 |
- ewarn "to /var/lib/zabbix/home if you want to use" |
319 |
- ewarn "custom alert scripts." |
320 |
- ewarn |
321 |
- ewarn "A real homedir might be needed for configfiles" |
322 |
- ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when" |
323 |
- ewarn "using sendxmpp for Jabber alerts)." |
324 |
- ewarn |
325 |
- ewarn "To change the homedir use:" |
326 |
- ewarn " usermod -d /var/lib/zabbix/home zabbix" |
327 |
- ewarn |
328 |
- fi |
329 |
- fi |
330 |
- |
331 |
- if use server; then |
332 |
- elog |
333 |
- elog "For distributed monitoring you have to run:" |
334 |
- elog |
335 |
- elog "zabbix_server -n <nodeid>" |
336 |
- elog |
337 |
- elog "This will convert database data for use with Node ID" |
338 |
- elog "and also adds a local node." |
339 |
- elog |
340 |
- fi |
341 |
- |
342 |
- elog "--" |
343 |
- elog |
344 |
- elog "You may need to add these lines to /etc/services:" |
345 |
- elog |
346 |
- elog "zabbix-agent 10050/tcp Zabbix Agent" |
347 |
- elog "zabbix-agent 10050/udp Zabbix Agent" |
348 |
- elog "zabbix-trapper 10051/tcp Zabbix Trapper" |
349 |
- elog "zabbix-trapper 10051/udp Zabbix Trapper" |
350 |
- elog |
351 |
- |
352 |
- if use server || use proxy ; then |
353 |
- # check for fping |
354 |
- fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) |
355 |
- case "${fping_perms}" in |
356 |
- 4[157][157][157]) |
357 |
- ;; |
358 |
- *) |
359 |
- ewarn |
360 |
- ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," |
361 |
- ewarn "you have to make /usr/sbin/fping setuid root and executable" |
362 |
- ewarn "by everyone. Run the following command to fix it:" |
363 |
- ewarn |
364 |
- ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" |
365 |
- ewarn |
366 |
- ewarn "Please be aware that this might impose a security risk," |
367 |
- ewarn "depending on the code quality of fping." |
368 |
- ewarn |
369 |
- ;; |
370 |
- esac |
371 |
- fi |
372 |
-} |