Code

patches: Added bts561577_collectd2html_recursive_fix.dpatch.
authorSebastian Harl <sh@tokkee.org>
Fri, 25 Dec 2009 08:44:11 +0000 (09:44 +0100)
committerSebastian Harl <sh@tokkee.org>
Fri, 25 Dec 2009 08:54:22 +0000 (09:54 +0100)
This patch fixes collectd2html.pl's recursive mode and improves some defaults.

Thanks to Yuri D'Elia for reporting this and providing a patch!
Closes: #561577
debian/changelog
debian/patches/00list
debian/patches/bts561577_collectd2html_recursive_fix.dpatch [new file with mode: 0644]

index 76a30c1abe720ce48c5af20245c87e2fa2556997..2d09b17c94fa79f38e27fa042a8f132ae1101bf1 100644 (file)
@@ -37,6 +37,9 @@ collectd (4.8.2-1) unstable; urgency=low
       from a recommendation to a suggestion.
   * debian/patches:
     - Removed gmond-fix-compile-error.dpatch -- included upstream.
+    - Added bts561577_collectd2html_recursive_fix.dpatch -- fixed
+      collectd2html.pl's recursive mode and improved some defaults; thanks to
+      Yuri D'Elia for reporting this and providing a patch (Closes: #561577).
   * debian/rules:
     - Pass --without-included-ltdl to configure to tell libtool 2 to not use
       the shipped libltdl but rather the one available in the system.
@@ -48,7 +51,7 @@ collectd (4.8.2-1) unstable; urgency=low
   * debian/README.Debian:
     - Added a short explanation of the package split.
 
- -- Sebastian Harl <tokkee@debian.org>  Thu, 24 Dec 2009 11:57:58 +0100
+ -- Sebastian Harl <tokkee@debian.org>  Fri, 25 Dec 2009 09:42:42 +0100
 
 collectd (4.8.1-2) unstable; urgency=low
 
index 332b35c8333c22b54c6ead8e9d0f6750c3bfbc7f..0c322da82ae11d935bc9fc4f6ea02e65232a60aa 100644 (file)
@@ -1,3 +1,4 @@
 rrd_filter_path.dpatch
 collection_conf_path.dpatch
+bts561577_collectd2html_recursive_fix.dpatch
 
diff --git a/debian/patches/bts561577_collectd2html_recursive_fix.dpatch b/debian/patches/bts561577_collectd2html_recursive_fix.dpatch
new file mode 100644 (file)
index 0000000..ea8c7d3
--- /dev/null
@@ -0,0 +1,41 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## bts561577_collectd2html_recursive_fix.dpatch
+## by Yuri D'Elia <wavexx@thregr.org>
+##
+## DP: collectd2html: Fixed recursive mode.
+## DP:
+## DP: Also, improved default settings to match the collectd4 series.
+
+@DPATCH@
+
+diff a/contrib/collectd2html.pl b/contrib/collectd2html.pl
+--- a/contrib/collectd2html.pl
++++ b/contrib/collectd2html.pl
+@@ -44,7 +44,7 @@
+ my $DIR       = "/var/lib/collectd";
+ my $HOST      = undef;
+ my $IMG_FMT   = "PNG";
+-my $RECURSIVE = 0;
++my $RECURSIVE = 1;
+ GetOptions (
+     "host=s"         => \$HOST,
+@@ -63,7 +63,7 @@
+ my @COLORS = (0xff7777, 0x7777ff, 0x55ff55, 0xffcc77, 0xff77ff, 0x77ffff,
+       0xffff77, 0x55aaff);
+-my @tmp = `/bin/hostname`; chomp(@tmp);
++my @tmp = `/bin/hostname -f`; chomp(@tmp);
+ $HOST = $tmp[0] if (! defined $HOST);
+ my $svg_p = ($IMG_FMT eq "SVG");
+ my $IMG_SFX = $svg_p ? ".svg" : ".png";
+@@ -140,7 +140,8 @@
+ }
+ chomp(@list);
+-foreach my $rrd (sort @list){
++@list = sort @list;
++foreach my $rrd (@list){
+       $rrd =~ m/^$DIR\/(.*)\.rrd$/;
+       push(@rrds, $1);
+ }