Accepting request 349425 from home:oertel:branches:server:monitoring
- add patch collectd-new_libstatgrab.patch: fix build with recent libstatgrab (basically backport from git) - do not (build)require sensors on s390/s390x OBS-URL: https://build.opensuse.org/request/show/349425 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/collectd?expand=0&rev=129
This commit is contained in:
parent
b5fba04e19
commit
9761b086e4
63
collectd-new_libstatgrab.patch
Normal file
63
collectd-new_libstatgrab.patch
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
--- configure.ac
|
||||||
|
+++ configure.ac
|
||||||
|
@@ -4003,6 +4003,34 @@
|
||||||
|
LDFLAGS="$SAVE_LDFLAGS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
+if test "x$with_libstatgrab" = "xyes"
|
||||||
|
+then
|
||||||
|
+ SAVE_CFLAGS="$CFLAGS"
|
||||||
|
+ SAVE_LDFLAGS="$LDFLAGS"
|
||||||
|
+
|
||||||
|
+ CFLAGS="$CFLAGS $with_libstatgrab_cflags"
|
||||||
|
+ LDFLAGS="$LDFLAGS $with_libstatgrab_ldflags"
|
||||||
|
+
|
||||||
|
+ AC_CACHE_CHECK([if sg_init() requires an argument],
|
||||||
|
+ [c_cv_have_libstatgrab_init_arg],
|
||||||
|
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
|
||||||
|
+[[[
|
||||||
|
+#include <stdio.h>
|
||||||
|
+#include <statgrab.h>
|
||||||
|
+]]],
|
||||||
|
+[[[
|
||||||
|
+ if (sg_init()) return 0;
|
||||||
|
+]]]
|
||||||
|
+ )],
|
||||||
|
+ [c_cv_have_libstatgrab_init_arg="no"],
|
||||||
|
+ [c_cv_have_libstatgrab_init_arg="yes"]
|
||||||
|
+ )
|
||||||
|
+ )
|
||||||
|
+
|
||||||
|
+ CFLAGS="$SAVE_CFLAGS"
|
||||||
|
+ LDFLAGS="$SAVE_LDFLAGS"
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
|
||||||
|
if test "x$with_libstatgrab" = "xyes"
|
||||||
|
then
|
||||||
|
@@ -4011,6 +4039,10 @@
|
||||||
|
BUILD_WITH_LIBSTATGRAB_LDFLAGS="$with_libstatgrab_ldflags"
|
||||||
|
AC_SUBST(BUILD_WITH_LIBSTATGRAB_CFLAGS)
|
||||||
|
AC_SUBST(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
|
||||||
|
+ if test "x$c_cv_have_libstatgrab_init_arg" = "xyes"
|
||||||
|
+ then
|
||||||
|
+ AC_DEFINE(HAVE_LIBSTATGRAB_INIT_ARG, 1, [Define to 1 if sg_init does require an argument])
|
||||||
|
+ fi
|
||||||
|
fi
|
||||||
|
# }}}
|
||||||
|
|
||||||
|
--- src/collectd.c
|
||||||
|
+++ src/collectd.c
|
||||||
|
@@ -288,7 +288,11 @@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAVE_LIBSTATGRAB
|
||||||
|
- if (sg_init ())
|
||||||
|
+ if (sg_init (
|
||||||
|
+# if HAVE_LIBSTATGRAB_INIT_ARG
|
||||||
|
+ 0
|
||||||
|
+# endif
|
||||||
|
+ ))
|
||||||
|
{
|
||||||
|
ERROR ("sg_init: %s", sg_str_error (sg_get_error ()));
|
||||||
|
return (-1);
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Dec 17 17:56:16 CET 2015 - ro@suse.de
|
||||||
|
|
||||||
|
- add patch collectd-new_libstatgrab.patch:
|
||||||
|
fix build with recent libstatgrab (basically backport from git)
|
||||||
|
- do not (build)require sensors on s390/s390x
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Sep 12 10:58:03 UTC 2015 - matwey.kornilov@gmail.com
|
Sat Sep 12 10:58:03 UTC 2015 - matwey.kornilov@gmail.com
|
||||||
|
|
||||||
|
@ -22,7 +22,14 @@
|
|||||||
%define snmp 1
|
%define snmp 1
|
||||||
%define with_esmtp 1
|
%define with_esmtp 1
|
||||||
%define ipvs_plugin ipvs
|
%define ipvs_plugin ipvs
|
||||||
%define plugins apache apcups battery %{expand:%{bind_plugin}} cgroups curl %{expand:%{curl_json_plugin}} %{expand:%{curl_xml_plugin}} conntrack contextswitch cpu cpufreq csv df disk %{expand:%{dns_plugin}} email entropy exec filecount fscache hddtemp interface %{expand:%{ipvs_plugin}} irq load logfile match_empty_counter match_hashed match_regex match_timediff match_value mbmon %{expand:%{memcached_plugin}} memory multimeter netlink network nfs nginx ntpd olsrd openvpn perl ping protocols powerdns processes rrdtool sensors serial statsd swap syslog table tail target_notification target_replace target_scale target_set target_v5upgrade tcpconns teamspeak2 ted thermal threshold unixsock uptime users uuid vmem vserver wireless write_http %{expand:%{ascent_plugin}} %{expand:%{iptables_plugin}} %{expand:%{madwifi_plugin}} %{expand:%{rrdcached_plugin}} aggregation ethstat md numa tail_csv write_graphite write_riemann
|
%define plugins apache apcups battery %{expand:%{bind_plugin}} cgroups curl %{expand:%{curl_json_plugin}} %{expand:%{curl_xml_plugin}} conntrack contextswitch cpu cpufreq csv df disk %{expand:%{dns_plugin}} email entropy exec filecount fscache hddtemp interface %{expand:%{ipvs_plugin}} irq load logfile match_empty_counter match_hashed match_regex match_timediff match_value mbmon %{expand:%{memcached_plugin}} memory multimeter netlink network nfs nginx ntpd olsrd openvpn perl ping protocols powerdns processes rrdtool %{expand:%{sensors_plugin}} serial statsd swap syslog table tail target_notification target_replace target_scale target_set target_v5upgrade tcpconns teamspeak2 ted thermal threshold unixsock uptime users uuid vmem vserver wireless write_http %{expand:%{ascent_plugin}} %{expand:%{iptables_plugin}} %{expand:%{madwifi_plugin}} %{expand:%{rrdcached_plugin}} aggregation ethstat md numa tail_csv write_graphite write_riemann
|
||||||
|
%ifnarch s390 s390x
|
||||||
|
%define sensors 1
|
||||||
|
%define sensors_plugin sensors
|
||||||
|
%else
|
||||||
|
%define sensors 0
|
||||||
|
%define sensors_plugin %{nil}
|
||||||
|
%endif
|
||||||
%if 0%{?_with_xmms:1}0
|
%if 0%{?_with_xmms:1}0
|
||||||
%define xmms 1
|
%define xmms 1
|
||||||
%else
|
%else
|
||||||
@ -146,6 +153,7 @@ Patch20: collectd-split_README.patch
|
|||||||
Patch21: collectd-fix_collectd_config_path_in_snmp_probe.patch
|
Patch21: collectd-fix_collectd_config_path_in_snmp_probe.patch
|
||||||
Patch23: collectd-javac_target.patch
|
Patch23: collectd-javac_target.patch
|
||||||
Patch25: collectd-df-remove-duplicates.patch
|
Patch25: collectd-df-remove-duplicates.patch
|
||||||
|
Patch26: collectd-new_libstatgrab.patch
|
||||||
# for /etc/apache2/... ownership (rpmlint):
|
# for /etc/apache2/... ownership (rpmlint):
|
||||||
BuildRequires: apache2
|
BuildRequires: apache2
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
@ -177,11 +185,13 @@ BuildRequires: perl
|
|||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
BuildRequires: rrdtool
|
BuildRequires: rrdtool
|
||||||
BuildRequires: sensors
|
|
||||||
BuildRequires: xfsprogs-devel
|
BuildRequires: xfsprogs-devel
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
Requires: rrdtool
|
Requires: rrdtool
|
||||||
|
%if %{sensors}
|
||||||
|
BuildRequires: sensors
|
||||||
Requires: sensors
|
Requires: sensors
|
||||||
|
%endif
|
||||||
# FIXME: use proper Requires(pre/post/preun/...)
|
# FIXME: use proper Requires(pre/post/preun/...)
|
||||||
PreReq: %fillup_prereq
|
PreReq: %fillup_prereq
|
||||||
# in case we'd like to split it later:
|
# in case we'd like to split it later:
|
||||||
@ -549,6 +559,7 @@ to write %{name} unixsock clients.
|
|||||||
%patch24 -p1
|
%patch24 -p1
|
||||||
%endif
|
%endif
|
||||||
%patch25
|
%patch25
|
||||||
|
%patch26
|
||||||
|
|
||||||
sed -i 's|@@VERSION@@|%{version}|g' configure.ac
|
sed -i 's|@@VERSION@@|%{version}|g' configure.ac
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user