From 8203b2774c03a9ed2ea809a9665397adb73f0553 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Fri, 25 Dec 2009 09:44:11 +0100 Subject: [PATCH] patches: Added bts561577_collectd2html_recursive_fix.dpatch. 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 | 5 ++- debian/patches/00list | 1 + ...s561577_collectd2html_recursive_fix.dpatch | 41 +++++++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 debian/patches/bts561577_collectd2html_recursive_fix.dpatch diff --git a/debian/changelog b/debian/changelog index 76a30c1..2d09b17 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Thu, 24 Dec 2009 11:57:58 +0100 + -- Sebastian Harl Fri, 25 Dec 2009 09:42:42 +0100 collectd (4.8.1-2) unstable; urgency=low diff --git a/debian/patches/00list b/debian/patches/00list index 332b35c..0c322da 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -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 index 0000000..ea8c7d3 --- /dev/null +++ b/debian/patches/bts561577_collectd2html_recursive_fix.dpatch @@ -0,0 +1,41 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## bts561577_collectd2html_recursive_fix.dpatch +## by Yuri D'Elia +## +## 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); + } -- 2.30.2