public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/files/, sys-apps/iproute2/
@ 2015-09-06 16:11 Lars Wendler
  0 siblings, 0 replies; 18+ messages in thread
From: Lars Wendler @ 2015-09-06 16:11 UTC (permalink / raw
  To: gentoo-commits

commit:     a4ab0f9a3be970061ed461f58deda40b6f53a33c
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sun Sep  6 16:09:18 2015 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sun Sep  6 16:09:18 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4ab0f9a

sys-apps/iproute2: Bump to version 4.2.0

Package-Manager: portage-2.2.20.1
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 sys-apps/iproute2/Manifest                         |   1 +
 .../iproute2/files/iproute2-4.2.0-no-ipv6.patch    |  37 ++++++
 sys-apps/iproute2/iproute2-4.2.0.ebuild            | 131 +++++++++++++++++++++
 3 files changed, 169 insertions(+)

diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest
index 5593e65..402c745 100644
--- a/sys-apps/iproute2/Manifest
+++ b/sys-apps/iproute2/Manifest
@@ -6,3 +6,4 @@ DIST iproute2-3.8.0.tar.xz 407608 SHA256 579145749f1aaf60e7c7a5de24b7f00fa2200a9
 DIST iproute2-4.0.0.tar.xz 459364 SHA256 5cd06eb1050b858b308b65705725042bb566fd261135e35a73dafb48cd632618 SHA512 8e0587ed484a9697af99b4f37b460fddd28136b3c19898a11809b1e8ca9a75a18dcc83bc512f5b74361e6128732e69a3e66b3a62c38a5ae5f13c3e18af186be4 WHIRLPOOL 6abdf2b4587abd7a73d2b7692a4bb478ac379dc3a27f564ad78e34f25f06ae5dd9e0e4873c6510d30767a398375dcdcd2da777412c725885e0c3d4bd89c71a9b
 DIST iproute2-4.1.0.tar.xz 495312 SHA256 d1326696c6a8f81ba66aaf48d858005cf280c81d3284d8d2c99748e3d0746146 SHA512 81faa393a2c7bf5286d7b54817646fb3763d66fbda8b6902e137061827fa1d54d58e9e4fb4f8415222f5adc1b0bec77b6ecf94d1b7cc11834283593208fb4209 WHIRLPOOL 938f0f68d74c8c1bef1be005b55b1b652bf74e23671d6fde493819058e1464c0f3931d69d7dbc398f0ed99ce42fa2bcd80c5207fabfdad78389e4e19b8051112
 DIST iproute2-4.1.1.tar.xz 496388 SHA256 73077a989efb934450bd655cbd9aaddaa747cb696c64d0c9a3323768a6a8e66f SHA512 af2e4021faf931d17a67c242c66b4f6a6ce93a69cee5408dd3951d488da511c99d693534e91d0a317bd82dfdcb6a543605cecf2514d512004639db8d17afb93e WHIRLPOOL 24542b56275675609aaad69ca68e89145d4da84ddb2429ae546179a249bcc1213f89168673657966122e01e992763fec053c118fbd69b7db1677ad7be97397b6
+DIST iproute2-4.2.0.tar.xz 506120 SHA256 a4101e743e0da36b55f63353ff489699ddcd634ceca854a9a272346588f30f30 SHA512 a2580cab92ee4c3e78e52bd8b742e9a1f2097815022a392241136b5589dd1de2ff1def9f608e4b5464c57d8f3d50c4361897271db2058683dfdc6984172784c5 WHIRLPOOL f6ae4537cafc2dd70640f602195f509e58613787f82b26dd909d7c36f09e6b256abee5fc6772e6129cfd023d95248ce66b2c6bd223186861203ebcbe2965e43c

diff --git a/sys-apps/iproute2/files/iproute2-4.2.0-no-ipv6.patch b/sys-apps/iproute2/files/iproute2-4.2.0-no-ipv6.patch
new file mode 100644
index 0000000..b29e1aa
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-4.2.0-no-ipv6.patch
@@ -0,0 +1,37 @@
+--- iproute2-4.2.0/ip/ipmonitor.c
++++ iproute2-4.2.0/ip/ipmonitor.c
+@@ -115,7 +115,6 @@
+ 	}
+ 	if (n->nlmsg_type == RTM_NEWPREFIX) {
+ 		print_headers(fp, "[PREFIX]", ctrl);
+-		print_prefix(who, n, arg);
+ 		return 0;
+ 	}
+ 	if (n->nlmsg_type == RTM_NEWRULE || n->nlmsg_type == RTM_DELRULE) {
+--- iproute2-4.2.0/ip/iptunnel.c
++++ iproute2-4.2.0/ip/iptunnel.c
+@@ -637,13 +637,6 @@
+ 		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 protocol family: %d\n", preferred_family);
+ 		exit(-1);
+--- iproute2-4.2.0/ip/Makefile
++++ iproute2-4.2.0/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 iptoken.o \
++    rtm_map.o iptunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \
++    ipmaddr.o ipmonitor.o ipmroute.o iptuntap.o iptoken.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 link_vti.o link_vti6.o \

diff --git a/sys-apps/iproute2/iproute2-4.2.0.ebuild b/sys-apps/iproute2/iproute2-4.2.0.ebuild
new file mode 100644
index 0000000..7ab34a1
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-4.2.0.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils toolchain-funcs flag-o-matic multilib
+
+if [[ ${PV} == "9999" ]] ; then
+	EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
+	inherit git-2
+else
+	SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+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 selinux"
+
+# We could make libmnl optional, but it's tiny, so eh
+RDEPEND="!net-misc/arpd
+	!minimal? ( net-libs/libmnl )
+	iptables? ( >=net-firewall/iptables-1.4.20:= )
+	berkdb? ( sys-libs/db:= )
+	atm? ( net-dialup/linux-atm )
+	selinux? ( sys-libs/libselinux )"
+# We require newer linux-headers for ipset support #549948 and some defines #553876
+DEPEND="${RDEPEND}
+	app-arch/xz-utils
+	iptables? ( virtual/pkgconfig )
+	sys-devel/bison
+	sys-devel/flex
+	>=sys-kernel/linux-headers-3.16
+	elibc_glibc? ( >=sys-libs/glibc-2.7 )"
+
+src_prepare() {
+	epatch "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
+	use ipv6 || epatch "${FILESDIR}"/${PN}-4.2.0-no-ipv6.patch #326849
+
+	sed -i \
+		-e '/^CC =/d' \
+		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
+		-e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
+		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+		-e "/^WFLAGS/s:-Werror::" \
+		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
+		Makefile || die
+
+	# Use /run instead of /var/run.
+	sed -i \
+		-e 's:/var/run:/run:g' \
+		include/namespace.h \
+		man/man8/ip-netns.8 || die
+
+	# build against system headers
+	rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
+	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
+
+	# 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 ip:' Makefile
+}
+
+src_configure() {
+	tc-export AR CC PKG_CONFIG
+
+	# This sure is ugly.  Should probably move into toolchain-funcs at some point.
+	local setns
+	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)
+	# We've locked in recent enough kernel headers #549948
+	TC_CONFIG_IPSET := y
+	HAVE_MNL      := $(usex minimal n y)
+	HAVE_SELINUX  := $(usex selinux y n)
+	IP_CONFIG_SETNS := ${setns}
+	# Use correct iptables dir, #144265 #293709
+	IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
+	EOF
+}
+
+src_install() {
+	if use minimal ; then
+		into /
+		dosbin tc/tc
+		dobin ip/ip
+		return 0
+	fi
+
+	emake \
+		DESTDIR="${D}" \
+		LIBDIR="${EPREFIX}"/$(get_libdir) \
+		SBINDIR="${EPREFIX}"/sbin \
+		CONFDIR="${EPREFIX}"/etc/iproute2 \
+		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
+		MANDIR="${EPREFIX}"/usr/share/man \
+		ARPDDIR="${EPREFIX}"/var/lib/arpd \
+		install
+
+	rm "${ED}"/usr/share/doc/${PF}/*.{sgml,tex} || die #455988
+
+	dodir /bin
+	mv "${ED}"/{s,}bin/ip || die #330115
+
+	dolib.a lib/libnetlink.a
+	insinto /usr/include
+	doins include/libnetlink.h
+	# This local header pulls in a lot of linux headers it
+	# doesn't directly need.  Delete this header that requires
+	# linux-headers-3.8 until that goes stable.  #467716
+	sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
+
+	if use berkdb ; then
+		dodir /var/lib/arpd
+		# bug 47482, arpd doesn't need to be in /sbin
+		dodir /usr/bin
+		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
+	fi
+}


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/files/, sys-apps/iproute2/
@ 2016-05-19  8:24 Lars Wendler
  0 siblings, 0 replies; 18+ messages in thread
From: Lars Wendler @ 2016-05-19  8:24 UTC (permalink / raw
  To: gentoo-commits

commit:     35e3e89c04762093859a91288dc2f5b5e6484387
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu May 19 08:15:24 2016 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu May 19 08:24:28 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35e3e89c

sys-apps/iproute2: Bump to version 4.6.0

Package-Manager: portage-2.2.28
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 sys-apps/iproute2/Manifest                         |   1 +
 .../files/iproute2-4.5.0-no-iptables.patch         |  42 +++++++
 sys-apps/iproute2/iproute2-4.6.0.ebuild            | 139 +++++++++++++++++++++
 3 files changed, 182 insertions(+)

diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest
index b301d50..8f925d2 100644
--- a/sys-apps/iproute2/Manifest
+++ b/sys-apps/iproute2/Manifest
@@ -9,3 +9,4 @@ DIST iproute2-4.2.0.tar.xz 506120 SHA256 a4101e743e0da36b55f63353ff489699ddcd634
 DIST iproute2-4.3.0.tar.xz 525364 SHA256 f03b1188dd6c039512424de82ff7a8f3b446680bd4e908ff42a7b9b137422995 SHA512 14736158e76cef3dfc3af1a881faf97901bce6dcc9ffe52de92c8a64ae466f2c8ceaa32349553215dbe371115e7cd5cedcbf9922a0d72da9e7ebe3a73fac3687 WHIRLPOOL cd772090f20bbb50e4556c609f28a07acc60ff344989f2ad112c13e1dbc6f60b09e9f5bc6bd29322b1b1635b6266d70aff1aa8f5c37ed458ae569697b7401c0e
 DIST iproute2-4.4.0.tar.xz 528552 SHA256 bc91c367288a19f78ef800cd6840363be1f22da8436fbae88e1a7250490d6514 SHA512 48236fc6103a55d977efa4f93ad7fdfc0944df975ce771d57fd3dcfb13b761b0c05dbe749978ac86c7a471d023bee62a2f1648a6ca75f50da9252acfde174b69 WHIRLPOOL 7e90c98805e12b28de284bb998e5a27cf524a78d0bd7632c0d49a7ddff8f11f5229ac6867076e9fea6f21b6b31360bddb21138673d94de766bdf7324a09bc013
 DIST iproute2-4.5.0.tar.xz 554500 SHA256 3f15292f53e465cb5bd6652961343ca64eb6936309ae75be5d5a541435bc494a SHA512 d12be24cf7a1102be8e449d1e95fa67b784d505e98fcf2f18caedf0136fb378dc439f74a75bc0d6ef5b2893e5ca1968e122054404c1f4d1a212aeb0fba1c5860 WHIRLPOOL dc660bde36fed126b27fb69a59c02405b5299b92a6b519ebdce74d817f88be82114bb10217ca34bbc26a89e664ff243e606a84bcb00db41088bce824542def40
+DIST iproute2-4.6.0.tar.xz 570960 SHA256 74fc6a8ad085be095a159f8158bbaf385b42af9e101619f233f1ae466829d406 SHA512 1e3868ced65012da6724744eb15e6bb8e2c5bf8d7a46cf2b655526de1a9e1224c7b7e9bd4a88e40516b5648955987eb9001600ca5afbd507bc664f92b51ede9f WHIRLPOOL 1b0ff7988d6d5567137aca9d41e2cc3183f3620f8b874113ff9e6ca9508349550e388e423c54b165e73ed54ccb7a366ef8d032a930f27722eccbd5ff6879032e

diff --git a/sys-apps/iproute2/files/iproute2-4.5.0-no-iptables.patch b/sys-apps/iproute2/files/iproute2-4.5.0-no-iptables.patch
new file mode 100644
index 0000000..7ed9dfb
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-4.5.0-no-iptables.patch
@@ -0,0 +1,42 @@
+--- iproute2-4.5.0/configure~	2016-03-14 23:02:31.000000000 +0000
++++ iproute2-4.5.0/configure	2016-03-17 13:24:17.634743197 +0000
+@@ -169,10 +169,25 @@
+ 
+ check_ipt()
+ {
+-	if ! grep TC_CONFIG_XT Config > /dev/null
++	if grep -q TC_CONFIG_XT Config
+ 	then
++		return
++	fi
++
++	cat >$TMPDIR/ipttest.c <<EOF
++#include <iptables.h>
++int main() { return 0; }
++EOF
++
++	if $CC -std=c90 -I$INCLUDE $IPTC -o $TMPDIR/ipttest $TMPDIR/ipttest.c $IPTL \
++		$(${PKG_CONFIG} libiptc --cflags --libs 2>/dev/null) -ldl >/dev/null 2>&1
++	then
++		echo "TC_CONFIG_IPT:=y" >>Config
+ 		echo "using iptables"
++	else
++		echo "no"
+ 	fi
++	rm -f $TMPDIR/ipttest.c $TMPDIR/ipttest
+ }
+ 
+ check_ipt_lib_dir()
+--- iproute2-4.5.0/tc/Makefile~	2016-03-14 23:02:31.000000000 +0000
++++ iproute2-4.5.0/tc/Makefile	2016-03-17 13:18:18.686689985 +0000
+@@ -88,7 +88,9 @@
+ 	CFLAGS += -DTC_CONFIG_XT_H
+ 	TCSO += m_xt_old.so
+     else
+-      TCMODULES += m_ipt.o
++      ifeq ($(TC_CONFIG_IPT),y)
++        TCMODULES += m_ipt.o
++      endif
+     endif
+   endif
+ endif

diff --git a/sys-apps/iproute2/iproute2-4.6.0.ebuild b/sys-apps/iproute2/iproute2-4.6.0.ebuild
new file mode 100644
index 0000000..6eaaa3e
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-4.6.0.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils toolchain-funcs flag-o-matic multilib
+
+if [[ ${PV} == "9999" ]] ; then
+	EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
+	inherit git-2
+else
+	SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+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 selinux"
+
+# We could make libmnl optional, but it's tiny, so eh
+RDEPEND="!net-misc/arpd
+	!minimal? ( net-libs/libmnl )
+	iptables? ( >=net-firewall/iptables-1.4.20:= )
+	berkdb? ( sys-libs/db:= )
+	atm? ( net-dialup/linux-atm )
+	selinux? ( sys-libs/libselinux )"
+# We require newer linux-headers for ipset support #549948 and some defines #553876
+DEPEND="${RDEPEND}
+	app-arch/xz-utils
+	iptables? ( virtual/pkgconfig )
+	sys-devel/bison
+	sys-devel/flex
+	>=sys-kernel/linux-headers-3.16
+	elibc_glibc? ( >=sys-libs/glibc-2.7 )"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
+	"${FILESDIR}"/${PN}-4.5.0-no-iptables.patch #577464
+)
+
+src_prepare() {
+	if ! use ipv6 ; then
+		PATCHES+=(
+			"${FILESDIR}"/${PN}-4.2.0-no-ipv6.patch #326849
+		)
+	fi
+
+	epatch "${PATCHES[@]}"
+
+	sed -i \
+		-e '/^CC =/d' \
+		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
+		-e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
+		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+		-e "/^WFLAGS/s:-Werror::" \
+		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
+		Makefile || die
+
+	# Use /run instead of /var/run.
+	sed -i \
+		-e 's:/var/run:/run:g' \
+		include/namespace.h \
+		man/man8/ip-netns.8 || die
+
+	# build against system headers
+	rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
+	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
+
+	use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
+}
+
+src_configure() {
+	tc-export AR CC PKG_CONFIG
+
+	# This sure is ugly.  Should probably move into toolchain-funcs at some point.
+	local setns
+	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)
+	# We've locked in recent enough kernel headers #549948
+	TC_CONFIG_IPSET := y
+	HAVE_BERKELEY_DB := $(usex berkdb y n)
+	HAVE_MNL      := $(usex minimal n y)
+	HAVE_SELINUX  := $(usex selinux y n)
+	IP_CONFIG_SETNS := ${setns}
+	# Use correct iptables dir, #144265 #293709
+	IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
+	EOF
+}
+
+src_install() {
+	if use minimal ; then
+		into /
+		dosbin tc/tc
+		dobin ip/ip
+		return 0
+	fi
+
+	emake \
+		DESTDIR="${D}" \
+		LIBDIR="${EPREFIX}"/$(get_libdir) \
+		SBINDIR="${EPREFIX}"/sbin \
+		CONFDIR="${EPREFIX}"/etc/iproute2 \
+		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
+		MANDIR="${EPREFIX}"/usr/share/man \
+		ARPDDIR="${EPREFIX}"/var/lib/arpd \
+		install
+
+	rm "${ED}"/usr/share/doc/${PF}/*.{sgml,tex} || die #455988
+
+	dodir /bin
+	mv "${ED}"/{s,}bin/ip || die #330115
+
+	dolib.a lib/libnetlink.a
+	insinto /usr/include
+	doins include/libnetlink.h
+	# This local header pulls in a lot of linux headers it
+	# doesn't directly need.  Delete this header that requires
+	# linux-headers-3.8 until that goes stable.  #467716
+	sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
+
+	if use berkdb ; then
+		dodir /var/lib/arpd
+		# bug 47482, arpd doesn't need to be in /sbin
+		dodir /usr/bin
+		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
+	fi
+}


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/files/, sys-apps/iproute2/
@ 2017-07-29 20:55 Joshua Kinard
  0 siblings, 0 replies; 18+ messages in thread
From: Joshua Kinard @ 2017-07-29 20:55 UTC (permalink / raw
  To: gentoo-commits

commit:     347824aee8c54d6668a7e14980af3b46e72a57e7
Author:     Joshua Kinard <kumba <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 29 20:48:59 2017 +0000
Commit:     Joshua Kinard <kumba <AT> gentoo <DOT> org>
CommitDate: Sat Jul 29 20:50:10 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=347824ae

sys-apps/iproute2: Fix compile error w/ sys-libs/uclibc-ng

Local compatibility fix for sys-apps/iproute2-4.12.0 under a
sys-libs/uclibc-ng system where netinet/in.h is missing a definition
for 'IPPROTO_MH'.

Signed-off-by: Joshua Kinard <kumba <AT> gentoo.org>
Package-Manager: Portage-2.3.6, Repoman-2.3.3

 .../iproute2-4.12.0-uclibc-ng-add-ipproto_mh.patch | 38 ++++++++++++++++++++++
 sys-apps/iproute2/iproute2-4.12.0.ebuild           |  8 +++++
 2 files changed, 46 insertions(+)

diff --git a/sys-apps/iproute2/files/iproute2-4.12.0-uclibc-ng-add-ipproto_mh.patch b/sys-apps/iproute2/files/iproute2-4.12.0-uclibc-ng-add-ipproto_mh.patch
new file mode 100644
index 00000000000..48cae701438
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-4.12.0-uclibc-ng-add-ipproto_mh.patch
@@ -0,0 +1,38 @@
+From 2ac2f416072d9968a9ea2dd9f48168223a1147b0 Mon Sep 17 00:00:00 2001
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Tue, 18 Jul 2017 14:09:06 +0300
+Subject: [PATCH] Fix build with uClibc-ng
+
+Add a local definition for IPPROTO_MH to fix build with uClibc-ng. As of
+version 1.0.25, the uClibc-ng netinet/in.h header does not provide this
+definition. The kernel provided definition is masked by libc-compat.h. Add
+this local fix until uClibc-ng syncs netinet/in.h with glibc.
+
+This partially reverts upstream commit a9ae195a2169 (xfrm: get #define's from
+linux includes)
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+Upstream status: non upstreamable; local uClibc-ng compatibility fix
+---
+ ip/xfrm.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/ip/xfrm.h b/ip/xfrm.h
+index 54d80ce5e949..50b85550fb45 100644
+--- a/ip/xfrm.h
++++ b/ip/xfrm.h
+@@ -30,6 +30,10 @@
+ #include <linux/xfrm.h>
+ #include <linux/ipsec.h>
+ 
++#ifndef IPPROTO_MH
++# define IPPROTO_MH     135
++#endif
++
+ #define XFRMS_RTA(x)  ((struct rtattr*)(((char*)(x)) + NLMSG_ALIGN(sizeof(struct xfrm_usersa_info))))
+ #define XFRMS_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct xfrm_usersa_info))
+ 
+-- 
+2.13.2
+

diff --git a/sys-apps/iproute2/iproute2-4.12.0.ebuild b/sys-apps/iproute2/iproute2-4.12.0.ebuild
index 92f6ddaa6ff..3443e720d92 100644
--- a/sys-apps/iproute2/iproute2-4.12.0.ebuild
+++ b/sys-apps/iproute2/iproute2-4.12.0.ebuild
@@ -51,6 +51,14 @@ src_prepare() {
 		)
 	fi
 
+	# Local uclibc-ng compat fix until uclibc-ng upstream can sync
+	# netinet/in.h with glibc.  Resolves #626546.
+	if use elibc_uclibc ; then
+		PATCHES+=(
+			"${FILESDIR}"/${PN}-4.12.0-uclibc-ng-add-ipproto_mh.patch
+		)
+	fi
+
 	epatch "${PATCHES[@]}"
 
 	sed -i \


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/files/, sys-apps/iproute2/
@ 2018-01-07 22:39 Robin H. Johnson
  0 siblings, 0 replies; 18+ messages in thread
From: Robin H. Johnson @ 2018-01-07 22:39 UTC (permalink / raw
  To: gentoo-commits

commit:     041fdf910f7dda041d1f01f6538fc7550ad830b7
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  7 22:36:48 2018 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sun Jan  7 22:39:35 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=041fdf91

sys-apps/iproute2: fix libmnl/libelf/libselinux automagic.

libmnl, libelf, libselinux were being linked automagically.
Fix by improving Makefiles.

Tested on:
- USE='-minimal -iptables'
- USE='-minimal  iptables'
- USE=' minimal -iptables'
- USE=' minimal  iptables' (reported by broken per bug)

Closes: https://bugs.gentoo.org/643722
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
Package-Manager: Portage-2.3.16, Repoman-2.3.6

 .../files/iproute2-4.14.1-configure-nomagic.patch  | 196 +++++++++++++++++++++
 sys-apps/iproute2/iproute2-4.14.1-r3.ebuild        | 152 ++++++++++++++++
 2 files changed, 348 insertions(+)

diff --git a/sys-apps/iproute2/files/iproute2-4.14.1-configure-nomagic.patch b/sys-apps/iproute2/files/iproute2-4.14.1-configure-nomagic.patch
new file mode 100644
index 00000000000..919249b8392
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-4.14.1-configure-nomagic.patch
@@ -0,0 +1,196 @@
+The hand-rolled configure script, for multiple options (selinux,mnl,elf), sets
+a variable as well as modifying CFLAGS & LDLIBS.
+
+If config.mk is later amended to disable a feature, the CFLAGS/LDLIBS tweaks
+are still in place.
+
+Push the CFLAGS/LDLIBS changes into new conditional Makefile code, so that they
+are only passed when correctly needed.
+
+Prior Gentoo testcase for reproduction:
+USE=minimal ebuild ... compile.
+- Linking with libelf & libmnl based only on presence.
+- Links based on libselinux based only on presence.
+
+Closes: https://bugs.gentoo.org/643722
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+diff -Nuar --exclude '*~' --exclude '.*.swp' --exclude '*.orig' iproute2-4.14.1.orig/bridge/Makefile iproute2-4.14.1/bridge/Makefile
+--- iproute2-4.14.1.orig/bridge/Makefile	2017-11-13 10:09:57.000000000 -0800
++++ iproute2-4.14.1/bridge/Makefile	2018-01-07 14:24:23.350726423 -0800
+@@ -1,6 +1,7 @@
+ BROBJ = bridge.o fdb.o monitor.o link.o mdb.o vlan.o
+ 
+ include ../config.mk
++include ../config.include
+ 
+ all: bridge
+ 
+diff -Nuar --exclude '*~' --exclude '.*.swp' --exclude '*.orig' iproute2-4.14.1.orig/config.include iproute2-4.14.1/config.include
+--- iproute2-4.14.1.orig/config.include	1969-12-31 16:00:00.000000000 -0800
++++ iproute2-4.14.1/config.include	2018-01-07 14:25:34.406126921 -0800
+@@ -0,0 +1,22 @@
++# We can only modify CFLAGS/LDLIBS after all the config options are known.
++ifeq ($(IP_CONFIG_SETNS),y)
++	CFLAGS += $(IP_CONFIG_SETNS_CFLAGS)
++endif
++ifeq ($(HAVE_ELF),y)
++	CFLAGS += $(HAVE_ELF_CFLAGS)
++	LDLIBS += $(HAVE_ELF_LDLIBS)
++endif
++ifeq ($(HAVE_SELINUX),y)
++	CFLAGS += $(HAVE_SELINUX_CFLAGS)
++	LDLIBS += $(HAVE_SELINUX_LDLIBS)
++endif
++ifeq ($(HAVE_MNL),y)
++	CFLAGS += $(HAVE_MNL_CFLAGS)
++	LDLIBS += $(HAVE_MNL_LDLIBS)
++endif
++
++# Rules can only be declared after all variables in them are known.
++%.o: %.c
++	$(QUIET_CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
++
++# vim: ft=make:
+diff -Nuar --exclude '*~' --exclude '.*.swp' --exclude '*.orig' iproute2-4.14.1.orig/configure iproute2-4.14.1/configure
+--- iproute2-4.14.1.orig/configure	2017-11-13 10:09:57.000000000 -0800
++++ iproute2-4.14.1/configure	2018-01-07 14:25:49.242419367 -0800
+@@ -223,7 +223,7 @@
+     then
+ 	echo "IP_CONFIG_SETNS:=y" >>$CONFIG
+ 	echo "yes"
+-	echo "CFLAGS += -DHAVE_SETNS" >>$CONFIG
++	echo "IP_CONFIG_SETNS_CFLAGS += -DHAVE_SETNS" >>$CONFIG
+     else
+ 	echo "no"
+     fi
+@@ -268,8 +268,8 @@
+ 	echo "HAVE_ELF:=y" >>$CONFIG
+ 	echo "yes"
+ 
+-	echo 'CFLAGS += -DHAVE_ELF' `${PKG_CONFIG} libelf --cflags` >> $CONFIG
+-	echo 'LDLIBS += ' `${PKG_CONFIG} libelf --libs` >>$CONFIG
++	echo 'HAVE_ELF_CFLAGS += -DHAVE_ELF' `${PKG_CONFIG} libelf --cflags` >> $CONFIG
++	echo 'HAVE_ELF_LDLIBS += ' `${PKG_CONFIG} libelf --libs` >>$CONFIG
+     else
+ 	echo "no"
+     fi
+@@ -283,8 +283,8 @@
+ 		echo "HAVE_SELINUX:=y" >>$CONFIG
+ 		echo "yes"
+ 
+-		echo 'LDLIBS +=' `${PKG_CONFIG} --libs libselinux` >>$CONFIG
+-		echo 'CFLAGS += -DHAVE_SELINUX' `${PKG_CONFIG} --cflags libselinux` >>$CONFIG
++		echo 'HAVE_SELINUX_CFLAGS += -DHAVE_SELINUX' `${PKG_CONFIG} --cflags libselinux` >>$CONFIG
++		echo 'HAVE_SELINUX_LDLIBS +=' `${PKG_CONFIG} --libs libselinux` >>$CONFIG
+ 	else
+ 		echo "no"
+ 	fi
+@@ -297,8 +297,8 @@
+ 		echo "HAVE_MNL:=y" >>$CONFIG
+ 		echo "yes"
+ 
+-		echo 'CFLAGS += -DHAVE_LIBMNL' `${PKG_CONFIG} libmnl --cflags` >>$CONFIG
+-		echo 'LDLIBS +=' `${PKG_CONFIG} libmnl --libs` >> $CONFIG
++		echo 'HAVE_MNL_CFLAGS += -DHAVE_LIBMNL' `${PKG_CONFIG} libmnl --cflags` >>$CONFIG
++		echo 'HAVE_MNL_LDLIBS +=' `${PKG_CONFIG} libmnl --libs` >> $CONFIG
+ 	else
+ 		echo "no"
+ 	fi
+@@ -425,7 +425,3 @@
+ echo -n "docs:"
+ check_docs
+ echo
+-
+-echo >> $CONFIG
+-echo "%.o: %.c" >> $CONFIG
+-echo '	$(QUIET_CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<' >> $CONFIG
+diff -Nuar --exclude '*~' --exclude '.*.swp' --exclude '*.orig' iproute2-4.14.1.orig/devlink/Makefile iproute2-4.14.1/devlink/Makefile
+--- iproute2-4.14.1.orig/devlink/Makefile	2017-11-13 10:09:57.000000000 -0800
++++ iproute2-4.14.1/devlink/Makefile	2018-01-07 14:24:23.351726442 -0800
+@@ -1,4 +1,5 @@
+ include ../config.mk
++include ../config.include
+ 
+ ifeq ($(HAVE_MNL),y)
+ 
+diff -Nuar --exclude '*~' --exclude '.*.swp' --exclude '*.orig' iproute2-4.14.1.orig/genl/Makefile iproute2-4.14.1/genl/Makefile
+--- iproute2-4.14.1.orig/genl/Makefile	2017-11-13 10:09:57.000000000 -0800
++++ iproute2-4.14.1/genl/Makefile	2018-01-07 14:24:23.351726442 -0800
+@@ -1,6 +1,7 @@
+ GENLOBJ=genl.o
+ 
+ include ../config.mk
++include ../config.include
+ SHARED_LIBS ?= y
+ 
+ CFLAGS += -fno-strict-aliasing
+diff -Nuar --exclude '*~' --exclude '.*.swp' --exclude '*.orig' iproute2-4.14.1.orig/ip/Makefile iproute2-4.14.1/ip/Makefile
+--- iproute2-4.14.1.orig/ip/Makefile	2017-11-13 10:09:57.000000000 -0800
++++ iproute2-4.14.1/ip/Makefile	2018-01-07 14:24:23.351726442 -0800
+@@ -14,6 +14,7 @@
+ RTMONOBJ=rtmon.o
+ 
+ include ../config.mk
++include ../config.include
+ 
+ ALLOBJ=$(IPOBJ) $(RTMONOBJ)
+ SCRIPTS=ifcfg rtpr routel routef
+diff -Nuar --exclude '*~' --exclude '.*.swp' --exclude '*.orig' iproute2-4.14.1.orig/lib/Makefile iproute2-4.14.1/lib/Makefile
+--- iproute2-4.14.1.orig/lib/Makefile	2017-11-13 10:09:57.000000000 -0800
++++ iproute2-4.14.1/lib/Makefile	2018-01-07 14:24:23.351726442 -0800
+@@ -1,4 +1,5 @@
+ include ../config.mk
++include ../config.include
+ 
+ CFLAGS += -fPIC
+ 
+diff -Nuar --exclude '*~' --exclude '.*.swp' --exclude '*.orig' iproute2-4.14.1.orig/misc/Makefile iproute2-4.14.1/misc/Makefile
+--- iproute2-4.14.1.orig/misc/Makefile	2017-11-13 10:09:57.000000000 -0800
++++ iproute2-4.14.1/misc/Makefile	2018-01-07 14:24:23.351726442 -0800
+@@ -4,6 +4,7 @@
+ TARGETS=ss nstat ifstat rtacct lnstat
+ 
+ include ../config.mk
++include ../config.include
+ 
+ ifeq ($(HAVE_BERKELEY_DB),y)
+ 	TARGETS += arpd
+diff -Nuar --exclude '*~' --exclude '.*.swp' --exclude '*.orig' iproute2-4.14.1.orig/netem/Makefile iproute2-4.14.1/netem/Makefile
+--- iproute2-4.14.1.orig/netem/Makefile	2017-11-13 10:09:57.000000000 -0800
++++ iproute2-4.14.1/netem/Makefile	2018-01-07 14:24:23.351726442 -0800
+@@ -1,4 +1,5 @@
+ include ../config.mk
++include ../config.include
+ 
+ DISTGEN = maketable normal pareto paretonormal
+ DISTDATA = normal.dist pareto.dist paretonormal.dist experimental.dist
+diff -Nuar --exclude '*~' --exclude '.*.swp' --exclude '*.orig' iproute2-4.14.1.orig/rdma/Makefile iproute2-4.14.1/rdma/Makefile
+--- iproute2-4.14.1.orig/rdma/Makefile	2017-11-13 10:09:57.000000000 -0800
++++ iproute2-4.14.1/rdma/Makefile	2018-01-07 14:24:23.352726462 -0800
+@@ -1,4 +1,5 @@
+ include ../config.mk
++include ../config.include
+ 
+ ifeq ($(HAVE_MNL),y)
+ 
+diff -Nuar --exclude '*~' --exclude '.*.swp' --exclude '*.orig' iproute2-4.14.1.orig/tc/Makefile iproute2-4.14.1/tc/Makefile
+--- iproute2-4.14.1.orig/tc/Makefile	2017-11-13 10:09:57.000000000 -0800
++++ iproute2-4.14.1/tc/Makefile	2018-01-07 14:24:23.352726462 -0800
+@@ -3,6 +3,7 @@
+        emp_ematch.yacc.o emp_ematch.lex.o
+ 
+ include ../config.mk
++include ../config.include
+ 
+ SHARED_LIBS ?= y
+ 
+diff -Nuar --exclude '*~' --exclude '.*.swp' --exclude '*.orig' iproute2-4.14.1.orig/tipc/Makefile iproute2-4.14.1/tipc/Makefile
+--- iproute2-4.14.1.orig/tipc/Makefile	2017-11-13 10:09:57.000000000 -0800
++++ iproute2-4.14.1/tipc/Makefile	2018-01-07 14:24:23.352726462 -0800
+@@ -1,4 +1,5 @@
+ include ../config.mk
++include ../config.include
+ 
+ ifeq ($(HAVE_MNL),y)
+ 

diff --git a/sys-apps/iproute2/iproute2-4.14.1-r3.ebuild b/sys-apps/iproute2/iproute2-4.14.1-r3.ebuild
new file mode 100644
index 00000000000..d515a2cfe56
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-4.14.1-r3.ebuild
@@ -0,0 +1,152 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs flag-o-matic multilib
+
+if [[ ${PV} == "9999" ]] ; then
+	EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
+	inherit git-r3
+else
+	SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+DESCRIPTION="kernel routing and traffic control utilities"
+HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="atm berkdb +iptables ipv6 minimal selinux"
+
+# We could make libmnl optional, but it's tiny, so eh
+RDEPEND="
+	!net-misc/arpd
+	!minimal? ( net-libs/libmnl virtual/libelf )
+	iptables? ( >=net-firewall/iptables-1.4.20:= )
+	berkdb? ( sys-libs/db:= )
+	atm? ( net-dialup/linux-atm )
+	selinux? ( sys-libs/libselinux )
+"
+# We require newer linux-headers for ipset support #549948 and some defines #553876
+DEPEND="
+	${RDEPEND}
+	app-arch/xz-utils
+	iptables? ( virtual/pkgconfig )
+	>=sys-devel/bison-2.4
+	sys-devel/flex
+	>=sys-kernel/linux-headers-3.16
+	elibc_glibc? ( >=sys-libs/glibc-2.7 )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
+	"${FILESDIR}"/${P}-fix-tc-actions.patch
+	"${FILESDIR}"/${P}-configure-nomagic.patch # bug 643722
+)
+
+src_prepare() {
+	if ! use ipv6 ; then
+		PATCHES+=(
+			"${FILESDIR}"/${PN}-4.11.0-no-ipv6.patch #326849
+		)
+	fi
+
+	default
+
+	sed -i \
+		-e '/^CC :\?=/d' \
+		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
+		-e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
+		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+		-e "/^WFLAGS/s:-Werror::" \
+		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
+		Makefile || die
+
+	# Use /run instead of /var/run.
+	sed -i \
+		-e 's:/var/run:/run:g' \
+		include/namespace.h \
+		man/man8/ip-netns.8 || die
+
+	# build against system headers
+	rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
+	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
+
+	use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
+}
+
+src_configure() {
+	tc-export AR CC PKG_CONFIG
+
+	# This sure is ugly.  Should probably move into toolchain-funcs at some point.
+	local setns
+	pushd "${T}" >/dev/null
+	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
+	${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
+	echo 'int main(){return 0;}' > test.c
+	${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
+	popd >/dev/null
+
+	# run "configure" script first which will create "config.mk"...
+	econf
+
+	# ...now switch on/off requested features via USE flags
+	# this is only useful if the test did not set other things, per bug #643722
+	cat <<-EOF >> config.mk
+	TC_CONFIG_ATM := $(usex atm y n)
+	TC_CONFIG_XT  := $(usex iptables y n)
+	TC_CONFIG_NO_XT := $(usex iptables n y)
+	# We've locked in recent enough kernel headers #549948
+	TC_CONFIG_IPSET := y
+	HAVE_BERKELEY_DB := $(usex berkdb y n)
+	HAVE_MNL      := $(usex minimal n y)
+	HAVE_ELF      := $(usex minimal n y)
+	HAVE_SELINUX  := $(usex selinux y n)
+	IP_CONFIG_SETNS := ${setns}
+	# Use correct iptables dir, #144265 #293709
+	IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
+	EOF
+}
+
+src_compile() {
+	emake V=1
+}
+
+src_install() {
+	if use minimal ; then
+		into /
+		dosbin tc/tc
+		dobin ip/ip
+		return 0
+	fi
+
+	emake \
+		DESTDIR="${D}" \
+		LIBDIR="${EPREFIX%/}"/$(get_libdir) \
+		SBINDIR="${EPREFIX%/}"/sbin \
+		CONFDIR="${EPREFIX%/}"/etc/iproute2 \
+		DOCDIR="${EPREFIX%/}"/usr/share/doc/${PF} \
+		MANDIR="${EPREFIX%/}"/usr/share/man \
+		ARPDDIR="${EPREFIX%/}"/var/lib/arpd \
+		install
+
+	dodir /bin
+	mv "${ED%/}"/{s,}bin/ip || die #330115
+
+	dolib.a lib/libnetlink.a
+	insinto /usr/include
+	doins include/libnetlink.h
+	# This local header pulls in a lot of linux headers it
+	# doesn't directly need.  Delete this header that requires
+	# linux-headers-3.8 until that goes stable.  #467716
+	sed -i '/linux\/netconf.h/d' "${ED%/}"/usr/include/libnetlink.h || die
+
+	if use berkdb ; then
+		dodir /var/lib/arpd
+		# bug 47482, arpd doesn't need to be in /sbin
+		dodir /usr/bin
+		mv "${ED%/}"/sbin/arpd "${ED%/}"/usr/bin/ || die
+	fi
+}


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/files/, sys-apps/iproute2/
@ 2018-04-15 19:24 Thomas Deutschmann
  0 siblings, 0 replies; 18+ messages in thread
From: Thomas Deutschmann @ 2018-04-15 19:24 UTC (permalink / raw
  To: gentoo-commits

commit:     1b28b8a212eb9657e45a074da43dfa8c8721c409
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 15 19:23:39 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Apr 15 19:23:53 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b28b8a2

sys-apps/iproute2: Restore auto inet family support

Closes: https://bugs.gentoo.org/652986
Package-Manager: Portage-2.3.28, Repoman-2.3.9

 .../files/iproute2-4.16.0-keep-family.patch        |  25 ++++
 sys-apps/iproute2/iproute2-4.16.0-r1.ebuild        | 152 +++++++++++++++++++++
 2 files changed, 177 insertions(+)

diff --git a/sys-apps/iproute2/files/iproute2-4.16.0-keep-family.patch b/sys-apps/iproute2/files/iproute2-4.16.0-keep-family.patch
new file mode 100644
index 00000000000..d2940c9e927
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-4.16.0-keep-family.patch
@@ -0,0 +1,25 @@
+Bug: https://bugs.gentoo.org/652986
+
+https://marc.info/?l=linux-netdev&m=152363743818340&w=2
+
+--- a/lib/utils.c
++++ b/lib/utils.c
+@@ -568,7 +568,7 @@ static int __get_addr_1(inet_prefix *addr, const char *name, int family)
+ 	if (strcmp(name, "default") == 0) {
+ 		if ((family == AF_DECnet) || (family == AF_MPLS))
+ 			return -1;
+-		addr->family = (family != AF_UNSPEC) ? family : AF_INET;
++		addr->family = family;
+ 		addr->bytelen = af_byte_len(addr->family);
+ 		addr->bitlen = -2;
+ 		addr->flags |= PREFIXLEN_SPECIFIED;
+@@ -579,7 +579,7 @@ static int __get_addr_1(inet_prefix *addr, const char *name, int family)
+ 	    strcmp(name, "any") == 0) {
+ 		if ((family == AF_DECnet) || (family == AF_MPLS))
+ 			return -1;
+-		addr->family = AF_UNSPEC;
++		addr->family = family;
+ 		addr->bytelen = 0;
+ 		addr->bitlen = -2;
+ 		return 0;
+-- 

diff --git a/sys-apps/iproute2/iproute2-4.16.0-r1.ebuild b/sys-apps/iproute2/iproute2-4.16.0-r1.ebuild
new file mode 100644
index 00000000000..944adb2f1ff
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-4.16.0-r1.ebuild
@@ -0,0 +1,152 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs flag-o-matic multilib
+
+if [[ ${PV} == "9999" ]] ; then
+	EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
+	inherit git-r3
+else
+	SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+DESCRIPTION="kernel routing and traffic control utilities"
+HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="atm berkdb elf +iptables ipv6 minimal selinux"
+
+# We could make libmnl optional, but it's tiny, so eh
+RDEPEND="
+	!net-misc/arpd
+	!minimal? ( net-libs/libmnl )
+	elf? ( virtual/libelf )
+	iptables? ( >=net-firewall/iptables-1.4.20:= )
+	berkdb? ( sys-libs/db:= )
+	atm? ( net-dialup/linux-atm )
+	selinux? ( sys-libs/libselinux )
+"
+# We require newer linux-headers for ipset support #549948 and some defines #553876
+DEPEND="
+	${RDEPEND}
+	app-arch/xz-utils
+	iptables? ( virtual/pkgconfig )
+	>=sys-devel/bison-2.4
+	sys-devel/flex
+	>=sys-kernel/linux-headers-3.16
+	elibc_glibc? ( >=sys-libs/glibc-2.7 )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
+	"${FILESDIR}"/${PN}-4.16.0-configure-nomagic.patch # bug 643722
+	"${FILESDIR}"/${P}-keep-family.patch # bug 652986
+)
+
+src_prepare() {
+	if ! use ipv6 ; then
+		PATCHES+=(
+			"${FILESDIR}"/${PN}-4.11.0-no-ipv6.patch #326849
+		)
+	fi
+
+	default
+
+	sed -i \
+		-e '/^CC :\?=/d' \
+		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
+		-e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
+		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
+		Makefile || die
+
+	# Use /run instead of /var/run.
+	sed -i \
+		-e 's:/var/run:/run:g' \
+		include/namespace.h \
+		man/man8/ip-netns.8 || die
+
+	# build against system headers
+	rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
+	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
+
+	use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
+}
+
+src_configure() {
+	tc-export AR CC PKG_CONFIG
+
+	# This sure is ugly.  Should probably move into toolchain-funcs at some point.
+	local setns
+	pushd "${T}" >/dev/null
+	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
+	${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
+	echo 'int main(){return 0;}' > test.c
+	${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
+	popd >/dev/null
+
+	# run "configure" script first which will create "config.mk"...
+	econf
+
+	# ...now switch on/off requested features via USE flags
+	# this is only useful if the test did not set other things, per bug #643722
+	cat <<-EOF >> config.mk
+	TC_CONFIG_ATM := $(usex atm y n)
+	TC_CONFIG_XT  := $(usex iptables y n)
+	TC_CONFIG_NO_XT := $(usex iptables n y)
+	# We've locked in recent enough kernel headers #549948
+	TC_CONFIG_IPSET := y
+	HAVE_BERKELEY_DB := $(usex berkdb y n)
+	HAVE_MNL      := $(usex minimal n y)
+	HAVE_ELF      := $(usex elf y n)
+	HAVE_SELINUX  := $(usex selinux y n)
+	IP_CONFIG_SETNS := ${setns}
+	# Use correct iptables dir, #144265 #293709
+	IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
+	EOF
+}
+
+src_compile() {
+	emake V=1
+}
+
+src_install() {
+	if use minimal ; then
+		into /
+		dosbin tc/tc
+		dobin ip/ip
+		return 0
+	fi
+
+	emake \
+		DESTDIR="${D}" \
+		LIBDIR="${EPREFIX%/}"/$(get_libdir) \
+		SBINDIR="${EPREFIX%/}"/sbin \
+		CONFDIR="${EPREFIX%/}"/etc/iproute2 \
+		DOCDIR="${EPREFIX%/}"/usr/share/doc/${PF} \
+		MANDIR="${EPREFIX%/}"/usr/share/man \
+		ARPDDIR="${EPREFIX%/}"/var/lib/arpd \
+		install
+
+	dodir /bin
+	mv "${ED%/}"/{s,}bin/ip || die #330115
+
+	dolib.a lib/libnetlink.a
+	insinto /usr/include
+	doins include/libnetlink.h
+	# This local header pulls in a lot of linux headers it
+	# doesn't directly need.  Delete this header that requires
+	# linux-headers-3.8 until that goes stable.  #467716
+	sed -i '/linux\/netconf.h/d' "${ED%/}"/usr/include/libnetlink.h || die
+
+	if use berkdb ; then
+		dodir /var/lib/arpd
+		# bug 47482, arpd doesn't need to be in /sbin
+		dodir /usr/bin
+		mv "${ED%/}"/sbin/arpd "${ED%/}"/usr/bin/ || die
+	fi
+}


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/files/, sys-apps/iproute2/
@ 2018-08-14  8:04 Lars Wendler
  0 siblings, 0 replies; 18+ messages in thread
From: Lars Wendler @ 2018-08-14  8:04 UTC (permalink / raw
  To: gentoo-commits

commit:     906d0f8f2dec23d5deaed51a858335752e4a6ee0
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 14 08:02:09 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Aug 14 08:02:09 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=906d0f8f

sys-apps/iproute2: Removed old.

Package-Manager: Portage-2.3.46, Repoman-2.3.10

 sys-apps/iproute2/Manifest                         |  10 --
 .../iproute2-4.12.0-uclibc-ng-add-ipproto_mh.patch |  38 ------
 .../files/iproute2-4.16.0-keep-family.patch        |  25 ----
 .../files/iproute2-4.5.0-no-iptables.patch         |  42 ------
 sys-apps/iproute2/iproute2-4.10.0.ebuild           | 143 -------------------
 sys-apps/iproute2/iproute2-4.11.0.ebuild           | 143 -------------------
 sys-apps/iproute2/iproute2-4.12.0.ebuild           | 151 --------------------
 sys-apps/iproute2/iproute2-4.13.0.ebuild           | 151 --------------------
 sys-apps/iproute2/iproute2-4.15.0.ebuild           | 151 --------------------
 sys-apps/iproute2/iproute2-4.16.0-r1.ebuild        | 152 ---------------------
 sys-apps/iproute2/iproute2-4.5.0.ebuild            | 133 ------------------
 sys-apps/iproute2/iproute2-4.6.0.ebuild            | 143 -------------------
 sys-apps/iproute2/iproute2-4.7.0.ebuild            | 143 -------------------
 sys-apps/iproute2/iproute2-4.8.0.ebuild            | 143 -------------------
 14 files changed, 1568 deletions(-)

diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest
index 4c796379a60..ea7c4696ca0 100644
--- a/sys-apps/iproute2/Manifest
+++ b/sys-apps/iproute2/Manifest
@@ -1,15 +1,5 @@
-DIST iproute2-4.10.0.tar.xz 626944 BLAKE2B 8d37ae67785cd4a3110f989b0ac635c1cbdc8258afeba5894b58dfcee49fdd9a4c86d8c1693ee5c5a933ce54396dbfed054dbf7fb4888c08563c36c13c282a65 SHA512 e54477e167455e7ef5da4adc168d63eaa96091b63dc987fffe918cbb005eceed18a62283ca99ee2512dc0e960f47ae21b39ffbe399c1612fd9cea147c34c581b
-DIST iproute2-4.11.0.tar.xz 657100 BLAKE2B 9782adc8240796bba1a96bce6b6d7a8a611cc8a313f39fca459cba8bed32468a575d3739d030bcb5c632f8a58aa3117f0fde180e24ff0f01b4c75348691414e0 SHA512 e6cc3dbe2779670a752ab346c1a432b496033448d1645aa0161b3f7b683b3f9939ab09db12199b794cc64dff257faaf0d151046feea9031a6139176e08b4f4fa
-DIST iproute2-4.12.0.tar.xz 662424 BLAKE2B 6c6608d4a157e46932834c09e91d6a786a04c45cb9458bdc4616a9393c9007208cbda2a8254b3b704001543328e42b10dfacaa78a4087cfe3f3bf0d26b1ca573 SHA512 275147f71e7c4698654f0d6d0981ab42f6f108066508c15cfcd5d9e0d3aaf8d33291968d9f06cb03f5494d801cfabf8d53308aaf56fc4fa92c52b137e970a3b0
-DIST iproute2-4.13.0.tar.xz 670340 BLAKE2B 379072c0865e8960b46065454e9bdf3a9cb7af45b32a2fff8e89bef8d60e837419bea60df1343b4bb15db624feb3ce4acbe621b4c44405c43fa729e770bb04a3 SHA512 f96d2839aec1f439bfac504c8e3881c063dacbf4c67b15f0e3da9882d2fa013cba33c23602de3eab624e0eecbb911a13967d60bddcdf097f47a580a5a77b5e3a
 DIST iproute2-4.14.1.tar.xz 636876 BLAKE2B 232dbe29b9af516d8345c86c044359d3b0cfe73fb88a2ba1dcd05534b52dea37c9155d2b273a4a0d40b55fba8b5503a0fbe5bc71f37864c0a2ba9d6f08b6bf41 SHA512 e593b68c46ef5f98bd6911ee7beb38388a14935a29fefabdeccc96aa012593b6f3a49b3bb1baed7d77e54f1f4a857172e058b73407f4070f158b8713f44f5d2c
-DIST iproute2-4.15.0.tar.xz 648836 BLAKE2B e7f3a027ec88de7c6ac82c5529b37fdf22311bc9290e71662bc3b1e32d4cb6a1845e2badb961a21b50b5ed1b9d23130e512a011767183f7df1b33eb05101044b SHA512 bcc54b8dc83d7b0e759a2de77eb38fed483d7f7f82698f482e0259000f2f55ba79c556b721730eb999e85c865ad136fd7549304ebe936545e02e848ba7f698bc
-DIST iproute2-4.16.0.tar.xz 661336 BLAKE2B 4efb08c88a60b1bbbeef807c0731e610032bfb11d022562c1df052d324eb43cb25b9523f49730d22a3f92eb06bd5037c70d8ed0b58276a0cf0854a0f82800b64 SHA512 a8fbc92665a8d4ca6ee1e894bfb27373cf6b16dac9e2ab3831e418fcc9b895acc7d6fc64efa0b0e37b3affd4ef8eacf4dae5715536138d6a05c65ad49a2becad
 DIST iproute2-4.17.0.tar.xz 675268 BLAKE2B 3d1455c119c9c56b11a64092c152fcea2b161f571006878215425b95deef779fed523368252ce672a1a70251c019edbe6ff2bdac8c3ee8abab1fb29e2a3c669c SHA512 ccd7fb70afd58f1fcd4e17c38a24607207da853c4d6118fda423efa6e51faad3ad03c4d6d58a579c40ef9c68aaf13b1c455e12b0c36e155712d3d4db3c2ff4b5
 DIST iproute2-4.18.0.tar.xz 692868 BLAKE2B ad40a5fa0aecb7c5eb98c3ee2b3a8da212c4b970ceb5f3781dcf961da249a70424a7c760f0f1a0a7fb2348efc9ac9ab3a9ac28fda3692d26001e2b3521493072 SHA512 c7c8e8e76c78faf63548da641769cf9f51811a308cd8eeec171f5f46423f116ff123033f11a554609825aba6d078c95dbbe36aa7ab23bd8d87b3a0d5100be1a9
 DIST iproute2-4.4.0.tar.xz 528552 BLAKE2B cad90d2734647a5a5e90b0a8b1337656c6480471caa06beee54fb3abd9c3bc64fc21da349d9b8aa0decf6208de325dd37a9e02fd9e994b024f9142dcd229b87c SHA512 48236fc6103a55d977efa4f93ad7fdfc0944df975ce771d57fd3dcfb13b761b0c05dbe749978ac86c7a471d023bee62a2f1648a6ca75f50da9252acfde174b69
-DIST iproute2-4.5.0.tar.xz 554500 BLAKE2B b64933bd0bf572796705ce2559b1c6cf7faf2f9ac11e1a94a09a428b0039216df8b2ce72a9783e84825a12baaa08526f724d385c6c7e5f6a0d86c3d1662ab822 SHA512 d12be24cf7a1102be8e449d1e95fa67b784d505e98fcf2f18caedf0136fb378dc439f74a75bc0d6ef5b2893e5ca1968e122054404c1f4d1a212aeb0fba1c5860
-DIST iproute2-4.6.0.tar.xz 570960 BLAKE2B e49dc56615490aa7d7cec20830b2866c3e00b08a25ab92bf94d30cc1d7e60e5f10982aa379502a0e5279748c9504e67603f0b947376b6d2991838516b55ef4c9 SHA512 1e3868ced65012da6724744eb15e6bb8e2c5bf8d7a46cf2b655526de1a9e1224c7b7e9bd4a88e40516b5648955987eb9001600ca5afbd507bc664f92b51ede9f
-DIST iproute2-4.7.0.tar.xz 589928 BLAKE2B 8230cb410ddf46a57b646fada24b02b7f808915487047bed5b40b4e78eb4efa2563c07f79b5326f0869fbd288e492efbd000f0adb648df8e8da058445bff895d SHA512 dd884b192ede7f165d565dce6819fb7280eda880d4d53e06a604ab20e7ce343ba37847750172fd52061892e9db3d18bd8ae13d37bd4410e50a8f704cb3fe4ece
-DIST iproute2-4.8.0.tar.xz 594636 BLAKE2B 4c4559e310e6854bd258c0191cbf234e9631f2215818775907190622cb818bcb818edd112cda28fd5ef19da964fbfedcf0e38778228c71c27f01ac758211f203 SHA512 9b9db053e5d6ae2e7dd17870a3081ef61788a7eeb07473430e1a26c3c948123d33840bd6bb81b4a553ac6913ea89f02ac2a1b7d52ced65523a43991f03e84f49
 DIST iproute2-4.9.0.tar.xz 613032 BLAKE2B ae8b1bb4d39999e17b3930064e7f18407d0e9172567c2a95e50a0dbdccaeac59e4a880764b61dae9f814ba97092c1d5949e313cfe5d903dadfed26d9b17b03ec SHA512 0d974d7c001eac75def0d90b628e432d9847024843d02a6cd27266ff30e3f7a9c874fa91115da74db5f321c2e815b486a847059ca6df3aa8ea49432ffa39a889

diff --git a/sys-apps/iproute2/files/iproute2-4.12.0-uclibc-ng-add-ipproto_mh.patch b/sys-apps/iproute2/files/iproute2-4.12.0-uclibc-ng-add-ipproto_mh.patch
deleted file mode 100644
index 48cae701438..00000000000
--- a/sys-apps/iproute2/files/iproute2-4.12.0-uclibc-ng-add-ipproto_mh.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 2ac2f416072d9968a9ea2dd9f48168223a1147b0 Mon Sep 17 00:00:00 2001
-From: Baruch Siach <baruch@tkos.co.il>
-Date: Tue, 18 Jul 2017 14:09:06 +0300
-Subject: [PATCH] Fix build with uClibc-ng
-
-Add a local definition for IPPROTO_MH to fix build with uClibc-ng. As of
-version 1.0.25, the uClibc-ng netinet/in.h header does not provide this
-definition. The kernel provided definition is masked by libc-compat.h. Add
-this local fix until uClibc-ng syncs netinet/in.h with glibc.
-
-This partially reverts upstream commit a9ae195a2169 (xfrm: get #define's from
-linux includes)
-
-Signed-off-by: Baruch Siach <baruch@tkos.co.il>
----
-Upstream status: non upstreamable; local uClibc-ng compatibility fix
----
- ip/xfrm.h | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/ip/xfrm.h b/ip/xfrm.h
-index 54d80ce5e949..50b85550fb45 100644
---- a/ip/xfrm.h
-+++ b/ip/xfrm.h
-@@ -30,6 +30,10 @@
- #include <linux/xfrm.h>
- #include <linux/ipsec.h>
- 
-+#ifndef IPPROTO_MH
-+# define IPPROTO_MH     135
-+#endif
-+
- #define XFRMS_RTA(x)  ((struct rtattr*)(((char*)(x)) + NLMSG_ALIGN(sizeof(struct xfrm_usersa_info))))
- #define XFRMS_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct xfrm_usersa_info))
- 
--- 
-2.13.2
-

diff --git a/sys-apps/iproute2/files/iproute2-4.16.0-keep-family.patch b/sys-apps/iproute2/files/iproute2-4.16.0-keep-family.patch
deleted file mode 100644
index d2940c9e927..00000000000
--- a/sys-apps/iproute2/files/iproute2-4.16.0-keep-family.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Bug: https://bugs.gentoo.org/652986
-
-https://marc.info/?l=linux-netdev&m=152363743818340&w=2
-
---- a/lib/utils.c
-+++ b/lib/utils.c
-@@ -568,7 +568,7 @@ static int __get_addr_1(inet_prefix *addr, const char *name, int family)
- 	if (strcmp(name, "default") == 0) {
- 		if ((family == AF_DECnet) || (family == AF_MPLS))
- 			return -1;
--		addr->family = (family != AF_UNSPEC) ? family : AF_INET;
-+		addr->family = family;
- 		addr->bytelen = af_byte_len(addr->family);
- 		addr->bitlen = -2;
- 		addr->flags |= PREFIXLEN_SPECIFIED;
-@@ -579,7 +579,7 @@ static int __get_addr_1(inet_prefix *addr, const char *name, int family)
- 	    strcmp(name, "any") == 0) {
- 		if ((family == AF_DECnet) || (family == AF_MPLS))
- 			return -1;
--		addr->family = AF_UNSPEC;
-+		addr->family = family;
- 		addr->bytelen = 0;
- 		addr->bitlen = -2;
- 		return 0;
--- 

diff --git a/sys-apps/iproute2/files/iproute2-4.5.0-no-iptables.patch b/sys-apps/iproute2/files/iproute2-4.5.0-no-iptables.patch
deleted file mode 100644
index 7ed9dfbad24..00000000000
--- a/sys-apps/iproute2/files/iproute2-4.5.0-no-iptables.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- iproute2-4.5.0/configure~	2016-03-14 23:02:31.000000000 +0000
-+++ iproute2-4.5.0/configure	2016-03-17 13:24:17.634743197 +0000
-@@ -169,10 +169,25 @@
- 
- check_ipt()
- {
--	if ! grep TC_CONFIG_XT Config > /dev/null
-+	if grep -q TC_CONFIG_XT Config
- 	then
-+		return
-+	fi
-+
-+	cat >$TMPDIR/ipttest.c <<EOF
-+#include <iptables.h>
-+int main() { return 0; }
-+EOF
-+
-+	if $CC -std=c90 -I$INCLUDE $IPTC -o $TMPDIR/ipttest $TMPDIR/ipttest.c $IPTL \
-+		$(${PKG_CONFIG} libiptc --cflags --libs 2>/dev/null) -ldl >/dev/null 2>&1
-+	then
-+		echo "TC_CONFIG_IPT:=y" >>Config
- 		echo "using iptables"
-+	else
-+		echo "no"
- 	fi
-+	rm -f $TMPDIR/ipttest.c $TMPDIR/ipttest
- }
- 
- check_ipt_lib_dir()
---- iproute2-4.5.0/tc/Makefile~	2016-03-14 23:02:31.000000000 +0000
-+++ iproute2-4.5.0/tc/Makefile	2016-03-17 13:18:18.686689985 +0000
-@@ -88,7 +88,9 @@
- 	CFLAGS += -DTC_CONFIG_XT_H
- 	TCSO += m_xt_old.so
-     else
--      TCMODULES += m_ipt.o
-+      ifeq ($(TC_CONFIG_IPT),y)
-+        TCMODULES += m_ipt.o
-+      endif
-     endif
-   endif
- endif

diff --git a/sys-apps/iproute2/iproute2-4.10.0.ebuild b/sys-apps/iproute2/iproute2-4.10.0.ebuild
deleted file mode 100644
index 3e1bbf1eafb..00000000000
--- a/sys-apps/iproute2/iproute2-4.10.0.ebuild
+++ /dev/null
@@ -1,143 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit eutils toolchain-funcs flag-o-matic multilib
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-r3
-else
-	SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-fi
-
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb +iptables ipv6 minimal selinux"
-
-# We could make libmnl optional, but it's tiny, so eh
-RDEPEND="
-	!net-misc/arpd
-	!minimal? ( net-libs/libmnl virtual/libelf )
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	berkdb? ( sys-libs/db:= )
-	atm? ( net-dialup/linux-atm )
-	selinux? ( sys-libs/libselinux )
-"
-# We require newer linux-headers for ipset support #549948 and some defines #553876
-DEPEND="
-	${RDEPEND}
-	app-arch/xz-utils
-	iptables? ( virtual/pkgconfig )
-	>=sys-devel/bison-2.4
-	sys-devel/flex
-	>=sys-kernel/linux-headers-3.16
-	elibc_glibc? ( >=sys-libs/glibc-2.7 )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-)
-
-src_prepare() {
-	if ! use ipv6 ; then
-		PATCHES+=(
-			"${FILESDIR}"/${PN}-4.2.0-no-ipv6.patch #326849
-		)
-	fi
-
-	epatch "${PATCHES[@]}"
-
-	sed -i \
-		-e '/^CC :\?=/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
-		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
-		-e "/^WFLAGS/s:-Werror::" \
-		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
-		Makefile || die
-
-	# Use /run instead of /var/run.
-	sed -i \
-		-e 's:/var/run:/run:g' \
-		include/namespace.h \
-		man/man8/ip-netns.8 || die
-
-	# build against system headers
-	rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
-
-	use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
-}
-
-src_configure() {
-	tc-export AR CC PKG_CONFIG
-
-	# This sure is ugly.  Should probably move into toolchain-funcs at some point.
-	local setns
-	pushd "${T}" >/dev/null
-	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
-	echo 'int main(){return 0;}' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} ${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)
-	TC_CONFIG_NO_XT := $(usex iptables n y)
-	# We've locked in recent enough kernel headers #549948
-	TC_CONFIG_IPSET := y
-	HAVE_BERKELEY_DB := $(usex berkdb y n)
-	HAVE_MNL      := $(usex minimal n y)
-	HAVE_ELF      := $(usex minimal n y)
-	HAVE_SELINUX  := $(usex selinux y n)
-	IP_CONFIG_SETNS := ${setns}
-	# Use correct iptables dir, #144265 #293709
-	IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
-	EOF
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		dobin ip/ip
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		LIBDIR="${EPREFIX}"/$(get_libdir) \
-		SBINDIR="${EPREFIX}"/sbin \
-		CONFDIR="${EPREFIX}"/etc/iproute2 \
-		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
-		MANDIR="${EPREFIX}"/usr/share/man \
-		ARPDDIR="${EPREFIX}"/var/lib/arpd \
-		install
-
-	rm "${ED}"/usr/share/doc/${PF}/*.{sgml,tex} || die #455988
-
-	dodir /bin
-	mv "${ED}"/{s,}bin/ip || die #330115
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-	# This local header pulls in a lot of linux headers it
-	# doesn't directly need.  Delete this header that requires
-	# linux-headers-3.8 until that goes stable.  #467716
-	sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
-
-	if use berkdb ; then
-		dodir /var/lib/arpd
-		# bug 47482, arpd doesn't need to be in /sbin
-		dodir /usr/bin
-		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
-	fi
-}

diff --git a/sys-apps/iproute2/iproute2-4.11.0.ebuild b/sys-apps/iproute2/iproute2-4.11.0.ebuild
deleted file mode 100644
index 9c796a2680d..00000000000
--- a/sys-apps/iproute2/iproute2-4.11.0.ebuild
+++ /dev/null
@@ -1,143 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit eutils toolchain-funcs flag-o-matic multilib
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-r3
-else
-	SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-fi
-
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb +iptables ipv6 minimal selinux"
-
-# We could make libmnl optional, but it's tiny, so eh
-RDEPEND="
-	!net-misc/arpd
-	!minimal? ( net-libs/libmnl virtual/libelf )
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	berkdb? ( sys-libs/db:= )
-	atm? ( net-dialup/linux-atm )
-	selinux? ( sys-libs/libselinux )
-"
-# We require newer linux-headers for ipset support #549948 and some defines #553876
-DEPEND="
-	${RDEPEND}
-	app-arch/xz-utils
-	iptables? ( virtual/pkgconfig )
-	>=sys-devel/bison-2.4
-	sys-devel/flex
-	>=sys-kernel/linux-headers-3.16
-	elibc_glibc? ( >=sys-libs/glibc-2.7 )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-)
-
-src_prepare() {
-	if ! use ipv6 ; then
-		PATCHES+=(
-			"${FILESDIR}"/${PN}-4.11.0-no-ipv6.patch #326849
-		)
-	fi
-
-	epatch "${PATCHES[@]}"
-
-	sed -i \
-		-e '/^CC :\?=/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
-		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
-		-e "/^WFLAGS/s:-Werror::" \
-		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
-		Makefile || die
-
-	# Use /run instead of /var/run.
-	sed -i \
-		-e 's:/var/run:/run:g' \
-		include/namespace.h \
-		man/man8/ip-netns.8 || die
-
-	# build against system headers
-	rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
-
-	use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
-}
-
-src_configure() {
-	tc-export AR CC PKG_CONFIG
-
-	# This sure is ugly.  Should probably move into toolchain-funcs at some point.
-	local setns
-	pushd "${T}" >/dev/null
-	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
-	echo 'int main(){return 0;}' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} ${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)
-	TC_CONFIG_NO_XT := $(usex iptables n y)
-	# We've locked in recent enough kernel headers #549948
-	TC_CONFIG_IPSET := y
-	HAVE_BERKELEY_DB := $(usex berkdb y n)
-	HAVE_MNL      := $(usex minimal n y)
-	HAVE_ELF      := $(usex minimal n y)
-	HAVE_SELINUX  := $(usex selinux y n)
-	IP_CONFIG_SETNS := ${setns}
-	# Use correct iptables dir, #144265 #293709
-	IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
-	EOF
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		dobin ip/ip
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		LIBDIR="${EPREFIX}"/$(get_libdir) \
-		SBINDIR="${EPREFIX}"/sbin \
-		CONFDIR="${EPREFIX}"/etc/iproute2 \
-		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
-		MANDIR="${EPREFIX}"/usr/share/man \
-		ARPDDIR="${EPREFIX}"/var/lib/arpd \
-		install
-
-	rm "${ED}"/usr/share/doc/${PF}/*.{sgml,tex} || die #455988
-
-	dodir /bin
-	mv "${ED}"/{s,}bin/ip || die #330115
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-	# This local header pulls in a lot of linux headers it
-	# doesn't directly need.  Delete this header that requires
-	# linux-headers-3.8 until that goes stable.  #467716
-	sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
-
-	if use berkdb ; then
-		dodir /var/lib/arpd
-		# bug 47482, arpd doesn't need to be in /sbin
-		dodir /usr/bin
-		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
-	fi
-}

diff --git a/sys-apps/iproute2/iproute2-4.12.0.ebuild b/sys-apps/iproute2/iproute2-4.12.0.ebuild
deleted file mode 100644
index 7826991362c..00000000000
--- a/sys-apps/iproute2/iproute2-4.12.0.ebuild
+++ /dev/null
@@ -1,151 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit eutils toolchain-funcs flag-o-matic multilib
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-r3
-else
-	SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-fi
-
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb +iptables ipv6 minimal selinux"
-
-# We could make libmnl optional, but it's tiny, so eh
-RDEPEND="
-	!net-misc/arpd
-	!minimal? ( net-libs/libmnl virtual/libelf )
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	berkdb? ( sys-libs/db:= )
-	atm? ( net-dialup/linux-atm )
-	selinux? ( sys-libs/libselinux )
-"
-# We require newer linux-headers for ipset support #549948 and some defines #553876
-DEPEND="
-	${RDEPEND}
-	app-arch/xz-utils
-	iptables? ( virtual/pkgconfig )
-	>=sys-devel/bison-2.4
-	sys-devel/flex
-	>=sys-kernel/linux-headers-3.16
-	elibc_glibc? ( >=sys-libs/glibc-2.7 )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-)
-
-src_prepare() {
-	if ! use ipv6 ; then
-		PATCHES+=(
-			"${FILESDIR}"/${PN}-4.11.0-no-ipv6.patch #326849
-		)
-	fi
-
-	# Local uclibc-ng compat fix until uclibc-ng upstream can sync
-	# netinet/in.h with glibc.  Resolves #626546.
-	if use elibc_uclibc ; then
-		PATCHES+=(
-			"${FILESDIR}"/${PN}-4.12.0-uclibc-ng-add-ipproto_mh.patch
-		)
-	fi
-
-	epatch "${PATCHES[@]}"
-
-	sed -i \
-		-e '/^CC :\?=/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
-		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
-		-e "/^WFLAGS/s:-Werror::" \
-		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
-		Makefile || die
-
-	# Use /run instead of /var/run.
-	sed -i \
-		-e 's:/var/run:/run:g' \
-		include/namespace.h \
-		man/man8/ip-netns.8 || die
-
-	# build against system headers
-	rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
-
-	use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
-}
-
-src_configure() {
-	tc-export AR CC PKG_CONFIG
-
-	# This sure is ugly.  Should probably move into toolchain-funcs at some point.
-	local setns
-	pushd "${T}" >/dev/null
-	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
-	echo 'int main(){return 0;}' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} ${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)
-	TC_CONFIG_NO_XT := $(usex iptables n y)
-	# We've locked in recent enough kernel headers #549948
-	TC_CONFIG_IPSET := y
-	HAVE_BERKELEY_DB := $(usex berkdb y n)
-	HAVE_MNL      := $(usex minimal n y)
-	HAVE_ELF      := $(usex minimal n y)
-	HAVE_SELINUX  := $(usex selinux y n)
-	IP_CONFIG_SETNS := ${setns}
-	# Use correct iptables dir, #144265 #293709
-	IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
-	EOF
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		dobin ip/ip
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		LIBDIR="${EPREFIX}"/$(get_libdir) \
-		SBINDIR="${EPREFIX}"/sbin \
-		CONFDIR="${EPREFIX}"/etc/iproute2 \
-		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
-		MANDIR="${EPREFIX}"/usr/share/man \
-		ARPDDIR="${EPREFIX}"/var/lib/arpd \
-		install
-
-	rm "${ED}"/usr/share/doc/${PF}/*.{sgml,tex} || die #455988
-
-	dodir /bin
-	mv "${ED}"/{s,}bin/ip || die #330115
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-	# This local header pulls in a lot of linux headers it
-	# doesn't directly need.  Delete this header that requires
-	# linux-headers-3.8 until that goes stable.  #467716
-	sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
-
-	if use berkdb ; then
-		dodir /var/lib/arpd
-		# bug 47482, arpd doesn't need to be in /sbin
-		dodir /usr/bin
-		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
-	fi
-}

diff --git a/sys-apps/iproute2/iproute2-4.13.0.ebuild b/sys-apps/iproute2/iproute2-4.13.0.ebuild
deleted file mode 100644
index f71b0646c33..00000000000
--- a/sys-apps/iproute2/iproute2-4.13.0.ebuild
+++ /dev/null
@@ -1,151 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit toolchain-funcs flag-o-matic multilib
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-r3
-else
-	SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-fi
-
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb +iptables ipv6 minimal selinux"
-
-# We could make libmnl optional, but it's tiny, so eh
-RDEPEND="
-	!net-misc/arpd
-	!minimal? ( net-libs/libmnl virtual/libelf )
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	berkdb? ( sys-libs/db:= )
-	atm? ( net-dialup/linux-atm )
-	selinux? ( sys-libs/libselinux )
-"
-# We require newer linux-headers for ipset support #549948 and some defines #553876
-DEPEND="
-	${RDEPEND}
-	app-arch/xz-utils
-	iptables? ( virtual/pkgconfig )
-	>=sys-devel/bison-2.4
-	sys-devel/flex
-	>=sys-kernel/linux-headers-3.16
-	elibc_glibc? ( >=sys-libs/glibc-2.7 )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-)
-
-src_prepare() {
-	if ! use ipv6 ; then
-		PATCHES+=(
-			"${FILESDIR}"/${PN}-4.11.0-no-ipv6.patch #326849
-		)
-	fi
-
-	# Local uclibc-ng compat fix until uclibc-ng upstream can sync
-	# netinet/in.h with glibc.  Resolves #626546.
-	if use elibc_uclibc ; then
-		PATCHES+=(
-			"${FILESDIR}"/${PN}-4.12.0-uclibc-ng-add-ipproto_mh.patch
-		)
-	fi
-
-	default
-
-	sed -i \
-		-e '/^CC :\?=/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
-		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
-		-e "/^WFLAGS/s:-Werror::" \
-		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
-		Makefile || die
-
-	# Use /run instead of /var/run.
-	sed -i \
-		-e 's:/var/run:/run:g' \
-		include/namespace.h \
-		man/man8/ip-netns.8 || die
-
-	# build against system headers
-	rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
-
-	use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
-}
-
-src_configure() {
-	tc-export AR CC PKG_CONFIG
-
-	# This sure is ugly.  Should probably move into toolchain-funcs at some point.
-	local setns
-	pushd "${T}" >/dev/null
-	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
-	echo 'int main(){return 0;}' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} ${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)
-	TC_CONFIG_NO_XT := $(usex iptables n y)
-	# We've locked in recent enough kernel headers #549948
-	TC_CONFIG_IPSET := y
-	HAVE_BERKELEY_DB := $(usex berkdb y n)
-	HAVE_MNL      := $(usex minimal n y)
-	HAVE_ELF      := $(usex minimal n y)
-	HAVE_SELINUX  := $(usex selinux y n)
-	IP_CONFIG_SETNS := ${setns}
-	# Use correct iptables dir, #144265 #293709
-	IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
-	EOF
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		dobin ip/ip
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		LIBDIR="${EPREFIX%/}"/$(get_libdir) \
-		SBINDIR="${EPREFIX%/}"/sbin \
-		CONFDIR="${EPREFIX%/}"/etc/iproute2 \
-		DOCDIR="${EPREFIX%/}"/usr/share/doc/${PF} \
-		MANDIR="${EPREFIX%/}"/usr/share/man \
-		ARPDDIR="${EPREFIX%/}"/var/lib/arpd \
-		install
-
-	rm "${ED%/}"/usr/share/doc/${PF}/*.{sgml,tex} || die #455988
-
-	dodir /bin
-	mv "${ED%/}"/{s,}bin/ip || die #330115
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-	# This local header pulls in a lot of linux headers it
-	# doesn't directly need.  Delete this header that requires
-	# linux-headers-3.8 until that goes stable.  #467716
-	sed -i '/linux\/netconf.h/d' "${ED%/}"/usr/include/libnetlink.h || die
-
-	if use berkdb ; then
-		dodir /var/lib/arpd
-		# bug 47482, arpd doesn't need to be in /sbin
-		dodir /usr/bin
-		mv "${ED%/}"/sbin/arpd "${ED%/}"/usr/bin/ || die
-	fi
-}

diff --git a/sys-apps/iproute2/iproute2-4.15.0.ebuild b/sys-apps/iproute2/iproute2-4.15.0.ebuild
deleted file mode 100644
index 34856824f57..00000000000
--- a/sys-apps/iproute2/iproute2-4.15.0.ebuild
+++ /dev/null
@@ -1,151 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit toolchain-funcs flag-o-matic multilib
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-r3
-else
-	SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-fi
-
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb elf +iptables ipv6 minimal selinux"
-
-# We could make libmnl optional, but it's tiny, so eh
-RDEPEND="
-	!net-misc/arpd
-	!minimal? ( net-libs/libmnl )
-	elf? ( virtual/libelf )
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	berkdb? ( sys-libs/db:= )
-	atm? ( net-dialup/linux-atm )
-	selinux? ( sys-libs/libselinux )
-"
-# We require newer linux-headers for ipset support #549948 and some defines #553876
-DEPEND="
-	${RDEPEND}
-	app-arch/xz-utils
-	iptables? ( virtual/pkgconfig )
-	>=sys-devel/bison-2.4
-	sys-devel/flex
-	>=sys-kernel/linux-headers-3.16
-	elibc_glibc? ( >=sys-libs/glibc-2.7 )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-	"${FILESDIR}"/${PN}-4.14.1-configure-nomagic.patch # bug 643722
-)
-
-src_prepare() {
-	if ! use ipv6 ; then
-		PATCHES+=(
-			"${FILESDIR}"/${PN}-4.11.0-no-ipv6.patch #326849
-		)
-	fi
-
-	default
-
-	sed -i \
-		-e '/^CC :\?=/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
-		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
-		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
-		Makefile || die
-
-	# Use /run instead of /var/run.
-	sed -i \
-		-e 's:/var/run:/run:g' \
-		include/namespace.h \
-		man/man8/ip-netns.8 || die
-
-	# build against system headers
-	rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
-
-	use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
-}
-
-src_configure() {
-	tc-export AR CC PKG_CONFIG
-
-	# This sure is ugly.  Should probably move into toolchain-funcs at some point.
-	local setns
-	pushd "${T}" >/dev/null
-	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
-	echo 'int main(){return 0;}' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
-	popd >/dev/null
-
-	# run "configure" script first which will create "config.mk"...
-	econf
-
-	# ...now switch on/off requested features via USE flags
-	# this is only useful if the test did not set other things, per bug #643722
-	cat <<-EOF >> config.mk
-	TC_CONFIG_ATM := $(usex atm y n)
-	TC_CONFIG_XT  := $(usex iptables y n)
-	TC_CONFIG_NO_XT := $(usex iptables n y)
-	# We've locked in recent enough kernel headers #549948
-	TC_CONFIG_IPSET := y
-	HAVE_BERKELEY_DB := $(usex berkdb y n)
-	HAVE_MNL      := $(usex minimal n y)
-	HAVE_ELF      := $(usex elf y n)
-	HAVE_SELINUX  := $(usex selinux y n)
-	IP_CONFIG_SETNS := ${setns}
-	# Use correct iptables dir, #144265 #293709
-	IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
-	EOF
-}
-
-src_compile() {
-	emake V=1
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		dobin ip/ip
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		LIBDIR="${EPREFIX%/}"/$(get_libdir) \
-		SBINDIR="${EPREFIX%/}"/sbin \
-		CONFDIR="${EPREFIX%/}"/etc/iproute2 \
-		DOCDIR="${EPREFIX%/}"/usr/share/doc/${PF} \
-		MANDIR="${EPREFIX%/}"/usr/share/man \
-		ARPDDIR="${EPREFIX%/}"/var/lib/arpd \
-		install
-
-	dodir /bin
-	mv "${ED%/}"/{s,}bin/ip || die #330115
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-	# This local header pulls in a lot of linux headers it
-	# doesn't directly need.  Delete this header that requires
-	# linux-headers-3.8 until that goes stable.  #467716
-	sed -i '/linux\/netconf.h/d' "${ED%/}"/usr/include/libnetlink.h || die
-
-	if use berkdb ; then
-		dodir /var/lib/arpd
-		# bug 47482, arpd doesn't need to be in /sbin
-		dodir /usr/bin
-		mv "${ED%/}"/sbin/arpd "${ED%/}"/usr/bin/ || die
-	fi
-}

diff --git a/sys-apps/iproute2/iproute2-4.16.0-r1.ebuild b/sys-apps/iproute2/iproute2-4.16.0-r1.ebuild
deleted file mode 100644
index 944adb2f1ff..00000000000
--- a/sys-apps/iproute2/iproute2-4.16.0-r1.ebuild
+++ /dev/null
@@ -1,152 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit toolchain-funcs flag-o-matic multilib
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-r3
-else
-	SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-fi
-
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb elf +iptables ipv6 minimal selinux"
-
-# We could make libmnl optional, but it's tiny, so eh
-RDEPEND="
-	!net-misc/arpd
-	!minimal? ( net-libs/libmnl )
-	elf? ( virtual/libelf )
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	berkdb? ( sys-libs/db:= )
-	atm? ( net-dialup/linux-atm )
-	selinux? ( sys-libs/libselinux )
-"
-# We require newer linux-headers for ipset support #549948 and some defines #553876
-DEPEND="
-	${RDEPEND}
-	app-arch/xz-utils
-	iptables? ( virtual/pkgconfig )
-	>=sys-devel/bison-2.4
-	sys-devel/flex
-	>=sys-kernel/linux-headers-3.16
-	elibc_glibc? ( >=sys-libs/glibc-2.7 )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-	"${FILESDIR}"/${PN}-4.16.0-configure-nomagic.patch # bug 643722
-	"${FILESDIR}"/${P}-keep-family.patch # bug 652986
-)
-
-src_prepare() {
-	if ! use ipv6 ; then
-		PATCHES+=(
-			"${FILESDIR}"/${PN}-4.11.0-no-ipv6.patch #326849
-		)
-	fi
-
-	default
-
-	sed -i \
-		-e '/^CC :\?=/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
-		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
-		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
-		Makefile || die
-
-	# Use /run instead of /var/run.
-	sed -i \
-		-e 's:/var/run:/run:g' \
-		include/namespace.h \
-		man/man8/ip-netns.8 || die
-
-	# build against system headers
-	rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
-
-	use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
-}
-
-src_configure() {
-	tc-export AR CC PKG_CONFIG
-
-	# This sure is ugly.  Should probably move into toolchain-funcs at some point.
-	local setns
-	pushd "${T}" >/dev/null
-	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
-	echo 'int main(){return 0;}' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
-	popd >/dev/null
-
-	# run "configure" script first which will create "config.mk"...
-	econf
-
-	# ...now switch on/off requested features via USE flags
-	# this is only useful if the test did not set other things, per bug #643722
-	cat <<-EOF >> config.mk
-	TC_CONFIG_ATM := $(usex atm y n)
-	TC_CONFIG_XT  := $(usex iptables y n)
-	TC_CONFIG_NO_XT := $(usex iptables n y)
-	# We've locked in recent enough kernel headers #549948
-	TC_CONFIG_IPSET := y
-	HAVE_BERKELEY_DB := $(usex berkdb y n)
-	HAVE_MNL      := $(usex minimal n y)
-	HAVE_ELF      := $(usex elf y n)
-	HAVE_SELINUX  := $(usex selinux y n)
-	IP_CONFIG_SETNS := ${setns}
-	# Use correct iptables dir, #144265 #293709
-	IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
-	EOF
-}
-
-src_compile() {
-	emake V=1
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		dobin ip/ip
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		LIBDIR="${EPREFIX%/}"/$(get_libdir) \
-		SBINDIR="${EPREFIX%/}"/sbin \
-		CONFDIR="${EPREFIX%/}"/etc/iproute2 \
-		DOCDIR="${EPREFIX%/}"/usr/share/doc/${PF} \
-		MANDIR="${EPREFIX%/}"/usr/share/man \
-		ARPDDIR="${EPREFIX%/}"/var/lib/arpd \
-		install
-
-	dodir /bin
-	mv "${ED%/}"/{s,}bin/ip || die #330115
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-	# This local header pulls in a lot of linux headers it
-	# doesn't directly need.  Delete this header that requires
-	# linux-headers-3.8 until that goes stable.  #467716
-	sed -i '/linux\/netconf.h/d' "${ED%/}"/usr/include/libnetlink.h || die
-
-	if use berkdb ; then
-		dodir /var/lib/arpd
-		# bug 47482, arpd doesn't need to be in /sbin
-		dodir /usr/bin
-		mv "${ED%/}"/sbin/arpd "${ED%/}"/usr/bin/ || die
-	fi
-}

diff --git a/sys-apps/iproute2/iproute2-4.5.0.ebuild b/sys-apps/iproute2/iproute2-4.5.0.ebuild
deleted file mode 100644
index 7556005d049..00000000000
--- a/sys-apps/iproute2/iproute2-4.5.0.ebuild
+++ /dev/null
@@ -1,133 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit eutils toolchain-funcs flag-o-matic multilib
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-r3
-else
-	SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-fi
-
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb +iptables ipv6 minimal selinux"
-
-# We could make libmnl optional, but it's tiny, so eh
-RDEPEND="
-	!net-misc/arpd
-	!minimal? ( net-libs/libmnl virtual/libelf )
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	berkdb? ( sys-libs/db:= )
-	atm? ( net-dialup/linux-atm )
-	selinux? ( sys-libs/libselinux )
-"
-# We require newer linux-headers for ipset support #549948 and some defines #553876
-DEPEND="
-	${RDEPEND}
-	app-arch/xz-utils
-	iptables? ( virtual/pkgconfig )
-	>=sys-devel/bison-2.4
-	sys-devel/flex
-	>=sys-kernel/linux-headers-3.16
-	elibc_glibc? ( >=sys-libs/glibc-2.7 )
-"
-
-src_prepare() {
-	epatch "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-	use ipv6 || epatch "${FILESDIR}"/${PN}-4.2.0-no-ipv6.patch #326849
-
-	sed -i \
-		-e '/^CC :\?=/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
-		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
-		-e "/^WFLAGS/s:-Werror::" \
-		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
-		Makefile || die
-
-	# Use /run instead of /var/run.
-	sed -i \
-		-e 's:/var/run:/run:g' \
-		include/namespace.h \
-		man/man8/ip-netns.8 || die
-
-	# build against system headers
-	rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
-
-	use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
-}
-
-src_configure() {
-	tc-export AR CC PKG_CONFIG
-
-	# This sure is ugly.  Should probably move into toolchain-funcs at some point.
-	local setns
-	pushd "${T}" >/dev/null
-	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
-	echo 'int main(){return 0;}' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} ${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)
-	# We've locked in recent enough kernel headers #549948
-	TC_CONFIG_IPSET := y
-	HAVE_BERKELEY_DB := $(usex berkdb y n)
-	HAVE_MNL      := $(usex minimal n y)
-	HAVE_ELF      := $(usex minimal n y)
-	HAVE_SELINUX  := $(usex selinux y n)
-	IP_CONFIG_SETNS := ${setns}
-	# Use correct iptables dir, #144265 #293709
-	IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
-	EOF
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		dobin ip/ip
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		LIBDIR="${EPREFIX}"/$(get_libdir) \
-		SBINDIR="${EPREFIX}"/sbin \
-		CONFDIR="${EPREFIX}"/etc/iproute2 \
-		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
-		MANDIR="${EPREFIX}"/usr/share/man \
-		ARPDDIR="${EPREFIX}"/var/lib/arpd \
-		install
-
-	rm "${ED}"/usr/share/doc/${PF}/*.{sgml,tex} || die #455988
-
-	dodir /bin
-	mv "${ED}"/{s,}bin/ip || die #330115
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-	# This local header pulls in a lot of linux headers it
-	# doesn't directly need.  Delete this header that requires
-	# linux-headers-3.8 until that goes stable.  #467716
-	sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
-
-	if use berkdb ; then
-		dodir /var/lib/arpd
-		# bug 47482, arpd doesn't need to be in /sbin
-		dodir /usr/bin
-		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
-	fi
-}

diff --git a/sys-apps/iproute2/iproute2-4.6.0.ebuild b/sys-apps/iproute2/iproute2-4.6.0.ebuild
deleted file mode 100644
index 77ed6a8baa9..00000000000
--- a/sys-apps/iproute2/iproute2-4.6.0.ebuild
+++ /dev/null
@@ -1,143 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit eutils toolchain-funcs flag-o-matic multilib
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-r3
-else
-	SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-fi
-
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb +iptables ipv6 minimal selinux"
-
-# We could make libmnl optional, but it's tiny, so eh
-RDEPEND="
-	!net-misc/arpd
-	!minimal? ( net-libs/libmnl virtual/libelf )
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	berkdb? ( sys-libs/db:= )
-	atm? ( net-dialup/linux-atm )
-	selinux? ( sys-libs/libselinux )
-"
-# We require newer linux-headers for ipset support #549948 and some defines #553876
-DEPEND="
-	${RDEPEND}
-	app-arch/xz-utils
-	iptables? ( virtual/pkgconfig )
-	>=sys-devel/bison-2.4
-	sys-devel/flex
-	>=sys-kernel/linux-headers-3.16
-	elibc_glibc? ( >=sys-libs/glibc-2.7 )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-	"${FILESDIR}"/${PN}-4.5.0-no-iptables.patch #577464
-)
-
-src_prepare() {
-	if ! use ipv6 ; then
-		PATCHES+=(
-			"${FILESDIR}"/${PN}-4.2.0-no-ipv6.patch #326849
-		)
-	fi
-
-	epatch "${PATCHES[@]}"
-
-	sed -i \
-		-e '/^CC :\?=/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
-		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
-		-e "/^WFLAGS/s:-Werror::" \
-		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
-		Makefile || die
-
-	# Use /run instead of /var/run.
-	sed -i \
-		-e 's:/var/run:/run:g' \
-		include/namespace.h \
-		man/man8/ip-netns.8 || die
-
-	# build against system headers
-	rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
-
-	use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
-}
-
-src_configure() {
-	tc-export AR CC PKG_CONFIG
-
-	# This sure is ugly.  Should probably move into toolchain-funcs at some point.
-	local setns
-	pushd "${T}" >/dev/null
-	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
-	echo 'int main(){return 0;}' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} ${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)
-	# We've locked in recent enough kernel headers #549948
-	TC_CONFIG_IPSET := y
-	HAVE_BERKELEY_DB := $(usex berkdb y n)
-	HAVE_MNL      := $(usex minimal n y)
-	HAVE_ELF      := $(usex minimal n y)
-	HAVE_SELINUX  := $(usex selinux y n)
-	IP_CONFIG_SETNS := ${setns}
-	# Use correct iptables dir, #144265 #293709
-	IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
-	EOF
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		dobin ip/ip
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		LIBDIR="${EPREFIX}"/$(get_libdir) \
-		SBINDIR="${EPREFIX}"/sbin \
-		CONFDIR="${EPREFIX}"/etc/iproute2 \
-		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
-		MANDIR="${EPREFIX}"/usr/share/man \
-		ARPDDIR="${EPREFIX}"/var/lib/arpd \
-		install
-
-	rm "${ED}"/usr/share/doc/${PF}/*.{sgml,tex} || die #455988
-
-	dodir /bin
-	mv "${ED}"/{s,}bin/ip || die #330115
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-	# This local header pulls in a lot of linux headers it
-	# doesn't directly need.  Delete this header that requires
-	# linux-headers-3.8 until that goes stable.  #467716
-	sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
-
-	if use berkdb ; then
-		dodir /var/lib/arpd
-		# bug 47482, arpd doesn't need to be in /sbin
-		dodir /usr/bin
-		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
-	fi
-}

diff --git a/sys-apps/iproute2/iproute2-4.7.0.ebuild b/sys-apps/iproute2/iproute2-4.7.0.ebuild
deleted file mode 100644
index 77ed6a8baa9..00000000000
--- a/sys-apps/iproute2/iproute2-4.7.0.ebuild
+++ /dev/null
@@ -1,143 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit eutils toolchain-funcs flag-o-matic multilib
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-r3
-else
-	SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-fi
-
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb +iptables ipv6 minimal selinux"
-
-# We could make libmnl optional, but it's tiny, so eh
-RDEPEND="
-	!net-misc/arpd
-	!minimal? ( net-libs/libmnl virtual/libelf )
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	berkdb? ( sys-libs/db:= )
-	atm? ( net-dialup/linux-atm )
-	selinux? ( sys-libs/libselinux )
-"
-# We require newer linux-headers for ipset support #549948 and some defines #553876
-DEPEND="
-	${RDEPEND}
-	app-arch/xz-utils
-	iptables? ( virtual/pkgconfig )
-	>=sys-devel/bison-2.4
-	sys-devel/flex
-	>=sys-kernel/linux-headers-3.16
-	elibc_glibc? ( >=sys-libs/glibc-2.7 )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-	"${FILESDIR}"/${PN}-4.5.0-no-iptables.patch #577464
-)
-
-src_prepare() {
-	if ! use ipv6 ; then
-		PATCHES+=(
-			"${FILESDIR}"/${PN}-4.2.0-no-ipv6.patch #326849
-		)
-	fi
-
-	epatch "${PATCHES[@]}"
-
-	sed -i \
-		-e '/^CC :\?=/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
-		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
-		-e "/^WFLAGS/s:-Werror::" \
-		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
-		Makefile || die
-
-	# Use /run instead of /var/run.
-	sed -i \
-		-e 's:/var/run:/run:g' \
-		include/namespace.h \
-		man/man8/ip-netns.8 || die
-
-	# build against system headers
-	rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
-
-	use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
-}
-
-src_configure() {
-	tc-export AR CC PKG_CONFIG
-
-	# This sure is ugly.  Should probably move into toolchain-funcs at some point.
-	local setns
-	pushd "${T}" >/dev/null
-	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
-	echo 'int main(){return 0;}' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} ${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)
-	# We've locked in recent enough kernel headers #549948
-	TC_CONFIG_IPSET := y
-	HAVE_BERKELEY_DB := $(usex berkdb y n)
-	HAVE_MNL      := $(usex minimal n y)
-	HAVE_ELF      := $(usex minimal n y)
-	HAVE_SELINUX  := $(usex selinux y n)
-	IP_CONFIG_SETNS := ${setns}
-	# Use correct iptables dir, #144265 #293709
-	IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
-	EOF
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		dobin ip/ip
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		LIBDIR="${EPREFIX}"/$(get_libdir) \
-		SBINDIR="${EPREFIX}"/sbin \
-		CONFDIR="${EPREFIX}"/etc/iproute2 \
-		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
-		MANDIR="${EPREFIX}"/usr/share/man \
-		ARPDDIR="${EPREFIX}"/var/lib/arpd \
-		install
-
-	rm "${ED}"/usr/share/doc/${PF}/*.{sgml,tex} || die #455988
-
-	dodir /bin
-	mv "${ED}"/{s,}bin/ip || die #330115
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-	# This local header pulls in a lot of linux headers it
-	# doesn't directly need.  Delete this header that requires
-	# linux-headers-3.8 until that goes stable.  #467716
-	sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
-
-	if use berkdb ; then
-		dodir /var/lib/arpd
-		# bug 47482, arpd doesn't need to be in /sbin
-		dodir /usr/bin
-		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
-	fi
-}

diff --git a/sys-apps/iproute2/iproute2-4.8.0.ebuild b/sys-apps/iproute2/iproute2-4.8.0.ebuild
deleted file mode 100644
index 77ed6a8baa9..00000000000
--- a/sys-apps/iproute2/iproute2-4.8.0.ebuild
+++ /dev/null
@@ -1,143 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit eutils toolchain-funcs flag-o-matic multilib
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-r3
-else
-	SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-fi
-
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb +iptables ipv6 minimal selinux"
-
-# We could make libmnl optional, but it's tiny, so eh
-RDEPEND="
-	!net-misc/arpd
-	!minimal? ( net-libs/libmnl virtual/libelf )
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	berkdb? ( sys-libs/db:= )
-	atm? ( net-dialup/linux-atm )
-	selinux? ( sys-libs/libselinux )
-"
-# We require newer linux-headers for ipset support #549948 and some defines #553876
-DEPEND="
-	${RDEPEND}
-	app-arch/xz-utils
-	iptables? ( virtual/pkgconfig )
-	>=sys-devel/bison-2.4
-	sys-devel/flex
-	>=sys-kernel/linux-headers-3.16
-	elibc_glibc? ( >=sys-libs/glibc-2.7 )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-	"${FILESDIR}"/${PN}-4.5.0-no-iptables.patch #577464
-)
-
-src_prepare() {
-	if ! use ipv6 ; then
-		PATCHES+=(
-			"${FILESDIR}"/${PN}-4.2.0-no-ipv6.patch #326849
-		)
-	fi
-
-	epatch "${PATCHES[@]}"
-
-	sed -i \
-		-e '/^CC :\?=/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
-		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
-		-e "/^WFLAGS/s:-Werror::" \
-		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
-		Makefile || die
-
-	# Use /run instead of /var/run.
-	sed -i \
-		-e 's:/var/run:/run:g' \
-		include/namespace.h \
-		man/man8/ip-netns.8 || die
-
-	# build against system headers
-	rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
-
-	use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
-}
-
-src_configure() {
-	tc-export AR CC PKG_CONFIG
-
-	# This sure is ugly.  Should probably move into toolchain-funcs at some point.
-	local setns
-	pushd "${T}" >/dev/null
-	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
-	echo 'int main(){return 0;}' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} ${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)
-	# We've locked in recent enough kernel headers #549948
-	TC_CONFIG_IPSET := y
-	HAVE_BERKELEY_DB := $(usex berkdb y n)
-	HAVE_MNL      := $(usex minimal n y)
-	HAVE_ELF      := $(usex minimal n y)
-	HAVE_SELINUX  := $(usex selinux y n)
-	IP_CONFIG_SETNS := ${setns}
-	# Use correct iptables dir, #144265 #293709
-	IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
-	EOF
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		dobin ip/ip
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		LIBDIR="${EPREFIX}"/$(get_libdir) \
-		SBINDIR="${EPREFIX}"/sbin \
-		CONFDIR="${EPREFIX}"/etc/iproute2 \
-		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
-		MANDIR="${EPREFIX}"/usr/share/man \
-		ARPDDIR="${EPREFIX}"/var/lib/arpd \
-		install
-
-	rm "${ED}"/usr/share/doc/${PF}/*.{sgml,tex} || die #455988
-
-	dodir /bin
-	mv "${ED}"/{s,}bin/ip || die #330115
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-	# This local header pulls in a lot of linux headers it
-	# doesn't directly need.  Delete this header that requires
-	# linux-headers-3.8 until that goes stable.  #467716
-	sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
-
-	if use berkdb ; then
-		dodir /var/lib/arpd
-		# bug 47482, arpd doesn't need to be in /sbin
-		dodir /usr/bin
-		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
-	fi
-}


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/files/, sys-apps/iproute2/
@ 2018-10-29 22:21 Lars Wendler
  0 siblings, 0 replies; 18+ messages in thread
From: Lars Wendler @ 2018-10-29 22:21 UTC (permalink / raw
  To: gentoo-commits

commit:     2185fdc6724d0cf893fa228ef8e63b3791cae223
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 29 22:18:50 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Oct 29 22:21:06 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2185fdc6

sys-apps/iproute2: Revbumps to fix automagic dep on sys-libs/libcap

Closes: https://bugs.gentoo.org/667644
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 ...tch => iproute2-4.17.0-configure-nomagic.patch} | 68 +++++++++++++---------
 ...te2-4.17.0.ebuild => iproute2-4.17.0-r1.ebuild} |  6 +-
 ...te2-4.19.0.ebuild => iproute2-4.18.0-r1.ebuild} |  6 +-
 ...te2-4.18.0.ebuild => iproute2-4.19.0-r1.ebuild} |  8 ++-
 sys-apps/iproute2/iproute2-9999.ebuild             |  8 ++-
 5 files changed, 60 insertions(+), 36 deletions(-)

diff --git a/sys-apps/iproute2/files/iproute2-4.16.0-configure-nomagic.patch b/sys-apps/iproute2/files/iproute2-4.17.0-configure-nomagic.patch
similarity index 74%
rename from sys-apps/iproute2/files/iproute2-4.16.0-configure-nomagic.patch
rename to sys-apps/iproute2/files/iproute2-4.17.0-configure-nomagic.patch
index 01a1fe2d812..30b5db3bc3c 100644
--- a/sys-apps/iproute2/files/iproute2-4.16.0-configure-nomagic.patch
+++ b/sys-apps/iproute2/files/iproute2-4.17.0-configure-nomagic.patch
@@ -9,16 +9,17 @@ are only passed when correctly needed.
 
 Prior Gentoo testcase for reproduction:
 USE=minimal ebuild ... compile.
-- Linking with libelf & libmnl based only on presence.
+- Linking with libelf, libmnl & libcap based only on presence.
 - Links based on libselinux based only on presence.
 
 Closes: https://bugs.gentoo.org/643722
 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
 
 Forward-ported from v4.14.1 to v4.16.0 by Lars Wendler <polynomial-c@gentoo.org>
+Added libcap to v4.17.0 by Lars Wendler <polynomial-c@gentoo.org>
 
---- iproute2-4.16.0/bridge/Makefile
-+++ iproute2-4.16.0/bridge/Makefile
+--- iproute2-4.17.0/bridge/Makefile
++++ iproute2-4.17.0/bridge/Makefile
 @@ -2,6 +2,7 @@
  BROBJ = bridge.o fdb.o monitor.o link.o mdb.o vlan.o
  
@@ -27,9 +28,9 @@ Forward-ported from v4.14.1 to v4.16.0 by Lars Wendler <polynomial-c@gentoo.org>
  
  all: bridge
  
---- iproute2-4.16.0/config.include
-+++ iproute2-4.16.0/config.include
-@@ -0,0 +1,22 @@
+--- iproute2-4.17.0/config.include
++++ iproute2-4.17.0/config.include
+@@ -0,0 +1,26 @@
 +# We can only modify CFLAGS/LDLIBS after all the config options are known.
 +ifeq ($(IP_CONFIG_SETNS),y)
 +	CFLAGS += $(IP_CONFIG_SETNS_CFLAGS)
@@ -46,14 +47,18 @@ Forward-ported from v4.14.1 to v4.16.0 by Lars Wendler <polynomial-c@gentoo.org>
 +	CFLAGS += $(HAVE_MNL_CFLAGS)
 +	LDLIBS += $(HAVE_MNL_LDLIBS)
 +endif
++ifeq ($(HAVE_CAP),y)
++	CFLAGS += $(HAVE_CAP_CFLAGS)
++	LDLIBS += $(HAVE_CAP_LDLIBS)
++endif
 +
 +# Rules can only be declared after all variables in them are known.
 +%.o: %.c
 +	$(QUIET_CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
 +
 +# vim: ft=make:
---- iproute2-4.16.0/configure
-+++ iproute2-4.16.0/configure
+--- iproute2-4.17.0/configure
++++ iproute2-4.17.0/configure
 @@ -212,7 +212,7 @@
      then
  	echo "IP_CONFIG_SETNS:=y" >>$CONFIG
@@ -96,6 +101,17 @@ Forward-ported from v4.14.1 to v4.16.0 by Lars Wendler <polynomial-c@gentoo.org>
  	else
  		echo "no"
  	fi
+@@ -343,8 +343,8 @@
+ 		echo "HAVE_CAP:=y" >>$CONFIG
+ 		echo "yes"
+ 
+-		echo 'CFLAGS += -DHAVE_LIBCAP' `${PKG_CONFIG} libcap --cflags` >>$CONFIG
+-		echo 'LDLIBS +=' `${PKG_CONFIG} libcap --libs` >> $CONFIG
++		echo 'HAVE_CAP_CFLAGS += -DHAVE_LIBCAP' `${PKG_CONFIG} libcap --cflags` >>$CONFIG
++		echo 'HAVE_CAP_LDLIBS +=' `${PKG_CONFIG} libcap --libs` >> $CONFIG
+ 	else
+ 		echo "no"
+ 	fi
 @@ -426,7 +426,3 @@
  
  echo -n "libcap support: "
@@ -104,8 +120,8 @@ Forward-ported from v4.14.1 to v4.16.0 by Lars Wendler <polynomial-c@gentoo.org>
 -echo >> $CONFIG
 -echo "%.o: %.c" >> $CONFIG
 -echo '	$(QUIET_CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<' >> $CONFIG
---- iproute2-4.16.0/devlink/Makefile
-+++ iproute2-4.16.0/devlink/Makefile
+--- iproute2-4.17.0/devlink/Makefile
++++ iproute2-4.17.0/devlink/Makefile
 @@ -1,5 +1,6 @@
  # SPDX-License-Identifier: GPL-2.0
  include ../config.mk
@@ -113,8 +129,8 @@ Forward-ported from v4.14.1 to v4.16.0 by Lars Wendler <polynomial-c@gentoo.org>
  
  TARGETS :=
  
---- iproute2-4.16.0/genl/Makefile
-+++ iproute2-4.16.0/genl/Makefile
+--- iproute2-4.17.0/genl/Makefile
++++ iproute2-4.17.0/genl/Makefile
 @@ -2,6 +2,7 @@
  GENLOBJ=genl.o
  
@@ -123,8 +139,8 @@ Forward-ported from v4.14.1 to v4.16.0 by Lars Wendler <polynomial-c@gentoo.org>
  SHARED_LIBS ?= y
  
  CFLAGS += -fno-strict-aliasing
---- iproute2-4.16.0/ip/Makefile
-+++ iproute2-4.16.0/ip/Makefile
+--- iproute2-4.17.0/ip/Makefile
++++ iproute2-4.17.0/ip/Makefile
 @@ -15,6 +15,7 @@
  RTMONOBJ=rtmon.o
  
@@ -133,8 +149,8 @@ Forward-ported from v4.14.1 to v4.16.0 by Lars Wendler <polynomial-c@gentoo.org>
  
  ALLOBJ=$(IPOBJ) $(RTMONOBJ)
  SCRIPTS=ifcfg rtpr routel routef
---- iproute2-4.16.0/lib/Makefile
-+++ iproute2-4.16.0/lib/Makefile
+--- iproute2-4.17.0/lib/Makefile
++++ iproute2-4.17.0/lib/Makefile
 @@ -1,5 +1,6 @@
  # SPDX-License-Identifier: GPL-2.0
  include ../config.mk
@@ -142,8 +158,8 @@ Forward-ported from v4.14.1 to v4.16.0 by Lars Wendler <polynomial-c@gentoo.org>
  
  CFLAGS += -fPIC
  
---- iproute2-4.16.0/misc/Makefile
-+++ iproute2-4.16.0/misc/Makefile
+--- iproute2-4.17.0/misc/Makefile
++++ iproute2-4.17.0/misc/Makefile
 @@ -5,6 +5,7 @@
  TARGETS=ss nstat ifstat rtacct lnstat
  
@@ -152,8 +168,8 @@ Forward-ported from v4.14.1 to v4.16.0 by Lars Wendler <polynomial-c@gentoo.org>
  
  ifeq ($(HAVE_BERKELEY_DB),y)
  	TARGETS += arpd
---- iproute2-4.16.0/netem/Makefile
-+++ iproute2-4.16.0/netem/Makefile
+--- iproute2-4.17.0/netem/Makefile
++++ iproute2-4.17.0/netem/Makefile
 @@ -1,5 +1,6 @@
  # SPDX-License-Identifier: GPL-2.0
  include ../config.mk
@@ -161,8 +177,8 @@ Forward-ported from v4.14.1 to v4.16.0 by Lars Wendler <polynomial-c@gentoo.org>
  
  DISTGEN = maketable normal pareto paretonormal
  DISTDATA = normal.dist pareto.dist paretonormal.dist experimental.dist
---- iproute2-4.16.0/rdma/Makefile
-+++ iproute2-4.16.0/rdma/Makefile
+--- iproute2-4.17.0/rdma/Makefile
++++ iproute2-4.17.0/rdma/Makefile
 @@ -1,5 +1,6 @@
  # SPDX-License-Identifier: GPL-2.0
  include ../config.mk
@@ -170,8 +186,8 @@ Forward-ported from v4.14.1 to v4.16.0 by Lars Wendler <polynomial-c@gentoo.org>
  
  TARGETS :=
  
---- iproute2-4.16.0/tc/Makefile
-+++ iproute2-4.16.0/tc/Makefile
+--- iproute2-4.17.0/tc/Makefile
++++ iproute2-4.17.0/tc/Makefile
 @@ -4,6 +4,7 @@
         emp_ematch.yacc.o emp_ematch.lex.o
  
@@ -180,8 +196,8 @@ Forward-ported from v4.14.1 to v4.16.0 by Lars Wendler <polynomial-c@gentoo.org>
  
  SHARED_LIBS ?= y
  
---- iproute2-4.16.0/tipc/Makefile
-+++ iproute2-4.16.0/tipc/Makefile
+--- iproute2-4.17.0/tipc/Makefile
++++ iproute2-4.17.0/tipc/Makefile
 @@ -1,5 +1,6 @@
  # SPDX-License-Identifier: GPL-2.0
  include ../config.mk

diff --git a/sys-apps/iproute2/iproute2-4.17.0.ebuild b/sys-apps/iproute2/iproute2-4.17.0-r1.ebuild
similarity index 95%
rename from sys-apps/iproute2/iproute2-4.17.0.ebuild
rename to sys-apps/iproute2/iproute2-4.17.0-r1.ebuild
index 03a8a55c50a..29261b7f6ae 100644
--- a/sys-apps/iproute2/iproute2-4.17.0.ebuild
+++ b/sys-apps/iproute2/iproute2-4.17.0-r1.ebuild
@@ -18,12 +18,13 @@ HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="atm berkdb elf +iptables ipv6 minimal selinux"
+IUSE="atm berkdb caps elf +iptables ipv6 minimal selinux"
 
 # We could make libmnl optional, but it's tiny, so eh
 RDEPEND="
 	!net-misc/arpd
 	!minimal? ( net-libs/libmnl )
+	caps? ( sys-libs/libcap )
 	elf? ( virtual/libelf )
 	iptables? ( >=net-firewall/iptables-1.4.20:= )
 	berkdb? ( sys-libs/db:= )
@@ -43,7 +44,7 @@ DEPEND="
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-	"${FILESDIR}"/${PN}-4.16.0-configure-nomagic.patch # bug 643722
+	"${FILESDIR}"/${PN}-4.17.0-configure-nomagic.patch # bug 643722
 )
 
 src_prepare() {
@@ -100,6 +101,7 @@ src_configure() {
 	# We've locked in recent enough kernel headers #549948
 	TC_CONFIG_IPSET := y
 	HAVE_BERKELEY_DB := $(usex berkdb y n)
+	HAVE_CAP      := $(usex caps y n)
 	HAVE_MNL      := $(usex minimal n y)
 	HAVE_ELF      := $(usex elf y n)
 	HAVE_SELINUX  := $(usex selinux y n)

diff --git a/sys-apps/iproute2/iproute2-4.19.0.ebuild b/sys-apps/iproute2/iproute2-4.18.0-r1.ebuild
similarity index 95%
rename from sys-apps/iproute2/iproute2-4.19.0.ebuild
rename to sys-apps/iproute2/iproute2-4.18.0-r1.ebuild
index e35ecc5e6ec..fe34c36583b 100644
--- a/sys-apps/iproute2/iproute2-4.19.0.ebuild
+++ b/sys-apps/iproute2/iproute2-4.18.0-r1.ebuild
@@ -18,12 +18,13 @@ HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="atm berkdb elf +iptables ipv6 minimal selinux"
+IUSE="atm berkdb caps elf +iptables ipv6 minimal selinux"
 
 # We could make libmnl optional, but it's tiny, so eh
 RDEPEND="
 	!net-misc/arpd
 	!minimal? ( net-libs/libmnl )
+	caps? ( sys-libs/libcap )
 	elf? ( virtual/libelf )
 	iptables? ( >=net-firewall/iptables-1.4.20:= )
 	berkdb? ( sys-libs/db:= )
@@ -43,7 +44,7 @@ DEPEND="
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-	"${FILESDIR}"/${PN}-4.16.0-configure-nomagic.patch # bug 643722
+	"${FILESDIR}"/${PN}-4.17.0-configure-nomagic.patch # bug 643722
 )
 
 src_prepare() {
@@ -100,6 +101,7 @@ src_configure() {
 	# We've locked in recent enough kernel headers #549948
 	TC_CONFIG_IPSET := y
 	HAVE_BERKELEY_DB := $(usex berkdb y n)
+	HAVE_CAP      := $(usex caps y n)
 	HAVE_MNL      := $(usex minimal n y)
 	HAVE_ELF      := $(usex elf y n)
 	HAVE_SELINUX  := $(usex selinux y n)

diff --git a/sys-apps/iproute2/iproute2-4.18.0.ebuild b/sys-apps/iproute2/iproute2-4.19.0-r1.ebuild
similarity index 94%
rename from sys-apps/iproute2/iproute2-4.18.0.ebuild
rename to sys-apps/iproute2/iproute2-4.19.0-r1.ebuild
index 7d284f1e544..fe34c36583b 100644
--- a/sys-apps/iproute2/iproute2-4.18.0.ebuild
+++ b/sys-apps/iproute2/iproute2-4.19.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -18,12 +18,13 @@ HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="atm berkdb elf +iptables ipv6 minimal selinux"
+IUSE="atm berkdb caps elf +iptables ipv6 minimal selinux"
 
 # We could make libmnl optional, but it's tiny, so eh
 RDEPEND="
 	!net-misc/arpd
 	!minimal? ( net-libs/libmnl )
+	caps? ( sys-libs/libcap )
 	elf? ( virtual/libelf )
 	iptables? ( >=net-firewall/iptables-1.4.20:= )
 	berkdb? ( sys-libs/db:= )
@@ -43,7 +44,7 @@ DEPEND="
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-	"${FILESDIR}"/${PN}-4.16.0-configure-nomagic.patch # bug 643722
+	"${FILESDIR}"/${PN}-4.17.0-configure-nomagic.patch # bug 643722
 )
 
 src_prepare() {
@@ -100,6 +101,7 @@ src_configure() {
 	# We've locked in recent enough kernel headers #549948
 	TC_CONFIG_IPSET := y
 	HAVE_BERKELEY_DB := $(usex berkdb y n)
+	HAVE_CAP      := $(usex caps y n)
 	HAVE_MNL      := $(usex minimal n y)
 	HAVE_ELF      := $(usex elf y n)
 	HAVE_SELINUX  := $(usex selinux y n)

diff --git a/sys-apps/iproute2/iproute2-9999.ebuild b/sys-apps/iproute2/iproute2-9999.ebuild
index c70b80f7038..f9527624933 100644
--- a/sys-apps/iproute2/iproute2-9999.ebuild
+++ b/sys-apps/iproute2/iproute2-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -18,12 +18,13 @@ HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="atm berkdb elf +iptables ipv6 minimal selinux"
+IUSE="atm caps berkdb elf +iptables ipv6 minimal selinux"
 
 # We could make libmnl optional, but it's tiny, so eh
 RDEPEND="
 	!net-misc/arpd
 	!minimal? ( net-libs/libmnl )
+	caps? ( sys-libs/libcap )
 	elf? ( virtual/libelf )
 	iptables? ( >=net-firewall/iptables-1.4.20:= )
 	berkdb? ( sys-libs/db:= )
@@ -43,7 +44,7 @@ DEPEND="
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-	"${FILESDIR}"/${PN}-4.14.1-configure-nomagic.patch # bug 643722
+	"${FILESDIR}"/${PN}-4.17.0-configure-nomagic.patch # bug 643722
 )
 
 src_prepare() {
@@ -101,6 +102,7 @@ src_configure() {
 	# We've locked in recent enough kernel headers #549948
 	TC_CONFIG_IPSET := y
 	HAVE_BERKELEY_DB := $(usex berkdb y n)
+	HAVE_CAP      := $(usex caps y n)
 	HAVE_MNL      := $(usex minimal n y)
 	HAVE_ELF      := $(usex elf y n)
 	HAVE_SELINUX  := $(usex selinux y n)


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/files/, sys-apps/iproute2/
@ 2019-06-11 15:17 Robin H. Johnson
  0 siblings, 0 replies; 18+ messages in thread
From: Robin H. Johnson @ 2019-06-11 15:17 UTC (permalink / raw
  To: gentoo-commits

commit:     ede368ab38940671c718a6b77aa97d52736cad6f
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 11 15:16:49 2019 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Tue Jun 11 15:16:49 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ede368ab

sys-apps/iproute2: musl compilefix

Package-Manager: Portage-2.3.67, Repoman-2.3.12
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 .../files/iproute2-5.1.0-portability.patch         | 32 ++++++++++++++++++++++
 sys-apps/iproute2/iproute2-5.1.0.ebuild            |  1 +
 2 files changed, 33 insertions(+)

diff --git a/sys-apps/iproute2/files/iproute2-5.1.0-portability.patch b/sys-apps/iproute2/files/iproute2-5.1.0-portability.patch
new file mode 100644
index 00000000000..e704f65c113
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-5.1.0-portability.patch
@@ -0,0 +1,32 @@
+From 202d79fcf4e184818bd074f8c06e94e700670898 Mon Sep 17 00:00:00 2001
+From: Jory Pratt <anarchy@gentoo.org>
+Date: Tue, 11 Jun 2019 01:48:01 -0500
+Subject: [PATCH] including sysinfo.h from kernel.h makes no sense whatsoever,
+ but removing it breaks glibc's userspace header, which includes kernel.h
+ instead of sysinfo.h from their sys/sysinfo.h. this seems to be a historical
+ mistake. on musl, including any header that uses kernel.h directly or
+ indirectly plus sys/sysinfo.h will produce a compile error due to
+ redefinition of struct sysinfo. so for now, only include it on glibc in order
+ not to break their headers.
+
+Signed-off-by: Jory Pratt <anarchy@gentoo.org>
+---
+ include/uapi/linux/kernel.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/uapi/linux/kernel.h b/include/uapi/linux/kernel.h
+index d99ffa1..f917115 100644
+--- a/include/uapi/linux/kernel.h
++++ b/include/uapi/linux/kernel.h
+@@ -2,7 +2,9 @@
+ #ifndef _LINUX_KERNEL_H
+ #define _LINUX_KERNEL_H
+ 
++#ifdef __GLIBC__
+ #include <linux/sysinfo.h>
++#endif
+ 
+ /*
+  * 'kernel.h' contains some often-used function prototypes etc
+-- 
+2.22.0

diff --git a/sys-apps/iproute2/iproute2-5.1.0.ebuild b/sys-apps/iproute2/iproute2-5.1.0.ebuild
index 5db7d040eee..f2771e5b49e 100644
--- a/sys-apps/iproute2/iproute2-5.1.0.ebuild
+++ b/sys-apps/iproute2/iproute2-5.1.0.ebuild
@@ -47,6 +47,7 @@ BDEPEND="
 PATCHES=(
 	"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
 	"${FILESDIR}"/${PN}-4.20.0-configure-nomagic.patch # bug 643722
+	"${FILESDIR}"/${PN}-5.1.0-portability.patch
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/files/, sys-apps/iproute2/
@ 2021-02-23 14:55 Lars Wendler
  0 siblings, 0 replies; 18+ messages in thread
From: Lars Wendler @ 2021-02-23 14:55 UTC (permalink / raw
  To: gentoo-commits

commit:     44390e4679901e3c8984e4a54bb2b22898584450
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 23 14:50:51 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Feb 23 14:55:37 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44390e46

sys-apps/iproute2: 5.10.0 revbump to make libbsd dep optional

Package-Manager: Portage-3.0.15, Repoman-3.0.2
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 .../files/iproute2-5.10.0-configure-nomagic.patch  | 226 +++++++++++++++++++++
 sys-apps/iproute2/iproute2-5.10.0-r1.ebuild        | 168 +++++++++++++++
 2 files changed, 394 insertions(+)

diff --git a/sys-apps/iproute2/files/iproute2-5.10.0-configure-nomagic.patch b/sys-apps/iproute2/files/iproute2-5.10.0-configure-nomagic.patch
new file mode 100644
index 00000000000..cf8ca335f21
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-5.10.0-configure-nomagic.patch
@@ -0,0 +1,226 @@
+The hand-rolled configure script, for multiple options (selinux,mnl,elf), sets
+a variable as well as modifying CFLAGS & LDLIBS.
+
+If config.mk is later amended to disable a feature, the CFLAGS/LDLIBS tweaks
+are still in place.
+
+Push the CFLAGS/LDLIBS changes into new conditional Makefile code, so that they
+are only passed when correctly needed.
+
+Prior Gentoo testcase for reproduction:
+USE=minimal ebuild ... compile.
+- Linking with libelf, libmnl & libcap based only on presence.
+- Links based on libselinux based only on presence.
+
+Closes: https://bugs.gentoo.org/643722
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+Forward-ported from v4.14.1 to v4.16.0 by Lars Wendler <polynomial-c@gentoo.org>
+Added libcap to v4.17.0 by Lars Wendler <polynomial-c@gentoo.org>
+Forward-ported from v4.17.0 to v4.20.0 by Lars Wendler <polynomial-c@gentoo.org>
+Forward-ported from v4.20.0 to v5.10.0 by Lars Wendler <polynomial-c@gentoo.org>
+
+--- iproute2-5.10.0/bridge/Makefile
++++ iproute2-5.10.0/bridge/Makefile
+@@ -2,6 +2,7 @@
+ BROBJ = bridge.o fdb.o monitor.o link.o mdb.o vlan.o
+ 
+ include ../config.mk
++include ../config.include
+ 
+ all: bridge
+ 
+--- iproute2-5.10.0/config.include
++++ iproute2-5.10.0/config.include
+@@ -0,0 +1,32 @@
++# We can only modify CFLAGS/LDLIBS after all the config options are known.
++ifeq ($(IP_CONFIG_SETNS),y)
++	CFLAGS += $(IP_CONFIG_SETNS_CFLAGS)
++endif
++ifeq ($(HAVE_ELF),y)
++	CFLAGS += $(HAVE_ELF_CFLAGS)
++	LDLIBS += $(HAVE_ELF_LDLIBS)
++endif
++ifeq ($(HAVE_SELINUX),y)
++	CFLAGS += $(HAVE_SELINUX_CFLAGS)
++	LDLIBS += $(HAVE_SELINUX_LDLIBS)
++endif
++ifeq ($(HAVE_MNL),y)
++	CFLAGS += $(HAVE_MNL_CFLAGS)
++	LDLIBS += $(HAVE_MNL_LDLIBS)
++endif
++ifeq ($(HAVE_CAP),y)
++	CFLAGS += $(HAVE_CAP_CFLAGS)
++	LDLIBS += $(HAVE_CAP_LDLIBS)
++endif
++ifeq ($(HAVE_LIBBSD),y)
++	CFLAGS += $(HAVE_LIBBSD_CFLAGS)
++	LDLIBS += $(HAVE_LIBBSD_LDLIBS)
++else
++	CFLAGS += -DNEED_STRLCPY
++endif
++	
++# Rules can only be declared after all variables in them are known.
++%.o: %.c
++	$(QUIET_CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CPPFLAGS) -c -o $@ $<
++
++# vim: ft=make:
+--- iproute2-5.10.0/configure
++++ iproute2-5.10.0/configure
+@@ -190,7 +190,7 @@
+     if $CC -I$INCLUDE -o $TMPDIR/setnstest $TMPDIR/setnstest.c >/dev/null 2>&1; then
+ 	echo "IP_CONFIG_SETNS:=y" >>$CONFIG
+ 	echo "yes"
+-	echo "CFLAGS += -DHAVE_SETNS" >>$CONFIG
++	echo "IP_CONFIG_SETNS_CFLAGS += -DHAVE_SETNS" >>$CONFIG
+     else
+ 	echo "no"
+     fi
+@@ -233,8 +233,8 @@
+ 	echo "HAVE_ELF:=y" >>$CONFIG
+ 	echo "yes"
+ 
+-	echo 'CFLAGS += -DHAVE_ELF' `${PKG_CONFIG} libelf --cflags` >> $CONFIG
+-	echo 'LDLIBS += ' `${PKG_CONFIG} libelf --libs` >>$CONFIG
++	echo 'HAVE_ELF_CFLAGS += -DHAVE_ELF' `${PKG_CONFIG} libelf --cflags` >> $CONFIG
++	echo 'HAVE_ELF_LDLIBS += ' `${PKG_CONFIG} libelf --libs` >>$CONFIG
+     else
+ 	echo "no"
+     fi
+@@ -247,8 +247,8 @@
+ 		echo "HAVE_SELINUX:=y" >>$CONFIG
+ 		echo "yes"
+ 
+-		echo 'LDLIBS +=' `${PKG_CONFIG} --libs libselinux` >>$CONFIG
+-		echo 'CFLAGS += -DHAVE_SELINUX' `${PKG_CONFIG} --cflags libselinux` >>$CONFIG
++		echo 'HAVE_SELINUX_CFLAGS += -DHAVE_SELINUX' `${PKG_CONFIG} --cflags libselinux` >>$CONFIG
++		echo 'HAVE_SELINUX_LDLIBS +=' `${PKG_CONFIG} --libs libselinux` >>$CONFIG
+ 	else
+ 		echo "no"
+ 	fi
+@@ -260,8 +260,8 @@
+ 		echo "HAVE_MNL:=y" >>$CONFIG
+ 		echo "yes"
+ 
+-		echo 'CFLAGS += -DHAVE_LIBMNL' `${PKG_CONFIG} libmnl --cflags` >>$CONFIG
+-		echo 'LDLIBS +=' `${PKG_CONFIG} libmnl --libs` >> $CONFIG
++		echo 'HAVE_MNL_CFLAGS += -DHAVE_LIBMNL' `${PKG_CONFIG} libmnl --cflags` >>$CONFIG
++		echo 'HAVE_MNL_LDLIBS +=' `${PKG_CONFIG} libmnl --libs` >> $CONFIG
+ 	else
+ 		echo "no"
+ 	fi
+@@ -301,8 +301,8 @@
+ 	echo "no"
+     else
+ 	if ${PKG_CONFIG} libbsd --exists; then
+-		echo 'CFLAGS += -DHAVE_LIBBSD' `${PKG_CONFIG} libbsd --cflags` >>$CONFIG
+-		echo 'LDLIBS +=' `${PKG_CONFIG} libbsd --libs` >> $CONFIG
++		echo 'HAVE_LIBBSD_CFLAGS += -DHAVE_LIBBSD' `${PKG_CONFIG} libbsd --cflags` >>$CONFIG
++		echo 'HAVE_LIBBSD_LDLIBS +=' `${PKG_CONFIG} libbsd --libs` >> $CONFIG
+ 		echo "no"
+ 	else
+ 		echo 'CFLAGS += -DNEED_STRLCPY' >>$CONFIG
+@@ -318,8 +318,8 @@
+ 		echo "HAVE_CAP:=y" >>$CONFIG
+ 		echo "yes"
+ 
+-		echo 'CFLAGS += -DHAVE_LIBCAP' `${PKG_CONFIG} libcap --cflags` >>$CONFIG
+-		echo 'LDLIBS +=' `${PKG_CONFIG} libcap --libs` >> $CONFIG
++		echo 'HAVE_CAP_CFLAGS += -DHAVE_LIBCAP' `${PKG_CONFIG} libcap --cflags` >>$CONFIG
++		echo 'HAVE_CAP_LDLIBS +=' `${PKG_CONFIG} libcap --libs` >> $CONFIG
+ 	else
+ 		echo "no"
+ 	fi
+@@ -399,7 +399,3 @@
+ 
+ echo -n "libcap support: "
+ check_cap
+-
+-echo >> $CONFIG
+-echo "%.o: %.c" >> $CONFIG
+-echo '	$(QUIET_CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CPPFLAGS) -c -o $@ $<' >> $CONFIG
+--- iproute2-5.10.0/devlink/Makefile
++++ iproute2-5.10.0/devlink/Makefile
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0
+ include ../config.mk
++include ../config.include
+ 
+ TARGETS :=
+ 
+--- iproute2-5.10.0/genl/Makefile
++++ iproute2-5.10.0/genl/Makefile
+@@ -2,6 +2,7 @@
+ GENLOBJ=genl.o
+ 
+ include ../config.mk
++include ../config.include
+ SHARED_LIBS ?= y
+ 
+ CFLAGS += -fno-strict-aliasing
+--- iproute2-5.10.0/ip/Makefile
++++ iproute2-5.10.0/ip/Makefile
+@@ -16,6 +16,7 @@
+ RTMONOBJ=rtmon.o
+ 
+ include ../config.mk
++include ../config.include
+ 
+ ALLOBJ=$(IPOBJ) $(RTMONOBJ)
+ SCRIPTS=ifcfg rtpr routel routef
+--- iproute2-5.10.0/lib/Makefile
++++ iproute2-5.10.0/lib/Makefile
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0
+ include ../config.mk
++include ../config.include
+ 
+ CFLAGS += -fPIC
+ 
+--- iproute2-5.10.0/misc/Makefile
++++ iproute2-5.10.0/misc/Makefile
+@@ -5,6 +5,7 @@
+ TARGETS=ss nstat ifstat rtacct lnstat
+ 
+ include ../config.mk
++include ../config.include
+ 
+ ifeq ($(HAVE_BERKELEY_DB),y)
+ 	TARGETS += arpd
+--- iproute2-5.10.0/netem/Makefile
++++ iproute2-5.10.0/netem/Makefile
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0
+ include ../config.mk
++include ../config.include
+ 
+ DISTGEN = maketable normal pareto paretonormal
+ DISTDATA = normal.dist pareto.dist paretonormal.dist experimental.dist
+--- iproute2-5.10.0/rdma/Makefile
++++ iproute2-5.10.0/rdma/Makefile
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
+ include ../config.mk
++include ../config.include
+ 
+ TARGETS :=
+ 
+--- iproute2-5.10.0/tc/Makefile
++++ iproute2-5.10.0/tc/Makefile
+@@ -4,6 +4,7 @@
+        emp_ematch.tab.o emp_ematch.lex.o
+ 
+ include ../config.mk
++include ../config.include
+ 
+ SHARED_LIBS ?= y
+ 
+--- iproute2-5.10.0/tipc/Makefile
++++ iproute2-5.10.0/tipc/Makefile
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0
+ include ../config.mk
++include ../config.include
+ 
+ TARGETS :=
+ 

diff --git a/sys-apps/iproute2/iproute2-5.10.0-r1.ebuild b/sys-apps/iproute2/iproute2-5.10.0-r1.ebuild
new file mode 100644
index 00000000000..98e5c3cf25b
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-5.10.0-r1.ebuild
@@ -0,0 +1,168 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs flag-o-matic multilib
+
+if [[ ${PV} == "9999" ]] ; then
+	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
+	inherit git-r3
+else
+	SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+DESCRIPTION="kernel routing and traffic control utilities"
+HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="atm berkdb caps elf +iptables ipv6 libbsd minimal selinux"
+
+# We could make libmnl optional, but it's tiny, so eh
+RDEPEND="
+	!net-misc/arpd
+	!minimal? ( net-libs/libmnl )
+	atm? ( net-dialup/linux-atm )
+	berkdb? ( sys-libs/db:= )
+	caps? ( sys-libs/libcap )
+	elf? ( virtual/libelf )
+	iptables? ( >=net-firewall/iptables-1.4.20:= )
+	libbsd? ( dev-libs/libbsd )
+	selinux? ( sys-libs/libselinux )
+"
+# We require newer linux-headers for ipset support #549948 and some defines #553876
+DEPEND="
+	${RDEPEND}
+	>=sys-kernel/linux-headers-3.16
+"
+BDEPEND="
+	app-arch/xz-utils
+	>=sys-devel/bison-2.4
+	sys-devel/flex
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
+	"${FILESDIR}"/${PN}-5.10.0-configure-nomagic.patch # bug 643722
+	"${FILESDIR}"/${PN}-5.1.0-portability.patch
+	"${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
+)
+
+src_prepare() {
+	if ! use ipv6 ; then
+		PATCHES+=(
+			"${FILESDIR}"/${PN}-4.20.0-no-ipv6.patch #326849
+		)
+	fi
+
+	default
+
+	# Fix version if necessary
+	local versionfile="include/version.h"
+	if ! grep -Fq "${PV}" ${versionfile} ; then
+		einfo "Fixing version string"
+		sed "s@\"[[:digit:]\.]\+\"@\"${PV}\"@" \
+			-i ${versionfile} || die
+	fi
+
+	# echo -n is not POSIX compliant
+	sed 's@echo -n@printf@' -i configure || die
+
+	sed -i \
+		-e '/^CC :\?=/d' \
+		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
+		-e "s|-O2|${CFLAGS} ${CPPFLAGS}|" \
+		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
+		Makefile || die
+
+	# build against system headers
+	rm -r include/netinet || die #include/linux include/ip{,6}tables{,_common}.h include/libiptc
+	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
+
+	if use minimal ; then
+		sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile || die
+	fi
+}
+
+src_configure() {
+	tc-export AR CC PKG_CONFIG
+
+	# This sure is ugly.  Should probably move into toolchain-funcs at some point.
+	local setns
+	pushd "${T}" >/dev/null
+	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
+	${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
+	echo 'int main(){return 0;}' > test.c
+	${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
+	popd >/dev/null
+
+	# run "configure" script first which will create "config.mk"...
+	econf
+
+	# ...now switch on/off requested features via USE flags
+	# this is only useful if the test did not set other things, per bug #643722
+	cat <<-EOF >> config.mk
+	TC_CONFIG_ATM := $(usex atm y n)
+	TC_CONFIG_XT  := $(usex iptables y n)
+	TC_CONFIG_NO_XT := $(usex iptables n y)
+	# We've locked in recent enough kernel headers #549948
+	TC_CONFIG_IPSET := y
+	HAVE_BERKELEY_DB := $(usex berkdb y n)
+	HAVE_CAP      := $(usex caps y n)
+	HAVE_MNL      := $(usex minimal n y)
+	HAVE_ELF      := $(usex elf y n)
+	HAVE_SELINUX  := $(usex selinux y n)
+	IP_CONFIG_SETNS := ${setns}
+	# Use correct iptables dir, #144265 #293709
+	IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
+	HAVE_LIBBSD   := $(usex libbsd y n)
+	EOF
+}
+
+src_compile() {
+	emake V=1 NETNS_RUN_DIR=/run/netns
+}
+
+src_install() {
+	if use minimal ; then
+		into /
+		dosbin tc/tc
+		dobin ip/ip
+		return 0
+	fi
+
+	emake \
+		DESTDIR="${D}" \
+		PREFIX="${EPREFIX}/usr" \
+		LIBDIR="${EPREFIX}"/$(get_libdir) \
+		SBINDIR="${EPREFIX}"/sbin \
+		CONFDIR="${EPREFIX}"/etc/iproute2 \
+		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
+		MANDIR="${EPREFIX}"/usr/share/man \
+		ARPDDIR="${EPREFIX}"/var/lib/arpd \
+		install
+
+	dodir /bin
+	mv "${ED}"/{s,}bin/ip || die #330115
+
+	dolib.a lib/libnetlink.a
+	insinto /usr/include
+	doins include/libnetlink.h
+	# This local header pulls in a lot of linux headers it
+	# doesn't directly need.  Delete this header that requires
+	# linux-headers-3.8 until that goes stable.  #467716
+	sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
+
+	if use berkdb ; then
+		keepdir /var/lib/arpd
+		# bug 47482, arpd doesn't need to be in /sbin
+		dodir /usr/bin
+		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
+	elif [[ -d "${ED}"/var/lib/arpd ]]; then
+		rmdir --ignore-fail-on-non-empty -p "${ED}"/var/lib/arpd || die
+	fi
+}


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/files/, sys-apps/iproute2/
@ 2021-04-28  9:53 Lars Wendler
  0 siblings, 0 replies; 18+ messages in thread
From: Lars Wendler @ 2021-04-28  9:53 UTC (permalink / raw
  To: gentoo-commits

commit:     7f8ab74f5b22137d75758d7c5456f81b9f0aab4f
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 28 09:50:32 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Apr 28 09:53:30 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f8ab74f

sys-apps/iproute2: Bump to version 5.12.0

Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 sys-apps/iproute2/Manifest                         |   1 +
 .../files/iproute2-5.12.0-configure-nomagic.patch  | 245 +++++++++++++++++++++
 sys-apps/iproute2/iproute2-5.12.0.ebuild           | 170 ++++++++++++++
 3 files changed, 416 insertions(+)

diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest
index f91943551f4..8070033bca7 100644
--- a/sys-apps/iproute2/Manifest
+++ b/sys-apps/iproute2/Manifest
@@ -1,3 +1,4 @@
 DIST iproute2-5.10.0.tar.xz 798776 BLAKE2B 8c17e65f03427f45b71dc17b289b272545549a6687257498676a23e4fdc4a590a7215bfdba3c7ac4b1ccde6c38ba8e3eb222eea2532374fa9680633aa198d347 SHA512 a468eefa797898b6de452212aa432c0a931434defacae5fb4335754c1292c5d86a8c8dbf3017f90cec266d71a2a17ae469aac17e1a85a5cbddc70814313e4c13
 DIST iproute2-5.11.0.tar.xz 822044 BLAKE2B e52e2334a4f6271a23e9393a3b11fc7e8e070ecff178bda1cf87705a55b59018edc8c28751e4fc6a7d877c19e6da772765afbdc5944800f98bf176513595e5bb SHA512 f592728ec819fc34cba04b1c04275e783aed86084fe31948e1776e6e473c8c1416aaf8101c19b51ddb4044af1cd2157827c0f91546b33badb448466eae9a2fda
+DIST iproute2-5.12.0.tar.xz 835880 BLAKE2B 8e3e1b7188d7ab5014d06d7edaae2cb0c1dc65862999a2ca9f31902256d7f3d166de8a1c76e4e137acce2b445d72ea6850bfec3640d1919cb82351d45dd3e47e SHA512 9249beb67b30ceef178b60b2b61a5e6c45277e747ae4c865e739b7ab84192549e8e94ebaee43c0a87c0291037746ffb6936346245220786e369201ee13d60fac
 DIST iproute2-5.7.0.tar.xz 764436 BLAKE2B 842229730139f8931c4ff3d548fe56c7c86b6bb7be5cc1a7dd896ddce34c039467fb90d0c258cdc91276edc59b9b19f53c39a36c79b54b15a78436b44c595eed SHA512 d5ef68e0eb8e84fbff68c2e7dd4097b9ceb438c928d17ede4130876802dfeafe8bf08d82b4fd39005314e0679c0b261aaa3d6a0a2ff364074a43a043a855a634

diff --git a/sys-apps/iproute2/files/iproute2-5.12.0-configure-nomagic.patch b/sys-apps/iproute2/files/iproute2-5.12.0-configure-nomagic.patch
new file mode 100644
index 00000000000..7dbb3a6dcb1
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-5.12.0-configure-nomagic.patch
@@ -0,0 +1,245 @@
+The hand-rolled configure script, for multiple options (selinux,mnl,elf), sets
+a variable as well as modifying CFLAGS & LDLIBS.
+
+If config.mk is later amended to disable a feature, the CFLAGS/LDLIBS tweaks
+are still in place.
+
+Push the CFLAGS/LDLIBS changes into new conditional Makefile code, so that they
+are only passed when correctly needed.
+
+Prior Gentoo testcase for reproduction:
+USE=minimal ebuild ... compile.
+- Linking with libbsd, libelf, libmnl & libcap based only on presence.
+- Links based on libselinux based only on presence.
+
+Closes: https://bugs.gentoo.org/643722
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+Forward-ported from v4.14.1 to v4.16.0 by Lars Wendler <polynomial-c@gentoo.org>
+Added libcap to v4.17.0 by Lars Wendler <polynomial-c@gentoo.org>
+Forward-ported from v4.17.0 to v4.20.0 by Lars Wendler <polynomial-c@gentoo.org>
+Forward-ported from v4.20.0 to v5.11.0 by Lars Wendler <polynomial-c@gentoo.org>
+Forward-ported from v5.11.0 to v5.12.0 by Lars Wendler <polynomial-c@gentoo.org>
+
+--- iproute2-5.12.0/bridge/Makefile
++++ iproute2-5.12.0/bridge/Makefile
+@@ -2,6 +2,7 @@
+ BROBJ = bridge.o fdb.o monitor.o link.o mdb.o vlan.o
+ 
+ include ../config.mk
++include ../config.include
+ 
+ all: bridge
+ 
+--- iproute2-5.12.0/config.include
++++ iproute2-5.12.0/config.include
+@@ -0,0 +1,32 @@
++# We can only modify CFLAGS/LDLIBS after all the config options are known.
++ifeq ($(IP_CONFIG_SETNS),y)
++	CFLAGS += $(IP_CONFIG_SETNS_CFLAGS)
++endif
++ifeq ($(HAVE_ELF),y)
++	CFLAGS += $(HAVE_ELF_CFLAGS)
++	LDLIBS += $(HAVE_ELF_LDLIBS)
++endif
++ifeq ($(HAVE_SELINUX),y)
++	CFLAGS += $(HAVE_SELINUX_CFLAGS)
++	LDLIBS += $(HAVE_SELINUX_LDLIBS)
++endif
++ifeq ($(HAVE_MNL),y)
++	CFLAGS += $(HAVE_MNL_CFLAGS)
++	LDLIBS += $(HAVE_MNL_LDLIBS)
++endif
++ifeq ($(HAVE_CAP),y)
++	CFLAGS += $(HAVE_CAP_CFLAGS)
++	LDLIBS += $(HAVE_CAP_LDLIBS)
++endif
++ifeq ($(HAVE_LIBBSD),y)
++	CFLAGS += $(HAVE_LIBBSD_CFLAGS)
++	LDLIBS += $(HAVE_LIBBSD_LDLIBS)
++else
++	CFLAGS += -DNEED_STRLCPY
++endif
++
++# Rules can only be declared after all variables in them are known.
++%.o: %.c
++	$(QUIET_CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CPPFLAGS) -c -o $@ $<
++
++# vim: ft=make:
+--- iproute2-5.12.0/configure
++++ iproute2-5.12.0/configure
+@@ -195,7 +195,7 @@
+     if $CC -I$INCLUDE -o $TMPDIR/setnstest $TMPDIR/setnstest.c >/dev/null 2>&1; then
+ 	echo "IP_CONFIG_SETNS:=y" >>$CONFIG
+ 	echo "yes"
+-	echo "CFLAGS += -DHAVE_SETNS" >>$CONFIG
++	echo "IP_CONFIG_SETNS_CFLAGS += -DHAVE_SETNS" >>$CONFIG
+     else
+ 	echo "no"
+     fi
+@@ -238,8 +238,8 @@
+ 	echo "HAVE_ELF:=y" >>$CONFIG
+ 	echo "yes"
+ 
+-	echo 'CFLAGS += -DHAVE_ELF' `${PKG_CONFIG} libelf --cflags` >> $CONFIG
+-	echo 'LDLIBS += ' `${PKG_CONFIG} libelf --libs` >>$CONFIG
++	echo 'HAVE_ELF_CFLAGS += -DHAVE_ELF' `${PKG_CONFIG} libelf --cflags` >> $CONFIG
++	echo 'HAVE_ELF_LDLIBS += ' `${PKG_CONFIG} libelf --libs` >>$CONFIG
+     else
+ 	echo "no"
+     fi
+@@ -357,8 +357,8 @@
+ 		echo "HAVE_SELINUX:=y" >>$CONFIG
+ 		echo "yes"
+ 
+-		echo 'LDLIBS +=' `${PKG_CONFIG} --libs libselinux` >>$CONFIG
+-		echo 'CFLAGS += -DHAVE_SELINUX' `${PKG_CONFIG} --cflags libselinux` >>$CONFIG
++		echo 'HAVE_SELINUX_CFLAGS += -DHAVE_SELINUX' `${PKG_CONFIG} --cflags libselinux` >>$CONFIG
++		echo 'HAVE_SELINUX_LDLIBS +=' `${PKG_CONFIG} --libs libselinux` >>$CONFIG
+ 	else
+ 		echo "no"
+ 	fi
+@@ -370,8 +370,8 @@
+ 		echo "HAVE_MNL:=y" >>$CONFIG
+ 		echo "yes"
+ 
+-		echo 'CFLAGS += -DHAVE_LIBMNL' `${PKG_CONFIG} libmnl --cflags` >>$CONFIG
+-		echo 'LDLIBS +=' `${PKG_CONFIG} libmnl --libs` >> $CONFIG
++		echo 'HAVE_MNL_CFLAGS += -DHAVE_LIBMNL' `${PKG_CONFIG} libmnl --cflags` >>$CONFIG
++		echo 'HAVE_MNL_LDLIBS +=' `${PKG_CONFIG} libmnl --libs` >> $CONFIG
+ 	else
+ 		echo "no"
+ 	fi
+@@ -411,8 +411,8 @@
+ 	echo "no"
+     else
+ 	if ${PKG_CONFIG} libbsd --exists; then
+-		echo 'CFLAGS += -DHAVE_LIBBSD' `${PKG_CONFIG} libbsd --cflags` >>$CONFIG
+-		echo 'LDLIBS +=' `${PKG_CONFIG} libbsd --libs` >> $CONFIG
++		echo 'HAVE_LIBBSD_CFLAGS += -DHAVE_LIBBSD' `${PKG_CONFIG} libbsd --cflags` >>$CONFIG
++		echo 'HAVE_LIBBSD_LDLIBS +=' `${PKG_CONFIG} libbsd --libs` >> $CONFIG
+ 		echo "no"
+ 	else
+ 		echo 'CFLAGS += -DNEED_STRLCPY' >>$CONFIG
+@@ -428,8 +428,8 @@
+ 		echo "HAVE_CAP:=y" >>$CONFIG
+ 		echo "yes"
+ 
+-		echo 'CFLAGS += -DHAVE_LIBCAP' `${PKG_CONFIG} libcap --cflags` >>$CONFIG
+-		echo 'LDLIBS +=' `${PKG_CONFIG} libcap --libs` >> $CONFIG
++		echo 'HAVE_CAP_CFLAGS += -DHAVE_LIBCAP' `${PKG_CONFIG} libcap --cflags` >>$CONFIG
++		echo 'HAVE_CAP_LDLIBS +=' `${PKG_CONFIG} libcap --libs` >> $CONFIG
+ 	else
+ 		echo "no"
+ 	fi
+@@ -512,7 +512,3 @@
+ 
+ echo -n "libcap support: "
+ check_cap
+-
+-echo >> $CONFIG
+-echo "%.o: %.c" >> $CONFIG
+-echo '	$(QUIET_CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CPPFLAGS) -c -o $@ $<' >> $CONFIG
+--- iproute2-5.12.0/dcb/Makefile
++++ iproute2-5.12.0/dcb/Makefile
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0
+ include ../config.mk
++include ../config.include
+ 
+ TARGETS :=
+ 
+--- iproute2-5.12.0/devlink/Makefile
++++ iproute2-5.12.0/devlink/Makefile
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0
+ include ../config.mk
++include ../config.include
+ 
+ TARGETS :=
+ 
+--- iproute2-5.12.0/genl/Makefile
++++ iproute2-5.12.0/genl/Makefile
+@@ -2,6 +2,7 @@
+ GENLOBJ=genl.o
+ 
+ include ../config.mk
++include ../config.include
+ SHARED_LIBS ?= y
+ 
+ CFLAGS += -fno-strict-aliasing
+--- iproute2-5.12.0/ip/Makefile
++++ iproute2-5.12.0/ip/Makefile
+@@ -16,6 +16,7 @@
+ RTMONOBJ=rtmon.o
+ 
+ include ../config.mk
++include ../config.include
+ 
+ ALLOBJ=$(IPOBJ) $(RTMONOBJ)
+ SCRIPTS=ifcfg rtpr routel routef
+--- iproute2-5.12.0/lib/Makefile
++++ iproute2-5.12.0/lib/Makefile
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0
+ include ../config.mk
++include ../config.include
+ 
+ CFLAGS += -fPIC
+ 
+--- iproute2-5.12.0/misc/Makefile
++++ iproute2-5.12.0/misc/Makefile
+@@ -5,6 +5,7 @@
+ TARGETS=ss nstat ifstat rtacct lnstat
+ 
+ include ../config.mk
++include ../config.include
+ 
+ ifeq ($(HAVE_BERKELEY_DB),y)
+ 	TARGETS += arpd
+--- iproute2-5.12.0/netem/Makefile
++++ iproute2-5.12.0/netem/Makefile
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0
+ include ../config.mk
++include ../config.include
+ 
+ DISTGEN = maketable normal pareto paretonormal
+ DISTDATA = normal.dist pareto.dist paretonormal.dist experimental.dist
+--- iproute2-5.12.0/rdma/Makefile
++++ iproute2-5.12.0/rdma/Makefile
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
+ include ../config.mk
++include ../config.include
+ 
+ TARGETS :=
+ 
+--- iproute2-5.12.0/tc/Makefile
++++ iproute2-5.12.0/tc/Makefile
+@@ -4,6 +4,7 @@
+        emp_ematch.tab.o emp_ematch.lex.o
+ 
+ include ../config.mk
++include ../config.include
+ 
+ SHARED_LIBS ?= y
+ 
+--- iproute2-5.12.0/tipc/Makefile
++++ iproute2-5.12.0/tipc/Makefile
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0
+ include ../config.mk
++include ../config.include
+ 
+ TARGETS :=
+ 
+--- iproute2-5.12.0/vdpa/Makefile
++++ iproute2-5.12.0/vdpa/Makefile
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0
+ include ../config.mk
++include ../config.include
+ 
+ TARGETS :=
+ 

diff --git a/sys-apps/iproute2/iproute2-5.12.0.ebuild b/sys-apps/iproute2/iproute2-5.12.0.ebuild
new file mode 100644
index 00000000000..475fe98775b
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-5.12.0.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs flag-o-matic multilib
+
+if [[ ${PV} == "9999" ]] ; then
+	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
+	inherit git-r3
+else
+	SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz"
+	#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+DESCRIPTION="kernel routing and traffic control utilities"
+HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="atm berkdb bpf caps elf +iptables ipv6 libbsd minimal selinux"
+
+# We could make libmnl optional, but it's tiny, so eh
+RDEPEND="
+	!net-misc/arpd
+	!minimal? ( net-libs/libmnl )
+	atm? ( net-dialup/linux-atm )
+	berkdb? ( sys-libs/db:= )
+	bpf? ( dev-libs/libbpf )
+	caps? ( sys-libs/libcap )
+	elf? ( virtual/libelf )
+	iptables? ( >=net-firewall/iptables-1.4.20:= )
+	libbsd? ( dev-libs/libbsd )
+	selinux? ( sys-libs/libselinux )
+"
+# We require newer linux-headers for ipset support #549948 and some defines #553876
+DEPEND="
+	${RDEPEND}
+	>=sys-kernel/linux-headers-3.16
+"
+BDEPEND="
+	app-arch/xz-utils
+	>=sys-devel/bison-2.4
+	sys-devel/flex
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
+	"${FILESDIR}"/${PN}-5.12.0-configure-nomagic.patch # bug 643722
+	#"${FILESDIR}"/${PN}-5.1.0-portability.patch
+	"${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
+)
+
+src_prepare() {
+	if ! use ipv6 ; then
+		PATCHES+=(
+			"${FILESDIR}"/${PN}-4.20.0-no-ipv6.patch #326849
+		)
+	fi
+
+	default
+
+	# Fix version if necessary
+	local versionfile="include/version.h"
+	if [[ "${PV}" != 9999 ]] && ! grep -Fq "${PV}" ${versionfile} ; then
+		einfo "Fixing version string"
+		sed "s@\"[[:digit:]\.]\+\"@\"${PV}\"@" \
+			-i ${versionfile} || die
+	fi
+
+	# echo -n is not POSIX compliant
+	sed 's@echo -n@printf@' -i configure || die
+
+	sed -i \
+		-e '/^CC :\?=/d' \
+		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
+		-e "s|-O2|${CFLAGS} ${CPPFLAGS}|" \
+		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
+		Makefile || die
+
+	# build against system headers
+	rm -r include/netinet || die #include/linux include/ip{,6}tables{,_common}.h include/libiptc
+	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
+
+	if use minimal ; then
+		sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile || die
+	fi
+}
+
+src_configure() {
+	tc-export AR CC PKG_CONFIG
+
+	# This sure is ugly.  Should probably move into toolchain-funcs at some point.
+	local setns
+	pushd "${T}" >/dev/null
+	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
+	${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
+	echo 'int main(){return 0;}' > test.c
+	${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
+	popd >/dev/null
+
+	# run "configure" script first which will create "config.mk"...
+	LIBBPF_FORCE="$(usex bpf on off)" \
+	econf
+
+	# ...now switch on/off requested features via USE flags
+	# this is only useful if the test did not set other things, per bug #643722
+	cat <<-EOF >> config.mk
+	TC_CONFIG_ATM := $(usex atm y n)
+	TC_CONFIG_XT  := $(usex iptables y n)
+	TC_CONFIG_NO_XT := $(usex iptables n y)
+	# We've locked in recent enough kernel headers #549948
+	TC_CONFIG_IPSET := y
+	HAVE_BERKELEY_DB := $(usex berkdb y n)
+	HAVE_CAP      := $(usex caps y n)
+	HAVE_MNL      := $(usex minimal n y)
+	HAVE_ELF      := $(usex elf y n)
+	HAVE_SELINUX  := $(usex selinux y n)
+	IP_CONFIG_SETNS := ${setns}
+	# Use correct iptables dir, #144265 #293709
+	IPT_LIB_DIR   := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
+	HAVE_LIBBSD   := $(usex libbsd y n)
+	EOF
+}
+
+src_compile() {
+	emake V=1 NETNS_RUN_DIR=/run/netns
+}
+
+src_install() {
+	if use minimal ; then
+		into /
+		dosbin tc/tc
+		dobin ip/ip
+		return 0
+	fi
+
+	emake \
+		DESTDIR="${D}" \
+		PREFIX="${EPREFIX}/usr" \
+		LIBDIR="${EPREFIX}"/$(get_libdir) \
+		SBINDIR="${EPREFIX}"/sbin \
+		CONFDIR="${EPREFIX}"/etc/iproute2 \
+		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
+		MANDIR="${EPREFIX}"/usr/share/man \
+		ARPDDIR="${EPREFIX}"/var/lib/arpd \
+		install
+
+	dodir /bin
+	mv "${ED}"/{s,}bin/ip || die #330115
+
+	dolib.a lib/libnetlink.a
+	insinto /usr/include
+	doins include/libnetlink.h
+	# This local header pulls in a lot of linux headers it
+	# doesn't directly need.  Delete this header that requires
+	# linux-headers-3.8 until that goes stable.  #467716
+	sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
+
+	if use berkdb ; then
+		keepdir /var/lib/arpd
+		# bug 47482, arpd doesn't need to be in /sbin
+		dodir /usr/bin
+		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
+	elif [[ -d "${ED}"/var/lib/arpd ]]; then
+		rmdir --ignore-fail-on-non-empty -p "${ED}"/var/lib/arpd || die
+	fi
+}


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/files/, sys-apps/iproute2/
@ 2021-05-23 12:14 David Seifert
  0 siblings, 0 replies; 18+ messages in thread
From: David Seifert @ 2021-05-23 12:14 UTC (permalink / raw
  To: gentoo-commits

commit:     cf6fe8bf23dcae463c8741623409cc273f6118bc
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun May 23 12:14:02 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun May 23 12:14:02 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf6fe8bf

sys-apps/iproute2: drop 5.7.0

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sys-apps/iproute2/Manifest                         |   1 -
 .../files/iproute2-4.20.0-configure-nomagic.patch  | 208 ---------------------
 sys-apps/iproute2/iproute2-5.7.0.ebuild            | 159 ----------------
 3 files changed, 368 deletions(-)

diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest
index 8070033bca7..1ba5ff3bf0a 100644
--- a/sys-apps/iproute2/Manifest
+++ b/sys-apps/iproute2/Manifest
@@ -1,4 +1,3 @@
 DIST iproute2-5.10.0.tar.xz 798776 BLAKE2B 8c17e65f03427f45b71dc17b289b272545549a6687257498676a23e4fdc4a590a7215bfdba3c7ac4b1ccde6c38ba8e3eb222eea2532374fa9680633aa198d347 SHA512 a468eefa797898b6de452212aa432c0a931434defacae5fb4335754c1292c5d86a8c8dbf3017f90cec266d71a2a17ae469aac17e1a85a5cbddc70814313e4c13
 DIST iproute2-5.11.0.tar.xz 822044 BLAKE2B e52e2334a4f6271a23e9393a3b11fc7e8e070ecff178bda1cf87705a55b59018edc8c28751e4fc6a7d877c19e6da772765afbdc5944800f98bf176513595e5bb SHA512 f592728ec819fc34cba04b1c04275e783aed86084fe31948e1776e6e473c8c1416aaf8101c19b51ddb4044af1cd2157827c0f91546b33badb448466eae9a2fda
 DIST iproute2-5.12.0.tar.xz 835880 BLAKE2B 8e3e1b7188d7ab5014d06d7edaae2cb0c1dc65862999a2ca9f31902256d7f3d166de8a1c76e4e137acce2b445d72ea6850bfec3640d1919cb82351d45dd3e47e SHA512 9249beb67b30ceef178b60b2b61a5e6c45277e747ae4c865e739b7ab84192549e8e94ebaee43c0a87c0291037746ffb6936346245220786e369201ee13d60fac
-DIST iproute2-5.7.0.tar.xz 764436 BLAKE2B 842229730139f8931c4ff3d548fe56c7c86b6bb7be5cc1a7dd896ddce34c039467fb90d0c258cdc91276edc59b9b19f53c39a36c79b54b15a78436b44c595eed SHA512 d5ef68e0eb8e84fbff68c2e7dd4097b9ceb438c928d17ede4130876802dfeafe8bf08d82b4fd39005314e0679c0b261aaa3d6a0a2ff364074a43a043a855a634

diff --git a/sys-apps/iproute2/files/iproute2-4.20.0-configure-nomagic.patch b/sys-apps/iproute2/files/iproute2-4.20.0-configure-nomagic.patch
deleted file mode 100644
index 94df85017df..00000000000
--- a/sys-apps/iproute2/files/iproute2-4.20.0-configure-nomagic.patch
+++ /dev/null
@@ -1,208 +0,0 @@
-The hand-rolled configure script, for multiple options (selinux,mnl,elf), sets
-a variable as well as modifying CFLAGS & LDLIBS.
-
-If config.mk is later amended to disable a feature, the CFLAGS/LDLIBS tweaks
-are still in place.
-
-Push the CFLAGS/LDLIBS changes into new conditional Makefile code, so that they
-are only passed when correctly needed.
-
-Prior Gentoo testcase for reproduction:
-USE=minimal ebuild ... compile.
-- Linking with libelf, libmnl & libcap based only on presence.
-- Links based on libselinux based only on presence.
-
-Closes: https://bugs.gentoo.org/643722
-Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-
-Forward-ported from v4.14.1 to v4.16.0 by Lars Wendler <polynomial-c@gentoo.org>
-Added libcap to v4.17.0 by Lars Wendler <polynomial-c@gentoo.org>
-Forward-ported from v4.17.0 to v4.20.0 by Lars Wendler <polynomial-c@gentoo.org>
-
---- iproute2-4.20.0/bridge/Makefile
-+++ iproute2-4.20.0/bridge/Makefile
-@@ -2,6 +2,7 @@
- BROBJ = bridge.o fdb.o monitor.o link.o mdb.o vlan.o
- 
- include ../config.mk
-+include ../config.include
- 
- all: bridge
- 
---- iproute2-4.20.0/config.include
-+++ iproute2-4.20.0/config.include
-@@ -0,0 +1,26 @@
-+# We can only modify CFLAGS/LDLIBS after all the config options are known.
-+ifeq ($(IP_CONFIG_SETNS),y)
-+	CFLAGS += $(IP_CONFIG_SETNS_CFLAGS)
-+endif
-+ifeq ($(HAVE_ELF),y)
-+	CFLAGS += $(HAVE_ELF_CFLAGS)
-+	LDLIBS += $(HAVE_ELF_LDLIBS)
-+endif
-+ifeq ($(HAVE_SELINUX),y)
-+	CFLAGS += $(HAVE_SELINUX_CFLAGS)
-+	LDLIBS += $(HAVE_SELINUX_LDLIBS)
-+endif
-+ifeq ($(HAVE_MNL),y)
-+	CFLAGS += $(HAVE_MNL_CFLAGS)
-+	LDLIBS += $(HAVE_MNL_LDLIBS)
-+endif
-+ifeq ($(HAVE_CAP),y)
-+	CFLAGS += $(HAVE_CAP_CFLAGS)
-+	LDLIBS += $(HAVE_CAP_LDLIBS)
-+endif
-+
-+# Rules can only be declared after all variables in them are known.
-+%.o: %.c
-+	$(QUIET_CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CPPFLAGS) -c -o $@ $<
-+
-+# vim: ft=make:
---- iproute2-4.20.0/configure
-+++ iproute2-4.20.0/configure
-@@ -188,7 +188,7 @@
-     if $CC -I$INCLUDE -o $TMPDIR/setnstest $TMPDIR/setnstest.c >/dev/null 2>&1; then
- 	echo "IP_CONFIG_SETNS:=y" >>$CONFIG
- 	echo "yes"
--	echo "CFLAGS += -DHAVE_SETNS" >>$CONFIG
-+	echo "IP_CONFIG_SETNS_CFLAGS += -DHAVE_SETNS" >>$CONFIG
-     else
- 	echo "no"
-     fi
-@@ -231,8 +231,8 @@
- 	echo "HAVE_ELF:=y" >>$CONFIG
- 	echo "yes"
- 
--	echo 'CFLAGS += -DHAVE_ELF' `${PKG_CONFIG} libelf --cflags` >> $CONFIG
--	echo 'LDLIBS += ' `${PKG_CONFIG} libelf --libs` >>$CONFIG
-+	echo 'HAVE_ELF_CFLAGS += -DHAVE_ELF' `${PKG_CONFIG} libelf --cflags` >> $CONFIG
-+	echo 'HAVE_ELF_LDLIBS += ' `${PKG_CONFIG} libelf --libs` >>$CONFIG
-     else
- 	echo "no"
-     fi
-@@ -245,8 +245,8 @@
- 		echo "HAVE_SELINUX:=y" >>$CONFIG
- 		echo "yes"
- 
--		echo 'LDLIBS +=' `${PKG_CONFIG} --libs libselinux` >>$CONFIG
--		echo 'CFLAGS += -DHAVE_SELINUX' `${PKG_CONFIG} --cflags libselinux` >>$CONFIG
-+		echo 'HAVE_SELINUX_CFLAGS += -DHAVE_SELINUX' `${PKG_CONFIG} --cflags libselinux` >>$CONFIG
-+		echo 'HAVE_SELINUX_LDLIBS +=' `${PKG_CONFIG} --libs libselinux` >>$CONFIG
- 	else
- 		echo "no"
- 	fi
-@@ -258,8 +258,8 @@
- 		echo "HAVE_MNL:=y" >>$CONFIG
- 		echo "yes"
- 
--		echo 'CFLAGS += -DHAVE_LIBMNL' `${PKG_CONFIG} libmnl --cflags` >>$CONFIG
--		echo 'LDLIBS +=' `${PKG_CONFIG} libmnl --libs` >> $CONFIG
-+		echo 'HAVE_MNL_CFLAGS += -DHAVE_LIBMNL' `${PKG_CONFIG} libmnl --cflags` >>$CONFIG
-+		echo 'HAVE_MNL_LDLIBS +=' `${PKG_CONFIG} libmnl --libs` >> $CONFIG
- 	else
- 		echo "no"
- 	fi
-@@ -316,8 +316,8 @@
- 		echo "HAVE_CAP:=y" >>$CONFIG
- 		echo "yes"
- 
--		echo 'CFLAGS += -DHAVE_LIBCAP' `${PKG_CONFIG} libcap --cflags` >>$CONFIG
--		echo 'LDLIBS +=' `${PKG_CONFIG} libcap --libs` >> $CONFIG
-+		echo 'HAVE_CAP_CFLAGS += -DHAVE_LIBCAP' `${PKG_CONFIG} libcap --cflags` >>$CONFIG
-+		echo 'HAVE_CAP_LDLIBS +=' `${PKG_CONFIG} libcap --libs` >> $CONFIG
- 	else
- 		echo "no"
- 	fi
-@@ -397,7 +397,3 @@
- 
- echo -n "libcap support: "
- check_cap
--
--echo >> $CONFIG
--echo "%.o: %.c" >> $CONFIG
--echo '	$(QUIET_CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CPPFLAGS) -c -o $@ $<' >> $CONFIG
---- iproute2-4.20.0/devlink/Makefile
-+++ iproute2-4.20.0/devlink/Makefile
-@@ -1,5 +1,6 @@
- # SPDX-License-Identifier: GPL-2.0
- include ../config.mk
-+include ../config.include
- 
- TARGETS :=
- 
---- iproute2-4.20.0/genl/Makefile
-+++ iproute2-4.20.0/genl/Makefile
-@@ -2,6 +2,7 @@
- GENLOBJ=genl.o
- 
- include ../config.mk
-+include ../config.include
- SHARED_LIBS ?= y
- 
- CFLAGS += -fno-strict-aliasing
---- iproute2-4.20.0/ip/Makefile
-+++ iproute2-4.20.0/ip/Makefile
-@@ -15,6 +15,7 @@
- RTMONOBJ=rtmon.o
- 
- include ../config.mk
-+include ../config.include
- 
- ALLOBJ=$(IPOBJ) $(RTMONOBJ)
- SCRIPTS=ifcfg rtpr routel routef
---- iproute2-4.20.0/lib/Makefile
-+++ iproute2-4.20.0/lib/Makefile
-@@ -1,5 +1,6 @@
- # SPDX-License-Identifier: GPL-2.0
- include ../config.mk
-+include ../config.include
- 
- CFLAGS += -fPIC
- 
---- iproute2-4.20.0/misc/Makefile
-+++ iproute2-4.20.0/misc/Makefile
-@@ -5,6 +5,7 @@
- TARGETS=ss nstat ifstat rtacct lnstat
- 
- include ../config.mk
-+include ../config.include
- 
- ifeq ($(HAVE_BERKELEY_DB),y)
- 	TARGETS += arpd
---- iproute2-4.20.0/netem/Makefile
-+++ iproute2-4.20.0/netem/Makefile
-@@ -1,5 +1,6 @@
- # SPDX-License-Identifier: GPL-2.0
- include ../config.mk
-+include ../config.include
- 
- DISTGEN = maketable normal pareto paretonormal
- DISTDATA = normal.dist pareto.dist paretonormal.dist experimental.dist
---- iproute2-4.20.0/rdma/Makefile
-+++ iproute2-4.20.0/rdma/Makefile
-@@ -1,5 +1,6 @@
- # SPDX-License-Identifier: GPL-2.0
- include ../config.mk
-+include ../config.include
- 
- TARGETS :=
- 
---- iproute2-4.20.0/tc/Makefile
-+++ iproute2-4.20.0/tc/Makefile
-@@ -4,6 +4,7 @@
-        emp_ematch.yacc.o emp_ematch.lex.o
- 
- include ../config.mk
-+include ../config.include
- 
- SHARED_LIBS ?= y
- 
---- iproute2-4.20.0/tipc/Makefile
-+++ iproute2-4.20.0/tipc/Makefile
-@@ -1,5 +1,6 @@
- # SPDX-License-Identifier: GPL-2.0
- include ../config.mk
-+include ../config.include
- 
- TARGETS :=
- 

diff --git a/sys-apps/iproute2/iproute2-5.7.0.ebuild b/sys-apps/iproute2/iproute2-5.7.0.ebuild
deleted file mode 100644
index bc327d2142f..00000000000
--- a/sys-apps/iproute2/iproute2-5.7.0.ebuild
+++ /dev/null
@@ -1,159 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit toolchain-funcs flag-o-matic multilib
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-r3
-else
-	SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz"
-	KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-fi
-
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb caps elf +iptables ipv6 minimal selinux"
-
-# We could make libmnl optional, but it's tiny, so eh
-RDEPEND="
-	!net-misc/arpd
-	dev-libs/libbsd
-	!minimal? ( net-libs/libmnl )
-	caps? ( sys-libs/libcap )
-	elf? ( virtual/libelf )
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	berkdb? ( sys-libs/db:= )
-	atm? ( net-dialup/linux-atm )
-	selinux? ( sys-libs/libselinux )
-"
-# We require newer linux-headers for ipset support #549948 and some defines #553876
-DEPEND="
-	${RDEPEND}
-	>=sys-kernel/linux-headers-3.16
-"
-BDEPEND="
-	app-arch/xz-utils
-	>=sys-devel/bison-2.4
-	sys-devel/flex
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-	"${FILESDIR}"/${PN}-4.20.0-configure-nomagic.patch # bug 643722
-	"${FILESDIR}"/${PN}-5.1.0-portability.patch
-	"${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
-)
-
-src_prepare() {
-	if ! use ipv6 ; then
-		PATCHES+=(
-			"${FILESDIR}"/${PN}-4.20.0-no-ipv6.patch #326849
-		)
-	fi
-
-	default
-
-	# echo -n is not POSIX compliant
-	sed 's@echo -n@printf@' -i configure || die
-
-	sed -i \
-		-e '/^CC :\?=/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s|-O2|${CFLAGS} ${CPPFLAGS}|" \
-		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
-		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
-		Makefile || die
-
-	# build against system headers
-	rm -r include/netinet || die #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
-
-	if use minimal ; then
-		sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile || die
-	fi
-}
-
-src_configure() {
-	tc-export AR CC PKG_CONFIG
-
-	# This sure is ugly.  Should probably move into toolchain-funcs at some point.
-	local setns
-	pushd "${T}" >/dev/null
-	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
-	echo 'int main(){return 0;}' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
-	popd >/dev/null
-
-	# run "configure" script first which will create "config.mk"...
-	econf
-
-	# ...now switch on/off requested features via USE flags
-	# this is only useful if the test did not set other things, per bug #643722
-	cat <<-EOF >> config.mk
-	TC_CONFIG_ATM := $(usex atm y n)
-	TC_CONFIG_XT  := $(usex iptables y n)
-	TC_CONFIG_NO_XT := $(usex iptables n y)
-	# We've locked in recent enough kernel headers #549948
-	TC_CONFIG_IPSET := y
-	HAVE_BERKELEY_DB := $(usex berkdb y n)
-	HAVE_CAP      := $(usex caps y n)
-	HAVE_MNL      := $(usex minimal n y)
-	HAVE_ELF      := $(usex elf y n)
-	HAVE_SELINUX  := $(usex selinux y n)
-	IP_CONFIG_SETNS := ${setns}
-	# Use correct iptables dir, #144265 #293709
-	IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
-	EOF
-}
-
-src_compile() {
-	emake V=1 NETNS_RUN_DIR=/run/netns
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		dobin ip/ip
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}"/$(get_libdir) \
-		SBINDIR="${EPREFIX}"/sbin \
-		CONFDIR="${EPREFIX}"/etc/iproute2 \
-		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
-		MANDIR="${EPREFIX}"/usr/share/man \
-		ARPDDIR="${EPREFIX}"/var/lib/arpd \
-		install
-
-	dodir /bin
-	mv "${ED}"/{s,}bin/ip || die #330115
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-	# This local header pulls in a lot of linux headers it
-	# doesn't directly need.  Delete this header that requires
-	# linux-headers-3.8 until that goes stable.  #467716
-	sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
-
-	if use berkdb ; then
-		keepdir /var/lib/arpd
-		# bug 47482, arpd doesn't need to be in /sbin
-		dodir /usr/bin
-		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
-	elif [[ -d "${ED}"/var/lib/arpd ]]; then
-		rmdir --ignore-fail-on-non-empty -p "${ED}"/var/lib/arpd || die
-	fi
-}


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/files/, sys-apps/iproute2/
@ 2021-09-01  7:17 Lars Wendler
  0 siblings, 0 replies; 18+ messages in thread
From: Lars Wendler @ 2021-09-01  7:17 UTC (permalink / raw
  To: gentoo-commits

commit:     1efc25075df9726cab1467d87848a6eda46adce5
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Sep  1 07:17:03 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Sep  1 07:17:26 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1efc2507

sys-apps/iproute2: Removed old

Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 sys-apps/iproute2/Manifest                         |   2 -
 .../files/iproute2-5.1.0-portability.patch         |  32 ---
 .../files/iproute2-5.10.0-configure-nomagic.patch  | 226 ---------------------
 sys-apps/iproute2/iproute2-5.10.0-r2.ebuild        | 168 ---------------
 sys-apps/iproute2/iproute2-5.12.0-r1.ebuild        | 170 ----------------
 5 files changed, 598 deletions(-)

diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest
index 7d50a0780cd..144ab4b2b34 100644
--- a/sys-apps/iproute2/Manifest
+++ b/sys-apps/iproute2/Manifest
@@ -1,4 +1,2 @@
-DIST iproute2-5.10.0.tar.xz 798776 BLAKE2B 8c17e65f03427f45b71dc17b289b272545549a6687257498676a23e4fdc4a590a7215bfdba3c7ac4b1ccde6c38ba8e3eb222eea2532374fa9680633aa198d347 SHA512 a468eefa797898b6de452212aa432c0a931434defacae5fb4335754c1292c5d86a8c8dbf3017f90cec266d71a2a17ae469aac17e1a85a5cbddc70814313e4c13
-DIST iproute2-5.12.0.tar.xz 835880 BLAKE2B 8e3e1b7188d7ab5014d06d7edaae2cb0c1dc65862999a2ca9f31902256d7f3d166de8a1c76e4e137acce2b445d72ea6850bfec3640d1919cb82351d45dd3e47e SHA512 9249beb67b30ceef178b60b2b61a5e6c45277e747ae4c865e739b7ab84192549e8e94ebaee43c0a87c0291037746ffb6936346245220786e369201ee13d60fac
 DIST iproute2-5.13.0.tar.xz 845236 BLAKE2B e1c148e2a720236163e7f4d46aa38d244a02ae36ad86571c5606d54c9ccfd8d0363e2fb793d48cf39aae322b3c36b9f8a43eaf570dbdb8243092926cef3d2786 SHA512 a3286639fb303a7c3c553cb5df0a7336c4c67e53eb05e872d2776b771dbfa36ffdf2df140f570275db6785c882992f469f8eb34a5b506aac876216df7dde245d
 DIST iproute2-5.14.0.tar.xz 853572 BLAKE2B 52544021798f2cb716a57998d98dadc2441142b02d38c7e274bc17a6e5f994bdb5bd3ebf0b896bfd7e327a44f00f92c2af8e67367cdc0aac70769d563082f543 SHA512 e2b9b0a2c3e6fc4c67cb50b0a9bf710e749648b83369a49bf905edd7e519d76c50c2cc818bb63cc605c409c66075d4d371f2371796e5f7a8f9d04101b80ef75c

diff --git a/sys-apps/iproute2/files/iproute2-5.1.0-portability.patch b/sys-apps/iproute2/files/iproute2-5.1.0-portability.patch
deleted file mode 100644
index e704f65c113..00000000000
--- a/sys-apps/iproute2/files/iproute2-5.1.0-portability.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 202d79fcf4e184818bd074f8c06e94e700670898 Mon Sep 17 00:00:00 2001
-From: Jory Pratt <anarchy@gentoo.org>
-Date: Tue, 11 Jun 2019 01:48:01 -0500
-Subject: [PATCH] including sysinfo.h from kernel.h makes no sense whatsoever,
- but removing it breaks glibc's userspace header, which includes kernel.h
- instead of sysinfo.h from their sys/sysinfo.h. this seems to be a historical
- mistake. on musl, including any header that uses kernel.h directly or
- indirectly plus sys/sysinfo.h will produce a compile error due to
- redefinition of struct sysinfo. so for now, only include it on glibc in order
- not to break their headers.
-
-Signed-off-by: Jory Pratt <anarchy@gentoo.org>
----
- include/uapi/linux/kernel.h | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/include/uapi/linux/kernel.h b/include/uapi/linux/kernel.h
-index d99ffa1..f917115 100644
---- a/include/uapi/linux/kernel.h
-+++ b/include/uapi/linux/kernel.h
-@@ -2,7 +2,9 @@
- #ifndef _LINUX_KERNEL_H
- #define _LINUX_KERNEL_H
- 
-+#ifdef __GLIBC__
- #include <linux/sysinfo.h>
-+#endif
- 
- /*
-  * 'kernel.h' contains some often-used function prototypes etc
--- 
-2.22.0

diff --git a/sys-apps/iproute2/files/iproute2-5.10.0-configure-nomagic.patch b/sys-apps/iproute2/files/iproute2-5.10.0-configure-nomagic.patch
deleted file mode 100644
index cf8ca335f21..00000000000
--- a/sys-apps/iproute2/files/iproute2-5.10.0-configure-nomagic.patch
+++ /dev/null
@@ -1,226 +0,0 @@
-The hand-rolled configure script, for multiple options (selinux,mnl,elf), sets
-a variable as well as modifying CFLAGS & LDLIBS.
-
-If config.mk is later amended to disable a feature, the CFLAGS/LDLIBS tweaks
-are still in place.
-
-Push the CFLAGS/LDLIBS changes into new conditional Makefile code, so that they
-are only passed when correctly needed.
-
-Prior Gentoo testcase for reproduction:
-USE=minimal ebuild ... compile.
-- Linking with libelf, libmnl & libcap based only on presence.
-- Links based on libselinux based only on presence.
-
-Closes: https://bugs.gentoo.org/643722
-Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-
-Forward-ported from v4.14.1 to v4.16.0 by Lars Wendler <polynomial-c@gentoo.org>
-Added libcap to v4.17.0 by Lars Wendler <polynomial-c@gentoo.org>
-Forward-ported from v4.17.0 to v4.20.0 by Lars Wendler <polynomial-c@gentoo.org>
-Forward-ported from v4.20.0 to v5.10.0 by Lars Wendler <polynomial-c@gentoo.org>
-
---- iproute2-5.10.0/bridge/Makefile
-+++ iproute2-5.10.0/bridge/Makefile
-@@ -2,6 +2,7 @@
- BROBJ = bridge.o fdb.o monitor.o link.o mdb.o vlan.o
- 
- include ../config.mk
-+include ../config.include
- 
- all: bridge
- 
---- iproute2-5.10.0/config.include
-+++ iproute2-5.10.0/config.include
-@@ -0,0 +1,32 @@
-+# We can only modify CFLAGS/LDLIBS after all the config options are known.
-+ifeq ($(IP_CONFIG_SETNS),y)
-+	CFLAGS += $(IP_CONFIG_SETNS_CFLAGS)
-+endif
-+ifeq ($(HAVE_ELF),y)
-+	CFLAGS += $(HAVE_ELF_CFLAGS)
-+	LDLIBS += $(HAVE_ELF_LDLIBS)
-+endif
-+ifeq ($(HAVE_SELINUX),y)
-+	CFLAGS += $(HAVE_SELINUX_CFLAGS)
-+	LDLIBS += $(HAVE_SELINUX_LDLIBS)
-+endif
-+ifeq ($(HAVE_MNL),y)
-+	CFLAGS += $(HAVE_MNL_CFLAGS)
-+	LDLIBS += $(HAVE_MNL_LDLIBS)
-+endif
-+ifeq ($(HAVE_CAP),y)
-+	CFLAGS += $(HAVE_CAP_CFLAGS)
-+	LDLIBS += $(HAVE_CAP_LDLIBS)
-+endif
-+ifeq ($(HAVE_LIBBSD),y)
-+	CFLAGS += $(HAVE_LIBBSD_CFLAGS)
-+	LDLIBS += $(HAVE_LIBBSD_LDLIBS)
-+else
-+	CFLAGS += -DNEED_STRLCPY
-+endif
-+	
-+# Rules can only be declared after all variables in them are known.
-+%.o: %.c
-+	$(QUIET_CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CPPFLAGS) -c -o $@ $<
-+
-+# vim: ft=make:
---- iproute2-5.10.0/configure
-+++ iproute2-5.10.0/configure
-@@ -190,7 +190,7 @@
-     if $CC -I$INCLUDE -o $TMPDIR/setnstest $TMPDIR/setnstest.c >/dev/null 2>&1; then
- 	echo "IP_CONFIG_SETNS:=y" >>$CONFIG
- 	echo "yes"
--	echo "CFLAGS += -DHAVE_SETNS" >>$CONFIG
-+	echo "IP_CONFIG_SETNS_CFLAGS += -DHAVE_SETNS" >>$CONFIG
-     else
- 	echo "no"
-     fi
-@@ -233,8 +233,8 @@
- 	echo "HAVE_ELF:=y" >>$CONFIG
- 	echo "yes"
- 
--	echo 'CFLAGS += -DHAVE_ELF' `${PKG_CONFIG} libelf --cflags` >> $CONFIG
--	echo 'LDLIBS += ' `${PKG_CONFIG} libelf --libs` >>$CONFIG
-+	echo 'HAVE_ELF_CFLAGS += -DHAVE_ELF' `${PKG_CONFIG} libelf --cflags` >> $CONFIG
-+	echo 'HAVE_ELF_LDLIBS += ' `${PKG_CONFIG} libelf --libs` >>$CONFIG
-     else
- 	echo "no"
-     fi
-@@ -247,8 +247,8 @@
- 		echo "HAVE_SELINUX:=y" >>$CONFIG
- 		echo "yes"
- 
--		echo 'LDLIBS +=' `${PKG_CONFIG} --libs libselinux` >>$CONFIG
--		echo 'CFLAGS += -DHAVE_SELINUX' `${PKG_CONFIG} --cflags libselinux` >>$CONFIG
-+		echo 'HAVE_SELINUX_CFLAGS += -DHAVE_SELINUX' `${PKG_CONFIG} --cflags libselinux` >>$CONFIG
-+		echo 'HAVE_SELINUX_LDLIBS +=' `${PKG_CONFIG} --libs libselinux` >>$CONFIG
- 	else
- 		echo "no"
- 	fi
-@@ -260,8 +260,8 @@
- 		echo "HAVE_MNL:=y" >>$CONFIG
- 		echo "yes"
- 
--		echo 'CFLAGS += -DHAVE_LIBMNL' `${PKG_CONFIG} libmnl --cflags` >>$CONFIG
--		echo 'LDLIBS +=' `${PKG_CONFIG} libmnl --libs` >> $CONFIG
-+		echo 'HAVE_MNL_CFLAGS += -DHAVE_LIBMNL' `${PKG_CONFIG} libmnl --cflags` >>$CONFIG
-+		echo 'HAVE_MNL_LDLIBS +=' `${PKG_CONFIG} libmnl --libs` >> $CONFIG
- 	else
- 		echo "no"
- 	fi
-@@ -301,8 +301,8 @@
- 	echo "no"
-     else
- 	if ${PKG_CONFIG} libbsd --exists; then
--		echo 'CFLAGS += -DHAVE_LIBBSD' `${PKG_CONFIG} libbsd --cflags` >>$CONFIG
--		echo 'LDLIBS +=' `${PKG_CONFIG} libbsd --libs` >> $CONFIG
-+		echo 'HAVE_LIBBSD_CFLAGS += -DHAVE_LIBBSD' `${PKG_CONFIG} libbsd --cflags` >>$CONFIG
-+		echo 'HAVE_LIBBSD_LDLIBS +=' `${PKG_CONFIG} libbsd --libs` >> $CONFIG
- 		echo "no"
- 	else
- 		echo 'CFLAGS += -DNEED_STRLCPY' >>$CONFIG
-@@ -318,8 +318,8 @@
- 		echo "HAVE_CAP:=y" >>$CONFIG
- 		echo "yes"
- 
--		echo 'CFLAGS += -DHAVE_LIBCAP' `${PKG_CONFIG} libcap --cflags` >>$CONFIG
--		echo 'LDLIBS +=' `${PKG_CONFIG} libcap --libs` >> $CONFIG
-+		echo 'HAVE_CAP_CFLAGS += -DHAVE_LIBCAP' `${PKG_CONFIG} libcap --cflags` >>$CONFIG
-+		echo 'HAVE_CAP_LDLIBS +=' `${PKG_CONFIG} libcap --libs` >> $CONFIG
- 	else
- 		echo "no"
- 	fi
-@@ -399,7 +399,3 @@
- 
- echo -n "libcap support: "
- check_cap
--
--echo >> $CONFIG
--echo "%.o: %.c" >> $CONFIG
--echo '	$(QUIET_CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CPPFLAGS) -c -o $@ $<' >> $CONFIG
---- iproute2-5.10.0/devlink/Makefile
-+++ iproute2-5.10.0/devlink/Makefile
-@@ -1,5 +1,6 @@
- # SPDX-License-Identifier: GPL-2.0
- include ../config.mk
-+include ../config.include
- 
- TARGETS :=
- 
---- iproute2-5.10.0/genl/Makefile
-+++ iproute2-5.10.0/genl/Makefile
-@@ -2,6 +2,7 @@
- GENLOBJ=genl.o
- 
- include ../config.mk
-+include ../config.include
- SHARED_LIBS ?= y
- 
- CFLAGS += -fno-strict-aliasing
---- iproute2-5.10.0/ip/Makefile
-+++ iproute2-5.10.0/ip/Makefile
-@@ -16,6 +16,7 @@
- RTMONOBJ=rtmon.o
- 
- include ../config.mk
-+include ../config.include
- 
- ALLOBJ=$(IPOBJ) $(RTMONOBJ)
- SCRIPTS=ifcfg rtpr routel routef
---- iproute2-5.10.0/lib/Makefile
-+++ iproute2-5.10.0/lib/Makefile
-@@ -1,5 +1,6 @@
- # SPDX-License-Identifier: GPL-2.0
- include ../config.mk
-+include ../config.include
- 
- CFLAGS += -fPIC
- 
---- iproute2-5.10.0/misc/Makefile
-+++ iproute2-5.10.0/misc/Makefile
-@@ -5,6 +5,7 @@
- TARGETS=ss nstat ifstat rtacct lnstat
- 
- include ../config.mk
-+include ../config.include
- 
- ifeq ($(HAVE_BERKELEY_DB),y)
- 	TARGETS += arpd
---- iproute2-5.10.0/netem/Makefile
-+++ iproute2-5.10.0/netem/Makefile
-@@ -1,5 +1,6 @@
- # SPDX-License-Identifier: GPL-2.0
- include ../config.mk
-+include ../config.include
- 
- DISTGEN = maketable normal pareto paretonormal
- DISTDATA = normal.dist pareto.dist paretonormal.dist experimental.dist
---- iproute2-5.10.0/rdma/Makefile
-+++ iproute2-5.10.0/rdma/Makefile
-@@ -1,5 +1,6 @@
- # SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
- include ../config.mk
-+include ../config.include
- 
- TARGETS :=
- 
---- iproute2-5.10.0/tc/Makefile
-+++ iproute2-5.10.0/tc/Makefile
-@@ -4,6 +4,7 @@
-        emp_ematch.tab.o emp_ematch.lex.o
- 
- include ../config.mk
-+include ../config.include
- 
- SHARED_LIBS ?= y
- 
---- iproute2-5.10.0/tipc/Makefile
-+++ iproute2-5.10.0/tipc/Makefile
-@@ -1,5 +1,6 @@
- # SPDX-License-Identifier: GPL-2.0
- include ../config.mk
-+include ../config.include
- 
- TARGETS :=
- 

diff --git a/sys-apps/iproute2/iproute2-5.10.0-r2.ebuild b/sys-apps/iproute2/iproute2-5.10.0-r2.ebuild
deleted file mode 100644
index 09e05b28c60..00000000000
--- a/sys-apps/iproute2/iproute2-5.10.0-r2.ebuild
+++ /dev/null
@@ -1,168 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit toolchain-funcs flag-o-matic multilib
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-r3
-else
-	SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz"
-	KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-fi
-
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb caps elf +iptables ipv6 libbsd minimal selinux"
-
-# We could make libmnl optional, but it's tiny, so eh
-RDEPEND="
-	!net-misc/arpd
-	!minimal? ( net-libs/libmnl:= )
-	atm? ( net-dialup/linux-atm )
-	berkdb? ( sys-libs/db:= )
-	caps? ( sys-libs/libcap )
-	elf? ( virtual/libelf:= )
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	libbsd? ( dev-libs/libbsd )
-	selinux? ( sys-libs/libselinux )
-"
-# We require newer linux-headers for ipset support #549948 and some defines #553876
-DEPEND="
-	${RDEPEND}
-	>=sys-kernel/linux-headers-3.16
-"
-BDEPEND="
-	app-arch/xz-utils
-	>=sys-devel/bison-2.4
-	sys-devel/flex
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-	"${FILESDIR}"/${PN}-5.10.0-configure-nomagic.patch # bug 643722
-	"${FILESDIR}"/${PN}-5.1.0-portability.patch
-	"${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
-)
-
-src_prepare() {
-	if ! use ipv6 ; then
-		PATCHES+=(
-			"${FILESDIR}"/${PN}-4.20.0-no-ipv6.patch #326849
-		)
-	fi
-
-	default
-
-	# Fix version if necessary
-	local versionfile="include/version.h"
-	if ! grep -Fq "${PV}" ${versionfile} ; then
-		einfo "Fixing version string"
-		sed "s@\"[[:digit:]\.]\+\"@\"${PV}\"@" \
-			-i ${versionfile} || die
-	fi
-
-	# echo -n is not POSIX compliant
-	sed 's@echo -n@printf@' -i configure || die
-
-	sed -i \
-		-e '/^CC :\?=/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s|-O2|${CFLAGS} ${CPPFLAGS}|" \
-		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
-		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
-		Makefile || die
-
-	# build against system headers
-	rm -r include/netinet || die #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
-
-	if use minimal ; then
-		sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile || die
-	fi
-}
-
-src_configure() {
-	tc-export AR CC PKG_CONFIG
-
-	# This sure is ugly.  Should probably move into toolchain-funcs at some point.
-	local setns
-	pushd "${T}" >/dev/null
-	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
-	echo 'int main(){return 0;}' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
-	popd >/dev/null
-
-	# run "configure" script first which will create "config.mk"...
-	econf
-
-	# ...now switch on/off requested features via USE flags
-	# this is only useful if the test did not set other things, per bug #643722
-	cat <<-EOF >> config.mk
-	TC_CONFIG_ATM := $(usex atm y n)
-	TC_CONFIG_XT  := $(usex iptables y n)
-	TC_CONFIG_NO_XT := $(usex iptables n y)
-	# We've locked in recent enough kernel headers #549948
-	TC_CONFIG_IPSET := y
-	HAVE_BERKELEY_DB := $(usex berkdb y n)
-	HAVE_CAP      := $(usex caps y n)
-	HAVE_MNL      := $(usex minimal n y)
-	HAVE_ELF      := $(usex elf y n)
-	HAVE_SELINUX  := $(usex selinux y n)
-	IP_CONFIG_SETNS := ${setns}
-	# Use correct iptables dir, #144265 #293709
-	IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
-	HAVE_LIBBSD   := $(usex libbsd y n)
-	EOF
-}
-
-src_compile() {
-	emake V=1 NETNS_RUN_DIR=/run/netns
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		dobin ip/ip
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}"/$(get_libdir) \
-		SBINDIR="${EPREFIX}"/sbin \
-		CONFDIR="${EPREFIX}"/etc/iproute2 \
-		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
-		MANDIR="${EPREFIX}"/usr/share/man \
-		ARPDDIR="${EPREFIX}"/var/lib/arpd \
-		install
-
-	dodir /bin
-	mv "${ED}"/{s,}bin/ip || die #330115
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-	# This local header pulls in a lot of linux headers it
-	# doesn't directly need.  Delete this header that requires
-	# linux-headers-3.8 until that goes stable.  #467716
-	sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
-
-	if use berkdb ; then
-		keepdir /var/lib/arpd
-		# bug 47482, arpd doesn't need to be in /sbin
-		dodir /usr/bin
-		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
-	elif [[ -d "${ED}"/var/lib/arpd ]]; then
-		rmdir --ignore-fail-on-non-empty -p "${ED}"/var/lib/arpd || die
-	fi
-}

diff --git a/sys-apps/iproute2/iproute2-5.12.0-r1.ebuild b/sys-apps/iproute2/iproute2-5.12.0-r1.ebuild
deleted file mode 100644
index 14d225e3e58..00000000000
--- a/sys-apps/iproute2/iproute2-5.12.0-r1.ebuild
+++ /dev/null
@@ -1,170 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit toolchain-funcs flag-o-matic multilib
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-r3
-else
-	SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-fi
-
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb bpf caps elf +iptables ipv6 libbsd minimal selinux"
-
-# We could make libmnl optional, but it's tiny, so eh
-RDEPEND="
-	!net-misc/arpd
-	!minimal? ( net-libs/libmnl:= )
-	atm? ( net-dialup/linux-atm )
-	berkdb? ( sys-libs/db:= )
-	bpf? ( dev-libs/libbpf:= )
-	caps? ( sys-libs/libcap )
-	elf? ( virtual/libelf:= )
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	libbsd? ( dev-libs/libbsd )
-	selinux? ( sys-libs/libselinux )
-"
-# We require newer linux-headers for ipset support #549948 and some defines #553876
-DEPEND="
-	${RDEPEND}
-	>=sys-kernel/linux-headers-3.16
-"
-BDEPEND="
-	app-arch/xz-utils
-	>=sys-devel/bison-2.4
-	sys-devel/flex
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-	"${FILESDIR}"/${PN}-5.12.0-configure-nomagic.patch # bug 643722
-	#"${FILESDIR}"/${PN}-5.1.0-portability.patch
-	"${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
-)
-
-src_prepare() {
-	if ! use ipv6 ; then
-		PATCHES+=(
-			"${FILESDIR}"/${PN}-4.20.0-no-ipv6.patch #326849
-		)
-	fi
-
-	default
-
-	# Fix version if necessary
-	local versionfile="include/version.h"
-	if [[ "${PV}" != 9999 ]] && ! grep -Fq "${PV}" ${versionfile} ; then
-		einfo "Fixing version string"
-		sed "s@\"[[:digit:]\.]\+\"@\"${PV}\"@" \
-			-i ${versionfile} || die
-	fi
-
-	# echo -n is not POSIX compliant
-	sed 's@echo -n@printf@' -i configure || die
-
-	sed -i \
-		-e '/^CC :\?=/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s|-O2|${CFLAGS} ${CPPFLAGS}|" \
-		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
-		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
-		Makefile || die
-
-	# build against system headers
-	rm -r include/netinet || die #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
-
-	if use minimal ; then
-		sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile || die
-	fi
-}
-
-src_configure() {
-	tc-export AR CC PKG_CONFIG
-
-	# This sure is ugly.  Should probably move into toolchain-funcs at some point.
-	local setns
-	pushd "${T}" >/dev/null
-	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
-	echo 'int main(){return 0;}' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
-	popd >/dev/null
-
-	# run "configure" script first which will create "config.mk"...
-	LIBBPF_FORCE="$(usex bpf on off)" \
-	econf
-
-	# ...now switch on/off requested features via USE flags
-	# this is only useful if the test did not set other things, per bug #643722
-	cat <<-EOF >> config.mk
-	TC_CONFIG_ATM := $(usex atm y n)
-	TC_CONFIG_XT  := $(usex iptables y n)
-	TC_CONFIG_NO_XT := $(usex iptables n y)
-	# We've locked in recent enough kernel headers #549948
-	TC_CONFIG_IPSET := y
-	HAVE_BERKELEY_DB := $(usex berkdb y n)
-	HAVE_CAP      := $(usex caps y n)
-	HAVE_MNL      := $(usex minimal n y)
-	HAVE_ELF      := $(usex elf y n)
-	HAVE_SELINUX  := $(usex selinux y n)
-	IP_CONFIG_SETNS := ${setns}
-	# Use correct iptables dir, #144265 #293709
-	IPT_LIB_DIR   := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
-	HAVE_LIBBSD   := $(usex libbsd y n)
-	EOF
-}
-
-src_compile() {
-	emake V=1 NETNS_RUN_DIR=/run/netns
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		dobin ip/ip
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}"/$(get_libdir) \
-		SBINDIR="${EPREFIX}"/sbin \
-		CONFDIR="${EPREFIX}"/etc/iproute2 \
-		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
-		MANDIR="${EPREFIX}"/usr/share/man \
-		ARPDDIR="${EPREFIX}"/var/lib/arpd \
-		install
-
-	dodir /bin
-	mv "${ED}"/{s,}bin/ip || die #330115
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-	# This local header pulls in a lot of linux headers it
-	# doesn't directly need.  Delete this header that requires
-	# linux-headers-3.8 until that goes stable.  #467716
-	sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
-
-	if use berkdb ; then
-		keepdir /var/lib/arpd
-		# bug 47482, arpd doesn't need to be in /sbin
-		dodir /usr/bin
-		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
-	elif [[ -d "${ED}"/var/lib/arpd ]]; then
-		rmdir --ignore-fail-on-non-empty -p "${ED}"/var/lib/arpd || die
-	fi
-}


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/files/, sys-apps/iproute2/
@ 2022-12-21  0:08 Sam James
  0 siblings, 0 replies; 18+ messages in thread
From: Sam James @ 2022-12-21  0:08 UTC (permalink / raw
  To: gentoo-commits

commit:     ce0dfb3cce25546092a9a6823bfc06e3093bdf53
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 21 00:07:53 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec 21 00:08:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce0dfb3c

sys-apps/iproute2: drop 5.18.0-r1, 5.19.0-r3

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-apps/iproute2/Manifest                         |   2 -
 sys-apps/iproute2/files/iproute2-5.19.0-musl.patch |  48 -----
 .../files/iproute2-5.19.0-setns-check.patch        |  22 ---
 sys-apps/iproute2/iproute2-5.18.0-r1.ebuild        | 210 --------------------
 sys-apps/iproute2/iproute2-5.19.0-r3.ebuild        | 217 ---------------------
 5 files changed, 499 deletions(-)

diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest
index 3c1eef3d4d4b..400bac3c4a10 100644
--- a/sys-apps/iproute2/Manifest
+++ b/sys-apps/iproute2/Manifest
@@ -1,5 +1,3 @@
 DIST iproute2-5.15.0.tar.xz 858068 BLAKE2B bca20ac53e1b2b3ae06186f655ad5073a0e691ed7b3aab25c4fbc118847b72a8a522175732cd22d8ec27480d1ab142319e80a5c3628434bec21260e585e1591d SHA512 e94918fa10e523224b965c7cb5303a101745e89c90d149d2d9876a002b2a894b1c689c519dc22168f3d334c3ee0810c59ec43223baab3d5f4c56f017d6281f22
-DIST iproute2-5.18.0.tar.xz 880456 BLAKE2B 21b15d84b07199d4ddd12cbf14d94806a073f4eda659958a8459ef2ca8becbef8638dac2550cc53893cd147888b6a3b738256dac074307b37ebec8dbb460e600 SHA512 7b43c89741a8ffe8fd529ac4ee19c8eab7dce2f064de494c160c75456ffb960fb5f1e78c868ab98360dafde28d5e2c4d58177135b6d380e80e06eba9e3eaf068
-DIST iproute2-5.19.0.tar.xz 892696 BLAKE2B ee287065d7c33c0fa97f0fc130bb3a4a3ad5ac9417ad74ce8489e64ec146ff97749d79bb6563043c8835eab91a51631576441d450693cb50808ad0d37b2ea648 SHA512 eb0fffb153f7cecc89b5573b7fc211d67fb1c06789fd3b0aec75ba5032521d53c51ccc52db7367e41397993df50244af84763b0b1d5a76d9dfccf013c010131b
 DIST iproute2-6.0.0.tar.xz 900312 BLAKE2B 1cfb9b5a7892dec2b35e0eadbd957083e95fdc5077a1aa193329801ff25f9ed90a1fc4152756547be1fab8fe18d9a399001a4c3a61e951f64946156af6a90bae SHA512 be30362b0df6906aa786f935d5f555b8b86c747fe05314066f4180ab2f7c952ae227b7cf04c15e75d8f99ca17bafb7c8dc0fb1c18f3a9e3222d98716bb449f7a
 DIST iproute2-6.1.0.tar.xz 905512 BLAKE2B 38249703e0a9ba74405aebdb97560b286deefa959a9c3f0e0893962b6966f5da2da46199dda6a0f9584bb473f8ba529440643d97f66e9b7619df029e3091d163 SHA512 4e4d3b5e1e1a5444f42671c1e6caee072e80063e34e37386695f76f85a1ab662f4513050814006e5154426cbaadfba1d86b0be14e65978d5e670a16446047b28

diff --git a/sys-apps/iproute2/files/iproute2-5.19.0-musl.patch b/sys-apps/iproute2/files/iproute2-5.19.0-musl.patch
deleted file mode 100644
index e907ba9454bf..000000000000
--- a/sys-apps/iproute2/files/iproute2-5.19.0-musl.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-https://bugs.gentoo.org/864771
-https://github.com/shemminger/iproute2/commit/cf6b60c504d4be5e1df2b2745e55d677967831d0
-https://github.com/shemminger/iproute2/commit/28c740473510cd911b97cc5d7d23bd809a0f200b
-
-From cf6b60c504d4be5e1df2b2745e55d677967831d0 Mon Sep 17 00:00:00 2001
-From: Changhyeok Bae <changhyeok.bae@gmail.com>
-Date: Tue, 9 Aug 2022 04:01:05 +0000
-Subject: [PATCH] ipstats: Add param.h for musl
-
-Fix build error for musl
-| /usr/src/debug/iproute2/5.19.0-r0/iproute2-5.19.0/ip/ipstats.c:231: undefined reference to `MIN'
-
-Signed-off-by: Changhyeok Bae <changhyeok.bae@gmail.com>
---- a/ip/ipstats.c
-+++ b/ip/ipstats.c
-@@ -1,6 +1,7 @@
- // SPDX-License-Identifier: GPL-2.0+
- #include <assert.h>
- #include <errno.h>
-+#include <sys/param.h>
- 
- #include "list.h"
- #include "utils.h"
-
-From 28c740473510cd911b97cc5d7d23bd809a0f200b Mon Sep 17 00:00:00 2001
-From: Stephen Hemminger <stephen@networkplumber.org>
-Date: Tue, 9 Aug 2022 13:27:33 -0700
-Subject: [PATCH] ipstats: add missing headers
-
-IWYU reports several headers are not explicitly
-included by ipstats.
-
-Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---- a/ip/ipstats.c
-+++ b/ip/ipstats.c
-@@ -1,7 +1,11 @@
- // SPDX-License-Identifier: GPL-2.0+
-+#include <alloca.h>
- #include <assert.h>
- #include <errno.h>
-+#include <stdio.h>
-+#include <string.h>
- #include <sys/param.h>
-+#include <sys/socket.h>
- 
- #include "list.h"
- #include "utils.h"
-

diff --git a/sys-apps/iproute2/files/iproute2-5.19.0-setns-check.patch b/sys-apps/iproute2/files/iproute2-5.19.0-setns-check.patch
deleted file mode 100644
index ff97d12195e2..000000000000
--- a/sys-apps/iproute2/files/iproute2-5.19.0-setns-check.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-https://github.com/shemminger/iproute2/commit/d5fe96ab70928508f072a47449e9b641e46de323
-
-From d5fe96ab70928508f072a47449e9b641e46de323 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 10 Aug 2022 22:34:40 -0700
-Subject: [PATCH] configure: Define _GNU_SOURCE when checking for setns
-
-glibc defines this function only as gnu extention
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---- a/configure
-+++ b/configure
-@@ -191,6 +191,7 @@ check_ipt_lib_dir()
- check_setns()
- {
-     cat >$TMPDIR/setnstest.c <<EOF
-+#define _GNU_SOURCE
- #include <sched.h>
- int main(int argc, char **argv)
- {
-

diff --git a/sys-apps/iproute2/iproute2-5.18.0-r1.ebuild b/sys-apps/iproute2/iproute2-5.18.0-r1.ebuild
deleted file mode 100644
index c0e45a9ec79e..000000000000
--- a/sys-apps/iproute2/iproute2-5.18.0-r1.ebuild
+++ /dev/null
@@ -1,210 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit eapi8-dosym edo toolchain-funcs
-
-if [[ ${PV} == 9999 ]] ; then
-	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-r3
-else
-	SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-fi
-
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb bpf caps elf +iptables libbsd minimal nfs selinux split-usr"
-
-# We could make libmnl optional, but it's tiny, so eh
-RDEPEND="
-	!net-misc/arpd
-	!minimal? ( net-libs/libmnl:= )
-	atm? ( net-dialup/linux-atm )
-	berkdb? ( sys-libs/db:= )
-	bpf? ( dev-libs/libbpf:= )
-	caps? ( sys-libs/libcap )
-	elf? ( virtual/libelf:= )
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	libbsd? ( dev-libs/libbsd )
-	nfs? ( net-libs/libtirpc:= )
-	selinux? ( sys-libs/libselinux )
-"
-# We require newer linux-headers for ipset support (bug #549948) and some defines (bug #553876)
-DEPEND="
-	${RDEPEND}
-	>=sys-kernel/linux-headers-3.16
-"
-BDEPEND="
-	app-arch/xz-utils
-	>=sys-devel/bison-2.4
-	sys-devel/flex
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.1.0-mtu.patch # bug #291907
-	"${FILESDIR}"/${PN}-5.12.0-configure-nomagic.patch # bug #643722
-	#"${FILESDIR}"/${PN}-5.1.0-portability.patch
-	"${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
-)
-
-src_prepare() {
-	default
-
-	# Fix version if necessary
-	local versionfile="include/version.h"
-	if [[ ${PV} != 9999 ]] && ! grep -Fq "${PV}" ${versionfile} ; then
-		einfo "Fixing version string"
-		sed "s@\"[[:digit:]\.]\+\"@\"${PV}\"@" \
-			-i ${versionfile} || die
-	fi
-
-	# echo -n is not POSIX compliant
-	sed 's@echo -n@printf@' -i configure || die
-
-	sed -i \
-		-e '/^CC :\?=/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s|-O2|${CFLAGS} ${CPPFLAGS}|" \
-		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
-		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
-		Makefile || die
-
-	# Build against system headers
-	rm -r include/netinet || die #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
-
-	if use minimal ; then
-		sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile || die
-	fi
-}
-
-src_configure() {
-	tc-export AR CC PKG_CONFIG
-
-	# This sure is ugly. Should probably move into toolchain-funcs at some point.
-	local setns
-	pushd "${T}" >/dev/null || die
-	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c || die
-	if ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null ; then
-		setns=y
-	else
-		setns=n
-	fi
-
-	echo 'int main(){return 0;}' > test.c || die
-	if ! ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null ; then
-		sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile || die
-	fi
-	popd >/dev/null || die
-
-	# run "configure" script first which will create "config.mk"...
-	# Using econf breaks since 5.14.0 (a9c3d70d902a0473ee5c13336317006a52ce8242)
-	edo ./configure --libbpf_force $(usex bpf on off)
-
-	# Remove the definitions made by configure and allow them to be overridden
-	# by USE flags below.
-	# We have to do the cheesy only-sed-if-disabled because otherwise
-	# the *_FLAGS etc stuff found by configure will be used but result
-	# in a broken build.
-	if ! use berkdb ; then
-		sed -i -e '/HAVE_BERKELEY_DB/d' config.mk || die
-	fi
-
-	if ! use caps ; then
-		sed -i -e '/HAVE_CAP/d' config.mk || die
-	fi
-
-	if use minimal ; then
-		sed -i -e '/HAVE_MNL/d' config.mk || die
-	fi
-
-	if ! use elf ; then
-		sed -i -e '/HAVE_ELF/d' config.mk || die
-	fi
-
-	if ! use nfs ; then
-		sed -i -e '/HAVE_RPC/d' config.mk || die
-	fi
-
-	if ! use selinux ; then
-		sed -i -e '/HAVE_SELINUX/d' config.mk || die
-	fi
-
-	if ! use libbsd ; then
-		sed -i -e '/HAVE_LIBBSD/d' config.mk || die
-	fi
-
-	# ...Now switch on/off requested features via USE flags
-	# this is only useful if the test did not set other things, per bug #643722
-	# Keep in sync with ifs above, or refactor to be unified.
-	cat <<-EOF >> config.mk
-	TC_CONFIG_ATM := $(usex atm y n)
-	TC_CONFIG_XT  := $(usex iptables y n)
-	TC_CONFIG_NO_XT := $(usex iptables n y)
-	# We've locked in recent enough kernel headers, bug #549948
-	TC_CONFIG_IPSET := y
-	HAVE_BERKELEY_DB := $(usex berkdb y n)
-	HAVE_CAP      := $(usex caps y n)
-	HAVE_MNL      := $(usex minimal n y)
-	HAVE_ELF      := $(usex elf y n)
-	HAVE_RPC      := $(usex nfs y n)
-	HAVE_SELINUX  := $(usex selinux y n)
-	IP_CONFIG_SETNS := ${setns}
-	# Use correct iptables dir, bug #144265, bug #293709
-	IPT_LIB_DIR   := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
-	HAVE_LIBBSD   := $(usex libbsd y n)
-	EOF
-}
-
-src_compile() {
-	emake V=1 NETNS_RUN_DIR=/run/netns
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		dobin ip/ip
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}"/$(get_libdir) \
-		SBINDIR="${EPREFIX}"/sbin \
-		CONFDIR="${EPREFIX}"/etc/iproute2 \
-		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
-		MANDIR="${EPREFIX}"/usr/share/man \
-		ARPDDIR="${EPREFIX}"/var/lib/arpd \
-		install
-
-	dodir /bin
-	mv "${ED}"/{s,}bin/ip || die # bug #330115
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-
-	if use split-usr ; then
-		# Can remove compatibility symlink in a year: 2023-05-28.
-		# bug #547264
-		mv "${ED}"/sbin/ss "${ED}"/bin/ss || die
-		dosym8 -r /bin/ss /sbin/ss
-	fi
-
-	if use berkdb ; then
-		keepdir /var/lib/arpd
-		# bug #47482, arpd doesn't need to be in /sbin
-		dodir /usr/bin
-		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
-	elif [[ -d "${ED}"/var/lib/arpd ]]; then
-		rmdir --ignore-fail-on-non-empty -p "${ED}"/var/lib/arpd || die
-	fi
-}

diff --git a/sys-apps/iproute2/iproute2-5.19.0-r3.ebuild b/sys-apps/iproute2/iproute2-5.19.0-r3.ebuild
deleted file mode 100644
index a201d0f68938..000000000000
--- a/sys-apps/iproute2/iproute2-5.19.0-r3.ebuild
+++ /dev/null
@@ -1,217 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit edo toolchain-funcs
-
-if [[ ${PV} == 9999 ]] ; then
-	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-r3
-else
-	SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-fi
-
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb bpf caps elf +iptables libbsd minimal nfs selinux split-usr"
-
-# We could make libmnl optional, but it's tiny, so eh
-RDEPEND="
-	!net-misc/arpd
-	!minimal? ( net-libs/libmnl:= )
-	atm? ( net-dialup/linux-atm )
-	berkdb? ( sys-libs/db:= )
-	bpf? ( dev-libs/libbpf:= )
-	caps? ( sys-libs/libcap )
-	elf? ( virtual/libelf:= )
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	libbsd? ( dev-libs/libbsd )
-	nfs? ( net-libs/libtirpc:= )
-	selinux? ( sys-libs/libselinux )
-"
-# We require newer linux-headers for ipset support (bug #549948) and some defines (bug #553876)
-DEPEND="
-	${RDEPEND}
-	>=sys-kernel/linux-headers-3.16
-"
-BDEPEND="
-	app-arch/xz-utils
-	>=sys-devel/bison-2.4
-	sys-devel/flex
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.1.0-mtu.patch # bug #291907
-	"${FILESDIR}"/${PN}-5.12.0-configure-nomagic.patch # bug #643722
-	#"${FILESDIR}"/${PN}-5.1.0-portability.patch
-	"${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
-	"${FILESDIR}"/${P}-musl.patch
-	"${FILESDIR}"/${P}-setns-check.patch
-	"${FILESDIR}"/${PN}-default-color-auto.patch
-)
-
-src_prepare() {
-	default
-
-	# Fix version if necessary
-	local versionfile="include/version.h"
-	if [[ ${PV} != 9999 ]] && ! grep -Fq "${PV}" ${versionfile} ; then
-		einfo "Fixing version string"
-		sed "s@\"[[:digit:]\.]\+\"@\"${PV}\"@" \
-			-i ${versionfile} || die
-	fi
-
-	# echo -n is not POSIX compliant
-	sed 's@echo -n@printf@' -i configure || die
-
-	sed -i \
-		-e '/^CC :\?=/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s|-O2|${CFLAGS} ${CPPFLAGS}|" \
-		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
-		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
-		Makefile || die
-
-	# Build against system headers
-	rm -r include/netinet || die #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
-
-	if use minimal ; then
-		sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile || die
-	fi
-}
-
-src_configure() {
-	tc-export AR CC PKG_CONFIG
-
-	# This sure is ugly. Should probably move into toolchain-funcs at some point.
-	local setns
-	pushd "${T}" >/dev/null || die
-	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c || die
-	if ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null ; then
-		setns=y
-	else
-		setns=n
-	fi
-
-	echo 'int main(){return 0;}' > test.c || die
-	if ! ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null ; then
-		sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile || die
-	fi
-	popd >/dev/null || die
-
-	# run "configure" script first which will create "config.mk"...
-	# Using econf breaks since 5.14.0 (a9c3d70d902a0473ee5c13336317006a52ce8242)
-	edo ./configure --libbpf_force $(usex bpf on off)
-
-	# Remove the definitions made by configure and allow them to be overridden
-	# by USE flags below.
-	# We have to do the cheesy only-sed-if-disabled because otherwise
-	# the *_FLAGS etc stuff found by configure will be used but result
-	# in a broken build.
-	if ! use berkdb ; then
-		sed -i -e '/HAVE_BERKELEY_DB/d' config.mk || die
-	fi
-
-	if ! use caps ; then
-		sed -i -e '/HAVE_CAP/d' config.mk || die
-	fi
-
-	if use minimal ; then
-		sed -i -e '/HAVE_MNL/d' config.mk || die
-	fi
-
-	if ! use elf ; then
-		sed -i -e '/HAVE_ELF/d' config.mk || die
-	fi
-
-	if ! use nfs ; then
-		sed -i -e '/HAVE_RPC/d' config.mk || die
-	fi
-
-	if ! use selinux ; then
-		sed -i -e '/HAVE_SELINUX/d' config.mk || die
-	fi
-
-	if ! use libbsd ; then
-		sed -i -e '/HAVE_LIBBSD/d' config.mk || die
-	fi
-
-	# ...Now switch on/off requested features via USE flags
-	# this is only useful if the test did not set other things, per bug #643722
-	# Keep in sync with ifs above, or refactor to be unified.
-	cat <<-EOF >> config.mk
-	TC_CONFIG_ATM := $(usex atm y n)
-	TC_CONFIG_XT  := $(usex iptables y n)
-	TC_CONFIG_NO_XT := $(usex iptables n y)
-	# We've locked in recent enough kernel headers, bug #549948
-	TC_CONFIG_IPSET := y
-	HAVE_BERKELEY_DB := $(usex berkdb y n)
-	HAVE_CAP      := $(usex caps y n)
-	HAVE_MNL      := $(usex minimal n y)
-	HAVE_ELF      := $(usex elf y n)
-	HAVE_RPC      := $(usex nfs y n)
-	HAVE_SELINUX  := $(usex selinux y n)
-	IP_CONFIG_SETNS := ${setns}
-	# Use correct iptables dir, bug #144265, bug #293709
-	IPT_LIB_DIR   := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
-	HAVE_LIBBSD   := $(usex libbsd y n)
-	EOF
-}
-
-src_compile() {
-	emake V=1 NETNS_RUN_DIR=/run/netns
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		dobin ip/ip
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}"/$(get_libdir) \
-		SBINDIR="${EPREFIX}"/sbin \
-		CONFDIR="${EPREFIX}"/etc/iproute2 \
-		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
-		MANDIR="${EPREFIX}"/usr/share/man \
-		ARPDDIR="${EPREFIX}"/var/lib/arpd \
-		install
-
-	dodir /bin
-	mv "${ED}"/{s,}bin/ip || die # bug #330115
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-
-	# Collides with net-analyzer/ifstat
-	# https://bugs.gentoo.org/868321
-	mv "${ED}"/sbin/ifstat{,-iproute2} || die
-
-	if use split-usr ; then
-		# Can remove compatibility symlink in a year: 2023-05-28.
-		# bug #547264
-		mv "${ED}"/sbin/ss "${ED}"/bin/ss || die
-		dosym -r /bin/ss /sbin/ss
-	fi
-
-	if use berkdb ; then
-		keepdir /var/lib/arpd
-		# bug #47482, arpd doesn't need to be in /sbin
-		dodir /usr/bin
-		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
-	elif [[ -d "${ED}"/var/lib/arpd ]]; then
-		rmdir --ignore-fail-on-non-empty -p "${ED}"/var/lib/arpd || die
-	fi
-}


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/files/, sys-apps/iproute2/
@ 2023-02-13  3:23 Sam James
  0 siblings, 0 replies; 18+ messages in thread
From: Sam James @ 2023-02-13  3:23 UTC (permalink / raw
  To: gentoo-commits

commit:     a3de456aa64d3ed171dd41ff5b867cf1389558c6
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 13 03:20:27 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb 13 03:23:05 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3de456a

sys-apps/iproute2: fix UB in strncpy (e.g. truncated ip route output)

Fix overlapping buffers passed to strncpy which is UB. format_host_rta_r writes
to the buffer passed to it, so hostname (derived from b1) & b1 partly overlap.

This gets worse with sys-libs/glibc-2.37 where the ip route output can be truncated,
but it was UB anyway and you can see it occurring w/ glibc-2.36.

Bug: https://lore.kernel.org/netdev/0011AC38-4823-4D0A-8580-B108D08959C2 <AT> gentoo.org/T/#u
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30112
Thanks-to: Doug Freed <dwfreed <AT> mtu.edu>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/iproute2-6.1.0-strncpy-overlap.patch     |  39 ++++
 sys-apps/iproute2/iproute2-6.1.0-r1.ebuild         | 216 +++++++++++++++++++++
 2 files changed, 255 insertions(+)

diff --git a/sys-apps/iproute2/files/iproute2-6.1.0-strncpy-overlap.patch b/sys-apps/iproute2/files/iproute2-6.1.0-strncpy-overlap.patch
new file mode 100644
index 000000000000..8b4b0abbbc7d
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-6.1.0-strncpy-overlap.patch
@@ -0,0 +1,39 @@
+fix UB in strncpy (e.g. truncated ip route output)
+
+Fix overlapping buffers passed to strncpy which is UB. format_host_rta_r writes
+to the buffer passed to it, so hostname (derived from b1) & b1 partly overlap.
+
+This gets worse with sys-libs/glibc-2.37 where the ip route output can be truncated,
+but it was UB anyway and you can see it occurring w/ glibc-2.36.
+
+Bug: https://lore.kernel.org/netdev/0011AC38-4823-4D0A-8580-B108D08959C2@gentoo.org/T/#u
+Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30112
+Thanks-to: Doug Freed <dwfreed@mtu.edu>
+--- a/ip/iproute.c
++++ b/ip/iproute.c
+@@ -753,6 +753,7 @@ int print_route(struct nlmsghdr *n, void *arg)
+ 	int ret;
+ 
+ 	SPRINT_BUF(b1);
++	SPRINT_BUF(b2);
+ 
+ 	if (n->nlmsg_type != RTM_NEWROUTE && n->nlmsg_type != RTM_DELROUTE) {
+ 		fprintf(stderr, "Not a route: %08x %08x %08x\n",
+@@ -814,7 +815,7 @@ int print_route(struct nlmsghdr *n, void *arg)
+ 				 r->rtm_dst_len);
+ 		} else {
+ 			const char *hostname = format_host_rta_r(family, tb[RTA_DST],
+-					  b1, sizeof(b1));
++					  b2, sizeof(b2));
+ 			if (hostname)
+ 				strncpy(b1, hostname, sizeof(b1) - 1);
+ 		}
+@@ -837,7 +838,7 @@ int print_route(struct nlmsghdr *n, void *arg)
+ 				 r->rtm_src_len);
+ 		} else {
+ 			const char *hostname = format_host_rta_r(family, tb[RTA_SRC],
+-					  b1, sizeof(b1));
++					  b2, sizeof(b2));
+ 			if (hostname)
+ 				strncpy(b1, hostname, sizeof(b1) - 1);
+ 		}

diff --git a/sys-apps/iproute2/iproute2-6.1.0-r1.ebuild b/sys-apps/iproute2/iproute2-6.1.0-r1.ebuild
new file mode 100644
index 000000000000..72f3265dd8e0
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-6.1.0-r1.ebuild
@@ -0,0 +1,216 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo toolchain-funcs
+
+if [[ ${PV} == 9999 ]] ; then
+	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
+	inherit git-r3
+else
+	SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+DESCRIPTION="kernel routing and traffic control utilities"
+HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="atm berkdb bpf caps elf +iptables libbsd minimal nfs selinux split-usr"
+
+# We could make libmnl optional, but it's tiny, so eh
+RDEPEND="
+	!net-misc/arpd
+	!minimal? ( net-libs/libmnl:= )
+	atm? ( net-dialup/linux-atm )
+	berkdb? ( sys-libs/db:= )
+	bpf? ( dev-libs/libbpf:= )
+	caps? ( sys-libs/libcap )
+	elf? ( virtual/libelf:= )
+	iptables? ( >=net-firewall/iptables-1.4.20:= )
+	libbsd? ( dev-libs/libbsd )
+	nfs? ( net-libs/libtirpc:= )
+	selinux? ( sys-libs/libselinux )
+"
+# We require newer linux-headers for ipset support (bug #549948) and some defines (bug #553876)
+DEPEND="
+	${RDEPEND}
+	>=sys-kernel/linux-headers-3.16
+"
+BDEPEND="
+	app-arch/xz-utils
+	>=sys-devel/bison-2.4
+	sys-devel/flex
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.1.0-mtu.patch # bug #291907
+	"${FILESDIR}"/${PN}-5.12.0-configure-nomagic.patch # bug #643722
+	#"${FILESDIR}"/${PN}-5.1.0-portability.patch
+	"${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
+	"${FILESDIR}"/${PN}-default-color-auto.patch
+	"${FILESDIR}"/${PN}-6.1.0-strncpy-overlap.patch
+)
+
+src_prepare() {
+	default
+
+	# Fix version if necessary
+	local versionfile="include/version.h"
+	if [[ ${PV} != 9999 ]] && ! grep -Fq "${PV}" ${versionfile} ; then
+		einfo "Fixing version string"
+		sed "s@\"[[:digit:]\.]\+\"@\"${PV}\"@" \
+			-i ${versionfile} || die
+	fi
+
+	# echo -n is not POSIX compliant
+	sed 's@echo -n@printf@' -i configure || die
+
+	sed -i \
+		-e '/^CC :\?=/d' \
+		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
+		-e "s|-O2|${CFLAGS} ${CPPFLAGS}|" \
+		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
+		Makefile || die
+
+	# Build against system headers
+	rm -r include/netinet || die #include/linux include/ip{,6}tables{,_common}.h include/libiptc
+	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
+
+	if use minimal ; then
+		sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile || die
+	fi
+}
+
+src_configure() {
+	tc-export AR CC PKG_CONFIG
+
+	# This sure is ugly. Should probably move into toolchain-funcs at some point.
+	local setns
+	pushd "${T}" >/dev/null || die
+	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c || die
+	if ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null ; then
+		setns=y
+	else
+		setns=n
+	fi
+
+	echo 'int main(){return 0;}' > test.c || die
+	if ! ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null ; then
+		sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile || die
+	fi
+	popd >/dev/null || die
+
+	# run "configure" script first which will create "config.mk"...
+	# Using econf breaks since 5.14.0 (a9c3d70d902a0473ee5c13336317006a52ce8242)
+	edo ./configure --libbpf_force $(usex bpf on off)
+
+	# Remove the definitions made by configure and allow them to be overridden
+	# by USE flags below.
+	# We have to do the cheesy only-sed-if-disabled because otherwise
+	# the *_FLAGS etc stuff found by configure will be used but result
+	# in a broken build.
+	if ! use berkdb ; then
+		sed -i -e '/HAVE_BERKELEY_DB/d' config.mk || die
+	fi
+
+	if ! use caps ; then
+		sed -i -e '/HAVE_CAP/d' config.mk || die
+	fi
+
+	if use minimal ; then
+		sed -i -e '/HAVE_MNL/d' config.mk || die
+	fi
+
+	if ! use elf ; then
+		sed -i -e '/HAVE_ELF/d' config.mk || die
+	fi
+
+	if ! use nfs ; then
+		sed -i -e '/HAVE_RPC/d' config.mk || die
+	fi
+
+	if ! use selinux ; then
+		sed -i -e '/HAVE_SELINUX/d' config.mk || die
+	fi
+
+	if ! use libbsd ; then
+		sed -i -e '/HAVE_LIBBSD/d' config.mk || die
+	fi
+
+	# ...Now switch on/off requested features via USE flags
+	# this is only useful if the test did not set other things, per bug #643722
+	# Keep in sync with ifs above, or refactor to be unified.
+	cat <<-EOF >> config.mk
+	TC_CONFIG_ATM := $(usex atm y n)
+	TC_CONFIG_XT  := $(usex iptables y n)
+	TC_CONFIG_NO_XT := $(usex iptables n y)
+	# We've locked in recent enough kernel headers, bug #549948
+	TC_CONFIG_IPSET := y
+	HAVE_BERKELEY_DB := $(usex berkdb y n)
+	HAVE_CAP      := $(usex caps y n)
+	HAVE_MNL      := $(usex minimal n y)
+	HAVE_ELF      := $(usex elf y n)
+	HAVE_RPC      := $(usex nfs y n)
+	HAVE_SELINUX  := $(usex selinux y n)
+	IP_CONFIG_SETNS := ${setns}
+	# Use correct iptables dir, bug #144265, bug #293709
+	IPT_LIB_DIR   := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
+	HAVE_LIBBSD   := $(usex libbsd y n)
+	EOF
+}
+
+src_compile() {
+	emake V=1 NETNS_RUN_DIR=/run/netns
+}
+
+src_install() {
+	if use minimal ; then
+		into /
+		dosbin tc/tc
+		dobin ip/ip
+		return 0
+	fi
+
+	emake \
+		DESTDIR="${D}" \
+		PREFIX="${EPREFIX}/usr" \
+		LIBDIR="${EPREFIX}"/$(get_libdir) \
+		SBINDIR="${EPREFIX}"/sbin \
+		CONFDIR="${EPREFIX}"/etc/iproute2 \
+		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
+		MANDIR="${EPREFIX}"/usr/share/man \
+		ARPDDIR="${EPREFIX}"/var/lib/arpd \
+		install
+
+	dodir /bin
+	mv "${ED}"/{s,}bin/ip || die # bug #330115
+
+	dolib.a lib/libnetlink.a
+	insinto /usr/include
+	doins include/libnetlink.h
+
+	# Collides with net-analyzer/ifstat
+	# https://bugs.gentoo.org/868321
+	mv "${ED}"/sbin/ifstat{,-iproute2} || die
+
+	if use split-usr ; then
+		# Can remove compatibility symlink in a year: 2023-05-28.
+		# bug #547264
+		mv "${ED}"/sbin/ss "${ED}"/bin/ss || die
+		dosym -r /bin/ss /sbin/ss
+	fi
+
+	if use berkdb ; then
+		keepdir /var/lib/arpd
+		# bug #47482, arpd doesn't need to be in /sbin
+		dodir /usr/bin
+		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
+	elif [[ -d "${ED}"/var/lib/arpd ]]; then
+		rmdir --ignore-fail-on-non-empty -p "${ED}"/var/lib/arpd || die
+	fi
+}


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/files/, sys-apps/iproute2/
@ 2023-09-16 10:25 Sam James
  0 siblings, 0 replies; 18+ messages in thread
From: Sam James @ 2023-09-16 10:25 UTC (permalink / raw
  To: gentoo-commits

commit:     41395a1bb3198b2934b87b665eb217251f59aef2
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 16 10:24:12 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Sep 16 10:24:59 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41395a1b

sys-apps/iproute2: drop versions

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-apps/iproute2/Manifest                         |   5 -
 .../iproute2/files/iproute2-4.20.0-no-ipv6.patch   |  38 ----
 .../files/iproute2-6.1.0-strncpy-overlap.patch     |  39 ----
 .../files/iproute2-default-color-auto.patch        |   7 -
 sys-apps/iproute2/iproute2-5.15.0-r1.ebuild        | 173 ----------------
 sys-apps/iproute2/iproute2-5.15.0.ebuild           | 175 ----------------
 sys-apps/iproute2/iproute2-6.0.0-r1.ebuild         | 209 --------------------
 sys-apps/iproute2/iproute2-6.0.0.ebuild            | 215 --------------------
 sys-apps/iproute2/iproute2-6.1.0-r1.ebuild         | 216 --------------------
 sys-apps/iproute2/iproute2-6.1.0-r2.ebuild         | 210 --------------------
 sys-apps/iproute2/iproute2-6.2.0-r1.ebuild         | 220 ---------------------
 sys-apps/iproute2/iproute2-6.2.0-r2.ebuild         | 214 --------------------
 sys-apps/iproute2/iproute2-6.3.0-r1.ebuild         | 214 --------------------
 sys-apps/iproute2/iproute2-6.3.0.ebuild            | 220 ---------------------
 14 files changed, 2155 deletions(-)

diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest
index ec8afae77391..8e7ab5142549 100644
--- a/sys-apps/iproute2/Manifest
+++ b/sys-apps/iproute2/Manifest
@@ -1,7 +1,2 @@
-DIST iproute2-5.15.0.tar.xz 858068 BLAKE2B bca20ac53e1b2b3ae06186f655ad5073a0e691ed7b3aab25c4fbc118847b72a8a522175732cd22d8ec27480d1ab142319e80a5c3628434bec21260e585e1591d SHA512 e94918fa10e523224b965c7cb5303a101745e89c90d149d2d9876a002b2a894b1c689c519dc22168f3d334c3ee0810c59ec43223baab3d5f4c56f017d6281f22
-DIST iproute2-6.0.0.tar.xz 900312 BLAKE2B 1cfb9b5a7892dec2b35e0eadbd957083e95fdc5077a1aa193329801ff25f9ed90a1fc4152756547be1fab8fe18d9a399001a4c3a61e951f64946156af6a90bae SHA512 be30362b0df6906aa786f935d5f555b8b86c747fe05314066f4180ab2f7c952ae227b7cf04c15e75d8f99ca17bafb7c8dc0fb1c18f3a9e3222d98716bb449f7a
-DIST iproute2-6.1.0.tar.xz 905512 BLAKE2B 38249703e0a9ba74405aebdb97560b286deefa959a9c3f0e0893962b6966f5da2da46199dda6a0f9584bb473f8ba529440643d97f66e9b7619df029e3091d163 SHA512 4e4d3b5e1e1a5444f42671c1e6caee072e80063e34e37386695f76f85a1ab662f4513050814006e5154426cbaadfba1d86b0be14e65978d5e670a16446047b28
-DIST iproute2-6.2.0.tar.xz 911588 BLAKE2B d3bfaecf33ffc7861e983e8db0d6a63f4767b6c01b5346e88f51c65ed6279c4be29412ed18b8f98ed54d60a84455b73fe7745142fd0fc0f3e327a29e8bcce986 SHA512 b24e0fdd0f51b8b78bc3bb681e3829af47d3011e93f3892289eb070b336709a6883728ecc7627ca37f6449720f8ed1349af321c0d04454894a7175b82f7de151
-DIST iproute2-6.3.0.tar.xz 914700 BLAKE2B a7b48c59c8a30f56ca810136f4d9f681fe38359999c260227a6229b972ce70b233d2865a6543cf3f70ed586825f9191c22d459a9fc5cc8c7dbf3ab417064c8a7 SHA512 aec1d8ceb54c8849a075ec1ce079678638e05ccaec093e8b3cbc7243b5fafea2a8c11f10930fced3df82f52d6750aa325178e44f9058e37a556ab108d4a968bf
 DIST iproute2-6.4.0.tar.xz 922164 BLAKE2B 76369d2a794afd13dba1a34ee9a7425775bb7b43c22164274749c01b18d061669aa5abd51d32a15d68f48e75f4837a887dfc28ea41e34d8e4c36b2ab865628dd SHA512 42330be6e061302694ea301765ff8d3cbfaeca4b1d06e39778861e4390ed211c03cb2d41498190202b659f7f5647b1ca4857410ef8c16fd601a35e7162788d21
 DIST iproute2-6.5.0.tar.xz 925940 BLAKE2B 537a956c2fb59df25e90d7899a981e5408c5ee029df2bb87461b899ecf8fe4424a1db5d1b1b67a67bdb2555f6cc4aaf099b0544a2c92ffc3843adc3d17defb96 SHA512 615ba6924becdf08af3f491d347d84897ff0198426d65b194c87146c4527b0856fc51688b59834abe1cb6f9a70b93c66ff7ade6b7c305c1ece0fd6a29df6bc54

diff --git a/sys-apps/iproute2/files/iproute2-4.20.0-no-ipv6.patch b/sys-apps/iproute2/files/iproute2-4.20.0-no-ipv6.patch
deleted file mode 100644
index 31733e99f72c..000000000000
--- a/sys-apps/iproute2/files/iproute2-4.20.0-no-ipv6.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- iproute2-4.20.0/ip/ipmonitor.c
-+++ iproute2-4.20.0/ip/ipmonitor.c
-@@ -118,7 +118,6 @@
- 
- 	case RTM_NEWPREFIX:
- 		print_headers(fp, "[PREFIX]", ctrl);
--		print_prefix(n, arg);
- 		return 0;
- 
- 	case RTM_NEWRULE:
---- iproute2-4.20.0/ip/iptunnel.c
-+++ iproute2-4.20.0/ip/iptunnel.c
-@@ -549,13 +549,6 @@
- 		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 protocol family: %d\n", preferred_family);
- 		exit(-1);
---- iproute2-4.20.0/ip/Makefile
-+++ iproute2-4.20.0/ip/Makefile
-@@ -1,7 +1,7 @@
- # SPDX-License-Identifier: GPL-2.0
- 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 iptoken.o \
-+    rtm_map.o iptunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \
-+    ipmaddr.o ipmonitor.o ipmroute.o iptuntap.o iptoken.o \
-     ipxfrm.o xfrm_state.o xfrm_policy.o xfrm_monitor.o iplink_dummy.o \
-     iplink_ifb.o iplink_nlmon.o iplink_team.o iplink_vcan.o iplink_vxcan.o \
-     iplink_vlan.o link_veth.o link_gre.o iplink_can.o iplink_xdp.o \

diff --git a/sys-apps/iproute2/files/iproute2-6.1.0-strncpy-overlap.patch b/sys-apps/iproute2/files/iproute2-6.1.0-strncpy-overlap.patch
deleted file mode 100644
index 8b4b0abbbc7d..000000000000
--- a/sys-apps/iproute2/files/iproute2-6.1.0-strncpy-overlap.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-fix UB in strncpy (e.g. truncated ip route output)
-
-Fix overlapping buffers passed to strncpy which is UB. format_host_rta_r writes
-to the buffer passed to it, so hostname (derived from b1) & b1 partly overlap.
-
-This gets worse with sys-libs/glibc-2.37 where the ip route output can be truncated,
-but it was UB anyway and you can see it occurring w/ glibc-2.36.
-
-Bug: https://lore.kernel.org/netdev/0011AC38-4823-4D0A-8580-B108D08959C2@gentoo.org/T/#u
-Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30112
-Thanks-to: Doug Freed <dwfreed@mtu.edu>
---- a/ip/iproute.c
-+++ b/ip/iproute.c
-@@ -753,6 +753,7 @@ int print_route(struct nlmsghdr *n, void *arg)
- 	int ret;
- 
- 	SPRINT_BUF(b1);
-+	SPRINT_BUF(b2);
- 
- 	if (n->nlmsg_type != RTM_NEWROUTE && n->nlmsg_type != RTM_DELROUTE) {
- 		fprintf(stderr, "Not a route: %08x %08x %08x\n",
-@@ -814,7 +815,7 @@ int print_route(struct nlmsghdr *n, void *arg)
- 				 r->rtm_dst_len);
- 		} else {
- 			const char *hostname = format_host_rta_r(family, tb[RTA_DST],
--					  b1, sizeof(b1));
-+					  b2, sizeof(b2));
- 			if (hostname)
- 				strncpy(b1, hostname, sizeof(b1) - 1);
- 		}
-@@ -837,7 +838,7 @@ int print_route(struct nlmsghdr *n, void *arg)
- 				 r->rtm_src_len);
- 		} else {
- 			const char *hostname = format_host_rta_r(family, tb[RTA_SRC],
--					  b1, sizeof(b1));
-+					  b2, sizeof(b2));
- 			if (hostname)
- 				strncpy(b1, hostname, sizeof(b1) - 1);
- 		}

diff --git a/sys-apps/iproute2/files/iproute2-default-color-auto.patch b/sys-apps/iproute2/files/iproute2-default-color-auto.patch
deleted file mode 100644
index eb017ecd61c8..000000000000
--- a/sys-apps/iproute2/files/iproute2-default-color-auto.patch
+++ /dev/null
@@ -1,7 +0,0 @@
-diff --git a/ip/ip.c b/ip/ip.c
-index 40d2998a..454da1a3 100644
---- a/ip/ip.c
-+++ b/ip/ip.c
-@@ -169 +169 @@ int main(int argc, char **argv)
--	int color = 0;
-+	int color = COLOR_OPT_AUTO;

diff --git a/sys-apps/iproute2/iproute2-5.15.0-r1.ebuild b/sys-apps/iproute2/iproute2-5.15.0-r1.ebuild
deleted file mode 100644
index 1468e3a0082f..000000000000
--- a/sys-apps/iproute2/iproute2-5.15.0-r1.ebuild
+++ /dev/null
@@ -1,173 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit toolchain-funcs flag-o-matic multilib
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-r3
-else
-	SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-fi
-
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb bpf caps elf +iptables ipv6 minimal selinux"
-
-# We could make libmnl optional, but it's tiny, so eh
-RDEPEND="
-	!net-misc/arpd
-	!minimal? ( net-libs/libmnl:= )
-	atm? ( net-dialup/linux-atm )
-	berkdb? ( sys-libs/db:= )
-	bpf? ( dev-libs/libbpf:= )
-	caps? ( sys-libs/libcap )
-	elf? ( virtual/libelf:= )
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	selinux? ( sys-libs/libselinux )
-"
-# We require newer linux-headers for ipset support #549948 and some defines #553876
-DEPEND="
-	${RDEPEND}
-	>=sys-kernel/linux-headers-3.16
-"
-BDEPEND="
-	app-arch/xz-utils
-	>=sys-devel/bison-2.4
-	sys-devel/flex
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-	"${FILESDIR}"/${PN}-5.12.0-configure-nomagic-nolibbsd.patch # bug #643722 & #911727
-	"${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
-	"${FILESDIR}"/${PN}-6.4.0-disable-libbsd-fallback.patch # bug #911727
-)
-
-doecho() {
-	echo "${@}"
-	"${@}" || die
-}
-
-src_prepare() {
-	if ! use ipv6 ; then
-		PATCHES+=(
-			"${FILESDIR}"/${PN}-4.20.0-no-ipv6.patch #326849
-		)
-	fi
-
-	default
-
-	# Fix version if necessary
-	local versionfile="include/version.h"
-	if [[ "${PV}" != 9999 ]] && ! grep -Fq "${PV}" ${versionfile} ; then
-		einfo "Fixing version string"
-		sed "s@\"[[:digit:]\.]\+\"@\"${PV}\"@" \
-			-i ${versionfile} || die
-	fi
-
-	# echo -n is not POSIX compliant
-	sed 's@echo -n@printf@' -i configure || die
-
-	sed -i \
-		-e '/^CC :\?=/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s|-O2|${CFLAGS} ${CPPFLAGS}|" \
-		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
-		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
-		Makefile || die
-
-	# build against system headers
-	rm -r include/netinet || die #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
-
-	if use minimal ; then
-		sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile || die
-	fi
-}
-
-src_configure() {
-	tc-export AR CC PKG_CONFIG
-
-	# This sure is ugly.  Should probably move into toolchain-funcs at some point.
-	local setns
-	pushd "${T}" >/dev/null
-	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
-	echo 'int main(){return 0;}' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
-	popd >/dev/null
-
-	# run "configure" script first which will create "config.mk"...
-	# Using econf breaks since 5.14.0 (a9c3d70d902a0473ee5c13336317006a52ce8242)
-	doecho ./configure --libbpf_force $(usex bpf on off)
-
-	# ...now switch on/off requested features via USE flags
-	# this is only useful if the test did not set other things, per bug #643722
-	cat <<-EOF >> config.mk
-	TC_CONFIG_ATM := $(usex atm y n)
-	TC_CONFIG_XT  := $(usex iptables y n)
-	TC_CONFIG_NO_XT := $(usex iptables n y)
-	# We've locked in recent enough kernel headers #549948
-	TC_CONFIG_IPSET := y
-	HAVE_BERKELEY_DB := $(usex berkdb y n)
-	HAVE_CAP      := $(usex caps y n)
-	HAVE_MNL      := $(usex minimal n y)
-	HAVE_ELF      := $(usex elf y n)
-	HAVE_SELINUX  := $(usex selinux y n)
-	IP_CONFIG_SETNS := ${setns}
-	# Use correct iptables dir, #144265 #293709
-	IPT_LIB_DIR   := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
-	EOF
-}
-
-src_compile() {
-	emake V=1 NETNS_RUN_DIR=/run/netns
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		dobin ip/ip
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}"/$(get_libdir) \
-		SBINDIR="${EPREFIX}"/sbin \
-		CONFDIR="${EPREFIX}"/etc/iproute2 \
-		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
-		MANDIR="${EPREFIX}"/usr/share/man \
-		ARPDDIR="${EPREFIX}"/var/lib/arpd \
-		install
-
-	dodir /bin
-	mv "${ED}"/{s,}bin/ip || die #330115
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-	# This local header pulls in a lot of linux headers it
-	# doesn't directly need.  Delete this header that requires
-	# linux-headers-3.8 until that goes stable.  #467716
-	sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
-
-	if use berkdb ; then
-		keepdir /var/lib/arpd
-		# bug 47482, arpd doesn't need to be in /sbin
-		dodir /usr/bin
-		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
-	elif [[ -d "${ED}"/var/lib/arpd ]]; then
-		rmdir --ignore-fail-on-non-empty -p "${ED}"/var/lib/arpd || die
-	fi
-}

diff --git a/sys-apps/iproute2/iproute2-5.15.0.ebuild b/sys-apps/iproute2/iproute2-5.15.0.ebuild
deleted file mode 100644
index 0ba17bb9fd47..000000000000
--- a/sys-apps/iproute2/iproute2-5.15.0.ebuild
+++ /dev/null
@@ -1,175 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit toolchain-funcs flag-o-matic multilib
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-r3
-else
-	SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz"
-	KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-fi
-
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb bpf caps elf +iptables ipv6 libbsd minimal selinux"
-
-# We could make libmnl optional, but it's tiny, so eh
-RDEPEND="
-	!net-misc/arpd
-	!minimal? ( net-libs/libmnl:= )
-	atm? ( net-dialup/linux-atm )
-	berkdb? ( sys-libs/db:= )
-	bpf? ( dev-libs/libbpf:= )
-	caps? ( sys-libs/libcap )
-	elf? ( virtual/libelf:= )
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	libbsd? ( dev-libs/libbsd )
-	selinux? ( sys-libs/libselinux )
-"
-# We require newer linux-headers for ipset support #549948 and some defines #553876
-DEPEND="
-	${RDEPEND}
-	>=sys-kernel/linux-headers-3.16
-"
-BDEPEND="
-	app-arch/xz-utils
-	>=sys-devel/bison-2.4
-	sys-devel/flex
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-	"${FILESDIR}"/${PN}-5.12.0-configure-nomagic.patch # bug 643722
-	#"${FILESDIR}"/${PN}-5.1.0-portability.patch
-	"${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
-)
-
-doecho() {
-	echo "${@}"
-	"${@}" || die
-}
-
-src_prepare() {
-	if ! use ipv6 ; then
-		PATCHES+=(
-			"${FILESDIR}"/${PN}-4.20.0-no-ipv6.patch #326849
-		)
-	fi
-
-	default
-
-	# Fix version if necessary
-	local versionfile="include/version.h"
-	if [[ "${PV}" != 9999 ]] && ! grep -Fq "${PV}" ${versionfile} ; then
-		einfo "Fixing version string"
-		sed "s@\"[[:digit:]\.]\+\"@\"${PV}\"@" \
-			-i ${versionfile} || die
-	fi
-
-	# echo -n is not POSIX compliant
-	sed 's@echo -n@printf@' -i configure || die
-
-	sed -i \
-		-e '/^CC :\?=/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s|-O2|${CFLAGS} ${CPPFLAGS}|" \
-		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
-		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
-		Makefile || die
-
-	# build against system headers
-	rm -r include/netinet || die #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
-
-	if use minimal ; then
-		sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile || die
-	fi
-}
-
-src_configure() {
-	tc-export AR CC PKG_CONFIG
-
-	# This sure is ugly.  Should probably move into toolchain-funcs at some point.
-	local setns
-	pushd "${T}" >/dev/null
-	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
-	echo 'int main(){return 0;}' > test.c
-	${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
-	popd >/dev/null
-
-	# run "configure" script first which will create "config.mk"...
-	# Using econf breaks since 5.14.0 (a9c3d70d902a0473ee5c13336317006a52ce8242)
-	doecho ./configure --libbpf_force $(usex bpf on off)
-
-	# ...now switch on/off requested features via USE flags
-	# this is only useful if the test did not set other things, per bug #643722
-	cat <<-EOF >> config.mk
-	TC_CONFIG_ATM := $(usex atm y n)
-	TC_CONFIG_XT  := $(usex iptables y n)
-	TC_CONFIG_NO_XT := $(usex iptables n y)
-	# We've locked in recent enough kernel headers #549948
-	TC_CONFIG_IPSET := y
-	HAVE_BERKELEY_DB := $(usex berkdb y n)
-	HAVE_CAP      := $(usex caps y n)
-	HAVE_MNL      := $(usex minimal n y)
-	HAVE_ELF      := $(usex elf y n)
-	HAVE_SELINUX  := $(usex selinux y n)
-	IP_CONFIG_SETNS := ${setns}
-	# Use correct iptables dir, #144265 #293709
-	IPT_LIB_DIR   := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
-	HAVE_LIBBSD   := $(usex libbsd y n)
-	EOF
-}
-
-src_compile() {
-	emake V=1 NETNS_RUN_DIR=/run/netns
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		dobin ip/ip
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}"/$(get_libdir) \
-		SBINDIR="${EPREFIX}"/sbin \
-		CONFDIR="${EPREFIX}"/etc/iproute2 \
-		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
-		MANDIR="${EPREFIX}"/usr/share/man \
-		ARPDDIR="${EPREFIX}"/var/lib/arpd \
-		install
-
-	dodir /bin
-	mv "${ED}"/{s,}bin/ip || die #330115
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-	# This local header pulls in a lot of linux headers it
-	# doesn't directly need.  Delete this header that requires
-	# linux-headers-3.8 until that goes stable.  #467716
-	sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
-
-	if use berkdb ; then
-		keepdir /var/lib/arpd
-		# bug 47482, arpd doesn't need to be in /sbin
-		dodir /usr/bin
-		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
-	elif [[ -d "${ED}"/var/lib/arpd ]]; then
-		rmdir --ignore-fail-on-non-empty -p "${ED}"/var/lib/arpd || die
-	fi
-}

diff --git a/sys-apps/iproute2/iproute2-6.0.0-r1.ebuild b/sys-apps/iproute2/iproute2-6.0.0-r1.ebuild
deleted file mode 100644
index 60b15cfb3ed1..000000000000
--- a/sys-apps/iproute2/iproute2-6.0.0-r1.ebuild
+++ /dev/null
@@ -1,209 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit edo toolchain-funcs
-
-if [[ ${PV} == 9999 ]] ; then
-	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-r3
-else
-	SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-fi
-
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb bpf caps elf +iptables minimal nfs selinux split-usr"
-
-# We could make libmnl optional, but it's tiny, so eh
-RDEPEND="
-	!net-misc/arpd
-	!minimal? ( net-libs/libmnl:= )
-	atm? ( net-dialup/linux-atm )
-	berkdb? ( sys-libs/db:= )
-	bpf? ( dev-libs/libbpf:= )
-	caps? ( sys-libs/libcap )
-	elf? ( virtual/libelf:= )
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	nfs? ( net-libs/libtirpc:= )
-	selinux? ( sys-libs/libselinux )
-"
-# We require newer linux-headers for ipset support (bug #549948) and some defines (bug #553876)
-DEPEND="
-	${RDEPEND}
-	>=sys-kernel/linux-headers-3.16
-"
-BDEPEND="
-	app-arch/xz-utils
-	>=sys-devel/bison-2.4
-	sys-devel/flex
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.1.0-mtu.patch # bug #291907
-	"${FILESDIR}"/${PN}-5.12.0-configure-nomagic-nolibbsd.patch # bug #643722 & #911727
-	"${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
-	"${FILESDIR}"/${PN}-default-color-auto.patch
-	"${FILESDIR}"/${PN}-6.4.0-disable-libbsd-fallback.patch # bug #911727
-)
-
-src_prepare() {
-	default
-
-	# Fix version if necessary
-	local versionfile="include/version.h"
-	if [[ ${PV} != 9999 ]] && ! grep -Fq "${PV}" ${versionfile} ; then
-		einfo "Fixing version string"
-		sed "s@\"[[:digit:]\.]\+\"@\"${PV}\"@" \
-			-i ${versionfile} || die
-	fi
-
-	# echo -n is not POSIX compliant
-	sed 's@echo -n@printf@' -i configure || die
-
-	sed -i \
-		-e '/^CC :\?=/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s|-O2|${CFLAGS} ${CPPFLAGS}|" \
-		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
-		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
-		Makefile || die
-
-	# Build against system headers
-	rm -r include/netinet || die #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
-
-	if use minimal ; then
-		sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile || die
-	fi
-}
-
-src_configure() {
-	tc-export AR CC PKG_CONFIG
-
-	# This sure is ugly. Should probably move into toolchain-funcs at some point.
-	local setns
-	pushd "${T}" >/dev/null || die
-	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c || die
-	if ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null ; then
-		setns=y
-	else
-		setns=n
-	fi
-
-	echo 'int main(){return 0;}' > test.c || die
-	if ! ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null ; then
-		sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile || die
-	fi
-	popd >/dev/null || die
-
-	# run "configure" script first which will create "config.mk"...
-	# Using econf breaks since 5.14.0 (a9c3d70d902a0473ee5c13336317006a52ce8242)
-	edo ./configure --libbpf_force $(usex bpf on off)
-
-	# Remove the definitions made by configure and allow them to be overridden
-	# by USE flags below.
-	# We have to do the cheesy only-sed-if-disabled because otherwise
-	# the *_FLAGS etc stuff found by configure will be used but result
-	# in a broken build.
-	if ! use berkdb ; then
-		sed -i -e '/HAVE_BERKELEY_DB/d' config.mk || die
-	fi
-
-	if ! use caps ; then
-		sed -i -e '/HAVE_CAP/d' config.mk || die
-	fi
-
-	if use minimal ; then
-		sed -i -e '/HAVE_MNL/d' config.mk || die
-	fi
-
-	if ! use elf ; then
-		sed -i -e '/HAVE_ELF/d' config.mk || die
-	fi
-
-	if ! use nfs ; then
-		sed -i -e '/HAVE_RPC/d' config.mk || die
-	fi
-
-	if ! use selinux ; then
-		sed -i -e '/HAVE_SELINUX/d' config.mk || die
-	fi
-
-	# ...Now switch on/off requested features via USE flags
-	# this is only useful if the test did not set other things, per bug #643722
-	# Keep in sync with ifs above, or refactor to be unified.
-	cat <<-EOF >> config.mk
-	TC_CONFIG_ATM := $(usex atm y n)
-	TC_CONFIG_XT  := $(usex iptables y n)
-	TC_CONFIG_NO_XT := $(usex iptables n y)
-	# We've locked in recent enough kernel headers, bug #549948
-	TC_CONFIG_IPSET := y
-	HAVE_BERKELEY_DB := $(usex berkdb y n)
-	HAVE_CAP      := $(usex caps y n)
-	HAVE_MNL      := $(usex minimal n y)
-	HAVE_ELF      := $(usex elf y n)
-	HAVE_RPC      := $(usex nfs y n)
-	HAVE_SELINUX  := $(usex selinux y n)
-	IP_CONFIG_SETNS := ${setns}
-	# Use correct iptables dir, bug #144265, bug #293709
-	IPT_LIB_DIR   := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
-	EOF
-}
-
-src_compile() {
-	emake V=1 NETNS_RUN_DIR=/run/netns
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		dobin ip/ip
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}"/$(get_libdir) \
-		SBINDIR="${EPREFIX}"/sbin \
-		CONFDIR="${EPREFIX}"/etc/iproute2 \
-		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
-		MANDIR="${EPREFIX}"/usr/share/man \
-		ARPDDIR="${EPREFIX}"/var/lib/arpd \
-		install
-
-	dodir /bin
-	mv "${ED}"/{s,}bin/ip || die # bug #330115
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-
-	# Collides with net-analyzer/ifstat
-	# https://bugs.gentoo.org/868321
-	mv "${ED}"/sbin/ifstat{,-iproute2} || die
-
-	if use split-usr ; then
-		# Can remove compatibility symlink in a year: 2023-05-28.
-		# bug #547264
-		mv "${ED}"/sbin/ss "${ED}"/bin/ss || die
-		dosym -r /bin/ss /sbin/ss
-	fi
-
-	if use berkdb ; then
-		keepdir /var/lib/arpd
-		# bug #47482, arpd doesn't need to be in /sbin
-		dodir /usr/bin
-		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
-	elif [[ -d "${ED}"/var/lib/arpd ]]; then
-		rmdir --ignore-fail-on-non-empty -p "${ED}"/var/lib/arpd || die
-	fi
-}

diff --git a/sys-apps/iproute2/iproute2-6.0.0.ebuild b/sys-apps/iproute2/iproute2-6.0.0.ebuild
deleted file mode 100644
index b1a064050fbb..000000000000
--- a/sys-apps/iproute2/iproute2-6.0.0.ebuild
+++ /dev/null
@@ -1,215 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit edo toolchain-funcs
-
-if [[ ${PV} == 9999 ]] ; then
-	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-r3
-else
-	SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz"
-	KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-fi
-
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb bpf caps elf +iptables libbsd minimal nfs selinux split-usr"
-
-# We could make libmnl optional, but it's tiny, so eh
-RDEPEND="
-	!net-misc/arpd
-	!minimal? ( net-libs/libmnl:= )
-	atm? ( net-dialup/linux-atm )
-	berkdb? ( sys-libs/db:= )
-	bpf? ( dev-libs/libbpf:= )
-	caps? ( sys-libs/libcap )
-	elf? ( virtual/libelf:= )
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	libbsd? ( dev-libs/libbsd )
-	nfs? ( net-libs/libtirpc:= )
-	selinux? ( sys-libs/libselinux )
-"
-# We require newer linux-headers for ipset support (bug #549948) and some defines (bug #553876)
-DEPEND="
-	${RDEPEND}
-	>=sys-kernel/linux-headers-3.16
-"
-BDEPEND="
-	app-arch/xz-utils
-	>=sys-devel/bison-2.4
-	sys-devel/flex
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.1.0-mtu.patch # bug #291907
-	"${FILESDIR}"/${PN}-5.12.0-configure-nomagic.patch # bug #643722
-	#"${FILESDIR}"/${PN}-5.1.0-portability.patch
-	"${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
-	"${FILESDIR}"/${PN}-default-color-auto.patch
-)
-
-src_prepare() {
-	default
-
-	# Fix version if necessary
-	local versionfile="include/version.h"
-	if [[ ${PV} != 9999 ]] && ! grep -Fq "${PV}" ${versionfile} ; then
-		einfo "Fixing version string"
-		sed "s@\"[[:digit:]\.]\+\"@\"${PV}\"@" \
-			-i ${versionfile} || die
-	fi
-
-	# echo -n is not POSIX compliant
-	sed 's@echo -n@printf@' -i configure || die
-
-	sed -i \
-		-e '/^CC :\?=/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s|-O2|${CFLAGS} ${CPPFLAGS}|" \
-		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
-		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
-		Makefile || die
-
-	# Build against system headers
-	rm -r include/netinet || die #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
-
-	if use minimal ; then
-		sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile || die
-	fi
-}
-
-src_configure() {
-	tc-export AR CC PKG_CONFIG
-
-	# This sure is ugly. Should probably move into toolchain-funcs at some point.
-	local setns
-	pushd "${T}" >/dev/null || die
-	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c || die
-	if ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null ; then
-		setns=y
-	else
-		setns=n
-	fi
-
-	echo 'int main(){return 0;}' > test.c || die
-	if ! ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null ; then
-		sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile || die
-	fi
-	popd >/dev/null || die
-
-	# run "configure" script first which will create "config.mk"...
-	# Using econf breaks since 5.14.0 (a9c3d70d902a0473ee5c13336317006a52ce8242)
-	edo ./configure --libbpf_force $(usex bpf on off)
-
-	# Remove the definitions made by configure and allow them to be overridden
-	# by USE flags below.
-	# We have to do the cheesy only-sed-if-disabled because otherwise
-	# the *_FLAGS etc stuff found by configure will be used but result
-	# in a broken build.
-	if ! use berkdb ; then
-		sed -i -e '/HAVE_BERKELEY_DB/d' config.mk || die
-	fi
-
-	if ! use caps ; then
-		sed -i -e '/HAVE_CAP/d' config.mk || die
-	fi
-
-	if use minimal ; then
-		sed -i -e '/HAVE_MNL/d' config.mk || die
-	fi
-
-	if ! use elf ; then
-		sed -i -e '/HAVE_ELF/d' config.mk || die
-	fi
-
-	if ! use nfs ; then
-		sed -i -e '/HAVE_RPC/d' config.mk || die
-	fi
-
-	if ! use selinux ; then
-		sed -i -e '/HAVE_SELINUX/d' config.mk || die
-	fi
-
-	if ! use libbsd ; then
-		sed -i -e '/HAVE_LIBBSD/d' config.mk || die
-	fi
-
-	# ...Now switch on/off requested features via USE flags
-	# this is only useful if the test did not set other things, per bug #643722
-	# Keep in sync with ifs above, or refactor to be unified.
-	cat <<-EOF >> config.mk
-	TC_CONFIG_ATM := $(usex atm y n)
-	TC_CONFIG_XT  := $(usex iptables y n)
-	TC_CONFIG_NO_XT := $(usex iptables n y)
-	# We've locked in recent enough kernel headers, bug #549948
-	TC_CONFIG_IPSET := y
-	HAVE_BERKELEY_DB := $(usex berkdb y n)
-	HAVE_CAP      := $(usex caps y n)
-	HAVE_MNL      := $(usex minimal n y)
-	HAVE_ELF      := $(usex elf y n)
-	HAVE_RPC      := $(usex nfs y n)
-	HAVE_SELINUX  := $(usex selinux y n)
-	IP_CONFIG_SETNS := ${setns}
-	# Use correct iptables dir, bug #144265, bug #293709
-	IPT_LIB_DIR   := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
-	HAVE_LIBBSD   := $(usex libbsd y n)
-	EOF
-}
-
-src_compile() {
-	emake V=1 NETNS_RUN_DIR=/run/netns
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		dobin ip/ip
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}"/$(get_libdir) \
-		SBINDIR="${EPREFIX}"/sbin \
-		CONFDIR="${EPREFIX}"/etc/iproute2 \
-		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
-		MANDIR="${EPREFIX}"/usr/share/man \
-		ARPDDIR="${EPREFIX}"/var/lib/arpd \
-		install
-
-	dodir /bin
-	mv "${ED}"/{s,}bin/ip || die # bug #330115
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-
-	# Collides with net-analyzer/ifstat
-	# https://bugs.gentoo.org/868321
-	mv "${ED}"/sbin/ifstat{,-iproute2} || die
-
-	if use split-usr ; then
-		# Can remove compatibility symlink in a year: 2023-05-28.
-		# bug #547264
-		mv "${ED}"/sbin/ss "${ED}"/bin/ss || die
-		dosym -r /bin/ss /sbin/ss
-	fi
-
-	if use berkdb ; then
-		keepdir /var/lib/arpd
-		# bug #47482, arpd doesn't need to be in /sbin
-		dodir /usr/bin
-		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
-	elif [[ -d "${ED}"/var/lib/arpd ]]; then
-		rmdir --ignore-fail-on-non-empty -p "${ED}"/var/lib/arpd || die
-	fi
-}

diff --git a/sys-apps/iproute2/iproute2-6.1.0-r1.ebuild b/sys-apps/iproute2/iproute2-6.1.0-r1.ebuild
deleted file mode 100644
index 72f3265dd8e0..000000000000
--- a/sys-apps/iproute2/iproute2-6.1.0-r1.ebuild
+++ /dev/null
@@ -1,216 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit edo toolchain-funcs
-
-if [[ ${PV} == 9999 ]] ; then
-	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-r3
-else
-	SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-fi
-
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb bpf caps elf +iptables libbsd minimal nfs selinux split-usr"
-
-# We could make libmnl optional, but it's tiny, so eh
-RDEPEND="
-	!net-misc/arpd
-	!minimal? ( net-libs/libmnl:= )
-	atm? ( net-dialup/linux-atm )
-	berkdb? ( sys-libs/db:= )
-	bpf? ( dev-libs/libbpf:= )
-	caps? ( sys-libs/libcap )
-	elf? ( virtual/libelf:= )
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	libbsd? ( dev-libs/libbsd )
-	nfs? ( net-libs/libtirpc:= )
-	selinux? ( sys-libs/libselinux )
-"
-# We require newer linux-headers for ipset support (bug #549948) and some defines (bug #553876)
-DEPEND="
-	${RDEPEND}
-	>=sys-kernel/linux-headers-3.16
-"
-BDEPEND="
-	app-arch/xz-utils
-	>=sys-devel/bison-2.4
-	sys-devel/flex
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.1.0-mtu.patch # bug #291907
-	"${FILESDIR}"/${PN}-5.12.0-configure-nomagic.patch # bug #643722
-	#"${FILESDIR}"/${PN}-5.1.0-portability.patch
-	"${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
-	"${FILESDIR}"/${PN}-default-color-auto.patch
-	"${FILESDIR}"/${PN}-6.1.0-strncpy-overlap.patch
-)
-
-src_prepare() {
-	default
-
-	# Fix version if necessary
-	local versionfile="include/version.h"
-	if [[ ${PV} != 9999 ]] && ! grep -Fq "${PV}" ${versionfile} ; then
-		einfo "Fixing version string"
-		sed "s@\"[[:digit:]\.]\+\"@\"${PV}\"@" \
-			-i ${versionfile} || die
-	fi
-
-	# echo -n is not POSIX compliant
-	sed 's@echo -n@printf@' -i configure || die
-
-	sed -i \
-		-e '/^CC :\?=/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s|-O2|${CFLAGS} ${CPPFLAGS}|" \
-		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
-		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
-		Makefile || die
-
-	# Build against system headers
-	rm -r include/netinet || die #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
-
-	if use minimal ; then
-		sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile || die
-	fi
-}
-
-src_configure() {
-	tc-export AR CC PKG_CONFIG
-
-	# This sure is ugly. Should probably move into toolchain-funcs at some point.
-	local setns
-	pushd "${T}" >/dev/null || die
-	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c || die
-	if ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null ; then
-		setns=y
-	else
-		setns=n
-	fi
-
-	echo 'int main(){return 0;}' > test.c || die
-	if ! ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null ; then
-		sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile || die
-	fi
-	popd >/dev/null || die
-
-	# run "configure" script first which will create "config.mk"...
-	# Using econf breaks since 5.14.0 (a9c3d70d902a0473ee5c13336317006a52ce8242)
-	edo ./configure --libbpf_force $(usex bpf on off)
-
-	# Remove the definitions made by configure and allow them to be overridden
-	# by USE flags below.
-	# We have to do the cheesy only-sed-if-disabled because otherwise
-	# the *_FLAGS etc stuff found by configure will be used but result
-	# in a broken build.
-	if ! use berkdb ; then
-		sed -i -e '/HAVE_BERKELEY_DB/d' config.mk || die
-	fi
-
-	if ! use caps ; then
-		sed -i -e '/HAVE_CAP/d' config.mk || die
-	fi
-
-	if use minimal ; then
-		sed -i -e '/HAVE_MNL/d' config.mk || die
-	fi
-
-	if ! use elf ; then
-		sed -i -e '/HAVE_ELF/d' config.mk || die
-	fi
-
-	if ! use nfs ; then
-		sed -i -e '/HAVE_RPC/d' config.mk || die
-	fi
-
-	if ! use selinux ; then
-		sed -i -e '/HAVE_SELINUX/d' config.mk || die
-	fi
-
-	if ! use libbsd ; then
-		sed -i -e '/HAVE_LIBBSD/d' config.mk || die
-	fi
-
-	# ...Now switch on/off requested features via USE flags
-	# this is only useful if the test did not set other things, per bug #643722
-	# Keep in sync with ifs above, or refactor to be unified.
-	cat <<-EOF >> config.mk
-	TC_CONFIG_ATM := $(usex atm y n)
-	TC_CONFIG_XT  := $(usex iptables y n)
-	TC_CONFIG_NO_XT := $(usex iptables n y)
-	# We've locked in recent enough kernel headers, bug #549948
-	TC_CONFIG_IPSET := y
-	HAVE_BERKELEY_DB := $(usex berkdb y n)
-	HAVE_CAP      := $(usex caps y n)
-	HAVE_MNL      := $(usex minimal n y)
-	HAVE_ELF      := $(usex elf y n)
-	HAVE_RPC      := $(usex nfs y n)
-	HAVE_SELINUX  := $(usex selinux y n)
-	IP_CONFIG_SETNS := ${setns}
-	# Use correct iptables dir, bug #144265, bug #293709
-	IPT_LIB_DIR   := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
-	HAVE_LIBBSD   := $(usex libbsd y n)
-	EOF
-}
-
-src_compile() {
-	emake V=1 NETNS_RUN_DIR=/run/netns
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		dobin ip/ip
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}"/$(get_libdir) \
-		SBINDIR="${EPREFIX}"/sbin \
-		CONFDIR="${EPREFIX}"/etc/iproute2 \
-		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
-		MANDIR="${EPREFIX}"/usr/share/man \
-		ARPDDIR="${EPREFIX}"/var/lib/arpd \
-		install
-
-	dodir /bin
-	mv "${ED}"/{s,}bin/ip || die # bug #330115
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-
-	# Collides with net-analyzer/ifstat
-	# https://bugs.gentoo.org/868321
-	mv "${ED}"/sbin/ifstat{,-iproute2} || die
-
-	if use split-usr ; then
-		# Can remove compatibility symlink in a year: 2023-05-28.
-		# bug #547264
-		mv "${ED}"/sbin/ss "${ED}"/bin/ss || die
-		dosym -r /bin/ss /sbin/ss
-	fi
-
-	if use berkdb ; then
-		keepdir /var/lib/arpd
-		# bug #47482, arpd doesn't need to be in /sbin
-		dodir /usr/bin
-		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
-	elif [[ -d "${ED}"/var/lib/arpd ]]; then
-		rmdir --ignore-fail-on-non-empty -p "${ED}"/var/lib/arpd || die
-	fi
-}

diff --git a/sys-apps/iproute2/iproute2-6.1.0-r2.ebuild b/sys-apps/iproute2/iproute2-6.1.0-r2.ebuild
deleted file mode 100644
index 327413eb388a..000000000000
--- a/sys-apps/iproute2/iproute2-6.1.0-r2.ebuild
+++ /dev/null
@@ -1,210 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit edo toolchain-funcs
-
-if [[ ${PV} == 9999 ]] ; then
-	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-r3
-else
-	SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz"
-    KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-fi
-
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb bpf caps elf +iptables minimal nfs selinux split-usr"
-
-# We could make libmnl optional, but it's tiny, so eh
-RDEPEND="
-	!net-misc/arpd
-	!minimal? ( net-libs/libmnl:= )
-	atm? ( net-dialup/linux-atm )
-	berkdb? ( sys-libs/db:= )
-	bpf? ( dev-libs/libbpf:= )
-	caps? ( sys-libs/libcap )
-	elf? ( virtual/libelf:= )
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	nfs? ( net-libs/libtirpc:= )
-	selinux? ( sys-libs/libselinux )
-"
-# We require newer linux-headers for ipset support (bug #549948) and some defines (bug #553876)
-DEPEND="
-	${RDEPEND}
-	>=sys-kernel/linux-headers-3.16
-"
-BDEPEND="
-	app-arch/xz-utils
-	>=sys-devel/bison-2.4
-	sys-devel/flex
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.1.0-mtu.patch # bug #291907
-	"${FILESDIR}"/${PN}-5.12.0-configure-nomagic-nolibbsd.patch # bug #643722 & #911727
-	"${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
-	"${FILESDIR}"/${PN}-default-color-auto.patch
-	"${FILESDIR}"/${PN}-6.1.0-strncpy-overlap.patch
-	"${FILESDIR}"/${PN}-6.4.0-disable-libbsd-fallback.patch # bug #911727
-)
-
-src_prepare() {
-	default
-
-	# Fix version if necessary
-	local versionfile="include/version.h"
-	if [[ ${PV} != 9999 ]] && ! grep -Fq "${PV}" ${versionfile} ; then
-		einfo "Fixing version string"
-		sed "s@\"[[:digit:]\.]\+\"@\"${PV}\"@" \
-			-i ${versionfile} || die
-	fi
-
-	# echo -n is not POSIX compliant
-	sed 's@echo -n@printf@' -i configure || die
-
-	sed -i \
-		-e '/^CC :\?=/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s|-O2|${CFLAGS} ${CPPFLAGS}|" \
-		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
-		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
-		Makefile || die
-
-	# Build against system headers
-	rm -r include/netinet || die #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
-
-	if use minimal ; then
-		sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile || die
-	fi
-}
-
-src_configure() {
-	tc-export AR CC PKG_CONFIG
-
-	# This sure is ugly. Should probably move into toolchain-funcs at some point.
-	local setns
-	pushd "${T}" >/dev/null || die
-	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c || die
-	if ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null ; then
-		setns=y
-	else
-		setns=n
-	fi
-
-	echo 'int main(){return 0;}' > test.c || die
-	if ! ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null ; then
-		sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile || die
-	fi
-	popd >/dev/null || die
-
-	# run "configure" script first which will create "config.mk"...
-	# Using econf breaks since 5.14.0 (a9c3d70d902a0473ee5c13336317006a52ce8242)
-	edo ./configure --libbpf_force $(usex bpf on off)
-
-	# Remove the definitions made by configure and allow them to be overridden
-	# by USE flags below.
-	# We have to do the cheesy only-sed-if-disabled because otherwise
-	# the *_FLAGS etc stuff found by configure will be used but result
-	# in a broken build.
-	if ! use berkdb ; then
-		sed -i -e '/HAVE_BERKELEY_DB/d' config.mk || die
-	fi
-
-	if ! use caps ; then
-		sed -i -e '/HAVE_CAP/d' config.mk || die
-	fi
-
-	if use minimal ; then
-		sed -i -e '/HAVE_MNL/d' config.mk || die
-	fi
-
-	if ! use elf ; then
-		sed -i -e '/HAVE_ELF/d' config.mk || die
-	fi
-
-	if ! use nfs ; then
-		sed -i -e '/HAVE_RPC/d' config.mk || die
-	fi
-
-	if ! use selinux ; then
-		sed -i -e '/HAVE_SELINUX/d' config.mk || die
-	fi
-
-	# ...Now switch on/off requested features via USE flags
-	# this is only useful if the test did not set other things, per bug #643722
-	# Keep in sync with ifs above, or refactor to be unified.
-	cat <<-EOF >> config.mk
-	TC_CONFIG_ATM := $(usex atm y n)
-	TC_CONFIG_XT  := $(usex iptables y n)
-	TC_CONFIG_NO_XT := $(usex iptables n y)
-	# We've locked in recent enough kernel headers, bug #549948
-	TC_CONFIG_IPSET := y
-	HAVE_BERKELEY_DB := $(usex berkdb y n)
-	HAVE_CAP      := $(usex caps y n)
-	HAVE_MNL      := $(usex minimal n y)
-	HAVE_ELF      := $(usex elf y n)
-	HAVE_RPC      := $(usex nfs y n)
-	HAVE_SELINUX  := $(usex selinux y n)
-	IP_CONFIG_SETNS := ${setns}
-	# Use correct iptables dir, bug #144265, bug #293709
-	IPT_LIB_DIR   := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
-	EOF
-}
-
-src_compile() {
-	emake V=1 NETNS_RUN_DIR=/run/netns
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		dobin ip/ip
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}"/$(get_libdir) \
-		SBINDIR="${EPREFIX}"/sbin \
-		CONFDIR="${EPREFIX}"/etc/iproute2 \
-		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
-		MANDIR="${EPREFIX}"/usr/share/man \
-		ARPDDIR="${EPREFIX}"/var/lib/arpd \
-		install
-
-	dodir /bin
-	mv "${ED}"/{s,}bin/ip || die # bug #330115
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-
-	# Collides with net-analyzer/ifstat
-	# https://bugs.gentoo.org/868321
-	mv "${ED}"/sbin/ifstat{,-iproute2} || die
-
-	if use split-usr ; then
-		# Can remove compatibility symlink in a year: 2023-05-28.
-		# bug #547264
-		mv "${ED}"/sbin/ss "${ED}"/bin/ss || die
-		dosym -r /bin/ss /sbin/ss
-	fi
-
-	if use berkdb ; then
-		keepdir /var/lib/arpd
-		# bug #47482, arpd doesn't need to be in /sbin
-		dodir /usr/bin
-		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
-	elif [[ -d "${ED}"/var/lib/arpd ]]; then
-		rmdir --ignore-fail-on-non-empty -p "${ED}"/var/lib/arpd || die
-	fi
-}

diff --git a/sys-apps/iproute2/iproute2-6.2.0-r1.ebuild b/sys-apps/iproute2/iproute2-6.2.0-r1.ebuild
deleted file mode 100644
index dc076ef7f9cf..000000000000
--- a/sys-apps/iproute2/iproute2-6.2.0-r1.ebuild
+++ /dev/null
@@ -1,220 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit edo toolchain-funcs
-
-if [[ ${PV} == 9999 ]] ; then
-	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-r3
-else
-	SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz"
-	KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-fi
-
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb bpf caps elf +iptables libbsd minimal nfs selinux split-usr"
-# Needs root
-RESTRICT="test"
-
-# We could make libmnl optional, but it's tiny, so eh
-RDEPEND="
-	!net-misc/arpd
-	!minimal? ( net-libs/libmnl:= )
-	atm? ( net-dialup/linux-atm )
-	berkdb? ( sys-libs/db:= )
-	bpf? ( dev-libs/libbpf:= )
-	caps? ( sys-libs/libcap )
-	elf? ( virtual/libelf:= )
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	libbsd? ( dev-libs/libbsd )
-	nfs? ( net-libs/libtirpc:= )
-	selinux? ( sys-libs/libselinux )
-"
-# We require newer linux-headers for ipset support (bug #549948) and some defines (bug #553876)
-DEPEND="
-	${RDEPEND}
-	>=sys-kernel/linux-headers-3.16
-"
-BDEPEND="
-	app-arch/xz-utils
-	>=sys-devel/bison-2.4
-	sys-devel/flex
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.1.0-mtu.patch # bug #291907
-	"${FILESDIR}"/${PN}-5.12.0-configure-nomagic.patch # bug #643722
-	#"${FILESDIR}"/${PN}-5.1.0-portability.patch
-	"${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
-)
-
-src_prepare() {
-	default
-
-	# Fix version if necessary
-	local versionfile="include/version.h"
-	if [[ ${PV} != 9999 ]] && ! grep -Fq "${PV}" ${versionfile} ; then
-		einfo "Fixing version string"
-		sed "s@\"[[:digit:]\.]\+\"@\"${PV}\"@" \
-			-i ${versionfile} || die
-	fi
-
-	# echo -n is not POSIX compliant
-	sed 's@echo -n@printf@' -i configure || die
-
-	sed -i \
-		-e '/^CC :\?=/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s|-O2|${CFLAGS} ${CPPFLAGS}|" \
-		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
-		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
-		Makefile || die
-
-	# Build against system headers
-	rm -r include/netinet || die #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
-
-	if use minimal ; then
-		sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile || die
-	fi
-}
-
-src_configure() {
-	tc-export AR CC PKG_CONFIG
-
-	# This sure is ugly. Should probably move into toolchain-funcs at some point.
-	local setns
-	pushd "${T}" >/dev/null || die
-	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c || die
-	if ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null ; then
-		setns=y
-	else
-		setns=n
-	fi
-
-	echo 'int main(){return 0;}' > test.c || die
-	if ! ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null ; then
-		sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile || die
-	fi
-	popd >/dev/null || die
-
-	# run "configure" script first which will create "config.mk"...
-	# Using econf breaks since 5.14.0 (a9c3d70d902a0473ee5c13336317006a52ce8242)
-	edo ./configure --libbpf_force $(usex bpf on off)
-
-	# Remove the definitions made by configure and allow them to be overridden
-	# by USE flags below.
-	# We have to do the cheesy only-sed-if-disabled because otherwise
-	# the *_FLAGS etc stuff found by configure will be used but result
-	# in a broken build.
-	if ! use berkdb ; then
-		sed -i -e '/HAVE_BERKELEY_DB/d' config.mk || die
-	fi
-
-	if ! use caps ; then
-		sed -i -e '/HAVE_CAP/d' config.mk || die
-	fi
-
-	if use minimal ; then
-		sed -i -e '/HAVE_MNL/d' config.mk || die
-	fi
-
-	if ! use elf ; then
-		sed -i -e '/HAVE_ELF/d' config.mk || die
-	fi
-
-	if ! use nfs ; then
-		sed -i -e '/HAVE_RPC/d' config.mk || die
-	fi
-
-	if ! use selinux ; then
-		sed -i -e '/HAVE_SELINUX/d' config.mk || die
-	fi
-
-	if ! use libbsd ; then
-		sed -i -e '/HAVE_LIBBSD/d' config.mk || die
-	fi
-
-	# ...Now switch on/off requested features via USE flags
-	# this is only useful if the test did not set other things, per bug #643722
-	# Keep in sync with ifs above, or refactor to be unified.
-	cat <<-EOF >> config.mk
-	TC_CONFIG_ATM := $(usex atm y n)
-	TC_CONFIG_XT  := $(usex iptables y n)
-	TC_CONFIG_NO_XT := $(usex iptables n y)
-	# We've locked in recent enough kernel headers, bug #549948
-	TC_CONFIG_IPSET := y
-	HAVE_BERKELEY_DB := $(usex berkdb y n)
-	HAVE_CAP      := $(usex caps y n)
-	HAVE_MNL      := $(usex minimal n y)
-	HAVE_ELF      := $(usex elf y n)
-	HAVE_RPC      := $(usex nfs y n)
-	HAVE_SELINUX  := $(usex selinux y n)
-	IP_CONFIG_SETNS := ${setns}
-	# Use correct iptables dir, bug #144265, bug #293709
-	IPT_LIB_DIR   := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
-	HAVE_LIBBSD   := $(usex libbsd y n)
-	EOF
-}
-
-src_compile() {
-	emake V=1 NETNS_RUN_DIR=/run/netns
-}
-
-src_test() {
-	emake check
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		dobin ip/ip
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}"/$(get_libdir) \
-		SBINDIR="${EPREFIX}"/sbin \
-		CONFDIR="${EPREFIX}"/etc/iproute2 \
-		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
-		MANDIR="${EPREFIX}"/usr/share/man \
-		ARPDDIR="${EPREFIX}"/var/lib/arpd \
-		install
-
-	dodir /bin
-	mv "${ED}"/{s,}bin/ip || die # bug #330115
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-
-	# Collides with net-analyzer/ifstat
-	# https://bugs.gentoo.org/868321
-	mv "${ED}"/sbin/ifstat{,-iproute2} || die
-
-	if use split-usr ; then
-		# Can remove compatibility symlink in a year: 2023-05-28.
-		# bug #547264
-		mv "${ED}"/sbin/ss "${ED}"/bin/ss || die
-		dosym -r /bin/ss /sbin/ss
-	fi
-
-	if use berkdb ; then
-		keepdir /var/lib/arpd
-		# bug #47482, arpd doesn't need to be in /sbin
-		dodir /usr/bin
-		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
-	elif [[ -d "${ED}"/var/lib/arpd ]]; then
-		rmdir --ignore-fail-on-non-empty -p "${ED}"/var/lib/arpd || die
-	fi
-}

diff --git a/sys-apps/iproute2/iproute2-6.2.0-r2.ebuild b/sys-apps/iproute2/iproute2-6.2.0-r2.ebuild
deleted file mode 100644
index 3549e2e4b8fe..000000000000
--- a/sys-apps/iproute2/iproute2-6.2.0-r2.ebuild
+++ /dev/null
@@ -1,214 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit edo toolchain-funcs
-
-if [[ ${PV} == 9999 ]] ; then
-	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-r3
-else
-	SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz"
-    KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-fi
-
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb bpf caps elf +iptables minimal nfs selinux split-usr"
-# Needs root
-RESTRICT="test"
-
-# We could make libmnl optional, but it's tiny, so eh
-RDEPEND="
-	!net-misc/arpd
-	!minimal? ( net-libs/libmnl:= )
-	atm? ( net-dialup/linux-atm )
-	berkdb? ( sys-libs/db:= )
-	bpf? ( dev-libs/libbpf:= )
-	caps? ( sys-libs/libcap )
-	elf? ( virtual/libelf:= )
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	nfs? ( net-libs/libtirpc:= )
-	selinux? ( sys-libs/libselinux )
-"
-# We require newer linux-headers for ipset support (bug #549948) and some defines (bug #553876)
-DEPEND="
-	${RDEPEND}
-	>=sys-kernel/linux-headers-3.16
-"
-BDEPEND="
-	app-arch/xz-utils
-	>=sys-devel/bison-2.4
-	sys-devel/flex
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.1.0-mtu.patch # bug #291907
-	"${FILESDIR}"/${PN}-5.12.0-configure-nomagic-nolibbsd.patch # bug #643722 & #911727
-	"${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
-	"${FILESDIR}"/${PN}-6.4.0-disable-libbsd-fallback.patch # bug #911727
-)
-
-src_prepare() {
-	default
-
-	# Fix version if necessary
-	local versionfile="include/version.h"
-	if [[ ${PV} != 9999 ]] && ! grep -Fq "${PV}" ${versionfile} ; then
-		einfo "Fixing version string"
-		sed "s@\"[[:digit:]\.]\+\"@\"${PV}\"@" \
-			-i ${versionfile} || die
-	fi
-
-	# echo -n is not POSIX compliant
-	sed 's@echo -n@printf@' -i configure || die
-
-	sed -i \
-		-e '/^CC :\?=/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s|-O2|${CFLAGS} ${CPPFLAGS}|" \
-		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
-		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
-		Makefile || die
-
-	# Build against system headers
-	rm -r include/netinet || die #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
-
-	if use minimal ; then
-		sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile || die
-	fi
-}
-
-src_configure() {
-	tc-export AR CC PKG_CONFIG
-
-	# This sure is ugly. Should probably move into toolchain-funcs at some point.
-	local setns
-	pushd "${T}" >/dev/null || die
-	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c || die
-	if ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null ; then
-		setns=y
-	else
-		setns=n
-	fi
-
-	echo 'int main(){return 0;}' > test.c || die
-	if ! ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null ; then
-		sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile || die
-	fi
-	popd >/dev/null || die
-
-	# run "configure" script first which will create "config.mk"...
-	# Using econf breaks since 5.14.0 (a9c3d70d902a0473ee5c13336317006a52ce8242)
-	edo ./configure --libbpf_force $(usex bpf on off)
-
-	# Remove the definitions made by configure and allow them to be overridden
-	# by USE flags below.
-	# We have to do the cheesy only-sed-if-disabled because otherwise
-	# the *_FLAGS etc stuff found by configure will be used but result
-	# in a broken build.
-	if ! use berkdb ; then
-		sed -i -e '/HAVE_BERKELEY_DB/d' config.mk || die
-	fi
-
-	if ! use caps ; then
-		sed -i -e '/HAVE_CAP/d' config.mk || die
-	fi
-
-	if use minimal ; then
-		sed -i -e '/HAVE_MNL/d' config.mk || die
-	fi
-
-	if ! use elf ; then
-		sed -i -e '/HAVE_ELF/d' config.mk || die
-	fi
-
-	if ! use nfs ; then
-		sed -i -e '/HAVE_RPC/d' config.mk || die
-	fi
-
-	if ! use selinux ; then
-		sed -i -e '/HAVE_SELINUX/d' config.mk || die
-	fi
-
-	# ...Now switch on/off requested features via USE flags
-	# this is only useful if the test did not set other things, per bug #643722
-	# Keep in sync with ifs above, or refactor to be unified.
-	cat <<-EOF >> config.mk
-	TC_CONFIG_ATM := $(usex atm y n)
-	TC_CONFIG_XT  := $(usex iptables y n)
-	TC_CONFIG_NO_XT := $(usex iptables n y)
-	# We've locked in recent enough kernel headers, bug #549948
-	TC_CONFIG_IPSET := y
-	HAVE_BERKELEY_DB := $(usex berkdb y n)
-	HAVE_CAP      := $(usex caps y n)
-	HAVE_MNL      := $(usex minimal n y)
-	HAVE_ELF      := $(usex elf y n)
-	HAVE_RPC      := $(usex nfs y n)
-	HAVE_SELINUX  := $(usex selinux y n)
-	IP_CONFIG_SETNS := ${setns}
-	# Use correct iptables dir, bug #144265, bug #293709
-	IPT_LIB_DIR   := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
-	EOF
-}
-
-src_compile() {
-	emake V=1 NETNS_RUN_DIR=/run/netns
-}
-
-src_test() {
-	emake check
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		dobin ip/ip
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}"/$(get_libdir) \
-		SBINDIR="${EPREFIX}"/sbin \
-		CONFDIR="${EPREFIX}"/etc/iproute2 \
-		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
-		MANDIR="${EPREFIX}"/usr/share/man \
-		ARPDDIR="${EPREFIX}"/var/lib/arpd \
-		install
-
-	dodir /bin
-	mv "${ED}"/{s,}bin/ip || die # bug #330115
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-
-	# Collides with net-analyzer/ifstat
-	# https://bugs.gentoo.org/868321
-	mv "${ED}"/sbin/ifstat{,-iproute2} || die
-
-	if use split-usr ; then
-		# Can remove compatibility symlink in a year: 2023-05-28.
-		# bug #547264
-		mv "${ED}"/sbin/ss "${ED}"/bin/ss || die
-		dosym -r /bin/ss /sbin/ss
-	fi
-
-	if use berkdb ; then
-		keepdir /var/lib/arpd
-		# bug #47482, arpd doesn't need to be in /sbin
-		dodir /usr/bin
-		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
-	elif [[ -d "${ED}"/var/lib/arpd ]]; then
-		rmdir --ignore-fail-on-non-empty -p "${ED}"/var/lib/arpd || die
-	fi
-}

diff --git a/sys-apps/iproute2/iproute2-6.3.0-r1.ebuild b/sys-apps/iproute2/iproute2-6.3.0-r1.ebuild
deleted file mode 100644
index dedd9991953c..000000000000
--- a/sys-apps/iproute2/iproute2-6.3.0-r1.ebuild
+++ /dev/null
@@ -1,214 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit edo toolchain-funcs
-
-if [[ ${PV} == 9999 ]] ; then
-	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-r3
-else
-	SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz"
-    KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-fi
-
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb bpf caps elf +iptables minimal nfs selinux split-usr"
-# Needs root
-RESTRICT="test"
-
-# We could make libmnl optional, but it's tiny, so eh
-RDEPEND="
-	!net-misc/arpd
-	!minimal? ( net-libs/libmnl:= )
-	atm? ( net-dialup/linux-atm )
-	berkdb? ( sys-libs/db:= )
-	bpf? ( dev-libs/libbpf:= )
-	caps? ( sys-libs/libcap )
-	elf? ( virtual/libelf:= )
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	nfs? ( net-libs/libtirpc:= )
-	selinux? ( sys-libs/libselinux )
-"
-# We require newer linux-headers for ipset support (bug #549948) and some defines (bug #553876)
-DEPEND="
-	${RDEPEND}
-	>=sys-kernel/linux-headers-3.16
-"
-BDEPEND="
-	app-arch/xz-utils
-	>=sys-devel/bison-2.4
-	sys-devel/flex
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.1.0-mtu.patch # bug #291907
-    "${FILESDIR}"/${PN}-5.12.0-configure-nomagic-nolibbsd.patch # bug #643722 & #911727
-    "${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
-    "${FILESDIR}"/${PN}-6.4.0-disable-libbsd-fallback.patch # bug #911727
-)
-
-src_prepare() {
-	default
-
-	# Fix version if necessary
-	local versionfile="include/version.h"
-	if [[ ${PV} != 9999 ]] && ! grep -Fq "${PV}" ${versionfile} ; then
-		einfo "Fixing version string"
-		sed "s@\"[[:digit:]\.]\+\"@\"${PV}\"@" \
-			-i ${versionfile} || die
-	fi
-
-	# echo -n is not POSIX compliant
-	sed 's@echo -n@printf@' -i configure || die
-
-	sed -i \
-		-e '/^CC :\?=/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s|-O2|${CFLAGS} ${CPPFLAGS}|" \
-		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
-		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
-		Makefile || die
-
-	# Build against system headers
-	rm -r include/netinet || die #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
-
-	if use minimal ; then
-		sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile || die
-	fi
-}
-
-src_configure() {
-	tc-export AR CC PKG_CONFIG
-
-	# This sure is ugly. Should probably move into toolchain-funcs at some point.
-	local setns
-	pushd "${T}" >/dev/null || die
-	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c || die
-	if ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null ; then
-		setns=y
-	else
-		setns=n
-	fi
-
-	echo 'int main(){return 0;}' > test.c || die
-	if ! ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null ; then
-		sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile || die
-	fi
-	popd >/dev/null || die
-
-	# run "configure" script first which will create "config.mk"...
-	# Using econf breaks since 5.14.0 (a9c3d70d902a0473ee5c13336317006a52ce8242)
-	edo ./configure --libbpf_force $(usex bpf on off)
-
-	# Remove the definitions made by configure and allow them to be overridden
-	# by USE flags below.
-	# We have to do the cheesy only-sed-if-disabled because otherwise
-	# the *_FLAGS etc stuff found by configure will be used but result
-	# in a broken build.
-	if ! use berkdb ; then
-		sed -i -e '/HAVE_BERKELEY_DB/d' config.mk || die
-	fi
-
-	if ! use caps ; then
-		sed -i -e '/HAVE_CAP/d' config.mk || die
-	fi
-
-	if use minimal ; then
-		sed -i -e '/HAVE_MNL/d' config.mk || die
-	fi
-
-	if ! use elf ; then
-		sed -i -e '/HAVE_ELF/d' config.mk || die
-	fi
-
-	if ! use nfs ; then
-		sed -i -e '/HAVE_RPC/d' config.mk || die
-	fi
-
-	if ! use selinux ; then
-		sed -i -e '/HAVE_SELINUX/d' config.mk || die
-	fi
-
-	# ...Now switch on/off requested features via USE flags
-	# this is only useful if the test did not set other things, per bug #643722
-	# Keep in sync with ifs above, or refactor to be unified.
-	cat <<-EOF >> config.mk
-	TC_CONFIG_ATM := $(usex atm y n)
-	TC_CONFIG_XT  := $(usex iptables y n)
-	TC_CONFIG_NO_XT := $(usex iptables n y)
-	# We've locked in recent enough kernel headers, bug #549948
-	TC_CONFIG_IPSET := y
-	HAVE_BERKELEY_DB := $(usex berkdb y n)
-	HAVE_CAP      := $(usex caps y n)
-	HAVE_MNL      := $(usex minimal n y)
-	HAVE_ELF      := $(usex elf y n)
-	HAVE_RPC      := $(usex nfs y n)
-	HAVE_SELINUX  := $(usex selinux y n)
-	IP_CONFIG_SETNS := ${setns}
-	# Use correct iptables dir, bug #144265, bug #293709
-	IPT_LIB_DIR   := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
-	EOF
-}
-
-src_compile() {
-	emake V=1 NETNS_RUN_DIR=/run/netns
-}
-
-src_test() {
-	emake check
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		dobin ip/ip
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}"/$(get_libdir) \
-		SBINDIR="${EPREFIX}"/sbin \
-		CONFDIR="${EPREFIX}"/etc/iproute2 \
-		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
-		MANDIR="${EPREFIX}"/usr/share/man \
-		ARPDDIR="${EPREFIX}"/var/lib/arpd \
-		install
-
-	dodir /bin
-	mv "${ED}"/{s,}bin/ip || die # bug #330115
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-
-	# Collides with net-analyzer/ifstat
-	# https://bugs.gentoo.org/868321
-	mv "${ED}"/sbin/ifstat{,-iproute2} || die
-
-	if use split-usr ; then
-		# Can remove compatibility symlink in a year: 2023-05-28.
-		# bug #547264
-		mv "${ED}"/sbin/ss "${ED}"/bin/ss || die
-		dosym -r /bin/ss /sbin/ss
-	fi
-
-	if use berkdb ; then
-		keepdir /var/lib/arpd
-		# bug #47482, arpd doesn't need to be in /sbin
-		dodir /usr/bin
-		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
-	elif [[ -d "${ED}"/var/lib/arpd ]]; then
-		rmdir --ignore-fail-on-non-empty -p "${ED}"/var/lib/arpd || die
-	fi
-}

diff --git a/sys-apps/iproute2/iproute2-6.3.0.ebuild b/sys-apps/iproute2/iproute2-6.3.0.ebuild
deleted file mode 100644
index dc076ef7f9cf..000000000000
--- a/sys-apps/iproute2/iproute2-6.3.0.ebuild
+++ /dev/null
@@ -1,220 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit edo toolchain-funcs
-
-if [[ ${PV} == 9999 ]] ; then
-	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-r3
-else
-	SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz"
-	KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-fi
-
-DESCRIPTION="kernel routing and traffic control utilities"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb bpf caps elf +iptables libbsd minimal nfs selinux split-usr"
-# Needs root
-RESTRICT="test"
-
-# We could make libmnl optional, but it's tiny, so eh
-RDEPEND="
-	!net-misc/arpd
-	!minimal? ( net-libs/libmnl:= )
-	atm? ( net-dialup/linux-atm )
-	berkdb? ( sys-libs/db:= )
-	bpf? ( dev-libs/libbpf:= )
-	caps? ( sys-libs/libcap )
-	elf? ( virtual/libelf:= )
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	libbsd? ( dev-libs/libbsd )
-	nfs? ( net-libs/libtirpc:= )
-	selinux? ( sys-libs/libselinux )
-"
-# We require newer linux-headers for ipset support (bug #549948) and some defines (bug #553876)
-DEPEND="
-	${RDEPEND}
-	>=sys-kernel/linux-headers-3.16
-"
-BDEPEND="
-	app-arch/xz-utils
-	>=sys-devel/bison-2.4
-	sys-devel/flex
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.1.0-mtu.patch # bug #291907
-	"${FILESDIR}"/${PN}-5.12.0-configure-nomagic.patch # bug #643722
-	#"${FILESDIR}"/${PN}-5.1.0-portability.patch
-	"${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
-)
-
-src_prepare() {
-	default
-
-	# Fix version if necessary
-	local versionfile="include/version.h"
-	if [[ ${PV} != 9999 ]] && ! grep -Fq "${PV}" ${versionfile} ; then
-		einfo "Fixing version string"
-		sed "s@\"[[:digit:]\.]\+\"@\"${PV}\"@" \
-			-i ${versionfile} || die
-	fi
-
-	# echo -n is not POSIX compliant
-	sed 's@echo -n@printf@' -i configure || die
-
-	sed -i \
-		-e '/^CC :\?=/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s|-O2|${CFLAGS} ${CPPFLAGS}|" \
-		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
-		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
-		Makefile || die
-
-	# Build against system headers
-	rm -r include/netinet || die #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
-
-	if use minimal ; then
-		sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile || die
-	fi
-}
-
-src_configure() {
-	tc-export AR CC PKG_CONFIG
-
-	# This sure is ugly. Should probably move into toolchain-funcs at some point.
-	local setns
-	pushd "${T}" >/dev/null || die
-	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c || die
-	if ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null ; then
-		setns=y
-	else
-		setns=n
-	fi
-
-	echo 'int main(){return 0;}' > test.c || die
-	if ! ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null ; then
-		sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile || die
-	fi
-	popd >/dev/null || die
-
-	# run "configure" script first which will create "config.mk"...
-	# Using econf breaks since 5.14.0 (a9c3d70d902a0473ee5c13336317006a52ce8242)
-	edo ./configure --libbpf_force $(usex bpf on off)
-
-	# Remove the definitions made by configure and allow them to be overridden
-	# by USE flags below.
-	# We have to do the cheesy only-sed-if-disabled because otherwise
-	# the *_FLAGS etc stuff found by configure will be used but result
-	# in a broken build.
-	if ! use berkdb ; then
-		sed -i -e '/HAVE_BERKELEY_DB/d' config.mk || die
-	fi
-
-	if ! use caps ; then
-		sed -i -e '/HAVE_CAP/d' config.mk || die
-	fi
-
-	if use minimal ; then
-		sed -i -e '/HAVE_MNL/d' config.mk || die
-	fi
-
-	if ! use elf ; then
-		sed -i -e '/HAVE_ELF/d' config.mk || die
-	fi
-
-	if ! use nfs ; then
-		sed -i -e '/HAVE_RPC/d' config.mk || die
-	fi
-
-	if ! use selinux ; then
-		sed -i -e '/HAVE_SELINUX/d' config.mk || die
-	fi
-
-	if ! use libbsd ; then
-		sed -i -e '/HAVE_LIBBSD/d' config.mk || die
-	fi
-
-	# ...Now switch on/off requested features via USE flags
-	# this is only useful if the test did not set other things, per bug #643722
-	# Keep in sync with ifs above, or refactor to be unified.
-	cat <<-EOF >> config.mk
-	TC_CONFIG_ATM := $(usex atm y n)
-	TC_CONFIG_XT  := $(usex iptables y n)
-	TC_CONFIG_NO_XT := $(usex iptables n y)
-	# We've locked in recent enough kernel headers, bug #549948
-	TC_CONFIG_IPSET := y
-	HAVE_BERKELEY_DB := $(usex berkdb y n)
-	HAVE_CAP      := $(usex caps y n)
-	HAVE_MNL      := $(usex minimal n y)
-	HAVE_ELF      := $(usex elf y n)
-	HAVE_RPC      := $(usex nfs y n)
-	HAVE_SELINUX  := $(usex selinux y n)
-	IP_CONFIG_SETNS := ${setns}
-	# Use correct iptables dir, bug #144265, bug #293709
-	IPT_LIB_DIR   := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
-	HAVE_LIBBSD   := $(usex libbsd y n)
-	EOF
-}
-
-src_compile() {
-	emake V=1 NETNS_RUN_DIR=/run/netns
-}
-
-src_test() {
-	emake check
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		dobin ip/ip
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}"/$(get_libdir) \
-		SBINDIR="${EPREFIX}"/sbin \
-		CONFDIR="${EPREFIX}"/etc/iproute2 \
-		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
-		MANDIR="${EPREFIX}"/usr/share/man \
-		ARPDDIR="${EPREFIX}"/var/lib/arpd \
-		install
-
-	dodir /bin
-	mv "${ED}"/{s,}bin/ip || die # bug #330115
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-
-	# Collides with net-analyzer/ifstat
-	# https://bugs.gentoo.org/868321
-	mv "${ED}"/sbin/ifstat{,-iproute2} || die
-
-	if use split-usr ; then
-		# Can remove compatibility symlink in a year: 2023-05-28.
-		# bug #547264
-		mv "${ED}"/sbin/ss "${ED}"/bin/ss || die
-		dosym -r /bin/ss /sbin/ss
-	fi
-
-	if use berkdb ; then
-		keepdir /var/lib/arpd
-		# bug #47482, arpd doesn't need to be in /sbin
-		dodir /usr/bin
-		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
-	elif [[ -d "${ED}"/var/lib/arpd ]]; then
-		rmdir --ignore-fail-on-non-empty -p "${ED}"/var/lib/arpd || die
-	fi
-}


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/files/, sys-apps/iproute2/
@ 2023-12-28  2:19 Sam James
  0 siblings, 0 replies; 18+ messages in thread
From: Sam James @ 2023-12-28  2:19 UTC (permalink / raw
  To: gentoo-commits

commit:     8bbe322a85ffd86df4af61222d677808ce5b2ee6
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 28 02:17:29 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 28 02:17:29 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8bbe322a

sys-apps/iproute2: fix config location

Backport the suggested commits in the bug to install default configuration files
to /usr/share where they belong.

Closes: https://bugs.gentoo.org/920054
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...oute2-6.6.0-makefile-use-usr-share-config.patch |  57 ++++++
 .../files/iproute2-6.6.0-revert-CONF_USR_DIR.patch |  38 ++++
 sys-apps/iproute2/iproute2-6.6.0-r2.ebuild         | 217 +++++++++++++++++++++
 3 files changed, 312 insertions(+)

diff --git a/sys-apps/iproute2/files/iproute2-6.6.0-makefile-use-usr-share-config.patch b/sys-apps/iproute2/files/iproute2-6.6.0-makefile-use-usr-share-config.patch
new file mode 100644
index 000000000000..03c125accc8c
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-6.6.0-makefile-use-usr-share-config.patch
@@ -0,0 +1,57 @@
+https://bugs.gentoo.org/920054
+https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/patch/?id=962692356a1cc41932e43575f3c50927e455ab53
+
+From 962692356a1cc41932e43575f3c50927e455ab53 Mon Sep 17 00:00:00 2001
+From: Andrea Claudi <aclaudi@redhat.com>
+Date: Wed, 15 Nov 2023 18:25:35 +0100
+Subject: Makefile: use /usr/share/iproute2 for config files
+
+According to FHS:
+
+"/usr/lib includes object files and libraries. On some systems, it may
+also include internal binaries that are not intended to be executed
+directly by users or shell scripts."
+
+A better directory to store config files is /usr/share:
+
+"The /usr/share hierarchy is for all read-only architecture independent
+data files.
+
+This hierarchy is intended to be shareable among all architecture
+platforms of a given OS; thus, for example, a site with i386, Alpha, and
+PPC platforms might maintain a single /usr/share directory that is
+centrally-mounted."
+
+Accordingly, move configuration files to $(DATADIR)/iproute2.
+
+Fixes: 946753a4459b ("Makefile: ensure CONF_USR_DIR honours the libdir config")
+Reported-by: Luca Boccassi <luca.boccassi@gmail.com>
+Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
+Acked-by: Luca Boccassi <bluca@debian.org>
+Reviewed-by: Simon Horman <horms@kernel.org>
+Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index a24844cf0..8024d45ec 100644
+--- a/Makefile
++++ b/Makefile
+@@ -16,12 +16,12 @@ endif
+ 
+ PREFIX?=/usr
+ SBINDIR?=/sbin
+-CONF_ETC_DIR?=/etc/iproute2
+-CONF_USR_DIR?=$(PREFIX)/lib/iproute2
+ NETNS_RUN_DIR?=/var/run/netns
+ NETNS_ETC_DIR?=/etc/netns
+ DATADIR?=$(PREFIX)/share
+ HDRDIR?=$(PREFIX)/include/iproute2
++CONF_ETC_DIR?=/etc/iproute2
++CONF_USR_DIR?=$(DATADIR)/iproute2
+ DOCDIR?=$(DATADIR)/doc/iproute2
+ MANDIR?=$(DATADIR)/man
+ ARPDDIR?=/var/lib/arpd
+-- 
+cgit 1.2.3-korg

diff --git a/sys-apps/iproute2/files/iproute2-6.6.0-revert-CONF_USR_DIR.patch b/sys-apps/iproute2/files/iproute2-6.6.0-revert-CONF_USR_DIR.patch
new file mode 100644
index 000000000000..79be096af231
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-6.6.0-revert-CONF_USR_DIR.patch
@@ -0,0 +1,38 @@
+https://bugs.gentoo.org/920054
+https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/patch/?id=deb66acabe44d103c8368b62a76ef37aa074748d
+
+From deb66acabe44d103c8368b62a76ef37aa074748d Mon Sep 17 00:00:00 2001
+From: Luca Boccassi <bluca@debian.org>
+Date: Mon, 6 Nov 2023 00:14:10 +0000
+Subject: Revert "Makefile: ensure CONF_USR_DIR honours the libdir config"
+
+LIBDIR in Debian and derivatives is not /usr/lib/, it's
+/usr/lib/<architecture triplet>/, which is different, and it's the
+wrong location where to install architecture-independent default
+configuration files, which should always go to /usr/lib/ instead.
+Installing these files to the per-architecture directory is not
+the right thing, hence revert the change.
+
+This reverts commit 946753a4459bd035132a27bb2eb87529c1979b90.
+
+Signed-off-by: Luca Boccassi <bluca@debian.org>
+Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 5c559c8dc..a24844cf0 100644
+--- a/Makefile
++++ b/Makefile
+@@ -17,7 +17,7 @@ endif
+ PREFIX?=/usr
+ SBINDIR?=/sbin
+ CONF_ETC_DIR?=/etc/iproute2
+-CONF_USR_DIR?=$(LIBDIR)/iproute2
++CONF_USR_DIR?=$(PREFIX)/lib/iproute2
+ NETNS_RUN_DIR?=/var/run/netns
+ NETNS_ETC_DIR?=/etc/netns
+ DATADIR?=$(PREFIX)/share
+-- 
+cgit 1.2.3-korg

diff --git a/sys-apps/iproute2/iproute2-6.6.0-r2.ebuild b/sys-apps/iproute2/iproute2-6.6.0-r2.ebuild
new file mode 100644
index 000000000000..796a1c1367b1
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-6.6.0-r2.ebuild
@@ -0,0 +1,217 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo toolchain-funcs
+
+if [[ ${PV} == 9999 ]] ; then
+	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
+	inherit git-r3
+else
+	SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+DESCRIPTION="kernel routing and traffic control utilities"
+HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="atm berkdb bpf caps elf +iptables minimal nfs selinux split-usr"
+# Needs root
+RESTRICT="test"
+
+# We could make libmnl optional, but it's tiny, so eh
+RDEPEND="
+	!net-misc/arpd
+	!minimal? ( net-libs/libmnl:= )
+	atm? ( net-dialup/linux-atm )
+	berkdb? ( sys-libs/db:= )
+	bpf? ( dev-libs/libbpf:= )
+	caps? ( sys-libs/libcap )
+	elf? ( virtual/libelf:= )
+	iptables? ( >=net-firewall/iptables-1.4.20:= )
+	nfs? ( net-libs/libtirpc:= )
+	selinux? ( sys-libs/libselinux )
+"
+# We require newer linux-headers for ipset support (bug #549948) and some defines (bug #553876)
+DEPEND="
+	${RDEPEND}
+	>=sys-kernel/linux-headers-3.16
+"
+BDEPEND="
+	app-arch/xz-utils
+	>=sys-devel/bison-2.4
+	sys-devel/flex
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-6.5.0-mtu.patch # bug #291907
+	"${FILESDIR}"/${PN}-6.5.0-configure-nomagic-nolibbsd.patch # bug #643722 & #911727
+	"${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
+	"${FILESDIR}"/${PN}-6.4.0-disable-libbsd-fallback.patch # bug #911727
+	"${FILESDIR}"/${PN}-6.6.0-configure-Add-_GNU_SOURCE-to-strlcpy-configure-test.patch
+	"${FILESDIR}"/${PN}-6.6.0-revert-CONF_USR_DIR.patch
+	"${FILESDIR}"/${PN}-6.6.0-makefile-use-usr-share-config.patch
+)
+
+src_prepare() {
+	default
+
+	# Fix version if necessary
+	local versionfile="include/version.h"
+	if [[ ${PV} != 9999 ]] && ! grep -Fq "${PV}" ${versionfile} ; then
+		einfo "Fixing version string"
+		sed -i "s@\"[[:digit:]\.]\+\"@\"${PV}\"@" \
+			${versionfile} || die
+	fi
+
+	# echo -n is not POSIX compliant
+	sed -i 's@echo -n@printf@' configure || die
+
+	sed -i \
+		-e '/^CC :\?=/d' \
+		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
+		-e "s|-O2|${CFLAGS} ${CPPFLAGS}|" \
+		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
+		Makefile || die
+
+	# Build against system headers
+	rm -r include/netinet || die #include/linux include/ip{,6}tables{,_common}.h include/libiptc
+	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
+
+	if use minimal ; then
+		sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile || die
+	fi
+}
+
+src_configure() {
+	tc-export AR CC PKG_CONFIG
+
+	# This sure is ugly. Should probably move into toolchain-funcs at some point.
+	local setns
+	pushd "${T}" >/dev/null || die
+	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c || die
+	if ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null ; then
+		setns=y
+	else
+		setns=n
+	fi
+
+	echo 'int main(){return 0;}' > test.c || die
+	if ! ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null ; then
+		sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile || die
+	fi
+	popd >/dev/null || die
+
+	# run "configure" script first which will create "config.mk"...
+	# Using econf breaks since 5.14.0 (a9c3d70d902a0473ee5c13336317006a52ce8242)
+	edo ./configure --libbpf_force $(usex bpf on off)
+
+	# Remove the definitions made by configure and allow them to be overridden
+	# by USE flags below.
+	# We have to do the cheesy only-sed-if-disabled because otherwise
+	# the *_FLAGS etc stuff found by configure will be used but result
+	# in a broken build.
+	if ! use berkdb ; then
+		sed -i -e '/HAVE_BERKELEY_DB/d' config.mk || die
+	fi
+
+	if ! use caps ; then
+		sed -i -e '/HAVE_CAP/d' config.mk || die
+	fi
+
+	if use minimal ; then
+		sed -i -e '/HAVE_MNL/d' config.mk || die
+	fi
+
+	if ! use elf ; then
+		sed -i -e '/HAVE_ELF/d' config.mk || die
+	fi
+
+	if ! use nfs ; then
+		sed -i -e '/HAVE_RPC/d' config.mk || die
+	fi
+
+	if ! use selinux ; then
+		sed -i -e '/HAVE_SELINUX/d' config.mk || die
+	fi
+
+	# ...Now switch on/off requested features via USE flags
+	# this is only useful if the test did not set other things, per bug #643722
+	# Keep in sync with ifs above, or refactor to be unified.
+	cat <<-EOF >> config.mk
+	TC_CONFIG_ATM := $(usex atm y n)
+	TC_CONFIG_XT  := $(usex iptables y n)
+	TC_CONFIG_NO_XT := $(usex iptables n y)
+	# We've locked in recent enough kernel headers, bug #549948
+	TC_CONFIG_IPSET := y
+	HAVE_BERKELEY_DB := $(usex berkdb y n)
+	HAVE_CAP      := $(usex caps y n)
+	HAVE_MNL      := $(usex minimal n y)
+	HAVE_ELF      := $(usex elf y n)
+	HAVE_RPC      := $(usex nfs y n)
+	HAVE_SELINUX  := $(usex selinux y n)
+	IP_CONFIG_SETNS := ${setns}
+	# Use correct iptables dir, bug #144265, bug #293709
+	IPT_LIB_DIR   := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
+	EOF
+}
+
+src_compile() {
+	emake V=1 NETNS_RUN_DIR=/run/netns
+}
+
+src_test() {
+	emake check
+}
+
+src_install() {
+	if use minimal ; then
+		into /
+		dosbin tc/tc
+		dobin ip/ip
+		return 0
+	fi
+
+	emake \
+		DESTDIR="${D}" \
+		PREFIX="${EPREFIX}/usr" \
+		LIBDIR="${EPREFIX}"/$(get_libdir) \
+		SBINDIR="${EPREFIX}"/sbin \
+		CONFDIR="${EPREFIX}"/etc/iproute2 \
+		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
+		MANDIR="${EPREFIX}"/usr/share/man \
+		ARPDDIR="${EPREFIX}"/var/lib/arpd \
+		install
+
+	dodir /bin
+	mv "${ED}"/{s,}bin/ip || die # bug #330115
+
+	dolib.a lib/libnetlink.a
+	insinto /usr/include
+	doins include/libnetlink.h
+
+	# Collides with net-analyzer/ifstat
+	# https://bugs.gentoo.org/868321
+	mv "${ED}"/sbin/ifstat{,-iproute2} || die
+
+	if use split-usr ; then
+		# Can remove compatibility symlink in a year: 2023-05-28.
+		# bug #547264
+		mv "${ED}"/sbin/ss "${ED}"/bin/ss || die
+		dosym -r /bin/ss /sbin/ss
+	fi
+
+	if use berkdb ; then
+		keepdir /var/lib/arpd
+		# bug #47482, arpd doesn't need to be in /sbin
+		dodir /usr/bin
+		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
+	elif [[ -d "${ED}"/var/lib/arpd ]]; then
+		rmdir --ignore-fail-on-non-empty -p "${ED}"/var/lib/arpd || die
+	fi
+}


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/files/, sys-apps/iproute2/
@ 2024-04-12 17:22 Patrick McLean
  0 siblings, 0 replies; 18+ messages in thread
From: Patrick McLean @ 2024-04-12 17:22 UTC (permalink / raw
  To: gentoo-commits

commit:     c7120ac28e255ba135c0fa5b9808a66104e6d6b8
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 12 17:07:10 2024 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Fri Apr 12 17:22:12 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7120ac2

sys-apps/iproute2: add 6.8.0

Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 sys-apps/iproute2/Manifest                         |   1 +
 ...iproute2-6.8.0-configure-nomagic-nolibbsd.patch | 243 +++++++++++++++++++++
 .../iproute2-6.8.0-disable-libbsd-fallback.patch   |  25 +++
 sys-apps/iproute2/iproute2-6.8.0.ebuild            | 214 ++++++++++++++++++
 4 files changed, 483 insertions(+)

diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest
index 2b69febe4c67..3fdc9c03c957 100644
--- a/sys-apps/iproute2/Manifest
+++ b/sys-apps/iproute2/Manifest
@@ -1 +1,2 @@
 DIST iproute2-6.6.0.tar.xz 917964 BLAKE2B 9d20f19c04c2bbde7a3ae53e61e4623b119570c8446f34b93ddadd64677caa432e00ee085498bc277e0842cc2124340c7100925106d0ef2c11dd8002aacac08f SHA512 21c99a3ba8e1d0047933e99b48fb00901eef18899cd5854000ae910d9d84d13aeafa48b32184775531285782909f4d283d0784491691a1f10462dab147de359d
+DIST iproute2-6.8.0.tar.xz 913512 BLAKE2B d30cdff8522627c27c9165f068f42adbec38f15548a8f2cd31276f283880dc402e10c5989e7227e80cdc891bcc4a574b330d634ae550e689758b849c0506c31f SHA512 54e50340a73c8810d69bfd54704b469149731634a97d94da08b5a305592a812131a441e5b646e32b480d61840e2ade29387e54b934effeee8ded4f06e557a5c0

diff --git a/sys-apps/iproute2/files/iproute2-6.8.0-configure-nomagic-nolibbsd.patch b/sys-apps/iproute2/files/iproute2-6.8.0-configure-nomagic-nolibbsd.patch
new file mode 100644
index 000000000000..04ef44ad826e
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-6.8.0-configure-nomagic-nolibbsd.patch
@@ -0,0 +1,243 @@
+The hand-rolled configure script, for multiple options (selinux,mnl,elf), sets
+a variable as well as modifying CFLAGS & LDLIBS.
+
+If config.mk is later amended to disable a feature, the CFLAGS/LDLIBS tweaks
+are still in place.
+
+Push the CFLAGS/LDLIBS changes into new conditional Makefile code, so that they
+are only passed when correctly needed.
+
+Prior Gentoo testcase for reproduction:
+USE=minimal ebuild ... compile.
+- Linking with libbsd, libelf, libmnl & libcap based only on presence.
+- Links based on libselinux based only on presence.
+
+Closes: https://bugs.gentoo.org/643722
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+Forward-ported from v4.14.1 to v4.16.0 by Lars Wendler <polynomial-c@gentoo.org>
+Added libcap to v4.17.0 by Lars Wendler <polynomial-c@gentoo.org>
+Forward-ported from v4.17.0 to v4.20.0 by Lars Wendler <polynomial-c@gentoo.org>
+Forward-ported from v4.20.0 to v5.11.0 by Lars Wendler <polynomial-c@gentoo.org>
+Forward-ported from v5.11.0 to v5.12.0 by Lars Wendler <polynomial-c@gentoo.org>
+
+Update 2023-09-05: Removed libbsd enforcement from config.include for bug #911727
+by Holger Hoffstätte <holger@applied-asynchrony.com>
+
+--- a/config.include
++++ b/config.include
+@@ -0,0 +1,26 @@
++# We can only modify CFLAGS/LDLIBS after all the config options are known.
++ifeq ($(IP_CONFIG_SETNS),y)
++	CFLAGS += $(IP_CONFIG_SETNS_CFLAGS)
++endif
++ifeq ($(HAVE_ELF),y)
++	CFLAGS += $(HAVE_ELF_CFLAGS)
++	LDLIBS += $(HAVE_ELF_LDLIBS)
++endif
++ifeq ($(HAVE_SELINUX),y)
++	CFLAGS += $(HAVE_SELINUX_CFLAGS)
++	LDLIBS += $(HAVE_SELINUX_LDLIBS)
++endif
++ifeq ($(HAVE_MNL),y)
++	CFLAGS += $(HAVE_MNL_CFLAGS)
++	LDLIBS += $(HAVE_MNL_LDLIBS)
++endif
++ifeq ($(HAVE_CAP),y)
++	CFLAGS += $(HAVE_CAP_CFLAGS)
++	LDLIBS += $(HAVE_CAP_LDLIBS)
++endif
++
++# Rules can only be declared after all variables in them are known.
++%.o: %.c
++	$(QUIET_CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CPPFLAGS) -c -o $@ $<
++
++# vim: ft=make:
+
+--- a/bridge/Makefile
++++ b/bridge/Makefile
+@@ -2,6 +2,7 @@
+ BROBJ = bridge.o fdb.o monitor.o link.o mdb.o vlan.o vni.o
+ 
+ include ../config.mk
++include ../config.include
+ 
+ all: bridge
+ 
+--- a/configure
++++ b/configure
+@@ -154,7 +154,7 @@ EOF
+     if $CC -I$INCLUDE -o $TMPDIR/setnstest $TMPDIR/setnstest.c >/dev/null 2>&1; then
+ 	echo "IP_CONFIG_SETNS:=y" >>$CONFIG
+ 	echo "yes"
+-	echo "CFLAGS += -DHAVE_SETNS" >>$CONFIG
++	echo "IP_CONFIG_SETNS_CFLAGS += -DHAVE_SETNS" >>$CONFIG
+     else
+ 	echo "no"
+     fi
+@@ -221,8 +221,8 @@ check_elf()
+ 	echo "HAVE_ELF:=y" >>$CONFIG
+ 	echo "yes"
+ 
+-	echo 'CFLAGS += -DHAVE_ELF' "$(${PKG_CONFIG} libelf --cflags)" >> $CONFIG
+-	echo 'LDLIBS += ' "$(${PKG_CONFIG} libelf --libs)" >>$CONFIG
++	echo 'HAVE_ELF_CFLAGS += -DHAVE_ELF' "$(${PKG_CONFIG} libelf --cflags)" >> $CONFIG
++	echo 'HAVE_ELF_LDLIBS += ' "$(${PKG_CONFIG} libelf --libs)" >>$CONFIG
+     else
+ 	echo "no"
+     fi
+@@ -340,8 +340,8 @@ check_selinux()
+ 		echo "HAVE_SELINUX:=y" >>$CONFIG
+ 		echo "yes"
+ 
+-		echo 'LDLIBS +=' "$(${PKG_CONFIG} --libs libselinux)" >>$CONFIG
+-		echo 'CFLAGS += -DHAVE_SELINUX' "$(${PKG_CONFIG} --cflags libselinux)" >>$CONFIG
++		echo 'HAVE_SELINUX_LDLIBS +=' "$(${PKG_CONFIG} --libs libselinux)" >>$CONFIG
++		echo 'HAVE_SELINUX_CFLAGS += -DHAVE_SELINUX' "$(${PKG_CONFIG} --cflags libselinux)" >>$CONFIG
+ 	else
+ 		echo "no"
+ 	fi
+@@ -366,8 +366,8 @@ check_mnl()
+ 		echo "HAVE_MNL:=y" >>$CONFIG
+ 		echo "yes"
+ 
+-		echo 'CFLAGS += -DHAVE_LIBMNL' "$(${PKG_CONFIG} libmnl --cflags)" >>$CONFIG
+-		echo 'LDLIBS +=' "$(${PKG_CONFIG} libmnl --libs)" >> $CONFIG
++		echo 'HAVE_MNL_CFLAGS += -DHAVE_LIBMNL' "$(${PKG_CONFIG} libmnl --cflags)" >>$CONFIG
++		echo 'HAVE_MNL_LDLIBS +=' "$(${PKG_CONFIG} libmnl --libs)" >> $CONFIG
+ 	else
+ 		echo "no"
+ 	fi
+@@ -408,8 +408,8 @@ EOF
+ 	echo "no"
+     else
+ 	if ${PKG_CONFIG} libbsd --exists; then
+-		echo 'CFLAGS += -DHAVE_LIBBSD' "$(${PKG_CONFIG} libbsd --cflags)" >>$CONFIG
+-		echo 'LDLIBS +=' "$(${PKG_CONFIG} libbsd --libs)" >> $CONFIG
++		echo 'HAVE_LIBBSD_CFLAGS += -DHAVE_LIBBSD' "$(${PKG_CONFIG} libbsd --cflags)" >>$CONFIG
++		echo 'HAVE_LIBBSD_LDLIBS +=' "$(${PKG_CONFIG} libbsd --libs)" >> $CONFIG
+ 		echo "no"
+ 	else
+ 		echo 'CFLAGS += -DNEED_STRLCPY' >>$CONFIG
+@@ -425,8 +425,8 @@ check_cap()
+ 		echo "HAVE_CAP:=y" >>$CONFIG
+ 		echo "yes"
+ 
+-		echo 'CFLAGS += -DHAVE_LIBCAP' "$(${PKG_CONFIG} libcap --cflags)" >>$CONFIG
+-		echo 'LDLIBS +=' "$(${PKG_CONFIG} libcap --libs)" >> $CONFIG
++		echo 'HAVE_CAP_CFLAGS += -DHAVE_LIBCAP' "$(${PKG_CONFIG} libcap --cflags)" >>$CONFIG
++		echo 'HAVE_CAP_LDLIBS +=' "$(${PKG_CONFIG} libcap --libs)" >> $CONFIG
+ 	else
+ 		echo "no"
+ 	fi
+@@ -614,7 +614,3 @@ check_cap
+ 
+ echo -n "color output: "
+ check_color
+-
+-echo >> $CONFIG
+-echo "%.o: %.c" >> $CONFIG
+-echo '	$(QUIET_CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CPPFLAGS) -c -o $@ $<' >> $CONFIG
+--- a/dcb/Makefile
++++ b/dcb/Makefile
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0
+ include ../config.mk
++include ../config.include
+ 
+ DCBOBJ = dcb.o \
+          dcb_app.o \
+--- a/devlink/Makefile
++++ b/devlink/Makefile
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0
+ include ../config.mk
++include ../config.include
+ 
+ DEVLINKOBJ = devlink.o mnlg.o
+ TARGETS += devlink
+--- a/genl/Makefile
++++ b/genl/Makefile
+@@ -2,6 +2,7 @@
+ GENLOBJ=genl.o
+ 
+ include ../config.mk
++include ../config.include
+ SHARED_LIBS ?= y
+ 
+ CFLAGS += -fno-strict-aliasing
+--- a/ip/Makefile
++++ b/ip/Makefile
+@@ -18,6 +18,7 @@ IPOBJ=ip.o ipaddress.o ipaddrlabel.o iproute.o iprule.o ipnetns.o \
+ RTMONOBJ=rtmon.o
+ 
+ include ../config.mk
++include ../config.include
+ 
+ ALLOBJ=$(IPOBJ) $(RTMONOBJ)
+ SCRIPTS=routel
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0
+ include ../config.mk
++include ../config.include
+ 
+ CFLAGS += -fPIC
+ 
+--- a/misc/Makefile
++++ b/misc/Makefile
+@@ -5,6 +5,7 @@ LNSTATOBJ=lnstat.o lnstat_util.o
+ TARGETS=ss nstat ifstat rtacct lnstat
+ 
+ include ../config.mk
++include ../config.include
+ 
+ ifeq ($(HAVE_BERKELEY_DB),y)
+ 	TARGETS += arpd
+--- a/netem/Makefile
++++ b/netem/Makefile
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0
+ include ../config.mk
++include ../config.include
+ 
+ DISTGEN = maketable normal pareto paretonormal
+ DISTDATA = normal.dist pareto.dist paretonormal.dist experimental.dist
+--- a/rdma/Makefile
++++ b/rdma/Makefile
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
+ include ../config.mk
++include ../config.include
+ 
+ CFLAGS += -I./include/uapi/
+ 
+--- a/tc/Makefile
++++ b/tc/Makefile
+@@ -4,6 +4,7 @@ TCOBJ= tc.o tc_qdisc.o tc_class.o tc_filter.o tc_util.o tc_monitor.o \
+        emp_ematch.tab.o emp_ematch.lex.o
+ 
+ include ../config.mk
++include ../config.include
+ 
+ SHARED_LIBS ?= y
+ 
+--- a/tipc/Makefile
++++ b/tipc/Makefile
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0
+ include ../config.mk
++include ../config.include
+ 
+ TIPCOBJ=bearer.o \
+     cmdl.o link.o \
+--- a/vdpa/Makefile
++++ b/vdpa/Makefile
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0
+ include ../config.mk
++include ../config.include
+ 
+ CFLAGS += -I./include/uapi/
+ VDPAOBJ = vdpa.o

diff --git a/sys-apps/iproute2/files/iproute2-6.8.0-disable-libbsd-fallback.patch b/sys-apps/iproute2/files/iproute2-6.8.0-disable-libbsd-fallback.patch
new file mode 100644
index 000000000000..0c1eef227499
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-6.8.0-disable-libbsd-fallback.patch
@@ -0,0 +1,25 @@
+
+Disable the optional libbsd fallback in favor of iproute2's own
+strlcat/strlcpy routines. This prevents automagic linking and
+all sorts of other related problems.
+
+Bug: https://bugs.gentoo.org/911727
+Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
+
+--- a/configure
++++ b/configure
+@@ -407,14 +407,8 @@ EOF
+     if $CC -I$INCLUDE -o $TMPDIR/strtest $TMPDIR/strtest.c >/dev/null 2>&1; then
+ 	echo "no"
+     else
+-	if ${PKG_CONFIG} libbsd --exists; then
+-		echo 'HAVE_LIBBSD_CFLAGS += -DHAVE_LIBBSD' "$(${PKG_CONFIG} libbsd --cflags)" >>$CONFIG
+-		echo 'HAVE_LIBBSD_LDLIBS +=' "$(${PKG_CONFIG} libbsd --libs)" >> $CONFIG
+-		echo "no"
+-	else
+ 		echo 'CFLAGS += -DNEED_STRLCPY' >>$CONFIG
+ 		echo "yes"
+-	fi
+     fi
+     rm -f $TMPDIR/strtest.c $TMPDIR/strtest
+ }

diff --git a/sys-apps/iproute2/iproute2-6.8.0.ebuild b/sys-apps/iproute2/iproute2-6.8.0.ebuild
new file mode 100644
index 000000000000..f8e1ae63ceec
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-6.8.0.ebuild
@@ -0,0 +1,214 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo toolchain-funcs
+
+if [[ ${PV} == 9999 ]] ; then
+	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
+	inherit git-r3
+else
+	SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+DESCRIPTION="kernel routing and traffic control utilities"
+HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="atm berkdb bpf caps elf +iptables minimal nfs selinux split-usr"
+# Needs root
+RESTRICT="test"
+
+# We could make libmnl optional, but it's tiny, so eh
+RDEPEND="
+	!net-misc/arpd
+	!minimal? ( net-libs/libmnl:= )
+	atm? ( net-dialup/linux-atm )
+	berkdb? ( sys-libs/db:= )
+	bpf? ( dev-libs/libbpf:= )
+	caps? ( sys-libs/libcap )
+	elf? ( virtual/libelf:= )
+	iptables? ( >=net-firewall/iptables-1.4.20:= )
+	nfs? ( net-libs/libtirpc:= )
+	selinux? ( sys-libs/libselinux )
+"
+# We require newer linux-headers for ipset support (bug #549948) and some defines (bug #553876)
+DEPEND="
+	${RDEPEND}
+	>=sys-kernel/linux-headers-3.16
+"
+BDEPEND="
+	app-arch/xz-utils
+	>=sys-devel/bison-2.4
+	app-alternatives/lex
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-6.5.0-mtu.patch # bug #291907
+	"${FILESDIR}"/${PN}-6.8.0-configure-nomagic-nolibbsd.patch # bug #643722 & #911727
+	"${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
+	"${FILESDIR}"/${PN}-6.8.0-disable-libbsd-fallback.patch # bug #911727
+)
+
+src_prepare() {
+	default
+
+	# Fix version if necessary
+	local versionfile="include/version.h"
+	if [[ ${PV} != 9999 ]] && ! grep -Fq "${PV}" ${versionfile} ; then
+		einfo "Fixing version string"
+		sed -i "s@\"[[:digit:]\.]\+\"@\"${PV}\"@" \
+			${versionfile} || die
+	fi
+
+	# echo -n is not POSIX compliant
+	sed -i 's@echo -n@printf@' configure || die
+
+	sed -i \
+		-e '/^CC :\?=/d' \
+		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
+		-e "s|-O2|${CFLAGS} ${CPPFLAGS}|" \
+		-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+		-e "/^DBM_INCLUDE/s:=.*:=${T}:" \
+		Makefile || die
+
+	# Build against system headers
+	rm -r include/netinet || die #include/linux include/ip{,6}tables{,_common}.h include/libiptc
+	sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
+
+	if use minimal ; then
+		sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile || die
+	fi
+}
+
+src_configure() {
+	tc-export AR CC PKG_CONFIG
+
+	# This sure is ugly. Should probably move into toolchain-funcs at some point.
+	local setns
+	pushd "${T}" >/dev/null || die
+	printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c || die
+	if ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null ; then
+		setns=y
+	else
+		setns=n
+	fi
+
+	echo 'int main(){return 0;}' > test.c || die
+	if ! ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null ; then
+		sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile || die
+	fi
+	popd >/dev/null || die
+
+	# run "configure" script first which will create "config.mk"...
+	# Using econf breaks since 5.14.0 (a9c3d70d902a0473ee5c13336317006a52ce8242)
+	edo ./configure --color=auto --libbpf_force $(usex bpf on off)
+
+	# Remove the definitions made by configure and allow them to be overridden
+	# by USE flags below.
+	# We have to do the cheesy only-sed-if-disabled because otherwise
+	# the *_FLAGS etc stuff found by configure will be used but result
+	# in a broken build.
+	if ! use berkdb ; then
+		sed -i -e '/HAVE_BERKELEY_DB/d' config.mk || die
+	fi
+
+	if ! use caps ; then
+		sed -i -e '/HAVE_CAP/d' config.mk || die
+	fi
+
+	if use minimal ; then
+		sed -i -e '/HAVE_MNL/d' config.mk || die
+	fi
+
+	if ! use elf ; then
+		sed -i -e '/HAVE_ELF/d' config.mk || die
+	fi
+
+	if ! use nfs ; then
+		sed -i -e '/HAVE_RPC/d' config.mk || die
+	fi
+
+	if ! use selinux ; then
+		sed -i -e '/HAVE_SELINUX/d' config.mk || die
+	fi
+
+	# ...Now switch on/off requested features via USE flags
+	# this is only useful if the test did not set other things, per bug #643722
+	# Keep in sync with ifs above, or refactor to be unified.
+	cat <<-EOF >> config.mk
+	TC_CONFIG_ATM := $(usex atm y n)
+	TC_CONFIG_XT  := $(usex iptables y n)
+	TC_CONFIG_NO_XT := $(usex iptables n y)
+	# We've locked in recent enough kernel headers, bug #549948
+	TC_CONFIG_IPSET := y
+	HAVE_BERKELEY_DB := $(usex berkdb y n)
+	HAVE_CAP      := $(usex caps y n)
+	HAVE_MNL      := $(usex minimal n y)
+	HAVE_ELF      := $(usex elf y n)
+	HAVE_RPC      := $(usex nfs y n)
+	HAVE_SELINUX  := $(usex selinux y n)
+	IP_CONFIG_SETNS := ${setns}
+	# Use correct iptables dir, bug #144265, bug #293709
+	IPT_LIB_DIR   := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
+	EOF
+}
+
+src_compile() {
+	emake V=1 NETNS_RUN_DIR=/run/netns
+}
+
+src_test() {
+	emake check
+}
+
+src_install() {
+	if use minimal ; then
+		into /
+		dosbin tc/tc
+		dobin ip/ip
+		return 0
+	fi
+
+	emake \
+		DESTDIR="${D}" \
+		PREFIX="${EPREFIX}/usr" \
+		LIBDIR="${EPREFIX}"/$(get_libdir) \
+		SBINDIR="${EPREFIX}"/sbin \
+		CONFDIR="${EPREFIX}"/etc/iproute2 \
+		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
+		MANDIR="${EPREFIX}"/usr/share/man \
+		ARPDDIR="${EPREFIX}"/var/lib/arpd \
+		install
+
+	dodir /bin
+	mv "${ED}"/{s,}bin/ip || die # bug #330115
+
+	dolib.a lib/libnetlink.a
+	insinto /usr/include
+	doins include/libnetlink.h
+
+	# Collides with net-analyzer/ifstat
+	# https://bugs.gentoo.org/868321
+	mv "${ED}"/sbin/ifstat{,-iproute2} || die
+
+	if use split-usr ; then
+		# Can remove compatibility symlink in a year: 2023-05-28.
+		# bug #547264
+		mv "${ED}"/sbin/ss "${ED}"/bin/ss || die
+		dosym -r /bin/ss /sbin/ss
+	fi
+
+	if use berkdb ; then
+		keepdir /var/lib/arpd
+		# bug #47482, arpd doesn't need to be in /sbin
+		dodir /usr/bin
+		mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
+	elif [[ -d "${ED}"/var/lib/arpd ]]; then
+		rmdir --ignore-fail-on-non-empty -p "${ED}"/var/lib/arpd || die
+	fi
+}


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/files/, sys-apps/iproute2/
@ 2024-05-21 11:48 Sam James
  0 siblings, 0 replies; 18+ messages in thread
From: Sam James @ 2024-05-21 11:48 UTC (permalink / raw
  To: gentoo-commits

commit:     f51d73e7859d3df6589908082be198bdc34e4871
Author:     Gabi Falk <gabifalk <AT> gmx <DOT> com>
AuthorDate: Sat May 11 09:00:00 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue May 21 11:48:20 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f51d73e7

sys-apps/iproute2: fix compilation on musl-based systems with modern C (C99)

Closes: https://bugs.gentoo.org/922622
Signed-off-by: Gabi Falk <gabifalk <AT> gmx.com>
Closes: https://github.com/gentoo/gentoo/pull/36638
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../iproute2/files/iproute2-6.6.0-musl-c99.patch   | 75 ++++++++++++++++++++++
 sys-apps/iproute2/iproute2-6.6.0-r1.ebuild         |  1 +
 sys-apps/iproute2/iproute2-6.6.0-r3.ebuild         |  1 +
 sys-apps/iproute2/iproute2-6.6.0.ebuild            |  1 +
 sys-apps/iproute2/iproute2-6.8.0-r2.ebuild         |  1 +
 5 files changed, 79 insertions(+)

diff --git a/sys-apps/iproute2/files/iproute2-6.6.0-musl-c99.patch b/sys-apps/iproute2/files/iproute2-6.6.0-musl-c99.patch
new file mode 100644
index 000000000000..c277bd6d1128
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-6.6.0-musl-c99.patch
@@ -0,0 +1,75 @@
+From 12416003e4c691afc732d26f0a07c3890c24b396 Mon Sep 17 00:00:00 2001
+From: Gabi Falk <gabifalk@gmx.com>
+Date: Fri, 10 May 2024 14:36:12 +0000
+Subject: [PATCH] bridge/vlan.c: bridge/vlan.c: fix build with gcc 14 on musl
+ systems
+
+On glibc based systems the definition of 'struct timeval' is pulled in
+with inclusion of <stdlib.h> header, but on musl based systems it
+doesn't work this way.  Missing definition triggers an
+incompatible-pointer-types error with gcc 14 (warning on previous
+versions of gcc):
+
+../include/json_print.h:80:30: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
+   80 | _PRINT_FUNC(tv, const struct timeval *)
+      |                              ^~~~~~~
+../include/json_print.h:50:37: note: in definition of macro '_PRINT_FUNC'
+   50 |                                     type value);                        \
+      |                                     ^~~~
+../include/json_print.h:80:30: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
+   80 | _PRINT_FUNC(tv, const struct timeval *)
+      |                              ^~~~~~~
+../include/json_print.h:55:45: note: in definition of macro '_PRINT_FUNC'
+   55 |                                             type value)                 \
+      |                                             ^~~~
+../include/json_print.h: In function 'print_tv':
+../include/json_print.h:58:48: error: passing argument 5 of 'print_color_tv' from incompatible pointer type [-Wincompatible-pointer-types]
+   58 |                                                value);                  \
+      |                                                ^~~~~
+      |                                                |
+      |                                                const struct timeval *
+
+Link: https://lore.kernel.org/netdev/20240510143613.1531283-1-gabifalk@gmx.com/T/#u
+Signed-off-by: Gabi Falk <gabifalk@gmx.com>
+---
+ bridge/vlan.c | 1 +
+ bridge/vni.c  | 1 +
+ vdpa/vdpa.c   | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/bridge/vlan.c b/bridge/vlan.c
+index 5352eb24..0a7e6c45 100644
+--- a/bridge/vlan.c
++++ b/bridge/vlan.c
+@@ -4,6 +4,7 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <sys/socket.h>
++#include <sys/time.h>
+ #include <net/if.h>
+ #include <netinet/in.h>
+ #include <linux/if_bridge.h>
+diff --git a/bridge/vni.c b/bridge/vni.c
+index a7abe6de..e1f981fc 100644
+--- a/bridge/vni.c
++++ b/bridge/vni.c
+@@ -10,6 +10,7 @@
+ #include <string.h>
+ #include <fcntl.h>
+ #include <sys/socket.h>
++#include <sys/time.h>
+ #include <net/if.h>
+ #include <netinet/in.h>
+ #include <linux/if_link.h>
+diff --git a/vdpa/vdpa.c b/vdpa/vdpa.c
+index 6e4a9c11..43f87824 100644
+--- a/vdpa/vdpa.c
++++ b/vdpa/vdpa.c
+@@ -3,6 +3,7 @@
+ #include <stdio.h>
+ #include <getopt.h>
+ #include <errno.h>
++#include <sys/time.h>
+ #include <linux/genetlink.h>
+ #include <linux/if_ether.h>
+ #include <linux/vdpa.h>

diff --git a/sys-apps/iproute2/iproute2-6.6.0-r1.ebuild b/sys-apps/iproute2/iproute2-6.6.0-r1.ebuild
index f56e79070a8f..816d583a2935 100644
--- a/sys-apps/iproute2/iproute2-6.6.0-r1.ebuild
+++ b/sys-apps/iproute2/iproute2-6.6.0-r1.ebuild
@@ -53,6 +53,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
 	"${FILESDIR}"/${PN}-6.4.0-disable-libbsd-fallback.patch # bug #911727
 	"${FILESDIR}"/${PN}-6.6.0-configure-Add-_GNU_SOURCE-to-strlcpy-configure-test.patch
+	"${FILESDIR}"/${PN}-6.6.0-musl-c99.patch # bug #922622
 )
 
 src_prepare() {

diff --git a/sys-apps/iproute2/iproute2-6.6.0-r3.ebuild b/sys-apps/iproute2/iproute2-6.6.0-r3.ebuild
index fc029883a9e9..9a1ab6a3936e 100644
--- a/sys-apps/iproute2/iproute2-6.6.0-r3.ebuild
+++ b/sys-apps/iproute2/iproute2-6.6.0-r3.ebuild
@@ -55,6 +55,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.6.0-configure-Add-_GNU_SOURCE-to-strlcpy-configure-test.patch
 	"${FILESDIR}"/${PN}-6.6.0-revert-CONF_USR_DIR.patch
 	"${FILESDIR}"/${PN}-6.6.0-makefile-use-usr-share-config.patch
+	"${FILESDIR}"/${PN}-6.6.0-musl-c99.patch # bug #922622
 )
 
 src_prepare() {

diff --git a/sys-apps/iproute2/iproute2-6.6.0.ebuild b/sys-apps/iproute2/iproute2-6.6.0.ebuild
index 97cae73173e9..45e7ac2e7a0b 100644
--- a/sys-apps/iproute2/iproute2-6.6.0.ebuild
+++ b/sys-apps/iproute2/iproute2-6.6.0.ebuild
@@ -52,6 +52,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.5.0-configure-nomagic-nolibbsd.patch # bug #643722 & #911727
 	"${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
 	"${FILESDIR}"/${PN}-6.4.0-disable-libbsd-fallback.patch # bug #911727
+	"${FILESDIR}"/${PN}-6.6.0-musl-c99.patch # bug #922622
 )
 
 src_prepare() {

diff --git a/sys-apps/iproute2/iproute2-6.8.0-r2.ebuild b/sys-apps/iproute2/iproute2-6.8.0-r2.ebuild
index c5ab1aee142e..d74ccd7658b0 100644
--- a/sys-apps/iproute2/iproute2-6.8.0-r2.ebuild
+++ b/sys-apps/iproute2/iproute2-6.8.0-r2.ebuild
@@ -52,6 +52,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.8.0-configure-nomagic-nolibbsd.patch # bug #643722 & #911727
 	"${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
 	"${FILESDIR}"/${PN}-6.8.0-disable-libbsd-fallback.patch # bug #911727
+	"${FILESDIR}"/${PN}-6.6.0-musl-c99.patch # bug #922622
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2024-05-21 11:49 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-14  8:04 [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/files/, sys-apps/iproute2/ Lars Wendler
  -- strict thread matches above, loose matches on Subject: below --
2024-05-21 11:48 Sam James
2024-04-12 17:22 Patrick McLean
2023-12-28  2:19 Sam James
2023-09-16 10:25 Sam James
2023-02-13  3:23 Sam James
2022-12-21  0:08 Sam James
2021-09-01  7:17 Lars Wendler
2021-05-23 12:14 David Seifert
2021-04-28  9:53 Lars Wendler
2021-02-23 14:55 Lars Wendler
2019-06-11 15:17 Robin H. Johnson
2018-10-29 22:21 Lars Wendler
2018-04-15 19:24 Thomas Deutschmann
2018-01-07 22:39 Robin H. Johnson
2017-07-29 20:55 Joshua Kinard
2016-05-19  8:24 Lars Wendler
2015-09-06 16:11 Lars Wendler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox