From 77f9dcfc478f39c99273b8bddbbe09a851e9a01c Mon Sep 17 00:00:00 2001 From: sthen Date: Sat, 5 Mar 2011 13:43:00 +0000 Subject: [PATCH] update syweb to 0.61 and add a patch so that cpu graphs on single-cpu systems aren't broken. --- www/syweb/Makefile | 4 ++-- www/syweb/distinfo | 10 +++++----- .../patch-htdocs_syweb_graph_defaults_inc | 17 +++++++++++++++++ 3 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 www/syweb/patches/patch-htdocs_syweb_graph_defaults_inc diff --git a/www/syweb/Makefile b/www/syweb/Makefile index 5fc9f43b291..6b6d650d25b 100644 --- a/www/syweb/Makefile +++ b/www/syweb/Makefile @@ -1,7 +1,7 @@ -# $OpenBSD: Makefile,v 1.7 2010/11/22 08:36:54 espie Exp $ +# $OpenBSD: Makefile,v 1.8 2011/03/05 13:43:00 sthen Exp $ COMMENT= web frontend to symon -DISTNAME= syweb-0.60 +DISTNAME= syweb-0.61 CATEGORIES= www sysutils MAINTAINER= Stuart Henderson diff --git a/www/syweb/distinfo b/www/syweb/distinfo index c36074bcb8d..9b4976ee171 100644 --- a/www/syweb/distinfo +++ b/www/syweb/distinfo @@ -1,5 +1,5 @@ -MD5 (syweb-0.60.tar.gz) = jBMoXswBCB/z5nip6VPUyA== -RMD160 (syweb-0.60.tar.gz) = ctkZhYX/PooE9bD9QxxxAHNEwOg= -SHA1 (syweb-0.60.tar.gz) = HCwY4kuQC4MGugUdMJHIaf6+hYM= -SHA256 (syweb-0.60.tar.gz) = CF3XWu+rdJyryfzmYzCdsmZK/1dRlbn549HRaH4cWLk= -SIZE (syweb-0.60.tar.gz) = 36003 +MD5 (syweb-0.61.tar.gz) = J7krlY2s/WA+djeqt9cIoA== +RMD160 (syweb-0.61.tar.gz) = 1plImeQRB/JZg0mNbJ7M7q03MUI= +SHA1 (syweb-0.61.tar.gz) = GCQog8QmfFzA0+mtg+EPWrhiaLs= +SHA256 (syweb-0.61.tar.gz) = z2bFJMmrhllfc61+iyb7SghCfnE7lE6SNxk8214eGWc= +SIZE (syweb-0.61.tar.gz) = 36151 diff --git a/www/syweb/patches/patch-htdocs_syweb_graph_defaults_inc b/www/syweb/patches/patch-htdocs_syweb_graph_defaults_inc new file mode 100644 index 00000000000..3a9f684d511 --- /dev/null +++ b/www/syweb/patches/patch-htdocs_syweb_graph_defaults_inc @@ -0,0 +1,17 @@ +$OpenBSD: patch-htdocs_syweb_graph_defaults_inc,v 1.1 2011/03/05 13:43:00 sthen Exp $ + +On systems where only 1 cpu is graphed, 0xc0 + floor(0x40 / 1) works +out to be 0x100; this is too long for the 8-bit alpha channel value +to supply to rrdtool's grapher and breaks cpu graphs. + +--- htdocs/syweb/graph_defaults.inc.orig Sat Mar 5 13:09:58 2011 ++++ htdocs/syweb/graph_defaults.inc Sat Mar 5 13:26:22 2011 +@@ -844,7 +844,7 @@ function get_combined_template($graph_type, $number) { + switch ($graph_type) { + case 'cpu': + case 'cpuiow': +- $alpha = sprintf("%02x", 0xc0 + floor(0x40 / $number)); ++ $alpha = sprintf("%02x", 0xbf + floor(0x40 / $number)); + $rrd = array('us' => 'user', 'ni' => 'nice', 'sy' => 'system', + 'in' => 'interrupt' , 'id' => 'idle'); + if ($graph_type == 'cpuiow')