1 |
pva 07/12/24 09:26:19 |
2 |
|
3 |
Modified: l7-filter-2.13.ebuild ChangeLog |
4 |
l7-filter-2.9.ebuild l7-filter-2.8.ebuild |
5 |
metadata.xml l7-filter-2.12.ebuild |
6 |
Added: l7-filter-2.17.ebuild |
7 |
Log: |
8 |
Version bump, bug 195669, thank <cilly AT cilly.mine.nu> for report and Bjoern Olausson <spamsuxx AT gmail.com> for ebuild. Added myself into metadata, updated longdescription. Quotation fixes to shutup repoman. |
9 |
(Portage version: 2.1.3.19) |
10 |
|
11 |
Revision Changes Path |
12 |
1.4 net-misc/l7-filter/l7-filter-2.13.ebuild |
13 |
|
14 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/l7-filter/l7-filter-2.13.ebuild?rev=1.4&view=markup |
15 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/l7-filter/l7-filter-2.13.ebuild?rev=1.4&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/l7-filter/l7-filter-2.13.ebuild?r1=1.3&r2=1.4 |
17 |
|
18 |
Index: l7-filter-2.13.ebuild |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/net-misc/l7-filter/l7-filter-2.13.ebuild,v |
21 |
retrieving revision 1.3 |
22 |
retrieving revision 1.4 |
23 |
diff -u -r1.3 -r1.4 |
24 |
--- l7-filter-2.13.ebuild 11 Dec 2007 17:09:55 -0000 1.3 |
25 |
+++ l7-filter-2.13.ebuild 24 Dec 2007 09:26:19 -0000 1.4 |
26 |
@@ -1,6 +1,6 @@ |
27 |
# Copyright 1999-2007 Gentoo Foundation |
28 |
# Distributed under the terms of the GNU General Public License v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter/l7-filter-2.13.ebuild,v 1.3 2007/12/11 17:09:55 nixnut Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter/l7-filter-2.13.ebuild,v 1.4 2007/12/24 09:26:19 pva Exp $ |
31 |
|
32 |
inherit linux-info eutils |
33 |
|
34 |
@@ -77,7 +77,7 @@ |
35 |
[ ! -f "${S}/${PATCH}" ] && \ |
36 |
die "patch ${PATCH} not found. Please enter a bug at bugs.gentoo.org" |
37 |
|
38 |
- cd ${S} |
39 |
+ cd "${S}" |
40 |
|
41 |
mkdir kernel |
42 |
mkdir kernel/Documentation |
43 |
@@ -107,7 +107,7 @@ |
44 |
done |
45 |
|
46 |
#patch the copied kernel source |
47 |
- cd ${S}/kernel |
48 |
+ cd "${S}"/kernel |
49 |
EPATCH_OPTS="-F 3" epatch "${S}/${PATCH}" |
50 |
|
51 |
# https://bugs.gentoo.org/show_bug.cgi?id=106009#c5 |
52 |
@@ -150,14 +150,14 @@ |
53 |
|
54 |
pkg_prerm() { |
55 |
# How to determine what version it was installed against? - measily |
56 |
- if [ -f ${ROOT}/var/db/pkg/net-misc/${PF}/environment ]; then |
57 |
- eval $(/bin/fgrep KV=2 ${ROOT}/var/db/pkg/net-misc/${PF}/environment |\ |
58 |
+ if [ -f "${ROOT}"/var/db/pkg/net-misc/${PF}/environment ]; then |
59 |
+ eval $(/bin/fgrep KV=2 "${ROOT}"/var/db/pkg/net-misc/${PF}/environment |\ |
60 |
/bin/head -1) |
61 |
- elif [ -f ${ROOT}/var/db/pkg/net-misc/${PF}/environment.bz2 ]; then |
62 |
- eval $(/bin/bzfgrep KV=2 ${ROOT}/var/db/pkg/net-misc/${PF}/environment.bz2 |\ |
63 |
+ elif [ -f "${ROOT}"/var/db/pkg/net-misc/${PF}/environment.bz2 ]; then |
64 |
+ eval $(/bin/bzfgrep KV=2 "${ROOT}"/var/db/pkg/net-misc/${PF}/environment.bz2 |\ |
65 |
/bin/head -1) |
66 |
- elif [ -f ${ROOT}/var/db/pkg/net-misc/${PF}/environment.gz ]; then |
67 |
- eval $(/usr/bin/zfgrep KV=2 ${ROOT}/var/db/pkg/net-misc/${PF}/environment.gz |\ |
68 |
+ elif [ -f "${ROOT}"/var/db/pkg/net-misc/${PF}/environment.gz ]; then |
69 |
+ eval $(/usr/bin/zfgrep KV=2 "${ROOT}"/var/db/pkg/net-misc/${PF}/environment.gz |\ |
70 |
/bin/head -1) |
71 |
else |
72 |
die 'could not find previous version' |
73 |
|
74 |
|
75 |
|
76 |
1.54 net-misc/l7-filter/ChangeLog |
77 |
|
78 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/l7-filter/ChangeLog?rev=1.54&view=markup |
79 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/l7-filter/ChangeLog?rev=1.54&content-type=text/plain |
80 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/l7-filter/ChangeLog?r1=1.53&r2=1.54 |
81 |
|
82 |
Index: ChangeLog |
83 |
=================================================================== |
84 |
RCS file: /var/cvsroot/gentoo-x86/net-misc/l7-filter/ChangeLog,v |
85 |
retrieving revision 1.53 |
86 |
retrieving revision 1.54 |
87 |
diff -u -r1.53 -r1.54 |
88 |
--- ChangeLog 11 Dec 2007 17:09:55 -0000 1.53 |
89 |
+++ ChangeLog 24 Dec 2007 09:26:19 -0000 1.54 |
90 |
@@ -1,6 +1,15 @@ |
91 |
# ChangeLog for net-misc/l7-filter |
92 |
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 |
93 |
-# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter/ChangeLog,v 1.53 2007/12/11 17:09:55 nixnut Exp $ |
94 |
+# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter/ChangeLog,v 1.54 2007/12/24 09:26:19 pva Exp $ |
95 |
+ |
96 |
+*l7-filter-2.17 (24 Dec 2007) |
97 |
+ |
98 |
+ 24 Dec 2007; <pva@g.o> metadata.xml, l7-filter-2.8.ebuild, |
99 |
+ l7-filter-2.9.ebuild, l7-filter-2.12.ebuild, l7-filter-2.13.ebuild, |
100 |
+ +l7-filter-2.17.ebuild: |
101 |
+ Version bump, bug 195669, thank <cilly AT cilly.mine.nu> for report and |
102 |
+ Bjoern Olausson <spamsuxx AT gmail.com> for ebuild. Added myself into |
103 |
+ metadata, updated longdescription. Quotation fixes to shutup repoman. |
104 |
|
105 |
11 Dec 2007; nixnut <nixnut@g.o> l7-filter-2.13.ebuild: |
106 |
Stable on ppc wrt bug 201909 |
107 |
|
108 |
|
109 |
|
110 |
1.5 net-misc/l7-filter/l7-filter-2.9.ebuild |
111 |
|
112 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/l7-filter/l7-filter-2.9.ebuild?rev=1.5&view=markup |
113 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/l7-filter/l7-filter-2.9.ebuild?rev=1.5&content-type=text/plain |
114 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/l7-filter/l7-filter-2.9.ebuild?r1=1.4&r2=1.5 |
115 |
|
116 |
Index: l7-filter-2.9.ebuild |
117 |
=================================================================== |
118 |
RCS file: /var/cvsroot/gentoo-x86/net-misc/l7-filter/l7-filter-2.9.ebuild,v |
119 |
retrieving revision 1.4 |
120 |
retrieving revision 1.5 |
121 |
diff -u -r1.4 -r1.5 |
122 |
--- l7-filter-2.9.ebuild 12 Jul 2007 02:52:15 -0000 1.4 |
123 |
+++ l7-filter-2.9.ebuild 24 Dec 2007 09:26:19 -0000 1.5 |
124 |
@@ -1,6 +1,6 @@ |
125 |
# Copyright 1999-2007 Gentoo Foundation |
126 |
# Distributed under the terms of the GNU General Public License v2 |
127 |
-# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter/l7-filter-2.9.ebuild,v 1.4 2007/07/12 02:52:15 mr_bones_ Exp $ |
128 |
+# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter/l7-filter-2.9.ebuild,v 1.5 2007/12/24 09:26:19 pva Exp $ |
129 |
|
130 |
inherit linux-info eutils |
131 |
|
132 |
@@ -70,14 +70,14 @@ |
133 |
[ ! -f "${S}/${PATCH}" ] && \ |
134 |
die "patch ${PATCH} not found. Please enter a bug at bugs.gentoo.org" |
135 |
|
136 |
- cd ${S} |
137 |
+ cd "${S}" |
138 |
|
139 |
mkdir kernel |
140 |
mkdir kernel/Documentation |
141 |
|
142 |
# create needed directories |
143 |
- mkdir -p ${S}/kernel/net/ipv4/netfilter/regexp/ |
144 |
- mkdir -p ${S}/kernel/include/linux/netfilter_ipv4/ |
145 |
+ mkdir -p "${S}"/kernel/net/ipv4/netfilter/regexp/ |
146 |
+ mkdir -p "${S}"/kernel/include/linux/netfilter_ipv4/ |
147 |
|
148 |
cd ${KV_DIR} |
149 |
|
150 |
@@ -94,7 +94,7 @@ |
151 |
done |
152 |
|
153 |
#patch the copied kernel source |
154 |
- cd ${S}/kernel |
155 |
+ cd "${S}"/kernel |
156 |
EPATCH_OPTS="-F 3" epatch "${S}/${PATCH}" |
157 |
|
158 |
# https://bugs.gentoo.org/show_bug.cgi?id=106009#c5 |
159 |
@@ -137,7 +137,7 @@ |
160 |
|
161 |
pkg_prerm() { |
162 |
# How to determine what version it was installed against? - measily |
163 |
- eval $(/bin/fgrep KV=2 ${ROOT}/var/db/pkg/net-misc/${PF}/environment |\ |
164 |
+ eval $(/bin/fgrep KV=2 "${ROOT}"/var/db/pkg/net-misc/${PF}/environment |\ |
165 |
/bin/head -1) |
166 |
KV_DIR=/usr/src/linux-"${KV}" |
167 |
if [ -d ${KV_DIR} ]; then |
168 |
|
169 |
|
170 |
|
171 |
1.8 net-misc/l7-filter/l7-filter-2.8.ebuild |
172 |
|
173 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/l7-filter/l7-filter-2.8.ebuild?rev=1.8&view=markup |
174 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/l7-filter/l7-filter-2.8.ebuild?rev=1.8&content-type=text/plain |
175 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/l7-filter/l7-filter-2.8.ebuild?r1=1.7&r2=1.8 |
176 |
|
177 |
Index: l7-filter-2.8.ebuild |
178 |
=================================================================== |
179 |
RCS file: /var/cvsroot/gentoo-x86/net-misc/l7-filter/l7-filter-2.8.ebuild,v |
180 |
retrieving revision 1.7 |
181 |
retrieving revision 1.8 |
182 |
diff -u -r1.7 -r1.8 |
183 |
--- l7-filter-2.8.ebuild 12 Jul 2007 02:52:15 -0000 1.7 |
184 |
+++ l7-filter-2.8.ebuild 24 Dec 2007 09:26:19 -0000 1.8 |
185 |
@@ -1,6 +1,6 @@ |
186 |
# Copyright 1999-2007 Gentoo Foundation |
187 |
# Distributed under the terms of the GNU General Public License v2 |
188 |
-# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter/l7-filter-2.8.ebuild,v 1.7 2007/07/12 02:52:15 mr_bones_ Exp $ |
189 |
+# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter/l7-filter-2.8.ebuild,v 1.8 2007/12/24 09:26:19 pva Exp $ |
190 |
|
191 |
inherit linux-info eutils |
192 |
|
193 |
@@ -70,14 +70,14 @@ |
194 |
[ ! -f "${S}/${PATCH}" ] && \ |
195 |
die "patch ${PATCH} not found. Please enter a bug at bugs.gentoo.org" |
196 |
|
197 |
- cd ${S} |
198 |
+ cd "${S}" |
199 |
|
200 |
mkdir kernel |
201 |
mkdir kernel/Documentation |
202 |
|
203 |
# create needed directories |
204 |
- mkdir -p ${S}/kernel/net/ipv4/netfilter/regexp/ |
205 |
- mkdir -p ${S}/kernel/include/linux/netfilter_ipv4/ |
206 |
+ mkdir -p "${S}"/kernel/net/ipv4/netfilter/regexp/ |
207 |
+ mkdir -p "${S}"/kernel/include/linux/netfilter_ipv4/ |
208 |
|
209 |
cd ${KV_DIR} |
210 |
|
211 |
@@ -94,7 +94,7 @@ |
212 |
done |
213 |
|
214 |
#patch the copied kernel source |
215 |
- cd ${S}/kernel |
216 |
+ cd "${S}"/kernel |
217 |
EPATCH_OPTS="-F 3" epatch "${S}/${PATCH}" |
218 |
|
219 |
# https://bugs.gentoo.org/show_bug.cgi?id=106009#c5 |
220 |
@@ -137,7 +137,7 @@ |
221 |
|
222 |
pkg_prerm() { |
223 |
# How to determine what version it was installed against? - measily |
224 |
- eval $(/bin/fgrep KV=2 ${ROOT}/var/db/pkg/net-misc/${PF}/environment |\ |
225 |
+ eval $(/bin/fgrep KV=2 "${ROOT}"/var/db/pkg/net-misc/${PF}/environment |\ |
226 |
/bin/head -1) |
227 |
KV_DIR=/usr/src/linux-"${KV}" |
228 |
if [ -d ${KV_DIR} ]; then |
229 |
|
230 |
|
231 |
|
232 |
1.2 net-misc/l7-filter/metadata.xml |
233 |
|
234 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/l7-filter/metadata.xml?rev=1.2&view=markup |
235 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/l7-filter/metadata.xml?rev=1.2&content-type=text/plain |
236 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/l7-filter/metadata.xml?r1=1.1&r2=1.2 |
237 |
|
238 |
Index: metadata.xml |
239 |
=================================================================== |
240 |
RCS file: /var/cvsroot/gentoo-x86/net-misc/l7-filter/metadata.xml,v |
241 |
retrieving revision 1.1 |
242 |
retrieving revision 1.2 |
243 |
diff -u -r1.1 -r1.2 |
244 |
--- metadata.xml 17 Aug 2004 09:33:07 -0000 1.1 |
245 |
+++ metadata.xml 24 Dec 2007 09:26:19 -0000 1.2 |
246 |
@@ -4,8 +4,18 @@ |
247 |
<herd>no-herd</herd> |
248 |
<maintainer> |
249 |
<email>dragonheart@g.o</email> |
250 |
- <name>Daniel Black</name> |
251 |
- <description>If you have a change you want to make - go for it</description> |
252 |
+ <name>Daniel Black</name> |
253 |
</maintainer> |
254 |
-<longdescription></longdescription> |
255 |
+<maintainer> |
256 |
+ <email>pva@g.o</email> |
257 |
+ <name>Peter Volkov</name> |
258 |
+</maintainer> |
259 |
+<longdescription> |
260 |
+ L7-filter is a packet classifier for Linux. Unlike most other classifiers, it |
261 |
+ doesn't just look at simple values such as port numbers. Instead, it does |
262 |
+ regular expression matching on the application layer data to determine what |
263 |
+ protocols are being used. This is kernel version - old and well tested, but it |
264 |
+ is complicated to install and seems to cause SMP systems to crash. It can only |
265 |
+ use fairly simple regular expressions. |
266 |
+</longdescription> |
267 |
</pkgmetadata> |
268 |
|
269 |
|
270 |
|
271 |
1.6 net-misc/l7-filter/l7-filter-2.12.ebuild |
272 |
|
273 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/l7-filter/l7-filter-2.12.ebuild?rev=1.6&view=markup |
274 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/l7-filter/l7-filter-2.12.ebuild?rev=1.6&content-type=text/plain |
275 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/l7-filter/l7-filter-2.12.ebuild?r1=1.5&r2=1.6 |
276 |
|
277 |
Index: l7-filter-2.12.ebuild |
278 |
=================================================================== |
279 |
RCS file: /var/cvsroot/gentoo-x86/net-misc/l7-filter/l7-filter-2.12.ebuild,v |
280 |
retrieving revision 1.5 |
281 |
retrieving revision 1.6 |
282 |
diff -u -r1.5 -r1.6 |
283 |
--- l7-filter-2.12.ebuild 13 Aug 2007 21:45:29 -0000 1.5 |
284 |
+++ l7-filter-2.12.ebuild 24 Dec 2007 09:26:19 -0000 1.6 |
285 |
@@ -1,6 +1,6 @@ |
286 |
# Copyright 1999-2007 Gentoo Foundation |
287 |
# Distributed under the terms of the GNU General Public License v2 |
288 |
-# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter/l7-filter-2.12.ebuild,v 1.5 2007/08/13 21:45:29 dertobi123 Exp $ |
289 |
+# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter/l7-filter-2.12.ebuild,v 1.6 2007/12/24 09:26:19 pva Exp $ |
290 |
|
291 |
inherit linux-info eutils |
292 |
|
293 |
@@ -77,7 +77,7 @@ |
294 |
[ ! -f "${S}/${PATCH}" ] && \ |
295 |
die "patch ${PATCH} not found. Please enter a bug at bugs.gentoo.org" |
296 |
|
297 |
- cd ${S} |
298 |
+ cd "${S}" |
299 |
|
300 |
mkdir kernel |
301 |
mkdir kernel/Documentation |
302 |
@@ -107,7 +107,7 @@ |
303 |
done |
304 |
|
305 |
#patch the copied kernel source |
306 |
- cd ${S}/kernel |
307 |
+ cd "${S}"/kernel |
308 |
EPATCH_OPTS="-F 3" epatch "${S}/${PATCH}" |
309 |
|
310 |
# https://bugs.gentoo.org/show_bug.cgi?id=106009#c5 |
311 |
@@ -150,14 +150,14 @@ |
312 |
|
313 |
pkg_prerm() { |
314 |
# How to determine what version it was installed against? - measily |
315 |
- if [ -f ${ROOT}/var/db/pkg/net-misc/${PF}/environment ]; then |
316 |
- eval $(/bin/fgrep KV=2 ${ROOT}/var/db/pkg/net-misc/${PF}/environment |\ |
317 |
+ if [ -f "${ROOT}"/var/db/pkg/net-misc/${PF}/environment ]; then |
318 |
+ eval $(/bin/fgrep KV=2 "${ROOT}"/var/db/pkg/net-misc/${PF}/environment |\ |
319 |
/bin/head -1) |
320 |
- elif [ -f ${ROOT}/var/db/pkg/net-misc/${PF}/environment.bz2 ]; then |
321 |
- eval $(/bin/bzfgrep KV=2 ${ROOT}/var/db/pkg/net-misc/${PF}/environment.bz2 |\ |
322 |
+ elif [ -f "${ROOT}"/var/db/pkg/net-misc/${PF}/environment.bz2 ]; then |
323 |
+ eval $(/bin/bzfgrep KV=2 "${ROOT}"/var/db/pkg/net-misc/${PF}/environment.bz2 |\ |
324 |
/bin/head -1) |
325 |
- elif [ -f ${ROOT}/var/db/pkg/net-misc/${PF}/environment.gz ]; then |
326 |
- eval $(/usr/bin/zfgrep KV=2 ${ROOT}/var/db/pkg/net-misc/${PF}/environment.gz |\ |
327 |
+ elif [ -f "${ROOT}"/var/db/pkg/net-misc/${PF}/environment.gz ]; then |
328 |
+ eval $(/usr/bin/zfgrep KV=2 "${ROOT}"/var/db/pkg/net-misc/${PF}/environment.gz |\ |
329 |
/bin/head -1) |
330 |
else |
331 |
die 'could not find previous version' |
332 |
|
333 |
|
334 |
|
335 |
1.1 net-misc/l7-filter/l7-filter-2.17.ebuild |
336 |
|
337 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/l7-filter/l7-filter-2.17.ebuild?rev=1.1&view=markup |
338 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/l7-filter/l7-filter-2.17.ebuild?rev=1.1&content-type=text/plain |
339 |
|
340 |
Index: l7-filter-2.17.ebuild |
341 |
=================================================================== |
342 |
# Copyright 1999-2007 Gentoo Foundation |
343 |
# Distributed under the terms of the GNU General Public License v2 |
344 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter/l7-filter-2.17.ebuild,v 1.1 2007/12/24 09:26:19 pva Exp $ |
345 |
|
346 |
inherit linux-info eutils |
347 |
|
348 |
MY_P=netfilter-layer7-v${PV/_/-} |
349 |
DESCRIPTION="Kernel modules for layer 7 iptables filtering" |
350 |
HOMEPAGE="http://l7-filter.sourceforge.net" |
351 |
SRC_URI="mirror://sourceforge/l7-filter/${MY_P}.tar.gz |
352 |
mirror://gentoo/additional_patch_for_2.6.13.diff" |
353 |
|
354 |
LICENSE="GPL-2" |
355 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
356 |
IUSE="" |
357 |
#break repoman |
358 |
#SLOT="${KV}" |
359 |
SLOT="0" |
360 |
S=${WORKDIR}/${MY_P} |
361 |
RDEPEND="net-misc/l7-protocols" |
362 |
|
363 |
which_patch() { |
364 |
if kernel_is ge 2 6 22 |
365 |
then |
366 |
PATCH=kernel-2.6.22-2.6.24-layer7-${PV}.patch |
367 |
elif kernel_is ge 2 6 20 |
368 |
then |
369 |
PATCH=for_older_kernels/kernel-2.6.20-2.6.21-layer7-2.16.1.patch |
370 |
elif kernel_is ge 2 6 18 |
371 |
then |
372 |
PATCH=for_older_kernels/kernel-2.6.18-2.6.19-layer7-2.9.patch |
373 |
elif kernel_is ge 2 6 17 |
374 |
then |
375 |
PATCH=for_older_kernels/kernel-2.6.17-layer7-2.5.patch |
376 |
elif kernel_is ge 2 6 13 |
377 |
then |
378 |
PATCH=for_older_kernels/kernel-2.6.13-2.6.16-layer7-2.2.patch |
379 |
elif kernel_is ge 2 6 11 |
380 |
then |
381 |
PATCH=for_older_kernels/kernel-2.6.11-2.6.12-layer7-1.4.patch |
382 |
elif kernel_is ge 2 6 9 |
383 |
then |
384 |
PATCH=for_older_kernels/kernel-2.6.9-2.6.10-layer7-1.2.patch |
385 |
elif kernel_is ge 2 6 0 |
386 |
then |
387 |
PATCH=for_older_kernels/kernel-2.6.0-2.6.8.1-layer7-0.9.2.patch |
388 |
elif kernel_is 2 4 |
389 |
then |
390 |
PATCH=kernel-2.4-layer7-${PV}.patch |
391 |
else |
392 |
die "No L7-filter patch for Kernel version ${KV_FULL} - sorry not supported" |
393 |
fi |
394 |
} |
395 |
|
396 |
pkg_setup() { |
397 |
linux-info_pkg_setup |
398 |
pkg_preinstall |
399 |
pkg_postinst |
400 |
} |
401 |
|
402 |
src_unpack() { |
403 |
|
404 |
which_patch |
405 |
|
406 |
if [ -f ${KV_DIR}/include/linux/netfilter_ipv4/ipt_layer7.h ] || \ |
407 |
[ -f ${KV_DIR}/include/linux/netfilter/xt_layer7.h ] |
408 |
then |
409 |
ewarn "already installed ${PN} for kernel ${KV_FULL}" |
410 |
ewarn "If this is an upgrade attempt, try unmerging first." |
411 |
ewarn "If this failes remove your kernel source from /usr/src" |
412 |
ewarn "and remerge your kernel sources" |
413 |
die |
414 |
fi |
415 |
|
416 |
unpack ${MY_P}.tar.gz |
417 |
|
418 |
[ ! -f "${S}/${PATCH}" ] && \ |
419 |
die "patch ${PATCH} not found. Please enter a bug at bugs.gentoo.org" |
420 |
|
421 |
cd "${S}" |
422 |
|
423 |
mkdir kernel |
424 |
mkdir kernel/Documentation |
425 |
|
426 |
# create needed directories |
427 |
if kernel_is ge 2 6 20 |
428 |
then |
429 |
mkdir -p "${S}"/kernel/net/netfilter/regexp/ |
430 |
mkdir -p "${S}"/kernel/include/net/netfilter/ |
431 |
else |
432 |
mkdir -p "${S}"/kernel/net/ipv4/netfilter/regexp/ |
433 |
mkdir -p "${S}"/kernel/include/linux/netfilter_ipv4/ |
434 |
fi |
435 |
|
436 |
cd ${KV_DIR} |
437 |
|
438 |
# start to copy needed files, if file not exists create an empty file |
439 |
FILES=$(patch -t --dry-run -p1 < "${S}"/${PATCH} | grep "^patching file" | cut -f 3 -d ' ') |
440 |
for F in ${FILES}; |
441 |
do |
442 |
if [ -f "${F}" ]; |
443 |
then |
444 |
cp -P "${F}" "${S}/kernel/${F}" |
445 |
#else |
446 |
# touch "${S}/kernel/${F}" |
447 |
fi |
448 |
done |
449 |
|
450 |
#patch the copied kernel source |
451 |
cd "${S}"/kernel |
452 |
EPATCH_OPTS="-F 3" epatch "${S}/${PATCH}" |
453 |
|
454 |
# https://bugs.gentoo.org/show_bug.cgi?id=106009#c5 |
455 |
if kernel_is eq 2 6 12 |
456 |
then |
457 |
epatch "${DISTDIR}"/additional_patch_for_2.6.13.diff |
458 |
fi |
459 |
} |
460 |
|
461 |
src_compile() { |
462 |
einfo "no compiling - just patching source" |
463 |
} |
464 |
|
465 |
src_install() { |
466 |
insinto "$(/bin/readlink -f ${KV_DIR})" |
467 |
doins -r kernel/* |
468 |
dodoc CHANGELOG README |
469 |
} |
470 |
|
471 |
pkg_preinstall() { |
472 |
if has collision-protect ${FEATURES}; then |
473 |
ewarn |
474 |
ewarn "Collisions are expected as this patches kernel code. Use" |
475 |
ewarn "FEATURES=-collision-protect emerge ...... for this package" |
476 |
die 'incompatible FEATURES=collision-protect' |
477 |
fi |
478 |
} |
479 |
|
480 |
pkg_postinst() { |
481 |
ewarn "This may not work with all kernels. If it does not work please enter a bug at bugs.gentoo.org" |
482 |
ewarn "This only patches the current kernel source code. (${KV_DIR})" |
483 |
ewarn "Its up to you to recompile the kernel with the l7 options" |
484 |
ewarn |
485 |
ewarn 'You will also need to emerge iptables with the "extensions" or' |
486 |
ewarn '"l7filter" USE flag (depend which version of iptables you emerge)' |
487 |
} |
488 |
|
489 |
# |
490 |
# Unpatching of patched files is required to avoid a broken kernel source tree |
491 |
|
492 |
pkg_prerm() { |
493 |
# How to determine what version it was installed against? - measily |
494 |
if [ -f "${ROOT}"/var/db/pkg/net-misc/${PF}/environment ]; then |
495 |
eval $(/bin/fgrep KV=2 "${ROOT}"/var/db/pkg/net-misc/${PF}/environment |\ |
496 |
/bin/head -1) |
497 |
elif [ -f "${ROOT}"/var/db/pkg/net-misc/${PF}/environment.bz2 ]; then |
498 |
eval $(/bin/bzfgrep KV=2 "${ROOT}"/var/db/pkg/net-misc/${PF}/environment.bz2 |\ |
499 |
/bin/head -1) |
500 |
elif [ -f "${ROOT}"/var/db/pkg/net-misc/${PF}/environment.gz ]; then |
501 |
eval $(/usr/bin/zfgrep KV=2 "${ROOT}"/var/db/pkg/net-misc/${PF}/environment.gz |\ |
502 |
/bin/head -1) |
503 |
else |
504 |
die 'could not find previous version' |
505 |
fi |
506 |
KV_DIR=/usr/src/linux-"${KV}" |
507 |
if [ -d ${KV_DIR} ]; then |
508 |
ewarn "${KV_DIR} nolonger exists" |
509 |
return 0; |
510 |
fi |
511 |
echo "KV_DIR=$KV_DIR" |
512 |
if [ -f ${KV_DIR}/include/linux/netfilter_ipv4/ipt_layer7.h ] || \ |
513 |
[ -f ${KV_DIR}/include/linux/netfilter/xt_layer7.h ] |
514 |
then |
515 |
einfo 'attempting to unpatch l7-patch from kernel ${KV_FULL}' |
516 |
which_patch |
517 |
if kernel_is eq 2 6 12 |
518 |
then |
519 |
|
520 |
patch -F 3 -d "${KV_DIR}" -R -p1 \ |
521 |
< "${DISTDIR}"/additional_patch_for_2.6.13.diff |
522 |
fi |
523 |
cd "${T}" |
524 |
unpack ${MY_P}.tar.gz |
525 |
EPATCH_SINGLE_MSG="removing previous patch" \ |
526 |
EPATCH_OPTS="-F 3 -d "${KV_DIR}" -R" epatch "${T}/${MY_P}/${PATCH}" |
527 |
fi |
528 |
} |
529 |
|
530 |
|
531 |
|
532 |
-- |
533 |
gentoo-commits@g.o mailing list |