diff options
author | Miroslav Šulc <fordfrog@gentoo.org> | 2022-07-27 09:08:22 +0200 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2022-07-27 09:08:22 +0200 |
commit | 3c7092beebb97f225835a896b45bb04e5d728532 (patch) | |
tree | 3895a84ee3a9de7cb8f75eddac92bab25593f344 /net-analyzer | |
parent | net-analyzer/zabbix: bump to 5.0.26 (diff) | |
download | gentoo-3c7092beebb97f225835a896b45bb04e5d728532.tar.gz gentoo-3c7092beebb97f225835a896b45bb04e5d728532.tar.bz2 gentoo-3c7092beebb97f225835a896b45bb04e5d728532.zip |
net-analyzer/zabbix: bump to 4.0.43
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/zabbix/Manifest | 1 | ||||
-rw-r--r-- | net-analyzer/zabbix/zabbix-4.0.43.ebuild | 367 |
2 files changed, 368 insertions, 0 deletions
diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest index b0c997e7d93d..373c86e886e3 100644 --- a/net-analyzer/zabbix/Manifest +++ b/net-analyzer/zabbix/Manifest @@ -1,5 +1,6 @@ DIST zabbix-4.0.41.tar.gz 17641873 BLAKE2B f3bb40e78662c68f0752233a72ad71d2a7ffae03a0e334736c0b9037fe3566d1b3c4c09fd3183456ae3266ac84f2cbc57c73d5e0e1853f86ebd8eafc42e0b4bb SHA512 7df356c6e99a94876abd05e708eb350448593018017eb2e3434403505a48651ddd6b40b69d84bb49b8eed5cb945c2b974fd44b85dc27fc5c3141d1cdad1b371f DIST zabbix-4.0.42.tar.gz 17644927 BLAKE2B 1cc80aafa2a8a556c14e5675a550307b532c01433eb3892889964b9de90e1bd05456c20da6854f149e297c88ffc7f8e165ff593652759e00836418482458f014 SHA512 80993c0cc2b0235407f3b11089a1700e90db892a732194297d893caf951f360cd4777a7e2146fed8e314b71f170c49ed2c4c271e3c3e888e55998bbf7308f0c7 +DIST zabbix-4.0.43.tar.gz 17648025 BLAKE2B 1dbe0c8691d990278bcc540dcd57d7640a3d832021a9ec416dd67857a3e6e0724659ca13c6c59482e45e772cdb3c22f66810d0111e59d0371ed37f3d8b61275b SHA512 5d7f81a2e7dd8d060ab46c37622b4b73702d208e065bd99022f6c7e9598f2230b89347e73864238861eed7747d5439221ed1e4cc7ac99bf1e990d9550612dd7f DIST zabbix-5.0.24-go-deps.tar.xz 34371892 BLAKE2B 273978d3a4dd46e4d41d892f3217ae2ee0d2bfe9bed753283b5fdf3a13e6cb8f912a4726b92cc2637cb8103c63141f24d3c49c884f54598a9c4d99bed3830552 SHA512 bfafb96c6d69ad2c775add9392117c384a633b334ad447e1ec61cf6f01bd72ded0870d778650ff18a912f6ca3bc98f581052464353b22350eaf724bddc29f8d8 DIST zabbix-5.0.24.tar.gz 21296805 BLAKE2B 16c3fe6ef0732d627c70555b80961308ba9049978efc51c44162e5ceb940369ce36f87f33e6725de789c97d29edb2d0b4c2b2e58ac56a95e1b644cff13d2f64b SHA512 5ad70fdd189ce2630c019df6edad70fbfa7d2b0f72b42ae1950fb844f3edadf87c3108eefa7f3d343d4c3464d8aa58036dfbcab4109682d40b455788019dd62b DIST zabbix-5.0.25-go-deps.tar.xz 34381664 BLAKE2B 2da35cac59efe069587ad8217385cd276be340e9f0c37483c1a3aa500b03e0139122ca75437a1646fdb3d26ff7a824160d663cff758cf0a91fb08252606640ac SHA512 625f0cdde87cff17bfb2e348a03ffab5374a5d7657c1510abeda5e0a313658625eda946474bc7b7bf7a778d8cf0b498215f9e26ee2c72c6456e87065071ec0ac diff --git a/net-analyzer/zabbix/zabbix-4.0.43.ebuild b/net-analyzer/zabbix/zabbix-4.0.43.ebuild new file mode 100644 index 000000000000..1e0af68937f8 --- /dev/null +++ b/net-analyzer/zabbix/zabbix-4.0.43.ebuild @@ -0,0 +1,367 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# needed to make webapp-config dep optional +WEBAPP_OPTIONAL="yes" +inherit webapp java-pkg-opt-2 systemd toolchain-funcs tmpfiles user-info + +DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers" +HOMEPAGE="https://www.zabbix.com/" +MY_P=${P/_/} +MY_PV=${PV/_/} +SRC_URI="https://cdn.zabbix.com/${PN}/sources/stable/4.0/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0/$(ver_cut 1-2)" +WEBAPP_MANUAL_SLOT="yes" +KEYWORDS="~amd64 ~x86" +IUSE="+agent curl frontend gnutls ipv6 java ldap libxml2 mbedtls mysql odbc openipmi +openssl oracle +postgres proxy server snmp sqlite ssh static xmpp" +REQUIRED_USE="|| ( agent frontend proxy server ) + ?? ( gnutls mbedtls openssl ) + proxy? ( ^^ ( mysql oracle postgres sqlite ) ) + server? ( ^^ ( mysql oracle postgres ) !sqlite ) + static? ( !oracle !snmp )" + +COMMON_DEPEND=" + curl? ( net-misc/curl ) + gnutls? ( net-libs/gnutls:0= ) + java? ( >=virtual/jdk-1.8:* ) + ldap? ( + =dev-libs/cyrus-sasl-2* + net-libs/gnutls:= + net-nds/openldap:= + ) + libxml2? ( dev-libs/libxml2 ) + mbedtls? ( net-libs/mbedtls:0= ) + mysql? ( dev-db/mysql-connector-c:= ) + odbc? ( dev-db/unixODBC ) + openipmi? ( sys-libs/openipmi ) + openssl? ( dev-libs/openssl:=[-bindist(-)] ) + oracle? ( dev-db/oracle-instantclient[odbc,sdk] ) + postgres? ( dev-db/postgresql:* ) + proxy? ( + dev-libs/libevent:= + sys-libs/zlib + ) + server? ( + dev-libs/libevent:= + sys-libs/zlib + ) + snmp? ( net-analyzer/net-snmp:= ) + sqlite? ( dev-db/sqlite ) + ssh? ( net-libs/libssh2 ) + xmpp? ( dev-libs/iksemel ) +" + +RDEPEND="${COMMON_DEPEND} + acct-group/zabbix + acct-user/zabbix + java? ( >=virtual/jre-1.8:* ) + mysql? ( virtual/mysql ) + proxy? ( + dev-libs/libpcre + net-analyzer/fping[suid] + ) + server? ( + app-admin/webapp-config + dev-libs/libpcre + net-analyzer/fping[suid] + ) + frontend? ( + app-admin/webapp-config + dev-lang/php:*[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode] + media-libs/gd[png] + virtual/httpd-php:* + mysql? ( dev-lang/php[mysqli] ) + odbc? ( dev-lang/php[odbc] ) + oracle? ( dev-lang/php[oci8-instant-client] ) + postgres? ( dev-lang/php[postgres] ) + sqlite? ( dev-lang/php[sqlite] ) + ) +" +DEPEND="${COMMON_DEPEND} + static? ( + curl? ( net-misc/curl[static-libs] ) + ldap? ( + =dev-libs/cyrus-sasl-2*[static-libs] + net-libs/gnutls[static-libs] + net-nds/openldap[static-libs] + ) + libxml2? ( dev-libs/libxml2[static-libs] ) + mysql? ( dev-db/mysql-connector-c[static-libs] ) + odbc? ( dev-db/unixODBC[static-libs] ) + postgres? ( dev-db/postgresql:*[static-libs] ) + sqlite? ( dev-db/sqlite[static-libs] ) + ssh? ( net-libs/libssh2 ) + ) +" +BDEPEND=" + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}/${PN}-4.0.18-modulepathfix.patch" + "${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch" +) + +S=${WORKDIR}/${MY_P} + +ZABBIXJAVA_BASE="opt/zabbix_java" + +pkg_setup() { + if use oracle; then + if [ -z "${ORACLE_HOME}" ]; then + eerror + eerror "The environment variable ORACLE_HOME must be set" + eerror "and point to the correct location." + eerror "It looks like you don't have Oracle installed." + eerror + die "Environment variable ORACLE_HOME is not set" + fi + fi + + if use frontend; then + webapp_pkg_setup + fi + + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + default +} + +src_configure() { + econf \ + $(use_enable agent) \ + $(use_enable ipv6) \ + $(use_enable java) \ + $(use_enable proxy) \ + $(use_enable server) \ + $(use_enable static) \ + $(use_with curl libcurl) \ + $(use_with gnutls) \ + $(use_with ldap) \ + $(use_with libxml2) \ + $(use_with mbedtls) \ + $(use_with mysql) \ + $(use_with odbc unixodbc) \ + $(use_with openipmi openipmi) \ + $(use_with openssl) \ + $(use_with oracle) \ + $(use_with postgres postgresql) \ + $(use_with snmp net-snmp) \ + $(use_with sqlite sqlite3) \ + $(use_with ssh ssh2) \ + $(use_with xmpp jabber) +} + +src_compile() { + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then + emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" + fi +} + +src_install() { + local dirs=( + /etc/zabbix + /var/lib/zabbix + /var/lib/zabbix/home + /var/lib/zabbix/scripts + /var/lib/zabbix/alertscripts + /var/lib/zabbix/externalscripts + /var/log/zabbix + ) + + for dir in "${dirs[@]}"; do + dodir "${dir}" + keepdir "${dir}" + done + + if use server; then + insinto /etc/zabbix + doins "${S}"/conf/zabbix_server.conf + fperms 0640 /etc/zabbix/zabbix_server.conf + fowners root:zabbix /etc/zabbix/zabbix_server.conf + + newinitd "${FILESDIR}"/zabbix-server-r1.init zabbix-server + + dosbin src/zabbix_server/zabbix_server + + insinto /usr/share/zabbix + doins -r "${S}"/database/ + + systemd_dounit "${FILESDIR}"/zabbix-server.service + newtmpfiles "${FILESDIR}"/zabbix-server.tmpfiles zabbix-server.conf + fi + + if use proxy; then + insinto /etc/zabbix + doins "${S}"/conf/zabbix_proxy.conf + fperms 0640 /etc/zabbix/zabbix_proxy.conf + fowners root:zabbix /etc/zabbix/zabbix_proxy.conf + + newinitd "${FILESDIR}"/zabbix-proxy.init zabbix-proxy + + dosbin src/zabbix_proxy/zabbix_proxy + + insinto /usr/share/zabbix + doins -r "${S}"/database/ + + systemd_dounit "${FILESDIR}"/zabbix-proxy.service + newtmpfiles "${FILESDIR}"/zabbix-proxy.tmpfiles zabbix-proxy.conf + fi + + if use agent; then + insinto /etc/zabbix + doins "${S}"/conf/zabbix_agentd.conf + fperms 0640 /etc/zabbix/zabbix_agentd.conf + fowners root:zabbix /etc/zabbix/zabbix_agentd.conf + + newinitd "${FILESDIR}"/zabbix-agentd.init zabbix-agentd + + dosbin src/zabbix_agent/zabbix_agentd + dobin \ + src/zabbix_sender/zabbix_sender \ + src/zabbix_get/zabbix_get + + systemd_dounit "${FILESDIR}"/zabbix-agentd.service + newtmpfiles "${FILESDIR}"/zabbix-agentd.tmpfiles zabbix-agentd.conf + fi + + fowners root:zabbix /etc/zabbix + fowners zabbix:zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/lib/zabbix/alertscripts \ + /var/lib/zabbix/externalscripts \ + /var/log/zabbix + fperms 0750 \ + /etc/zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/lib/zabbix/alertscripts \ + /var/lib/zabbix/externalscripts \ + /var/log/zabbix + + dodoc README INSTALL NEWS ChangeLog \ + conf/zabbix_agentd.conf \ + conf/zabbix_proxy.conf \ + conf/zabbix_agentd/userparameter_examples.conf \ + conf/zabbix_agentd/userparameter_mysql.conf \ + conf/zabbix_server.conf + + if use frontend; then + webapp_src_preinst + cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}" + webapp_configfile \ + "${MY_HTDOCSDIR}"/include/db.inc.php \ + "${MY_HTDOCSDIR}"/include/config.inc.php + webapp_src_install + fi + + if use java; then + dodir \ + /${ZABBIXJAVA_BASE} \ + /${ZABBIXJAVA_BASE}/bin \ + /${ZABBIXJAVA_BASE}/lib + keepdir /${ZABBIXJAVA_BASE} + exeinto /${ZABBIXJAVA_BASE}/bin + doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar + exeinto /${ZABBIXJAVA_BASE}/lib + doexe \ + src/zabbix_java/lib/logback-classic-1.2.9.jar \ + src/zabbix_java/lib/logback-console.xml \ + src/zabbix_java/lib/logback-core-1.2.9.jar \ + src/zabbix_java/lib/logback.xml \ + src/zabbix_java/lib/android-json-4.3_r3.1.jar \ + src/zabbix_java/lib/slf4j-api-1.7.32.jar + newinitd "${FILESDIR}"/zabbix-jmx-proxy.init zabbix-jmx-proxy + newconfd "${FILESDIR}"/zabbix-jmx-proxy.conf zabbix-jmx-proxy + fi +} + +pkg_postinst() { + if use server || use proxy ; then + elog + elog "You may need to configure your database for Zabbix" + elog "if you have not already done so." + elog + + zabbix_homedir=$(egethome zabbix) + if [ -n "${zabbix_homedir}" ] && \ + [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then + ewarn + ewarn "The user 'zabbix' should have his homedir changed" + ewarn "to /var/lib/zabbix/home if you want to use" + ewarn "custom alert scripts." + ewarn + ewarn "A real homedir might be needed for configfiles" + ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when" + ewarn "using sendxmpp for Jabber alerts)." + ewarn + ewarn "To change the homedir use:" + ewarn " usermod -d /var/lib/zabbix/home zabbix" + ewarn + fi + fi + + if use server; then + tmpfiles_process zabbix-server.conf + + elog + elog "For distributed monitoring you have to run:" + elog + elog "zabbix_server -n <nodeid>" + elog + elog "This will convert database data for use with Node ID" + elog "and also adds a local node." + elog + fi + + if use proxy; then + tmpfiles_process zabbix-proxy.conf + fi + + if use agent; then + tmpfiles_process zabbix-agentd.conf + fi + + elog "--" + elog + elog "You may need to add these lines to /etc/services:" + elog + elog "zabbix-agent 10050/tcp Zabbix Agent" + elog "zabbix-agent 10050/udp Zabbix Agent" + elog "zabbix-trapper 10051/tcp Zabbix Trapper" + elog "zabbix-trapper 10051/udp Zabbix Trapper" + elog + + if use server || use proxy ; then + # check for fping + fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) + case "${fping_perms}" in + 4[157][157][157]) + ;; + *) + ewarn + ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," + ewarn "you have to make /usr/sbin/fping setuid root and executable" + ewarn "by everyone. Run the following command to fix it:" + ewarn + ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" + ewarn + ewarn "Please be aware that this might impose a security risk," + ewarn "depending on the code quality of fping." + ewarn + ;; + esac + fi +} + +pkg_prerm() { + (use frontend || use server) && webapp_pkg_prerm +} |