aboutsummaryrefslogtreecommitdiff
path: root/sysutils/munin-master/files
diff options
context:
space:
mode:
authorFlorian Smeets <flo@FreeBSD.org>2012-09-13 22:00:33 +0000
committerFlorian Smeets <flo@FreeBSD.org>2012-09-13 22:00:33 +0000
commit8b61b2876cc5407f25f6d9cd5d8bebe397a60668 (patch)
treefafd474ebc08428c29c584a1087331befe40abec /sysutils/munin-master/files
parentce2fc14864c360de5ddb0878fdcda0e04e0ea849 (diff)
downloadports-8b61b2876cc5407f25f6d9cd5d8bebe397a60668.tar.gz
ports-8b61b2876cc5407f25f6d9cd5d8bebe397a60668.zip
- Update to 2.0.6 based on [1]
- Add support for ada disk devices to hddtemp_smartctl [2] - Add a patch for upstream bug 1251 to prevent huge munin-graph.log files PR: ports/171116 [1] PR: ports/169287 [2] Submitted by: mm [1], TAKEMON Takashi <takemon@bamboogate.co.jp> [2]
Notes
Notes: svn path=/head/; revision=304233
Diffstat (limited to 'sysutils/munin-master/files')
-rw-r--r--sysutils/munin-master/files/patch-Makefile11
-rw-r--r--sysutils/munin-master/files/patch-Makefile.config14
-rw-r--r--sysutils/munin-master/files/patch-bug1251155
-rw-r--r--sysutils/munin-master/files/patch-master-__bin-munin-check.in20
4 files changed, 155 insertions, 45 deletions
diff --git a/sysutils/munin-master/files/patch-Makefile b/sysutils/munin-master/files/patch-Makefile
deleted file mode 100644
index 22cd60e4fefe..000000000000
--- a/sysutils/munin-master/files/patch-Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- Makefile.orig 2010-01-30 10:49:44.000000000 -0700
-+++ Makefile 2010-01-30 10:49:53.000000000 -0700
-@@ -69,7 +69,7 @@
- mkdir -p $(LOGDIR)
- mkdir -p $(STATEDIR)
- mkdir -p $(CONFDIR)
-- $(CHOWN) $(USER) $(LOGDIR) $(STATEDIR)
-+ $(CHOWN) $(USER) $(STATEDIR)
-
- install-master-prime: $(INFILES_MASTER) install-pre install-master
- mkdir -p $(CONFDIR)/templates
diff --git a/sysutils/munin-master/files/patch-Makefile.config b/sysutils/munin-master/files/patch-Makefile.config
deleted file mode 100644
index 98a7052bf8ae..000000000000
--- a/sysutils/munin-master/files/patch-Makefile.config
+++ /dev/null
@@ -1,14 +0,0 @@
---- Makefile.config.orig 2009-12-30 05:55:56.000000000 -0700
-+++ Makefile.config 2010-01-30 11:17:34.000000000 -0700
-@@ -126,9 +129,8 @@
- # Which command to use to check if the USER and GROUP to run Munin as, exists.
- # These will work on most modern OSes:
- #
--GETENT := $(shell which getent || which true 2>/dev/null)
--CHECKUSER := $(shell $(GETENT) passwd $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistent. Create the user and retry; exit 2"))
--CHECKGROUP := $(shell $(GETENT) group $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistent. Create the group and retry; exit 2"))
-+CHECKUSER:= $(shell /usr/sbin/pw user show $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2"))
-+CHECKGROUP:= $(shell /usr/sbin/pw group show $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2"))
-
- # For OSX, comment out the previous two lines and comment in these
- #
diff --git a/sysutils/munin-master/files/patch-bug1251 b/sysutils/munin-master/files/patch-bug1251
new file mode 100644
index 000000000000..c831972e0e53
--- /dev/null
+++ b/sysutils/munin-master/files/patch-bug1251
@@ -0,0 +1,155 @@
+diff --git a/master/_bin/munin-cgi-graph.in b/master/_bin/munin-cgi-graph.in
+index dec4aa2..bcfbe90 100755
+--- master/_bin/munin-cgi-graph.in
++++ master/_bin/munin-cgi-graph.in
+@@ -90,7 +90,7 @@ while (new CGI::Fast) {
+ my $pinpoint = undef;
+ my $path = $ENV{PATH_INFO} || "";
+
+- INFO "Request path is $path";
++ DEBUG "Request path is $path";
+
+ # The full URL looks like this:
+ # Case 1:
+@@ -133,7 +133,7 @@ while (new CGI::Fast) {
+ my ($dom, $host, $serv, $scale) =
+ $path =~ m#^/(.*)/([^/]+)/([\w-]+)-([\w=,]+)\.png#; ## avoid bug in vim
+
+- INFO "asked for ($dom, $host, $serv, $scale)";
++ DEBUG "asked for ($dom, $host, $serv, $scale)";
+
+ if ($scale =~ /pinpoint=(\d+),(\d+)/) {
+ $pinpoint = [ $1, $2, ];
+diff --git a/master/_bin/munin-graph.in b/master/_bin/munin-graph.in
+index fb47333..b8fc0d0 100755
+--- master/_bin/munin-graph.in
++++ master/_bin/munin-graph.in
+@@ -84,7 +84,7 @@ my $nb_request_max = 0;
+ my $graph_fh = new IO::File($config->{dbdir} . "/graphs");
+ while (my $path = <$graph_fh>) {
+ my $pinpoint = undef;
+- INFO "Request path is $path";
++ DEBUG "Request path is $path";
+
+ # The full URL looks like this:
+ # Case 1:
+@@ -126,7 +126,7 @@ while (my $path = <$graph_fh>) {
+ my ($dom, $host, $serv, $scale) =
+ $path =~ m#^/(.*)/([^/]+)/(\w+)-([\w=,]+)\.png#; ## avoid bug in vim
+
+- INFO "asked for ($dom, $host, $serv, $scale)";
++ DEBUG "asked for ($dom, $host, $serv, $scale)";
+
+ if ($scale =~ /pinpoint=(\d+),(\d+)/) {
+ $pinpoint = [ $1, $2, ];
+@@ -159,15 +159,8 @@ while (my $path = <$graph_fh>) {
+ }
+
+ # Now send it: headers
+- INFO "X-Munin-Request: $nb_request/$nb_request_max";
++ DEBUG "X-Munin-Request: $nb_request/$nb_request_max";
+
+- my $headers = get_headers_for_file($filename, $graph_ttl);
+- foreach my $header_name (keys %$headers) {
+- INFO "$header_name: $headers->{$header_name}";
+- }
+-
+- # ... and graph data
+- # send_graph_data($filename);
+ } continue {
+ $nb_request++;
+ if ($nb_request_max && $nb_request > $nb_request_max) {
+@@ -179,27 +172,6 @@ while (my $path = <$graph_fh>) {
+
+ exit 0;
+
+-
+-sub get_headers_for_file {
+- my ($filename, $graph_ttl) = @_;
+-
+- # At this time the file exists and should be served
+- my @stats = stat ($filename);
+- my $mtime_epoch = $stats[9];
+- my $last_modified = get_w3c_date_from_epoch($mtime_epoch);
+-
+- # "Expires" has to use last modified time as base:
+- my $graph_next_expires = $mtime_epoch - ($mtime_epoch % $graph_ttl) + $graph_ttl;
+- my $expires = get_w3c_date_from_epoch($graph_next_expires);
+-
+- return {
+- "Expires" => $expires,
+- "Last-Modified" => $last_modified,
+- "Content-Length" => $stats[7],
+- };
+-}
+-
+-
+ sub get_w3c_date_from_epoch {
+ my($epoch) = @_;
+ return strftime("%a, %d %b %Y %H:%M:%S GMT", gmtime($epoch));
+diff --git a/master/lib/Munin/Master/GraphOld.pm b/master/lib/Munin/Master/GraphOld.pm
+index 004484d..d2fe3fd 100644
+--- master/lib/Munin/Master/GraphOld.pm
++++ master/lib/Munin/Master/GraphOld.pm
+@@ -1350,7 +1350,7 @@ sub process_service {
+ for my $time (keys %times) {
+ next unless ($draw{$time});
+ my $picfilename = get_picture_filename($service, $time);
+- INFO "[INFO] Looking into drawing $picfilename";
++ DEBUG "[DEBUG] Looking into drawing $picfilename";
+ (my $picdirname = $picfilename) =~ s/\/[^\/]+$//;
+
+ DEBUG "[DEBUG] Picture filename: $picfilename";
+diff --git a/master/lib/Munin/Master/HTMLConfig.pm b/master/lib/Munin/Master/HTMLConfig.pm
+index dfa8b70..bbccffa 100644
+--- master/lib/Munin/Master/HTMLConfig.pm
++++ master/lib/Munin/Master/HTMLConfig.pm
+@@ -473,7 +473,7 @@ sub generate_service_templates {
+ }
+ }
+
+- if ($config->{'graph_strategy'} eq "cgi") {
++ if (munin_get($config, "graph_strategy", "cron") eq "cgi") {
+ map { $srv{$_} = $config->{'cgiurl_graph'} . "/" . $imgs{$_} } keys %imgs;
+ } else {
+ map { $srv{$_} = $root_path . "/" . $imgs{$_} } keys %imgs;
+@@ -500,7 +500,7 @@ sub generate_service_templates {
+ for my $scale (@times) {
+ # Don't try to find the size if cgi is enabled,
+ # otherwise old data might pollute
+- next if ($config->{'graph_strategy'} eq "cgi");
++ next if (munin_get($config, "graph_strategy", "cron") eq "cgi");
+ if (my ($w, $h)
+ = get_png_size(munin_get_picture_filename($service, $scale))) {
+ $srv{"img" . $scale . "width"} = $w;
+@@ -512,7 +512,7 @@ sub generate_service_templates {
+ $srv{imgweeksum} = "$srv{node}-week-sum.png";
+ $srv{imgyearsum} = "$srv{node}-year-sum.png";
+ for my $scale (["week", "year"]) {
+- next if ($config->{'graph_strategy'} eq "cgi");
++ next if (munin_get($config, "graph_strategy", "cron") eq "cgi");
+ if (my ($w, $h)
+ = get_png_size(munin_get_picture_filename($service, $scale, 1)))
+ {
+diff --git a/master/lib/Munin/Master/Logger.pm b/master/lib/Munin/Master/Logger.pm
+index f2f05ca..580357c 100644
+--- master/lib/Munin/Master/Logger.pm
++++ master/lib/Munin/Master/Logger.pm
+@@ -90,7 +90,7 @@ sub logger_open_stderr {
+ $logopened = 1;
+ }
+
+- get_logger('')->info("Opened log file");
++ get_logger('')->debug("Opened log file");
+
+ # Get perl warnings into the log files
+ $SIG{__WARN__} = \&_warn_catcher;
+@@ -117,7 +117,7 @@ sub logger_open {
+ $logopened = 1;
+ }
+
+- get_logger('')->info("Opened log file");
++ get_logger('')->debug("Opened log file");
+
+ # Get perl warnings into the log files
+ $SIG{__WARN__} = \&_warn_catcher;
diff --git a/sysutils/munin-master/files/patch-master-__bin-munin-check.in b/sysutils/munin-master/files/patch-master-__bin-munin-check.in
deleted file mode 100644
index 9dc12e7bf20f..000000000000
--- a/sysutils/munin-master/files/patch-master-__bin-munin-check.in
+++ /dev/null
@@ -1,20 +0,0 @@
---- master/_bin/munin-check.in.orig 2009-12-29 17:03:49.000000000 +0100
-+++ master/_bin/munin-check.in 2010-12-02 23:48:25.854543201 +0100
-@@ -78,7 +78,7 @@
- object=$1; shift || exit 1
- correctowner=$1; shift || exit 1
-
-- owner=$(stat -c%U $object)
-+ owner=$(stat -f%Su $object)
- if [ "$owner" != "$correctowner" ]; then
- echo "# $object : Wrong owner ($owner != $correctowner)";
- if [ "$PLEASE_FIXME" = "true" ]; then
-@@ -108,7 +108,7 @@
- object=$1; shift || exit 1
- correctperm=$1; shift || exit 1
-
-- perm=$(stat -c%a $object)
-+ perm=$(stat -f%OLp $object)
- if [ "$perm" != "$correctperm" ]; then
- echo "# $object : Wrong permissions ($perm != $correctperm)";
- if [ "$PLEASE_FIXME" = "true" ]; then