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
+86
View File
@@ -0,0 +1,86 @@
$NetBSD: patch-aa,v 1.4 2011/04/30 19:10:13 abs Exp $
--- Makefile.config.orig 2005-04-15 20:29:18.000000000 +0000
+++ Makefile.config
@@ -7,32 +7,32 @@
#
# 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
# 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)/${PKGMANDIR}
# 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 +45,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
+PYTHON = ${PYTHONBIN}
# 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 +65,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/04 20:53:57 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
+40
View File
@@ -0,0 +1,40 @@
$NetBSD: patch-ac,v 1.1.1.1 2006/06/04 20:53:57 he Exp $
--- node/node.d/ntp_.in.orig 2004-11-21 21:19:09.000000000 +0100
+++ node/node.d/ntp_.in
@@ -76,6 +76,8 @@ $0 =~ /ntp_(.+)*$/;
my $name = $1;
exit 2 unless defined $name;
+my $do_delay = ! defined($ENV{'NTP_NODELAY'});
+
if ($ARGV[0] and $ARGV[0] eq "config") {
my @lines = `ntpq -c "hostnames no" -c peers`;
my $host;
@@ -91,8 +93,10 @@ if ($ARGV[0] and $ARGV[0] eq "config") {
print "graph_title NTP statistics for peer $host\n";
}
print "graph_args --base 1000 --vertical-label msec --lower-limit 0\n";
- print "delay.label Delay\n";
- print "delay.draw LINE2\n";
+ if ($do_delay) {
+ print "delay.label Delay\n";
+ print "delay.draw LINE2\n";
+ }
print "offset.label Offset\n";
print "offset.draw LINE2\n";
print "jitter.label Jitter\n";
@@ -110,8 +114,12 @@ foreach (@lines) {
$host =~ s/[\.-]/_/g;
next unless $host eq $name;
my @F = split;
- print <<"EOT";
+if ($do_delay) {
+ print <<"EOT"
delay.value $F[7]
+EOT
+}
+ print <<"EOT";
offset.value $F[8]
jitter.value $F[9]
EOT
+58
View File
@@ -0,0 +1,58 @@
$NetBSD: patch-ad,v 1.3 2010/07/17 11:47:57 abs Exp $
--- Makefile.orig 2005-04-15 20:37:29.000000000 +0000
+++ Makefile
@@ -17,7 +17,7 @@ install: install-main install-node insta
install-main: build
$(CHECKUSER)
- mkdir -p $(CONFDIR)/templates
+ mkdir -p $(DESTDIR)$(CONFDIR)/templates
mkdir -p $(LIBDIR)
mkdir -p $(BINDIR)
mkdir -p $(PERLLIB)
@@ -31,13 +31,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" $(DESTDIR)$(CONFDIR)/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 $(DESTDIR)$(CONFDIR)/templates/
+ $(INSTALL) -m 0644 server/style.css $(DESTDIR)$(CONFDIR)/templates/
+ $(INSTALL) -m 0644 server/definitions.html $(DESTDIR)$(CONFDIR)/templates/
$(INSTALL) -m 0755 build/server/munin-cron $(BINDIR)/
@@ -57,11 +55,10 @@ install-node-snmp: build
install-node-non-snmp: build
$(CHECKGROUP)
- mkdir -p $(CONFDIR)/plugins
- mkdir -p $(CONFDIR)/plugin-conf.d
+ mkdir -p $(DESTDIR)$(CONFDIR)/plugins
+ mkdir -p $(DESTDIR)$(CONFDIR)/plugin-conf.d
mkdir -p $(LIBDIR)/plugins
mkdir -p $(SBINDIR)
- mkdir -p $(PERLLIB)/Munin/Plugin
mkdir -p $(LOGDIR)
mkdir -p $(STATEDIR)
@@ -69,11 +66,10 @@ install-node-non-snmp: build
$(CHGRP) $(GROUP) $(PLUGSTATE)
$(CHMOD) 775 $(PLUGSTATE)
- $(CHMOD) 755 $(CONFDIR)/plugin-conf.d
+ $(CHMOD) 755 $(DESTDIR)$(CONFDIR)/plugin-conf.d
$(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
+15
View File
@@ -0,0 +1,15 @@
$NetBSD: patch-ae,v 1.1 2006/07/21 23:28:37 abs Exp $
--- node/node.d/hddtemp_smartctl.in.orig 2005-01-29 22:14:02.000000000 +0000
+++ node/node.d/hddtemp_smartctl.in
@@ -93,6 +93,10 @@ if ($^O eq 'linux') {
}
} elsif ($^O eq 'solaris') {
@drives = map { s@.*/@@ } glob '/dev/rdsk/c*t*d*s2';
+} elsif ($^O eq 'netbsd') {
+ my $rawpart = chr(`sysctl -n kern.rawpartition` + 97); # 'c' or 'd'
+ @drives = map { $_ . $rawpart } grep { /^wd/ } split ' ',
+ `sysctl -n hw.disknames`;
}
@drives = split ' ', $ENV{drives} if exists $ENV{drives};
+13
View File
@@ -0,0 +1,13 @@
$NetBSD: patch-af,v 1.1 2006/11/19 10:02:10 wiz Exp $
--- node/node.d/foldingathome_wu.in.orig 2004-12-09 20:19:57.000000000 +0000
+++ node/node.d/foldingathome_wu.in
@@ -31,7 +31,7 @@ fi
wu=`wget "http://vspx27.stanford.edu/cgi-bin/main.py?qtype=userpage&username=8d" -q -t 1 -T 5 -O - | egrep -A 2 "<TD> WU</TD>" | grep "<b>" | sed 's/.*<b> \([0-9]*\) .*/\1/'`
-if [ "$wu" == "" ]; then
+if [ "$wu" = "" ]; then
if [ -f $statefile ]; then
echo wu.value `cat $statefile`
fi
+13
View File
@@ -0,0 +1,13 @@
$NetBSD: patch-ag,v 1.1 2006/11/19 10:02:10 wiz Exp $
--- node/node.d/foldingathome_rank.in.orig 2004-12-09 20:19:57.000000000 +0000
+++ node/node.d/foldingathome_rank.in
@@ -31,7 +31,7 @@ if [ "$1" = "config" ]; then
fi
rank=`wget "http://vspx27.stanford.edu/cgi-bin/main.py?qtype=userpage&username=8d" -q -t 1 -T 5 -O - | egrep "<TD> <font size=3> <b> [0-9]* </b> of [0-9]* </font></TD>" | sed 's/.*<font size=3> <b> \([0-9]*\) .*/\1/'`
-if [ "$rank" == "" ]; then
+if [ "$rank" = "" ]; then
if [ -f $statefile ]; then
echo rank.value `cat $statefile`
fi
+19
View File
@@ -0,0 +1,19 @@
$NetBSD: patch-ah,v 1.1 2009/02/17 18:58:34 joerg Exp $
--- node/node.d/exim_mailqueue_alt.in.orig 2009-02-17 19:55:26.000000000 +0100
+++ node/node.d/exim_mailqueue_alt.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
#
# Plugin to monitor Exim's mail queue
#
@@ -31,7 +31,7 @@ QUEUECRIT=200
[ "$queuewarn" ] && QUEUEWARN=$queuewarn
[ "$queuecrit" ] && QUEUECRIT=$queuecrit
-if [ "$1" == "config" ]; then
+if [ "$1" = "config" ]; then
echo 'graph_title Exim mailqueue'
echo 'graph_args --base 1000 -l 0'
echo 'graph_vlabel mails in queue'