From: Sebastian Harl Date: Tue, 7 Oct 2008 08:01:27 +0000 (+0200) Subject: Removed all patches included in the new upstream release. X-Git-Tag: collectd-4.5.1-1~19 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8811274b2e7d0b7a3357e27dc460b6d56f9cfc38;p=pkg-collectd.git Removed all patches included in the new upstream release. --- diff --git a/debian/changelog b/debian/changelog index ef4e46d..7d30b97 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,14 @@ collectd (4.5.0-1) experimental; urgency=low * Uploading to experimental because of the Lenny freeze. * debian/rules: - Disabled onewire plugin - owfs is not yet available in Debian. + * debian/patches: + - Removed myplugin_strcpy.dpatch - applied upstream. + - Removed perl_deadlock.dpatch - included upstream. + - Removed memory_libstatgrab.dpatch - included upstream. + - Removed collectd_memleak.dpatch - included upstream. + - Removed snmp_memleak.dpatch - included upstream. + - Removed memcached_fdleak.dpatch - included upstream. + - Removed memcached_timeout.dpatch - included upstream. -- Sebastian Harl Tue, 07 Oct 2008 09:53:19 +0200 diff --git a/debian/patches/00list b/debian/patches/00list index 066e8e9..332b35c 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -1,10 +1,3 @@ rrd_filter_path.dpatch collection_conf_path.dpatch -myplugin_strcpy.dpatch -memory_libstatgrab.dpatch -collectd_memleak.dpatch -snmp_memleak.dpatch -memcached_fdleak.dpatch -memcached_timeout.dpatch -perl_deadlock.dpatch diff --git a/debian/patches/collectd_memleak.dpatch b/debian/patches/collectd_memleak.dpatch deleted file mode 100755 index 132f2c7..0000000 --- a/debian/patches/collectd_memleak.dpatch +++ /dev/null @@ -1,19 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## collectd_memleak.dpatch by Peter Holik -## -## DP: Free allocated memory before returning in an error condition. -## DP: (This is upstream Git commit 111a5eb7b68da0478b16de31dff422a213a03799) - -@DPATCH@ - -diff a/src/utils_threshold.c b/src/utils_threshold.c ---- a/src/utils_threshold.c -+++ b/src/utils_threshold.c -@@ -711,6 +711,7 @@ int ut_check_interesting (const char *name) - if (status != 0) - { - ERROR ("ut_check_interesting: parse_identifier failed."); -+ sfree (name_copy); - return (-1); - } - diff --git a/debian/patches/memcached_fdleak.dpatch b/debian/patches/memcached_fdleak.dpatch deleted file mode 100755 index 430797b..0000000 --- a/debian/patches/memcached_fdleak.dpatch +++ /dev/null @@ -1,23 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## memcached_fdleak.dpatch by Sebastian Harl -## -## DP: Fixed a possible file descriptor leak in the memcached plugin. -## DP: This has been reported as upstream bug #26: -## DP: http://collectd.org/mantis/view.php?id=26 -## DP: (This is based on upstream Git commit -## DP: e7929dac268957cbbd9082717759c3917ac1b51e) - -@DPATCH@ - -diff a/src/memcached.c b/src/memcached.c ---- a/src/memcached.c -+++ b/src/memcached.c -@@ -137,6 +137,8 @@ static int memcached_query_daemon (char *buffer, int buffer_size) /* {{{ */ - - if (n <= 0) { - ERROR ("memcached: poll() failed or timed out"); -+ shutdown (fd, SHUT_RDWR); -+ close (fd); - return -1; - } - } diff --git a/debian/patches/memcached_timeout.dpatch b/debian/patches/memcached_timeout.dpatch deleted file mode 100755 index 113cd74..0000000 --- a/debian/patches/memcached_timeout.dpatch +++ /dev/null @@ -1,22 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## memcached_timeout.dpatch by Florian Forster -## -## DP: memcached plugin: Wait for a *little* longer for memcached to answer: -## DP: poll(2) takes a timeout in milliseconds, not seconds. Also, use the -## DP: global interval instead of some random number as timeout. -## DP: (This is upstream Git commit 801067164e6eb068f5b5b2c45638fd207d5084ff) - -@DPATCH@ - -diff a/src/memcached.c b/src/memcached.c ---- a/src/memcached.c -+++ b/src/memcached.c -@@ -134,7 +134,7 @@ static int memcached_query_daemon (char *buffer, int buffer_size) /* {{{ */ - p.events = POLLIN|POLLERR|POLLHUP; - p.revents = 0; - -- n = poll(&p, 1, 3); -+ n = poll(&p, 1, 1000 * interval_g); - - if (n <= 0) { - ERROR ("memcached: poll() failed or timed out"); diff --git a/debian/patches/memory_libstatgrab.dpatch b/debian/patches/memory_libstatgrab.dpatch deleted file mode 100755 index 8ae0c34..0000000 --- a/debian/patches/memory_libstatgrab.dpatch +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## memory_libstatgrab.dpatch by Michael Stapelberg -## -## DP: Fix a typo in the libstatgrab code of the memory plugin. This is -## DP: relevant for e.g. GNU/kfreebsd. -## DP: (This is upstream Git commit 59f405559485a04c30b88c2f68fa9e112bdab6a6) - -@DPATCH@ - -diff a/src/memory.c b/src/memory.c ---- a/src/memory.c -+++ b/src/memory.c -@@ -319,7 +319,7 @@ static int memory_read (void) - if ((ios = sg_get_mem_stats ()) != NULL) - { - memory_submit ("used", ios->used); -- memory_submit ("cached", ios->cached); -+ memory_submit ("cached", ios->cache); - memory_submit ("free", ios->free); - } - #endif /* HAVE_LIBSTATGRAB */ diff --git a/debian/patches/myplugin_strcpy.dpatch b/debian/patches/myplugin_strcpy.dpatch deleted file mode 100755 index 0ef2ff0..0000000 --- a/debian/patches/myplugin_strcpy.dpatch +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## myplugin_strcpy.dpatch by Sebastian Harl -## -## DP: examples/myplugin.c: Use sstrncpy instead of strcpy. - -@DPATCH@ - -diff a/contrib/examples/myplugin.c b/contrib/examples/myplugin.c ---- a/contrib/examples/myplugin.c -+++ b/contrib/examples/myplugin.c -@@ -98,8 +98,8 @@ static int my_read (void) - vl.values = values; - vl.values_len = 1; - vl.time = time (NULL); -- strcpy (vl.host, hostname_g); -- strcpy (vl.plugin, "myplugin"); -+ sstrncpy (vl.host, hostname_g, sizeof (vl.host)); -+ sstrncpy (vl.plugin, "myplugin", sizeof (vl.plugin)); - /* optionally set vl.plugin_instance and vl.type_instance to reasonable - * values (default: "") */ - diff --git a/debian/patches/perl_deadlock.dpatch b/debian/patches/perl_deadlock.dpatch deleted file mode 100755 index bc9d3d1..0000000 --- a/debian/patches/perl_deadlock.dpatch +++ /dev/null @@ -1,78 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## perl_deadlock.dpatch by Sebastian Harl -## -## DP: Collectd.pm: Improved the way access to @plugins is synchronized. -## DP: -## DP: So far, a lock has been placed on @plugins, so that no two threads could -## DP: access the list of plugins simultaneously. This could cause problems -## DP: which in certain situations could even lead to deadlocks. E.g. when -## DP: using the perl plugin in combination with the rrdtool plugin with -## DP: debugging enabled one would get hit by the following situation: the perl -## DP: plugin holds the lock on @plugins and then dispatches values to the -## DP: rrdtool plugin from some Perl plugin's read function. The rrdtool plugin -## DP: then tries to acquire its cache lock. At the same time some other plugin -## DP: dispatches values to the rrdtool plugin as well and this thread now -## DP: holds the lock on the rrdtool cache. While holding that lock, the -## DP: rrdtool plugin might dispatch a debug logging message and thus calls the -## DP: perl plugin's log-callback which tries to get the lock on @plugins thus -## DP: causing a deadlock. -## DP: -## DP: This has been resolved by the following two changes: -## DP: -## DP: * Restrict the lock to the list of plugins of one type. This allows to -## DP: access e.g. read and log plugins in parallel. -## DP: -## DP: * Unlock the variable before calling the Perl callback function. This -## DP: further prevents nested locks. -## DP: -## DP: (This is upstream Git commit dffb71cd6668e98f93c12da2ee2bd7a728d7292a) - -@DPATCH@ - -diff a/bindings/perl/Collectd.pm b/bindings/perl/Collectd.pm ---- a/bindings/perl/Collectd.pm -+++ b/bindings/perl/Collectd.pm -@@ -133,6 +133,8 @@ sub DEBUG { _log (scalar caller, LOG_DEBUG, shift); } - sub plugin_call_all { - my $type = shift; - -+ my %plugins; -+ - our $cb_name = undef; - - if (! defined $type) { -@@ -148,9 +150,13 @@ sub plugin_call_all { - return; - } - -- lock @plugins; -- foreach my $plugin (keys %{$plugins[$type]}) { -- my $p = $plugins[$type]->{$plugin}; -+ { -+ lock %{$plugins[$type]}; -+ %plugins = %{$plugins[$type]}; -+ } -+ -+ foreach my $plugin (keys %plugins) { -+ my $p = $plugins{$plugin}; - - my $status = 0; - -@@ -261,7 +267,7 @@ sub plugin_register { - cb_name => $data, - ); - -- lock @plugins; -+ lock %{$plugins[$type]}; - $plugins[$type]->{$name} = \%p; - } - else { -@@ -286,7 +292,7 @@ sub plugin_unregister { - return plugin_unregister_data_set ($name); - } - elsif (defined $plugins[$type]) { -- lock @plugins; -+ lock %{$plugins[$type]}; - delete $plugins[$type]->{$name}; - } - else { diff --git a/debian/patches/snmp_memleak.dpatch b/debian/patches/snmp_memleak.dpatch deleted file mode 100755 index e4def25..0000000 --- a/debian/patches/snmp_memleak.dpatch +++ /dev/null @@ -1,59 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## snmp_memleak.dpatch by Florian Forster -## -## DP: Fix a possible memory leak in the snmp plugin: The SNMP result object -## DP: was not freed when `csnmp_instance_list_add' failed. -## DP: (This is upstream Git commit 0109e3c1f3a515ed716ddbdc261e0ed2e3f8e640) - -@DPATCH@ - -diff a/src/snmp.c b/src/snmp.c ---- a/src/snmp.c -+++ b/src/snmp.c -@@ -1120,10 +1120,6 @@ static int csnmp_read_table (host_definition_t *host, data_definition_t *data) - vb = res->variables; - if (vb == NULL) - { -- if (res != NULL) -- snmp_free_pdu (res); -- res = NULL; -- - status = -1; - break; - } -@@ -1132,10 +1128,7 @@ static int csnmp_read_table (host_definition_t *host, data_definition_t *data) - * subtree */ - if (csnmp_check_res_left_subtree (host, data, res) != 0) - { -- if (res != NULL) -- snmp_free_pdu (res); -- res = NULL; -- -+ status = 0; - break; - } - -@@ -1157,11 +1150,7 @@ static int csnmp_read_table (host_definition_t *host, data_definition_t *data) - (vb != NULL) && (vb->next_variable != NULL); - vb = vb->next_variable) - /* do nothing */; -- if (vb == NULL) -- { -- status = -1; -- break; -- } -+ assert (vb != NULL); - - /* Copy OID to oid_list[data->values_len] */ - memcpy (oid_list[data->values_len].oid, vb->name, -@@ -1224,6 +1213,10 @@ static int csnmp_read_table (host_definition_t *host, data_definition_t *data) - res = NULL; - } /* while (status == 0) */ - -+ if (res != NULL) -+ snmp_free_pdu (res); -+ res = NULL; -+ - if (status == 0) - csnmp_dispatch_table (host, data, instance_list, value_table); -