Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
Munin is a tool for graphing all sorts of information about one or
more servers and displaying it in a web interface. It uses the
execellent RRDTool (written by Tobi Oetiker) and is written in Perl.
Munin has a master/node architecture. The master connects to all the
nodes at regular intervals, and asks them for data. It then stores
the data in RRD-files, and (if needed) updates the graphs. One of the
main goals has been ease of creating own "plugins" (graphs).
This package contains the server.
+27
View File
@@ -0,0 +1,27 @@
===========================================================================
$NetBSD: MESSAGE,v 1.5 2012/08/31 16:37:48 shattered Exp $
You can start the collection of statistics and production of graphs by
installing a crontab for the ${MUNIN_USER} user of the form
*/5 * * * * ${PREFIX}/bin/munin-cron
You may need to give ${MUNIN_USER} a valid shell to do so.
You may also want to add lines like
${VARBASE}/log/munin/munin-graph.log munin:munin 644 7 * 24 Z
${VARBASE}/log/munin/munin-html.log munin:munin 644 7 * 24 Z
${VARBASE}/log/munin/munin-limits.log munin:munin 644 7 * 24 Z
${VARBASE}/log/munin/munin-update.log munin:munin 644 7 * 24 Z
to your /etc/newsyslog.conf file to have the logs rotated.
'htmldir' should be owned by ${MUNIN_USER}; a subdirectory
named after munin's domain name should exist there for
munin-graph to work. You also need to copy HTML templates from
${PREFIX}/share/examples/munin/templates to 'tmpldir'.
===========================================================================
+112
View File
@@ -0,0 +1,112 @@
# $NetBSD: Makefile,v 1.19 2013/05/31 12:42:02 wiz Exp $
#
DISTNAME= ${PKGNAME_NOREV:S:-server-:_:}
PKGNAME= munin-server-1.3.2
PKGREVISION= 6
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=munin/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://munin-monitoring.org/
COMMENT= System monitoring tool, server version
PKG_DESTDIR_SUPPORT= destdir
DEPENDS+= p5-Date-Manip>=0:../../devel/p5-Date-Manip
DEPENDS+= p5-HTML-Template>=0:../../www/p5-HTML-Template
DEPENDS+= p5-Net-SSLeay>=0:../../security/p5-Net-SSLeay
DEPENDS+= rrdtool>=1.2:../../databases/rrdtool
DEPENDS+= munin-doc>=1.3.1:../../sysutils/munin-doc
.include "../../mk/bsd.prefs.mk"
.if ${X11_TYPE} == "modular"
DEPENDS+= modular-xorg-fonts>0:../../meta-pkgs/modular-xorg-fonts
.endif
USE_TOOLS+= gmake perl:run
USE_PKGINSTALL= YES
PERL5_CONFIGURE=NO
WRKSRC= ${WRKDIR}/${DISTNAME:S:_:-:}
CHECK_PORTABILITY_SKIP+= node/node.d/*
PKG_GROUPS_VARS+= MUNIN_GROUP
PKG_USERS_VARS+= MUNIN_USER
MUNIN_GROUP?= munin
MUNIN_USER?= munin
PKG_GROUPS= ${MUNIN_GROUP}
PKG_USERS= ${MUNIN_USER}:${MUNIN_GROUP}:::${VARBASE}/munin
PKG_GECOS.${MUNIN_USER}= Munin user
USERGROUP_PHASE= pre-install
PKG_SYSCONFSUBDIR?= munin
STATEDIR= ${VARBASE}/munin/plugin-state
MAKE_DIRS= ${VARBASE}/munin
MAKE_DIRS+= ${VARBASE}/run/munin
MAKE_DIRS+= ${VARBASE}/log/munin
MAKE_DIRS+= ${STATEDIR}
OWN_DIRS= ${VARBASE}/munin
OWN_DIRS+= ${VARBASE}/run/munin
OWN_DIRS+= ${VARBASE}/log/munin
OWN_DIRS+= ${VARBASE}/munin/plugin-state
OWN_DIRS_PERMS+=${VARBASE}/munin ${MUNIN_USER} ${MUNIN_GROUP} 0755
OWN_DIRS_PERMS+=${VARBASE}/run/munin ${MUNIN_USER} ${MUNIN_GROUP} 0755
OWN_DIRS_PERMS+=${VARBASE}/log/munin ${MUNIN_USER} ${MUNIN_GROUP} 0755
OWN_DIRS_PERMS+=${VARBASE}/munin/plugin-state ${MUNIN_USER} ${MUNIN_GROUP} 0775
BUILD_DEFS+= VARBASE
INSTALL_TARGET= install-main
BUILD_TARGET= build
PERL5_SITELIB= ${PERL5_SUB_INSTALLVENDORLIB:Q}
MAKE_ENV+= PERL5_SITELIB=${PREFIX}/${PERL5_SITELIB}
MAKE_ENV+= CONFDIR=${PKG_SYSCONFDIR}
INSTALL_MAKE_ENV+= CONFDIR=${DESTDIR}${PKG_SYSCONFDIR}
MAKE_ENV+= MUNIN_USER=${MUNIN_USER}
MAKE_ENV+= MUNIN_GROUP=${MUNIN_GROUP}
MAKE_ENV+= PERL5=${PERL5:Q}
FILES_SUBST+= PERL=${PERL5:Q}
FILES_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
FILES_SUBST+= STATEDIR=${STATEDIR}
PLIST_SUBST+= PERL5_SITELIB=${PERL5_SITELIB:Q}
MESSAGE_SUBST+= MUNIN_USER=${MUNIN_USER}
MESSAGE_SUBST+= VARBASE=${VARBASE}
EGDIR= ${PREFIX}/share/examples/munin
TMPL_EGDIR= ${EGDIR}/templates
INST_TMPL_DIR= ${PKG_SYSCONFDIR}/templates
CONF_FILES+= ${EGDIR}/munin.conf ${PKG_SYSCONFDIR}/munin.conf
TMPL_FILES= definitions.html logo.png munin-comparison-day.tmpl \
munin-comparison-month.tmpl munin-comparison-week.tmpl \
munin-comparison-year.tmpl munin-domainview.tmpl \
munin-nodeview.tmpl munin-overview.tmpl \
munin-serviceview.tmpl style.css
.for f in ${TMPL_FILES}
CONF_FILES+= ${TMPL_EGDIR}/${f} ${INST_TMPL_DIR}/${f}
.endfor
INSTALLATION_DIRS+= ${EGDIR}
post-install:
${INSTALL_DATA} ${WRKSRC}/build/server/munin.conf ${DESTDIR}${EGDIR}
.include "../../mk/bsd.pkg.mk"
.include "../../lang/perl5/module.mk"
+20
View File
@@ -0,0 +1,20 @@
@comment $NetBSD: PLIST,v 1.4 2009/06/14 21:28:48 joerg Exp $
bin/munin-cron
lib/munin/munin-graph
lib/munin/munin-html
lib/munin/munin-limits
lib/munin/munin-update
share/examples/munin/munin.conf
share/examples/munin/templates/definitions.html
share/examples/munin/templates/logo.png
share/examples/munin/templates/munin-comparison-day.tmpl
share/examples/munin/templates/munin-comparison-month.tmpl
share/examples/munin/templates/munin-comparison-week.tmpl
share/examples/munin/templates/munin-comparison-year.tmpl
share/examples/munin/templates/munin-domainview.tmpl
share/examples/munin/templates/munin-nodeview.tmpl
share/examples/munin/templates/munin-overview.tmpl
share/examples/munin/templates/munin-serviceview.tmpl
share/examples/munin/templates/style.css
www/munin/data/cgi/munin-cgi-graph
${PERL5_SITELIB}/Munin.pm
+9
View File
@@ -0,0 +1,9 @@
$NetBSD: distinfo,v 1.5 2010/07/11 19:08:06 joerg Exp $
SHA1 (munin_1.3.2.tar.gz) = 575c1dc3373e2e001accd1920fd815d9b875c95a
RMD160 (munin_1.3.2.tar.gz) = 7bcc16d00ad28731041015ef240144ed0c4fdeb4
Size (munin_1.3.2.tar.gz) = 309319 bytes
SHA1 (patch-aa) = e30b9294f3a2877b540bcd6678b1a63674d8e193
SHA1 (patch-ab) = bb0f63cdef893d8c224cdd03a4a4125d03f85f80
SHA1 (patch-ad) = a2293c767e0c5b6d4866449c5fbc4613ec664512
SHA1 (patch-ae) = ac8f4f5b7abf03c057ff293ab82c7176bc51a3f6
+88
View File
@@ -0,0 +1,88 @@
$NetBSD: patch-aa,v 1.3 2010/07/11 19:08:07 joerg Exp $
--- Makefile.config.orig 2005-01-10 11:38:22.000000000 +0100
+++ Makefile.config
@@ -7,32 +7,35 @@
#
# the base of the Munin installation.
#
-PREFIX = $(DESTDIR)/opt/munin
+UPREFIX = ${DESTDIR}$(PREFIX)
# Where Munin keeps its configurations (server.conf, client.conf, ++)
-CONFDIR = $(DESTDIR)/etc/opt/munin
+CONFDIR ?= $(UPREFIX)/etc/munin
+
+# Where NetBSD pkgsrc installs example config files
+EGDIR = $(UPREFIX)/share/examples/munin
# Server only - where to put munin-cron
-BINDIR = $(PREFIX)/bin
+BINDIR = $(UPREFIX)/bin
# Client only - where to put munin-node, munin-node-configure, and munin-run
-SBINDIR = $(PREFIX)/sbin
+SBINDIR = $(UPREFIX)/sbin
# Where to put text and html documentation
-DOCDIR = $(PREFIX)/doc
+DOCDIR = $(UPREFIX)/share/doc/munin
# Where to put man pages
-MANDIR = $(PREFIX)/man
+MANDIR = $(UPREFIX)/man
# Where to put internal binaries and plugin repository
-LIBDIR = $(PREFIX)/lib
+LIBDIR = $(UPREFIX)/lib/munin
# Server only - Output directory
-HTMLDIR = $(PREFIX)/var/www
+HTMLDIR = $(UPREFIX)/www/munin/data
CGIDIR = $(HTMLDIR)/cgi
# Client only - Where to put RRD files and other intenal data
-DBDIR = $(DESTDIR)/var/opt/munin
+DBDIR = $(DESTDIR)/var/munin
# Client only - Where plugins should put their states. Must be writable by
# group "munin", and should be preserved between reboots
@@ -45,14 +52,14 @@ LOGDIR = $(DESTDIR)/var/log/munin
# writable by the user "munin".
STATEDIR = $(DESTDIR)/var/run/munin
-# The perl interpreter to use
-PERL = $(shell which perl)
+# The perl interpreter to use (passed in by pkgsrc)
+PERL = ${PERL5}
# The python interpreter to use (used by some plugins)
PYTHON = /usr/bin/env python
# Server only - Where to install the perl libraries
-PERLLIB = $(DESTDIR)$(shell $(PERL) -V:sitelib | cut -d= -f2 | sed "s/[\';]//g")
+PERLLIB = ${DESTDIR}${PERL5_SITELIB}
# Client only - Install plugins for this architecture
OSTYPE = $(shell uname | tr '[A-Z]' '[a-z]')
@@ -65,16 +72,15 @@ HOSTNAME = $(shell hostname)
VERSION = $(shell cat RELEASE)
# User to run munin as
-USER = munin
-GROUP = munin
+USER = ${MUNIN_USER}
+GROUP = ${MUNIN_GROUP}
# Default user to run the plugins as
PLUGINUSER = nobody
# Which command to use to check if the USER and GROUP to run Munin as, exists.
-GETENT = $(shell which getent || which true 2>/dev/null)
-CHECKUSER = $(shell $(GETENT) passwd $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2"))
-CHECKGROUP = $(shell $(GETENT) group $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2"))
+CHECKUSER = $(shell grep $(USER) /etc/passwd >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistent. Create the user and retry; exit 2"))
+CHECKGROUP = $(shell grep $(GROUP) /etc/group >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistent. Create the group and retry; exit 2"))
CHOWN = chown
CHMOD = chmod
+13
View File
@@ -0,0 +1,13 @@
$NetBSD: patch-ab,v 1.1.1.1 2006/06/08 19:16:24 he Exp $
--- node/munin-node.conf.in.orig 2004-01-29 18:15:47.000000000 +0100
+++ node/munin-node.conf.in
@@ -12,7 +12,7 @@ setseid 1
# Which port to bind to;
host *
user root
-group root
+group wheel
setsid yes
# Regexps for files to ignore
+46
View File
@@ -0,0 +1,46 @@
$NetBSD: patch-ad,v 1.3 2006/12/05 14:53:32 xtraeme Exp $
--- Makefile.orig 2006-12-05 15:43:41.000000000 +0100
+++ Makefile 2006-12-05 15:46:20.000000000 +0100
@@ -18,6 +18,7 @@
install-main: build
$(CHECKUSER)
mkdir -p $(CONFDIR)/templates
+ mkdir -p $(EGDIR)/templates
mkdir -p $(LIBDIR)
mkdir -p $(BINDIR)
mkdir -p $(PERLLIB)
@@ -25,19 +26,20 @@
mkdir -p $(LOGDIR)
mkdir -p $(STATEDIR)
mkdir -p $(HTMLDIR)
+ mkdir -p $(CGIDIR)
mkdir -p $(DBDIR)
mkdir -p $(CGIDIR)
$(CHOWN) $(USER) $(LOGDIR) $(STATEDIR) $(RUNDIR) $(HTMLDIR) $(DBDIR)
+ $(CHOWN) $(USER) $(LOGDIR) $(STATEDIR) $(RUNDIR) $(HTMLDIR) $(DBDIR) $(CGIDIR)
for p in build/server/*.tmpl; do \
- $(INSTALL) -m 0644 "$$p" $(CONFDIR)/templates/ ; \
+ $(INSTALL) -m 0644 "$$p" $(EGDIR)/templates/ ; \
done
- $(INSTALL) -m 0644 server/logo.png $(CONFDIR)/templates/
- $(INSTALL) -m 0644 server/style.css $(CONFDIR)/templates/
- $(INSTALL) -m 0644 server/definitions.html $(CONFDIR)/templates/
+ $(INSTALL) -m 0644 server/logo.png $(EGDIR)/templates/
+ $(INSTALL) -m 0644 server/style.css $(EGDIR)/templates/
+ $(INSTALL) -m 0644 server/definitions.html $(EGDIR)/templates/
- test -f "$(CONFDIR)/munin.conf" || $(INSTALL) -m 0644 build/server/munin.conf $(CONFDIR)/
$(INSTALL) -m 0755 build/server/munin-cron $(BINDIR)/
@@ -73,7 +75,6 @@
$(INSTALL) -m 0755 build/node/munin-node $(SBINDIR)/
$(INSTALL) -m 0755 build/node/munin-node-configure $(SBINDIR)/
- test -f "$(CONFDIR)/munin-node.conf" || $(INSTALL) -m 0644 build/node/munin-node.conf $(CONFDIR)/
$(INSTALL) -m 0755 build/node/munin-run $(SBINDIR)/
install-node-plugins: build
+89
View File
@@ -0,0 +1,89 @@
$NetBSD: patch-ae,v 1.1.1.1 2006/06/08 19:16:24 he Exp $
--- server/munin-graph.in.orig 2005-01-08 23:34:38.000000000 +0100
+++ server/munin-graph.in
@@ -490,6 +490,9 @@ sub get_header {
push @$result,"--width", &munin_get ($config, "graph_width", "400", $domain, $host, $service);
push @$result,"--imgformat", "PNG";
push @$result,"--lazy" if ($force_lazy);
+ push @$result,"--font", "LEGEND:" . &munin_get ($config, "legend_fontsize", "7", $domain, $host, $service) . ":";
+ push @$result,"--font", "AXIS:" . &munin_get ($config, "axis_fontsize", "7", $domain, $host, $service) . ":";
+# push @$result,"--font-render-mode", "mono";
push (@$result, "--units-exponent", "0")
if (! &should_scale ($node, $service));
@@ -848,10 +851,10 @@ sub process_node {
elsif ($global_headers == 1)
{
push (@rrd, "COMMENT:" . (" " x $max_field_len));
- push (@rrd, "COMMENT: Cur:");
- push (@rrd, "COMMENT:Min:");
- push (@rrd, "COMMENT:Avg:");
- push (@rrd, "COMMENT:Max: \\j");
+ push (@rrd, "COMMENT: Cur\\:");
+ push (@rrd, "COMMENT:Min\\:");
+ push (@rrd, "COMMENT:Avg\\:");
+ push (@rrd, "COMMENT:Max\\: \\j");
$global_headers++;
}
@@ -924,13 +927,13 @@ sub process_node {
}
else
{
- push (@rrd, "COMMENT: Cur:") unless $global_headers;
+ push (@rrd, "COMMENT: Cur\\:") unless $global_headers;
push (@rrd, "GPRINT:c$rrdname:LAST:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, "yes")?"%s":"") . "");
- push (@rrd, "COMMENT: Min:") unless $global_headers;
+ push (@rrd, "COMMENT: Min\\:") unless $global_headers;
push (@rrd, "GPRINT:i$rrdname:MIN:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . "");
- push (@rrd, "COMMENT: Avg:") unless $global_headers;
+ push (@rrd, "COMMENT: Avg\\:") unless $global_headers;
push (@rrd, "GPRINT:g$rrdname:AVERAGE:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . "");
- push (@rrd, "COMMENT: Max:") unless $global_headers;
+ push (@rrd, "COMMENT: Max\\:") unless $global_headers;
push (@rrd, "GPRINT:a$rrdname:MAX:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . "\\j");
push (@{$total_pos{'min'}}, "i$rrdname");
push (@{$total_pos{'avg'}}, "g$rrdname");
@@ -991,13 +994,13 @@ sub process_node {
push (@rrd, "CDEF:dpostotal=ipostotal,UN,ipostotal,UNKN,IF");
push (@rrd, "LINE1:dpostotal#000000:" . $node->{client}->{$service}->{graph_total} . (" " x ($max_field_len - length ($node->{client}->{$service}->{graph_total}) + 1)));
- push (@rrd, "COMMENT: Cur:") unless $global_headers;
+ push (@rrd, "COMMENT: Cur\\:") unless $global_headers;
push (@rrd, "GPRINT:gpostotal:LAST:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . "");
- push (@rrd, "COMMENT: Min:") unless $global_headers;
+ push (@rrd, "COMMENT: Min\\:") unless $global_headers;
push (@rrd, "GPRINT:ipostotal:MIN:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . "");
- push (@rrd, "COMMENT: Avg:") unless $global_headers;
+ push (@rrd, "COMMENT: Avg\\:") unless $global_headers;
push (@rrd, "GPRINT:gpostotal:AVERAGE:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . "");
- push (@rrd, "COMMENT: Max:") unless $global_headers;
+ push (@rrd, "COMMENT: Max\\:") unless $global_headers;
push (@rrd, "GPRINT:apostotal:MAX:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . "\\j");
}
@@ -1010,7 +1013,10 @@ sub process_node {
push @complete, @{&get_header ($node, $config, $domain, $name, $service, $time)};
push @complete, @rrd;
- push (@complete, "COMMENT:Last update: " . localtime($lastupdate) . "\\r");
+ my($ts);
+ $ts = localtime($lastupdate);
+ $ts =~ s/:/\\:/g;
+ push (@complete, "COMMENT:Last update\\: " . $ts . "\\r");
if (time - 300 < $lastupdate)
{
@@ -1040,7 +1046,10 @@ sub process_node {
push @rrd_sum, "--end",(int($lastupdate/$resolutions{$time}))*$resolutions{$time};
}
push @rrd_sum, @rrd;
- push (@rrd_sum, "COMMENT:Last update: " . localtime($lastupdate) . "\\r");
+ my($ts2);
+ $ts2 = localtime($lastupdate);
+ $ts2 =~ s/:/\\:/g;
+ push (@rrd_sum, "COMMENT:Last update\\: " . $ts2 . "\\r");
my $labelled = 0;
my @defined = ();