From ed0796bf44d31e19032f30a7a5ae7f85fa6958bd Mon Sep 17 00:00:00 2001 From: Alex White Date: Fri, 27 Apr 2018 10:47:04 +0100 Subject: [PATCH] Add ability to turn on collectd "debug" feature in RPMs --- contrib/redhat/collectd.spec | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/contrib/redhat/collectd.spec b/contrib/redhat/collectd.spec index 3cefc1bd..752b0246 100644 --- a/contrib/redhat/collectd.spec +++ b/contrib/redhat/collectd.spec @@ -38,6 +38,9 @@ %global _hardened_build 1 %{?perl_default_filter} +# disable collectd debug by default +%bcond_with debug + # plugins enabled by default %define with_aggregation 0%{!?_without_aggregation:1} %define with_amqp 0%{!?_without_amqp:1} @@ -1872,8 +1875,15 @@ Collectd utilities %define _with_zookeeper --disable-zookeeper %endif +%if %{with debug} +%define _feature_debug --enable-debug +%else +%define _feature_debug --disable-debug +%endif + %configure CFLAGS="%{optflags} -DLT_LAZY_OR_NOW=\"RTLD_LAZY|RTLD_GLOBAL\"" \ %{?_python_config} \ + %{?_feature_debug} \ --disable-static \ --enable-all-plugins=yes \ --enable-match_empty_counter \ -- 2.11.0