rpms/munin/devel nf_conntrack, NONE, 1.1 munin-1.2.5-nf-conntrack.patch, NONE, 1.1 munin.spec, 1.11, 1.12

Kevin Fenzi (kevin) fedora-extras-commits at redhat.com
Sat Dec 1 16:58:44 UTC 2007


Author: kevin

Update of /cvs/extras/rpms/munin/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11294

Modified Files:
	munin.spec 
Added Files:
	nf_conntrack munin-1.2.5-nf-conntrack.patch 
Log Message:
Removed unnneeded plugins.conf file (fixes #288541)
Fix license tag.
Fix ip_conntrack monitoring (fixes #253192)
Switch to new useradd guidelines.



--- NEW FILE nf_conntrack ---
[fw_forwarded_local]
user root

[fw_conntrack]
user root

munin-1.2.5-nf-conntrack.patch:

--- NEW FILE munin-1.2.5-nf-conntrack.patch ---
diff -Nur munin-1.2.5.orig/node/node.d.linux/fw_conntrack.in munin-1.2.5/node/node.d.linux/fw_conntrack.in
--- munin-1.2.5.orig/node/node.d.linux/fw_conntrack.in	2006-10-17 06:27:35.000000000 -0600
+++ munin-1.2.5/node/node.d.linux/fw_conntrack.in	2007-11-30 21:54:22.000000000 -0700
@@ -84,7 +84,7 @@
         exit 0
 	;;
     autoconf)
-        if [ -f /proc/net/ip_conntrack ] ; then
+        if [ -f /proc/net/ip_conntrack -o -f /proc/net/nf_conntrack ] ; then
 	    echo yes
 	    exit 0
 	else
@@ -102,7 +102,15 @@
 # udp      17 53 src=80.111.68.163 dst=62.179.100.29 sport=34153 dport=53 src=62.179.100.29 dst=80.111.68.163 sport=53 dport=34153 [ASSURED] use=1
 #
 
-cat /proc/net/ip_conntrack | awk '
+if [ -f /proc/net/ip_conntrack ]; then
+    conntrack_file=/proc/net/ip_conntrack
+elif [ -f /proc/net/nf_conntrack ]; then
+    conntrack_file=/proc/net/nf_conntrack
+else
+    exit 1
+fi
+
+cat "$conntrack_file" | awk '
   BEGIN  { STATE["ESTABLISHED"]=STATE["FIN_WAIT"]=STATE["TIME_WAIT"]=0;
 	   ASSURED=NOREPLY=NATED=STATE["SYN_SENT"]=STATE["UDP"]=0; }
   /^tcp/ { STATE[$4]++; }
diff -Nur munin-1.2.5.orig/node/node.d.linux/fw_forwarded_local.in munin-1.2.5/node/node.d.linux/fw_forwarded_local.in
--- munin-1.2.5.orig/node/node.d.linux/fw_forwarded_local.in	2006-10-17 06:27:35.000000000 -0600
+++ munin-1.2.5/node/node.d.linux/fw_forwarded_local.in	2007-11-30 21:57:02.000000000 -0700
@@ -36,10 +36,13 @@
 	if ( cat /proc/net/ip_conntrack 2>/dev/null >/dev/null ); then
 		echo yes
 		exit 0
+		elif ( cat /proc/net/nf_conntrack 2>/dev/null >/dev/null ); then
+			echo yes
+			exit 0
 	else
 		if [ $? -eq 127 ]
 		then
-			echo "no (ipconntrack not found)"
+			echo "no (ip_conntrack/nf_conntrack not found)"
 			exit 1
 		else
 			echo no
@@ -50,7 +53,7 @@
 
 if [ "$1" = "config" ]; then
 
-	echo 'graph_title ipconntrack'
+	echo 'graph_title conntrack'
 	echo 'graph_args -l 0 --base 1000'
 	echo 'graph_vlabel established connections'
 	echo 'graph_category network'
@@ -63,4 +66,13 @@
 	exit 0
 fi
 
-cat /proc/net/ip_conntrack | grep ESTABLISHED | sed 's/.*src=\(.*\) .*dst=\(.*\) sport.*src=\(.*\) .*dst=\(.*\) spo.*/\1 \2 \3 \4/g' | awk 'BEGIN {{FORW=0} {LOCAL=0}} {if($1 != $4){ FORW += 1} else { LOCAL += 1}} END {{print "forward.value "FORW} {print "local.value "LOCAL}}'
+if [ -f /proc/net/ip_conntrack ]; then
+	conntrack_file=/proc/net/ip_conntrack
+elif [ -f /proc/net/nf_conntrack ]; then
+	conntrack_file=/proc/net/nf_conntrack
+else
+	exit 1
+fi
+
+cat "$conntrack_file" | grep ESTABLISHED | sed 's/.*src=\(.*\) .*dst=\(.*\) sport.*src=\(.*\) .*dst=\(.*\) spo.*/\1 \2 \3 \4/g' | awk 'BEGIN {{FORW=0} {LOCAL=0}} {if($1 != $4){ FORW += 1} else { LOCAL += 1}} END {{print "forward.value "FORW} {print "local.value "LOCAL}}'
+


Index: munin.spec
===================================================================
RCS file: /cvs/extras/rpms/munin/devel/munin.spec,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- munin.spec	27 Mar 2007 21:23:15 -0000	1.11
+++ munin.spec	1 Dec 2007 16:58:09 -0000	1.12
@@ -1,8 +1,8 @@
 Name:      munin
 Version:   1.2.5
-Release:   2%{?dist}
+Release:   3%{?dist}
 Summary:   Network-wide graphing framework (grapher/gatherer)
-License:   GPL
+License:   GPLv2 and Bitstream Vera
 Group:     System Environment/Daemons
 URL:       http://munin.projects.linpro.no/
 
@@ -13,15 +13,16 @@
 Source2: munin-1.2.5-hddtemp_smartctl-config
 Source3: munin-node.logrotate
 Source4: munin.logrotate
+Source5: nf_conntrack
 Patch0: munin-1.2.4-cron.patch
 Patch1: munin-1.2.4-conf.patch
+Patch2: munin-1.2.5-nf-conntrack.patch
 BuildArchitectures: noarch
 Requires: perl-HTML-Template
 Requires: perl-Net-Server perl-Net-SNMP
 Requires: rrdtool
 Requires: logrotate
-Requires(pre): fedora-usermgmt >= 0.7
-Requires(postun): fedora-usermgmt >= 0.7
+Requires(pre): shadow-utils
 
 %description
 Munin is a highly flexible and powerful solution used to create graphs of
@@ -43,8 +44,7 @@
 Requires: perl-Net-Server
 Requires: procps >= 2.0.7
 Requires: sysstat
-Requires(pre):		fedora-usermgmt >= 0.7
-Requires(postun):	fedora-usermgmt >= 0.7
+Requires(pre): shadow-utils
 Requires(post): /sbin/chkconfig
 Requires(preun): /sbin/chkconfig
 Requires(preun): /sbin/service
@@ -74,6 +74,7 @@
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 
@@ -105,7 +106,6 @@
 cat dists/redhat/munin-node.rc | sed -e 's/2345/\-/' > %{buildroot}/etc/rc.d/init.d/munin-node
 chmod 755 %{buildroot}/etc/rc.d/init.d/munin-node
 
-install -m0644 dists/tarball/plugins.conf %{buildroot}/etc/munin/
 install -m0644 dists/tarball/plugins.conf %{buildroot}/etc/munin/plugin-conf.d/munin-node
 
 # 
@@ -133,18 +133,21 @@
 # install logrotate scripts
 install -m 0644 %{SOURCE3} %{buildroot}/etc/logrotate.d/munin-node
 install -m 0644 %{SOURCE4} %{buildroot}/etc/logrotate.d/munin
+# install config for nf_conntrack
+install -m 0644 %{SOURCE5} %{buildroot}/etc/munin/plugin-conf.d/nf_conntrack
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 #
 # node package scripts
-# uid 18 is the next uid in http://fedoraproject.org/wiki/PackageUserRegistry
 #
 %pre node
-/usr/sbin/fedora-groupadd 18 -r munin &>/dev/null || :
-/usr/sbin/fedora-useradd 18 -r -s /sbin/nologin -d /var/lib/munin -M \
-                            -c 'Munin user' -g munin munin &>/dev/null || :
+getent group munin >/dev/null || groupadd -r munin
+getent passwd munin >/dev/null || \
+useradd -r -g munin -d /var/lib/munin -s /sbin/nologin \
+    -c "Munin user" munin
+exit 0
 
 %post node
 /sbin/chkconfig --add munin-node
@@ -154,22 +157,15 @@
 test "$1" != 0 || %{_initrddir}/munin-node stop &>/dev/null || :
 test "$1" != 0 || /sbin/chkconfig --del munin-node
 
-%postun node
-test "$1" != 0 || /usr/sbin/fedora-userdel munin &>/dev/null || :
-test "$1" != 0 || /usr/sbin/fedora-groupdel munin &>/dev/null || :
-
 # 
 # main package scripts
-# uid 18 is the next uid in http://fedoraproject.org/wiki/PackageUserRegistry
 #
 %pre
-/usr/sbin/fedora-groupadd 18 -r munin &>/dev/null || :
-/usr/sbin/fedora-useradd 18 -r -s /sbin/nologin -d /var/lib/munin -M \
-                            -c 'Munin user' -g munin munin &>/dev/null || :
-
-%postun
-test "$1" != 0 || /usr/sbin/fedora-userdel munin &>/dev/null || :
-test "$1" != 0 || /usr/sbin/fedora-groupdel munin &>/dev/null || :
+getent group munin >/dev/null || groupadd -r munin
+getent passwd munin >/dev/null || \
+useradd -r -g munin -d /var/lib/munin -s /sbin/nologin \
+    -c "Munin user" munin
+exit 0
  
 %files
 %defattr(-, root, root)
@@ -210,9 +206,9 @@
 %config(noreplace) /etc/munin/plugin-conf.d/munin-node
 %config(noreplace) /etc/munin/plugin-conf.d/sendmail
 %config(noreplace) /etc/munin/plugin-conf.d/hddtemp_smartctl
+%config(noreplace) /etc/munin/plugin-conf.d/nf_conntrack
 %config(noreplace) /etc/logrotate.d/munin-node
 /etc/rc.d/init.d/munin-node
-%config(noreplace) /etc/munin/plugins.conf
 %{_sbindir}/munin-run
 %{_sbindir}/munin-node
 %{_sbindir}/munin-node-configure
@@ -230,6 +226,12 @@
 %doc %{_mandir}/man5/munin-node*
 
 %changelog
+* Fri Nov 30 2007 Kevin Fenzi <kevin at tummy.com> - 1.2.5-3
+- Removed unnneeded plugins.conf file (fixes #288541)
+- Fix license tag.
+- Fix ip_conntrack monitoring (fixes #253192)
+- Switch to new useradd guidelines.
+
 * Tue Mar 27 2007 Kevin Fenzi <kevin at tummy.com> - 1.2.5-2
 - Fix directory ownership (fixes #233886)
 




More information about the fedora-extras-commits mailing list