- Update from version 4.10.9 to 5.12.0 - Update of rootfile - Removal of the patches that were used for version 4.10.9. Checking these they have either been included, are no longer applicable as the involved code is no longer present or were changes specific to BSD or Solaris OS's or were related to plugins that were not enabled on IPFire such as mysql. - If anyone is aware of patches that should be applied to version 5.12.0 then let me know. - Updated the plugin lists to disable some that were enabled such as multimeter and battery. We shouldn't need to use IPFire as a multimeter and it should not really be running on a laptop in battery mode. - Re-arranged the order of the plugins to make them alphabetical again. - Added nut to the enabled plugins. apcupsd was already enabled but nut was not. - Disabled making warnings into errors, updated the librrd directory and specified the libgcrypt directory so that the build was successfull. - collecvtd-5.x supports parallel builds - copied the 4.x to 5.x migration program into IPFire. This is then used when restoring older backups or for the update script for when collectd-5.12.0 is merged. - The change set was installed on my vm and the graphs all worked as expected and got updated. Doing a restore from an earlier backup with the 4.x format of files was correctly migrated and installed. - Changelog is rather large covering everything that has changed and been updated. Details can be found at https://github.com/collectd/collectd/releases
Tested-by: Adolf Belka adolf.belka@ipfire.org Signed-off-by: Adolf Belka adolf.belka@ipfire.org --- config/rootfiles/common/collectd | 188 +++++++++++++++++-------------- lfs/collectd | 68 ++++------- 2 files changed, 123 insertions(+), 133 deletions(-)
diff --git a/config/rootfiles/common/collectd b/config/rootfiles/common/collectd index be7bdf08e..26976dc87 100644 --- a/config/rootfiles/common/collectd +++ b/config/rootfiles/common/collectd @@ -1,244 +1,260 @@ etc/collectd.conf +#etc/collectd.d +etc/collectd.d/info etc/collectd.precache etc/collectd.thermal etc/collectd.vpn -#etc/collectd.d -etc/collectd.d/info etc/rc.d/rc0.d/K50collectd etc/rc.d/rc3.d/S29collectd etc/rc.d/rc6.d/K50collectd #usr/bin/collectd-nagios +#usr/bin/collectd-tg +#usr/bin/collectdctl #usr/etc/collectd.conf #usr/include/collectd #usr/include/collectd/client.h #usr/include/collectd/lcc_features.h +#usr/include/collectd/network.h +#usr/include/collectd/network_buffer.h +#usr/include/collectd/network_parse.h +#usr/include/collectd/server.h +#usr/include/collectd/types.h #usr/lib/collectd -#usr/lib/collectd/apache.a +#usr/lib/collectd/aggregation.la +usr/lib/collectd/aggregation.so #usr/lib/collectd/apache.la usr/lib/collectd/apache.so -#usr/lib/collectd/apcups.a #usr/lib/collectd/apcups.la usr/lib/collectd/apcups.so -#usr/lib/collectd/ascent.a #usr/lib/collectd/ascent.la usr/lib/collectd/ascent.so -#usr/lib/collectd/battery.a -#usr/lib/collectd/battery.la -usr/lib/collectd/battery.so -#usr/lib/collectd/bind.a -#usr/lib/collectd/bind.la -usr/lib/collectd/bind.so -#usr/lib/collectd/conntrack.a +#usr/lib/collectd/buddyinfo.la +usr/lib/collectd/buddyinfo.so +#usr/lib/collectd/cgroups.la +usr/lib/collectd/cgroups.so +#usr/lib/collectd/check_uptime.la +usr/lib/collectd/check_uptime.so +#usr/lib/collectd/chrony.la +usr/lib/collectd/chrony.so #usr/lib/collectd/conntrack.la usr/lib/collectd/conntrack.so -#usr/lib/collectd/contextswitch.a #usr/lib/collectd/contextswitch.la usr/lib/collectd/contextswitch.so -#usr/lib/collectd/cpu.a #usr/lib/collectd/cpu.la usr/lib/collectd/cpu.so -#usr/lib/collectd/cpufreq.a #usr/lib/collectd/cpufreq.la usr/lib/collectd/cpufreq.so -#usr/lib/collectd/curl.a +#usr/lib/collectd/cpusleep.la +usr/lib/collectd/cpusleep.so #usr/lib/collectd/curl.la usr/lib/collectd/curl.so -#usr/lib/collectd/curl_xml.a #usr/lib/collectd/curl_xml.la usr/lib/collectd/curl_xml.so -#usr/lib/collectd/df.a #usr/lib/collectd/df.la usr/lib/collectd/df.so -#usr/lib/collectd/disk.a #usr/lib/collectd/disk.la usr/lib/collectd/disk.so -#usr/lib/collectd/dns.a #usr/lib/collectd/dns.la usr/lib/collectd/dns.so -#usr/lib/collectd/email.a +#usr/lib/collectd/dpdk_telemetry.la +usr/lib/collectd/dpdk_telemetry.so +#usr/lib/collectd/drbd.la +usr/lib/collectd/drbd.so #usr/lib/collectd/email.la usr/lib/collectd/email.so -#usr/lib/collectd/entropy.a #usr/lib/collectd/entropy.la usr/lib/collectd/entropy.so -#usr/lib/collectd/exec.a +#usr/lib/collectd/ethstat.la +usr/lib/collectd/ethstat.so #usr/lib/collectd/exec.la usr/lib/collectd/exec.so -#usr/lib/collectd/filecount.a +#usr/lib/collectd/fhcount.la +usr/lib/collectd/fhcount.so #usr/lib/collectd/filecount.la usr/lib/collectd/filecount.so -#usr/lib/collectd/fscache.a #usr/lib/collectd/fscache.la usr/lib/collectd/fscache.so -#usr/lib/collectd/hddtemp.a #usr/lib/collectd/hddtemp.la usr/lib/collectd/hddtemp.so -#usr/lib/collectd/interface.a +#usr/lib/collectd/hugepages.la +usr/lib/collectd/hugepages.so +#usr/lib/collectd/infiniband.la +usr/lib/collectd/infiniband.so #usr/lib/collectd/interface.la usr/lib/collectd/interface.so -#usr/lib/collectd/iptables.a +#usr/lib/collectd/ipc.la +usr/lib/collectd/ipc.so #usr/lib/collectd/iptables.la usr/lib/collectd/iptables.so -#usr/lib/collectd/irq.a #usr/lib/collectd/irq.la usr/lib/collectd/irq.so -#usr/lib/collectd/load.a #usr/lib/collectd/load.la usr/lib/collectd/load.so -#usr/lib/collectd/logfile.a #usr/lib/collectd/logfile.la usr/lib/collectd/logfile.so -#usr/lib/collectd/madwifi.a +#usr/lib/collectd/logparser.la +usr/lib/collectd/logparser.so #usr/lib/collectd/madwifi.la usr/lib/collectd/madwifi.so -#usr/lib/collectd/match_empty_counter.a #usr/lib/collectd/match_empty_counter.la usr/lib/collectd/match_empty_counter.so -#usr/lib/collectd/match_hashed.a #usr/lib/collectd/match_hashed.la usr/lib/collectd/match_hashed.so -#usr/lib/collectd/match_regex.a #usr/lib/collectd/match_regex.la usr/lib/collectd/match_regex.so -#usr/lib/collectd/match_timediff.a #usr/lib/collectd/match_timediff.la usr/lib/collectd/match_timediff.so -#usr/lib/collectd/match_value.a #usr/lib/collectd/match_value.la usr/lib/collectd/match_value.so -#usr/lib/collectd/memory.a +#usr/lib/collectd/mcelog.la +usr/lib/collectd/mcelog.so +#usr/lib/collectd/md.la +usr/lib/collectd/md.so +#usr/lib/collectd/mdevents.la +usr/lib/collectd/mdevents.so #usr/lib/collectd/memory.la usr/lib/collectd/memory.so -#usr/lib/collectd/multimeter.a -#usr/lib/collectd/multimeter.la -usr/lib/collectd/multimeter.so -#usr/lib/collectd/network.a #usr/lib/collectd/network.la usr/lib/collectd/network.so -#usr/lib/collectd/nfs.a #usr/lib/collectd/nfs.la usr/lib/collectd/nfs.so -#usr/lib/collectd/ntpd.a +#usr/lib/collectd/notify_nagios.la +usr/lib/collectd/notify_nagios.so #usr/lib/collectd/ntpd.la usr/lib/collectd/ntpd.so -#usr/lib/collectd/olsrd.a +#usr/lib/collectd/numa.la +usr/lib/collectd/numa.so +#usr/lib/collectd/nut.la +usr/lib/collectd/nut.so #usr/lib/collectd/olsrd.la usr/lib/collectd/olsrd.so -#usr/lib/collectd/openvpn.a +#usr/lib/collectd/openldap.la +usr/lib/collectd/openldap.so #usr/lib/collectd/openvpn.la usr/lib/collectd/openvpn.so -#usr/lib/collectd/ping.a +#usr/lib/collectd/pcie_errors.la +usr/lib/collectd/pcie_errors.so #usr/lib/collectd/ping.la usr/lib/collectd/ping.so -#usr/lib/collectd/powerdns.a #usr/lib/collectd/powerdns.la usr/lib/collectd/powerdns.so -#usr/lib/collectd/processes.a #usr/lib/collectd/processes.la usr/lib/collectd/processes.so -#usr/lib/collectd/protocols.a #usr/lib/collectd/protocols.la usr/lib/collectd/protocols.so -#usr/lib/collectd/rrdcached.a +#usr/lib/collectd/python.la +usr/lib/collectd/python.so #usr/lib/collectd/rrdcached.la usr/lib/collectd/rrdcached.so -#usr/lib/collectd/rrdtool.a #usr/lib/collectd/rrdtool.la usr/lib/collectd/rrdtool.so -#usr/lib/collectd/sensors.a #usr/lib/collectd/sensors.la usr/lib/collectd/sensors.so -#usr/lib/collectd/swap.a +#usr/lib/collectd/snmp_agent.la +usr/lib/collectd/snmp_agent.so +#usr/lib/collectd/statsd.la +usr/lib/collectd/statsd.so #usr/lib/collectd/swap.la usr/lib/collectd/swap.so -#usr/lib/collectd/syslog.a +#usr/lib/collectd/synproxy.la +usr/lib/collectd/synproxy.so #usr/lib/collectd/syslog.la usr/lib/collectd/syslog.so -#usr/lib/collectd/table.a #usr/lib/collectd/table.la usr/lib/collectd/table.so -#usr/lib/collectd/tail.a #usr/lib/collectd/tail.la usr/lib/collectd/tail.so -#usr/lib/collectd/target_notification.a +#usr/lib/collectd/tail_csv.la +usr/lib/collectd/tail_csv.so #usr/lib/collectd/target_notification.la usr/lib/collectd/target_notification.so -#usr/lib/collectd/target_replace.a #usr/lib/collectd/target_replace.la usr/lib/collectd/target_replace.so -#usr/lib/collectd/target_scale.a #usr/lib/collectd/target_scale.la usr/lib/collectd/target_scale.so -#usr/lib/collectd/target_set.a #usr/lib/collectd/target_set.la usr/lib/collectd/target_set.so -#usr/lib/collectd/tcpconns.a +#usr/lib/collectd/target_v5upgrade.la +usr/lib/collectd/target_v5upgrade.so #usr/lib/collectd/tcpconns.la usr/lib/collectd/tcpconns.so -#usr/lib/collectd/teamspeak2.a #usr/lib/collectd/teamspeak2.la usr/lib/collectd/teamspeak2.so -#usr/lib/collectd/ted.a #usr/lib/collectd/ted.la usr/lib/collectd/ted.so -#usr/lib/collectd/thermal.a #usr/lib/collectd/thermal.la usr/lib/collectd/thermal.so -#usr/lib/collectd/unixsock.a +#usr/lib/collectd/threshold.la +usr/lib/collectd/threshold.so +#usr/lib/collectd/turbostat.la +usr/lib/collectd/turbostat.so +#usr/lib/collectd/ubi.la +usr/lib/collectd/ubi.so #usr/lib/collectd/unixsock.la usr/lib/collectd/unixsock.so -#usr/lib/collectd/uptime.a #usr/lib/collectd/uptime.la usr/lib/collectd/uptime.so -#usr/lib/collectd/users.a #usr/lib/collectd/users.la usr/lib/collectd/users.so -#usr/lib/collectd/uuid.a #usr/lib/collectd/uuid.la usr/lib/collectd/uuid.so -#usr/lib/collectd/vmem.a #usr/lib/collectd/vmem.la usr/lib/collectd/vmem.so -#usr/lib/collectd/wireless.a #usr/lib/collectd/wireless.la usr/lib/collectd/wireless.so -#usr/lib/collectd/write_http.a +#usr/lib/collectd/write_graphite.la +usr/lib/collectd/write_graphite.so #usr/lib/collectd/write_http.la usr/lib/collectd/write_http.so -#usr/lib/libcollectdclient.a +#usr/lib/collectd/write_influxdb_udp.la +usr/lib/collectd/write_influxdb_udp.so +#usr/lib/collectd/write_log.la +usr/lib/collectd/write_log.so +#usr/lib/collectd/write_sensu.la +usr/lib/collectd/write_sensu.so +#usr/lib/collectd/write_syslog.la +usr/lib/collectd/write_syslog.so +#usr/lib/collectd/write_tsdb.la +usr/lib/collectd/write_tsdb.so +#usr/lib/collectd/zfs_arc.la +usr/lib/collectd/zfs_arc.so +#usr/lib/collectd/zookeeper.la +usr/lib/collectd/zookeeper.so #usr/lib/libcollectdclient.la usr/lib/libcollectdclient.so -usr/lib/libcollectdclient.so.0 -usr/lib/libcollectdclient.so.0.0.0 -#usr/lib/perl5/Collectd -#usr/lib/perl5/Collectd.pm -#usr/lib/perl5/Collectd/Plugins -#usr/lib/perl5/Collectd/Plugins/OpenVZ.pm -#usr/lib/perl5/Collectd/Unixsock.pm -#usr/lib/perl5/xxxMACHINExxx-linux-thread-multi -#usr/lib/perl5/xxxMACHINExxx-linux-thread-multi/auto -#usr/lib/perl5/xxxMACHINExxx-linux-thread-multi/auto/Collectd -#usr/lib/perl5/xxxMACHINExxx-linux-thread-multi/auto/Collectd/.packlist -#usr/lib/perl5/xxxMACHINExxx-linux-thread-multi/perllocal.pod +usr/lib/libcollectdclient.so.1 +usr/lib/libcollectdclient.so.1.1.0 +#usr/lib/perl5/site_perl/5.36.0/Collectd +#usr/lib/perl5/site_perl/5.36.0/Collectd.pm +#usr/lib/perl5/site_perl/5.36.0/Collectd/Plugins +#usr/lib/perl5/site_perl/5.36.0/Collectd/Plugins/OpenVZ.pm +#usr/lib/perl5/site_perl/5.36.0/Collectd/Unixsock.pm +#usr/lib/perl5/site_perl/5.36.0/x86_64-linux-thread-multi/auto/Collectd +#usr/lib/perl5/site_perl/5.36.0/x86_64-linux-thread-multi/auto/Collectd/.packlist #usr/lib/pkgconfig/libcollectdclient.pc -#usr/man/man3/Collectd::Unixsock.3 usr/sbin/collectd usr/sbin/collectdmon #usr/share/collectd #usr/share/collectd/postgresql_default.conf usr/share/collectd/types.db #usr/share/man/man1/collectd-nagios.1 +#usr/share/man/man1/collectd-tg.1 #usr/share/man/man1/collectd.1 +#usr/share/man/man1/collectdctl.1 #usr/share/man/man1/collectdmon.1 +#usr/share/man/man3/Collectd::Unixsock.3 #usr/share/man/man5/collectd-email.5 #usr/share/man/man5/collectd-exec.5 #usr/share/man/man5/collectd-java.5 +#usr/share/man/man5/collectd-lua.5 #usr/share/man/man5/collectd-perl.5 #usr/share/man/man5/collectd-python.5 #usr/share/man/man5/collectd-snmp.5 +#usr/share/man/man5/collectd-threshold.5 #usr/share/man/man5/collectd-unixsock.5 #usr/share/man/man5/collectd.conf.5 #usr/share/man/man5/types.db.5 +var/ipfire/collectd-migrate-4-to-5.pl var/ipfire/ovpn/collectd.vpn #var/lib/collectd etc/rc.d/init.d/collectd diff --git a/lfs/collectd b/lfs/collectd index 0abd91cc4..f7e6ee206 100644 --- a/lfs/collectd +++ b/lfs/collectd @@ -25,7 +25,7 @@ include Config
PKG_NAME = collectd -VER = 4.10.9 +VER = 5.12.0
THISAPP = collectd-$(VER) DL_FILE = $(THISAPP).tar.bz2 @@ -50,7 +50,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_BLAKE2 = 041dd39d29b70f6e69c36f7c86c751ad52f50e728d623539bcb7dddb980d00b2dc2d9bd6d757b33863cb2376cee90c4d06431827e1bb4d40b59dd0860b337901 +$(DL_FILE)_BLAKE2 = 9567c55b47c0ea5b7836c0d858c16a637c4a2054486a9d9ca6cd9951a92381bdf4f49d7dc0be0c9c9131802120d0af2e542a3997f01484c89ba135b3c46db795
install : $(TARGET)
@@ -84,56 +84,30 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) $(UPDATE_AUTOMAKE) - cd $(DIR_APP) && find . -name "Makefile.*" | xargs sed -e "s/-Werror//g" -i - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/0001-src-utils_mount.h-Add-stdio.h.patch - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/0002-Don-t-notify-continuously-when-MySQL-slave-SQL-threa.patch - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/0003-curl_xml.c-avoid-using-uninitalized-variable-in-erro.patch - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/0004-interface.c-FreeBSD-10-support.patch - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/0005-Revert-curl_xml.c-avoid-using-uninitalized-variable-.patch - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/0006-network-set_thread_cbs-so-we-initialize-the-right-th.patch - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/0007-apache-plugin-Call-curl_global_init-from-the-init-fu.patch - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/0008-network-comment-libgcrypt-initalization-process.patch - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/0009-Call-curl_global_init-in-_init-of-plugins-using-curl.patch - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/0010-indent-wh_init-to-be-consistent-with-the-rest-of-the.patch - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/0011-Configparser-when-we-alocate-an-empty-list-we-also-n.patch - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/0012-don-t-assume-pkg-config-is-in-PATH.patch - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/0013-add-missing-backticks-which-broke-the-build.patch - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/0014-snmp-free-snmp_pdu-struct-allocated-by-snmp_pdu_crea.patch - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/0015-curl_xml-plugin-Fixed-tautological-pointer-compariso.patch - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/0016-Add-support-for-OpenVPN-2.3.0-status-files.patch - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/0017-openvpn-plugin-Don-t-signal-an-error-when-no-clients.patch - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/0018-openvpn-Remove-boguous-file-handler-check.patch - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/0019-openvpn-Ignore-not-fully-established-connections.patch - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/0020-openvpn-Make-read-functions-robust-like-in-8516f9abb.patch - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/0021-openvpn-Fix-copy-and-paste-error.patch - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/0022-openvpn-Change-data-type-from-COUNTER-to-DERIVE.patch - cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/collectd/collectd-4.10.9-cpufreq_skip_disabled_cores.patch - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/silence-openvpn-errors.patch - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd-4.10.9-xfs-compile-fix.patch - cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd-4.10-libiptc-build-fixes.patch - cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/collectd-4.10.9-remove-checks-for-SENSORS_API_VERSION-upper-limit.patch - cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/collectd-4.10-drop-linux-disk-module.patch - cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/collectd-4.10.9-fix-glibc-headers.patch - - cd $(DIR_APP) && autoupdate -v configure.in - cd $(DIR_APP) && autoreconf -vfi - cd $(DIR_APP)/libltdl && autoreconf -vfi - cd $(DIR_APP) && ./configure --prefix=/usr --localstatedir=/var \ - --disable-{apple_sensors,csv,ipvs,mbmon,memcached,mysql} \ - --disable-{netlink,nginx,nut,perl,serial,snmp,tape,vserver,xmms} \ - --disable-{perl,serial,snmp,tape,vserver,xmms} \ - --enable-{apcups,battery,cpu{,freq},df,disk,dns,email,entropy,exec,hddtemp} \ - --enable-{interface,iptables,irq,load,logfile,memory,multimeter} \ - --enable-{network,nfs,ntpd,ping,processes,rrdtool,sensors,swap,syslog} \ - --enable-{tcpconns,unixsock,users,wireless} \ - --with-librrd=/usr/share/rrdtool-1.2.30 \ - --with-fp-layout=nothing - cd $(DIR_APP) && make install #collectd-4 does not support parallel build + cd $(DIR_APP) && ./configure \ + --prefix=/usr \ + --localstatedir=/var \ + --disable-{apple_sensors,battery,bind,csv,ipvs,mbmon} \ + --disable-{memcached,multimeter,mysql,netlink,nginx} \ + --disable-{perl,serial,snmp,tape,vserver,xmms} \ + --enable-{apcups,cpu{,freq},df,disk,dns,email,entropy,exec,hddtemp} \ + --enable-{interface,iptables,irq,load,logfile,memory,network} \ + --enable-{nfs,ntpd,nut,ping,processes,rrdtool,sensors,swap,syslog} \ + --enable-{tcpconns,unixsock,users,wireless} \ + --with-librrd=/usr/lib \ + --with-fp-layout=nothing \ + --disable-werror \ + --with-libgcrypt=/usr \ + GCRYPT_LIBS=-lgcrypt + cd $(DIR_APP) && make $(MAKETUNING) + cd $(DIR_APP) && make install mkdir /etc/collectd.d echo "# Put custom configfiles in this folder" > /etc/collectd.d/info cp -vf $(DIR_SRC)/config/collectd/collectd.* /etc/ mv /etc/collectd.vpn /var/ipfire/ovpn/collectd.vpn chown nobody.nobody /var/ipfire/ovpn/collectd.vpn + # install the collectd 4.x to 5.x migration program + install -v -m 755 -o root $(DIR_APP)/contrib/migrate-4-5.px /var/ipfire/collectd-migrate-4-to-5.pl ln -f -s ../var/ipfire/ovpn/collectd.vpn /etc/collectd.vpn ln -f -s ../init.d/collectd /etc/rc.d/rc0.d/K50collectd ln -f -s ../init.d/collectd /etc/rc.d/rc3.d/S29collectd
Tested-by: Adolof Belka adolf.belka@ipfire.org Signed-off-by: Adolf Belka adolf.belka@ipfire.org --- .../0001-src-utils_mount.h-Add-stdio.h.patch | 28 --- ...tinuously-when-MySQL-slave-SQL-threa.patch | 27 --- ...-using-uninitalized-variable-in-erro.patch | 34 ---- .../0004-interface.c-FreeBSD-10-support.patch | 52 ------ ...c-avoid-using-uninitalized-variable-.patch | 40 ----- ...ad_cbs-so-we-initialize-the-right-th.patch | 28 --- ...ll-curl_global_init-from-the-init-fu.patch | 40 ----- ...ment-libgcrypt-initalization-process.patch | 33 ---- ..._init-in-_init-of-plugins-using-curl.patch | 99 ----------- ...o-be-consistent-with-the-rest-of-the.patch | 32 ---- ...n-we-alocate-an-empty-list-we-also-n.patch | 41 ----- ...2-don-t-assume-pkg-config-is-in-PATH.patch | 86 ---------- ...sing-backticks-which-broke-the-build.patch | 40 ----- ...du-struct-allocated-by-snmp_pdu_crea.patch | 29 ---- ...Fixed-tautological-pointer-compariso.patch | 28 --- ...pport-for-OpenVPN-2.3.0-status-files.patch | 160 ------------------ ...on-t-signal-an-error-when-no-clients.patch | 56 ------ ...pn-Remove-boguous-file-handler-check.patch | 26 --- ...re-not-fully-established-connections.patch | 59 ------- ...d-functions-robust-like-in-8516f9abb.patch | 102 ----------- ...021-openvpn-Fix-copy-and-paste-error.patch | 25 --- ...nge-data-type-from-COUNTER-to-DERIVE.patch | 107 ------------ ...d-4.10.9-cpufreq_skip_disabled_cores.patch | 18 -- .../collectd/silence-openvpn-errors.patch | 64 ------- 24 files changed, 1254 deletions(-) delete mode 100644 src/patches/collectd/0001-src-utils_mount.h-Add-stdio.h.patch delete mode 100644 src/patches/collectd/0002-Don-t-notify-continuously-when-MySQL-slave-SQL-threa.patch delete mode 100644 src/patches/collectd/0003-curl_xml.c-avoid-using-uninitalized-variable-in-erro.patch delete mode 100644 src/patches/collectd/0004-interface.c-FreeBSD-10-support.patch delete mode 100644 src/patches/collectd/0005-Revert-curl_xml.c-avoid-using-uninitalized-variable-.patch delete mode 100644 src/patches/collectd/0006-network-set_thread_cbs-so-we-initialize-the-right-th.patch delete mode 100644 src/patches/collectd/0007-apache-plugin-Call-curl_global_init-from-the-init-fu.patch delete mode 100644 src/patches/collectd/0008-network-comment-libgcrypt-initalization-process.patch delete mode 100644 src/patches/collectd/0009-Call-curl_global_init-in-_init-of-plugins-using-curl.patch delete mode 100644 src/patches/collectd/0010-indent-wh_init-to-be-consistent-with-the-rest-of-the.patch delete mode 100644 src/patches/collectd/0011-Configparser-when-we-alocate-an-empty-list-we-also-n.patch delete mode 100644 src/patches/collectd/0012-don-t-assume-pkg-config-is-in-PATH.patch delete mode 100644 src/patches/collectd/0013-add-missing-backticks-which-broke-the-build.patch delete mode 100644 src/patches/collectd/0014-snmp-free-snmp_pdu-struct-allocated-by-snmp_pdu_crea.patch delete mode 100644 src/patches/collectd/0015-curl_xml-plugin-Fixed-tautological-pointer-compariso.patch delete mode 100644 src/patches/collectd/0016-Add-support-for-OpenVPN-2.3.0-status-files.patch delete mode 100644 src/patches/collectd/0017-openvpn-plugin-Don-t-signal-an-error-when-no-clients.patch delete mode 100644 src/patches/collectd/0018-openvpn-Remove-boguous-file-handler-check.patch delete mode 100644 src/patches/collectd/0019-openvpn-Ignore-not-fully-established-connections.patch delete mode 100644 src/patches/collectd/0020-openvpn-Make-read-functions-robust-like-in-8516f9abb.patch delete mode 100644 src/patches/collectd/0021-openvpn-Fix-copy-and-paste-error.patch delete mode 100644 src/patches/collectd/0022-openvpn-Change-data-type-from-COUNTER-to-DERIVE.patch delete mode 100644 src/patches/collectd/collectd-4.10.9-cpufreq_skip_disabled_cores.patch delete mode 100644 src/patches/collectd/silence-openvpn-errors.patch
diff --git a/src/patches/collectd/0001-src-utils_mount.h-Add-stdio.h.patch b/src/patches/collectd/0001-src-utils_mount.h-Add-stdio.h.patch deleted file mode 100644 index 7391fbfcb..000000000 --- a/src/patches/collectd/0001-src-utils_mount.h-Add-stdio.h.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 4bbfb2b9f391f273744163cfda7bec96671e9d9c Mon Sep 17 00:00:00 2001 -From: Florian Forster octo@collectd.org -Date: Thu, 18 Apr 2013 06:25:58 +0200 -Subject: [PATCH 01/22] src/utils_mount.h: Add <stdio.h>. - -This is required on Solaris 10. Thanks to dannypoo@ for reporting this -problem. - -Github: #306 ---- - src/utils_mount.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/utils_mount.h b/src/utils_mount.h -index 1f2403c..83f789b 100644 ---- a/src/utils_mount.h -+++ b/src/utils_mount.h -@@ -26,6 +26,7 @@ - #ifndef COLLECTD_UTILS_MOUNT_H - #define COLLECTD_UTILS_MOUNT_H 1 - -+#include <stdio.h> - #if HAVE_FS_INFO_H - # include <fs_info.h> - #endif --- -1.9.3 - diff --git a/src/patches/collectd/0002-Don-t-notify-continuously-when-MySQL-slave-SQL-threa.patch b/src/patches/collectd/0002-Don-t-notify-continuously-when-MySQL-slave-SQL-threa.patch deleted file mode 100644 index f0beb39a2..000000000 --- a/src/patches/collectd/0002-Don-t-notify-continuously-when-MySQL-slave-SQL-threa.patch +++ /dev/null @@ -1,27 +0,0 @@ -From f2391b9da6127e4acd5b54b7ae6c2d585df0e2a0 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Joaqu=C3=ADn=20Cuenca=20Abela?= e98cuenc@gmail.com -Date: Wed, 29 May 2013 16:22:09 +0200 -Subject: [PATCH 02/22] Don't notify continuously when MySQL slave SQL thread - is running - -Signed-off-by: Florian Forster octo@collectd.org ---- - src/mysql.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/mysql.c b/src/mysql.c -index 8b3cd21..f93a442 100644 ---- a/src/mysql.c -+++ b/src/mysql.c -@@ -689,7 +689,7 @@ static int mysql_read_slave_stats (mysql_database_t *db, MYSQL *con) - ssnprintf (n.message, sizeof (n.message), - "slave SQL thread started"); - plugin_dispatch_notification (&n); -- db->slave_sql_running = 0; -+ db->slave_sql_running = 1; - } - } - --- -1.9.3 - diff --git a/src/patches/collectd/0003-curl_xml.c-avoid-using-uninitalized-variable-in-erro.patch b/src/patches/collectd/0003-curl_xml.c-avoid-using-uninitalized-variable-in-erro.patch deleted file mode 100644 index 4011dd812..000000000 --- a/src/patches/collectd/0003-curl_xml.c-avoid-using-uninitalized-variable-in-erro.patch +++ /dev/null @@ -1,34 +0,0 @@ -From bbbf37d55a3959951604c4be482e9a705a0f86d9 Mon Sep 17 00:00:00 2001 -From: Marc Fournier marc.fournier@camptocamp.com -Date: Tue, 7 Jan 2014 11:30:59 +0100 -Subject: [PATCH 03/22] curl_xml.c: avoid using uninitalized variable in error - message - -Thanks to @trtrmitya for reporting this. Fixes GH#507 ---- - src/curl_xml.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/curl_xml.c b/src/curl_xml.c -index 75f5cc3..77aee60 100644 ---- a/src/curl_xml.c -+++ b/src/curl_xml.c -@@ -551,12 +551,12 @@ static int cx_curl_perform (cx_t *db, CURL *curl) /* {{{ */ - char *ptr; - char *url; - -- db->buffer_fill = 0; -+ db->buffer_fill = 0; - status = curl_easy_perform (curl); - if (status != CURLE_OK) - { -- ERROR ("curl_xml plugin: curl_easy_perform failed with status %i: %s (%s)", -- status, db->curl_errbuf, url); -+ ERROR ("curl_xml plugin: curl_easy_perform failed with status %i: %s", -+ status, db->curl_errbuf); - return (-1); - } - --- -1.9.3 - diff --git a/src/patches/collectd/0004-interface.c-FreeBSD-10-support.patch b/src/patches/collectd/0004-interface.c-FreeBSD-10-support.patch deleted file mode 100644 index cc7067dfd..000000000 --- a/src/patches/collectd/0004-interface.c-FreeBSD-10-support.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 645dadb3fcc466e8880fda4eb23b21ad433631fc Mon Sep 17 00:00:00 2001 -From: Marc Fournier marc.fournier@camptocamp.com -Date: Tue, 7 Jan 2014 16:06:10 +0100 -Subject: [PATCH 04/22] interface.c: FreeBSD-10 support - -Quoting @trtrmitya in github issue #506 : "[...] it is broken on -FreeBSD-10, in which getifaddrs() returns not only link level stats for -a particular interface, but also entries for each IP configured on that -interface. As a result if_submit() is called several times for each -interface, which results in incorrect data being logged. - -I am attaching a patch which fixes a problem on FreeBSD (9/10), but it -should work for every *BSD because [...] the getifaddrs implementation -first appeared in BSDi BSD/OS." - -Many thanks to @trtrmitya for providing the patch ! ---- - src/interface.c | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -diff --git a/src/interface.c b/src/interface.c -index db998a3..9b566ea 100644 ---- a/src/interface.c -+++ b/src/interface.c -@@ -213,18 +213,19 @@ static int interface_read (void) - - for (if_ptr = if_list; if_ptr != NULL; if_ptr = if_ptr->ifa_next) - { -- if ((if_data = (struct IFA_DATA *) if_ptr->ifa_data) == NULL) -- continue; -+ if (if_ptr->ifa_addr != NULL && if_ptr->ifa_addr->sa_family == AF_LINK) { -+ if_data = (struct IFA_DATA *) if_ptr->ifa_data; - -- if_submit (if_ptr->ifa_name, "if_octets", -+ if_submit (if_ptr->ifa_name, "if_octets", - if_data->IFA_RX_BYTES, - if_data->IFA_TX_BYTES); -- if_submit (if_ptr->ifa_name, "if_packets", -+ if_submit (if_ptr->ifa_name, "if_packets", - if_data->IFA_RX_PACKT, - if_data->IFA_TX_PACKT); -- if_submit (if_ptr->ifa_name, "if_errors", -+ if_submit (if_ptr->ifa_name, "if_errors", - if_data->IFA_RX_ERROR, - if_data->IFA_TX_ERROR); -+ } - } - - freeifaddrs (if_list); --- -1.9.3 - diff --git a/src/patches/collectd/0005-Revert-curl_xml.c-avoid-using-uninitalized-variable-.patch b/src/patches/collectd/0005-Revert-curl_xml.c-avoid-using-uninitalized-variable-.patch deleted file mode 100644 index 3534cded3..000000000 --- a/src/patches/collectd/0005-Revert-curl_xml.c-avoid-using-uninitalized-variable-.patch +++ /dev/null @@ -1,40 +0,0 @@ -From cde09b547abbeb7595d91259fcc628504d0f55a9 Mon Sep 17 00:00:00 2001 -From: Marc Fournier marc.fournier@camptocamp.com -Date: Wed, 8 Jan 2014 18:05:40 +0100 -Subject: [PATCH 05/22] Revert "curl_xml.c: avoid using uninitalized variable - in error message" - -This reverts commit bbbf37d55a3959951604c4be482e9a705a0f86d9. - -A different fix for this problem was commited to the collectd-5.4 branch -(8327ee64) and conflicts with this patch. Also, initializing url the -same way as 8327ee64 does it, to avoid a merge conflict. ---- - src/curl_xml.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/src/curl_xml.c b/src/curl_xml.c -index 77aee60..b941f02 100644 ---- a/src/curl_xml.c -+++ b/src/curl_xml.c -@@ -550,13 +550,14 @@ static int cx_curl_perform (cx_t *db, CURL *curl) /* {{{ */ - long rc; - char *ptr; - char *url; -+ url = db->url; - -- db->buffer_fill = 0; -+ db->buffer_fill = 0; - status = curl_easy_perform (curl); - if (status != CURLE_OK) - { -- ERROR ("curl_xml plugin: curl_easy_perform failed with status %i: %s", -- status, db->curl_errbuf); -+ ERROR ("curl_xml plugin: curl_easy_perform failed with status %i: %s (%s)", -+ status, db->curl_errbuf, url); - return (-1); - } - --- -1.9.3 - diff --git a/src/patches/collectd/0006-network-set_thread_cbs-so-we-initialize-the-right-th.patch b/src/patches/collectd/0006-network-set_thread_cbs-so-we-initialize-the-right-th.patch deleted file mode 100644 index 460f4b542..000000000 --- a/src/patches/collectd/0006-network-set_thread_cbs-so-we-initialize-the-right-th.patch +++ /dev/null @@ -1,28 +0,0 @@ -From ddffda7a150cd3abdb6ec392b514a250e91e0c19 Mon Sep 17 00:00:00 2001 -From: Chris Lundquist chris.lundquist@github.com -Date: Tue, 14 Jan 2014 18:33:13 -0800 -Subject: [PATCH 06/22] [network] set_thread_cbs so we initialize the right - threading mode in gcry_check_version - -Signed-off-by: Florian Forster octo@collectd.org ---- - src/network.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/network.c b/src/network.c -index d0ff6bc..be82c6f 100644 ---- a/src/network.c -+++ b/src/network.c -@@ -500,8 +500,8 @@ static void network_init_gcrypt (void) /* {{{ */ - if (gcry_control (GCRYCTL_ANY_INITIALIZATION_P)) - return; - -- gcry_check_version (NULL); /* before calling any other functions */ - gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); -+ gcry_check_version (NULL); /* before calling *almost* any other functions */ - gcry_control (GCRYCTL_INIT_SECMEM, 32768); - gcry_control (GCRYCTL_INITIALIZATION_FINISHED); - } /* }}} void network_init_gcrypt */ --- -1.9.3 - diff --git a/src/patches/collectd/0007-apache-plugin-Call-curl_global_init-from-the-init-fu.patch b/src/patches/collectd/0007-apache-plugin-Call-curl_global_init-from-the-init-fu.patch deleted file mode 100644 index 8408337e7..000000000 --- a/src/patches/collectd/0007-apache-plugin-Call-curl_global_init-from-the-init-fu.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 5f2f969335757f31f42cd8bb7e38eb8c5fe5e56e Mon Sep 17 00:00:00 2001 -From: Florian Forster octo@collectd.org -Date: Wed, 15 Jan 2014 23:47:33 +0100 -Subject: [PATCH 07/22] apache plugin: Call curl_global_init() from the init - function. - -This is a shot in the dark in trying to address #513. By calling this -from an init() callback, I hope to be initializing the curl and gcrypt -libraries before collectd becomes multi-threaded, avoiding the problems -described in the issue. ---- - src/apache.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/src/apache.c b/src/apache.c -index 899c21e..23bba3e 100644 ---- a/src/apache.c -+++ b/src/apache.c -@@ -702,9 +702,18 @@ static int apache_read_host (user_data_t *user_data) /* {{{ */ - return (0); - } /* }}} int apache_read_host */ - -+static int apache_init (void) /* {{{ */ -+{ -+ /* Call this while collectd is still single-threaded to avoid -+ * initialization issues in libgcrypt. */ -+ curl_global_init (CURL_GLOBAL_SSL); -+ return (0); -+} /* }}} int apache_init */ -+ - void module_register (void) - { - plugin_register_complex_config ("apache", config); -+ plugin_register_init ("apache", apache_init); - } /* void module_register */ - - /* vim: set sw=8 noet fdm=marker : */ --- -1.9.3 - diff --git a/src/patches/collectd/0008-network-comment-libgcrypt-initalization-process.patch b/src/patches/collectd/0008-network-comment-libgcrypt-initalization-process.patch deleted file mode 100644 index 9499328a5..000000000 --- a/src/patches/collectd/0008-network-comment-libgcrypt-initalization-process.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 793c2046de1ac04689d541a5e83513fe8e62578c Mon Sep 17 00:00:00 2001 -From: Marc Fournier marc.fournier@camptocamp.com -Date: Thu, 16 Jan 2014 00:30:42 +0100 -Subject: [PATCH 08/22] network: comment libgcrypt initalization process - ---- - src/network.c | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/src/network.c b/src/network.c -index be82c6f..f379a5c 100644 ---- a/src/network.c -+++ b/src/network.c -@@ -500,8 +500,15 @@ static void network_init_gcrypt (void) /* {{{ */ - if (gcry_control (GCRYCTL_ANY_INITIALIZATION_P)) - return; - -+ /* http://www.gnupg.org/documentation/manuals/gcrypt/Multi_002dThreading.html -+ * To ensure thread-safety, it's important to set GCRYCTL_SET_THREAD_CBS -+ * *before* initalizing Libgcrypt with gcry_check_version(), which itself must -+ * be called before any other gcry_* function. GCRYCTL_ANY_INITIALIZATION_P -+ * above doesn't count, as it doesn't implicitly initalize Libgcrypt. -+ * -+ * tl;dr: keep all these gry_* statements in this exact order please. */ - gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); -- gcry_check_version (NULL); /* before calling *almost* any other functions */ -+ gcry_check_version (NULL); - gcry_control (GCRYCTL_INIT_SECMEM, 32768); - gcry_control (GCRYCTL_INITIALIZATION_FINISHED); - } /* }}} void network_init_gcrypt */ --- -1.9.3 - diff --git a/src/patches/collectd/0009-Call-curl_global_init-in-_init-of-plugins-using-curl.patch b/src/patches/collectd/0009-Call-curl_global_init-in-_init-of-plugins-using-curl.patch deleted file mode 100644 index a2c3ef522..000000000 --- a/src/patches/collectd/0009-Call-curl_global_init-in-_init-of-plugins-using-curl.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 66b400ab01b8133e450bb002e175117a1ab6f9ae Mon Sep 17 00:00:00 2001 -From: Jeremy Katz jeremy@katzbox.net -Date: Sun, 26 Jan 2014 20:43:19 -0500 -Subject: [PATCH 09/22] Call curl_global_init() in _init of plugins using curl - -Need to call curl_global_init() or curl_easy_init() during init -for plugins when we're still running single threaded. This -updates the remaining ones ---- - src/curl.c | 1 + - src/curl_json.c | 9 +++++++++ - src/curl_xml.c | 9 +++++++++ - src/write_http.c | 9 +++++++++ - 4 files changed, 28 insertions(+) - -diff --git a/src/curl.c b/src/curl.c -index 3899aaa..8d2893f 100644 ---- a/src/curl.c -+++ b/src/curl.c -@@ -566,6 +566,7 @@ static int cc_init (void) /* {{{ */ - INFO ("curl plugin: No pages have been defined."); - return (-1); - } -+ curl_global_init (CURL_GLOBAL_SSL); - return (0); - } /* }}} int cc_init */ - -diff --git a/src/curl_json.c b/src/curl_json.c -index 24e1df1..0948962 100644 ---- a/src/curl_json.c -+++ b/src/curl_json.c -@@ -882,9 +882,18 @@ static int cj_read (user_data_t *ud) /* {{{ */ - return cj_curl_perform (db, db->curl); - } /* }}} int cj_read */ - -+static int cj_init (void) /* {{{ */ -+{ -+ /* Call this while collectd is still single-threaded to avoid -+ * initialization issues in libgcrypt. */ -+ curl_global_init (CURL_GLOBAL_SSL); -+ return (0); -+} /* }}} int cj_init */ -+ - void module_register (void) - { - plugin_register_complex_config ("curl_json", cj_config); -+ plugin_register_init ("curl_json", cj_init); - } /* void module_register */ - - /* vim: set sw=2 sts=2 et fdm=marker : */ -diff --git a/src/curl_xml.c b/src/curl_xml.c -index b941f02..e31e73d 100644 ---- a/src/curl_xml.c -+++ b/src/curl_xml.c -@@ -926,9 +926,18 @@ static int cx_config (oconfig_item_t *ci) /* {{{ */ - return (0); - } /* }}} int cx_config */ - -+static int cx_init (void) /* {{{ */ -+{ -+ /* Call this while collectd is still single-threaded to avoid -+ * initialization issues in libgcrypt. */ -+ curl_global_init (CURL_GLOBAL_SSL); -+ return (0); -+} /* }}} int cx_init */ -+ - void module_register (void) - { - plugin_register_complex_config ("curl_xml", cx_config); -+ plugin_register_init ("curl_xml", cx_init); - } /* void module_register */ - - /* vim: set sw=2 sts=2 et fdm=marker : */ -diff --git a/src/write_http.c b/src/write_http.c -index 62c73b0..04c637b 100644 ---- a/src/write_http.c -+++ b/src/write_http.c -@@ -656,9 +656,18 @@ static int wh_config (oconfig_item_t *ci) /* {{{ */ - return (0); - } /* }}} int wh_config */ - -+static int wh_init (void) /* {{{ */ -+{ -+ /* Call this while collectd is still single-threaded to avoid -+ * initialization issues in libgcrypt. */ -+ curl_global_init (CURL_GLOBAL_SSL); -+ return (0); -+} /* }}} int wh_init */ -+ - void module_register (void) /* {{{ */ - { - plugin_register_complex_config ("write_http", wh_config); -+ plugin_register_init ("write_http", wh_init); - } /* }}} void module_register */ - - /* vim: set fdm=marker sw=8 ts=8 tw=78 et : */ --- -1.9.3 - diff --git a/src/patches/collectd/0010-indent-wh_init-to-be-consistent-with-the-rest-of-the.patch b/src/patches/collectd/0010-indent-wh_init-to-be-consistent-with-the-rest-of-the.patch deleted file mode 100644 index 81f2d8402..000000000 --- a/src/patches/collectd/0010-indent-wh_init-to-be-consistent-with-the-rest-of-the.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 6bd48f2346c5072dc22da58c7b7cd8e8ceb83fc5 Mon Sep 17 00:00:00 2001 -From: Marc Fournier marc.fournier@camptocamp.com -Date: Sat, 29 Mar 2014 13:37:36 +0100 -Subject: [PATCH 10/22] indent wh_init() to be consistent with the rest of the - file - ---- - src/write_http.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/write_http.c b/src/write_http.c -index 04c637b..0a13444 100644 ---- a/src/write_http.c -+++ b/src/write_http.c -@@ -658,10 +658,10 @@ static int wh_config (oconfig_item_t *ci) /* {{{ */ - - static int wh_init (void) /* {{{ */ - { -- /* Call this while collectd is still single-threaded to avoid -- * initialization issues in libgcrypt. */ -- curl_global_init (CURL_GLOBAL_SSL); -- return (0); -+ /* Call this while collectd is still single-threaded to avoid -+ * initialization issues in libgcrypt. */ -+ curl_global_init (CURL_GLOBAL_SSL); -+ return (0); - } /* }}} int wh_init */ - - void module_register (void) /* {{{ */ --- -1.9.3 - diff --git a/src/patches/collectd/0011-Configparser-when-we-alocate-an-empty-list-we-also-n.patch b/src/patches/collectd/0011-Configparser-when-we-alocate-an-empty-list-we-also-n.patch deleted file mode 100644 index b3e6f786e..000000000 --- a/src/patches/collectd/0011-Configparser-when-we-alocate-an-empty-list-we-also-n.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 6207fce91a0933e852ec76fc31ca81ec00ffa04b Mon Sep 17 00:00:00 2001 -From: Wilfried Goesgens dothebart@citadel.org -Date: Thu, 5 Jun 2014 20:04:13 +0200 -Subject: [PATCH 11/22] Configparser: when we alocate an empty list, we also - need to reset the counter; else we will trip over this later. This fixes - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=750440 - ---- - src/configfile.c | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/src/configfile.c b/src/configfile.c -index 0b7786f..983d995 100644 ---- a/src/configfile.c -+++ b/src/configfile.c -@@ -414,6 +414,12 @@ static int cf_ci_replace_child (oconfig_item_t *dst, oconfig_item_t *src, - - /* Resize the memory containing the children to be big enough to hold - * all children. */ -+ if (dst->children_num + src->children_num - 1 == 0) -+ { -+ dst->children_num = 0; -+ return (0); -+ } -+ - temp = (oconfig_item_t *) realloc (dst->children, - sizeof (oconfig_item_t) - * (dst->children_num + src->children_num - 1)); -@@ -514,7 +520,8 @@ static int cf_include_all (oconfig_item_t *root, int depth) - continue; - - /* Now replace the i'th child in `root' with `new'. */ -- cf_ci_replace_child (root, new, i); -+ if (cf_ci_replace_child (root, new, i) < 0) -+ return (-1); - - /* ... and go back to the new i'th child. */ - --i; --- -1.9.3 - diff --git a/src/patches/collectd/0012-don-t-assume-pkg-config-is-in-PATH.patch b/src/patches/collectd/0012-don-t-assume-pkg-config-is-in-PATH.patch deleted file mode 100644 index 5bb5c853f..000000000 --- a/src/patches/collectd/0012-don-t-assume-pkg-config-is-in-PATH.patch +++ /dev/null @@ -1,86 +0,0 @@ -From c2ca2a46e617878dcff69de0b8940ea91d3401cc Mon Sep 17 00:00:00 2001 -From: Lauri Tirkkonen lotheac@iki.fi -Date: Thu, 22 May 2014 14:05:40 +0300 -Subject: [PATCH 12/22] don't assume pkg-config is in PATH - ---- - configure.in | 20 ++++++++++---------- - 1 file changed, 10 insertions(+), 10 deletions(-) - -diff --git a/configure.in b/configure.in -index 0b12630..7086800 100644 ---- a/configure.in -+++ b/configure.in -@@ -1136,8 +1136,8 @@ AC_CHECK_LIB(hal,libhal_device_property_exists, - [with_libhal="no"]) - if test "x$with_libhal" = "xyes"; then - if test "x$PKG_CONFIG" != "x"; then -- BUILD_WITH_LIBHAL_CFLAGS="`pkg-config --cflags hal`" -- BUILD_WITH_LIBHAL_LIBS="`pkg-config --libs hal`" -+ BUILD_WITH_LIBHAL_CFLAGS="`$PKG_CONFIG --cflags hal`" -+ BUILD_WITH_LIBHAL_LIBS="`$PKG_CONFIG --libs hal`" - AC_SUBST(BUILD_WITH_LIBHAL_CFLAGS) - AC_SUBST(BUILD_WITH_LIBHAL_LIBS) - fi -@@ -3434,8 +3434,8 @@ then - if $PKG_CONFIG --exists tokyotyrant - then - with_libtokyotyrant_cppflags="$with_libtokyotyrant_cppflags `$PKG_CONFIG --cflags tokyotyrant`" -- with_libtokyotyrant_ldflags="$with_libtokyotyrant_ldflags `pkg-config --libs-only-L tokyotyrant`" -- with_libtokyotyrant_libs="$with_libtokyotyrant_libs `pkg-config --libs-only-l tokyotyrant`" -+ with_libtokyotyrant_ldflags="$with_libtokyotyrant_ldflags `$PKG_CONFIG --libs-only-L tokyotyrant`" -+ with_libtokyotyrant_libs="$with_libtokyotyrant_libs `$PKG_CONFIG --libs-only-l tokyotyrant`" - fi - fi - -@@ -3743,7 +3743,7 @@ with_libvirt_cflags="" - with_libvirt_ldflags="" - if test "x$PKG_CONFIG" != "x" - then -- pkg-config --exists 'libxml-2.0' 2>/dev/null -+ $PKG_CONFIG --exists 'libxml-2.0' 2>/dev/null - if test "$?" = "0" - then - with_libxml2="yes" -@@ -3751,7 +3751,7 @@ then - with_libxml2="no (pkg-config doesn't know library)" - fi - -- pkg-config --exists libvirt 2>/dev/null -+ $PKG_CONFIG --exists libvirt 2>/dev/null - if test "$?" = "0" - then - with_libvirt="yes" -@@ -3761,12 +3761,12 @@ then - fi - if test "x$with_libxml2" = "xyes" - then -- with_libxml2_cflags="`pkg-config --cflags libxml-2.0`" -+ with_libxml2_cflags="`$PKG_CONFIG --cflags libxml-2.0`" - if test $? -ne 0 - then - with_libxml2="no" - fi -- with_libxml2_ldflags="`pkg-config --libs libxml-2.0`" -+ with_libxml2_ldflags="$PKG_CONFIG --libs libxml-2.0`" - if test $? -ne 0 - then - with_libxml2="no" -@@ -3806,12 +3806,12 @@ if test "x$with_libxml2" = "xyes"; then - fi - if test "x$with_libvirt" = "xyes" - then -- with_libvirt_cflags="`pkg-config --cflags libvirt`" -+ with_libvirt_cflags="$PKG_CONFIG --cflags libvirt`" - if test $? -ne 0 - then - with_libvirt="no" - fi -- with_libvirt_ldflags="`pkg-config --libs libvirt`" -+ with_libvirt_ldflags="$PKG_CONFIG --libs libvirt`" - if test $? -ne 0 - then - with_libvirt="no" --- -1.9.3 - diff --git a/src/patches/collectd/0013-add-missing-backticks-which-broke-the-build.patch b/src/patches/collectd/0013-add-missing-backticks-which-broke-the-build.patch deleted file mode 100644 index d7f2264cb..000000000 --- a/src/patches/collectd/0013-add-missing-backticks-which-broke-the-build.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 497f5785e8b385f03b5fb5b15bdff8ba39e4699e Mon Sep 17 00:00:00 2001 -From: Marc Fournier marc.fournier@camptocamp.com -Date: Mon, 23 Jun 2014 18:00:01 +0200 -Subject: [PATCH 13/22] add missing backticks which broke the build - ---- - configure.in | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/configure.in b/configure.in -index 7086800..5dac543 100644 ---- a/configure.in -+++ b/configure.in -@@ -3766,7 +3766,7 @@ then - then - with_libxml2="no" - fi -- with_libxml2_ldflags="$PKG_CONFIG --libs libxml-2.0`" -+ with_libxml2_ldflags="`$PKG_CONFIG --libs libxml-2.0`" - if test $? -ne 0 - then - with_libxml2="no" -@@ -3806,12 +3806,12 @@ if test "x$with_libxml2" = "xyes"; then - fi - if test "x$with_libvirt" = "xyes" - then -- with_libvirt_cflags="$PKG_CONFIG --cflags libvirt`" -+ with_libvirt_cflags="`$PKG_CONFIG --cflags libvirt`" - if test $? -ne 0 - then - with_libvirt="no" - fi -- with_libvirt_ldflags="$PKG_CONFIG --libs libvirt`" -+ with_libvirt_ldflags="`$PKG_CONFIG --libs libvirt`" - if test $? -ne 0 - then - with_libvirt="no" --- -1.9.3 - diff --git a/src/patches/collectd/0014-snmp-free-snmp_pdu-struct-allocated-by-snmp_pdu_crea.patch b/src/patches/collectd/0014-snmp-free-snmp_pdu-struct-allocated-by-snmp_pdu_crea.patch deleted file mode 100644 index 945c28bbb..000000000 --- a/src/patches/collectd/0014-snmp-free-snmp_pdu-struct-allocated-by-snmp_pdu_crea.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 0da910fb1bf2bd4982ca6541458c795ec296f398 Mon Sep 17 00:00:00 2001 -From: Marc Fournier marc.fournier@camptocamp.com -Date: Fri, 8 Aug 2014 15:55:10 +0200 -Subject: [PATCH 14/22] snmp: free snmp_pdu struct allocated by - snmp_pdu_create() - -This should fix the leak reported in issue #610. ---- - src/snmp.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/snmp.c b/src/snmp.c -index d440f7f..dacdede 100644 ---- a/src/snmp.c -+++ b/src/snmp.c -@@ -1503,6 +1503,10 @@ static int csnmp_read_table (host_definition_t *host, data_definition_t *data) - snmp_free_pdu (res); - res = NULL; - -+ if (req != NULL) -+ snmp_free_pdu (req); -+ req = NULL; -+ - if (status == 0) - csnmp_dispatch_table (host, data, instance_list_head, value_list_head); - --- -1.9.3 - diff --git a/src/patches/collectd/0015-curl_xml-plugin-Fixed-tautological-pointer-compariso.patch b/src/patches/collectd/0015-curl_xml-plugin-Fixed-tautological-pointer-compariso.patch deleted file mode 100644 index 30e1a08be..000000000 --- a/src/patches/collectd/0015-curl_xml-plugin-Fixed-tautological-pointer-compariso.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 0afea60611f115a28b8ec331aba610e3038c1ef2 Mon Sep 17 00:00:00 2001 -From: Arthur Marble arthur@info9.net -Date: Sun, 17 Aug 2014 17:34:04 -0500 -Subject: [PATCH 15/22] curl_xml plugin: Fixed tautological pointer comparison - error. - -Fixes: http://bugs.debian.org/758481 -Signed-off-by: Florian Forster octo@collectd.org ---- - src/curl_xml.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/curl_xml.c b/src/curl_xml.c -index e31e73d..28b2ded 100644 ---- a/src/curl_xml.c -+++ b/src/curl_xml.c -@@ -344,7 +344,7 @@ static int cx_handle_instance_xpath (xmlXPathContextPtr xpath_ctx, /* {{{ */ - /* If the base xpath returns more than one block, the result is assumed to be - * a table. The `Instnce' option is not optional in this case. Check for the - * condition and inform the user. */ -- if (is_table && (vl->type_instance == NULL)) -+ if (is_table) - { - WARNING ("curl_xml plugin: " - "Base-XPath %s is a table (more than one result was returned), " --- -1.9.3 - diff --git a/src/patches/collectd/0016-Add-support-for-OpenVPN-2.3.0-status-files.patch b/src/patches/collectd/0016-Add-support-for-OpenVPN-2.3.0-status-files.patch deleted file mode 100644 index ca5b407ce..000000000 --- a/src/patches/collectd/0016-Add-support-for-OpenVPN-2.3.0-status-files.patch +++ /dev/null @@ -1,160 +0,0 @@ -From 9d065b401c2c393bef5a6e58b5deeda7d59d4f39 Mon Sep 17 00:00:00 2001 -From: Ed Okerson ed@okerson.com -Date: Mon, 11 Feb 2013 15:46:10 -0600 -Subject: [PATCH 16/22] Add support for OpenVPN 2.3.0 status files. - -Fix a bug that breaks this module if a server is running multiple instances of OpenVPN and one instance does not have any clients connected. ---- - src/openvpn.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---- - 1 file changed, 84 insertions(+), 6 deletions(-) - -diff --git a/src/openvpn.c b/src/openvpn.c -index 2aca414..d2b6f17 100644 ---- a/src/openvpn.c -+++ b/src/openvpn.c -@@ -32,6 +32,7 @@ - #define V1STRING "Common Name,Real Address,Bytes Received,Bytes Sent,Connected Since\n" - #define V2STRING "HEADER,CLIENT_LIST,Common Name,Real Address,Virtual Address,Bytes Received,Bytes Sent,Connected Since,Connected Since (time_t)\n" - #define V3STRING "HEADER CLIENT_LIST Common Name Real Address Virtual Address Bytes Received Bytes Sent Connected Since Connected Since (time_t)\n" -+#define V4STRING "HEADER,CLIENT_LIST,Common Name,Real Address,Virtual Address,Bytes Received,Bytes Sent,Connected Since,Connected Since (time_t),Username\n" - #define VSSTRING "OpenVPN STATISTICS\n" - - -@@ -43,6 +44,7 @@ struct vpn_status_s - MULTI1 = 1, /* status-version 1 */ - MULTI2, /* status-version 2 */ - MULTI3, /* status-version 3 */ -+ MULTI4, /* status-version 4 */ - SINGLE = 10 /* currently no versions for single mode, maybe in the future */ - } version; - char *name; -@@ -452,13 +454,77 @@ static int multi3_read (char *name, FILE *fh) - return (read); - } /* int multi3_read */ - -+/* for reading status version 4 */ -+static int multi4_read (char *name, FILE *fh) -+{ -+ char buffer[1024]; -+ char *fields[11]; -+ const int max_fields = STATIC_ARRAY_SIZE (fields); -+ int fields_num, read = 0; -+ long long sum_users = 0; -+ -+ while (fgets (buffer, sizeof (buffer), fh) != NULL) -+ { -+ fields_num = openvpn_strsplit (buffer, fields, max_fields); -+ -+ /* status file is generated by openvpn/multi.c:multi_print_status() -+ * http://svn.openvpn.net/projects/openvpn/trunk/openvpn/multi.c -+ * -+ * The line we're expecting has 9 fields. We ignore all lines -+ * with more or less fields. -+ */ -+ if (fields_num != 9) -+ continue; -+ -+ -+ if (strcmp (fields[0], "CLIENT_LIST") != 0) -+ continue; -+ -+ -+ if (collect_user_count) -+ /* If so, sum all users, ignore the individuals*/ -+ { -+ sum_users += 1; -+ } -+ if (collect_individual_users) -+ { -+ if (new_naming_schema) -+ { -+ /* plugin inst = file name, type inst = fields[1] */ -+ iostats_submit (name, /* vpn instance */ -+ fields[1], /* "Common Name" */ -+ atoll (fields[4]), /* "Bytes Received" */ -+ atoll (fields[5])); /* "Bytes Sent" */ -+ } -+ else -+ { -+ /* plugin inst = fields[1], type inst = "" */ -+ iostats_submit (fields[1], /* "Common Name" */ -+ NULL, /* unused when in multimode */ -+ atoll (fields[4]), /* "Bytes Received" */ -+ atoll (fields[5])); /* "Bytes Sent" */ -+ } -+ } -+ -+ read = 1; -+ } -+ -+ if (collect_user_count) -+ { -+ numusers_submit(name, name, sum_users); -+ read = 1; -+ } -+ -+ return (read); -+} /* int multi4_read */ -+ - /* read callback */ - static int openvpn_read (void) - { - FILE *fh; -- int i, read; -+ int i, vpn_read, read; - -- read = 0; -+ vpn_read = read = 0; - - /* call the right read function for every status entry in the list */ - for (i = 0; i < vpn_num; i++) -@@ -476,23 +542,28 @@ static int openvpn_read (void) - switch (vpn_list[i]->version) - { - case SINGLE: -- read = single_read(vpn_list[i]->name, fh); -+ vpn_read = single_read(vpn_list[i]->name, fh); - break; - - case MULTI1: -- read = multi1_read(vpn_list[i]->name, fh); -+ vpn_read = multi1_read(vpn_list[i]->name, fh); - break; - - case MULTI2: -- read = multi2_read(vpn_list[i]->name, fh); -+ vpn_read = multi2_read(vpn_list[i]->name, fh); - break; - - case MULTI3: -- read = multi3_read(vpn_list[i]->name, fh); -+ vpn_read = multi3_read(vpn_list[i]->name, fh); -+ break; -+ -+ case MULTI4: -+ vpn_read = multi4_read(vpn_list[i]->name, fh); - break; - } - - fclose (fh); -+ read += vpn_read; - } - - return (read ? 0 : -1); -@@ -549,6 +620,13 @@ static int version_detect (const char *filename) - version = MULTI3; - break; - } -+ /* searching for multi version 4 */ -+ else if (strcmp (buffer, V4STRING) == 0) -+ { -+ DEBUG ("openvpn plugin: found status file version MULTI4"); -+ version = MULTI4; -+ break; -+ } - } - - if (version == 0) --- -1.9.3 - diff --git a/src/patches/collectd/0017-openvpn-plugin-Don-t-signal-an-error-when-no-clients.patch b/src/patches/collectd/0017-openvpn-plugin-Don-t-signal-an-error-when-no-clients.patch deleted file mode 100644 index 0d5b3191c..000000000 --- a/src/patches/collectd/0017-openvpn-plugin-Don-t-signal-an-error-when-no-clients.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 8516f9abb625fa7b9321e62307305aa6499be4e8 Mon Sep 17 00:00:00 2001 -From: Florian Forster octo@collectd.org -Date: Sun, 14 Sep 2014 19:28:05 +0200 -Subject: [PATCH 17/22] openvpn plugin: Don't signal an error when no clients - are connected. - -In the multi1_read() function, an error (zero) was returned when no -clients were currently connected to the OpenVPN server, because the -"read" variable was initialized to zero and the while loop exited before -it was set to one. This is not the intended behavior. - -Thanks to @srix for reporting this issue! - -Fixes: #731 ---- - src/openvpn.c | 12 +++++------- - 1 file changed, 5 insertions(+), 7 deletions(-) - -diff --git a/src/openvpn.c b/src/openvpn.c -index d2b6f17..7d4e4a0 100644 ---- a/src/openvpn.c -+++ b/src/openvpn.c -@@ -267,7 +267,7 @@ static int multi1_read (char *name, FILE *fh) - { - char buffer[1024]; - char *fields[10]; -- int fields_num, read = 0, found_header = 0; -+ int fields_num, found_header = 0; - long long sum_users = 0; - - /* read the file until the "ROUTING TABLE" line is found (no more info after) */ -@@ -314,17 +314,15 @@ static int multi1_read (char *name, FILE *fh) - atoll (fields[3])); /* "Bytes Sent" */ - } - } -- -- read = 1; - } - -+ if (ferror (fh)) -+ return (0); -+ - if (collect_user_count) -- { - numusers_submit(name, name, sum_users); -- read = 1; -- } - -- return (read); -+ return (1); - } /* int multi1_read */ - - /* for reading status version 2 */ --- -1.9.3 - diff --git a/src/patches/collectd/0018-openvpn-Remove-boguous-file-handler-check.patch b/src/patches/collectd/0018-openvpn-Remove-boguous-file-handler-check.patch deleted file mode 100644 index 850e4fb91..000000000 --- a/src/patches/collectd/0018-openvpn-Remove-boguous-file-handler-check.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 5dbc1cfb4baff831f950b3c9de8c332bc9aa2b6e Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Wed, 17 Sep 2014 11:25:17 +0200 -Subject: [PATCH 18/22] openvpn: Remove boguous file handler check - ---- - src/openvpn.c | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/src/openvpn.c b/src/openvpn.c -index 7d4e4a0..9598abc 100644 ---- a/src/openvpn.c -+++ b/src/openvpn.c -@@ -316,9 +316,6 @@ static int multi1_read (char *name, FILE *fh) - } - } - -- if (ferror (fh)) -- return (0); -- - if (collect_user_count) - numusers_submit(name, name, sum_users); - --- -1.9.3 - diff --git a/src/patches/collectd/0019-openvpn-Ignore-not-fully-established-connections.patch b/src/patches/collectd/0019-openvpn-Ignore-not-fully-established-connections.patch deleted file mode 100644 index 4dde610db..000000000 --- a/src/patches/collectd/0019-openvpn-Ignore-not-fully-established-connections.patch +++ /dev/null @@ -1,59 +0,0 @@ -From a45710a5a887d25ab0e04ce1553bb268013ef780 Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Tue, 16 Sep 2014 14:44:42 +0200 -Subject: [PATCH 19/22] openvpn: Ignore not fully established connections - ---- - src/openvpn.c | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -diff --git a/src/openvpn.c b/src/openvpn.c -index 9598abc..6a0ffbd 100644 ---- a/src/openvpn.c -+++ b/src/openvpn.c -@@ -292,6 +292,10 @@ static int multi1_read (char *name, FILE *fh) - if (fields_num < 4) - continue; - -+ // Ignore not yet fully established connections -+ if (strcmp(fields[1], "UNDEF") == 0) -+ continue; -+ - if (collect_user_count) - /* If so, sum all users, ignore the individuals*/ - { -@@ -347,6 +351,10 @@ static int multi2_read (char *name, FILE *fh) - if (strcmp (fields[0], "CLIENT_LIST") != 0) - continue; - -+ // Ignore not yet fully established connections -+ if (strcmp(fields[0], "UNDEF") == 0) -+ continue; -+ - if (collect_user_count) - /* If so, sum all users, ignore the individuals*/ - { -@@ -412,6 +420,10 @@ static int multi3_read (char *name, FILE *fh) - if (strcmp (fields[0], "CLIENT_LIST") != 0) - continue; - -+ // Ignore not yet fully established connections -+ if (strcmp(fields[0], "UNDEF") == 0) -+ continue; -+ - if (collect_user_count) - /* If so, sum all users, ignore the individuals*/ - { -@@ -475,6 +487,9 @@ static int multi4_read (char *name, FILE *fh) - if (strcmp (fields[0], "CLIENT_LIST") != 0) - continue; - -+ // Ignore not yet fully established connections -+ if (strcmp(fields[0], "UNDEF") == 0) -+ continue; - - if (collect_user_count) - /* If so, sum all users, ignore the individuals*/ --- -1.9.3 - diff --git a/src/patches/collectd/0020-openvpn-Make-read-functions-robust-like-in-8516f9abb.patch b/src/patches/collectd/0020-openvpn-Make-read-functions-robust-like-in-8516f9abb.patch deleted file mode 100644 index 79f6742f9..000000000 --- a/src/patches/collectd/0020-openvpn-Make-read-functions-robust-like-in-8516f9abb.patch +++ /dev/null @@ -1,102 +0,0 @@ -From 46e716ee8d4208924d10f57f9ed97c99674a6ef4 Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Wed, 17 Sep 2014 11:31:13 +0200 -Subject: [PATCH 20/22] openvpn: Make read functions robust like in - 8516f9abb625fa7b9321e62307305aa6499be4e8 - ---- - src/openvpn.c | 21 ++++++--------------- - 1 file changed, 6 insertions(+), 15 deletions(-) - -diff --git a/src/openvpn.c b/src/openvpn.c -index 6a0ffbd..f686721 100644 ---- a/src/openvpn.c -+++ b/src/openvpn.c -@@ -332,7 +332,7 @@ static int multi2_read (char *name, FILE *fh) - char buffer[1024]; - char *fields[10]; - const int max_fields = STATIC_ARRAY_SIZE (fields); -- int fields_num, read = 0; -+ int fields_num; - long long sum_users = 0; - - while (fgets (buffer, sizeof (buffer), fh) != NULL) -@@ -379,17 +379,14 @@ static int multi2_read (char *name, FILE *fh) - atoll (fields[5])); /* "Bytes Sent" */ - } - } -- -- read = 1; - } - - if (collect_user_count) - { - numusers_submit(name, name, sum_users); -- read = 1; - } - -- return (read); -+ return (1); - } /* int multi2_read */ - - /* for reading status version 3 */ -@@ -398,7 +395,7 @@ static int multi3_read (char *name, FILE *fh) - char buffer[1024]; - char *fields[15]; - const int max_fields = STATIC_ARRAY_SIZE (fields); -- int fields_num, read = 0; -+ int fields_num; - long long sum_users = 0; - - while (fgets (buffer, sizeof (buffer), fh) != NULL) -@@ -447,18 +444,15 @@ static int multi3_read (char *name, FILE *fh) - atoll (fields[5])); /* "Bytes Sent" */ - } - } -- -- read = 1; - } - } - - if (collect_user_count) - { - numusers_submit(name, name, sum_users); -- read = 1; - } - -- return (read); -+ return (1); - } /* int multi3_read */ - - /* for reading status version 4 */ -@@ -467,7 +461,7 @@ static int multi4_read (char *name, FILE *fh) - char buffer[1024]; - char *fields[11]; - const int max_fields = STATIC_ARRAY_SIZE (fields); -- int fields_num, read = 0; -+ int fields_num; - long long sum_users = 0; - - while (fgets (buffer, sizeof (buffer), fh) != NULL) -@@ -515,17 +509,14 @@ static int multi4_read (char *name, FILE *fh) - atoll (fields[5])); /* "Bytes Sent" */ - } - } -- -- read = 1; - } - - if (collect_user_count) - { - numusers_submit(name, name, sum_users); -- read = 1; - } - -- return (read); -+ return (1); - } /* int multi4_read */ - - /* read callback */ --- -1.9.3 - diff --git a/src/patches/collectd/0021-openvpn-Fix-copy-and-paste-error.patch b/src/patches/collectd/0021-openvpn-Fix-copy-and-paste-error.patch deleted file mode 100644 index 65c293d70..000000000 --- a/src/patches/collectd/0021-openvpn-Fix-copy-and-paste-error.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 41253b68808deade2a1866f0c24f4bbc029a92c2 Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Wed, 24 Sep 2014 14:38:04 +0200 -Subject: [PATCH 21/22] openvpn: Fix copy-and-paste error - ---- - src/openvpn.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/openvpn.c b/src/openvpn.c -index f686721..2db3677 100644 ---- a/src/openvpn.c -+++ b/src/openvpn.c -@@ -293,7 +293,7 @@ static int multi1_read (char *name, FILE *fh) - continue; - - // Ignore not yet fully established connections -- if (strcmp(fields[1], "UNDEF") == 0) -+ if (strcmp(fields[0], "UNDEF") == 0) - continue; - - if (collect_user_count) --- -1.9.3 - diff --git a/src/patches/collectd/0022-openvpn-Change-data-type-from-COUNTER-to-DERIVE.patch b/src/patches/collectd/0022-openvpn-Change-data-type-from-COUNTER-to-DERIVE.patch deleted file mode 100644 index 0704a6b7f..000000000 --- a/src/patches/collectd/0022-openvpn-Change-data-type-from-COUNTER-to-DERIVE.patch +++ /dev/null @@ -1,107 +0,0 @@ -From 3458d610e8b99eb88c2f06ad576b4f46e0169877 Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Fri, 26 Sep 2014 12:02:27 +0200 -Subject: [PATCH 22/22] openvpn: Change data type from COUNTER to DERIVE - -COUNTER is not what we want here, so we will use DERIVE. ---- - src/openvpn.c | 26 +++++++++++++------------- - src/types.db | 2 ++ - 2 files changed, 15 insertions(+), 13 deletions(-) - -diff --git a/src/openvpn.c b/src/openvpn.c -index 2db3677..d446e99 100644 ---- a/src/openvpn.c -+++ b/src/openvpn.c -@@ -116,13 +116,13 @@ static void numusers_submit (char *pinst, char *tinst, gauge_t value) - } /* void numusers_submit */ - - /* dispatches stats about traffic (TCP or UDP) generated by the tunnel per single endpoint */ --static void iostats_submit (char *pinst, char *tinst, counter_t rx, counter_t tx) -+static void iostats_submit (char *pinst, char *tinst, derive_t rx, derive_t tx) - { - value_t values[2]; - value_list_t vl = VALUE_LIST_INIT; - -- values[0].counter = rx; -- values[1].counter = tx; -+ values[0].derive = rx; -+ values[1].derive = tx; - - /* NOTE ON THE NEW NAMING SCHEMA: - * using plugin_instance to identify each vpn config (and -@@ -137,7 +137,7 @@ static void iostats_submit (char *pinst, char *tinst, counter_t rx, counter_t tx - if (pinst != NULL) - sstrncpy (vl.plugin_instance, pinst, - sizeof (vl.plugin_instance)); -- sstrncpy (vl.type, "if_octets", sizeof (vl.type)); -+ sstrncpy (vl.type, "if_octets_derive", sizeof (vl.type)); - if (tinst != NULL) - sstrncpy (vl.type_instance, tinst, sizeof (vl.type_instance)); - -@@ -146,13 +146,13 @@ static void iostats_submit (char *pinst, char *tinst, counter_t rx, counter_t tx - - /* dispatches stats about data compression shown when in single mode */ - static void compression_submit (char *pinst, char *tinst, -- counter_t uncompressed, counter_t compressed) -+ derive_t uncompressed, derive_t compressed) - { - value_t values[2]; - value_list_t vl = VALUE_LIST_INIT; - -- values[0].counter = uncompressed; -- values[1].counter = compressed; -+ values[0].derive = uncompressed; -+ values[1].derive = compressed; - - vl.values = values; - vl.values_len = STATIC_ARRAY_SIZE (values); -@@ -161,7 +161,7 @@ static void compression_submit (char *pinst, char *tinst, - if (pinst != NULL) - sstrncpy (vl.plugin_instance, pinst, - sizeof (vl.plugin_instance)); -- sstrncpy (vl.type, "compression", sizeof (vl.type)); -+ sstrncpy (vl.type, "compression_derive", sizeof (vl.type)); - if (tinst != NULL) - sstrncpy (vl.type_instance, tinst, sizeof (vl.type_instance)); - -@@ -175,11 +175,11 @@ static int single_read (char *name, FILE *fh) - const int max_fields = STATIC_ARRAY_SIZE (fields); - int fields_num, read = 0; - -- counter_t link_rx, link_tx; -- counter_t tun_rx, tun_tx; -- counter_t pre_compress, post_compress; -- counter_t pre_decompress, post_decompress; -- counter_t overhead_rx, overhead_tx; -+ derive_t link_rx, link_tx; -+ derive_t tun_rx, tun_tx; -+ derive_t pre_compress, post_compress; -+ derive_t pre_decompress, post_decompress; -+ derive_t overhead_rx, overhead_tx; - - link_rx = 0; - link_tx = 0; -diff --git a/src/types.db b/src/types.db -index ad54240..03ec75b 100644 ---- a/src/types.db -+++ b/src/types.db -@@ -18,6 +18,7 @@ cache_result value:COUNTER:0:4294967295 - cache_size value:GAUGE:0:4294967295 - charge value:GAUGE:0:U - compression uncompressed:COUNTER:0:U, compressed:COUNTER:0:U -+compression_derive uncompressed:DERIVE:0:U, compressed:DERIVE:0:U - compression_ratio value:GAUGE:0:2 - connections value:COUNTER:0:U - conntrack entropy:GAUGE:0:4294967295 -@@ -74,6 +75,7 @@ if_dropped rx:COUNTER:0:4294967295, tx:COUNTER:0:4294967295 - if_errors rx:COUNTER:0:4294967295, tx:COUNTER:0:4294967295 - if_multicast value:COUNTER:0:4294967295 - if_octets rx:COUNTER:0:4294967295, tx:COUNTER:0:4294967295 -+if_octets_derive rx:DERIVE:0:U, tx:DERIVE:0:U - if_packets rx:COUNTER:0:4294967295, tx:COUNTER:0:4294967295 - if_rx_errors value:COUNTER:0:4294967295 - if_tx_errors value:COUNTER:0:4294967295 --- -1.9.3 - diff --git a/src/patches/collectd/collectd-4.10.9-cpufreq_skip_disabled_cores.patch b/src/patches/collectd/collectd-4.10.9-cpufreq_skip_disabled_cores.patch deleted file mode 100644 index e8851b6c7..000000000 --- a/src/patches/collectd/collectd-4.10.9-cpufreq_skip_disabled_cores.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -Naur collectd-4.10.9.org/src/cpufreq.c collectd-4.10.9/src/cpufreq.c ---- collectd-4.10.9.org/src/cpufreq.c 2013-04-08 08:26:17.000000000 +0200 -+++ collectd-4.10.9/src/cpufreq.c 2024-04-04 15:33:52.705372940 +0200 -@@ -104,12 +104,9 @@ - - if (fgets (buffer, 16, fp) == NULL) - { -- char errbuf[1024]; -- WARNING ("cpufreq: fgets: %s", -- sstrerror (errno, errbuf, -- sizeof (errbuf))); - fclose (fp); -- return (-1); -+ cpufreq_submit (i, NAN); -+ break; - } - - if (fclose (fp)) diff --git a/src/patches/collectd/silence-openvpn-errors.patch b/src/patches/collectd/silence-openvpn-errors.patch deleted file mode 100644 index c2584864a..000000000 --- a/src/patches/collectd/silence-openvpn-errors.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff --git a/src/openvpn.c b/src/openvpn.c -index d446e9957b68..ef5bf1078285 100644 ---- a/src/openvpn.c -+++ b/src/openvpn.c -@@ -70,6 +70,7 @@ static const char *config_keys[] = - }; - static int config_keys_num = STATIC_ARRAY_SIZE (config_keys); - -+static int version_detect (const char *filename); - - /* Helper function - * copy-n-pasted from common.c - changed delim to "," */ -@@ -540,6 +541,11 @@ static int openvpn_read (void) - continue; - } - -+ // If the version was not detected yet, we try to guess again -+ if (vpn_list[i]->version == 0) { -+ vpn_list[i]->version = version_detect(vpn_list[i]->file); -+ } -+ - switch (vpn_list[i]->version) - { - case SINGLE: -@@ -567,7 +573,7 @@ static int openvpn_read (void) - read += vpn_read; - } - -- return (read ? 0 : -1); -+ return 0; - } /* int openvpn_read */ - - static int version_detect (const char *filename) -@@ -630,16 +636,6 @@ static int version_detect (const char *filename) - } - } - -- if (version == 0) -- { -- /* This is only reached during configuration, so complaining to -- * the user is in order. */ -- NOTICE ("openvpn plugin: %s: Unknown file format, please " -- "report this as bug. Make sure to include " -- "your status file, so the plugin can " -- "be adapted.", filename); -- } -- - fclose (fh); - - return version; -@@ -656,13 +652,6 @@ static int openvpn_config (const char *key, const char *value) - /* try to detect the status file format */ - status_version = version_detect (value); - -- if (status_version == 0) -- { -- WARNING ("openvpn plugin: unable to detect status version, \ -- discarding status file "%s".", value); -- return (1); -- } -- - status_file = sstrdup (value); - if (status_file == NULL) - {
Tested-by: Adolf Belka adolf.belka@ipfire.org Signed-off-by: Adolf Belka adolf.belka@ipfire.org --- config/cfgroot/graphs.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/config/cfgroot/graphs.pl b/config/cfgroot/graphs.pl index f07214cf8..51292540e 100644 --- a/config/cfgroot/graphs.pl +++ b/config/cfgroot/graphs.pl @@ -457,8 +457,8 @@ sub updateifgraph { "--color=SHADEA".$color{"color19"}, "--color=SHADEB".$color{"color19"}, "--color=BACK".$color{"color21"}, - "DEF:incoming=".$mainsettings{'RRDLOG'}."/collectd/localhost/interface/if_octets-".$interface.".rrd:rx:AVERAGE", - "DEF:outgoing=".$mainsettings{'RRDLOG'}."/collectd/localhost/interface/if_octets-".$interface.".rrd:tx:AVERAGE", + "DEF:incoming=".$mainsettings{'RRDLOG'}."/collectd/localhost/interface-".$interface."/if_octets.rrd:rx:AVERAGE", + "DEF:outgoing=".$mainsettings{'RRDLOG'}."/collectd/localhost/interface-".$interface."/if_octets.rrd:tx:AVERAGE", "CDEF:outgoingn=outgoing,-1,*", "COMMENT:".sprintf("%-20s",$Lang::tr{'caption'}), "COMMENT:".sprintf("%15s",$Lang::tr{'maximal'}), @@ -757,7 +757,7 @@ sub updatepinggraph { "--color=SHADEA".$color{"color19"}, "--color=SHADEB".$color{"color19"}, "--color=BACK".$color{"color21"}, - "DEF:roundtrip=".$mainsettings{'RRDLOG'}."/collectd/localhost/ping/ping-".$host.".rrd:ping:AVERAGE", + "DEF:roundtrip=".$mainsettings{'RRDLOG'}."/collectd/localhost/ping/ping-".$host.".rrd:value:AVERAGE", "COMMENT:".sprintf("%-20s",$Lang::tr{'caption'})."\j", "CDEF:roundavg=roundtrip,PREV(roundtrip),+,2,/", "CDEF:r0=roundtrip,30,MIN", @@ -1173,7 +1173,7 @@ sub updateconntrackgraph { "-r", "--lower-limit","0", "-v $Lang::tr{'open connections'}", - "DEF:conntrack=$mainsettings{'RRDLOG'}/collectd/localhost/conntrack/conntrack.rrd:entropy:AVERAGE", + "DEF:conntrack=$mainsettings{'RRDLOG'}/collectd/localhost/conntrack/conntrack.rrd:value:AVERAGE", "LINE3:conntrack#ff0000:" . sprintf("%-15s", $Lang::tr{'open connections'}), "VDEF:ctmin=conntrack,MINIMUM", "VDEF:ctmax=conntrack,MAXIMUM",
Tested-by: Adolf Belka adolf.belka@ipfire.org Signed-off-by: Adolf Belka adolf.belka@ipfire.org --- config/backup/backup.pl | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/config/backup/backup.pl b/config/backup/backup.pl index 3b10b8707..fb7b210db 100644 --- a/config/backup/backup.pl +++ b/config/backup/backup.pl @@ -258,6 +258,16 @@ restore_backup() { if [ -e /var/lib/ipblocklist/SPAMHAUS_EDROP.conf ]; then rm /var/lib/ipblocklist/SPAMHAUS_EDROP.conf fi + + # Create collectd 4.x to 5.x migration script from rrd contents, run the script that + # was created and then remove the old interface directory if it is present as it will + # be empty after the migration has been carried out. + /var/ipfire/collectd-migrate-4-to-5.pl --indir /var/log/rrd/ > /tmp/rrd-migrate.sh + sh /tmp/rrd-migrate.sh >/dev/null 2>&1 + if [ -d /var/log/rrd/collectd/localhost/interface/ ]; then + rm -Rf /var/log/rrd/collectd/localhost/interface/ + fi + return 0 }
- Not tested by myself but it uses the same code as in the backup.pl changes which were tested and worked. So expectation is that they will work in the Core Update but this will be able to be evaluated when the Testing Release is issued.
Signed-off-by: Adolf Belka adolf.belka@ipfire.org --- config/rootfiles/core/191/update.sh | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/config/rootfiles/core/191/update.sh b/config/rootfiles/core/191/update.sh index a2d61ec52..fb06896d9 100644 --- a/config/rootfiles/core/191/update.sh +++ b/config/rootfiles/core/191/update.sh @@ -72,6 +72,15 @@ telinit u /etc/init.d/unbound restart /etc/init.d/suricata restart
+# Create collectd 4.x to 5.x migration script from rrd contents, run the script that +# was created and then remove the old interface directory if it is present as it will +# be empty after the migration has been carried out. +/var/ipfire/collectd-migrate-4-to-5.pl --indir /var/log/rrd/ > /tmp/rrd-migrate.sh +sh /tmp/rrd-migrate.sh >/dev/null 2>&1 +if [ -d /var/log/rrd/collectd/localhost/interface/ ]; then + rm -Rf /var/log/rrd/collectd/localhost/interface/ +fi + # This update needs a reboot... touch /var/run/need_reboot
- With nut enabled in collectd as a plugin (to match with apcupsd) then it had to be moved to before collectd. - netsnmpd is required by nut for one of its rootfiles and therefore has to stay before nut.
Signed-off-by: Adolf Belka adolf.belka@ipfire.org --- make.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/make.sh b/make.sh index ee098d9a3..84c18ad80 100755 --- a/make.sh +++ b/make.sh @@ -1849,6 +1849,8 @@ build_system() { lfsmake2 lm_sensors lfsmake2 libstatgrab lfsmake2 liboping + lfsmake2 netsnmpd + lfsmake2 nut lfsmake2 collectd lfsmake2 git lfsmake2 linux-firmware @@ -1871,7 +1873,6 @@ build_system() { lfsmake2 libslirp lfsmake2 dtc lfsmake2 qemu - lfsmake2 netsnmpd lfsmake2 nagios_nrpe lfsmake2 nagios-plugins lfsmake2 observium-agent @@ -1920,7 +1921,6 @@ build_system() { lfsmake2 openvmtools lfsmake2 joe lfsmake2 monit - lfsmake2 nut lfsmake2 watchdog lfsmake2 usb_modeswitch lfsmake2 usb_modeswitch_data
- with-dev is required as a configure option to ensure that the package-config files are installed during the build so that collectd can find the libupsclient library files which are needed for the nut plugin.
Signed-off-by: Adolf Belka adolf.belka@ipfire.org --- config/rootfiles/packages/nut | 16 +++++++++++++++- lfs/nut | 21 +++++++++++---------- 2 files changed, 26 insertions(+), 11 deletions(-)
diff --git a/config/rootfiles/packages/nut b/config/rootfiles/packages/nut index 4d1d17887..240182619 100644 --- a/config/rootfiles/packages/nut +++ b/config/rootfiles/packages/nut @@ -54,7 +54,6 @@ usr/bin/riello_usb usr/bin/safenet usr/bin/skel usr/bin/sms_ser -usr/bin/snmp-ups usr/bin/solis usr/bin/tripplite usr/bin/tripplite_usb @@ -67,6 +66,15 @@ usr/bin/upsrw usr/bin/upssched-cmd usr/bin/usbhid-ups usr/bin/victronups +#usr/include/nut-scan.h +#usr/include/nutclient.h +#usr/include/nutclientmem.h +#usr/include/nutscan-device.h +#usr/include/nutscan-init.h +#usr/include/nutscan-ip.h +#usr/include/nutscan-serial.h +#usr/include/parseconf.h +#usr/include/upsclient.h #usr/lib/libnutclient.la #usr/lib/libnutclient.so usr/lib/libnutclient.so.2 @@ -83,8 +91,13 @@ usr/lib/libnutscan.so.2.0.5 #usr/lib/libupsclient.so usr/lib/libupsclient.so.6 usr/lib/libupsclient.so.6.0.1 +#usr/lib/pkgconfig/libnutclient.pc +#usr/lib/pkgconfig/libnutclientstub.pc +#usr/lib/pkgconfig/libnutscan.pc +#usr/lib/pkgconfig/libupsclient.pc #usr/lib/python3.10/site-packages/PyNUT.py #usr/lib/python3.10/site-packages/test_nutclient.py +#usr/libexec/sockdebug usr/sbin/upsd usr/sbin/upsdrvctl usr/sbin/upsmon @@ -93,3 +106,4 @@ usr/share/cmdvartab usr/share/driver.list var/ipfire/backup/addons/includes/nut var/state/ups +usr/bin/snmp-ups diff --git a/lfs/nut b/lfs/nut index 732211628..23b9e6a75 100644 --- a/lfs/nut +++ b/lfs/nut @@ -34,7 +34,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = nut -PAK_VER = 12 +PAK_VER = 13
DEPS =
@@ -85,15 +85,16 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) $(UPDATE_AUTOMAKE) cd $(DIR_APP) && ./configure \ - --prefix=/usr \ - --sysconfdir=/etc/nut \ - --with-usb \ - --with-user=root \ - --with-group=nut \ - --with-wrap=no \ - --with-udev-dir=/etc/udev \ - --disable-static \ - --without-docs + --prefix=/usr \ + --sysconfdir=/etc/nut \ + --with-usb \ + --with-user=root \ + --with-group=nut \ + --with-wrap=no \ + --with-udev-dir=/etc/udev \ + --disable-static \ + --without-docs \ + --with-dev cd $(DIR_APP) && make #$(MAKETUNING) cd $(DIR_APP) && make install # sed -i -e "s|ATTR{|SYSFS{|g" /etc/udev/rules.d/52-nut-usbups.rules