diff options
author | Miroslav Šulc <fordfrog@gentoo.org> | 2023-03-28 07:57:22 +0200 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2023-03-28 07:57:22 +0200 |
commit | 8b0cc273c2c1651b343899a708031d3809c3abee (patch) | |
tree | 69bd67dece8348f6262cd86cb8976a57e50e6dc0 /net-analyzer | |
parent | media-sound/strawberry: bump to 1.0.16 (diff) | |
download | gentoo-8b0cc273c2c1651b343899a708031d3809c3abee.tar.gz gentoo-8b0cc273c2c1651b343899a708031d3809c3abee.tar.bz2 gentoo-8b0cc273c2c1651b343899a708031d3809c3abee.zip |
net-analyzer/zabbix: bump to 5.0.33
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/zabbix/Manifest | 2 | ||||
-rw-r--r-- | net-analyzer/zabbix/zabbix-5.0.33.ebuild | 398 |
2 files changed, 400 insertions, 0 deletions
diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest index b8b7f8a92d3f..37807ea81fae 100644 --- a/net-analyzer/zabbix/Manifest +++ b/net-analyzer/zabbix/Manifest @@ -5,6 +5,8 @@ DIST zabbix-5.0.31-go-deps.tar.xz 34443128 BLAKE2B 38bf33002e6dbae95b39579383f8b DIST zabbix-5.0.31.tar.gz 21567566 BLAKE2B 076090e07856df0dc2603d75fb7cc9862e40b9e6bda89094cf687aa00719a0df7cf7fd93bc973cb38cbbb31b6b723efd3dc5aa6dde00b4f4a5b118331795bfeb SHA512 7409e23313a6c5f6f4f1e1c0ba0ccfec88aa2687caa25673709bf05b9e287a535ea417551dee0f9d2fbd571adfe843a700ee45ee3dc72752cdeab12ec4c54644 DIST zabbix-5.0.32-go-deps.tar.xz 34470664 BLAKE2B aedd50682e9e71686852f5d69c1645c16d52a5c16a0628692452b6fbb1577a775473daad8ab687d23302966aa989dd0257ab38143f3db8ce4fdcf386d94b9689 SHA512 2ca7f5cf5e11eb0770bc16008a9e52436510bcee9e222b17ac58ea47acffd455a1278a9cdee9df9a6e045bfb7deb1df9950fb9ea19e767b8733b8036d9dc1d81 DIST zabbix-5.0.32.tar.gz 21664895 BLAKE2B d70e68727eec0181398c7624c56aa2ef721a738a7549fa075a66cd94b6225243b7e73ff1b4d2ed96482ca5ac79ac8bcb230e9736f63a5dbe66cc4d0b10a88e24 SHA512 f58ecac976cc3b9e81f738e19ac23185747c005a73060f35137b5964d4144b96263b7dcba7db6d895f39908217aae9ba260ce5a772a4c53d4b24ccd41083f524 +DIST zabbix-5.0.33-go-deps.tar.xz 34386484 BLAKE2B 43228e628666ad841054c11d7031991903b9cd0ebd521350f33a94485d834be4d8ab30660e375bb0bf769f15b57f8125f9bb5239a65b7415ead07d2cf652c2b6 SHA512 19884c90024065839f38456b66e85e4fd228099f3746c8a63010686bcfffa0a1224b889ff4b7774efba838753cc97ae8a741d92beeebef1e0f154256a7381bfb +DIST zabbix-5.0.33.tar.gz 21791284 BLAKE2B 920adfe2d078a58bc658ab8d815bc426ab654fe6356ed46950b572e4fc480d5986adf03e05ab780cae61166178e60e0eaee6be6a02f4d1d33744c84ce04f1ea1 SHA512 c5c6046d53a8341270cd0642e41df77f61ae0d472c1c3ee6fe86f7c3a4433ab30ced0b25ade3291f67872cf0b38e60eaffec8b16bb89e6d9729c7e277de321a7 DIST zabbix-6.0.12-go-deps.tar.xz 27481268 BLAKE2B cfeca38b63a6271b4ff6819143e0214d3b468e3f7b681cc0bde443192e84ec4b66eb9b8ce38be01fa74a186f8904dfe73af04ad98007880e9ad6aab5c4b978b3 SHA512 c021efe15b61eeebad855ee9d8081f06796d126f3215bac4cb8a36384185aa2a67c0af580b5fcd830e6da832eb1057c02621c71569e30735fb0bef172f26d3b4 DIST zabbix-6.0.12.tar.gz 40419443 BLAKE2B 18e328a3361947292b3c78fc75dbcfc464f3419fb35bd0895049c90d26d362edbe0a727d1ab955f428ec812d6f38f68717f3c635216aff0468f188321b476495 SHA512 7cd254282523002d2e4d86295258ea0f56921b54c88d604300104f32ea5807c0b39b5550a9dd98e03ad41adf4dd8e93a7b1deb200d513283dca51d49d46bda4d DIST zabbix-6.0.13-go-deps.tar.xz 17974536 BLAKE2B 296ae034ccf0f6cd1d83379c46ad87d80faf3d897d807d948312989e044dc4d159aabab27999730ed255be3c7d5aa6b70927bcfb888f9969b36994c68246c14b SHA512 279aeed128e00dab8f1824ed7186ddc914615f7756a96c049bff0321997c9e412007c56701a036a1a25029aa7c4f878ad4566e95abbf766ee353666a6a588370 diff --git a/net-analyzer/zabbix/zabbix-5.0.33.ebuild b/net-analyzer/zabbix/zabbix-5.0.33.ebuild new file mode 100644 index 000000000000..6e481bc98c71 --- /dev/null +++ b/net-analyzer/zabbix/zabbix-5.0.33.ebuild @@ -0,0 +1,398 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# To create the go modules tarball: +# cd src/go +# GOMODCACHE="${PWD}"/go-mod go mod download -modcacherw +# tar -acf zabbix-${PV}-go-deps.tar.xz go-mod + +EAPI=8 + +GO_OPTIONAL="yes" +# needed to make webapp-config dep optional +WEBAPP_OPTIONAL="yes" +inherit webapp java-pkg-opt-2 systemd tmpfiles toolchain-funcs go-module 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 + agent2? ( https://dev.gentoo.org/~fordfrog/distfiles/${P}-go-deps.tar.xz ) +" + +LICENSE="GPL-2" +SLOT="0/$(ver_cut 1-2)" +WEBAPP_MANUAL_SLOT="yes" +KEYWORDS="~amd64 ~x86" +IUSE="+agent +agent2 curl frontend gnutls ipv6 java ldap libxml2 mysql odbc openipmi +openssl oracle +postgres proxy server snmp sqlite ssh static" +REQUIRED_USE="|| ( agent agent2 frontend proxy server ) + ?? ( gnutls 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 ) + 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 ) +" + +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 + agent2? ( + >=dev-lang/go-1.12 + app-arch/unzip + ) +" + +# upstream tests fail for agent2 +RESTRICT="test" + +PATCHES=( + "${FILESDIR}/${PN}-4.0.18-modulepathfix.patch" + "${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch" + "${FILESDIR}/${PN}-5.0.22-system.sw.packages.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 agent2) \ + $(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 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) +} + +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 + + if use agent2; then + insinto /etc/zabbix + doins "${S}"/src/go/conf/zabbix_agent2.conf + fperms 0640 /etc/zabbix/zabbix_agent2.conf + fowners root:zabbix /etc/zabbix/zabbix_agent2.conf + + newinitd "${FILESDIR}"/zabbix-agent2.init zabbix-agent2 + + dosbin src/go/bin/zabbix_agent2 + + systemd_dounit "${FILESDIR}"/zabbix-agent2.service + newtmpfiles "${FILESDIR}"/zabbix-agent2.tmpfiles zabbix-agent2.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 ui/* "${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." + 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 + + if use agent2; then + tmpfiles_process zabbix-agent2.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 +} |