Code

Merge branch 'master' into sid collectd-5.7.1-1
authorMarc Fournier <marc@bl.uem.li>
Mon, 23 Jan 2017 19:48:23 +0000 (20:48 +0100)
committerMarc Fournier <marc@bl.uem.li>
Mon, 23 Jan 2017 19:48:23 +0000 (20:48 +0100)
debian/changelog
debian/control
debian/patches/dpdkstat-portable-format-string.patch [deleted file]
debian/patches/dpdkstat_goto_label.patch [new file with mode: 0644]
debian/patches/mqtt_invalid_symbols.patch [new file with mode: 0644]
debian/patches/mqtt_resource_leak.patch [new file with mode: 0644]
debian/patches/series

index 094f89d3227899b3ea4928dc05589bef05987d83..8786d9b30ede797d2f76e19e4eecee23a8e04840 100644 (file)
@@ -1,3 +1,16 @@
+collectd (5.7.1-1) unstable; urgency=medium
+
+  * New upstream release.
+  * debian/patches:
+    - drop dpdkstat-portable-format-string.patch, included upstream.
+    - add mqtt_resource_leak.patch, fixing a connection leak.
+    - add mqtt_invalid_symbols.patch, stripping out invalid characters from
+      MQTT topic names.
+    - add dpdkstat_goto_label.patch, fixing a small mistake which prevented
+      the dpdkstat from building.
+
+ -- Marc Fournier <marc@bl.uem.li>  Mon, 23 Jan 2017 20:45:34 +0100
+
 collectd (5.7.0-3) unstable; urgency=medium
 
   * debian/control: Skip libdpdk-dev build dependency on non-Intel
index 0ffd81adb21cf3f130ba3c244a8eef4ce250b2cc..1ecaef2299743996ff4586b83897a41f128d37a7 100644 (file)
@@ -42,7 +42,7 @@ Build-Depends: debhelper (>= 9.20120909~), dpkg-dev (>= 1.14.10), po-debconf, dh
  libprotobuf-c-dev,
  librabbitmq-dev,
  librdkafka-dev,
- libriemann-client-dev,
+ libriemann-client-dev (>= 1.6.0),
  librrd-dev (>= 1.4~),
  libsensors4-dev [linux-any],
  libsigrok-dev (>= 0.2~) [linux-any],
@@ -226,7 +226,8 @@ Description: statistics collection and monitoring daemon (core system)
 
 Package: collectd
 Architecture: any
-Depends: collectd-core, ${shlibs:Depends}, ${misc:Depends}
+Depends: collectd-core (>= ${source:Version}), collectd-core (<< 6~),
+ ${shlibs:Depends}, ${misc:Depends}
 Recommends: ${shlibs:Recommends}, default-jre-headless
 Description: statistics collection and monitoring daemon
  collectd is a small daemon which collects system information periodically and
diff --git a/debian/patches/dpdkstat-portable-format-string.patch b/debian/patches/dpdkstat-portable-format-string.patch
deleted file mode 100644 (file)
index 965504f..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-Description: Fix format string portability issue
-Author: Marc Fournier <marc@bl.uem.li>
-
---- a/src/dpdkstat.c
-+++ b/src/dpdkstat.c
-@@ -159,8 +159,8 @@ static int dpdk_shm_init(size_t size);
- static void dpdk_config_init_default(void) {
-   g_configuration->interval = plugin_get_interval();
-   if (g_configuration->interval == cf_get_default_interval())
--    WARNING("dpdkstat: No time interval was configured, default value %lu ms "
--            "is set",
-+    WARNING("dpdkstat: No time interval was configured, default value %" PRIu64
-+            " ms is set",
-             CDTIME_T_TO_MS(g_configuration->interval));
-   /* Default is all ports enabled */
-   g_configuration->enabled_port_mask = ~0;
-@@ -413,7 +413,7 @@ static int dpdk_helper_spawn(enum DPDK_HELPER_ACTION action) {
-   if (pid > 0) {
-     close(g_configuration->helper_pipes[1]);
-     g_configuration->helper_pid = pid;
--    DEBUG("dpdkstat: helper pid %lu", (long)g_configuration->helper_pid);
-+    DEBUG("dpdkstat: helper pid %li", (long)g_configuration->helper_pid);
-     /* Kick helper once its alive to have it start processing */
-     sem_post(&g_configuration->sema_helper_get_stats);
-   } else if (pid == 0) {
diff --git a/debian/patches/dpdkstat_goto_label.patch b/debian/patches/dpdkstat_goto_label.patch
new file mode 100644 (file)
index 0000000..fe0958a
--- /dev/null
@@ -0,0 +1,23 @@
+Description: dpdkstat plugin: jump to the right label
+Author: Ruben Kerkhof <ruben@rubenkerkhof.com>
+
+diff --git a/src/dpdkstat.c b/src/dpdkstat.c
+index 2686be151..d1383458d 100644
+--- a/src/dpdkstat.c
++++ b/src/dpdkstat.c
+@@ -289,13 +289,13 @@ static int dpdk_shm_init(size_t size) {
+   if (err) {
+     ERROR("dpdkstat semaphore init failed: %s",
+           sstrerror(errno, errbuf, sizeof(errbuf)));
+-    goto close;
++    goto fail;
+   }
+   err = sem_init(&g_configuration->sema_stats_in_shm, 1, 0);
+   if (err) {
+     ERROR("dpdkstat semaphore init failed: %s",
+           sstrerror(errno, errbuf, sizeof(errbuf)));
+-    goto close;
++    goto fail;
+   }
+   g_configuration->xstats = NULL;
diff --git a/debian/patches/mqtt_invalid_symbols.patch b/debian/patches/mqtt_invalid_symbols.patch
new file mode 100644 (file)
index 0000000..5adce34
--- /dev/null
@@ -0,0 +1,26 @@
+Description: mqtt plugin: Fix invalid symbols in topic name.
+Author: Denys Fedoryshchenko <denys@visp.net.lb>
+
+diff --git a/src/mqtt.c b/src/mqtt.c
+index 6b76af97b..8a24ccaa0 100644
+--- a/src/mqtt.c
++++ b/src/mqtt.c
+@@ -462,6 +462,7 @@ static int format_topic(char *buf, size_t buf_len, data_set_t const *ds,
+                         value_list_t const *vl, mqtt_client_conf_t *conf) {
+   char name[MQTT_MAX_TOPIC_SIZE];
+   int status;
++  char *c;
+   if ((conf->topic_prefix == NULL) || (conf->topic_prefix[0] == 0))
+     return (FORMAT_VL(buf, buf_len, vl));
+@@ -474,6 +475,10 @@ static int format_topic(char *buf, size_t buf_len, data_set_t const *ds,
+   if ((status < 0) || (((size_t)status) >= buf_len))
+     return (ENOMEM);
++  while((c = strchr(buf, '#')) || (c = strchr(buf, '+'))) {
++       *c = '_';
++  }
++
+   return (0);
+ } /* int format_topic */
diff --git a/debian/patches/mqtt_resource_leak.patch b/debian/patches/mqtt_resource_leak.patch
new file mode 100644 (file)
index 0000000..c07b29c
--- /dev/null
@@ -0,0 +1,15 @@
+Description: mqtt plugin: Fix resource leak.
+Author: Denys Fedoryshchenko <denys@visp.net.lb>
+
+diff --git a/src/mqtt.c b/src/mqtt.c
+index 95deb0075..6b76af97b 100644
+--- a/src/mqtt.c
++++ b/src/mqtt.c
+@@ -448,6 +448,7 @@ static int publish(mqtt_client_conf_t *conf, char const *topic,
+      * measure; we will try to reconnect the next time we have to publish a
+      * message */
+     conf->connected = 0;
++    mosquitto_disconnect(conf->mosq);
+     pthread_mutex_unlock(&conf->lock);
+     return (-1);
index b13e8f2cf1caeb8f8be2be482e3b3672cfec2cd9..196b7393ce2fce1a476b2bc64c983047ef3c0f85 100644 (file)
@@ -2,4 +2,6 @@ rrd_filter_path.patch
 collection_conf_path.patch
 myplugin_includes.patch
 nagios-debian-paths.patch
-dpdkstat-portable-format-string.patch
+mqtt_resource_leak.patch
+mqtt_invalid_symbols.patch
+dpdkstat_goto_label.patch