Skip to content

Instantly share code, notes, and snippets.

@adambyrtek
Created December 11, 2010 16:44
Show Gist options
  • Save adambyrtek/737455 to your computer and use it in GitHub Desktop.
Save adambyrtek/737455 to your computer and use it in GitHub Desktop.
Patch with a Munin node ffp package
Index: source/Perl/perl-mod-Net-Server/PKG_TAGS
===================================================================
--- source/Perl/perl-mod-Net-Server/PKG_TAGS (revision 0)
+++ source/Perl/perl-mod-Net-Server/PKG_TAGS (revision 0)
@@ -0,0 +1 @@
+perl
Index: source/Perl/perl-mod-Net-Server/A
===================================================================
--- source/Perl/perl-mod-Net-Server/A (revision 0)
+++ source/Perl/perl-mod-Net-Server/A (revision 0)
@@ -0,0 +1 @@
+${PN#perl-mod-}-$PV
Index: source/Perl/perl-mod-Net-Server/PR
===================================================================
--- source/Perl/perl-mod-Net-Server/PR (revision 0)
+++ source/Perl/perl-mod-Net-Server/PR (revision 0)
@@ -0,0 +1 @@
+1
Index: source/Perl/perl-mod-Net-Server/S
===================================================================
--- source/Perl/perl-mod-Net-Server/S (revision 0)
+++ source/Perl/perl-mod-Net-Server/S (revision 0)
@@ -0,0 +1 @@
+${PN#perl-mod-}-$PV
Index: source/Perl/perl-mod-Net-Server/testsuite.sh
===================================================================
--- source/Perl/perl-mod-Net-Server/testsuite.sh (revision 0)
+++ source/Perl/perl-mod-Net-Server/testsuite.sh (revision 0)
@@ -0,0 +1 @@
+make test
Index: source/Perl/perl-mod-Net-Server/PV
===================================================================
--- source/Perl/perl-mod-Net-Server/PV (revision 0)
+++ source/Perl/perl-mod-Net-Server/PV (revision 0)
@@ -0,0 +1 @@
+0.99
Index: source/Perl/perl-mod-Net-Server/make.sh
===================================================================
--- source/Perl/perl-mod-Net-Server/make.sh (revision 0)
+++ source/Perl/perl-mod-Net-Server/make.sh (revision 0)
@@ -0,0 +1,3 @@
+perl Makefile.PL INSTALLDIRS=vendor
+make
+
Index: source/Perl/perl-mod-Net-Server/SRC_URI
===================================================================
--- source/Perl/perl-mod-Net-Server/SRC_URI (revision 0)
+++ source/Perl/perl-mod-Net-Server/SRC_URI (revision 0)
@@ -0,0 +1 @@
+http://search.cpan.org/CPAN/authors/id/R/RH/RHANDOM/Net-Server-$PV.tar.gz
Index: source/Perl/perl-mod-Net-Server/destdir-fix-perl.sh
===================================================================
--- source/Perl/perl-mod-Net-Server/destdir-fix-perl.sh (revision 0)
+++ source/Perl/perl-mod-Net-Server/destdir-fix-perl.sh (revision 0)
@@ -0,0 +1,13 @@
+# Fix packlist files
+cd $D
+for f in $(find -name .packlist); do
+ mv $f ${f}.orig
+ cat ${f}.orig | grep "^$D" | sed -e "s@^$D@@" | sort >$f
+ rm ${f}.orig
+done
+
+# Rename perllocal.pod files
+for f in $(find -name perllocal.pod); do
+ mv $f ${f}.new
+done
+
Index: source/munin-node/DESCR
===================================================================
--- source/munin-node/DESCR (revision 0)
+++ source/munin-node/DESCR (revision 0)
@@ -0,0 +1,20 @@
+Munin the monitoring tool surveys all your computers and remembers what it saw.
+It presents all the information in graphs through a web interface. Its emphasis
+is on plug and play capabilities. After completing a installation a high number
+of monitoring plugins will be playing with no more effort.
+
+Using Munin you can easily monitor the performance of your computers, networks,
+SANs, applications, weather measurements and whatever comes to mind. It makes
+it easy to determine "what's different today" when a performance problem crops
+up. It makes it easy to see how you're doing capacity-wise on any resources.
+
+This package contains a Munin node that serves monitoring data in response to
+requests from a Munin master that has to be installed separately. It depends on
+perl and perl-mod-Net-Server.
+
+After installation you can either run
+
+ $ perl /ffp/sbin/munin-node-configure --shell | sh -x
+
+to autodetect available plugins or configure the plugins manually.
+[pkgsrc]
Property changes on: source/munin-node/DESCR
___________________________________________________________________
Added: svn:executable
+ *
Index: source/munin-node/PR
===================================================================
--- source/munin-node/PR (revision 0)
+++ source/munin-node/PR (revision 0)
@@ -0,0 +1 @@
+2
Property changes on: source/munin-node/PR
___________________________________________________________________
Added: svn:executable
+ *
Index: source/munin-node/destdir-start.sh
===================================================================
--- source/munin-node/destdir-start.sh (revision 0)
+++ source/munin-node/destdir-start.sh (revision 0)
@@ -0,0 +1,2 @@
+mkdir -p $D/ffp/start
+install -m 0644 $X/munin-node.sh $D/ffp/start/munin-node.sh.new
Property changes on: source/munin-node/destdir-start.sh
___________________________________________________________________
Added: svn:executable
+ *
Index: source/munin-node/S
===================================================================
--- source/munin-node/S (revision 0)
+++ source/munin-node/S (revision 0)
@@ -0,0 +1 @@
+munin-$PV
Index: source/munin-node/munin-node.sh
===================================================================
--- source/munin-node/munin-node.sh (revision 0)
+++ source/munin-node/munin-node.sh (revision 0)
@@ -0,0 +1,15 @@
+#!/ffp/bin/sh
+
+# PROVIDE: munin-node
+# REQUIRE: LOGIN
+
+. /ffp/etc/ffp.subr
+
+name="munin-node"
+command="/ffp/sbin/munin-node"
+required_files="/ffp/etc/munin/munin-node.conf"
+muninnode_flags=
+
+start_cmd="/ffp/bin/perl -T /ffp/sbin/munin-node"
+
+run_rc_command "$1"
Property changes on: source/munin-node/munin-node.sh
___________________________________________________________________
Added: svn:executable
+ *
Index: source/munin-node/PV
===================================================================
--- source/munin-node/PV (revision 0)
+++ source/munin-node/PV (revision 0)
@@ -0,0 +1 @@
+1.4.5
Property changes on: source/munin-node/PV
___________________________________________________________________
Added: svn:executable
+ *
Index: source/munin-node/HOMEPAGE
===================================================================
--- source/munin-node/HOMEPAGE (revision 0)
+++ source/munin-node/HOMEPAGE (revision 0)
@@ -0,0 +1 @@
+http://munin-monitoring.org/
Property changes on: source/munin-node/HOMEPAGE
___________________________________________________________________
Added: svn:executable
+ *
Index: source/munin-node/make.sh
===================================================================
--- source/munin-node/make.sh (revision 0)
+++ source/munin-node/make.sh (revision 0)
@@ -0,0 +1,8 @@
+make \
+ PREFIX=$CPREFIX \
+ CONFDIR=$CPREFIX/etc/munin \
+ DBDIR=$CPREFIX/var/munin \
+ STATEDIR=$CPREFIX/var/run/munin \
+ MANDIR=$CPREFIX/share/man \
+ LOGDIR=$CPREFIX/var/log/munin \
+ LIBDIR=$CPREFIX/share/munin
Index: source/munin-node/SRC_URI
===================================================================
--- source/munin-node/SRC_URI (revision 0)
+++ source/munin-node/SRC_URI (revision 0)
@@ -0,0 +1 @@
+http://downloads.sourceforge.net/munin/munin-$PV.tar.gz
Property changes on: source/munin-node/SRC_URI
___________________________________________________________________
Added: svn:executable
+ *
Index: source/munin-node/destdir.sh
===================================================================
--- source/munin-node/destdir.sh (revision 0)
+++ source/munin-node/destdir.sh (revision 0)
@@ -0,0 +1,10 @@
+make \
+ DESTDIR=$D \
+ PREFIX=$D$CPREFIX \
+ CONFDIR=$D$CPREFIX/etc/munin \
+ DBDIR=$D$CPREFIX/var/munin \
+ STATEDIR=$D$CPREFIX/var/run/munin \
+ MANDIR=$D$CPREFIX/share/man \
+ LOGDIR=$D$CPREFIX/var/log/munin \
+ LIBDIR=$D$CPREFIX/share/munin \
+ install-common-prime install-node-prime install-plugins-prime
Index: source/munin-node/doinst.sh
===================================================================
--- source/munin-node/doinst.sh (revision 0)
+++ source/munin-node/doinst.sh (revision 0)
@@ -0,0 +1,15 @@
+def()
+{
+ if [ ! -r "$1" ]; then
+ mv $1.new $1
+ elif cmp -s $1 $1.new; then
+ rm $1.new
+ fi
+}
+
+# keep the x-flag of the start script
+if [ -x ffp/start/munin-node.sh ]; then
+ chmod a+x ffp/start/munin-node.sh.new
+fi
+
+def ffp/start/munin-node.sh
Property changes on: source/munin-node/doinst.sh
___________________________________________________________________
Added: svn:executable
+ *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment