1 |
commit: f195b1b01813d1493c0b288c3eac727f54bd7b3e |
2 |
Author: Patrick Lauer <patrick <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 28 13:14:20 2016 +0000 |
4 |
Commit: Patrick Lauer <patrick <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 28 13:14:31 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f195b1b0 |
7 |
|
8 |
net-analyzer/zabbix: fping requires suid useflag to work properly |
9 |
|
10 |
Package-Manager: portage-2.3.2 |
11 |
|
12 |
...bbix-3.2.1-r1.ebuild => zabbix-3.2.1-r2.ebuild} | 4 +- |
13 |
net-analyzer/zabbix/zabbix-3.2.1.ebuild | 332 --------------------- |
14 |
2 files changed, 2 insertions(+), 334 deletions(-) |
15 |
|
16 |
diff --git a/net-analyzer/zabbix/zabbix-3.2.1-r1.ebuild b/net-analyzer/zabbix/zabbix-3.2.1-r2.ebuild |
17 |
similarity index 99% |
18 |
rename from net-analyzer/zabbix/zabbix-3.2.1-r1.ebuild |
19 |
rename to net-analyzer/zabbix/zabbix-3.2.1-r2.ebuild |
20 |
index cc5db77..aaa5b91 100644 |
21 |
--- a/net-analyzer/zabbix/zabbix-3.2.1-r1.ebuild |
22 |
+++ b/net-analyzer/zabbix/zabbix-3.2.1-r2.ebuild |
23 |
@@ -43,8 +43,8 @@ COMMON_DEPEND="snmp? ( net-analyzer/net-snmp ) |
24 |
ssl? ( dev-libs/openssl:=[-bindist] )" |
25 |
|
26 |
RDEPEND="${COMMON_DEPEND} |
27 |
- proxy? ( net-analyzer/fping ) |
28 |
- server? ( net-analyzer/fping |
29 |
+ proxy? ( net-analyzer/fping[suid] ) |
30 |
+ server? ( net-analyzer/fping[suid] |
31 |
app-admin/webapp-config ) |
32 |
java? ( |
33 |
>=virtual/jre-1.4 |
34 |
|
35 |
diff --git a/net-analyzer/zabbix/zabbix-3.2.1.ebuild b/net-analyzer/zabbix/zabbix-3.2.1.ebuild |
36 |
deleted file mode 100644 |
37 |
index 212ccb7..00000000 |
38 |
--- a/net-analyzer/zabbix/zabbix-3.2.1.ebuild |
39 |
+++ /dev/null |
40 |
@@ -1,332 +0,0 @@ |
41 |
-# Copyright 1999-2016 Gentoo Foundation |
42 |
-# Distributed under the terms of the GNU General Public License v2 |
43 |
-# $Id$ |
44 |
- |
45 |
-EAPI="6" |
46 |
- |
47 |
-# needed to make webapp-config dep optional |
48 |
-WEBAPP_OPTIONAL="yes" |
49 |
-inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs |
50 |
- |
51 |
-DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers" |
52 |
-HOMEPAGE="http://www.zabbix.com/" |
53 |
-MY_P=${P/_/} |
54 |
-MY_PV=${PV/_/} |
55 |
-SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz" |
56 |
-LICENSE="GPL-2" |
57 |
-SLOT="0" |
58 |
-WEBAPP_MANUAL_SLOT="yes" |
59 |
-KEYWORDS="~amd64 ~x86" |
60 |
-IUSE="+agent java curl frontend ipv6 xmpp ldap libxml2 mysql openipmi oracle postgres proxy server ssh ssl snmp sqlite odbc static" |
61 |
-REQUIRED_USE="|| ( agent frontend proxy server ) |
62 |
- proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) ) |
63 |
- server? ( ^^ ( mysql oracle postgres sqlite odbc ) ) |
64 |
- static? ( !oracle !snmp )" |
65 |
- |
66 |
-COMMON_DEPEND="snmp? ( net-analyzer/net-snmp ) |
67 |
- ldap? ( |
68 |
- net-nds/openldap |
69 |
- =dev-libs/cyrus-sasl-2* |
70 |
- net-libs/gnutls |
71 |
- ) |
72 |
- mysql? ( >=virtual/mysql-5.0.3 ) |
73 |
- sqlite? ( >=dev-db/sqlite-3.3.5 ) |
74 |
- postgres? ( dev-db/postgresql:* ) |
75 |
- oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 ) |
76 |
- xmpp? ( dev-libs/iksemel ) |
77 |
- libxml2? ( dev-libs/libxml2 ) |
78 |
- curl? ( net-misc/curl ) |
79 |
- openipmi? ( sys-libs/openipmi ) |
80 |
- ssh? ( net-libs/libssh2 ) |
81 |
- java? ( virtual/jdk:* ) |
82 |
- odbc? ( dev-db/unixODBC ) |
83 |
- ssl? ( dev-libs/openssl:=[-bindist] )" |
84 |
- |
85 |
-RDEPEND="${COMMON_DEPEND} |
86 |
- proxy? ( net-analyzer/fping ) |
87 |
- server? ( net-analyzer/fping |
88 |
- app-admin/webapp-config ) |
89 |
- java? ( |
90 |
- >=virtual/jre-1.4 |
91 |
- dev-java/slf4j-api |
92 |
- ) |
93 |
- frontend? ( |
94 |
- >=dev-lang/php-5.3.0[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode] |
95 |
- || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] ) |
96 |
- mysql? ( dev-lang/php[mysqli] ) |
97 |
- odbc? ( dev-lang/php[odbc] ) |
98 |
- oracle? ( dev-lang/php[oci8-instant-client] ) |
99 |
- postgres? ( dev-lang/php[postgres] ) |
100 |
- sqlite? ( dev-lang/php[sqlite] ) |
101 |
- media-libs/gd[png] |
102 |
- app-admin/webapp-config )" |
103 |
-DEPEND="${COMMON_DEPEND} |
104 |
- static? ( |
105 |
- ldap? ( |
106 |
- net-nds/openldap[static-libs] |
107 |
- =dev-libs/cyrus-sasl-2*[static-libs] |
108 |
- net-libs/gnutls[static-libs] |
109 |
- ) |
110 |
- mysql? ( >=virtual/mysql-5.0.3[static-libs] ) |
111 |
- sqlite? ( >=dev-db/sqlite-3.3.5[static-libs] ) |
112 |
- postgres? ( dev-db/postgresql:*[static-libs] ) |
113 |
- libxml2? ( dev-libs/libxml2[static-libs] ) |
114 |
- curl? ( net-misc/curl[static-libs] ) |
115 |
- ssh? ( net-libs/libssh2[static-libs] ) |
116 |
- odbc? ( dev-db/unixODBC[static-libs] ) |
117 |
- ) |
118 |
- virtual/pkgconfig" |
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 |
- |
150 |
-java_prepare() { |
151 |
- cd "${S}/src/zabbix_java/lib" |
152 |
- rm -v *.jar || die |
153 |
- |
154 |
- java-pkg_jar-from slf4j-api |
155 |
-} |
156 |
- |
157 |
-src_prepare() { |
158 |
- default |
159 |
-} |
160 |
- |
161 |
-src_configure() { |
162 |
- econf \ |
163 |
- $(use_enable server) \ |
164 |
- $(use_enable proxy) \ |
165 |
- $(use_enable agent) \ |
166 |
- $(use_enable ipv6) \ |
167 |
- $(use_enable static) \ |
168 |
- $(use_enable java) \ |
169 |
- $(use_with ldap) \ |
170 |
- $(use_with snmp net-snmp) \ |
171 |
- $(use_with mysql) \ |
172 |
- $(use_with postgres postgresql) \ |
173 |
- $(use_with oracle) \ |
174 |
- $(use_with sqlite sqlite3) \ |
175 |
- $(use_with xmpp jabber) \ |
176 |
- $(use_with curl libcurl) \ |
177 |
- $(use_with openipmi openipmi) \ |
178 |
- $(use_with ssh ssh2) \ |
179 |
- $(use_with libxml2) \ |
180 |
- $(use_with odbc unixodbc) \ |
181 |
- $(use_with ssl openssl) \ |
182 |
- || die "econf failed" |
183 |
-} |
184 |
- |
185 |
-src_compile() { |
186 |
- if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then |
187 |
- emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed" |
188 |
- fi |
189 |
-} |
190 |
- |
191 |
-src_install() { |
192 |
- dodir \ |
193 |
- /etc/zabbix \ |
194 |
- /var/lib/zabbix \ |
195 |
- /var/lib/zabbix/home \ |
196 |
- /var/lib/zabbix/scripts \ |
197 |
- /var/lib/zabbix/alertscripts \ |
198 |
- /var/lib/zabbix/externalscripts \ |
199 |
- /var/log/zabbix |
200 |
- |
201 |
- keepdir \ |
202 |
- /etc/zabbix \ |
203 |
- /var/lib/zabbix \ |
204 |
- /var/lib/zabbix/home \ |
205 |
- /var/lib/zabbix/scripts \ |
206 |
- /var/lib/zabbix/alertscripts \ |
207 |
- /var/lib/zabbix/externalscripts \ |
208 |
- /var/log/zabbix |
209 |
- |
210 |
- if use server; then |
211 |
- insinto /etc/zabbix |
212 |
- doins "${FILESDIR}/3.0"/zabbix_server.conf |
213 |
- doinitd "${FILESDIR}/3.0"/init.d/zabbix-server |
214 |
- dosbin src/zabbix_server/zabbix_server |
215 |
- fowners zabbix:zabbix /etc/zabbix/zabbix_server.conf |
216 |
- fperms 0640 /etc/zabbix/zabbix_server.conf |
217 |
- dodir /usr/share/zabbix |
218 |
- /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/ |
219 |
- systemd_dounit "${FILESDIR}/zabbix-server.service" |
220 |
- systemd_newtmpfilesd "${FILESDIR}/zabbix-server.tmpfiles" zabbix-server.conf |
221 |
- fi |
222 |
- |
223 |
- if use proxy; then |
224 |
- doinitd "${FILESDIR}/3.0"/init.d/zabbix-proxy |
225 |
- dosbin src/zabbix_proxy/zabbix_proxy |
226 |
- insinto /etc/zabbix |
227 |
- doins "${FILESDIR}/3.0"/zabbix_proxy.conf |
228 |
- dodir /usr/share/zabbix |
229 |
- /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/ |
230 |
- systemd_dounit "${FILESDIR}/zabbix-proxy.service" |
231 |
- systemd_newtmpfilesd "${FILESDIR}/zabbix-proxy.tmpfiles" zabbix-proxy.conf |
232 |
- fi |
233 |
- |
234 |
- if use agent; then |
235 |
- insinto /etc/zabbix |
236 |
- doins "${FILESDIR}/3.0"/zabbix_agentd.conf |
237 |
- doinitd "${FILESDIR}/3.0"/init.d/zabbix-agentd |
238 |
- dosbin src/zabbix_agent/zabbix_agentd |
239 |
- dobin \ |
240 |
- src/zabbix_sender/zabbix_sender \ |
241 |
- src/zabbix_get/zabbix_get |
242 |
- fowners zabbix:zabbix /etc/zabbix/zabbix_agentd.conf |
243 |
- fperms 0640 /etc/zabbix/zabbix_agentd.conf |
244 |
- systemd_dounit "${FILESDIR}/zabbix-agentd.service" |
245 |
- systemd_newtmpfilesd "${FILESDIR}/zabbix-agentd.tmpfiles" zabbix-agentd.conf |
246 |
- fi |
247 |
- |
248 |
- fowners zabbix:zabbix \ |
249 |
- /etc/zabbix \ |
250 |
- /var/lib/zabbix \ |
251 |
- /var/lib/zabbix/home \ |
252 |
- /var/lib/zabbix/scripts \ |
253 |
- /var/lib/zabbix/alertscripts \ |
254 |
- /var/lib/zabbix/externalscripts \ |
255 |
- /var/log/zabbix |
256 |
- fperms 0750 \ |
257 |
- /etc/zabbix \ |
258 |
- /var/lib/zabbix \ |
259 |
- /var/lib/zabbix/home \ |
260 |
- /var/lib/zabbix/scripts \ |
261 |
- /var/lib/zabbix/alertscripts \ |
262 |
- /var/lib/zabbix/externalscripts \ |
263 |
- /var/log/zabbix |
264 |
- |
265 |
- dodoc README INSTALL NEWS ChangeLog \ |
266 |
- conf/zabbix_agentd.conf \ |
267 |
- conf/zabbix_proxy.conf \ |
268 |
- conf/zabbix_agentd/userparameter_examples.conf \ |
269 |
- conf/zabbix_agentd/userparameter_mysql.conf \ |
270 |
- conf/zabbix_server.conf |
271 |
- |
272 |
- if use frontend; then |
273 |
- webapp_src_preinst |
274 |
- cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}" |
275 |
- webapp_configfile \ |
276 |
- "${MY_HTDOCSDIR}"/include/db.inc.php \ |
277 |
- "${MY_HTDOCSDIR}"/include/config.inc.php |
278 |
- webapp_src_install |
279 |
- fi |
280 |
- |
281 |
- if use java; then |
282 |
- dodir \ |
283 |
- /${ZABBIXJAVA_BASE} \ |
284 |
- /${ZABBIXJAVA_BASE}/bin \ |
285 |
- /${ZABBIXJAVA_BASE}/lib |
286 |
- keepdir /${ZABBIXJAVA_BASE} |
287 |
- exeinto /${ZABBIXJAVA_BASE}/bin |
288 |
- doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar |
289 |
- exeinto /${ZABBIXJAVA_BASE}/lib |
290 |
- doexe \ |
291 |
- src/zabbix_java/lib/logback-classic-0.9.27.jar \ |
292 |
- src/zabbix_java/lib/logback-console.xml \ |
293 |
- src/zabbix_java/lib/logback-core-0.9.27.jar \ |
294 |
- src/zabbix_java/lib/logback.xml \ |
295 |
- src/zabbix_java/lib/android-json-4.3_r3.1.jar \ |
296 |
- src/zabbix_java/lib/slf4j-api-1.6.1.jar |
297 |
- exeinto /${ZABBIXJAVA_BASE}/ |
298 |
- doexe \ |
299 |
- src/zabbix_java/settings.sh \ |
300 |
- src/zabbix_java/startup.sh \ |
301 |
- src/zabbix_java/shutdown.sh |
302 |
- fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE} |
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 |
-} |