summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlin Năstac <mrness@gentoo.org>2007-05-22 17:30:56 +0000
committerAlin Năstac <mrness@gentoo.org>2007-05-22 17:30:56 +0000
commitf8016c2435f07fb15176ca1c9456bfc4fa0ace28 (patch)
treec264599885b83e63b97e7632e9719262e0b690c1 /net-firewall
parentVersion bump, now with new configuration window. (diff)
downloadgentoo-2-f8016c2435f07fb15176ca1c9456bfc4fa0ace28.tar.gz
gentoo-2-f8016c2435f07fb15176ca1c9456bfc4fa0ace28.tar.bz2
gentoo-2-f8016c2435f07fb15176ca1c9456bfc4fa0ace28.zip
Fix unknown symbol error when build for 2.6.21 kernel (#179425).
(Portage version: 2.1.2.7)
Diffstat (limited to 'net-firewall')
-rw-r--r--net-firewall/ipp2p/ChangeLog8
-rw-r--r--net-firewall/ipp2p/files/digest-ipp2p-0.8.2-r33
-rw-r--r--net-firewall/ipp2p/files/ipp2p-0.8.2-kernel-2.6.21.patch69
-rw-r--r--net-firewall/ipp2p/ipp2p-0.8.2-r3.ebuild67
4 files changed, 146 insertions, 1 deletions
diff --git a/net-firewall/ipp2p/ChangeLog b/net-firewall/ipp2p/ChangeLog
index 5e3a1f077df4..d6a723448a52 100644
--- a/net-firewall/ipp2p/ChangeLog
+++ b/net-firewall/ipp2p/ChangeLog
@@ -1,6 +1,12 @@
# 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.27 2007/03/10 11:11:19 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipp2p/ChangeLog,v 1.28 2007/05/22 17:30:56 mrness Exp $
+
+*ipp2p-0.8.2-r3 (22 May 2007)
+
+ 22 May 2007; Alin Năstac <mrness@gentoo.org>
+ +files/ipp2p-0.8.2-kernel-2.6.21.patch, +ipp2p-0.8.2-r3.ebuild:
+ Fix unknown symbol error when build for 2.6.21 kernel (#179425).
10 Mar 2007; Alin Năstac <mrness@gentoo.org> ipp2p-0.8.2-r2.ebuild:
Remove $ROOT from src_compile (#168039).
diff --git a/net-firewall/ipp2p/files/digest-ipp2p-0.8.2-r3 b/net-firewall/ipp2p/files/digest-ipp2p-0.8.2-r3
new file mode 100644
index 000000000000..14106f32db3b
--- /dev/null
+++ b/net-firewall/ipp2p/files/digest-ipp2p-0.8.2-r3
@@ -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.21.patch b/net-firewall/ipp2p/files/ipp2p-0.8.2-kernel-2.6.21.patch
new file mode 100644
index 000000000000..87993a7bb321
--- /dev/null
+++ b/net-firewall/ipp2p/files/ipp2p-0.8.2-kernel-2.6.21.patch
@@ -0,0 +1,69 @@
+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 2007-05-22 20:13:59.000000000 +0300
++++ ipp2p-0.8.2/ipt_ipp2p.c 2007-05-22 20:25:32.000000000 +0300
+@@ -2,9 +2,17 @@
+ #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
++#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>
+@@ -831,7 +839,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 +853,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 +861,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-r3.ebuild b/net-firewall/ipp2p/ipp2p-0.8.2-r3.ebuild
new file mode 100644
index 000000000000..7b0de982500c
--- /dev/null
+++ b/net-firewall/ipp2p/ipp2p-0.8.2-r3.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-r3.ebuild,v 1.1 2007/05/22 17:30:56 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.21.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
+}