diff options
-rw-r--r-- | sys-apps/iproute2/ChangeLog | 11 | ||||
-rw-r--r-- | sys-apps/iproute2/files/iproute2-2.6.35-no-iptables.patch | 15 | ||||
-rw-r--r-- | sys-apps/iproute2/files/iproute2-2.6.35-xtables.patch | 30 | ||||
-rw-r--r-- | sys-apps/iproute2/iproute2-2.6.35-r3.ebuild | 112 | ||||
-rw-r--r-- | sys-apps/iproute2/metadata.xml | 3 |
5 files changed, 170 insertions, 1 deletions
diff --git a/sys-apps/iproute2/ChangeLog b/sys-apps/iproute2/ChangeLog index 06919ca61928..add32161d72b 100644 --- a/sys-apps/iproute2/ChangeLog +++ b/sys-apps/iproute2/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for sys-apps/iproute2 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/ChangeLog,v 1.161 2010/09/18 11:33:40 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/ChangeLog,v 1.162 2010/11/21 21:46:23 vapier Exp $ + +*iproute2-2.6.35-r3 (21 Nov 2010) + + 21 Nov 2010; Mike Frysinger <vapier@gentoo.org> + +iproute2-2.6.35-r3.ebuild, +files/iproute2-2.6.35-no-iptables.patch, + +files/iproute2-2.6.35-xtables.patch, metadata.xml: + Add USE=iptables to control support for it, and fix up iptables handling + in the process to use the newer x_xt module. Pull in pkg-config when + necessary #346137 by Mike Gilbert. *iproute2-2.6.35-r2 (18 Sep 2010) diff --git a/sys-apps/iproute2/files/iproute2-2.6.35-no-iptables.patch b/sys-apps/iproute2/files/iproute2-2.6.35-no-iptables.patch new file mode 100644 index 000000000000..a51cf78ac8df --- /dev/null +++ b/sys-apps/iproute2/files/iproute2-2.6.35-no-iptables.patch @@ -0,0 +1,15 @@ +diff --git a/tc/Makefile b/tc/Makefile +index 3aa9f26..0a827da 100644 +--- a/tc/Makefile ++++ b/tc/Makefile +@@ -58,7 +58,9 @@ else + CFLAGS += -DTC_CONFIG_XT_H + TCSO += m_xt_old.so + else +- TCMODULES += m_ipt.o ++ ifneq ($(TC_CONFIG_XT),n) ++ TCMODULES += m_ipt.o ++ endif + endif + endif + endif diff --git a/sys-apps/iproute2/files/iproute2-2.6.35-xtables.patch b/sys-apps/iproute2/files/iproute2-2.6.35-xtables.patch new file mode 100644 index 000000000000..748c77bde828 --- /dev/null +++ b/sys-apps/iproute2/files/iproute2-2.6.35-xtables.patch @@ -0,0 +1,30 @@ +From 035ea3a8a1c9f67721fa0b53540620c7c49bc8ab Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Sun, 21 Nov 2010 16:07:26 -0500 +Subject: [PATCH] m_xt: stop using xtables_set_revision() + +iptables dropped the xtables_set_revision() function around version 1.4.9, +so set the rev directly ourselves. This should be compatible back to the +original version m_xt itself is designed for. + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + tc/m_xt.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/tc/m_xt.c b/tc/m_xt.c +index bfc4937..ede9913 100644 +--- a/tc/m_xt.c ++++ b/tc/m_xt.c +@@ -88,7 +88,7 @@ build_st(struct xtables_target *target, struct xt_entry_target *t) + target->t = xtables_calloc(1, size); + target->t->u.target_size = size; + strcpy(target->t->u.user.name, target->name); +- xtables_set_revision(target->t->u.user.name, target->revision); ++ target->t->u.user.revision = target->revision; + + if (target->init != NULL) + target->init(target->t); +-- +1.7.3.1 + diff --git a/sys-apps/iproute2/iproute2-2.6.35-r3.ebuild b/sys-apps/iproute2/iproute2-2.6.35-r3.ebuild new file mode 100644 index 000000000000..c04741e07b95 --- /dev/null +++ b/sys-apps/iproute2/iproute2-2.6.35-r3.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/iproute2-2.6.35-r3.ebuild,v 1.1 2010/11/21 21:46:23 vapier Exp $ + +EAPI="2" + +inherit eutils toolchain-funcs flag-o-matic + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git" + inherit git + SRC_URI="" + #KEYWORDS="" +else + if [[ ${PV} == *.*.*.* ]] ; then + MY_PV=${PV%.*}-${PV##*.} + else + MY_PV=${PV} + fi + MY_P="${PN}-${MY_PV}" + SRC_URI="http://developer.osdl.org/dev/iproute2/download/${MY_P}.tar.bz2" + KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" + S=${WORKDIR}/${MY_P} +fi + +DESCRIPTION="kernel routing and traffic control utilities" +HOMEPAGE="http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2" + +LICENSE="GPL-2" +SLOT="0" +IUSE="atm berkdb +iptables ipv6 minimal" + +RDEPEND="!net-misc/arpd + iptables? ( >=net-firewall/iptables-1.4.5 ) + !minimal? ( berkdb? ( sys-libs/db ) ) + atm? ( net-dialup/linux-atm )" +DEPEND="${RDEPEND} + iptables? ( dev-util/pkgconfig ) + elibc_glibc? ( >=sys-libs/glibc-2.7 ) + sys-devel/flex + >=virtual/os-headers-2.6.27" + +src_prepare() { + sed -i \ + -e "/^LIBDIR/s:=.*:=/$(get_libdir):" \ + -e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \ + Makefile || die + + # build against system headers + rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc + + epatch "${FILESDIR}"/${PN}-2.6.29.1-hfsc.patch #291907 + epatch "${FILESDIR}"/${P}-cached-routes.patch #331447 + use ipv6 || epatch "${FILESDIR}"/${PN}-2.6.35-no-ipv6.patch #326849 + epatch "${FILESDIR}"/${PN}-2.6.35-xtables.patch + epatch "${FILESDIR}"/${PN}-2.6.35-no-iptables.patch + + epatch_user + + # don't build arpd if USE=-berkdb #81660 + use berkdb || sed -i '/^TARGETS=/s: arpd : :' misc/Makefile + + use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc:' Makefile +} + +use_yn() { use $1 && echo y || echo n ; } +src_configure() { + cat <<-EOF > Config + TC_CONFIG_ATM := $(use_yn atm) + TC_CONFIG_XT := $(use_yn iptables) + EOF + if use iptables ; then + # Use correct iptables dir, #144265 #293709 + append-cppflags -DXT_LIB_DIR=\\\"`$(tc-getPKG_CONFIG) xtables --variable=xtlibdir`\\\" + fi +} + +src_compile() { + emake \ + CC="$(tc-getCC)" \ + HOSTCC="$(tc-getBUILD_CC)" \ + AR="$(tc-getAR)" \ + || die +} + +src_install() { + if use minimal ; then + into / + dosbin tc/tc || die "minimal" + return 0 + fi + + emake \ + DESTDIR="${D}" \ + SBINDIR=/sbin \ + DOCDIR=/usr/share/doc/${PF} \ + MANDIR=/usr/share/man \ + install \ + || die + prepalldocs + + dolib.a lib/libnetlink.a || die + insinto /usr/include + doins include/libnetlink.h || die + + if use berkdb ; then + dodir /var/lib/arpd + # bug 47482, arpd doesn't need to be in /sbin + dodir /usr/sbin + mv "${D}"/sbin/arpd "${D}"/usr/sbin/ + fi +} diff --git a/sys-apps/iproute2/metadata.xml b/sys-apps/iproute2/metadata.xml index 96a2d586367d..fd18cf2b4fd3 100644 --- a/sys-apps/iproute2/metadata.xml +++ b/sys-apps/iproute2/metadata.xml @@ -2,4 +2,7 @@ <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <herd>base-system</herd> +<use> + <flag name='iptables'>include support for iptables filtering</flag> +</use> </pkgmetadata> |