diff options
author | Alin Năstac <mrness@gentoo.org> | 2007-07-11 05:04:26 +0000 |
---|---|---|
committer | Alin Năstac <mrness@gentoo.org> | 2007-07-11 05:04:26 +0000 |
commit | 4ebeaca227d252aaf6848d7d5e6a02700a7096cf (patch) | |
tree | dacfe9a5fce8da4cd4b22922d740d0dcb0cd8356 /net-firewall/ipp2p | |
parent | whitespace (diff) | |
download | historical-4ebeaca227d252aaf6848d7d5e6a02700a7096cf.tar.gz historical-4ebeaca227d252aaf6848d7d5e6a02700a7096cf.tar.bz2 historical-4ebeaca227d252aaf6848d7d5e6a02700a7096cf.zip |
Fix broken compilation against kernel 2.6.22, thanks to Yakov Suraev <j2melinux at gmail dot com> (#184808).
Package-Manager: portage-2.1.2.7
Diffstat (limited to 'net-firewall/ipp2p')
-rw-r--r-- | net-firewall/ipp2p/ChangeLog | 9 | ||||
-rw-r--r-- | net-firewall/ipp2p/Manifest | 25 | ||||
-rw-r--r-- | net-firewall/ipp2p/files/digest-ipp2p-0.8.2-r4 | 3 | ||||
-rw-r--r-- | net-firewall/ipp2p/files/ipp2p-0.8.2-kernel-2.6.22.patch | 82 | ||||
-rw-r--r-- | net-firewall/ipp2p/ipp2p-0.8.2-r4.ebuild | 67 |
5 files changed, 178 insertions, 8 deletions
diff --git a/net-firewall/ipp2p/ChangeLog b/net-firewall/ipp2p/ChangeLog index 1dacb356397f..1c50b7921240 100644 --- a/net-firewall/ipp2p/ChangeLog +++ b/net-firewall/ipp2p/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-firewall/ipp2p # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipp2p/ChangeLog,v 1.29 2007/06/19 20:12:13 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipp2p/ChangeLog,v 1.30 2007/07/11 05:04:26 mrness Exp $ + +*ipp2p-0.8.2-r4 (11 Jul 2007) + + 11 Jul 2007; Alin Năstac <mrness@gentoo.org> + +files/ipp2p-0.8.2-kernel-2.6.22.patch, +ipp2p-0.8.2-r4.ebuild: + Fix broken compilation against kernel 2.6.22, thanks to Yakov Suraev + <j2melinux at gmail dot com> (#184808). 19 Jun 2007; Alin Năstac <mrness@gentoo.org> -files/ipp2p-0.8.2-matchsize.patch, -ipp2p-0.8.2-r2.ebuild: diff --git a/net-firewall/ipp2p/Manifest b/net-firewall/ipp2p/Manifest index c906f837d19c..eb600c0efca7 100644 --- a/net-firewall/ipp2p/Manifest +++ b/net-firewall/ipp2p/Manifest @@ -5,15 +5,23 @@ AUX ipp2p-0.8.2-kernel-2.6.21.patch 2066 RMD160 e5927f91ade4abdaf4191318708e38ae MD5 e3e9b1db626af65eb536cd4d075c2a01 files/ipp2p-0.8.2-kernel-2.6.21.patch 2066 RMD160 e5927f91ade4abdaf4191318708e38ae6123db85 files/ipp2p-0.8.2-kernel-2.6.21.patch 2066 SHA256 a26004618740016e69d06815991bb955e65b9ca3b68855610538a2664d52787b files/ipp2p-0.8.2-kernel-2.6.21.patch 2066 +AUX ipp2p-0.8.2-kernel-2.6.22.patch 2504 RMD160 bae14085213a41d98a55967c26594b1a507bd3e2 SHA1 5971ee4d2a6047e25b81392e598dce79529d07b6 SHA256 2d9d512b288c348c6ed7d45af871420f48fcbe823b72491ec729ecbc21727d26 +MD5 f720eab2de6e0e662a16faa9620cbb07 files/ipp2p-0.8.2-kernel-2.6.22.patch 2504 +RMD160 bae14085213a41d98a55967c26594b1a507bd3e2 files/ipp2p-0.8.2-kernel-2.6.22.patch 2504 +SHA256 2d9d512b288c348c6ed7d45af871420f48fcbe823b72491ec729ecbc21727d26 files/ipp2p-0.8.2-kernel-2.6.22.patch 2504 DIST ipp2p-0.8.2.tar.gz 18976 RMD160 097cd4175af3f97f3687f343087b8fe0af20ba38 SHA1 98dbcf84b23e7afde3286fd0f1c1816b437d082e SHA256 b265f5a1ce62de5a6cc60b9af22134a8d19b23e14b47a897057bca91188e0ee7 EBUILD ipp2p-0.8.2-r3.ebuild 1690 RMD160 71c1b19dad9d389cd6977dcbc60d860bd24f4985 SHA1 19e8772546ea7c994e3517c97b495dd6331899c0 SHA256 6cf8572ef4cfcd7d14393857b573006466aee5d0a9e9921d37ee9758d3fff643 MD5 1c06e4b56a13bc1c473245a9a8e951de ipp2p-0.8.2-r3.ebuild 1690 RMD160 71c1b19dad9d389cd6977dcbc60d860bd24f4985 ipp2p-0.8.2-r3.ebuild 1690 SHA256 6cf8572ef4cfcd7d14393857b573006466aee5d0a9e9921d37ee9758d3fff643 ipp2p-0.8.2-r3.ebuild 1690 -MISC ChangeLog 4715 RMD160 1a89c47689c25c80f4ce95a360f91dc597ae6b8b SHA1 d31446fef891008354f29cf178c45225c58c8282 SHA256 ba7611b71075b21d428d8ebdd0eead401b5ca30118618aa982bc323cd80553fa -MD5 756ddb86e52df7483d9ce6944cc4c819 ChangeLog 4715 -RMD160 1a89c47689c25c80f4ce95a360f91dc597ae6b8b ChangeLog 4715 -SHA256 ba7611b71075b21d428d8ebdd0eead401b5ca30118618aa982bc323cd80553fa ChangeLog 4715 +EBUILD ipp2p-0.8.2-r4.ebuild 1694 RMD160 87d0cf6915b817fa4c6dd615dd311931412a9d05 SHA1 e36c470c591b7f0e1aca7d5d537f44d34740b256 SHA256 70849a32fbe3c28b260c3c1f6b0dc5a44a493d3056218c79559604ed3923f852 +MD5 0e16d62e94e62613b3e96871da7f00ef ipp2p-0.8.2-r4.ebuild 1694 +RMD160 87d0cf6915b817fa4c6dd615dd311931412a9d05 ipp2p-0.8.2-r4.ebuild 1694 +SHA256 70849a32fbe3c28b260c3c1f6b0dc5a44a493d3056218c79559604ed3923f852 ipp2p-0.8.2-r4.ebuild 1694 +MISC ChangeLog 4974 RMD160 6600214a7a9ed4794048de1091ff00ad7a3ca189 SHA1 0da4508f48ebd7417b1db32437ff06369cfb295a SHA256 58511c33bcbefb4748c564042b3947f71c90151bac22bc2164c64c4f1a5b9ea9 +MD5 f10d8bd9c9ab9c5a8d43d91ed13e76e1 ChangeLog 4974 +RMD160 6600214a7a9ed4794048de1091ff00ad7a3ca189 ChangeLog 4974 +SHA256 58511c33bcbefb4748c564042b3947f71c90151bac22bc2164c64c4f1a5b9ea9 ChangeLog 4974 MISC metadata.xml 839 RMD160 b60b70128145c55c72e5e8bf6aaead3859c1985c SHA1 0affaf5fd1e0e806c3f2f487406e6c6918974563 SHA256 b6788dee2536d343a9d66aad17c358fce18091ac2a710b2eae090d5e4afba9cd MD5 a29bcf1bb9a709d97b6c6a925154a690 metadata.xml 839 RMD160 b60b70128145c55c72e5e8bf6aaead3859c1985c metadata.xml 839 @@ -21,10 +29,13 @@ SHA256 b6788dee2536d343a9d66aad17c358fce18091ac2a710b2eae090d5e4afba9cd metadata MD5 3bd136616ef13f4f269a7c48a5d518be files/digest-ipp2p-0.8.2-r3 232 RMD160 afd815301065b20a3fd7115191ed351d5d9efac3 files/digest-ipp2p-0.8.2-r3 232 SHA256 24a5af31ad5b60d4629f51b2ea39c7d2e0037b5e0d2990d62d55feda14bbfd12 files/digest-ipp2p-0.8.2-r3 232 +MD5 3bd136616ef13f4f269a7c48a5d518be files/digest-ipp2p-0.8.2-r4 232 +RMD160 afd815301065b20a3fd7115191ed351d5d9efac3 files/digest-ipp2p-0.8.2-r4 232 +SHA256 24a5af31ad5b60d4629f51b2ea39c7d2e0037b5e0d2990d62d55feda14bbfd12 files/digest-ipp2p-0.8.2-r4 232 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (GNU/Linux) -iD8DBQFGeDijJnxX6mF440QRAk/tAJ9drsmeC1tlNKZQP/Mr2XKBFZIS3QCg+1VK -vF7zGSrIVcxubPhG13ubML8= -=l6SZ +iD8DBQFGlGTgVSA5X31g7/gRAsKWAKCA5EZ3ctGCo2Oqlo39irSQpnAMOwCgqIs8 +EWuGCh45MRN3Kzj9k6WE+IA= +=OxvK -----END PGP SIGNATURE----- diff --git a/net-firewall/ipp2p/files/digest-ipp2p-0.8.2-r4 b/net-firewall/ipp2p/files/digest-ipp2p-0.8.2-r4 new file mode 100644 index 000000000000..14106f32db3b --- /dev/null +++ b/net-firewall/ipp2p/files/digest-ipp2p-0.8.2-r4 @@ -0,0 +1,3 @@ +MD5 9dd745830f302d70d0b728013c1d6a0c ipp2p-0.8.2.tar.gz 18976 +RMD160 097cd4175af3f97f3687f343087b8fe0af20ba38 ipp2p-0.8.2.tar.gz 18976 +SHA256 b265f5a1ce62de5a6cc60b9af22134a8d19b23e14b47a897057bca91188e0ee7 ipp2p-0.8.2.tar.gz 18976 diff --git a/net-firewall/ipp2p/files/ipp2p-0.8.2-kernel-2.6.22.patch b/net-firewall/ipp2p/files/ipp2p-0.8.2-kernel-2.6.22.patch new file mode 100644 index 000000000000..d0695e5a7d53 --- /dev/null +++ b/net-firewall/ipp2p/files/ipp2p-0.8.2-kernel-2.6.22.patch @@ -0,0 +1,82 @@ +diff -Nru ipp2p-0.8.2.orig/ipt_ipp2p.c ipp2p-0.8.2/ipt_ipp2p.c +--- ipp2p-0.8.2.orig/ipt_ipp2p.c 2006-09-27 12:52:00.000000000 +0300 ++++ ipp2p-0.8.2/ipt_ipp2p.c 2007-07-11 08:00:26.000000000 +0300 +@@ -2,9 +2,18 @@ + #include <linux/modversions.h> + #endif + #include <linux/module.h> +-#include <linux/netfilter_ipv4/ip_tables.h> + #include <linux/version.h> ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21) ++# include <linux/netfilter/x_tables.h> ++# define ipt_register_match xt_register_match ++# define ipt_unregister_match xt_unregister_match ++# define ipt_match xt_match ++#else ++# include <linux/netfilter_ipv4/ip_tables.h> + //#include <linux/netfilter_ipv4/ipt_ipp2p.h> ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21) */ ++ + #include "ipt_ipp2p.h" + #include <net/tcp.h> + #include <net/udp.h> +@@ -748,7 +757,11 @@ + { + const struct ipt_p2p_info *info = matchinfo; + unsigned char *haystack; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) ++ struct iphdr *ip = ip_hdr(skb); ++#else + struct iphdr *ip = skb->nh.iph; ++#endif + int p2p_result = 0, i = 0; + // int head_len; + int hlen = ntohs(ip->tot_len)-(ip->ihl*4); /*hlen = packet-data length*/ +@@ -831,7 +844,9 @@ + const struct ipt_ip *ip, + #endif + void *matchinfo, ++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18) + unsigned int matchsize, ++#endif + unsigned int hook_mask) + { + /* Must specify -p tcp */ +@@ -843,15 +858,6 @@ + } + + +-// TODO: find out what this structure is for (scheme taken +-// from kernel sources) +-// content seems to have a length of 8 bytes +-// (at least on my x86 machine) +-struct ipp2p_match_info { +- long int dunno_what_this_is_for; +- long int i_also_dunno_what_this_is_for; +-}; +- + static struct ipt_match ipp2p_match = { + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) + { NULL, NULL }, +@@ -860,17 +866,16 @@ + &checkentry, + NULL, + THIS_MODULE +-#endif +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17)) ++#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17) + .name = "ipp2p", + .match = &match, + .checkentry = &checkentry, + .me = THIS_MODULE, +-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17) ++#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17) */ + .name = "ipp2p", + .match = &match, + .family = AF_INET, +- .matchsize = sizeof(struct ipp2p_match_info), ++ .matchsize = XT_ALIGN(sizeof(struct ipt_p2p_info)), + .checkentry = &checkentry, + .me = THIS_MODULE, + #endif diff --git a/net-firewall/ipp2p/ipp2p-0.8.2-r4.ebuild b/net-firewall/ipp2p/ipp2p-0.8.2-r4.ebuild new file mode 100644 index 000000000000..faace0e0e97b --- /dev/null +++ b/net-firewall/ipp2p/ipp2p-0.8.2-r4.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipp2p/ipp2p-0.8.2-r4.ebuild,v 1.1 2007/07/11 05:04:26 mrness Exp $ + +inherit linux-mod eutils + +DESCRIPTION="Netfilter module for dealing with P2P Applications." +HOMEPAGE="http://www.ipp2p.org/index_en.html" +SRC_URI="http://www.ipp2p.org/downloads/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="" + +RDEPEND="virtual/modutils + >=net-firewall/iptables-1.2.11" + +DEPEND="${RDEPEND} + virtual/linux-sources" + +pkg_setup() { + CONFIG_CHECK="NETFILTER" + NETFILTER_ERROR="Your kernel is not configured to support Netfilter." + MODULE_NAMES="ipt_ipp2p(${PN}:${S}:${S})" + + linux-mod_pkg_setup +} + +src_unpack() { + unpack ${A} + + cd "${S}" + epatch "${FILESDIR}"/${P}-kernel-2.6.22.patch + convert_to_m Makefile + + sed -i -e "s/^IPTABLES_VERSION/#IPTABLES_VERSION/" Makefile + if has_version '>=net-firewall/iptables-1.3.6' ; then + sed -i -e "s/ld -shared/\$\(CC\) -shared/" Makefile + fi +} + +src_compile() { + local IPTABLES_VERSION="$(/sbin/iptables --version | cut -f2 -dv)" + emake CFLAGS="${CFLAGS}" CC="$(tc-getCC)" \ + IPTABLES_SRC="/usr" IPTABLES_VERSION="${IPTABLES_VERSION}" libipt_ipp2p.so \ + || die "Failed to build iptables module" + + local myARCH="${ARCH}" + ARCH="$(tc-arch-kernel)" + emake KERNEL_SRC="${KV_DIR}" \ + IPTABLES_SRC="/usr" IPTABLES_VERSION="${IPTABLES_VERSION}" \ + || die "Failed to build kernel module." + ARCH="${myARCH}" +} + +src_install() { + exeinto /$(get_libdir)/iptables + doexe libipt_ipp2p.so + + dodoc README + linux-mod_src_install +} + +pkg_postinst() { + linux-mod_pkg_postinst +} |