Code

Merged branch 'v5.4.1'.
authorSebastian Harl <sh@tokkee.org>
Sat, 26 Apr 2014 19:32:53 +0000 (21:32 +0200)
committerSebastian Harl <sh@tokkee.org>
Sat, 26 Apr 2014 19:32:53 +0000 (21:32 +0200)
debian/changelog
debian/control
debian/patches/00list
debian/patches/collection.cgi.dpatch [new file with mode: 0644]
debian/patches/myplugin_api.dpatch [new file with mode: 0755]
debian/rules

index 866de1a904933babb63014f293fdefb9cf71e750..a17f4a1f131e1b1fd1ce29ce7e8ce54f6c3d5ba6 100644 (file)
@@ -1,4 +1,4 @@
-collectd (5.4.1-2) UNRELEASED; urgency=medium
+collectd (5.4.1-3) UNRELEASED; urgency=medium
 
   * debian/control:
     - Added libupsclient-dev as primary alternate build-dep to
@@ -7,6 +7,27 @@ collectd (5.4.1-2) UNRELEASED; urgency=medium
 
  -- Sebastian Harl <tokkee@debian.org>  Sun, 12 Jan 2014 17:41:45 +0100
 
+collectd (5.4.1-2) unstable; urgency=medium
+
+  * debian/rules, debian/control:
+    - Disable varnish for now; it does not work with varnish 4;
+      c.f. https://bugs.debian.org/745902 (Closes: #745894).
+    - Drop build dependency on libvarnishapi-dev.
+    - Build-depend on libow-dev and re-enable the onewire plugin; thanks to
+      Adam Smutnicki for pointing this out (Closes: #744956).
+  * debian/rules:
+    - Added INSTALL_BASE= to perl options; else, modules are installed
+      into $HOME.
+    - Prepend collectd/core to collectd's header files; thanks to Sergio
+      Jimenez for reporting this (Closes: #739516).
+  * debian/patches:
+    - Added collection.cgi.dpatch fixing apache data-sources; thanks to
+      Fabiano Pires for reporting this and providing a patch
+      (Closes: #743881).
+    - Added myplugin_api.dpatch updating myplugin.c to the latest API.
+
+ -- Sebastian Harl <tokkee@debian.org>  Sat, 26 Apr 2014 16:54:19 +0200
+
 collectd (5.4.1-1) unstable; urgency=medium
 
   * New upstream release:
index 9bbe283f0b1b0b8a221dffeac72575321650fe84..e155c1c7afdc43f3bc17aea9037c5bbd18fc70a4 100644 (file)
@@ -22,6 +22,7 @@ Build-Depends: debhelper (>= 5), dpkg-dev (>= 1.14.10), po-debconf, dpatch,
  libnotify-dev,
  libopenipmi-dev,
  liboping-dev (>= 0.3.3),
+ libow-dev,
  libpcap0.8-dev | libpcap-dev,
  libperl-dev,
  libpq-dev,
@@ -36,7 +37,7 @@ Build-Depends: debhelper (>= 5), dpkg-dev (>= 1.14.10), po-debconf, dpatch,
  libtokyocabinet-dev [linux-any],
  libtokyotyrant-dev [linux-any],
  libupsclient-dev | libupsclient1-dev,
- libvarnish-dev,
+# libvarnishapi-dev,
  libvirt-dev (>= 0.4.0-6) [linux-any],
  libxml2-dev,
  libyajl-dev,
index 23aacf62e043c084fffcce668440b01881337668..ae9c349118cfee31c14d359e0674fe21eefabbd3 100644 (file)
@@ -1,4 +1,6 @@
 rrd_filter_path.dpatch
 collection_conf_path.dpatch
+collection.cgi.dpatch
 myplugin_includes.dpatch
+myplugin_api.dpatch
 bts559801_plugin_find_fix.dpatch
diff --git a/debian/patches/collection.cgi.dpatch b/debian/patches/collection.cgi.dpatch
new file mode 100644 (file)
index 0000000..5156449
--- /dev/null
@@ -0,0 +1,75 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## collection.cgi.dpatch by Fabiano Pires <fxp@ig.com.br>
+##
+## DP: collection.cgi: Fixed apache data-sources.
+
+@DPATCH@
+
+diff a/contrib/collection.cgi b/contrib/collection.cgi
+--- a/contrib/collection.cgi
++++ b/contrib/collection.cgi
+@@ -957,9 +957,9 @@
+   $GraphDefs =
+   {
+-    apache_bytes => ['DEF:min_raw={file}:count:MIN',
+-    'DEF:avg_raw={file}:count:AVERAGE',
+-    'DEF:max_raw={file}:count:MAX',
++    apache_bytes => ['DEF:min_raw={file}:value:MIN',
++    'DEF:avg_raw={file}:value:AVERAGE',
++    'DEF:max_raw={file}:value:MAX',
+     'CDEF:min=min_raw,8,*',
+     'CDEF:avg=avg_raw,8,*',
+     'CDEF:max=max_raw,8,*',
+@@ -976,9 +976,9 @@
+     'GPRINT:avg:LAST:%5.1lf%s Last',
+     'GPRINT:avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
+     ],
+-   apache_connections => ['DEF:min={file}:count:MIN',
+-    'DEF:avg={file}:count:AVERAGE',
+-    'DEF:max={file}:count:MAX',
++   apache_connections => ['DEF:min={file}:value:MIN',
++    'DEF:avg={file}:value:AVERAGE',
++    'DEF:max={file}:value:MAX',
+     "AREA:max#$HalfBlue",
+     "AREA:min#$Canvas",
+     "LINE1:avg#$FullBlue:Connections",
+@@ -987,9 +987,9 @@
+     'GPRINT:max:MAX:%6.2lf Max,',
+     'GPRINT:avg:LAST:%6.2lf Last'
+     ],
+-    apache_idle_workers => ['DEF:min={file}:count:MIN',
+-    'DEF:avg={file}:count:AVERAGE',
+-    'DEF:max={file}:count:MAX',
++    apache_idle_workers => ['DEF:min={file}:value:MIN',
++    'DEF:avg={file}:value:AVERAGE',
++    'DEF:max={file}:value:MAX',
+     "AREA:max#$HalfBlue",
+     "AREA:min#$Canvas",
+     "LINE1:avg#$FullBlue:Idle Workers",
+@@ -998,9 +998,9 @@
+     'GPRINT:max:MAX:%6.2lf Max,',
+     'GPRINT:avg:LAST:%6.2lf Last'
+     ],
+-    apache_requests => ['DEF:min={file}:count:MIN',
+-    'DEF:avg={file}:count:AVERAGE',
+-    'DEF:max={file}:count:MAX',
++    apache_requests => ['DEF:min={file}:value:MIN',
++    'DEF:avg={file}:value:AVERAGE',
++    'DEF:max={file}:value:MAX',
+     "AREA:max#$HalfBlue",
+     "AREA:min#$Canvas",
+     "LINE1:avg#$FullBlue:Requests/s",
+@@ -1009,9 +1009,9 @@
+     'GPRINT:max:MAX:%6.2lf Max,',
+     'GPRINT:avg:LAST:%6.2lf Last'
+     ],
+-    apache_scoreboard => ['DEF:min={file}:count:MIN',
+-    'DEF:avg={file}:count:AVERAGE',
+-    'DEF:max={file}:count:MAX',
++    apache_scoreboard => ['DEF:min={file}:value:MIN',
++    'DEF:avg={file}:value:AVERAGE',
++    'DEF:max={file}:value:MAX',
+     "AREA:max#$HalfBlue",
+     "AREA:min#$Canvas",
+     "LINE1:avg#$FullBlue:Processes",
diff --git a/debian/patches/myplugin_api.dpatch b/debian/patches/myplugin_api.dpatch
new file mode 100755 (executable)
index 0000000..fa2b513
--- /dev/null
@@ -0,0 +1,76 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## myplugin_api.dpatch by Sebastian Harl <sh@tokkee.org>
+##
+## DP: Update myplugin.c to the latest collectd API.
+
+@DPATCH@
+
+diff a/contrib/examples/myplugin.c b/contrib/examples/myplugin.c
+--- a/contrib/examples/myplugin.c
++++ b/contrib/examples/myplugin.c
+@@ -100,14 +100,16 @@
+       vl.time       = time (NULL);
+       sstrncpy (vl.host, hostname_g, sizeof (vl.host));
+       sstrncpy (vl.plugin, "myplugin", sizeof (vl.plugin));
++
++      /* it is strongly recommended to use a type defined in the types.db file
++       * instead of a custom type */
++      sstrncpy (vl.type, "myplugin", sizeof (vl.plugin));
+       /* optionally set vl.plugin_instance and vl.type_instance to reasonable
+        * values (default: "") */
+       /* dispatch the values to collectd which passes them on to all registered
+-       * write functions - the first argument is used to lookup the data set
+-       * definition (it is strongly recommended to use a type defined in the
+-       * types.db file) */
+-      plugin_dispatch_values ("myplugin", &vl);
++       * write functions */
++      plugin_dispatch_values (&vl);
+       /* A return value != 0 indicates an error and the plugin will be skipped
+        * for an increasing amount of time. */
+@@ -117,7 +119,8 @@
+ /*
+  * This function is called after values have been dispatched to collectd.
+  */
+-static int my_write (const data_set_t *ds, const value_list_t *vl)
++static int my_write (const data_set_t *ds, const value_list_t *vl,
++              user_data_t *ud)
+ {
+       char name[1024] = "";
+       int i = 0;
+@@ -151,7 +154,7 @@
+ /*
+  * This function is called when plugin_log () has been used.
+  */
+-static void my_log (int severity, const char *msg)
++static void my_log (int severity, const char *msg, user_data_t *ud)
+ {
+       printf ("LOG: %i - %s\n", severity, msg);
+       return;
+@@ -160,7 +163,7 @@
+ /*
+  * This function is called when plugin_dispatch_notification () has been used.
+  */
+-static int my_notify (const notification_t *notif)
++static int my_notify (const notification_t *notif, user_data_t *ud)
+ {
+       char time_str[32] = "";
+       struct tm *tm = NULL;
+@@ -210,12 +213,13 @@
+  */
+ void module_register (void)
+ {
+-      plugin_register_log ("myplugin", my_log);
+-      plugin_register_notification ("myplugin", my_notify);
++      plugin_register_log ("myplugin", my_log, /* user data */ NULL);
++      plugin_register_notification ("myplugin", my_notify,
++                      /* user data */ NULL);
+       plugin_register_data_set (&ds);
+       plugin_register_read ("myplugin", my_read);
+       plugin_register_init ("myplugin", my_init);
+-      plugin_register_write ("myplugin", my_write);
++      plugin_register_write ("myplugin", my_write, /* user data */ NULL);
+       plugin_register_shutdown ("myplugin", my_shutdown);
+     return;
+ } /* void module_register (void) */
index 6b8b6d2e77e1fef3bbc241caef80087bfb773181..11ef4ccdd3c3a90e013afef2717b268acb4ba6f4 100755 (executable)
@@ -51,7 +51,7 @@ confflags = --host=$(DEB_HOST_GNU_TYPE) \
                        --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
                        --mandir=\$${prefix}/share/man \
                        --localstatedir=/var --sysconfdir=/etc \
-                       --with-perl-bindings="INSTALLDIRS=vendor" \
+                       --with-perl-bindings="INSTALLDIRS=vendor INSTALL_BASE=" \
                        --without-libstatgrab \
                        --without-included-ltdl \
                        --disable-static \
@@ -74,9 +74,6 @@ confflags += --disable-mic
 # libnetapp is required for the netapp plugin.
 confflags += --disable-netapp
 
-# libowcapi is required for the onewire plugin.
-confflags += --disable-onewire
-
 # libclntsh is required for the oracle plugin.
 confflags += --disable-oracle
 
@@ -89,6 +86,10 @@ confflags += --disable-routeros
 # libsigrok >= 0.2.0 is required for the sigrok plugin, should arrive in unstable soon
 confflags += --disable-sigrok
 
+# varnish does not currently work with varnish4
+# (c.f. https://bugs.debian.org/745902)
+confflags += --disable-varnish
+
 # libmongoc is required for the write_mongodb plugin.
 confflags += --disable-write_mongodb
 
@@ -212,6 +213,12 @@ install-indep:
        dh_clean -k
        dh_installdirs -i
        dh_install -i
+       
+       # update include path for collectd header files
+       sed -r -i -e 's/include "(.*)"/include "collectd\/core\/\1"/' \
+               $(CURDIR)/debian/collectd-dev/usr/include/collectd/core/*
+       sed -r -i -e 's/"collectd\/core\/(liboconfig\/.*)"/"collectd\/\1"/' \
+               $(CURDIR)/debian/collectd-dev/usr/include/collectd/core/*
 
 install-arch: build
        dh_testdir