version bump as per bug #106009. Added safe(r) removal code too
authorDaniel Black <dragonheart@gentoo.org>
Sat, 17 Sep 2005 09:17:35 +0000 (09:17 +0000)
committerDaniel Black <dragonheart@gentoo.org>
Sat, 17 Sep 2005 09:17:35 +0000 (09:17 +0000)
Package-Manager: portage-2.0.52-r1

net-misc/l7-filter/ChangeLog
net-misc/l7-filter/Manifest
net-misc/l7-filter/files/digest-l7-filter-1.5 [new file with mode: 0644]
net-misc/l7-filter/l7-filter-1.4.ebuild
net-misc/l7-filter/l7-filter-1.5.ebuild [new file with mode: 0644]

index 3077d62730e922b25747c99310bd5e02daf42b9b..8a02938124565f0f06abe055bcea44a6a9b69409 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for net-misc/l7-filter
 # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter/ChangeLog,v 1.18 2005/09/16 23:28:42 ciaranm Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter/ChangeLog,v 1.19 2005/09/17 09:17:35 dragonheart Exp $
+
+*l7-filter-1.5 (17 Sep 2005)
+
+  17 Sep 2005; Daniel Black <dragonheart@gentoo.org> l7-filter-1.4.ebuild,
+  +l7-filter-1.5.ebuild:
+  version bump as per bug #106009 thanks to tomas charvat. Added safe(r)
+  removal code too
 
   16 Sep 2005; Ciaran McCreesh <ciaranm@gentoo.org> ChangeLog:
   Converted to UTF-8, fixed encoding screwups
index da3d97ae77e8bd979c57dd936870b68e88dbed97..8bf9f061e72a92f8e25910857c761b0cffbc0d9d 100644 (file)
@@ -1,14 +1,16 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-MD5 52f73f2393588c790e0adc5d4b32c0f2 l7-filter-1.4.ebuild 2447
+MD5 e4482333234bfcbf6b53c2a0f1190054 l7-filter-1.4.ebuild 2932
 MD5 89edb769612add8464eb3c324f09e197 metadata.xml 374
-MD5 b11e60befd7c2758e1ecd247ebbc6283 ChangeLog 3250
+MD5 5277e2b3923d803eb32cbe2726d11c4f ChangeLog 3477
+MD5 a463995d3bbc74163de05f2146962bd8 l7-filter-1.5.ebuild 2880
 MD5 1900e66a8dde525ef974d0b0615218fc files/digest-l7-filter-1.4 147
+MD5 2d66a9bc9bf0c44d3ed5f5981eba4c3e files/digest-l7-filter-1.5 72
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.1 (GNU/Linux)
+Version: GnuPG v1.4.2-ecc0.1.6 (GNU/Linux)
 
-iD8DBQFDK1VdLLFUmVNQ7rkRAv8KAJ9K/KZCiYnOYhz9iNvP5uCU44HaVACdHx8a
-/88FoMXuBQy5uveecDqHGto=
-=/EfE
+iD8DBQFDK99EmdTrptrqvGERAnhpAJ9JfUJ31ZifxDtSAczhAAVQ0YCtygCeOUN3
+eUmYBpdzJhQSV8yuaBo7pk0=
+=tPCE
 -----END PGP SIGNATURE-----
diff --git a/net-misc/l7-filter/files/digest-l7-filter-1.5 b/net-misc/l7-filter/files/digest-l7-filter-1.5
new file mode 100644 (file)
index 0000000..dc90c13
--- /dev/null
@@ -0,0 +1 @@
+MD5 73d57c4b63c18c6593bcb346821fe0d6 netfilter-layer7-v1.5.tar.gz 88140
index f19531a207aa6ed4c6e77a6418918b3c6abc7260..2129ccb78c56661b76df50ea585ebff0ae53e3b7 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter/l7-filter-1.4.ebuild,v 1.6 2005/09/05 22:16:50 dragonheart Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter/l7-filter-1.4.ebuild,v 1.7 2005/09/17 09:17:35 dragonheart Exp $
 
 inherit linux-info eutils
 
@@ -19,6 +19,26 @@ SLOT="0"
 S=${WORKDIR}/${MY_P}
 RDEPEND="net-misc/l7-protocols"
 
+which_patch() {
+
+       if kernel_is 2 4
+       then
+               PATCH=kernel-${KV_MAJOR}.${KV_MINOR}-layer7-${PV}.patch
+       elif kernel_is ge 2 6 9
+       then
+               if kernel_is ge 2 6 11
+               then
+                       PATCH=kernel-2.6.11-layer7-${PV}.patch
+               else
+                       PATCH=for_older_kernels/kernel-2.6.9-2.6.10-layer7-1.2.patch
+               fi
+       else
+               # 2.6.0-2.6.8.1
+               PATCH=for_older_kernels/kernel-2.6.0-2.6.8.1-layer7-0.9.2.patch
+       fi
+
+}
+
 src_unpack() {
 
        pkg_postinst
@@ -36,23 +56,7 @@ src_unpack() {
        mkdir  kernel
        mkdir  kernel/Documentation
 
-
-       local PATCH
-       if kernel_is 2 4
-       then
-               PATCH=kernel-${KV_MAJOR}.${KV_MINOR}-layer7-${PV}.patch
-       elif kernel_is ge 2 6 9
-       then
-               if kernel_is ge 2 6 11
-               then
-                       PATCH=kernel-2.6.11-layer7-${PV}.patch
-               else
-                       PATCH=for_older_kernels/kernel-2.6.9-2.6.10-layer7-1.2.patch
-               fi
-       else
-               # 2.6.0-2.6.8.1
-               PATCH=for_older_kernels/kernel-2.6.0-2.6.8.1-layer7-0.9.2.patch
-       fi
+       which_patch
 
        if [ ! -f ${PATCH} ];
        then
@@ -65,7 +69,6 @@ src_unpack() {
 
        cd ${KV_DIR}
 
-
        # start to copy needed files, if file not exists create an empty file
        FILES=$(patch -t --dry-run -p1 < ${S}/${PATCH} | grep "^patching file" | cut -f 3 -d ' ')
        for F in ${FILES};
@@ -108,3 +111,19 @@ pkg_postinst() {
        ewarn 'You will also need to emerge iptables with the "extensions" USE flag'
 }
 
+pkg_prerm() {
+       if [ -f ${ROOT}/usr/src/linux/include/linux/netfilter_ipv4/ipt_layer7.h ]
+       then
+               einfo 'attempting to unpatch l7-patch from kernel'
+               which_patch
+               if kernel_is ge 2 6 11
+               then
+                       patch -F 3 -d ${ROOT}/usr/src/linux -R -p1 \
+                               < ${DISTDIR}/additional_patch_for_2.6.13.diff
+               fi
+               cd ${T}
+               unpack ${MY_P}.tar.gz
+               EPATCH_SINGLE_MSG="removing previous patch" \
+                       EPATCH_OPTS="-F 3 -d ${ROOT}/usr/src/linux -R" epatch "${T}/${MY_P}/${PATCH}"
+       fi
+}
diff --git a/net-misc/l7-filter/l7-filter-1.5.ebuild b/net-misc/l7-filter/l7-filter-1.5.ebuild
new file mode 100644 (file)
index 0000000..6063627
--- /dev/null
@@ -0,0 +1,122 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter/l7-filter-1.5.ebuild,v 1.1 2005/09/17 09:17:35 dragonheart Exp $
+
+inherit linux-info eutils
+
+MY_P=netfilter-layer7-v${PV}
+DESCRIPTION="Kernel modules for layer 7 iptables filtering"
+HOMEPAGE="http://l7-filter.sourceforge.net"
+SRC_URI="mirror://sourceforge/l7-filter/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE=""
+#break repoman
+#SLOT="${KV}"
+SLOT="0"
+S=${WORKDIR}/${MY_P}
+RDEPEND="net-misc/l7-protocols"
+
+
+which_patch() {
+       if kernel_is ge 2 6 13
+       then
+               PATCH=kernel-2.6.13-layer7-${PV}.patch
+       elif kernel_is ge 2 6 11
+       then
+               PATCH=for_older_kernels/kernel-2.6.11-2.6.12-layer7-1.4.patch
+       elif kernel_is ge 2 6 9
+       then
+               PATCH=for_older_kernels/kernel-2.6.9-2.6.10-layer7-1.2.patch
+       elif kernel_is 2 6
+       then
+               # 2.6.0-2.6.8.1
+               PATCH=for_older_kernels/kernel-2.6.0-2.6.8.1-layer7-0.9.2.patch
+       elif kernel_is 2 4
+       then
+               PATCH=kernel-2.4-layer7-${PV}.patch
+       else
+               die "No L7-filter patch for Kernel version ${KV_FULL} - sorry not supported"
+       fi
+}
+
+pkg_setup() {
+       pkg_postinst
+}
+
+src_unpack() {
+
+       which_patch
+
+       if [ -f ${KV_DIR}/include/linux/netfilter_ipv4/ipt_layer7.h ]
+       then
+               ewarn "already installed ${PF} for kernel ${KV_FULL}"
+               return 0;
+       fi
+
+       unpack ${MY_P}.tar.gz
+
+       [ ! -f "${S}/${PATCH}" ] && \
+               die "patch ${PATCH} not found. Please enter a bug at bugs.gentoo.org"
+
+
+       cd ${S}
+
+       mkdir  kernel
+       mkdir  kernel/Documentation
+
+
+       # create needed directories
+       mkdir -p ${S}/kernel/net/ipv4/netfilter/regexp/
+       mkdir -p ${S}/kernel/include/linux/netfilter_ipv4/
+
+       cd ${KV_DIR}
+
+       # start to copy needed files, if file not exists create an empty file
+       FILES=$(patch -t --dry-run -p1 < ${S}/${PATCH} | grep "^patching file" | cut -f 3 -d ' ')
+       for F in ${FILES};
+       do
+               if [ -f ${F} ];
+               then
+                       cp -P ${F} ${S}/kernel/${F}
+               else
+                       touch ${S}/kernel/${F}
+               fi
+       done
+
+       #patch the copied kernel source
+       cd ${S}/kernel
+       EPATCH_OPTS="-F 3" epatch "${S}/${PATCH}"
+}
+
+src_compile() {
+       einfo "no compiling - just patching source"
+}
+
+src_install() {
+       insinto "${KV_DIR}"
+       doins -r kernel/*
+       dodoc CHANGELOG README
+}
+
+
+pkg_postinst() {
+       ewarn "This may not work with all kernels. If it does not work please enter a bug at bugs.gentoo.org"
+       ewarn "This only patches the current kernel source code. (${KV_DIR})"
+       ewarn "Its up to you to recompile the kernel with the l7 options"
+       ewarn
+       ewarn 'You will also need to emerge iptables with the "extensions" USE flag'
+}
+
+pkg_prerm() {
+       if [ -f ${ROOT}/usr/src/linux/include/linux/netfilter_ipv4/ipt_layer7.h ]
+       then
+               einfo 'attempting to unpatch l7-patch from kernel'
+               which_patch
+               cd ${T}
+               unpack ${MY_P}.tar.gz
+               EPATCH_SINGLE_MSG="removing previous patch" \
+                       EPATCH_OPTS="-F 3 -d ${ROOT}/usr/src/linux -R" epatch "${T}/${MY_P}/${PATCH}"
+       fi
+}