From: Marc Fournier Date: Tue, 24 Feb 2015 08:57:29 +0000 (+0100) Subject: Merge branch 'collectd-5.3' into collectd-5.4 X-Git-Tag: collectd-5.4.2~2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=587f01f89af11c4acebbec44293528b77c779218;hp=ecbcaadde7dff838f09dfb04c7eb90f126e35abf;p=collectd.git Merge branch 'collectd-5.3' into collectd-5.4 --- diff --git a/configure.ac b/configure.ac index a911e0fe..be5dc72b 100644 --- a/configure.ac +++ b/configure.ac @@ -3139,12 +3139,12 @@ if test "x$with_libperl" = "xyes" \ && test -n "$perl_interpreter" then SAVE_CFLAGS="$CFLAGS" - SAVE_LDFLAGS="$LDFLAGS" + SAVE_LIBS="$LIBS" dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string) PERL_CFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ccopts` - PERL_LDFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts` + PERL_LIBS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts` CFLAGS="$CFLAGS $PERL_CFLAGS" - LDFLAGS="$LDFLAGS $PERL_LDFLAGS" + LIBS="$LIBS $PERL_LIBS" AC_CACHE_CHECK([for libperl], [c_cv_have_libperl], @@ -3171,13 +3171,13 @@ dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string then AC_DEFINE(HAVE_LIBPERL, 1, [Define if libperl is present and usable.]) AC_SUBST(PERL_CFLAGS) - AC_SUBST(PERL_LDFLAGS) + AC_SUBST(PERL_LIBS) else with_libperl="no" fi CFLAGS="$SAVE_CFLAGS" - LDFLAGS="$SAVE_LDFLAGS" + LIBS="$SAVE_LIBS" else if test -z "$perl_interpreter"; then with_libperl="no (no perl interpreter found)" c_cv_have_libperl="no" @@ -3187,9 +3187,9 @@ AM_CONDITIONAL(BUILD_WITH_LIBPERL, test "x$with_libperl" = "xyes") if test "x$with_libperl" = "xyes" then SAVE_CFLAGS="$CFLAGS" - SAVE_LDFLAGS="$LDFLAGS" + SAVE_LIBS="$LIBS" CFLAGS="$CFLAGS $PERL_CFLAGS" - LDFLAGS="$LDFLAGS $PERL_LDFLAGS" + LIBS="$LIBS $PERL_LIBS" AC_CACHE_CHECK([if perl supports ithreads], [c_cv_have_perl_ithreads], @@ -3216,17 +3216,17 @@ then fi CFLAGS="$SAVE_CFLAGS" - LDFLAGS="$SAVE_LDFLAGS" + LIBS="$SAVE_LIBS" fi if test "x$with_libperl" = "xyes" then SAVE_CFLAGS="$CFLAGS" - SAVE_LDFLAGS="$LDFLAGS" + SAVE_LIBS="$LIBS" # trigger an error if Perl_load_module*() uses __attribute__nonnull__(3) # (see issues #41 and #42) CFLAGS="$CFLAGS $PERL_CFLAGS -Wall -Werror" - LDFLAGS="$LDFLAGS $PERL_LDFLAGS" + LIBS="$LIBS $PERL_LIBS" AC_CACHE_CHECK([for broken Perl_load_module()], [c_cv_have_broken_perl_load_module], @@ -3250,7 +3250,7 @@ then ) CFLAGS="$SAVE_CFLAGS" - LDFLAGS="$SAVE_LDFLAGS" + LIBS="$SAVE_LIBS" fi AM_CONDITIONAL(HAVE_BROKEN_PERL_LOAD_MODULE, test "x$c_cv_have_broken_perl_load_module" = "xyes") @@ -3258,9 +3258,9 @@ AM_CONDITIONAL(HAVE_BROKEN_PERL_LOAD_MODULE, if test "x$with_libperl" = "xyes" then SAVE_CFLAGS="$CFLAGS" - SAVE_LDFLAGS="$LDFLAGS" + SAVE_LIBS="$LIBS" CFLAGS="$CFLAGS $PERL_CFLAGS" - LDFLAGS="$LDFLAGS $PERL_LDFLAGS" + LIBS="$LIBS $PERL_LIBS" AC_CHECK_MEMBER( [struct mgvtbl.svt_local], @@ -3279,7 +3279,7 @@ then fi CFLAGS="$SAVE_CFLAGS" - LDFLAGS="$SAVE_LDFLAGS" + LIBS="$SAVE_LIBS" fi # }}} diff --git a/contrib/redhat/collectd.spec b/contrib/redhat/collectd.spec index d6069b2c..c6f7a061 100644 --- a/contrib/redhat/collectd.spec +++ b/contrib/redhat/collectd.spec @@ -14,10 +14,12 @@ # - enable the EPEL repository (http://dl.fedoraproject.org/pub/epel/) in the # configuration files for your target systems (/etc/mock/*.cfg). # -# - copy this file in your ~/rpmbuild/SPECS/ directory -# # - fetch the desired collectd release file from https://collectd.org/files/ -# and save it in your ~/rpmbuild/SOURCES/ directory +# and save it in your ~/rpmbuild/SOURCES/ directory (or build your own out of +# the git repository: ./build.sh && ./configure && make-dist-bz2) +# +# - copy this file in your ~/rpmbuild/SPECS/ directory. Make sure the +# "Version:" tag matches the version from the tarball. # # - build the SRPM first: # mock -r centos-6-x86_64 --buildsrpm --spec ~/rpmbuild/SPECS/collectd.spec \ @@ -34,6 +36,7 @@ # %global _hardened_build 1 +%{?perl_default_filter} # plugins only buildable on RHEL6 # (NB: %{elN} macro is not available on RHEL < 6) @@ -1525,21 +1528,17 @@ rm -rf %{buildroot} %{__mkdir} -p %{buildroot}%{_localstatedir}/www %{__mkdir} -p %{buildroot}/%{_sysconfdir}/httpd/conf.d -%{__cp} -a contrib/collection3 %{buildroot}%{_localstatedir}/www -%{__cp} -a contrib/redhat/collection3.conf %{buildroot}/%{_sysconfdir}/httpd/conf.d/ +%{__mv} contrib/collection3 %{buildroot}%{_localstatedir}/www +%{__mv} contrib/redhat/collection3.conf %{buildroot}/%{_sysconfdir}/httpd/conf.d/ -%{__cp} -a contrib/php-collection %{buildroot}%{_localstatedir}/www -%{__cp} -a contrib/redhat/php-collection.conf %{buildroot}/%{_sysconfdir}/httpd/conf.d/ +%{__mv} contrib/php-collection %{buildroot}%{_localstatedir}/www +%{__mv} contrib/redhat/php-collection.conf %{buildroot}/%{_sysconfdir}/httpd/conf.d/ ### Clean up docs find contrib/ -type f -exec %{__chmod} a-x {} \; # *.la files shouldn't be distributed. rm -f %{buildroot}/%{_libdir}/{collectd/,}*.la -# Move the Perl examples to a separate directory. -mkdir perl-examples -find contrib -name '*.p[lm]' -exec mv {} perl-examples/ \; - # Remove Perl hidden .packlist files. find %{buildroot} -type f -name .packlist -delete # Remove Perl temporary file perllocal.pod @@ -1554,7 +1553,6 @@ rm -f %{buildroot}%{_mandir}/man5/collectd-java.5* %if ! %{with_perl} rm -f %{buildroot}%{_mandir}/man5/collectd-perl.5* rm -f %{buildroot}%{_mandir}/man3/Collectd::Unixsock.3pm* -rm -fr perl-examples/ rm -fr %{buildroot}/usr/lib/perl5/ %endif @@ -1948,7 +1946,6 @@ fi %if %{with_perl} %files perl -%doc perl-examples/* %{perl_vendorlib}/Collectd.pm %{perl_vendorlib}/Collectd/ %{_mandir}/man3/Collectd::Unixsock.3pm* @@ -2060,6 +2057,10 @@ fi - Enabled netlink plugin on RHEL6 and RHEL7 - Allow perl plugin to build on RHEL5 - Add support for RHEL7 +- Misc perl-related improvements: + * prevent rpmbuild from extracting dependencies from files in /usr/share/doc + * don't package collection3 and php-collection twice + * keep perl scripts from contrib/ in collectd-contrib * Wed Apr 10 2013 Marc Fournier 5.3.0-1 - New upstream version diff --git a/src/Makefile.am b/src/Makefile.am index 2abea1f3..405d4ae4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -918,6 +918,7 @@ perl_la_CFLAGS += -Wno-nonnull endif perl_la_LDFLAGS = -module -avoid-version \ $(PERL_LDFLAGS) +perl_la_LIBADD = $(PERL_LIBS) collectd_LDADD += "-dlopen" perl.la collectd_DEPENDENCIES += perl.la endif diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod index 03a14443..3c599ebd 100644 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@ -2795,12 +2795,12 @@ C function for details. Enable the collection of master / slave statistics in a replication setup. In order to be able to get access to these statistics, the user needs special -privileges. See the B documentation above. +privileges. See the B documentation above. Defaults to B. =item B I If enabled, the plugin sends a notification if the replication slave I/O and / -or SQL threads are not running. +or SQL threads are not running. Defaults to B. =back @@ -5052,6 +5052,14 @@ Set the "XFiles Factor". The default is 0.1. If unsure, don't set this option. I must be in the range C<[0.0-1.0)>, i.e. between zero (inclusive) and one (exclusive). +=item B B|B + +When set to B, various statistics about the I daemon will be +collected, with "rrdcached" as the I. Defaults to B. + +Statistics are read via Is socket using the STATS command. +See L for details. + =back =head2 Plugin C diff --git a/src/ipmi.c b/src/ipmi.c index fada5bdc..f23601ea 100644 --- a/src/ipmi.c +++ b/src/ipmi.c @@ -557,7 +557,7 @@ static int thread_init (os_handler_t **ret_os_handler) ipmi_domain_id_t domain_id; int status; - os_handler = ipmi_posix_thread_setup_os_handler (SIGUSR2); + os_handler = ipmi_posix_thread_setup_os_handler (SIGIO); if (os_handler == NULL) { ERROR ("ipmi plugin: ipmi_posix_thread_setup_os_handler failed."); diff --git a/src/write_http.c b/src/write_http.c index 34ea46d9..bfb5524c 100644 --- a/src/write_http.c +++ b/src/write_http.c @@ -506,6 +506,7 @@ static int wh_config_url (oconfig_item_t *ci) /* {{{ */ { wh_callback_t *cb; user_data_t user_data; + char callback_name[DATA_MAX_NAME_LEN]; int i; cb = malloc (sizeof (*cb)); @@ -556,16 +557,18 @@ static int wh_config_url (oconfig_item_t *ci) /* {{{ */ } } - DEBUG ("write_http: Registering write callback with URL %s", + ssnprintf (callback_name, sizeof (callback_name), "write_http/%s", cb->location); + DEBUG ("write_http: Registering write callback '%s' with URL '%s'", + callback_name, cb->location); memset (&user_data, 0, sizeof (user_data)); user_data.data = cb; user_data.free_func = NULL; - plugin_register_flush ("write_http", wh_flush, &user_data); + plugin_register_flush (callback_name, wh_flush, &user_data); user_data.free_func = wh_callback_free; - plugin_register_write ("write_http", wh_write, &user_data); + plugin_register_write (callback_name, wh_write, &user_data); return (0); } /* }}} int wh_config_url */