summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Andrews <candrews@gentoo.org>2020-01-05 15:28:48 -0500
committerCraig Andrews <candrews@gentoo.org>2020-01-05 16:23:31 -0500
commiteea21674902a3fe01f0097db84784507d6d73bfe (patch)
treed90643cb996648731a31e4169021ff7285ade676 /net-analyzer/netdata
parentdev-python/mypy: Bump to 0.760 (diff)
downloadgentoo-eea21674902a3fe01f0097db84784507d6d73bfe.tar.gz
gentoo-eea21674902a3fe01f0097db84784507d6d73bfe.tar.bz2
gentoo-eea21674902a3fe01f0097db84784507d6d73bfe.zip
net-analyzer/netdata: Add mongodb, prometheus, kinesis, and jsonc USE flags
Closes: https://bugs.gentoo.org/704804 Closes: https://bugs.gentoo.org/704806 Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Craig Andrews <candrews@gentoo.org>
Diffstat (limited to 'net-analyzer/netdata')
-rw-r--r--net-analyzer/netdata/files/netdata-1.19.0-prometheus-spelling.patch20
-rw-r--r--net-analyzer/netdata/metadata.xml4
-rw-r--r--net-analyzer/netdata/netdata-1.19.0-r2.ebuild145
-rw-r--r--net-analyzer/netdata/netdata-9999.ebuild14
4 files changed, 181 insertions, 2 deletions
diff --git a/net-analyzer/netdata/files/netdata-1.19.0-prometheus-spelling.patch b/net-analyzer/netdata/files/netdata-1.19.0-prometheus-spelling.patch
new file mode 100644
index 000000000000..25c8dd4051ff
--- /dev/null
+++ b/net-analyzer/netdata/files/netdata-1.19.0-prometheus-spelling.patch
@@ -0,0 +1,20 @@
+https://github.com/netdata/netdata/pull/7674
+
+From d19b834d0011485759604ecfa095a898b597d8e0 Mon Sep 17 00:00:00 2001
+From: Craig Andrews <candrews@integralblue.com>
+Date: Sun, 5 Jan 2020 16:13:18 -0500
+Subject: [PATCH] Fix spelling of Prometheus (#7673)
+
+diff --git a/configure.ac b/configure.ac
+index 00927ba8b1..8b2facb966 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -999,7 +999,7 @@ test "${enable_backend_prometheus_remote_write}" = "yes" -a "${have_CXX_compiler
+ AC_MSG_ERROR([C++ compiler required but not found. try installing g++])
+
+ AC_MSG_CHECKING([if prometheus remote write backend should be enabled])
+-if test "${enable_backend_prometeus_remote_write}" != "no" -a "${have_libprotobuf}" = "yes" -a "${have_libsnappy}" = "yes" \
++if test "${enable_backend_prometheus_remote_write}" != "no" -a "${have_libprotobuf}" = "yes" -a "${have_libsnappy}" = "yes" \
+ -a "${have_protoc}" = "yes" -a "${have_CXX_compiler}" = "yes"; then
+ enable_backend_prometheus_remote_write="yes"
+ AC_DEFINE([ENABLE_PROMETHEUS_REMOTE_WRITE], [1], [Prometheus remote write API usability])
diff --git a/net-analyzer/netdata/metadata.xml b/net-analyzer/netdata/metadata.xml
index a160e06f3657..70b99cd52f39 100644
--- a/net-analyzer/netdata/metadata.xml
+++ b/net-analyzer/netdata/metadata.xml
@@ -9,8 +9,12 @@
<flag name="compression">Enable compression via zlib</flag>
<flag name="dbengine">Enable the Netdata database engine</flag>
<flag name="ipmi">Install <pkg>sys-apps/ipmitool</pkg> required for monitoring IPMI sensors.</flag>
+ <flag name="jsonc">Enable optimization of JSON using <pkg>dev-libs/json-c</pkg></flag>
+ <flag name="kinesis">Enable support for Amazon Kenesis as a backend</flag>
+ <flag name="mongodb">Enable support for the mongodb backend</flag>
<flag name="nfacct">Enable the nfacct plugin</flag>
<flag name="nodejs">Enable use of nodejs (which some plugins use)</flag>
+ <flag name="prometheus">Enable support for the Prometheus remote write backend</flag>
<flag name="tor">Enable monitoring of tor</flag>
<flag name="xen">Enable monitoring of xen</flag>
</use>
diff --git a/net-analyzer/netdata/netdata-1.19.0-r2.ebuild b/net-analyzer/netdata/netdata-1.19.0-r2.ebuild
new file mode 100644
index 000000000000..9ba4f3132004
--- /dev/null
+++ b/net-analyzer/netdata/netdata-1.19.0-r2.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
+
+inherit autotools fcaps linux-info python-r1 systemd
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/netdata/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/netdata/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Linux real time system monitoring, done right!"
+HOMEPAGE="https://github.com/netdata/netdata https://my-netdata.io/"
+
+LICENSE="GPL-3+ MIT BSD"
+SLOT="0"
+IUSE="caps +compression cpu_flags_x86_sse2 cups +dbengine ipmi +jsonc kinesis mongodb mysql nfacct nodejs postgres prometheus +python tor xen"
+REQUIRED_USE="
+ mysql? ( python )
+ python? ( ${PYTHON_REQUIRED_USE} )
+ tor? ( python )"
+
+# most unconditional dependencies are for plugins.d/charts.d.plugin:
+RDEPEND="
+ acct-group/netdata
+ acct-user/netdata
+ app-misc/jq
+ >=app-shells/bash-4:0
+ || (
+ net-analyzer/openbsd-netcat
+ net-analyzer/netcat
+ )
+ net-misc/curl
+ net-misc/wget
+ sys-apps/util-linux
+ virtual/awk
+ caps? ( sys-libs/libcap )
+ cups? ( net-print/cups )
+ dbengine? (
+ dev-libs/libuv
+ app-arch/lz4
+ dev-libs/judy
+ dev-libs/openssl:=
+ )
+ compression? ( sys-libs/zlib )
+ ipmi? ( sys-libs/freeipmi )
+ jsonc? ( dev-libs/json-c )
+ kinesis? ( dev-libs/aws-sdk-cpp )
+ mongodb? ( dev-libs/mongo-c-driver )
+ nfacct? (
+ net-firewall/nfacct
+ net-libs/libmnl
+ )
+ nodejs? ( net-libs/nodejs )
+ prometheus? (
+ dev-libs/protobuf:=
+ app-arch/snappy
+ )
+ python? (
+ ${PYTHON_DEPS}
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ mysql? (
+ || (
+ dev-python/mysqlclient[${PYTHON_USEDEP}]
+ dev-python/mysql-python[${PYTHON_USEDEP}]
+ )
+ )
+ postgres? ( dev-python/psycopg:2[${PYTHON_USEDEP}] )
+ tor? ( net-libs/stem[${PYTHON_USEDEP}] )
+ )
+ xen? (
+ app-emulation/xen-tools
+ dev-libs/yajl
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+FILECAPS=(
+ 'cap_dac_read_search,cap_sys_ptrace+ep' 'usr/libexec/netdata/plugins.d/apps.plugin'
+)
+
+PATCHES=(
+ "${FILESDIR}/${P}-prometheus-spelling.patch"
+)
+
+pkg_setup() {
+ linux-info_pkg_setup
+}
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --localstatedir="${EPREFIX}"/var \
+ --with-user=netdata \
+ $(use_enable jsonc) \
+ $(use_enable cups plugin-cups) \
+ $(use_enable dbengine) \
+ $(use_enable nfacct plugin-nfacct) \
+ $(use_enable ipmi plugin-freeipmi) \
+ $(use_enable kinesis backend-kinesis) \
+ $(use_enable mongodb backend-mongodb) \
+ $(use_enable prometheus backend-prometheus-remote-write) \
+ $(use_enable xen plugin-xenstat) \
+ $(use_enable cpu_flags_x86_sse2 x86-sse) \
+ $(use_with compression zlib)
+}
+
+src_install() {
+ default
+
+ rm -rf "${D}/var/cache" || die
+
+ # Remove unneeded .keep files
+ find "${ED}" -name ".keep" -delete || die
+
+ fowners -Rc netdata:netdata /var/log/netdata
+ keepdir /var/log/netdata
+ fowners -Rc netdata:netdata /var/lib/netdata
+ keepdir /var/lib/netdata
+ keepdir /var/lib/netdata/registry
+
+ fowners -Rc root:netdata /usr/share/${PN}
+
+ newinitd system/netdata-openrc ${PN}
+ systemd_dounit system/netdata.service
+ insinto /etc/netdata
+ doins system/netdata.conf
+}
+
+pkg_postinst() {
+ fcaps_pkg_postinst
+
+ if use xen ; then
+ fcaps 'cap_dac_override' 'usr/libexec/netdata/plugins.d/xenstat.plugin'
+ fi
+}
diff --git a/net-analyzer/netdata/netdata-9999.ebuild b/net-analyzer/netdata/netdata-9999.ebuild
index 0443e6b587fd..6661c14a9a19 100644
--- a/net-analyzer/netdata/netdata-9999.ebuild
+++ b/net-analyzer/netdata/netdata-9999.ebuild
@@ -19,7 +19,7 @@ HOMEPAGE="https://github.com/netdata/netdata https://my-netdata.io/"
LICENSE="GPL-3+ MIT BSD"
SLOT="0"
-IUSE="caps +compression cpu_flags_x86_sse2 cups +dbengine ipmi mysql nfacct nodejs postgres +python tor xen"
+IUSE="caps +compression cpu_flags_x86_sse2 cups +dbengine ipmi +jsonc kinesis mongodb mysql nfacct nodejs postgres prometheus +python tor xen"
REQUIRED_USE="
mysql? ( python )
python? ( ${PYTHON_REQUIRED_USE} )
@@ -49,11 +49,18 @@ RDEPEND="
)
compression? ( sys-libs/zlib )
ipmi? ( sys-libs/freeipmi )
+ jsonc? ( dev-libs/json-c )
+ kinesis? ( dev-libs/aws-sdk-cpp )
+ mongodb? ( dev-libs/mongo-c-driver )
nfacct? (
net-firewall/nfacct
net-libs/libmnl
)
nodejs? ( net-libs/nodejs )
+ prometheus? (
+ dev-libs/protobuf:=
+ app-arch/snappy
+ )
python? (
${PYTHON_DEPS}
dev-python/pyyaml[${PYTHON_USEDEP}]
@@ -90,11 +97,14 @@ src_configure() {
econf \
--localstatedir="${EPREFIX}"/var \
--with-user=netdata \
- --disable-jsonc \
+ $(use_enable jsonc) \
$(use_enable cups plugin-cups) \
$(use_enable dbengine) \
$(use_enable nfacct plugin-nfacct) \
$(use_enable ipmi plugin-freeipmi) \
+ $(use_enable kinesis backend-kinesis) \
+ $(use_enable mongodb backend-mongodb) \
+ $(use_enable prometheus backend-prometheus-remote-write) \
$(use_enable xen plugin-xenstat) \
$(use_enable cpu_flags_x86_sse2 x86-sse) \
$(use_with compression zlib)