aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sysutils/munin-main/Makefile42
-rw-r--r--sysutils/munin-main/distinfo4
-rw-r--r--sysutils/munin-main/files/patch-Makefile.config29
-rw-r--r--sysutils/munin-main/files/patch-munin-limits.in35
-rw-r--r--sysutils/munin-main/files/pkg-message.in (renamed from sysutils/munin-main/files/pkg-message)0
-rw-r--r--sysutils/munin-main/pkg-deinstall30
-rw-r--r--sysutils/munin-main/pkg-install51
-rw-r--r--sysutils/munin-main/pkg-plist33
-rw-r--r--sysutils/munin-master/Makefile42
-rw-r--r--sysutils/munin-master/distinfo4
-rw-r--r--sysutils/munin-master/files/patch-Makefile.config29
-rw-r--r--sysutils/munin-master/files/patch-munin-limits.in35
-rw-r--r--sysutils/munin-master/files/pkg-message.in (renamed from sysutils/munin-master/files/pkg-message)0
-rw-r--r--sysutils/munin-master/pkg-deinstall30
-rw-r--r--sysutils/munin-master/pkg-install51
-rw-r--r--sysutils/munin-master/pkg-plist33
16 files changed, 294 insertions, 154 deletions
diff --git a/sysutils/munin-main/Makefile b/sysutils/munin-main/Makefile
index 8cb6cc8873f2..1381b05fb39d 100644
--- a/sysutils/munin-main/Makefile
+++ b/sysutils/munin-main/Makefile
@@ -6,19 +6,20 @@
#
PORTNAME= munin
-PORTVERSION= 1.0.4
+PORTVERSION= 1.2.0
CATEGORIES= sysutils perl5
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= munin
PKGNAMESUFFIX= -main
-DISTNAME= ${PORTNAME}_${PORTVERSION:S/.p/pre/}
+DISTNAME= ${PORTNAME}_${PORTVERSION:S/.r/rc/}
MAINTAINER= lupe@lupe-christoph.de
COMMENT= Collector part of Munin
RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/RRDs.pm:${PORTSDIR}/net/rrdtool \
${SITE_PERL}/Net/Domain.pm:${PORTSDIR}/net/p5-Net \
- ${SITE_PERL}/HTML/Template.pm:${PORTSDIR}/www/p5-HTML-Template
+ ${SITE_PERL}/HTML/Template.pm:${PORTSDIR}/www/p5-HTML-Template \
+ ${SITE_PERL}/Date/Manip.pm:${PORTSDIR}/devel/p5-Date-Manip
BUILD_DEPENDS= ${RUN_DEPENDS}
.include <bsd.port.pre.mk>
@@ -26,37 +27,36 @@ BUILD_DEPENDS= ${RUN_DEPENDS}
.if ${PERL_LEVEL} <= 500800
RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Storable.pm:${PORTSDIR}/devel/p5-Storable \
${SITE_PERL}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 \
- ${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes
+ ${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes \
+ ${SITE_PERL}/Text/Balanced.pm:${PORTSDIR}/textproc/p5-Text-Balanced
.endif
USE_GMAKE= yes
PATCH_STRIP= -p1
-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:S/.p/pre/}
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:S/.r/rc/}
PKGMESSAGE= ${WRKDIR}/pkg-message
-ALL_TARGET= DATADIR=${DATADIR} build build-man
-INSTALL_TARGET= DATADIR=${DATADIR} install-main
+ALL_TARGET= DATADIR=${DATADIR} PERL=${PERL} build build-man
+INSTALL_TARGET= DATADIR=${DATADIR} PERL=${PERL} install-main
MAN5= munin.conf.5
-MAN8= munin-cron.8 munin-graph.8 munin-html.8 munin-nagios.8 munin-update.8
+MAN8= munin-cron.8 munin-graph.8 munin-html.8 munin-limits.8 munin-update.8
+
+SUB_FILES=pkg-message
pre-install:
- @${SED} 's@%%PREFIX%%@${PREFIX}@g' ${FILESDIR}/pkg-message > ${PKGMESSAGE}
@PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} PRE-INSTALL
post-install:
- @if [ ! -f ${PREFIX}/www/data/munin/style.css ]; then \
- ${INSTALL_DATA} ${PREFIX}/etc/munin/templates/style.css ${PREFIX}/www/data/munin/style.css; \
- fi
- @if [ ! -f ${PREFIX}/www/data/munin/logo.png ]; then \
- ${INSTALL_DATA} ${PREFIX}/etc/munin/templates/logo.png ${PREFIX}/www/data/munin/logo.png; \
- fi
- @${INSTALL_MAN} -C ${WRKSRC}/build/doc/munin.conf.5 ${PREFIX}/man/man5
- @${INSTALL_MAN} -C ${WRKSRC}/build/doc/munin-cron.8 ${PREFIX}/man/man8
- @${INSTALL_MAN} -C ${WRKSRC}/build/doc/munin-graph.8 ${PREFIX}/man/man8
- @${INSTALL_MAN} -C ${WRKSRC}/build/doc/munin-html.8 ${PREFIX}/man/man8
- @${INSTALL_MAN} -C ${WRKSRC}/build/doc/munin-nagios.8 ${PREFIX}/man/man8
- @${INSTALL_MAN} -C ${WRKSRC}/build/doc/munin-update.8 ${PREFIX}/man/man8
+ @${INSTALL_DATA} ${WRKSRC}/build/server/munin.conf ${PREFIX}/etc/munin/munin.conf.sample
+ @for man in ${MAN5}; do \
+ ${INSTALL_MAN} -C ${WRKSRC}/build/doc/$$man ${PREFIX}/man/man5; \
+ done
+ @for man in ${MAN8}; do \
+ ${INSTALL_MAN} -C ${WRKSRC}/build/doc/$$man ${PREFIX}/man/man8; \
+ done
@DATADIR=${DATADIR} PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} POST-INSTALL
+ @${CHOWN} munin /var/log/munin-main
+ @${CHGRP} munin /var/run/munin /var/log/munin-main ${PREFIX}/www/data/munin ${PREFIX}/var/munin
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
diff --git a/sysutils/munin-main/distinfo b/sysutils/munin-main/distinfo
index 1db411157e37..e486eb6b0c23 100644
--- a/sysutils/munin-main/distinfo
+++ b/sysutils/munin-main/distinfo
@@ -1,2 +1,2 @@
-MD5 (munin_1.0.4.tar.gz) = 00721181e1ff81be85ad89307457d998
-SIZE (munin_1.0.4.tar.gz) = 214902
+MD5 (munin_1.2.0.tar.gz) = bbab7bf91ac837e4c72889aaef7cf2e8
+SIZE (munin_1.2.0.tar.gz) = 318364
diff --git a/sysutils/munin-main/files/patch-Makefile.config b/sysutils/munin-main/files/patch-Makefile.config
index 7e1b893d6f0f..52f43ea968a4 100644
--- a/sysutils/munin-main/files/patch-Makefile.config
+++ b/sysutils/munin-main/files/patch-Makefile.config
@@ -1,6 +1,6 @@
---- munin-1.0.0pre3.orig/Makefile.config Sun Feb 1 22:05:52 2004
-+++ munin-1.0.0pre3/Makefile.config Sat Feb 7 12:48:23 2004
-@@ -7,42 +7,46 @@
+--- munin-1.2.0rc2.orig/Makefile.config Mon Jan 10 11:38:32 2005
++++ munin-1.2.0rc2/Makefile.config Thu Feb 3 11:11:46 2005
+@@ -7,52 +7,56 @@
#
# the base of the Munin installation.
#
@@ -33,11 +33,13 @@
# Where to put internal binaries and plugin repository
-LIBDIR = $(PREFIX)/lib
-+LIBDIR = ${DATADIR}
++LIBDIR = $(DATADIR)
# Server only - Output directory
-HTMLDIR = $(PREFIX)/var/www
+-CGIDIR = $(HTMLDIR)/cgi
+HTMLDIR = $(PREFIX)/www/data/munin
++CGIDIR = $(PREFIX)/www/cgi-bin
# Client only - Where to put RRD files and other intenal data
-DBDIR = $(DESTDIR)/var/opt/munin
@@ -49,7 +51,7 @@
# Where Munin should place its logs.
-LOGDIR = $(DESTDIR)/var/log/munin
-+LOGDIR = /var/log
++LOGDIR = /var/log/munin-main
# Location of PID files and other statefiles. On the server, must be
# writable by the user "munin".
@@ -57,9 +59,20 @@
+STATEDIR = /var/run/munin
# The perl interpreter to use
- PERL = $(shell which perl)
-@@ -65,9 +69,8 @@
- GROUP = munin
+-PERL = $(shell which perl)
++# Passed in from FreeBSD port Makefile.
+
+ # 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 = $(shell $(PERL) -V:sitelib | cut -d= -f2 | sed "s/[\';]//g")
+
+ # Client only - Install plugins for this architecture
+ OSTYPE = $(shell uname | tr '[A-Z]' '[a-z]')
+@@ -72,9 +76,8 @@
+ 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)
diff --git a/sysutils/munin-main/files/patch-munin-limits.in b/sysutils/munin-main/files/patch-munin-limits.in
new file mode 100644
index 000000000000..7fc5202675d3
--- /dev/null
+++ b/sysutils/munin-main/files/patch-munin-limits.in
@@ -0,0 +1,35 @@
+--- munin-1.2.0.orig/server/munin-limits.in Wed Feb 16 21:03:31 2005
++++ munin-1.2.0/server/munin-limits.in Wed Feb 23 09:06:26 2005
+@@ -18,6 +18,12 @@
+ #
+ #
+ # $Log: munin-limits.in,v $
++# Revision 1.24.2.4 2005/02/19 16:06:14 ilmari
++# Place the munin-limits lock file in rundir, not dbdir.
++#
++# Revision 1.24.2.3 2005/02/19 16:04:03 ilmari
++# Fix the file vs. pipe check in munin-limits
++#
+ # Revision 1.24.2.2 2005/02/16 20:03:31 jimmyo
+ # yet another rewrite of munin-limits open call (SF#1115434).
+ #
+@@ -179,8 +185,8 @@
+ my $modified=0;
+
+ logger("Starting munin-limits, checking lock");
+-munin_runlock("$config->{dbdir}/munin-limits.lock");
+-logger("Created lock: $config->{dbdir}/munin-limits.lock");
++munin_runlock("$config->{rundir}/munin-limits.lock");
++logger("Created lock: $config->{rundir}/munin-limits.lock");
+
+ if (!defined $config->{'contact'}->{'nagios'}->{'command'} and
+ defined $config->{'nsca'})
+@@ -458,7 +464,7 @@
+ unshift (@cmd, "|-");
+ }
+ logger ("Debug: opening for writing: \"" . join('" "',@cmd) . "\".") if $DEBUG;
+- if ($cmd[0] == ">")
++ if ($cmd[0] eq ">")
+ {
+ if (! open ($pipe, join (' ', @cmd)))
+ {
diff --git a/sysutils/munin-main/files/pkg-message b/sysutils/munin-main/files/pkg-message.in
index 2d56e5464b2f..2d56e5464b2f 100644
--- a/sysutils/munin-main/files/pkg-message
+++ b/sysutils/munin-main/files/pkg-message.in
diff --git a/sysutils/munin-main/pkg-deinstall b/sysutils/munin-main/pkg-deinstall
index 261b7b15a8b3..200d96a2a617 100644
--- a/sysutils/munin-main/pkg-deinstall
+++ b/sysutils/munin-main/pkg-deinstall
@@ -1,7 +1,4 @@
#! /bin/sh
-#
-# $Log$
-#
ask() {
local question default answer
@@ -80,15 +77,38 @@ delete_crontab_entries() {
echo "These are the remaining lines:"
crontab -u munin -l
else
- crontab -u munin -r
+ echo y | crontab -u munin -r
echo "crontab for user munin removed"
fi
rm $TMPFILE
}
+delnewsyslog() {
+ tmp="/etc/#munin-node$$"
+ sed -e '/^\/var\/log\/munin-main\/\*\.log[ ]/d' /etc/newsyslog.conf >${tmp}
+ cat ${tmp} > /etc/newsyslog.conf
+ rm ${tmp}
+}
+
+newsyslog() {
+ ENTRY=`fgrep '/var/log/munin-main/*' /etc/newsyslog.conf`
+ DEFAULT='/var/log/munin-main/*.log munin:munin 644 7 * @T00 GNWZ'
+ if [ -z "$ENTRY" ]; then
+ exit 0
+ elif [ "$ENTRY" = "$DEFAULT" ]; then
+ delnewsyslog
+ elif yesno "You have changed the default munin-main entry in \"/etc/newsyslog.conf\".
+Do you want me to delete it?" y; then
+ delnewsyslog
+ echo "Done."
+ fi
+}
+
+
case $2 in
DEINSTALL)
- delete_crontab_entries '#BEGIN_MUNIN' '#END_MUNIN'
+ delete_crontab_entries '#BEGIN_MUNIN_MAIN' '#END_MUNIN_MAIN'
+ newsyslog
;;
POST-DEINSTALL)
delete_account munin munin
diff --git a/sysutils/munin-main/pkg-install b/sysutils/munin-main/pkg-install
index 151594997c34..1208f695a04e 100644
--- a/sysutils/munin-main/pkg-install
+++ b/sysutils/munin-main/pkg-install
@@ -1,7 +1,4 @@
#! /bin/sh
-#
-# $Log$
-#
ask() {
local question default answer
@@ -71,24 +68,15 @@ make_account() {
fi
}
-make_directories() {
- for dir in ${PKG_PREFIX}/www/data/munin \
- ${PKG_PREFIX}/var/munin \
- /var/run/munin; do
- mkdir -p $dir
- chown munin $dir
- done
-}
-
create_crontab_entries() {
local b e
b=$1
e=$2
- if [ crontab -u munin -l > /dev/null 2>&1 ]; then
+ if crontab -u munin -l > /dev/null 2>&1; then
TMPFILE=`mktemp -t munin` || exit 1
- sed -n -e "/^$b\$/,/^$e\$/p" > $TMPFILE
- crontab -u munin -l | sed -e '/^#BEGIN_MUNIN$/,/^#END_MUNIN$/d' | \
+ cat > $TMPFILE
+ crontab -u munin -l | sed -e "/^$b$/,/^$e$/d" | \
cat - $TMPFILE | crontab -u munin -
rm $TMPFILE
else
@@ -96,33 +84,34 @@ create_crontab_entries() {
fi
}
+mklogdir() {
+}
+
+newsyslog() {
+ if fgrep -q '/var/log/munin-main/*' /etc/newsyslog.conf; then
+ :
+ else
+ cat >> /etc/newsyslog.conf <<EOT
+/var/log/munin-main/*.log munin:munin 644 7 * @T00 GNWZ
+EOT
+ fi
+}
+
########################################################################
case $2 in
PRE-INSTALL)
- # Munin had a logo.gif up to 1.0.0pre3.
- # Remove it, it's been replaced by logo.png
- rm -f ${PKG_PREFIX}/www/data/munin/logo.gif
- # The old stylesheet must go, too.
- rm -f ${PKG_PREFIX}/www/data/munin/style.css
- # Both new files will be put in place by munin-html
-
make_account munin munin "Munin owner"
- make_directories
;;
POST-INSTALL)
- create_crontab_entries '#BEGIN_MUNIN' '#END_MUNIN' <<EOT
-#
-# cron-jobs for munin
-#
-
-#BEGIN_MUNIN
+ newsyslog
+ create_crontab_entries '#BEGIN_MUNIN_MAIN' '#END_MUNIN_MAIN' <<EOT
+#BEGIN_MUNIN_MAIN
MAILTO=root
*/5 * * * * ${PKG_PREFIX}/bin/munin-cron
-10 10 * * * ${DATADIR:=${PKG_PREFIX}/share/munin}/munin-nagios --removeok
-#END_MUNIN
+#END_MUNIN_MAIN
EOT
;;
esac
diff --git a/sysutils/munin-main/pkg-plist b/sysutils/munin-main/pkg-plist
index e2242997fa46..243f13168ab5 100644
--- a/sysutils/munin-main/pkg-plist
+++ b/sysutils/munin-main/pkg-plist
@@ -1,35 +1,48 @@
+@exec mkdir -p /var/run/munin && chown munin:munin /var/run/munin
+@exec mkdir -p /var/log/munin-main && chown munin:munin /var/log/munin-main
+@exec mkdir -p %D/www/data/munin && chown munin:munin %D/www/data/munin
+@exec mkdir -p %D/var/munin && chown munin:munin %D/var/munin
bin/munin-cron
-@unexec if cmp -s %D/etc/munin/templates/style.css %D/www/data-dist/munin/style.css; then rm -f %D/www/data-dist/munin/style.css; fi
-@unexec if cmp -s %D/etc/munin/templates/logo.png %D/www/data-dist/munin/logo.png; then rm -f %D/www/data-dist/munin/logo.png; fi
-etc/munin/munin.conf
+@unexec if cmp -s %D/etc/munin/munin.conf.sample %D/etc/munin/munin.conf; then rm -f %D/etc/munin/munin.conf; fi
+etc/munin/munin.conf.sample
+etc/munin/templates/definitions.html
+@unexec if cmp -s %D/etc/munin/templates/logo.png %D/www/data/munin/logo.png; then rm -f %D/www/data/munin/logo.png; fi
etc/munin/templates/logo.png
+etc/munin/templates/munin-comparison-day.tmpl
+etc/munin/templates/munin-comparison-month.tmpl
+etc/munin/templates/munin-comparison-week.tmpl
+etc/munin/templates/munin-comparison-year.tmpl
etc/munin/templates/munin-domainview.tmpl
etc/munin/templates/munin-nodeview.tmpl
etc/munin/templates/munin-overview.tmpl
etc/munin/templates/munin-serviceview.tmpl
+@unexec if cmp -s %D/etc/munin/templates/style.css %D/www/data/munin/style.css; then rm -f %D/www/data/munin/style.css; fi
etc/munin/templates/style.css
%%SITE_PERL%%/Munin.pm
share/munin/munin-graph
share/munin/munin-html
-share/munin/munin-nagios
+share/munin/munin-limits
share/munin/munin-update
+www/cgi-bin/munin-cgi-graph
+@unexec rm -f /var/run/munin/munin-*.lock
+@unexec rmdir /var/run/munin 2>/dev/null || true
+@unexec rmdir /var/log/munin-main 2>/dev/null || true
@unexec rmdir %D/www/data/munin 2>/dev/null || true
@unexec rmdir %D/www/data 2>/dev/null || true
+@unexec rmdir %D/www/cgi-bin 2>/dev/null || true
@unexec rmdir %D/var/munin 2>/dev/null || true
-@unexec rmdir %D/var 2>/dev/null || true
@unexec rmdir %D/share/munin 2>/dev/null || true
-@dirrm etc/munin/templates
+@unexec rmdir %D/etc/munin/templates 2>/dev/null || true
@unexec rmdir %D/etc/munin 2>/dev/null || true
@unexec echo
@unexec echo '********************************************************************'
@unexec echo "If you want to *completely* remove munin-main, you have to"
@unexec echo
-@unexec echo " rm -rf %D/var/munin/datafile %D/www/data/munin \\"
-@unexec echo " "`ls -d /usr/local/var/munin/* | grep -v plugin-state`" \\"
+@unexec if [ -d %D/www/data/munin ]; then echo " rm -rf %D/www/data/munin \\"; fi
+@unexec if [ -d %D/var/munin ]; then ls -d %D/var/munin/* | grep -v plugin-state | fmt -40 | sed -e 's/^/ /' -e 's/$/ \\/'; fi
@unexec if [ -f %D/etc/munin/munin.conf ]; then echo " %D/etc/munin/munin.conf \\"; fi
@unexec if [ -d %D/etc/munin/templates ]; then echo " %D/etc/munin/templates \\"; fi
-@unexec echo " %D/etc/munin/munin-node.conf %D/etc/munin/plugins \\"
-@unexec echo " /var/log/munin"
+@unexec echo " /var/log/munin-main"
@unexec echo
@unexec echo "If you have already deinstalled munin-node, you can also"
@unexec echo
diff --git a/sysutils/munin-master/Makefile b/sysutils/munin-master/Makefile
index 8cb6cc8873f2..1381b05fb39d 100644
--- a/sysutils/munin-master/Makefile
+++ b/sysutils/munin-master/Makefile
@@ -6,19 +6,20 @@
#
PORTNAME= munin
-PORTVERSION= 1.0.4
+PORTVERSION= 1.2.0
CATEGORIES= sysutils perl5
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= munin
PKGNAMESUFFIX= -main
-DISTNAME= ${PORTNAME}_${PORTVERSION:S/.p/pre/}
+DISTNAME= ${PORTNAME}_${PORTVERSION:S/.r/rc/}
MAINTAINER= lupe@lupe-christoph.de
COMMENT= Collector part of Munin
RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/RRDs.pm:${PORTSDIR}/net/rrdtool \
${SITE_PERL}/Net/Domain.pm:${PORTSDIR}/net/p5-Net \
- ${SITE_PERL}/HTML/Template.pm:${PORTSDIR}/www/p5-HTML-Template
+ ${SITE_PERL}/HTML/Template.pm:${PORTSDIR}/www/p5-HTML-Template \
+ ${SITE_PERL}/Date/Manip.pm:${PORTSDIR}/devel/p5-Date-Manip
BUILD_DEPENDS= ${RUN_DEPENDS}
.include <bsd.port.pre.mk>
@@ -26,37 +27,36 @@ BUILD_DEPENDS= ${RUN_DEPENDS}
.if ${PERL_LEVEL} <= 500800
RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Storable.pm:${PORTSDIR}/devel/p5-Storable \
${SITE_PERL}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 \
- ${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes
+ ${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes \
+ ${SITE_PERL}/Text/Balanced.pm:${PORTSDIR}/textproc/p5-Text-Balanced
.endif
USE_GMAKE= yes
PATCH_STRIP= -p1
-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:S/.p/pre/}
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:S/.r/rc/}
PKGMESSAGE= ${WRKDIR}/pkg-message
-ALL_TARGET= DATADIR=${DATADIR} build build-man
-INSTALL_TARGET= DATADIR=${DATADIR} install-main
+ALL_TARGET= DATADIR=${DATADIR} PERL=${PERL} build build-man
+INSTALL_TARGET= DATADIR=${DATADIR} PERL=${PERL} install-main
MAN5= munin.conf.5
-MAN8= munin-cron.8 munin-graph.8 munin-html.8 munin-nagios.8 munin-update.8
+MAN8= munin-cron.8 munin-graph.8 munin-html.8 munin-limits.8 munin-update.8
+
+SUB_FILES=pkg-message
pre-install:
- @${SED} 's@%%PREFIX%%@${PREFIX}@g' ${FILESDIR}/pkg-message > ${PKGMESSAGE}
@PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} PRE-INSTALL
post-install:
- @if [ ! -f ${PREFIX}/www/data/munin/style.css ]; then \
- ${INSTALL_DATA} ${PREFIX}/etc/munin/templates/style.css ${PREFIX}/www/data/munin/style.css; \
- fi
- @if [ ! -f ${PREFIX}/www/data/munin/logo.png ]; then \
- ${INSTALL_DATA} ${PREFIX}/etc/munin/templates/logo.png ${PREFIX}/www/data/munin/logo.png; \
- fi
- @${INSTALL_MAN} -C ${WRKSRC}/build/doc/munin.conf.5 ${PREFIX}/man/man5
- @${INSTALL_MAN} -C ${WRKSRC}/build/doc/munin-cron.8 ${PREFIX}/man/man8
- @${INSTALL_MAN} -C ${WRKSRC}/build/doc/munin-graph.8 ${PREFIX}/man/man8
- @${INSTALL_MAN} -C ${WRKSRC}/build/doc/munin-html.8 ${PREFIX}/man/man8
- @${INSTALL_MAN} -C ${WRKSRC}/build/doc/munin-nagios.8 ${PREFIX}/man/man8
- @${INSTALL_MAN} -C ${WRKSRC}/build/doc/munin-update.8 ${PREFIX}/man/man8
+ @${INSTALL_DATA} ${WRKSRC}/build/server/munin.conf ${PREFIX}/etc/munin/munin.conf.sample
+ @for man in ${MAN5}; do \
+ ${INSTALL_MAN} -C ${WRKSRC}/build/doc/$$man ${PREFIX}/man/man5; \
+ done
+ @for man in ${MAN8}; do \
+ ${INSTALL_MAN} -C ${WRKSRC}/build/doc/$$man ${PREFIX}/man/man8; \
+ done
@DATADIR=${DATADIR} PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} POST-INSTALL
+ @${CHOWN} munin /var/log/munin-main
+ @${CHGRP} munin /var/run/munin /var/log/munin-main ${PREFIX}/www/data/munin ${PREFIX}/var/munin
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
diff --git a/sysutils/munin-master/distinfo b/sysutils/munin-master/distinfo
index 1db411157e37..e486eb6b0c23 100644
--- a/sysutils/munin-master/distinfo
+++ b/sysutils/munin-master/distinfo
@@ -1,2 +1,2 @@
-MD5 (munin_1.0.4.tar.gz) = 00721181e1ff81be85ad89307457d998
-SIZE (munin_1.0.4.tar.gz) = 214902
+MD5 (munin_1.2.0.tar.gz) = bbab7bf91ac837e4c72889aaef7cf2e8
+SIZE (munin_1.2.0.tar.gz) = 318364
diff --git a/sysutils/munin-master/files/patch-Makefile.config b/sysutils/munin-master/files/patch-Makefile.config
index 7e1b893d6f0f..52f43ea968a4 100644
--- a/sysutils/munin-master/files/patch-Makefile.config
+++ b/sysutils/munin-master/files/patch-Makefile.config
@@ -1,6 +1,6 @@
---- munin-1.0.0pre3.orig/Makefile.config Sun Feb 1 22:05:52 2004
-+++ munin-1.0.0pre3/Makefile.config Sat Feb 7 12:48:23 2004
-@@ -7,42 +7,46 @@
+--- munin-1.2.0rc2.orig/Makefile.config Mon Jan 10 11:38:32 2005
++++ munin-1.2.0rc2/Makefile.config Thu Feb 3 11:11:46 2005
+@@ -7,52 +7,56 @@
#
# the base of the Munin installation.
#
@@ -33,11 +33,13 @@
# Where to put internal binaries and plugin repository
-LIBDIR = $(PREFIX)/lib
-+LIBDIR = ${DATADIR}
++LIBDIR = $(DATADIR)
# Server only - Output directory
-HTMLDIR = $(PREFIX)/var/www
+-CGIDIR = $(HTMLDIR)/cgi
+HTMLDIR = $(PREFIX)/www/data/munin
++CGIDIR = $(PREFIX)/www/cgi-bin
# Client only - Where to put RRD files and other intenal data
-DBDIR = $(DESTDIR)/var/opt/munin
@@ -49,7 +51,7 @@
# Where Munin should place its logs.
-LOGDIR = $(DESTDIR)/var/log/munin
-+LOGDIR = /var/log
++LOGDIR = /var/log/munin-main
# Location of PID files and other statefiles. On the server, must be
# writable by the user "munin".
@@ -57,9 +59,20 @@
+STATEDIR = /var/run/munin
# The perl interpreter to use
- PERL = $(shell which perl)
-@@ -65,9 +69,8 @@
- GROUP = munin
+-PERL = $(shell which perl)
++# Passed in from FreeBSD port Makefile.
+
+ # 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 = $(shell $(PERL) -V:sitelib | cut -d= -f2 | sed "s/[\';]//g")
+
+ # Client only - Install plugins for this architecture
+ OSTYPE = $(shell uname | tr '[A-Z]' '[a-z]')
+@@ -72,9 +76,8 @@
+ 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)
diff --git a/sysutils/munin-master/files/patch-munin-limits.in b/sysutils/munin-master/files/patch-munin-limits.in
new file mode 100644
index 000000000000..7fc5202675d3
--- /dev/null
+++ b/sysutils/munin-master/files/patch-munin-limits.in
@@ -0,0 +1,35 @@
+--- munin-1.2.0.orig/server/munin-limits.in Wed Feb 16 21:03:31 2005
++++ munin-1.2.0/server/munin-limits.in Wed Feb 23 09:06:26 2005
+@@ -18,6 +18,12 @@
+ #
+ #
+ # $Log: munin-limits.in,v $
++# Revision 1.24.2.4 2005/02/19 16:06:14 ilmari
++# Place the munin-limits lock file in rundir, not dbdir.
++#
++# Revision 1.24.2.3 2005/02/19 16:04:03 ilmari
++# Fix the file vs. pipe check in munin-limits
++#
+ # Revision 1.24.2.2 2005/02/16 20:03:31 jimmyo
+ # yet another rewrite of munin-limits open call (SF#1115434).
+ #
+@@ -179,8 +185,8 @@
+ my $modified=0;
+
+ logger("Starting munin-limits, checking lock");
+-munin_runlock("$config->{dbdir}/munin-limits.lock");
+-logger("Created lock: $config->{dbdir}/munin-limits.lock");
++munin_runlock("$config->{rundir}/munin-limits.lock");
++logger("Created lock: $config->{rundir}/munin-limits.lock");
+
+ if (!defined $config->{'contact'}->{'nagios'}->{'command'} and
+ defined $config->{'nsca'})
+@@ -458,7 +464,7 @@
+ unshift (@cmd, "|-");
+ }
+ logger ("Debug: opening for writing: \"" . join('" "',@cmd) . "\".") if $DEBUG;
+- if ($cmd[0] == ">")
++ if ($cmd[0] eq ">")
+ {
+ if (! open ($pipe, join (' ', @cmd)))
+ {
diff --git a/sysutils/munin-master/files/pkg-message b/sysutils/munin-master/files/pkg-message.in
index 2d56e5464b2f..2d56e5464b2f 100644
--- a/sysutils/munin-master/files/pkg-message
+++ b/sysutils/munin-master/files/pkg-message.in
diff --git a/sysutils/munin-master/pkg-deinstall b/sysutils/munin-master/pkg-deinstall
index 261b7b15a8b3..200d96a2a617 100644
--- a/sysutils/munin-master/pkg-deinstall
+++ b/sysutils/munin-master/pkg-deinstall
@@ -1,7 +1,4 @@
#! /bin/sh
-#
-# $Log$
-#
ask() {
local question default answer
@@ -80,15 +77,38 @@ delete_crontab_entries() {
echo "These are the remaining lines:"
crontab -u munin -l
else
- crontab -u munin -r
+ echo y | crontab -u munin -r
echo "crontab for user munin removed"
fi
rm $TMPFILE
}
+delnewsyslog() {
+ tmp="/etc/#munin-node$$"
+ sed -e '/^\/var\/log\/munin-main\/\*\.log[ ]/d' /etc/newsyslog.conf >${tmp}
+ cat ${tmp} > /etc/newsyslog.conf
+ rm ${tmp}
+}
+
+newsyslog() {
+ ENTRY=`fgrep '/var/log/munin-main/*' /etc/newsyslog.conf`
+ DEFAULT='/var/log/munin-main/*.log munin:munin 644 7 * @T00 GNWZ'
+ if [ -z "$ENTRY" ]; then
+ exit 0
+ elif [ "$ENTRY" = "$DEFAULT" ]; then
+ delnewsyslog
+ elif yesno "You have changed the default munin-main entry in \"/etc/newsyslog.conf\".
+Do you want me to delete it?" y; then
+ delnewsyslog
+ echo "Done."
+ fi
+}
+
+
case $2 in
DEINSTALL)
- delete_crontab_entries '#BEGIN_MUNIN' '#END_MUNIN'
+ delete_crontab_entries '#BEGIN_MUNIN_MAIN' '#END_MUNIN_MAIN'
+ newsyslog
;;
POST-DEINSTALL)
delete_account munin munin
diff --git a/sysutils/munin-master/pkg-install b/sysutils/munin-master/pkg-install
index 151594997c34..1208f695a04e 100644
--- a/sysutils/munin-master/pkg-install
+++ b/sysutils/munin-master/pkg-install
@@ -1,7 +1,4 @@
#! /bin/sh
-#
-# $Log$
-#
ask() {
local question default answer
@@ -71,24 +68,15 @@ make_account() {
fi
}
-make_directories() {
- for dir in ${PKG_PREFIX}/www/data/munin \
- ${PKG_PREFIX}/var/munin \
- /var/run/munin; do
- mkdir -p $dir
- chown munin $dir
- done
-}
-
create_crontab_entries() {
local b e
b=$1
e=$2
- if [ crontab -u munin -l > /dev/null 2>&1 ]; then
+ if crontab -u munin -l > /dev/null 2>&1; then
TMPFILE=`mktemp -t munin` || exit 1
- sed -n -e "/^$b\$/,/^$e\$/p" > $TMPFILE
- crontab -u munin -l | sed -e '/^#BEGIN_MUNIN$/,/^#END_MUNIN$/d' | \
+ cat > $TMPFILE
+ crontab -u munin -l | sed -e "/^$b$/,/^$e$/d" | \
cat - $TMPFILE | crontab -u munin -
rm $TMPFILE
else
@@ -96,33 +84,34 @@ create_crontab_entries() {
fi
}
+mklogdir() {
+}
+
+newsyslog() {
+ if fgrep -q '/var/log/munin-main/*' /etc/newsyslog.conf; then
+ :
+ else
+ cat >> /etc/newsyslog.conf <<EOT
+/var/log/munin-main/*.log munin:munin 644 7 * @T00 GNWZ
+EOT
+ fi
+}
+
########################################################################
case $2 in
PRE-INSTALL)
- # Munin had a logo.gif up to 1.0.0pre3.
- # Remove it, it's been replaced by logo.png
- rm -f ${PKG_PREFIX}/www/data/munin/logo.gif
- # The old stylesheet must go, too.
- rm -f ${PKG_PREFIX}/www/data/munin/style.css
- # Both new files will be put in place by munin-html
-
make_account munin munin "Munin owner"
- make_directories
;;
POST-INSTALL)
- create_crontab_entries '#BEGIN_MUNIN' '#END_MUNIN' <<EOT
-#
-# cron-jobs for munin
-#
-
-#BEGIN_MUNIN
+ newsyslog
+ create_crontab_entries '#BEGIN_MUNIN_MAIN' '#END_MUNIN_MAIN' <<EOT
+#BEGIN_MUNIN_MAIN
MAILTO=root
*/5 * * * * ${PKG_PREFIX}/bin/munin-cron
-10 10 * * * ${DATADIR:=${PKG_PREFIX}/share/munin}/munin-nagios --removeok
-#END_MUNIN
+#END_MUNIN_MAIN
EOT
;;
esac
diff --git a/sysutils/munin-master/pkg-plist b/sysutils/munin-master/pkg-plist
index e2242997fa46..243f13168ab5 100644
--- a/sysutils/munin-master/pkg-plist
+++ b/sysutils/munin-master/pkg-plist
@@ -1,35 +1,48 @@
+@exec mkdir -p /var/run/munin && chown munin:munin /var/run/munin
+@exec mkdir -p /var/log/munin-main && chown munin:munin /var/log/munin-main
+@exec mkdir -p %D/www/data/munin && chown munin:munin %D/www/data/munin
+@exec mkdir -p %D/var/munin && chown munin:munin %D/var/munin
bin/munin-cron
-@unexec if cmp -s %D/etc/munin/templates/style.css %D/www/data-dist/munin/style.css; then rm -f %D/www/data-dist/munin/style.css; fi
-@unexec if cmp -s %D/etc/munin/templates/logo.png %D/www/data-dist/munin/logo.png; then rm -f %D/www/data-dist/munin/logo.png; fi
-etc/munin/munin.conf
+@unexec if cmp -s %D/etc/munin/munin.conf.sample %D/etc/munin/munin.conf; then rm -f %D/etc/munin/munin.conf; fi
+etc/munin/munin.conf.sample
+etc/munin/templates/definitions.html
+@unexec if cmp -s %D/etc/munin/templates/logo.png %D/www/data/munin/logo.png; then rm -f %D/www/data/munin/logo.png; fi
etc/munin/templates/logo.png
+etc/munin/templates/munin-comparison-day.tmpl
+etc/munin/templates/munin-comparison-month.tmpl
+etc/munin/templates/munin-comparison-week.tmpl
+etc/munin/templates/munin-comparison-year.tmpl
etc/munin/templates/munin-domainview.tmpl
etc/munin/templates/munin-nodeview.tmpl
etc/munin/templates/munin-overview.tmpl
etc/munin/templates/munin-serviceview.tmpl
+@unexec if cmp -s %D/etc/munin/templates/style.css %D/www/data/munin/style.css; then rm -f %D/www/data/munin/style.css; fi
etc/munin/templates/style.css
%%SITE_PERL%%/Munin.pm
share/munin/munin-graph
share/munin/munin-html
-share/munin/munin-nagios
+share/munin/munin-limits
share/munin/munin-update
+www/cgi-bin/munin-cgi-graph
+@unexec rm -f /var/run/munin/munin-*.lock
+@unexec rmdir /var/run/munin 2>/dev/null || true
+@unexec rmdir /var/log/munin-main 2>/dev/null || true
@unexec rmdir %D/www/data/munin 2>/dev/null || true
@unexec rmdir %D/www/data 2>/dev/null || true
+@unexec rmdir %D/www/cgi-bin 2>/dev/null || true
@unexec rmdir %D/var/munin 2>/dev/null || true
-@unexec rmdir %D/var 2>/dev/null || true
@unexec rmdir %D/share/munin 2>/dev/null || true
-@dirrm etc/munin/templates
+@unexec rmdir %D/etc/munin/templates 2>/dev/null || true
@unexec rmdir %D/etc/munin 2>/dev/null || true
@unexec echo
@unexec echo '********************************************************************'
@unexec echo "If you want to *completely* remove munin-main, you have to"
@unexec echo
-@unexec echo " rm -rf %D/var/munin/datafile %D/www/data/munin \\"
-@unexec echo " "`ls -d /usr/local/var/munin/* | grep -v plugin-state`" \\"
+@unexec if [ -d %D/www/data/munin ]; then echo " rm -rf %D/www/data/munin \\"; fi
+@unexec if [ -d %D/var/munin ]; then ls -d %D/var/munin/* | grep -v plugin-state | fmt -40 | sed -e 's/^/ /' -e 's/$/ \\/'; fi
@unexec if [ -f %D/etc/munin/munin.conf ]; then echo " %D/etc/munin/munin.conf \\"; fi
@unexec if [ -d %D/etc/munin/templates ]; then echo " %D/etc/munin/templates \\"; fi
-@unexec echo " %D/etc/munin/munin-node.conf %D/etc/munin/plugins \\"
-@unexec echo " /var/log/munin"
+@unexec echo " /var/log/munin-main"
@unexec echo
@unexec echo "If you have already deinstalled munin-node, you can also"
@unexec echo