Gentoo Archives: gentoo-commits

From: "Robin H. Johnson (robbat2)" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-analyzer/munin/files: munin-1.3.3-fw_conntrack_plugins.patch munin-1.3.4-plugin-cleanup.patch munin-1.3.4-Makefile.patch
Date: Sat, 31 May 2008 21:10:47
Message-Id: E1K2YLZ-0000fz-Vq@stork.gentoo.org
1 robbat2 08/05/31 21:10:41
2
3 Added: munin-1.3.3-fw_conntrack_plugins.patch
4 munin-1.3.4-plugin-cleanup.patch
5 munin-1.3.4-Makefile.patch
6 Log:
7 Bug #214152, version bump. Includes fw_conntrack fixes per bug 195964.
8 (Portage version: 2.1.5.2)
9
10 Revision Changes Path
11 1.1 net-analyzer/munin/files/munin-1.3.3-fw_conntrack_plugins.patch
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/munin/files/munin-1.3.3-fw_conntrack_plugins.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/munin/files/munin-1.3.3-fw_conntrack_plugins.patch?rev=1.1&content-type=text/plain
15
16 Index: munin-1.3.3-fw_conntrack_plugins.patch
17 ===================================================================
18 From: Krzysztof Kozlowski <krzysztof.kozlowski@×××××××××.pl>
19 Subject: Conntrack fixes for new 2.6 kernels
20 URL: http://bugs.gentoo.org/show_bug.cgi?id=195964
21 Gentoo-bug-id: 195964
22 Signed-off-by: Robin H. Johnson <robbat2@g.o>
23
24 --- node/node.d.linux/fw_conntrack.in.old 2007-10-15 18:26:54.000000000 +0200
25 +++ node/node.d.linux/fw_conntrack.in 2007-10-15 18:30:28.000000000 +0200
26 @@ -78,7 +78,7 @@
27 exit 0
28 ;;
29 autoconf)
30 - if [ -f /proc/net/ip_conntrack ] ; then
31 + if [ -f /proc/net/ip_conntrack -o -f /proc/net/nf_conntrack ] ; then
32 echo yes
33 exit 0
34 else
35 @@ -89,14 +89,17 @@
36
37 # Do the work, perform the deed
38
39 -# INPUT:
40 +# INPUT /proc/net/ip_conntrack:
41 # tcp 6 225790 ESTABLISHED src=10.0.0.4 dst=198.144.194.12 sport=48580 dport=6667 src=198.144.194.12 dst=80.111.68.163 sport=6667 dport=48580 [ASSURED] use=1
42 # tcp 6 431918 ESTABLISHED src=10.0.0.2 dst=209.58.150.153 sport=33018 dport=6667 src=209.58.150.153 dst=80.111.68.163 sport=6667 dport=33018 [ASSURED] use=1
43 # tcp 6 123109 ESTABLISHED src=10.0.0.5 dst=198.144.194.12 sport=33846 dport=6667 [UNREPLIED] src=198.144.194.12 dst=80.111.68.163 sport=6667 dport=33846 use=1
44 # 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
45 #
46 +# INPUT /proc/net/nf_conntrack:
47 +# ipv4 2 tcp 6 424416 ESTABLISHED src=192.168.1.53 dst=196.203.198.11 sport=1584 dport=22146 packets=13659 bytes=5426603 src=196.203.198.11 dst=83.24.222.252 sport=22146 dport=1584 packets=14757 bytes=15342572 [ASSURED] mark=0 use=1
48
49 -cat /proc/net/ip_conntrack | awk '
50 +if [ -f /proc/net/ip_conntrack ]; then
51 + cat /proc/net/ip_conntrack | awk '
52 BEGIN { STATE["ESTABLISHED"]=STATE["FIN_WAIT"]=STATE["TIME_WAIT"]=0;
53 ASSURED=NOREPLY=NATED=STATE["SYN_SENT"]=STATE["UDP"]=0; }
54 /^tcp/ { STATE[$4]++; }
55 @@ -117,6 +120,29 @@
56 print "nated.value " NATED;
57 print "total.value " TOTAL;
58 }'
59 +else
60 + cat /proc/net/nf_conntrack | awk '
61 + BEGIN { STATE["ESTABLISHED"]=STATE["FIN_WAIT"]=STATE["TIME_WAIT"]=0;
62 + ASSURED=NOREPLY=NATED=STATE["SYN_SENT"]=STATE["UDP"]=0; }
63 + / tcp / { STATE[$6]++; }
64 + / udp / { STATE["UDP"]++; }
65 + /ASSURED/ { ASSURED++; }
66 + {
67 + TOTAL++;
68 + src1 = substr($7, 5); src2 = substr($14, 5);
69 + dst1 = substr($8, 5); dst2 = substr($15, 5);
70 + if (src1 != dst2 || dst1 != src2) NATED++;
71 + }
72 + END { print "established.value " STATE["ESTABLISHED"];
73 + print "fin_wait.value " STATE["FIN_WAIT"];
74 + print "time_wait.value " STATE["TIME_WAIT"];
75 + print "syn_sent.value " STATE["SYN_SENT"];
76 + print "udp.value " STATE["UDP"];
77 + print "assured.value " ASSURED;
78 + print "nated.value " NATED;
79 + print "total.value " TOTAL;
80 + }'
81 +fi
82
83 # Hum, the total.value should be possible to do as a cdef.
84
85 --- node/node.d.linux/fw_forwarded_local.in.old 2007-10-15 18:53:37.000000000 +0200
86 +++ node/node.d.linux/fw_forwarded_local.in 2007-10-15 18:57:26.000000000 +0200
87 @@ -22,13 +22,13 @@
88
89
90 if [ "$1" = "autoconf" ]; then
91 - if ( cat /proc/net/ip_conntrack 2>/dev/null >/dev/null ); then
92 + if [ -f /proc/net/ip_conntrack -o -f /proc/net/nf_conntrack ] ; then
93 echo yes
94 exit 0
95 else
96 if [ $? -eq 127 ]
97 then
98 - echo "no (ipconntrack not found)"
99 + echo "no (ip_conntrack or nf_conntrack not found)"
100 exit 1
101 else
102 echo no
103 @@ -50,6 +50,11 @@
104 exit 0
105 fi
106
107 +if [ -f /proc/net/ip_conntrack ]; then
108 + _conntrack_file=/proc/net/ip_conntrack
109 +else
110 + _conntrack_file=/proc/net/nf_conntrack
111 +fi
112 perl -ne '
113 BEGIN { $forward=0; $local=0; }
114
115 @@ -62,5 +67,5 @@
116 }
117 }
118 END { print "forward.value $forward\nlocal.value $local\n" }
119 -' </proc/net/ip_conntrack
120 +' < $_conntrack_file
121
122
123
124
125 1.1 net-analyzer/munin/files/munin-1.3.4-plugin-cleanup.patch
126
127 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/munin/files/munin-1.3.4-plugin-cleanup.patch?rev=1.1&view=markup
128 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/munin/files/munin-1.3.4-plugin-cleanup.patch?rev=1.1&content-type=text/plain
129
130 Index: munin-1.3.4-plugin-cleanup.patch
131 ===================================================================
132 --- munin-1.3.4/node/node.d.linux/iostat_ios.in.bak 2008-04-13 15:29:37.000000000 +0100
133 +++ munin-1.3.4/node/node.d.linux/iostat_ios.in 2008-04-13 15:30:59.000000000 +0100
134 @@ -59,12 +59,16 @@
135
136 sub filter {
137 my ($major, $minor, $tmpnam) = @_;
138 - return 0 if ($major == 1); # RAM devices
139 - return 0 if ($major == 9); # MD devices
140 - return 0 if ($major == 58); # LVM devices
141 - return 0 if ($major == 254); # LVM2 devices
142 - return 0 if ($tmpnam =~ /part\d+$/);
143 - return 0 if ($tmpnam =~ /^\s*(?:sd|hd)[a-z]\d+\s*$/);
144 + if(defined($major)) {
145 + return 0 if ($major == 1); # RAM devices
146 + return 0 if ($major == 9); # MD devices
147 + return 0 if ($major == 58); # LVM devices
148 + return 0 if ($major == 254); # LVM2 devices
149 + }
150 + if(defined($tmpnam)) {
151 + return 0 if ($tmpnam =~ /part\d+$/);
152 + return 0 if ($tmpnam =~ /^\s*(?:sd|hd)[a-z]\d+\s*$/);
153 + }
154
155 return 1;
156 }
157
158
159
160 1.1 net-analyzer/munin/files/munin-1.3.4-Makefile.patch
161
162 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/munin/files/munin-1.3.4-Makefile.patch?rev=1.1&view=markup
163 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/munin/files/munin-1.3.4-Makefile.patch?rev=1.1&content-type=text/plain
164
165 Index: munin-1.3.4-Makefile.patch
166 ===================================================================
167 --- munin-1.3.3.orig/Makefile.config 2006-11-10 04:39:31.000000000 -0800
168 +++ munin-1.3.3/Makefile.config 2007-02-25 02:08:46.000000000 -0800
169 @@ -9,10 +9,10 @@
170 #
171 # the base of the Munin installation.
172 #
173 -PREFIX = $(DESTDIR)/opt/munin
174 +PREFIX = $(DESTDIR)/usr
175
176 # Where Munin keeps its configurations (server.conf, client.conf, ++)
177 -CONFDIR = $(DESTDIR)/etc/opt/munin
178 +CONFDIR = $(DESTDIR)/etc/munin
179
180 # Server only - where to put munin-cron
181 BINDIR = $(PREFIX)/bin
182 @@ -21,31 +21,31 @@
183 SBINDIR = $(PREFIX)/sbin
184
185 # Where to put text and html documentation
186 -DOCDIR = $(PREFIX)/doc
187 +DOCDIR = $(PREFIX)/share/doc/munin-$(VERSION)
188
189 # Where to put man pages
190 -MANDIR = $(PREFIX)/man
191 +MANDIR = $(PREFIX)/share/man
192
193 # Where to put internal binaries and plugin repository
194 -LIBDIR = $(PREFIX)/lib
195 +LIBDIR = $(PREFIX)/libexec/munin
196
197 # Server only - Output directory
198 -HTMLDIR = $(PREFIX)/var/www
199 -CGIDIR = $(HTMLDIR)/cgi
200 +HTMLDIR = $(DESTDIR)/var/www/localhost/htdocs/munin
201 +CGIDIR = $(DESTDIR)/var/www/localhost/cgi-bin
202
203 # Client only - Where to put RRD files and other intenal data
204 -DBDIR = $(DESTDIR)/var/opt/munin
205 +DBDIR = $(DESTDIR)/var/lib/munin
206
207 # Client only - Where plugins should put their states. Must be writable by
208 # group "munin", and should be preserved between reboots
209 PLUGSTATE = $(DBDIR)/plugin-state
210
211 # Where Munin should place its logs.
212 -LOGDIR = $(DESTDIR)/var/log/munin
213 +LOGDIR = $(DESTDIR)/var/log/munin
214
215 # Location of PID files and other statefiles. On the server, must be
216 # writable by the user "munin".
217 -STATEDIR = $(DESTDIR)/var/run/munin
218 +STATEDIR = $(DESTDIR)/var/run/munin
219
220 # The perl interpreter to use
221 PERL = $(shell which perl)
222 @@ -67,10 +67,11 @@
223 BASH = /bin/bash
224
225 # Server only - Where to install the perl libraries
226 -PERLLIB = $(DESTDIR)$(shell $(PERL) -V:sitelib | cut -d"'" -f2)
227 +PERLLIB = $(DESTDIR)$(shell $(PERL) -V:sitelib | cut -d"'" -f2)
228
229 # Client only - Install plugins for this architecture
230 -OSTYPE = $(shell uname | tr '[A-Z]' '[a-z]')
231 +# LANG=C is because some locales are a bit different in their alphabet (eg ee_EE).
232 +OSTYPE = $(shell uname | LANG=C tr '[A-Z]' '[a-z]')
233
234 # How to figure out the hostname. (Only used in default configuration
235 # files)
236
237
238
239 --
240 gentoo-commits@l.g.o mailing list