pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/munin-server Import a package for the server ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/565437f4ae45
branches:  trunk
changeset: 514201:565437f4ae45
user:      he <he%pkgsrc.org@localhost>
date:      Thu Jun 08 19:16:24 2006 +0000

description:
Import a package for the server end of the Munin monitoring system.

This version has a patch so that it works properly with RRDtool of
version 1.2 or newer.

diffstat:

 sysutils/munin-server/DESCR            |   7 ++
 sysutils/munin-server/MESSAGE          |  10 +++
 sysutils/munin-server/Makefile         |  87 ++++++++++++++++++++++++++++++++
 sysutils/munin-server/PLIST            |  24 ++++++++
 sysutils/munin-server/distinfo         |   9 +++
 sysutils/munin-server/patches/patch-aa |  92 ++++++++++++++++++++++++++++++++++
 sysutils/munin-server/patches/patch-ab |  13 ++++
 sysutils/munin-server/patches/patch-ad |  38 ++++++++++++++
 sysutils/munin-server/patches/patch-ae |  89 ++++++++++++++++++++++++++++++++
 9 files changed, 369 insertions(+), 0 deletions(-)

diffs (truncated from 405 to 300 lines):

diff -r 77a1db3ddd09 -r 565437f4ae45 sysutils/munin-server/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/munin-server/DESCR       Thu Jun 08 19:16:24 2006 +0000
@@ -0,0 +1,7 @@
+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).
diff -r 77a1db3ddd09 -r 565437f4ae45 sysutils/munin-server/MESSAGE
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/munin-server/MESSAGE     Thu Jun 08 19:16:24 2006 +0000
@@ -0,0 +1,10 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1.1.1 2006/06/08 19:16:24 he 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.
+===========================================================================
diff -r 77a1db3ddd09 -r 565437f4ae45 sysutils/munin-server/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/munin-server/Makefile    Thu Jun 08 19:16:24 2006 +0000
@@ -0,0 +1,87 @@
+# $NetBSD: Makefile,v 1.1.1.1 2006/06/08 19:16:24 he Exp $
+#
+
+DISTNAME=      ${PKGNAME:S:-server-:_:}
+PKGNAME=       munin-server-1.3.1
+CATEGORIES=    sysutils
+MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=munin/}
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      http://munin.sourceforge.net/
+COMMENT=       System monitoring tool, server version
+
+DEPENDS+=      p5-Net-SSLeay>=0:../../security/p5-Net-SSLeay
+DEPENDS+=      rrdtool>=1.2:../../databases/rrdtool
+DEPENDS+=      munin-doc>=1.3.1:../../sysutils/munin-doc
+
+USE_TOOLS+=    gmake
+USE_PKGINSTALL=        YES
+
+PERL5_CONFIGURE=NO
+
+WRKSRC=                ${WRKDIR}/${DISTNAME:S:_:-:}
+
+MUNIN_GROUP?=  munin
+MUNIN_USER?=   munin
+
+PKG_GROUPS=    ${MUNIN_GROUP}
+PKG_USERS=     ${MUNIN_USER}:${MUNIN_GROUP}::Munin\\ user
+
+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
+
+INSTALL_TARGET=        install-main
+
+BUILD_TARGET=  build
+
+PERL5_SITELIB= ${PERL5_SUB_INSTALLVENDORLIB:Q}
+
+MAKE_ENV+=     PERL5_SITELIB=${PREFIX}/${PERL5_SITELIB}
+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:Q}
+
+EGDIR=         ${PREFIX}/share/examples/munin
+TMPL_EGDIR=    ${EGDIR}/templates
+INST_TMPL_DIR= ${PKG_SYSCONFDIR}/munin/templates
+
+CONF_FILES+=   ${EGDIR}/munin.conf ${PKG_SYSCONFDIR}/munin/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
+
+post-install:
+       ${INSTALL_DATA_DIR} ${EGDIR}
+       ${INSTALL_SCRIPT} ${WRKSRC}/build/server/munin.conf ${EGDIR}
+
+.include "../../mk/bsd.pkg.mk"
+.include "../../lang/perl5/module.mk"
diff -r 77a1db3ddd09 -r 565437f4ae45 sysutils/munin-server/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/munin-server/PLIST       Thu Jun 08 19:16:24 2006 +0000
@@ -0,0 +1,24 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2006/06/08 19:16:24 he 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
+@comment pkg-specific directories:
+@dirrm share/examples/munin/templates
+@comment shared with munin-node
+@unexec ${RMDIR} %D/lib/munin 2>/dev/null || ${TRUE}
diff -r 77a1db3ddd09 -r 565437f4ae45 sysutils/munin-server/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/munin-server/distinfo    Thu Jun 08 19:16:24 2006 +0000
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.1.1.1 2006/06/08 19:16:24 he Exp $
+
+SHA1 (munin_1.3.1.tar.gz) = f7783b645abbb25524c3f1b6e0fe27185f1de3db
+RMD160 (munin_1.3.1.tar.gz) = a6ea4e1839f4c787457e4051d55007b7bcebd1d4
+Size (munin_1.3.1.tar.gz) = 315743 bytes
+SHA1 (patch-aa) = 7582a840614389f5fb4bf672cd4ea1e4b6822dd5
+SHA1 (patch-ab) = bb0f63cdef893d8c224cdd03a4a4125d03f85f80
+SHA1 (patch-ad) = 1ecac375a3c340200e3aa7ecad96a1351ff1da79
+SHA1 (patch-ae) = ac8f4f5b7abf03c057ff293ab82c7176bc51a3f6
diff -r 77a1db3ddd09 -r 565437f4ae45 sysutils/munin-server/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/munin-server/patches/patch-aa    Thu Jun 08 19:16:24 2006 +0000
@@ -0,0 +1,92 @@
+$NetBSD: patch-aa,v 1.1.1.1 2006/06/08 19:16:24 he Exp $
+
+--- Makefile.config.orig       2005-01-10 11:38:22.000000000 +0100
++++ Makefile.config
+@@ -7,32 +7,39 @@
+ #
+ # the base of the Munin installation.
+ # 
+-PREFIX     = $(DESTDIR)/opt/munin
++ifdef $(PREFIX)
++UPREFIX=$(PREFIX)
++else
++UPREFIX=/usr/pkg
++endif
+ 
+ # 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    = ${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
diff -r 77a1db3ddd09 -r 565437f4ae45 sysutils/munin-server/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/munin-server/patches/patch-ab    Thu Jun 08 19:16:24 2006 +0000
@@ -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
diff -r 77a1db3ddd09 -r 565437f4ae45 sysutils/munin-server/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/munin-server/patches/patch-ad    Thu Jun 08 19:16:24 2006 +0000
@@ -0,0 +1,38 @@
+$NetBSD: patch-ad,v 1.1.1.1 2006/06/08 19:16:24 he Exp $
+
+--- Makefile.orig      2004-12-22 22:33:47.000000000 +0100
++++ Makefile
+@@ -17,6 +17,7 @@ install: install-main install-node insta
+ install-main: build
+       $(CHECKUSER)
+       mkdir -p $(CONFDIR)/templates
++      mkdir -p $(EGDIR)/templates
+       mkdir -p $(LIBDIR)
+       mkdir -p $(BINDIR)
+       mkdir -p $(PERLLIB)
+@@ -29,13 +30,11 @@ install-main: build
+       $(CHOWN) $(USER) $(LOGDIR) $(STATEDIR) $(RUNDIR) $(HTMLDIR) $(DBDIR)
+ 
+       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/
+-
+-      test -f "$(CONFDIR)/munin.conf"  || $(INSTALL) -m 0644 build/server/munin.conf $(CONFDIR)/
++      $(INSTALL) -m 0644 server/logo.png $(EGDIR)/templates/
++      $(INSTALL) -m 0644 server/style.css $(EGDIR)/templates/



Home | Main Index | Thread Index | Old Index