commit:     eea21674902a3fe01f0097db84784507d6d73bfe
Author:     Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  5 20:28:48 2020 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Sun Jan  5 21:23:31 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eea21674

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 <AT> gentoo.org>

 .../files/netdata-1.19.0-prometheus-spelling.patch   | 20 ++++++++++++++++++++
 net-analyzer/netdata/metadata.xml                    |  4 ++++
 ...{netdata-9999.ebuild => netdata-1.19.0-r2.ebuild} | 20 +++++++++++++++++---
 net-analyzer/netdata/netdata-9999.ebuild             | 14 ++++++++++++--
 4 files changed, 53 insertions(+), 5 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 00000000000..25c8dd4051f
--- /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 <candr...@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 a160e06f365..70b99cd52f3 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-9999.ebuild 
b/net-analyzer/netdata/netdata-1.19.0-r2.ebuild
similarity index 82%
copy from net-analyzer/netdata/netdata-9999.ebuild
copy to net-analyzer/netdata/netdata-1.19.0-r2.ebuild
index 0443e6b587f..9ba4f313200 100644
--- a/net-analyzer/netdata/netdata-9999.ebuild
+++ b/net-analyzer/netdata/netdata-1.19.0-r2.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
-PYTHON_COMPAT=( python{2_7,3_6,3_7} )
+PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
 
 inherit autotools fcaps linux-info python-r1 systemd
 
@@ -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}]
@@ -77,6 +84,10 @@ 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
 }
@@ -90,11 +101,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)

diff --git a/net-analyzer/netdata/netdata-9999.ebuild 
b/net-analyzer/netdata/netdata-9999.ebuild
index 0443e6b587f..6661c14a9a1 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)

Reply via email to