From 10aa5c7d5012d6c658231e1a5416f23444e9a401 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Fri, 22 Dec 2006 10:58:46 +0000 Subject: [PATCH] version bump to fix bug #158803 as reported by Tomasz Bukowski Package-Manager: portage-2.1.2_rc3-r9 --- net-misc/l7-filter/ChangeLog | 7 +- net-misc/l7-filter/Manifest | 26 ++- net-misc/l7-filter/files/digest-l7-filter-2.8 | 6 + net-misc/l7-filter/l7-filter-2.8.ebuild | 166 ++++++++++++++++++ 4 files changed, 200 insertions(+), 5 deletions(-) create mode 100644 net-misc/l7-filter/files/digest-l7-filter-2.8 create mode 100644 net-misc/l7-filter/l7-filter-2.8.ebuild diff --git a/net-misc/l7-filter/ChangeLog b/net-misc/l7-filter/ChangeLog index 25efe32f19b8..b043be046a5e 100644 --- a/net-misc/l7-filter/ChangeLog +++ b/net-misc/l7-filter/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for net-misc/l7-filter # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter/ChangeLog,v 1.37 2006/10/14 21:42:51 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter/ChangeLog,v 1.38 2006/12/22 10:58:46 dragonheart Exp $ + +*l7-filter-2.8 (22 Dec 2006) + + 22 Dec 2006; Daniel Black +l7-filter-2.8.ebuild: + version bump to fix bug #158803 as reported by Tomasz Bukowski 14 Oct 2006; Aron Griffis l7-filter-2.6.ebuild: Mark 2.6 ~ia64. #150343 diff --git a/net-misc/l7-filter/Manifest b/net-misc/l7-filter/Manifest index 9716133730f9..1a4bcbfb0bd5 100644 --- a/net-misc/l7-filter/Manifest +++ b/net-misc/l7-filter/Manifest @@ -1,6 +1,10 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + DIST additional_patch_for_2.6.13.diff 4962 RMD160 8faa60214d5695c797b24a11fe95858a785258a3 SHA1 26aac9fe4646892776a4880974d84c7e265c01fc SHA256 c0e2b7bb7024c8e35b554eb33263b5c34dd2356aaea739b07231f717eae8f58d DIST netfilter-layer7-v2.3.tar.gz 105587 RMD160 4c5c5315cf1f193c9ceb605d8d9d9328b515c64d SHA1 cfbe80a6c5725732e4935692e4b0cf5b42abd4f0 SHA256 4a5e4475d05c8d0998e56d12e8e27eb9acf23ce80a53000783b2f609a6bb33aa DIST netfilter-layer7-v2.6.tar.gz 122514 RMD160 31b68ae3baa0a340f2e4a555fd5124c3b977629d SHA1 6120eae8bd405d35d079774d191830d137643147 SHA256 c5a842c037e915eb72576e5861f0b048837719f1edf448775d9218b42c48e0aa +DIST netfilter-layer7-v2.8.tar.gz 122377 RMD160 cd70ce6c0631d5099d44f52a06414562552fb546 SHA1 6f2cdcb69bd61b2971603cb7ed5f4da16df79d7e SHA256 09ecd9a000ab7595694b85f2bc9fa2b2f5bd8debd36c78fe5564fd23bdbbe9f3 EBUILD l7-filter-2.3.ebuild 4096 RMD160 a41469d3766af4f310880c4e2d0df0397b960852 SHA1 e4c66c625669a9b34f9a3a4b768c4a62832abeb7 SHA256 f79dd18aabe2aafeeb20dbe4cb4f6e56757c6a00ddbd6a439b1c630b3713b1d0 MD5 68318fdbd8b2583ef27bec229ca9be3e l7-filter-2.3.ebuild 4096 RMD160 a41469d3766af4f310880c4e2d0df0397b960852 l7-filter-2.3.ebuild 4096 @@ -9,10 +13,14 @@ EBUILD l7-filter-2.6.ebuild 4201 RMD160 bc17805ca465f665dc3a590b9bf4fa84cdfafc97 MD5 9375bef374ea24975474e61b516b08ab l7-filter-2.6.ebuild 4201 RMD160 bc17805ca465f665dc3a590b9bf4fa84cdfafc97 l7-filter-2.6.ebuild 4201 SHA256 384f8b7b9e38cf6825eeabaa4d45b1498f09d20a2a4d9963084afc4125128e2e l7-filter-2.6.ebuild 4201 -MISC ChangeLog 6656 RMD160 19914723b95c11847cb7b4804a15cd5e30394d1a SHA1 eb4ff5419cc280578e4581e38ff00d184c438ab4 SHA256 44980afe0eef023e2ff8465e75d45b9efbc6498507e656c8b5eb2f95cd629819 -MD5 3ff4d4a9ee594f9017dff9250730af3a ChangeLog 6656 -RMD160 19914723b95c11847cb7b4804a15cd5e30394d1a ChangeLog 6656 -SHA256 44980afe0eef023e2ff8465e75d45b9efbc6498507e656c8b5eb2f95cd629819 ChangeLog 6656 +EBUILD l7-filter-2.8.ebuild 4308 RMD160 d3f30908285139a74d59ce339ca91f75dfefd950 SHA1 f3b63e6146ad14e114073611f1b4d316fc6eeb6f SHA256 acf3800a9ab4a376d57b080756aa9b8268384d0999eeb67254c2d6f569a490c1 +MD5 9f02ce88734c20a59ec4cfd125469589 l7-filter-2.8.ebuild 4308 +RMD160 d3f30908285139a74d59ce339ca91f75dfefd950 l7-filter-2.8.ebuild 4308 +SHA256 acf3800a9ab4a376d57b080756aa9b8268384d0999eeb67254c2d6f569a490c1 l7-filter-2.8.ebuild 4308 +MISC ChangeLog 6831 RMD160 18eaef35961cf25eea6e054393719780ce2cc7a3 SHA1 835db5b5fb8576f0122dca14f7a5c07f7fa01980 SHA256 99bfbc91e10c66bed0958c1ece6bd243b1cf86395b5b96c7d001500f0ed2c7a9 +MD5 b6deaa8f6b2144c1681dd28b3d322970 ChangeLog 6831 +RMD160 18eaef35961cf25eea6e054393719780ce2cc7a3 ChangeLog 6831 +SHA256 99bfbc91e10c66bed0958c1ece6bd243b1cf86395b5b96c7d001500f0ed2c7a9 ChangeLog 6831 MISC metadata.xml 374 RMD160 36c7b587b04bba133b9b106083dd7b485d9d2e45 SHA1 1d33c3e413603911ecb01f7a6ac8bb89c544562b SHA256 4638653661df3aa277ddfab4579d87598d17211e8b4d10114d4eeba5ddf2b7f1 MD5 89edb769612add8464eb3c324f09e197 metadata.xml 374 RMD160 36c7b587b04bba133b9b106083dd7b485d9d2e45 metadata.xml 374 @@ -23,3 +31,13 @@ SHA256 b94267481c3fd0b7579bc12b7f4591fba1af0eeaa85e11b183c389119167d7ad files/di MD5 983d3df0a8d9153325e2a64d4c6a70c6 files/digest-l7-filter-2.6 536 RMD160 a4157e2b22c1b7629ad248f6155530451f538574 files/digest-l7-filter-2.6 536 SHA256 7f84ac7507fda9eaa0fa1755aa43ed81c16d4e3c08e00bf7878e05d4148db924 files/digest-l7-filter-2.6 536 +MD5 32db75fde6856c75c1df95a024566b91 files/digest-l7-filter-2.8 536 +RMD160 ed29d4509402b3e2fbd717c18dd84e590358cf30 files/digest-l7-filter-2.8 536 +SHA256 a40c733abadf9477f4219202ff7203babfbd207d3fc95bcc04806c3f65b95621 files/digest-l7-filter-2.8 536 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.5-ecc0.1.6 (GNU/Linux) + +iD8DBQFFi7qCmdTrptrqvGERAlmCAJ9SorLLwz0Fhgrde2V4koda32k6CwCffp+x +7AViwWeAa+8/HE/4Kjp+Ve8= +=XV+1 +-----END PGP SIGNATURE----- diff --git a/net-misc/l7-filter/files/digest-l7-filter-2.8 b/net-misc/l7-filter/files/digest-l7-filter-2.8 new file mode 100644 index 000000000000..e5554391ce33 --- /dev/null +++ b/net-misc/l7-filter/files/digest-l7-filter-2.8 @@ -0,0 +1,6 @@ +MD5 6e8ff4d1b7b0281a7596a74789b79f8d additional_patch_for_2.6.13.diff 4962 +RMD160 8faa60214d5695c797b24a11fe95858a785258a3 additional_patch_for_2.6.13.diff 4962 +SHA256 c0e2b7bb7024c8e35b554eb33263b5c34dd2356aaea739b07231f717eae8f58d additional_patch_for_2.6.13.diff 4962 +MD5 a7cf8b1e9e4ebe5117d20d3cea5ab310 netfilter-layer7-v2.8.tar.gz 122377 +RMD160 cd70ce6c0631d5099d44f52a06414562552fb546 netfilter-layer7-v2.8.tar.gz 122377 +SHA256 09ecd9a000ab7595694b85f2bc9fa2b2f5bd8debd36c78fe5564fd23bdbbe9f3 netfilter-layer7-v2.8.tar.gz 122377 diff --git a/net-misc/l7-filter/l7-filter-2.8.ebuild b/net-misc/l7-filter/l7-filter-2.8.ebuild new file mode 100644 index 000000000000..bbd356cb8f6e --- /dev/null +++ b/net-misc/l7-filter/l7-filter-2.8.ebuild @@ -0,0 +1,166 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter/l7-filter-2.8.ebuild,v 1.1 2006/12/22 10:58:46 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 + mirror://gentoo/additional_patch_for_2.6.13.diff" + +LICENSE="GPL-2" +KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~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 18 + then + PATCH=kernel-2.6.18-2.6.19-layer7-2.8.patch + elif kernel_is ge 2 6 17 + then + PATCH=for_older_kernels/kernel-2.6.17-layer7-2.5.patch + elif kernel_is ge 2 6 13 + then + PATCH=for_older_kernels/kernel-2.6.13-2.6.16-layer7-2.2.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 ge 2 6 0 + then + 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-2.8.patch + else + die "No L7-filter patch for Kernel version ${KV_FULL} - sorry not supported" + fi +} + +pkg_setup() { + linux-info_pkg_setup + pkg_preinstall + pkg_postinst +} + +src_unpack() { + + which_patch + + if [ -f ${KV_DIR}/include/linux/netfilter_ipv4/ipt_layer7.h ] + then + ewarn "already installed ${PN} for kernel ${KV_FULL}" + ewarn "If this is an upgrade attempt, try unmerging first." + ewarn "If this failes remove your kernel source from /usr/src" + ewarn "and remerge your kernel sources" + die + 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}" + + # https://bugs.gentoo.org/show_bug.cgi?id=106009#c5 + if kernel_is eq 2 6 12 + then + epatch "${DISTDIR}"/additional_patch_for_2.6.13.diff + fi +} + +src_compile() { + einfo "no compiling - just patching source" +} + +src_install() { + insinto "$(/bin/readlink -f ${KV_DIR})" + doins -r kernel/* + dodoc CHANGELOG README +} + +pkg_preinstall() { + if has collision-protect ${FEATURES}; then + ewarn + ewarn "Collisions are expected as this patches kernel code. Disable" + ewarn "FEATURES=collision-protect before use" + die 'incompatible FEATURES=collision-protect' + fi +} + +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" or' + ewarn '"l7filter" USE flag (depend which version of iptables you emerge)' +} + +# +# Unpatching of patched files is required to avoid a broken kernel source tree + +pkg_prerm() { + # How to determine what version it was installed against? - measily + eval $(/bin/fgrep KV=2 ${ROOT}/var/db/pkg/net-misc/${PF}/environment |\ + /bin/head -1) + KV_DIR=/usr/src/linux-"${KV}" + if [ -d ${KV_DIR} ]; then + ewarn "${KV_DIR} nolonger exists" + return 0; + fi + echo "KV_DIR=$KV_DIR" + if [ -f ${KV_DIR}/include/linux/netfilter_ipv4/ipt_layer7.h ] + then + einfo 'attempting to unpatch l7-patch from kernel ${KV_FULL}' + which_patch + if kernel_is eq 2 6 12 + then + + patch -F 3 -d "${KV_DIR}" -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 "${KV_DIR}" -R" epatch "${T}/${MY_P}/${PATCH}" + fi +} -- 2.26.2