diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-05-05 05:12:31 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-05-05 05:12:31 +0000 |
commit | cb0d3e89db2780a2bf4d100e318eb67dcc3285dc (patch) | |
tree | e8848d368455fd0914e6bfbd7a55ec2cc84bd343 /sys-apps/iproute2 | |
parent | dev-util/pkgconfig -. virtual/pkgconfig (diff) | |
download | gentoo-2-cb0d3e89db2780a2bf4d100e318eb67dcc3285dc.tar.gz gentoo-2-cb0d3e89db2780a2bf4d100e318eb67dcc3285dc.tar.bz2 gentoo-2-cb0d3e89db2780a2bf4d100e318eb67dcc3285dc.zip |
Forward port USE=iptables and USE=ipv6 support to newer verisons #414661 by Mike Gilbert.
(Portage version: 2.2.0_alpha100/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps/iproute2')
-rw-r--r-- | sys-apps/iproute2/ChangeLog | 8 | ||||
-rw-r--r-- | sys-apps/iproute2/files/iproute2-3.1.0-no-ipv6.patch | 41 | ||||
-rw-r--r-- | sys-apps/iproute2/iproute2-3.1.0.ebuild | 12 | ||||
-rw-r--r-- | sys-apps/iproute2/iproute2-3.3.0.ebuild | 12 | ||||
-rw-r--r-- | sys-apps/iproute2/iproute2-9999.ebuild | 12 |
5 files changed, 75 insertions, 10 deletions
diff --git a/sys-apps/iproute2/ChangeLog b/sys-apps/iproute2/ChangeLog index 26348d026d27..0bc786ecacfd 100644 --- a/sys-apps/iproute2/ChangeLog +++ b/sys-apps/iproute2/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-apps/iproute2 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/ChangeLog,v 1.187 2012/05/04 09:17:29 jdhore Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/ChangeLog,v 1.188 2012/05/05 05:12:31 vapier Exp $ + + 05 May 2012; Mike Frysinger <vapier@gentoo.org> + +files/iproute2-3.1.0-no-ipv6.patch, iproute2-3.1.0.ebuild, + iproute2-3.3.0.ebuild, iproute2-9999.ebuild: + Forward port USE=iptables and USE=ipv6 support to newer verisons #414661 by + Mike Gilbert. 04 May 2012; Jeff Horelick <jdhore@gentoo.org> iproute2-2.6.35-r3.ebuild: dev-util/pkgconfig -> virtual/pkgconfig diff --git a/sys-apps/iproute2/files/iproute2-3.1.0-no-ipv6.patch b/sys-apps/iproute2/files/iproute2-3.1.0-no-ipv6.patch new file mode 100644 index 000000000000..1282a1b59f9b --- /dev/null +++ b/sys-apps/iproute2/files/iproute2-3.1.0-no-ipv6.patch @@ -0,0 +1,41 @@ +https://bugs.gentoo.org/326849 + +allow ipv6 to be disabled + +--- a/ip/iptunnel.c ++++ b/ip/iptunnel.c +@@ -456,13 +456,6 @@ int do_iptunnel(int argc, char **argv) + break; + case AF_INET: + break; +- /* +- * This is silly enough but we have no easy way to make it +- * protocol-independent because of unarranged structure between +- * IPv4 and IPv6. +- */ +- case AF_INET6: +- return do_ip6tunnel(argc, argv); + default: + fprintf(stderr, "Unsupported family:%d\n", preferred_family); + exit(-1); +--- a/ip/Makefile ++++ b/ip/Makefile +@@ -1,6 +1,6 @@ + IPOBJ=ip.o ipaddress.o ipaddrlabel.o iproute.o iprule.o ipnetns.o \ +- rtm_map.o iptunnel.o ip6tunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \ +- ipmaddr.o ipmonitor.o ipmroute.o ipprefix.o iptuntap.o \ ++ rtm_map.o iptunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \ ++ ipmaddr.o ipmonitor.o ipmroute.o iptuntap.o \ + ipxfrm.o xfrm_state.o xfrm_policy.o xfrm_monitor.o \ + iplink_vlan.o link_veth.o link_gre.o iplink_can.o \ + iplink_macvlan.o iplink_macvtap.o ipl2tp.o +--- a/ip/ipmonitor.c ++++ b/ip/ipmonitor.c +@@ -76,7 +76,6 @@ int accept_msg(const struct sockaddr_nl *who, + if (n->nlmsg_type == RTM_NEWPREFIX) { + if (prefix_banner) + fprintf(fp, "[PREFIX]"); +- print_prefix(who, n, arg); + return 0; + } + if (n->nlmsg_type == RTM_NEWRULE || n->nlmsg_type == RTM_DELRULE) { diff --git a/sys-apps/iproute2/iproute2-3.1.0.ebuild b/sys-apps/iproute2/iproute2-3.1.0.ebuild index 4fea4ad0f53a..00303235df68 100644 --- a/sys-apps/iproute2/iproute2-3.1.0.ebuild +++ b/sys-apps/iproute2/iproute2-3.1.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/iproute2-3.1.0.ebuild,v 1.4 2012/02/16 05:21:31 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/iproute2-3.1.0.ebuild,v 1.5 2012/05/05 05:12:31 vapier Exp $ EAPI="4" @@ -21,12 +21,14 @@ HOMEPAGE="http://www.linuxfoundation.org/collaborate/workgroups/networking/iprou LICENSE="GPL-2" SLOT="0" -IUSE="atm berkdb minimal" +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? ( virtual/pkgconfig ) sys-devel/bison sys-devel/flex >=sys-kernel/linux-headers-2.6.27 @@ -34,6 +36,7 @@ DEPEND="${RDEPEND} src_prepare() { epatch "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907 + use ipv6 || epatch "${FILESDIR}"/${PN}-3.1.0-no-ipv6.patch #326849 sed -i \ -e '/^CC =/d' \ @@ -58,13 +61,16 @@ src_configure() { pushd "${T}" >/dev/null echo 'main(){return setns();};' > test.c ${CC} ${CFLAGS} ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n + echo 'main(){};' > test.c + ${CC} ${CFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile popd >/dev/null cat <<-EOF > Config TC_CONFIG_ATM := $(usex atm y n) + TC_CONFIG_XT := $(usex iptables y n) IP_CONFIG_SETNS := ${setns} # Use correct iptables dir, #144265 #293709 - IPT_LIB_DIR := $(${PKG_CONFIG} xtables --variable=xtlibdir) + IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir) EOF } diff --git a/sys-apps/iproute2/iproute2-3.3.0.ebuild b/sys-apps/iproute2/iproute2-3.3.0.ebuild index ab1a974cade1..2e5bb2da5142 100644 --- a/sys-apps/iproute2/iproute2-3.3.0.ebuild +++ b/sys-apps/iproute2/iproute2-3.3.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/iproute2-3.3.0.ebuild,v 1.1 2012/03/30 21:00:59 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/iproute2-3.3.0.ebuild,v 1.2 2012/05/05 05:12:31 vapier Exp $ EAPI="4" @@ -21,12 +21,14 @@ HOMEPAGE="http://www.linuxfoundation.org/collaborate/workgroups/networking/iprou LICENSE="GPL-2" SLOT="0" -IUSE="atm berkdb minimal" +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? ( virtual/pkgconfig ) sys-devel/bison sys-devel/flex >=sys-kernel/linux-headers-2.6.27 @@ -34,6 +36,7 @@ DEPEND="${RDEPEND} src_prepare() { epatch "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907 + use ipv6 || epatch "${FILESDIR}"/${PN}-3.1.0-no-ipv6.patch #326849 sed -i \ -e '/^CC =/d' \ @@ -59,13 +62,16 @@ src_configure() { pushd "${T}" >/dev/null echo 'main(){return setns();};' > test.c ${CC} ${CFLAGS} ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n + echo 'main(){};' > test.c + ${CC} ${CFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile popd >/dev/null cat <<-EOF > Config TC_CONFIG_ATM := $(usex atm y n) + TC_CONFIG_XT := $(usex iptables y n) IP_CONFIG_SETNS := ${setns} # Use correct iptables dir, #144265 #293709 - IPT_LIB_DIR := $(${PKG_CONFIG} xtables --variable=xtlibdir) + IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir) EOF } diff --git a/sys-apps/iproute2/iproute2-9999.ebuild b/sys-apps/iproute2/iproute2-9999.ebuild index e3d954164c36..20bae9b62107 100644 --- a/sys-apps/iproute2/iproute2-9999.ebuild +++ b/sys-apps/iproute2/iproute2-9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/iproute2-9999.ebuild,v 1.20 2012/03/30 21:00:59 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/iproute2-9999.ebuild,v 1.21 2012/05/05 05:12:31 vapier Exp $ EAPI="4" @@ -21,12 +21,14 @@ HOMEPAGE="http://www.linuxfoundation.org/collaborate/workgroups/networking/iprou LICENSE="GPL-2" SLOT="0" -IUSE="atm berkdb minimal" +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? ( virtual/pkgconfig ) sys-devel/bison sys-devel/flex >=sys-kernel/linux-headers-2.6.27 @@ -34,6 +36,7 @@ DEPEND="${RDEPEND} src_prepare() { epatch "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907 + use ipv6 || epatch "${FILESDIR}"/${PN}-3.1.0-no-ipv6.patch #326849 sed -i \ -e '/^CC =/d' \ @@ -58,13 +61,16 @@ src_configure() { pushd "${T}" >/dev/null echo 'main(){return setns();};' > test.c ${CC} ${CFLAGS} ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n + echo 'main(){};' > test.c + ${CC} ${CFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile popd >/dev/null cat <<-EOF > Config TC_CONFIG_ATM := $(usex atm y n) + TC_CONFIG_XT := $(usex iptables y n) IP_CONFIG_SETNS := ${setns} # Use correct iptables dir, #144265 #293709 - IPT_LIB_DIR := $(${PKG_CONFIG} xtables --variable=xtlibdir) + IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir) EOF } |