[arch-commits] Commit in munin/trunk (6 files)

Dan McGee dan at archlinux.org
Sat Apr 9 20:28:11 UTC 2011


    Date: Saturday, April 9, 2011 @ 16:28:10
  Author: dan
Revision: 118963

upgpkg: munin 1.4.5-3
Fix for FS#18157, don't include /var/run in packages

Added:
  munin/trunk/munin-lock-location.patch
Modified:
  munin/trunk/Makefile.config
  munin/trunk/PKGBUILD
  munin/trunk/munin-node.init
  munin/trunk/munin-node.install
  munin/trunk/munin.install

---------------------------+
 Makefile.config           |    7 +++-
 PKGBUILD                  |   32 +++++++++++--------
 munin-lock-location.patch |   73 ++++++++++++++++++++++++++++++++++++++++++++
 munin-node.init           |    2 -
 munin-node.install        |    5 +--
 munin.install             |    5 +--
 6 files changed, 104 insertions(+), 20 deletions(-)

Modified: Makefile.config
===================================================================
--- Makefile.config	2011-04-09 16:31:53 UTC (rev 118962)
+++ Makefile.config	2011-04-09 20:28:10 UTC (rev 118963)
@@ -57,10 +57,13 @@
 # Where Munin should place its logs.
 LOGDIR     = $(DESTDIR)/var/log/munin
 
-# Location of PID files and other statefiles. On the server, must be
-# writable by the user "munin".
+# Location of PID files and other statefiles.
 STATEDIR   = $(DESTDIR)/var/run/munin
 
+# Location of server lock files. On the server, must be writable by the user
+# "munin".
+LOCKDIR    = $(DESTDIR)/var/lock/munin
+
 # The perl interpreter to use
 PERL       = /usr/bin/perl
 

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-04-09 16:31:53 UTC (rev 118962)
+++ PKGBUILD	2011-04-09 20:28:10 UTC (rev 118963)
@@ -1,20 +1,21 @@
-# $Id $
+# $Id$
 # Maintainer: Dan McGee <dan at archlinux.org>
 # Contributor: Evan LeCompte <evanlec at gmail.com>
 
 pkgname=('munin' 'munin-node')
 pkgbase=munin
 pkgver=1.4.5
-pkgrel=2
+pkgrel=3
 pkgdesc="A distributed monitoring/graphing tool"
 arch=('any')
 url="http://munin-monitoring.org/"
 license=("GPL")
-depends=('perl' 'perl-log-log4perl')
+depends=('rrdtool' 'perl' 'perl-log-log4perl' 'perl-html-template' 'perl-date-manip')
 source=(http://downloads.sourceforge.net/sourceforge/munin/munin-$pkgver.tar.gz
         Makefile.config
         keep-defaults.patch
         upstream-794.patch
+        munin-lock-location.patch
         munin-cron-entry
         munin-node.init
         logrotate.munin
@@ -24,24 +25,27 @@
 
 build() { 
 	cd $srcdir/munin-$pkgver
-	cp $srcdir/Makefile.config $srcdir/$pkgname-$pkgver || exit 1
 	# This build is beyond fucked, also need to report this upstream
-	patch -Np1 < $srcdir/keep-defaults.patch || exit 1
-	(cd master/lib/Munin && patch -Np0 < $srcdir/upstream-794.patch) || exit 1
-	# multithreading wrecks havoc on the build, should probably report this upstream
-	make -j1 PREFIX='' || exit 1
+	patch -Np1 < $srcdir/keep-defaults.patch
+	(cd master/lib/Munin && patch -Np0 < $srcdir/upstream-794.patch)
+	patch -Np1 < $srcdir/munin-lock-location.patch
+
+	cp $srcdir/Makefile.config $srcdir/$pkgname-$pkgver
+	# multithreading wrecks havoc on the build, should probably report this
+	make -j1 PREFIX=''
 }
 
 package_munin() {
-	depends=('perl' 'rrdtool' 'perl-html-template' 'perl-date-manip' 'perl-log-log4perl')
+	depends=('perl' 'rrdtool' 'perl-html-template' 'perl-date-manip' 'perl-log-log4perl' 'munin-node')
 	backup=(etc/munin/munin.conf etc/logrotate.d/munin)
 	install=munin.install
 
 	cd $srcdir/munin-$pkgver
-	make DESTDIR=$pkgdir install-master-prime || exit 1
+	make DESTDIR=$pkgdir install-master-prime
 	install -D -m644 $srcdir/munin-cron-entry $pkgdir/etc/munin/munin-cron-entry
 	install -D -m644 $srcdir/logrotate.munin $pkgdir/etc/logrotate.d/munin
 	install -D -m644 $srcdir/08-munin-font-dir.conf $pkgdir/etc/fonts/conf.d/08-munin-font-dir.conf
+	rm -rf $pkgdir/var/run/
 }
 
 package_munin-node() {
@@ -52,18 +56,20 @@
 	install=munin-node.install
 
 	cd $srcdir/munin-$pkgver
-	make DESTDIR=$pkgdir install-common-prime install-node-prime install-plugins-prime || exit 1
+	make DESTDIR=$pkgdir install-common-prime install-node-prime install-plugins-prime
 	install -m755 $srcdir/iostat_partition $pkgdir/usr/lib/munin/plugins/
 	install -D -m755 $srcdir/munin-node.init $pkgdir/etc/rc.d/munin-node
 	install -D -m644 $srcdir/logrotate.munin-node $pkgdir/etc/logrotate.d/munin-node
+	rm -rf $pkgdir/var/run/
 }
 
 md5sums=('4ae84b9a27b686c3819d8d7b51d8cb4c'
-         '083f56ce000cd93730b2552fd2f07f76'
+         'b754305c4e0a318ecb0f865bb5363815'
          '7d318c55b33680b14f236c5c06a0a64b'
          'c3ba6759e054de7408fa6450d148f797'
+         'b6cc12e31c2aa42da52c0fcb06551327'
          'dc9c83aa2a278466fb475364462f4119'
-         '18b254cdcf9c70849f68eaa06c91d667'
+         'a0604e888078d4245a83de1691343ab8'
          'db77b53150a906256a71a9f539c7fac2'
          'cdf139f2b6ae36852113f3411caa6e99'
          'e33a45c3b80a83eecabbe5a9920c1eb6'

Added: munin-lock-location.patch
===================================================================
--- munin-lock-location.patch	                        (rev 0)
+++ munin-lock-location.patch	2011-04-09 20:28:10 UTC (rev 118963)
@@ -0,0 +1,73 @@
+diff -Naur munin-1.4.5-orig//common/lib/Munin/Common/Defaults.pm munin-1.4.5/common/lib/Munin/Common/Defaults.pm
+--- munin-1.4.5-orig//common/lib/Munin/Common/Defaults.pm	2009-11-10 14:13:54.000000000 -0600
++++ munin-1.4.5/common/lib/Munin/Common/Defaults.pm	2011-04-09 15:09:13.215722026 -0500
+@@ -30,6 +30,7 @@
+ our $MUNIN_MANDIR     = '';
+ our $MUNIN_LOGDIR     = "$COMPONENT_ROOT/log/";
+ our $MUNIN_STATEDIR   = ''; 
++our $MUNIN_LOCKDIR    = ''; 
+ our $MUNIN_USER       = getpwuid $UID;
+ our $MUNIN_GROUP      = getgrgid $GID;
+ our $MUNIN_PLUGINUSER = getpwuid $UID;
+diff -Naur munin-1.4.5-orig//Makefile munin-1.4.5/Makefile
+--- munin-1.4.5-orig//Makefile	2009-12-29 10:03:49.000000000 -0600
++++ munin-1.4.5/Makefile	2011-04-09 15:20:44.201098440 -0500
+@@ -199,6 +199,7 @@
+              -e 's|@@HTMLDIR@@|$(HTMLDIR)|g'                    \
+              -e 's|@@DBDIR@@|$(DBDIR)|g'                        \
+              -e 's|@@STATEDIR@@|$(STATEDIR)|g'                  \
++             -e 's|@@LOCKDIR@@|$(LOCKDIR)|g'                    \
+              -e 's|@@PERL@@|$(PERL)|g'                          \
+              -e 's|@@PERLLIB@@|$(PERLLIB)|g'                    \
+              -e 's|@@PYTHON@@|$(PYTHON)|g'                      \
+@@ -239,6 +240,7 @@
+                   s{(HTMLDIR	\s+=\s).*}{\1q{$(HTMLDIR)};}x;     \
+                   s{(DBDIR	\s+=\s).*}{\1q{$(DBDIR)};}x;       \
+                   s{(STATEDIR	\s+=\s).*}{\1q{$(STATEDIR)};}x;    \
++                  s{(LOCKDIR	\s+=\s).*}{\1q{$(LOCKDIR)};}x;    \
+                   s{(PERL	\s+=\s).*}{\1q{$(PERL)};}x;        \
+                   s{(PERLLIB	\s+=\s).*}{\1q{$(PERLLIB)};}x;     \
+                   s{(PYTHON	\s+=\s).*}{\1q{$(PYTHON)};}x;      \
+diff -Naur munin-1.4.5-orig//Makefile.config munin-1.4.5/Makefile.config
+--- munin-1.4.5-orig//Makefile.config	2009-11-06 08:35:44.000000000 -0600
++++ munin-1.4.5/Makefile.config	2011-04-09 15:11:15.669416316 -0500
+@@ -61,10 +61,13 @@
+ # Where Munin should place its logs.
+ LOGDIR     = $(PREFIX)/log/munin
+ 
+-# Location of PID files and other statefiles. On the server, must be
+-# writable by the user "munin".
++# Location of PID files and other statefiles.
+ STATEDIR   = $(DESTDIR)/var/run/munin
+ 
++# Location of server lock files. On the server, must be writable by the user
++# "munin".
++LOCKDIR    = $(DESTDIR)/var/lock/munin
++
+ # The perl interpreter to use
+ PERL       := $(shell which perl)
+ 
+diff -Naur munin-1.4.5-orig//master/lib/Munin/Master/Utils.pm munin-1.4.5/master/lib/Munin/Master/Utils.pm
+--- munin-1.4.5-orig//master/lib/Munin/Master/Utils.pm	2009-12-18 00:25:03.000000000 -0600
++++ munin-1.4.5/master/lib/Munin/Master/Utils.pm	2011-04-09 15:05:57.965152601 -0500
+@@ -270,7 +270,7 @@
+ 
+     # Some important defaults before we return...
+     $config->{'dropdownlimit'} ||= $Munin::Common::Defaults::DROPDOWNLIMIT;
+-    $config->{'rundir'}        ||= $Munin::Common::Defaults::MUNIN_STATEDIR;
++    $config->{'rundir'}        ||= $Munin::Common::Defaults::MUNIN_LOCKDIR;
+     $config->{'dbdir'}         ||= $Munin::Common::Defaults::MUNIN_DBDIR;
+     $config->{'logdir'}        ||= $Munin::Common::Defaults::MUNIN_LOGDIR;
+     $config->{'tmpldir'}       ||= "$Munin::Common::Defaults::MUNIN_CONFDIR/templates/";
+diff -Naur munin-1.4.5-orig//master/munin.conf.in munin-1.4.5/master/munin.conf.in
+--- munin-1.4.5-orig//master/munin.conf.in	2009-11-23 06:26:36.000000000 -0600
++++ munin-1.4.5/master/munin.conf.in	2011-04-09 15:18:04.650625378 -0500
+@@ -8,7 +8,7 @@
+ # dbdir	@@DBDIR@@
+ # htmldir @@HTMLDIR@@
+ # logdir @@LOGDIR@@
+-# rundir  @@STATEDIR@@
++# rundir  @@LOCKDIR@@
+ #
+ # Where to look for the HTML templates
+ # tmpldir	@@CONFDIR@@/templates

Modified: munin-node.init
===================================================================
--- munin-node.init	2011-04-09 16:31:53 UTC (rev 118962)
+++ munin-node.init	2011-04-09 20:28:10 UTC (rev 118963)
@@ -10,6 +10,7 @@
 case "$1" in
   start)
     stat_busy "Starting munin-node"
+	[ -d /var/run/munin ] || mkdir -p /var/run/munin
     /usr/sbin/munin-node >/dev/null
     stat_done
     ;;
@@ -21,7 +22,6 @@
         stat_fail
         exit 1
       else
-        rm -f /var/run/munin/munin-node.pid &>/dev/null
         stat_done
       fi
     else

Modified: munin-node.install
===================================================================
--- munin-node.install	2011-04-09 16:31:53 UTC (rev 118962)
+++ munin-node.install	2011-04-09 20:28:10 UTC (rev 118963)
@@ -1,9 +1,10 @@
 post_install () {
   # Check user/group munin exists
   getent group munin >/dev/null || groupadd --system munin
-  getent passwd munin >/dev/null || useradd --system -c "Munin system monitor" -g munin -s /bin/false -d /var/lib/munin munin
+  getent passwd munin >/dev/null || \
+	  useradd --system -c "Munin system monitor" -g munin -s /bin/false -d /var/lib/munin munin
   # Fix permissions
-  chown munin.munin -R /var/log/munin /var/lib/munin /var/run/munin
+  chown munin.munin -R /var/log/munin /var/lib/munin
   # Do basic configuration
   echo "==> Run the following to get a good set of default plugins:"
   echo "    /usr/sbin/munin-node-configure --shell | sh"

Modified: munin.install
===================================================================
--- munin.install	2011-04-09 16:31:53 UTC (rev 118962)
+++ munin.install	2011-04-09 20:28:10 UTC (rev 118963)
@@ -1,9 +1,10 @@
 post_install () {
   # Check user/group munin exists
   getent group munin >/dev/null || groupadd --system munin
-  getent passwd munin >/dev/null || useradd --system -c "Munin system monitor" -g munin -s /bin/false -d /var/lib/munin munin
+  getent passwd munin >/dev/null || \
+	  useradd --system -c "Munin system monitor" -g munin -s /bin/false -d /var/lib/munin munin
   # Fix permissions
-  chown munin.munin -R /var/log/munin /var/lib/munin /var/run/munin
+  chown munin.munin -R /var/log/munin /var/lib/munin
   # Display cron command
   echo "See the example cron entry (for the munin user) for further setup:
     /etc/munin/munin-cron-entry"




More information about the arch-commits mailing list