diff options
author | Miroslav Šulc <fordfrog@gentoo.org> | 2023-08-23 19:17:36 +0200 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2023-08-23 19:17:53 +0200 |
commit | f8862879a556126fa436401f2a2a893e5db87ee5 (patch) | |
tree | 8ec79fb43fdd9fe9e943adc590d499360ba7d6c5 | |
parent | metadata: Add gnome package stabilization groups (diff) | |
download | gentoo-f8862879a556126fa436401f2a2a893e5db87ee5.tar.gz gentoo-f8862879a556126fa436401f2a2a893e5db87ee5.tar.bz2 gentoo-f8862879a556126fa436401f2a2a893e5db87ee5.zip |
net-analyzer/zabbix: bump to 4.0.48
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
-rw-r--r-- | net-analyzer/zabbix/Manifest | 1 | ||||
-rw-r--r-- | net-analyzer/zabbix/zabbix-4.0.48.ebuild | 368 |
2 files changed, 369 insertions, 0 deletions
diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest index eda1fb454e60..396f9cf6d48f 100644 --- a/net-analyzer/zabbix/Manifest +++ b/net-analyzer/zabbix/Manifest @@ -1,5 +1,6 @@ DIST zabbix-4.0.46.tar.gz 17902473 BLAKE2B c791af22719cfd83a9d1350abd3b7d29cd441537580c7a3f2bbfd7fcda690526a7a1c5725ae1848ab8f8a232d10c8e7bcc8c16dffe09409965f4d42e55ba394f SHA512 6d6df0a9ba1b0673d4a9474f3eb841cfa8b7c49d39413a39b7cb84713fb9986243ae83d1cb23b8cdd4e312de8c67a366ea020a989d2dc1da74eed93d094e4688 DIST zabbix-4.0.47.tar.gz 17903257 BLAKE2B c245f1eb9b63cc0e03025958cddc31a790bbf8ed2c000ce787e2d3e9a108d0a177a61b22353d419fe21f0caf6750df273d236a1610c8907ad3527ad360915b76 SHA512 9f7f4fb03b1b9caa52bd5e3a7246e9f2ba844a5f292abc0a9ed3941c6493ee2a771f816ab83cdf571e10a3d32a48294e3755b9aa9d351116bdef32ab1b6d0632 +DIST zabbix-4.0.48.tar.gz 17895197 BLAKE2B 0a0b43084ab2babf305330d46f0841f741d1d7df3581602ee35e9be11c07210cd2d3e3779fb05c77ccaee0734f78217fbe8a5fc7c52246d3fbca00cf1c56487f SHA512 6dc403bcd9ec1747473f64f82e919aa196f35a2f2b8006ed9dcf114e10c4f542ae61cd86cd80c1c6a043b32281e1263c9a67acc2909265391777ab71358a7e5a DIST zabbix-5.0.35-go-deps.tar.xz 34454684 BLAKE2B 98489131a696f7606daa29bcb5de8f420eacf4f6bd89a9bb88e451f61b2ccf5cdf61a77a1de3e486763317e4a3c9dded9fddf400a5e545921ce823a17fc77a66 SHA512 2b6de506318c9656cb8dd8c2ec5f6443be64b9af2a94ed410acba7152d613b07222cbf042d2e490e0f94f82d03f8507d6a53fca36584739b6de8d23010b725bc DIST zabbix-5.0.35.tar.gz 21839368 BLAKE2B 8db4fa5ffbd7374e2bc060817a0854625ca99b4b20cbe5dd3f9d264e933c0ebef21efdef68b13d797edf60c388ba1d84a3fa9951ba138176513d120de09a3d28 SHA512 a76e94f2292a5990319e7a154b295aaf4c7421ca40ed9d1b3ea529979151407d3e65bf43b93b36234e84c800dd604cbe7a7154fbe44c1b5316b1d4b00b2e42d4 DIST zabbix-5.0.36-go-deps.tar.xz 34549228 BLAKE2B 60852e6d66b2bc70fb2624aa06498cb6013637b08011cdf1d30c1e2490f3f50d9fed22f0aa17712e11a05b4b4f4cc198917724eee4ed9ab30cadf667b9f28b5d SHA512 18e0dbe6128e905b6323cb9f65b32a49489b5d5685c615e92efcc9ac3ddcca0d46d5e3392366f395d8f3ff15549d9e90e5087243ec920e4955f35facf06bfe25 diff --git a/net-analyzer/zabbix/zabbix-4.0.48.ebuild b/net-analyzer/zabbix/zabbix-4.0.48.ebuild new file mode 100644 index 000000000000..249e6dc9f35f --- /dev/null +++ b/net-analyzer/zabbix/zabbix-4.0.48.ebuild @@ -0,0 +1,368 @@ +# Copyright 1999-2023 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/$(ver_cut 1-2)/${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 selinux 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] + ) + selinux? ( sec-policy/selinux-zabbix ) + 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 +} |