public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/, sys-apps/iproute2/files/
@ 2016-12-18  0:14 Mike Frysinger
  0 siblings, 0 replies; 21+ messages in thread
From: Mike Frysinger @ 2016-12-18  0:14 UTC (permalink / raw
  To: gentoo-commits

commit:     fe680d5ff01dda55fae13a7942b7c220076fc968
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 18 00:07:38 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Dec 18 00:13:42 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe680d5f

sys-apps/iproute2: drop old <4.4.0 versions

 sys-apps/iproute2/Manifest                         |   9 -
 .../iproute2/files/iproute2-2.6.26-ldflags.patch   |  15 -
 .../iproute2/files/iproute2-2.6.29.1-flush.patch   | 224 ------
 .../iproute2/files/iproute2-2.6.29.1-hfsc.patch    | 885 ---------------------
 .../files/iproute2-2.6.35-cached-routes.patch      |  34 -
 .../files/iproute2-2.6.35-no-iptables.patch        |  15 -
 .../iproute2/files/iproute2-2.6.35-no-ipv6.patch   |  27 -
 .../iproute2/files/iproute2-2.6.35-xtables.patch   |  30 -
 .../files/iproute2-2.6.38-parallel-build.patch     |  40 -
 .../iproute2/files/iproute2-3.1.0-no-ipv6.patch    |  41 -
 .../iproute2/files/iproute2-3.10.0-no-ipv6.patch   |  41 -
 .../iproute2/files/iproute2-3.6.0-pkg-config.patch |  67 --
 sys-apps/iproute2/files/iproute2-3.7.0-clang.patch |  72 --
 sys-apps/iproute2/files/iproute2-3.7.0-man7.patch  |  55 --
 .../files/iproute2-3.8.0-old-mount-libc.patch      |  38 -
 .../iproute2-4.0.0-tc-show-buffer-overflow.patch   |  62 --
 sys-apps/iproute2/iproute2-2.6.38.ebuild           |  90 ---
 sys-apps/iproute2/iproute2-3.17.0.ebuild           | 124 ---
 sys-apps/iproute2/iproute2-3.19.0.ebuild           | 124 ---
 sys-apps/iproute2/iproute2-3.3.0.ebuild            | 105 ---
 sys-apps/iproute2/iproute2-3.8.0.ebuild            | 117 ---
 sys-apps/iproute2/iproute2-4.0.0-r2.ebuild         | 129 ---
 sys-apps/iproute2/iproute2-4.1.1.ebuild            | 131 ---
 sys-apps/iproute2/iproute2-4.2.0.ebuild            | 131 ---
 sys-apps/iproute2/iproute2-4.3.0.ebuild            | 129 ---
 25 files changed, 2735 deletions(-)

diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest
index b9c994c..a6c1e7c 100644
--- a/sys-apps/iproute2/Manifest
+++ b/sys-apps/iproute2/Manifest
@@ -1,12 +1,3 @@
-DIST iproute2-2.6.38.tar.bz2 390166 SHA256 47629a4f547f21d94d8e823a87dd8e13042cadecefea2e2dc433e4134fa9aec4 SHA512 b3a0c15c41184554da1b7f2521f5f0586ae0df1a62899afe2514d4adb93f05ecfd10fc964e027ec8f83a990586f5858b0c9fb24ea8c78477ec6c7c51593c54bd WHIRLPOOL bbd3a415c8396adf1ab63f2f3c91591c65809f8da12f6333f6ea66997cbca428ec2339759f53d0bcc41a1e9c85718e598efde0206a000d394560cacc9a78e8cc
-DIST iproute2-3.17.0.tar.xz 440188 SHA256 09e406636e7598e46d5d4f7b928bf5db57049d65dbeb9a496005957ee16f6000 SHA512 1bc261526b0c72fe79b792f0ae497420ac66641dc24a067c903275c63b51b257f540ca6fc6a3d60f93f416c5111841ea53ca28b038e51217a24783171ee4dacd WHIRLPOOL 58bd417385272140260bbd56d379881f7218e789580b874dc9bed06931097a67286f5a63966a730362079aa83903c965dce84575283d656d47a665edbb9599c4
-DIST iproute2-3.19.0.tar.xz 455004 SHA256 e2f9f8c36e166f2ba6c0e1e7a9ad84cdf7c1615b93df49dac44563d7b57fd7b0 SHA512 fc533b6a526cfda234f043ac25302a3206a81ab2a740640b997b6bfb22e6f94ddc21b704191a358ea8721a327ba785e0224a4b4129111ef5008b4003379c3706 WHIRLPOOL 6a0aa1a948286d7dcb3663d787167c27760d756385295bf0ca631920aed50fbd984c19204247097116ef0d4e293c3c8dbe13b0b44c6ec83e7815a7461293c89f
-DIST iproute2-3.3.0.tar.bz2 416353 SHA256 f328ec01bac64854f477b9440b0bbeae91895b4ba266821597ceac6bd1501c3b SHA512 825b473e3fb17cf724bc389bb99dabbdabf9c5bfee89890f723027f3412a82a9c7f77ac8b792a218ff50dd552e31105206ccff1897b68fe201d83e5764032feb WHIRLPOOL 7827cb8d447eb86d89dc14dedecb94d7e1a9fc9380ee2130d28047f834f5b96045226409448a8f159501f9bd20b1eebe7c32ae17d5687c4c071459ae9c807ebc
-DIST iproute2-3.8.0.tar.xz 407608 SHA256 579145749f1aaf60e7c7a5de24b7f00fa2200a961094733c792b4ff139181e4f SHA512 0d93070044f573055a7cc58bd006e476f5b0fcb75cb5d49a37417aa7583e637a92e460947434cef9b9449267e4529c655a23b5ed3d549a2aba128148cb8d4ade WHIRLPOOL bfb29c34953f205f7c801a86a38f58d9352b716504649e61665ced6dd48557291412de5fd8987dbab44fbd397dab4a6b55d6c371c7cbaaea3d6e29269df115df
-DIST iproute2-4.0.0.tar.xz 459364 SHA256 5cd06eb1050b858b308b65705725042bb566fd261135e35a73dafb48cd632618 SHA512 8e0587ed484a9697af99b4f37b460fddd28136b3c19898a11809b1e8ca9a75a18dcc83bc512f5b74361e6128732e69a3e66b3a62c38a5ae5f13c3e18af186be4 WHIRLPOOL 6abdf2b4587abd7a73d2b7692a4bb478ac379dc3a27f564ad78e34f25f06ae5dd9e0e4873c6510d30767a398375dcdcd2da777412c725885e0c3d4bd89c71a9b
-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
-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-2.6.26-ldflags.patch b/sys-apps/iproute2/files/iproute2-2.6.26-ldflags.patch
deleted file mode 100644
index 39e0799..00000000
--- a/sys-apps/iproute2/files/iproute2-2.6.26-ldflags.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-respect env LDFLAGS
-
-http://bugs.gentoo.org/236861
-
---- tc/Makefile
-+++ tc/Makefile
-@@ -83,7 +83,7 @@
- 	rm -f emp_ematch.yacc.output
- 
- q_atm.so: q_atm.c
--	$(CC) $(CFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm
-+	$(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm
- 
- %.yacc.c: %.y
- 	$(YACC) $(YACCFLAGS) -o $@ $<

diff --git a/sys-apps/iproute2/files/iproute2-2.6.29.1-flush.patch b/sys-apps/iproute2/files/iproute2-2.6.29.1-flush.patch
deleted file mode 100644
index 8eb3228..00000000
--- a/sys-apps/iproute2/files/iproute2-2.6.29.1-flush.patch
+++ /dev/null
@@ -1,224 +0,0 @@
-https://bugs.gentoo.org/274973
-
-If the routing table that I wanna flush has 60 entries or more, "ip route flush
-table foo" fails with the following error:
-  Failed to send flush request: Success
-  Flush terminated
-
-Patch by Alin Năstac <mrness@gentoo.org>
-
---- iproute2-2.6.29-1/ip/ipaddress.c
-+++ iproute2-2.6.29-1/ip/ipaddress.c
-@@ -37,6 +37,8 @@
- 
- #define MAX_ROUNDS 10
- 
-+static struct rtnl_handle rth_flush = { .fd = -1 };
-+
- static struct
- {
- 	int ifindex;
-@@ -339,7 +341,7 @@
- 
- static int flush_update(void)
- {
--	if (rtnl_send_check(&rth, filter.flushb, filter.flushp) < 0) {
-+	if (rtnl_send_check(&rth_flush, filter.flushb, filter.flushp) < 0) {
- 		perror("Failed to send flush request");
- 		return -1;
- 	}
-@@ -697,6 +699,9 @@
- 		filter.flushp = 0;
- 		filter.flushe = sizeof(flushb);
- 
-+		if (rtnl_open(&rth_flush, 0) < 0)
-+			return 1;
-+
- 		while (round < MAX_ROUNDS) {
- 			if (rtnl_wilddump_request(&rth, filter.family, RTM_GETADDR) < 0) {
- 				perror("Cannot send dump request");
-@@ -715,18 +720,20 @@
- 						printf("*** Flush is complete after %d round%s ***\n", round, round>1?"s":"");
- 				}
- 				fflush(stdout);
-+				rtnl_close(&rth_flush);
- 				return 0;
- 			}
- 			round++;
- 			if (flush_update() < 0)
--				return 1;
-+				break;
- 
- 			if (show_stats) {
- 				printf("\n*** Round %d, deleting %d addresses ***\n", round, filter.flushed);
- 				fflush(stdout);
- 			}
- 		}
--		fprintf(stderr, "*** Flush remains incomplete after %d rounds. ***\n", MAX_ROUNDS); fflush(stderr);
-+		fprintf(stderr, "*** Flush remains incomplete after %d rounds. ***\n", round); fflush(stderr);
-+		rtnl_close(&rth_flush);
- 		return 1;
- 	}
- 
---- iproute2-2.6.29-1/ip/ipneigh.c
-+++ iproute2-2.6.29-1/ip/ipneigh.c
-@@ -32,6 +32,8 @@
- #define NUD_VALID	(NUD_PERMANENT|NUD_NOARP|NUD_REACHABLE|NUD_PROBE|NUD_STALE|NUD_DELAY)
- #define MAX_ROUNDS	10
- 
-+static struct rtnl_handle rth_flush = { .fd = -1 };
-+
- static struct
- {
- 	int family;
-@@ -87,7 +89,7 @@
- 
- static int flush_update(void)
- {
--	if (rtnl_send_check(&rth, filter.flushb, filter.flushp) < 0) {
-+	if (rtnl_send_check(&rth_flush, filter.flushb, filter.flushp) < 0) {
- 		perror("Failed to send flush request");
- 		return -1;
- 	}
-@@ -391,6 +393,9 @@
- 		filter.flushe = sizeof(flushb);
- 		filter.state &= ~NUD_FAILED;
- 
-+		if (rtnl_open(&rth_flush, 0) < 0)
-+			return 1;
-+
- 		while (round < MAX_ROUNDS) {
- 			if (rtnl_wilddump_request(&rth, filter.family, RTM_GETNEIGH) < 0) {
- 				perror("Cannot send dump request");
-@@ -409,18 +414,20 @@
- 						printf("*** Flush is complete after %d round%s ***\n", round, round>1?"s":"");
- 				}
- 				fflush(stdout);
-+				rtnl_close(&rth_flush);
- 				return 0;
- 			}
- 			round++;
- 			if (flush_update() < 0)
--				exit(1);
-+				break;
-+
- 			if (show_stats) {
- 				printf("\n*** Round %d, deleting %d entries ***\n", round, filter.flushed);
- 				fflush(stdout);
- 			}
- 		}
--		printf("*** Flush not complete bailing out after %d rounds\n",
--			MAX_ROUNDS);
-+		fprintf(stderr, "*** Flush remains incomplete after %d rounds. ***\n", round); fflush(stderr);
-+		rtnl_close(&rth_flush);
- 		return 1;
- 	}
- 
---- iproute2-2.6.29-1/ip/iproute.c
-+++ iproute2-2.6.29-1/ip/iproute.c
-@@ -37,6 +37,7 @@
- #define RTAX_RTTVAR RTAX_HOPS
- #endif
- 
-+static struct rtnl_handle rth_flush = { .fd = -1 };
- 
- static const char *mx_names[RTAX_MAX+1] = {
- 	[RTAX_MTU]	= "mtu",
-@@ -112,7 +113,7 @@
- 
- static int flush_update(void)
- {
--	if (rtnl_send_check(&rth, filter.flushb, filter.flushp) < 0) {
-+	if (rtnl_send_check(&rth_flush, filter.flushb, filter.flushp) < 0) {
- 		perror("Failed to send flush request");
- 		return -1;
- 	}
-@@ -1210,6 +1211,9 @@
- 		filter.flushp = 0;
- 		filter.flushe = sizeof(flushb);
- 
-+		if (rtnl_open(&rth_flush, 0) < 0)
-+			return 1;
-+
- 		for (;;) {
- 			if (rtnl_wilddump_request(&rth, do_ipv6, RTM_GETROUTE) < 0) {
- 				perror("Cannot send dump request");
-@@ -1228,6 +1232,7 @@
- 						printf("*** Flush is complete after %d round%s ***\n", round, round>1?"s":"");
- 				}
- 				fflush(stdout);
-+				rtnl_close(&rth_flush);
- 				return 0;
- 			}
- 			round++;
---- iproute2-2.6.29-1/ip/xfrm_policy.c
-+++ iproute2-2.6.29-1/ip/xfrm_policy.c
-@@ -756,11 +756,15 @@
- 		struct xfrm_buffer xb;
- 		char buf[NLMSG_DELETEALL_BUF_SIZE];
- 		int i;
-+		struct rtnl_handle rth2;
- 
- 		xb.buf = buf;
- 		xb.size = sizeof(buf);
- 		xb.rth = &rth;
- 
-+		if (rtnl_open(&rth2, 0) < 0)
-+			exit(1);
-+
- 		for (i = 0; ; i++) {
- 			xb.offset = 0;
- 			xb.nlmsg_count = 0;
-@@ -783,7 +787,7 @@
- 				break;
- 			}
- 
--			if (rtnl_send_check(&rth, xb.buf, xb.offset) < 0) {
-+			if (rtnl_send_check(&rth2, xb.buf, xb.offset) < 0) {
- 				perror("Failed to send delete-all request");
- 				exit(1);
- 			}
-@@ -793,6 +797,8 @@
- 			xb.offset = 0;
- 			xb.nlmsg_count = 0;
- 		}
-+
-+		rtnl_close(&rth2);
- 	} else {
- 		if (rtnl_wilddump_request(&rth, preferred_family, XFRM_MSG_GETPOLICY) < 0) {
- 			perror("Cannot send dump request");
---- iproute2-2.6.29-1/ip/xfrm_state.c
-+++ iproute2-2.6.29-1/ip/xfrm_state.c
-@@ -924,11 +924,15 @@
- 		struct xfrm_buffer xb;
- 		char buf[NLMSG_DELETEALL_BUF_SIZE];
- 		int i;
-+		struct rtnl_handle rth2;
- 
- 		xb.buf = buf;
- 		xb.size = sizeof(buf);
- 		xb.rth = &rth;
- 
-+		if (rtnl_open(&rth2, 0) < 0)
-+			exit(1);
-+
- 		for (i = 0; ; i++) {
- 			xb.offset = 0;
- 			xb.nlmsg_count = 0;
-@@ -951,7 +955,7 @@
- 				break;
- 			}
- 
--			if (rtnl_send_check(&rth, xb.buf, xb.offset) < 0) {
-+			if (rtnl_send_check(&rth2, xb.buf, xb.offset) < 0) {
- 				perror("Failed to send delete-all request\n");
- 				exit(1);
- 			}
-@@ -962,6 +966,7 @@
- 			xb.nlmsg_count = 0;
- 		}
- 
-+		rtnl_close(&rth2);
- 	} else {
- 		if (rtnl_wilddump_request(&rth, preferred_family, XFRM_MSG_GETSA) < 0) {
- 			perror("Cannot send dump request");

diff --git a/sys-apps/iproute2/files/iproute2-2.6.29.1-hfsc.patch b/sys-apps/iproute2/files/iproute2-2.6.29.1-hfsc.patch
deleted file mode 100644
index 4f39ded..00000000
--- a/sys-apps/iproute2/files/iproute2-2.6.29.1-hfsc.patch
+++ /dev/null
@@ -1,885 +0,0 @@
-http://bugs.gentoo.org/291907
-
-This patch was merged from two patches extracted from this thread:
-http://markmail.org/thread/qkd76gpdgefpjlfn
-
-Patch #1.
-This patch adds detailed documentation for HFSC scheduler. It roughly
-follows HFSC paper, but tries to not rely too much on math side of things.
-Post-paper/Linux specific subjects (timer resolution, ul service curve, etc.)
-are also discussed.
-
-
-I've read it many times over, but it's a lengthy chunk of text - so try
-to be understanding in case I made some mistakes.
-
-
-tc-hfsc(7): explains algorithm in detail (very long)
-tc-hfsc(8): explains command line options briefly
-tc(8): adds references to new man pages
-Makefile: adds man7 directory to install target
-q_hfsc.c: minimal help text changes, consistency with tc-hfsc(8)
-
-
-Patch #2.
-This adds generic explanation about size tables.
-
-
-tc-stab(8): Commandline + details
-One thing I'm not sure, is whenever any layer2 data is included in case
-of shaping directly on ppp interface (see the bottom of the man page).
-
-
-tc_stab.c: small fixes to commandline help
-
-
-tc_core.c:
-As kernel part of things relies on cell align which is always set to -1,
-I also added it to userspace computation stage. This way if someone
-specified e.g. 2048 and 512 for mtu and tsize respectively, one wouldn't
-end with tsize supporting mtu 4096 suddenly, New default mtu is also set
-to 2048 (disregarding weirdness of setting mtu to such values).
-
-
-Unless I missed something, this is harmless and feels cleaner, but if it's
-not allowed, documentation will have to be changed back to 2047 + extra
-explanation as well.
-
---- iproute2/Makefile
-+++ iproute2-new/Makefile
-@@ -56,6 +56,8 @@
- 	install -m 0644 $(shell find etc/iproute2 -maxdepth 1 -type f) $(DESTDIR)$(CONFDIR)
- 	install -m 0755 -d $(DESTDIR)$(MANDIR)/man8
- 	install -m 0644 $(shell find man/man8 -maxdepth 1 -type f) $(DESTDIR)$(MANDIR)/man8
-+	install -m 0755 -d $(DESTDIR)$(MANDIR)/man7
-+	install -m 0644 $(shell find man/man7 -maxdepth 1 -type f) $(DESTDIR)$(MANDIR)/man7
- 	ln -sf tc-bfifo.8  $(DESTDIR)$(MANDIR)/man8/tc-pfifo.8
- 	ln -sf lnstat.8  $(DESTDIR)$(MANDIR)/man8/rtstat.8
- 	ln -sf lnstat.8  $(DESTDIR)$(MANDIR)/man8/ctstat.8
---- iproute2/man/man7/tc-hfsc.7
-+++ iproute2-new/man/man7/tc-hfsc.7
-@@ -0,0 +1,525 @@
-+.TH HFSC 7 "25 February 2009" iproute2 Linux
-+.ce 1
-+\fBHIERARCHICAL FAIR SERVICE CURVE\fR
-+.
-+.SH "HISTORY & INTRODUCTION"
-+.
-+HFSC \- \fBHierarchical Fair Service Curve\fR was first presented at
-+SIGCOMM'97. Developed as a part of ALTQ (ALTernative Queuing) on NetBSD, found
-+its way quickly to other BSD systems, and then a few years ago became part of
-+the linux kernel. Still, it's not the most popular scheduling algorithm \-
-+especially if compared to HTB \- and it's not well documented from enduser's
-+perspective. This introduction aims to explain how HFSC works without
-+going to deep into math side of things (although some if it will be
-+inevitable).
-+
-+In short HFSC aims to:
-+.
-+.RS 4
-+.IP \fB1)\fR 4
-+guarantee precise bandwidth and delay allocation for all leaf classes (realtime
-+criterion)
-+.IP \fB2)\fR
-+allocate excess bandwidth fairly as specified by class hierarchy (linkshare &
-+upperlimit criterion)
-+.IP \fB3)\fR
-+minimize any discrepancy between the service curve and the actual amount of
-+service provided during linksharing
-+.RE
-+.PP
-+.
-+The main "selling" point of HFSC is feature \fB(1)\fR, which is achieved by
-+using nonlinear service curves (more about what it actually is later). This is
-+particularly useful in VoIP or games, where not only guarantee of consistent
-+bandwidth is important, but initial delay of a data stream as well. Note that
-+it matters only for leaf classes (where the actual queues are) \- thus class
-+hierarchy is ignored in realtime case.
-+
-+Feature \fB(2)\fR is well, obvious \- any algorithm featuring class hierarchy
-+(such as HTB or CBQ) strives to achieve that. HFSC does that well, although
-+you might end with unusual situations, if you define service curves carelessly
-+\- see section CORNER CASES for examples.
-+
-+Feature \fB(3)\fR is mentioned due to the nature of the problem. There may be
-+situations where it's either not possible to guarantee service of all curves at
-+the same time, and/or it's impossible to do so fairly. Both will be explained
-+later. Note that this is mainly related to interior (aka aggregate) classes, as
-+the leafs are already handled by \fB(1)\fR. Still \- it's perfectly possible to
-+create a leaf class w/o realtime service, and in such case \- the caveats will
-+naturally extend to leaf classes as well.
-+
-+.SH ABBREVIATIONS
-+For the remaining part of the document, we'll use following shortcuts:
-+.nf
-+.RS 4
-+
-+RT \- realtime
-+LS \- linkshare
-+UL \- upperlimit
-+SC \- service curve
-+.fi
-+.
-+.SH "BASICS OF HFSC"
-+.
-+To understand how HFSC works, we must first introduce a service curve.
-+Overall, it's a nondecreasing function of some time unit, returning amount of
-+service (allowed or allocated amount of bandwidth) by some specific point in
-+time. The purpose of it should be subconsciously obvious \- if a class was
-+allowed to transfer not less than the amount specified by its service curve \-
-+then service curve is not violated.
-+
-+Still \- we need more elaborate criterion than just the above (although in
-+most generic case it can be reduced to it). The criterion has to take two
-+things into account:
-+.
-+.RS 4
-+.IP \(bu 4
-+idling periods
-+.IP \(bu
-+ability to "look back", so if during current active period service curve is violated, maybe it
-+isn't if we count excess bandwidth received during earlier active period(s)
-+.RE
-+.PP
-+Let's define the criterion as follows:
-+.RS 4
-+.nf
-+.IP "\fB(1)\fR" 4
-+For each t1, there must exist t0 in set B, so S(t1\-t0)\~<=\~w(t0,t1)
-+.fi
-+.RE
-+.
-+.PP
-+Here 'w' denotes the amount of service received during some time period between t0
-+and t1. B is a set of all times, where a session becomes active after idling
-+period (further denoted as 'becoming backlogged'). For a clearer picture,
-+imagine two situations:
-+.
-+.RS 4
-+.IP \fBa)\fR 4
-+our session was active during two periods, with a small time gap between them
-+.IP \fBb)\fR
-+as in (a), but with a larger gap
-+.RE
-+.
-+.PP
-+Consider \fB(a)\fR \- if the service received during both periods meets
-+\fB(1)\fR, then all is good. But what if it doesn't do so during the 2nd
-+period ? If the amount of service received during the 1st period is bigger
-+than the service curve, then it might compensate for smaller service during
-+the 2nd period \fIand\fR the gap \- if the gap is small enough.
-+
-+If the gap is larger \fB(b)\fR \- then it's less likely to happen (unless the
-+excess bandwidth allocated during the 1st part was really large). Still, the
-+larger the gap \- the less interesting is what happened in the past (e.g. 10
-+minutes ago) \- what matters is the current traffic that just started.
-+
-+From HFSC's perspective, more interesting is answering the following question:
-+when should we start transferring packets, so a service curve of a class is not
-+violated. Or rephrasing it: How much X() amount of service should a session
-+receive by time t, so the service curve is not violated. Function X() defined
-+as below is the basic building block of HFSC, used in: eligible, deadline,
-+virtual\-time and fit\-time curves. Of course, X() is based on equation
-+\fB(1)\fR and is defined recursively:
-+
-+.RS 4
-+.IP \(bu 4
-+At the 1st backlogged period beginning function X is initialized to generic
-+service curve assigned to a class
-+.IP \(bu
-+At any subsequent backlogged period, X() is:
-+.nf
-+\fBmin(X() from previous period ; w(t0)+S(t\-t0) for t>=t0),\fR
-+.fi
-+\&... where t0 denotes the beginning of the current backlogged period.
-+.RE
-+.
-+.PP
-+HFSC uses either linear, or two\-piece linear service curves. In case of
-+linear or two\-piece linear convex functions (first slope < second slope),
-+min() in X's definition reduces to the 2nd argument. But in case of two\-piece
-+concave functions, the 1st argument might quickly become lesser for some
-+t>=t0. Note, that for some backlogged period, X() is defined only from that
-+period's beginning. We also define X^(\-1)(w) as smallest t>=t0, for which
-+X(t)\~=\~w. We have to define it this way, as X() is usually not an injection.
-+
-+The above generic X() can be one of the following:
-+.
-+.RS 4
-+.IP "E()" 4
-+In realtime criterion, selects packets eligible for sending. If none are
-+eligible, HFSC will use linkshare criterion. Eligible time \&'et' is calculated
-+with reference to packets' heads ( et\~=\~E^(\-1)(w) ). It's based on RT
-+service curve, \fIbut in case of a convex curve, uses its 2nd slope only.\fR
-+.IP "D()"
-+In realtime criterion, selects the most suitable packet from the ones chosen
-+by E(). Deadline time \&'dt' corresponds to packets' tails
-+(dt\~=\~D^(\-1)(w+l), where \&'l' is packet's length). Based on RT service
-+curve.
-+.IP "V()"
-+In linkshare criterion, arbitrates which packet to send next. Note that V() is
-+function of a virtual time \- see \fBLINKSHARE CRITERION\fR section for
-+details.  Virtual time \&'vt' corresponds to packets' heads
-+(vt\~=\~V^(\-1)(w)). Based on LS service curve.
-+.IP "F()"
-+An extension to linkshare criterion, used to limit at which speed linkshare
-+criterion is allowed to dequeue. Fit\-time 'ft' corresponds to packets' heads
-+as well (ft\~=\~F^(\-1)(w)). Based on UL service curve.
-+.RE
-+
-+Be sure to make clean distinction between session's RT, LS and UL service
-+curves and the above "utility" functions.
-+.
-+.SH "REALTIME CRITERION"
-+.
-+RT criterion \fIignores class hierarchy\fR and guarantees precise bandwidth and
-+delay allocation. We say that packet is eligible for sending, when current real
-+time is bigger than eligible time. From all packets eligible, the one most
-+suited for sending, is the one with the smallest deadline time. Sounds simply,
-+but consider following example:
-+
-+Interface 10mbit, two classes, both with two\-piece linear service curves:
-+.RS 4
-+.IP \(bu 4
-+1st class \- 2mbit for 100ms, then 7mbit (convex \- 1st slope < 2nd slope)
-+.IP \(bu
-+2nd class \- 7mbit for 100ms, then 2mbit (concave \- 1st slope > 2nd slope)
-+.RE
-+.PP
-+Assume for a moment, that we only use D() for both finding eligible packets,
-+and choosing the most fitting one, thus eligible time would be computed as
-+D^(\-1)(w) and deadline time would be computed as D^(\-1)(w+l).  If the 2nd
-+class starts sending packets 1 second after the 1st class, it's of course
-+impossible to guarantee 14mbit, as the interface capability is only 10mbit.
-+The only workaround in this scenario is to allow the 1st class to send the
-+packets earlier that would normally be allowed. That's where separate E() comes
-+to help.  Putting all the math aside (see HFSC paper for details), E() for RT
-+concave service curve is just like D(), but for the RT convex service curve \-
-+it's constructed using \fIonly\fR RT service curve's 2nd slope (in our example
-+\- 7mbit).
-+
-+The effect of such E() \- packets will be sent earlier, and at the same time
-+D() \fIwill\fR be updated \- so current deadline time calculated from it will
-+be bigger. Thus, when the 2nd class starts sending packets later, both the 1st
-+and the 2nd class will be eligible, but the 2nd session's deadline time will be
-+smaller and its packets will be sent first. When the 1st class becomes idle at
-+some later point, the 2nd class will be able to "buffer" up again for later
-+active period of the 1st class.
-+
-+A short remark \- in a situation, where the total amount of bandwidth
-+available on the interface is bigger than the allocated total realtime parts
-+(imagine interface 10 mbit, but 1mbit/2mbit and 2mbit/1mbit classes), the sole
-+speed of the interface could suffice to guarantee the times.
-+
-+Important part of RT criterion is that apart from updating its D() and E(),
-+also V() used by LS criterion is updated. Generally the RT criterion is
-+secondary to LS one, and used \fIonly\fR if there's a risk of violating precise
-+realtime requirements. Still, the "participation" in bandwidth distributed by
-+LS criterion is there, so V() has to be updated along the way. LS criterion can
-+than properly compensate for non\-ideal fair sharing situation, caused by RT
-+scheduling. If you use UL service curve its F() will be updated as well (UL
-+service curve is an extension to LS one \- see \fBUPPERLIMIT CRITERION\fR
-+section).
-+
-+Anyway \- careless specification of LS and RT service curves can lead to
-+potentially undesired situations (see CORNER CASES for examples). This wasn't
-+the case in HFSC paper where LS and RT service curves couldn't be specified
-+separately.
-+
-+.SH "LINKSHARING CRITERION"
-+.
-+LS criterion's task is to distribute bandwidth according to specified class
-+hierarchy. Contrary to RT criterion, there're no comparisons between current
-+real time and virtual time \- the decision is based solely on direct comparison
-+of virtual times of all active subclasses \- the one with the smallest vt wins
-+and gets scheduled. One immediate conclusion from this fact is that absolute
-+values don't matter \- only ratios between them (so for example, two children
-+classes with simple linear 1mbit service curves will get the same treatment
-+from LS criterion's perspective, as if they were 5mbit). The other conclusion
-+is, that in perfectly fluid system with linear curves, all virtual times across
-+whole class hierarchy would be equal.
-+
-+Why is VC defined in term of virtual time (and what is it) ?
-+
-+Imagine an example: class A with two children \- A1 and A2, both with let's say
-+10mbit SCs. If A2 is idle, A1 receives all the bandwidth of A (and update its
-+V() in the process). When A2 becomes active, A1's virtual time is already
-+\fIfar\fR bigger than A2's one. Considering the type of decision made by LS
-+criterion, A1 would become idle for a lot of time. We can workaround this
-+situation by adjusting virtual time of the class becoming active \- we do that
-+by getting such time "up to date". HFSC uses a mean of the smallest and the
-+biggest virtual time of currently active children fit for sending. As it's not
-+real time anymore (excluding trivial case of situation where all classes become
-+active at the same time, and never become idle), it's called virtual time.
-+
-+Such approach has its price though. The problem is analogous to what was
-+presented in previous section and is caused by non\-linearity of service
-+curves:
-+.IP 1) 4
-+either it's impossible to guarantee both service curves and satisfy fairness
-+during certain time periods:
-+
-+.RS 4
-+Recall the example from RT section, slightly modified (with 3mbit slopes
-+instead of 2mbit ones):
-+
-+.IP \(bu 4
-+1st class \- 3mbit for 100ms, then 7mbit (convex \- 1st slope < 2nd slope)
-+.IP \(bu
-+2nd class \- 7mbit for 100ms, then 3mbit (concave \- 1st slope > 2nd slope)
-+
-+.PP
-+They sum up nicely to 10mbit \- interface's capacity. But if we wanted to only
-+use LS for guarantees and fairness \- it simply won't work. In LS context,
-+only V() is used for making decision which class to schedule. If the 2nd class
-+becomes active when the 1st one is in its second slope, the fairness will be
-+preserved \- ratio will be 1:1 (7mbit:7mbit), but LS itself is of course
-+unable to guarantee the absolute values themselves \- as it would have to go
-+beyond of what the interface is capable of.
-+.RE
-+
-+.IP 2) 4
-+and/or it's impossible to guarantee service curves of all classes at all
-+
-+.RS 4
-+Even if we didn't use virtual time and allowed a session to be "punished",
-+there's a possibility that service curves of all classes couldn't be
-+guaranteed for a brief period. Consider following, a bit more complicated
-+example:
-+
-+Root interface, classes A and B with concave and convex curve (summing up to
-+root), A1 & A2 (children of A), \fIboth\fR with concave curves summing up to A,
-+B1 & B2 (children of B), \fIboth\fR with convex curves summing up to B.
-+
-+Assume that A2, B1 and B2 are constantly backlogged, and at some later point
-+A1 becomes backlogged. We can easily choose slopes, so that even if we
-+"punish" A2 for earlier excess bandwidth received, A1 will have no chance of
-+getting bandwidth corresponding to its first slope. Following from the above
-+example:
-+
-+.nf
-+A  \- 7mbit, then 3mbit
-+A1 \- 5mbit, then 2mbit
-+A2 \- 2mbit, then 1mbit
-+
-+B  \- 3mbit, then 7mbit
-+B1 \- 2mbit, then 5mbit
-+B2 \- 1mbit, then 2mbit
-+.fi
-+
-+At the point when A1 starts sending, it should get 5mbit to not violate its
-+service curve. A2 gets punished and doesn't send at all, B1 and B2 both keep
-+sending at their 5mbit and 2mbit. But as you can see, we already are beyond
-+interface's capacity \- at 12mbit. A1 could get 3mbit at most. If we used
-+virtual times and kept fairness property, A1 and A2 would send at 3mbit
-+together with 5:2 ratio (so respectively at ~2.14mbit and ~0.86mbit).
-+.RE
-+.
-+.SH "UPPERLIMIT CRITERION"
-+.
-+UL criterion is an extensions to LS one, that permits sending packets only
-+if current real time is bigger than fit\-time ('ft'). So the modified LS
-+criterion becomes: choose the smallest virtual time from all active children,
-+such that fit\-time < current real time also holds. Fit\-time is calculated
-+from F(), which is based on UL service curve. As you can see, it's role is
-+kinda similar to E() used in RT criterion. Also, for obvious reasons \- you
-+can't specify UL service curve without LS one.
-+
-+Main purpose of UL service curve is to limit HFSC to bandwidth available on the
-+upstream router (think adsl home modem/router, and linux server as
-+nat/firewall/etc. with 100mbit+ connection to mentioned modem/router).
-+Typically, it's used to create a single class directly under root, setting
-+linear UL service curve to available bandwidth \- and then creating your class
-+structure from that class downwards. Of course, you're free to add UL service
-+(linear or not) curve to any class with LS criterion.
-+
-+Important part about UL service curve is, that whenever at some point in time
-+a class doesn't qualify for linksharing due to its fit\-time, the next time it
-+does qualify, it will update its virtual time to the smallest virtual time of
-+all active children fit for linksharing. This way, one of the main things LS
-+criterion tries to achieve \- equality of all virtual times across whole
-+hierarchy \- is preserved (in perfectly fluid system with only linear curves,
-+all virtual times would be equal).
-+
-+Without that, 'vt' would lag behind other virtual times, and could cause
-+problems. Consider interface with capacity 10mbit, and following leaf classes
-+(just in case you're skipping this text quickly \- this example shows behavior
-+that \f(BIdoesn't happen\fR):
-+
-+.nf
-+A \- ls 5.0mbit
-+B \- ls 2.5mbit
-+C \- ls 2.5mbit, ul 2.5mbit
-+.fi
-+
-+If B was idle, while A and C were constantly backlogged, they would normally
-+(as far as LS criterion is concerned) divide bandwidth in 2:1 ratio. But due
-+to UL service curve in place, C would get at most 2.5mbit, and A would get the
-+remaining 7.5mbit. The longer the backlogged period, the more virtual times of
-+A and C would drift apart. If B became backlogged at some later point in time,
-+its virtual time would be set to (A's\~vt\~+\~C's\~vt)/2, thus blocking A from
-+sending any traffic, until B's virtual time catches up with A.
-+.
-+.SH "SEPARATE LS / RT SCs"
-+.
-+Another difference from original HFSC paper, is that RT and LS SCs can be
-+specified separately. Moreover \- leaf classes are allowed to have only either
-+RT SC or LS SC. For interior classes, only LS SCs make sense \- Any RT SC will
-+be ignored.
-+.
-+.SH "CORNER CASES"
-+.
-+Separate service curves for LS and RT criteria can lead to certain traps,
-+that come from "fighting" between ideal linksharing and enforced realtime
-+guarantees. Those situations didn't exist in original HFSC paper, where
-+specifying separate LS / RT service curves was not discussed.
-+
-+Consider interface with capacity 10mbit, with following leaf classes:
-+
-+.nf
-+A \- ls 5.0mbit, rt 8mbit
-+B \- ls 2.5mbit
-+C \- ls 2.5mbit
-+.fi
-+
-+Imagine A and C are constantly backlogged. As B is idle, A and C would divide
-+bandwidth in 2:1 ratio, considering LS service curve (so in theory \- 6.66 and
-+3.33). Alas RT criterion takes priority, so A will get 8mbit and LS will be
-+able to compensate class C for only 2 mbit \- this will cause discrepancy
-+between virtual times of A and C.
-+
-+Assume this situation lasts for a lot of time with no idle periods, and
-+suddenly B becomes active. B's virtual time will be updated to
-+(A's\~vt\~+\~C's\~vt)/2, effectively landing in the middle between A's and C's
-+virtual time. The effect \- B, having no RT guarantees, will be punished and
-+will not be allowed to transfer until C's virtual time catches up.
-+
-+If the interface had higher capacity \- for example 100mbit, this example
-+would behave perfectly fine though.
-+
-+Let's look a bit closer at the above example \- it "cleverly" invalidates one
-+of the basic things LS criterion tries to achieve \- equality of all virtual
-+times across class hierarchy. Leaf classes without RT service curves are
-+literally left to their own fate (governed by messed up virtual times).
-+
-+Also - it doesn't make much sense. Class A will always be guaranteed up to
-+8mbit, and this is more than any absolute bandwidth that could happen from its
-+LS criterion (excluding trivial case of only A being active). If the bandwidth
-+taken by A is smaller than absolute value from LS criterion, the unused part
-+will be automatically assigned to other active classes (as A has idling periods
-+in such case). The only "advantage" is, that even in case of low bandwidth on
-+average, bursts would be handled at the speed defined by RT criterion. Still,
-+if extra speed is needed (e.g. due to latency), non linear service curves
-+should be used in such case.
-+
-+In the other words - LS criterion is meaningless in the above example.
-+
-+You can quickly "workaround" it by making sure each leaf class has RT service
-+curve assigned (thus guaranteeing all of them will get some bandwidth), but it
-+doesn't make it any more valid.
-+.
-+.SH "LINUX AND TIMER RESOLUTION"
-+.
-+In certain situations, the scheduler can throttle itself and setup so
-+called watchdog to wakeup dequeue function at some time later. In case of HFSC
-+it happens when for example no packet is eligible for scheduling, and UL
-+service curve is used to limit the speed at which LS criterion is allowed to
-+dequeue packets. It's called throttling, and accuracy of it is dependent on
-+how the kernel is compiled.
-+
-+There're 3 important options in modern kernels, as far as timers' resolution
-+goes: \&'tickless system', \&'high resolution timer support' and \&'timer
-+frequency'.
-+
-+If you have \&'tickless system' enabled, then the timer interrupt will trigger
-+as slowly as possible, but each time a scheduler throttles itself (or any
-+other part of the kernel needs better accuracy), the rate will be increased as
-+needed / possible. The ceiling is either \&'timer frequency' if \&'high
-+resolution timer support' is not available or not compiled in. Otherwise it's
-+hardware dependent and can go \fIfar\fR beyond the highest \&'timer frequency'
-+setting available.
-+
-+If \&'tickless system' is not enabled, the timer will trigger at a fixed rate
-+specified by \&'timer frequency' \- regardless if high resolution timers are
-+or aren't available.
-+
-+This is important to keep those settings in mind, as in scenario like: no
-+tickless, no HR timers, frequency set to 100hz \- throttling accuracy would be
-+at 10ms. It doesn't automatically mean you would be limited to ~0.8mbit/s
-+(assuming packets at ~1KB) \- as long as your queues are prepared to cover for
-+timer inaccuracy. Of course, in case of e.g. locally generated udp traffic \-
-+appropriate socket size is needed as well. Short example to make it more
-+understandable (assume hardcore anti\-schedule settings \- HZ=100, no HR
-+timers, no tickless):
-+
-+.nf
-+tc qdisc add dev eth0 root handle 1:0 hfsc default 1
-+tc class add dev eth0 parent 1:0 classid 1:1 hfsc rt m2 10mbit
-+.fi
-+
-+Assuming packet of ~1KB size and HZ=100, that averages to ~0.8mbit \- anything
-+beyond it (e.g. the above example with specified rate over 10x bigger) will
-+require appropriate queuing and cause bursts every ~10 ms.  As you can
-+imagine, any HFSC's RT guarantees will be seriously invalidated by that.
-+Aforementioned example is mainly important if you deal with old hardware \- as
-+it's particularly popular for home server chores. Even then, you can easily
-+set HZ=1000 and have very accurate scheduling for typical adsl speeds.
-+
-+Anything modern (apic or even hpet msi based timers + \&'tickless system')
-+will provide enough accuracy for superb 1gbit scheduling. For example, on one
-+of basically cheap dual core AMD boards I have with following settings:
-+
-+.nf
-+tc qdisc add dev eth0 parent root handle 1:0 hfsc default 1
-+tc class add dev eth0 paretn 1:0 classid 1:1 hfsc rt m2 300mbit
-+.fi
-+
-+And simple:
-+
-+.nf
-+nc \-u dst.host.com 54321 </dev/zero
-+nc \-l \-p 54321 >/dev/null
-+.fi
-+
-+\&...will yield following effects over period of ~10 seconds (taken from
-+/proc/interrupts):
-+
-+.nf
-+319: 42124229   0  HPET_MSI\-edge  hpet2 (before)
-+319: 42436214   0  HPET_MSI\-edge  hpet2 (after 10s.)
-+.fi
-+
-+That's roughly 31000/s. Now compare it with HZ=1000 setting. The obvious
-+drawback of it is that cpu load can be rather extensive with servicing that
-+many timer interrupts. Example with 300mbit RT service curve on 1gbit link is
-+particularly ugly, as it requires a lot of throttling with minuscule delays.
-+
-+Also note that it's just an example showing capability of current hardware.
-+The above example (essentially 300mbit TBF emulator) is pointless on internal
-+interface to begin with \- you will pretty much always want regular LS service
-+curve there, and in such scenario HFSC simply doesn't throttle at all.
-+
-+300mbit RT service curve (selected columns from mpstat \-P ALL 1):
-+
-+.nf
-+10:56:43 PM  CPU  %sys     %irq   %soft   %idle
-+10:56:44 PM  all  20.10    6.53   34.67   37.19
-+10:56:44 PM    0  35.00    0.00   63.00    0.00
-+10:56:44 PM    1   4.95   12.87    6.93   73.27
-+.fi
-+
-+So, in rare case you need those speeds with only RT service curve, or with UL
-+service curve \- remember about drawbacks.
-+.
-+.SH "LAYER2 ADAPTATION"
-+.
-+Please refer to \fBtc\-stab\fR(8)
-+.
-+.SH "SEE ALSO"
-+.
-+\fBtc\fR(8), \fBtc\-hfsc\fR(8), \fBtc\-stab\fR(8)
-+
-+Please direct bugreports and patches to: <net...@vger.kernel.org>
-+.
-+.SH "AUTHOR"
-+.
-+Manpage created by Michal Soltys (sol...@ziu.info)
---- iproute2/man/man8/tc.8
-+++ iproute2-new/man/man8/tc.8
-@@ -368,12 +368,15 @@
- .SH SEE ALSO
- .BR tc-cbq (8),
- .BR tc-htb (8),
-+.BR tc-hfsc (8),
-+.BR tc-hfsc (7),
- .BR tc-sfq (8),
- .BR tc-red (8),
- .BR tc-tbf (8),
- .BR tc-pfifo (8),
- .BR tc-bfifo (8),
- .BR tc-pfifo_fast (8),
-+.BR tc-stab (8),
- .br
- .RB "User documentation at " http://lartc.org/ ", but please direct bugreports and patches to: " <netdev@vger.kernel.org>
- 
---- iproute2/man/man8/tc-hfsc.8
-+++ iproute2-new/man/man8/tc-hfsc.8
-@@ -0,0 +1,61 @@
-+.TH HFSC 8 "25 February 2009" iproute2 Linux
-+.
-+.SH NAME
-+HFSC \- Hierarchical Fair Service Curve's control under linux
-+.
-+.SH SYNOPSIS
-+.nf
-+tc qdisc add ... hfsc [ \fBdefault\fR CLASSID ]
-+
-+tc class add ... hfsc [ [ \fBrt\fR SC ] [ \fBls\fR SC ] | [ \fBsc\fR SC ] ] [ \fBul\fR SC ]
-+
-+\fBrt\fR : realtime service curve
-+\fBls\fR : linkshare service curve
-+\fBsc\fR : rt+ls service curve
-+\fBul\fR : upperlimit service curve
-+
-+\(bu at least one of \fBrt\fR, \fBls\fR or \fBsc\fR must be specified
-+\(bu \fBul\fR can only be specified with \fBls\fR or \fBsc\fR
-+.
-+.IP "SC := [ [ \fBm1\fR BPS ] \fBd\fR SEC ] \fBm2\fR BPS"
-+\fBm1\fR : slope of the first segment
-+\fBd\fR  : x\-coordinate of intersection
-+\fBm2\fR : slope of the second segment
-+.PP
-+.IP "SC := [ [ \fBumax\fR BYTE ] \fBdmax\fR SEC ] \fBrate\fR BPS"
-+\fBumax\fR : maximum unit of work
-+\fBdmax\fR : maximum delay
-+\fBrate\fR : rate
-+.PP
-+.fi
-+For description of BYTE, BPS and SEC \- please see \fBUNITS\fR
-+section of \fBtc\fR(8).
-+.
-+.SH DESCRIPTION (qdisc)
-+HFSC qdisc has only one optional parameter \- \fBdefault\fR.  CLASSID specifies
-+the minor part of the default classid, where packets not classified by other
-+means (e.g. u32 filter, CLASSIFY target of iptables) will be enqueued. If
-+\fBdefault\fR is not specified, unclassified packets will be dropped.
-+.
-+.SH DESCRIPTION (class)
-+HFSC class is used to create a class hierarchy for HFSC scheduler. For
-+explanation of the algorithm, and the meaning behind \fBrt\fR, \fBls\fR,
-+\fBsc\fR and \fBul\fR service curves \- please refer to \fBtc\-hfsc\fR(7).
-+
-+As you can see in \fBSYNOPSIS\fR, service curve (SC) can be specified in two
-+ways. Either as maximum delay for certain amount of work, or as a bandwidth
-+assigned for certain amount of time. Obviously, \fBm1\fR is simply
-+\fBumax\fR/\fBdmax\fR.
-+
-+Both \fBm2\fR and \fBrate\fR are mandatory. If you omit other
-+parameters, you will specify linear service curve.
-+.
-+.SH "SEE ALSO"
-+.
-+\fBtc\fR(8), \fBtc\-hfsc\fR(7), \fBtc\-stab\fR(8)
-+
-+Please direct bugreports and patches to: <net...@vger.kernel.org>
-+.
-+.SH "AUTHOR"
-+.
-+Manpage created by Michal Soltys (sol...@ziu.info)
---- iproute2/man/man8/tc-stab.8
-+++ iproute2-new/man/man8/tc-stab.8
-@@ -0,0 +1,156 @@
-+.TH STAB 8 "25 February 2009" iproute2 Linux
-+.
-+.SH NAME
-+tc\-stab \- Generic size table manipulations
-+.
-+.SH SYNOPSIS
-+.nf
-+tc qdisc add ... stab \\
-+.RS 4
-+[ \fBmtu\fR BYTES ] [ \fBtsize\fR SLOTS ] \\
-+[ \fBmpu\fR BYTES ] [ \fBoverhead\fR BYTES ] [ \fBlinklayer\fR TYPE ] ...
-+.RE
-+
-+TYPE := adsl | atm | ethernet
-+.fi
-+
-+For the description of BYTES \- please refer to the \fBUNITS\fR
-+section of \fBtc\fR(8).
-+
-+.IP \fBmtu\fR 4
-+.br
-+maximum packet size we create size table for, assumed 2048 if not specified explicitly
-+.IP \fBtsize\fR
-+.br
-+required table size, assumed 512 if not specified explicitly
-+.IP \fBmpu\fR
-+.br
-+minimum packet size used in computations
-+.IP \fBoverhead\fR
-+.br
-+per\-packet size overhead (can be negative) used in computations
-+.IP \fBlinklayer\fR
-+.br
-+required linklayer adaptation.
-+.PP
-+.
-+.SH DESCRIPTION
-+.
-+Size tables allow manipulation of packet size, as seen by whole scheduler
-+framework (of course, the actual packet size remains the same). Adjusted packet
-+size is calculated only once \- when a qdisc enqueues the packet. Initial root
-+enqueue initializes it to the real packet's size.
-+
-+Each qdisc can use different size table, but the adjusted size is stored in
-+area shared by whole qdisc hierarchy attached to the interface (technically,
-+it's stored in skb). The effect is, that if you have such setup, the last qdisc
-+with a stab in a chain "wins". For example, consider HFSC with simple pfifo
-+attached to one of its leaf classes. If that pfifo qdisc has stab defined, it
-+will override lengths calculated during HFSC's enqueue, and in turn, whenever
-+HFSC tries to dequeue a packet, it will use potentially invalid size in its
-+calculations. Normal setups will usually include stab defined only on root
-+qdisc, but further overriding gives extra flexibility for less usual setups.
-+
-+Initial size table is calculated by \fBtc\fR tool using \fBmtu\fR and
-+\fBtsize\fR parameters. The algorithm sets each slot's size to the smallest
-+power of 2 value, so the whole \fBmtu\fR is covered by the size table. Neither
-+\fBtsize\fR, nor \fBmtu\fR have to be power of 2 value, so the size
-+table will usually support more than is required by \fBmtu\fR.
-+
-+For example, with \fBmtu\fR\~=\~1500 and \fBtsize\fR\~=\~128, a table with 128
-+slots will be created, where slot 0 will correspond to sizes 0\-16, slot 1 to
-+17\~\-\~32, \&..., slot 127 to 2033\~\-\~2048. Note, that the sizes
-+are shifted 1 byte (normally you would expect 0\~\-\~15, 16\~\-\~31, \&...,
-+2032\~\-\~2047). Sizes assigned to each slot depend on \fBlinklayer\fR parameter.
-+
-+Stab calculation is also safe for an unusual case, when a size assigned to a
-+slot would be larger than 2^16\-1 (you will lose the accuracy though).
-+
-+During kernel part of packet size adjustment, \fBoverhead\fR will be added to
-+original size, and after subtracting 1 (to land in the proper slot \- see above
-+about shifting by 1 byte) slot will be calculated. If the size would cause
-+overflow, more than 1 slot will be used to get the final size. It of course will
-+affect accuracy, but it's only a guard against unusual situations.
-+
-+Currently there're two methods of creating values stored in the size table \-
-+ethernet and atm (adsl):
-+
-+.IP ethernet 4
-+.br
-+This is basically 1\-1 mapping, so following our example from above
-+(disregarding \fBmpu\fR for a moment) slot 0 would have 8, slot 1 would have 16
-+and so on, up to slot 127 with 2048. Note, that \fBmpu\fR\~>\~0 must be
-+specified, and slots that would get less than specified by \fBmpu\fR, will get
-+\fBmpu\fR instead. If you don't specify \fBmpu\fR, the size table will not be
-+created at all, although any \fBoverhead\fR value will be respected during
-+calculations.
-+.IP "atm, adsl"
-+.br
-+ATM linklayer consists of 53 byte cells, where each of them provides 48 bytes
-+for payload. Also all the cells must be fully utilized, thus the last one is
-+padded if/as necessary.
-+
-+When size table is calculated, adjusted size that fits properly into lowest
-+amount of cells is assigned to a slot. For example, a 100 byte long packet
-+requires three 48\-byte payloads, so the final size would require 3 ATM cells
-+\- 159 bytes.
-+
-+For ATM size tables, 16\~bytes sized slots are perfectly enough. The default
-+values of \fBmtu\fR and \fBtsize\fR create 4\~bytes sized slots.
-+.PP
-+.
-+.SH "TYPICAL OVERHEADS"
-+The following values are typical for different adsl scenarios (based on
-+\fB[1]\fR and \fB[2]\fR):
-+
-+.nf
-+LLC based:
-+.RS 4
-+PPPoA \- 14 (PPP \- 2, ATM \- 12)
-+PPPoE \- 40+ (PPPoE \- 8, ATM \- 18, ethernet 14, possibly FCS \- 4+padding)
-+Bridged \- 32 (ATM \- 18, ethernet 14, possibly FCS \- 4+padding)
-+IPoA \- 16 (ATM \- 16)
-+.RE
-+
-+VC Mux based:
-+.RS 4
-+PPPoA \- 10 (PPP \- 2, ATM \- 8)
-+PPPoE \- 32+ (PPPoE \- 8, ATM \- 10, ethernet 14, possibly FCS \- 4+padding)
-+Bridged \- 24+ (ATM \- 10, ethernet 14, possibly FCS \- 4+padding)
-+IPoA \- 8 (ATM \- 8)
-+.RE
-+.fi
-+\p There're few important things regarding the above overheads:
-+.
-+.IP \(bu 4
-+IPoA in LLC case requires SNAP, instead of LLC\-NLPID (see rfc2684) \- this is
-+the reason, why it actually takes more space than PPPoA.
-+.IP \(bu
-+In rare cases, FCS might be preserved on protocols that include ethernet frame
-+(Bridged and PPPoE).  In such situation, any ethernet specific padding
-+guaranteeing 64 bytes long frame size has to be included as well (see rfc2684).
-+In the other words, it also guarantees that any packet you send will take
-+minimum 2 atm cells. You should set \fBmpu\fR accordingly for that.
-+.IP \(bu
-+When size table is consulted, and you're shaping traffic for the sake of
-+another modem/router, ethernet header (without padding) will already be added
-+to initial packet's length. You should compensate for that by subtracting 14
-+from the above overheads in such case. If you're shaping directly on the router
-+(for example, with speedtouch usb modem) using ppp daemon, layer2 header will
-+not be added yet.
-+
-+For more thorough explanations, please see \fB[1]\fR and \fB[2]\fR.
-+.
-+.SH "SEE ALSO"
-+.
-+\fBtc\fR(8), \fBtc\-hfsc\fR(7), \fBtc\-hfsc\fR(8),
-+.br
-+\fB[1]\fR http://ace\-host.stuart.id.au/russell/files/tc/tc\-atm/
-+.br
-+\fB[2]\fR http://www.faqs.org/rfcs/rfc2684.html
-+
-+Please direct bugreports and patches to: <net...@vger.kernel.org>
-+.
-+.SH "AUTHOR"
-+.
-+Manpage created by Michal Soltys (sol...@ziu.info)
---- iproute2/tc/q_hfsc.c
-+++ iproute2-new/tc/q_hfsc.c
-@@ -43,7 +43,7 @@
- 	fprintf(stderr,
- 		"Usage: ... hfsc [ [ rt SC ] [ ls SC ] | [ sc SC ] ] [ ul SC ]\n"
- 		"\n"
--		"SC := [ [ m1 BPS ] [ d SEC ] m2 BPS\n"
-+		"SC := [ [ m1 BPS ] d SEC ] m2 BPS\n"
- 		"\n"
- 		" m1 : slope of first segment\n"
- 		" d  : x-coordinate of intersection\n"
-@@ -57,6 +57,10 @@
- 		" dmax : maximum delay\n"
- 		" rate : rate\n"
- 		"\n"
-+		"Remarks:\n"
-+		" - at least one of 'rt', 'ls' or 'sc' must be specified\n"
-+		" - 'ul' can only be specified with 'ls' or 'sc'\n"
-+		"\n"
- 	);
- }
- 
---- iproute2/tc/tc_core.c
-+++ iproute2-new/tc/tc_core.c
-@@ -155,12 +155,12 @@
- 	}
- 
- 	if (s->mtu == 0)
--		s->mtu = 2047;
-+		s->mtu = 2048;
- 	if (s->tsize == 0)
- 		s->tsize = 512;
- 
- 	s->cell_log = 0;
--	while ((s->mtu >> s->cell_log) > s->tsize - 1)
-+	while ((s->mtu - 1 >> s->cell_log) > s->tsize - 1)
- 		s->cell_log++;
- 
- 	*stab = malloc(s->tsize * sizeof(__u16));
---- iproute2/tc/tc_stab.c
-+++ iproute2-new/tc/tc_stab.c
-@@ -32,11 +32,15 @@
- 	fprintf(stderr,
- 		"Usage: ... stab [ mtu BYTES ] [ tsize SLOTS ] [ mpu BYTES ] \n"
- 		"                [ overhead BYTES ] [ linklayer TYPE ] ...\n"
--		"   mtu       : max packet size we create rate map for {2047}\n"
-+		"TYPE := adsl | atm | ethernet\n"
-+		"   mtu       : max packet size we create size table for {2048}\n"
- 		"   tsize     : how many slots should size table have {512}\n"
- 		"   mpu       : minimum packet size used in rate computations\n"
- 		"   overhead  : per-packet size overhead used in rate computations\n"
- 		"   linklayer : adapting to a linklayer e.g. atm\n"
-+		"   mpu       : minimum packet size used in size table computations\n"
-+		"   overhead  : per-packet size overhead used in size table computations\n"
-+		"   linklayer : required linklayer adaptation, (adsl and atm are synonyms)\n"
- 		"Example: ... stab overhead 20 linklayer atm\n");
- 
- 	return;

diff --git a/sys-apps/iproute2/files/iproute2-2.6.35-cached-routes.patch b/sys-apps/iproute2/files/iproute2-2.6.35-cached-routes.patch
deleted file mode 100644
index 821d8c3..00000000
--- a/sys-apps/iproute2/files/iproute2-2.6.35-cached-routes.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-http://bugs.gentoo.org/331447
-
-From c73f3e02f8ae25e5daad0367690a3069895dd8a3 Mon Sep 17 00:00:00 2001
-From: Ulrich Weber <uweber@astaro.com>
-Date: Thu, 12 Aug 2010 11:05:19 +0200
-Subject: [PATCH] iproute2: dont filter cached routes on iproute_get
-
-iproute_get will return cloned routes for IPv4
-and cloned as well non-cloned routes for IPv6.
-
-Therefore RTM_F_CLONED flag should not be checked
-for iproute_get routes. Check in print_route will
-always fail because valid values are 0 and 1.
-
-Signed-off-by: Ulrich Weber <uweber@astaro.com>
----
- ip/iproute.c |    1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
-
-diff --git a/ip/iproute.c b/ip/iproute.c
-index 711576e..b43933c 100644
---- a/ip/iproute.c
-+++ b/ip/iproute.c
-@@ -1286,6 +1286,7 @@ int iproute_get(int argc, char **argv)
- 	memset(&req, 0, sizeof(req));
- 
- 	iproute_reset_filter();
-+	filter.cloned = 2;
- 
- 	req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg));
- 	req.n.nlmsg_flags = NLM_F_REQUEST;
--- 
-1.7.2
-

diff --git a/sys-apps/iproute2/files/iproute2-2.6.35-no-iptables.patch b/sys-apps/iproute2/files/iproute2-2.6.35-no-iptables.patch
deleted file mode 100644
index a51cf78..00000000
--- a/sys-apps/iproute2/files/iproute2-2.6.35-no-iptables.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/tc/Makefile b/tc/Makefile
-index 3aa9f26..0a827da 100644
---- a/tc/Makefile
-+++ b/tc/Makefile
-@@ -58,7 +58,9 @@ else
- 	CFLAGS += -DTC_CONFIG_XT_H
- 	TCSO += m_xt_old.so
-     else
--      TCMODULES += m_ipt.o
-+      ifneq ($(TC_CONFIG_XT),n)
-+        TCMODULES += m_ipt.o
-+      endif
-     endif
-   endif
- endif

diff --git a/sys-apps/iproute2/files/iproute2-2.6.35-no-ipv6.patch b/sys-apps/iproute2/files/iproute2-2.6.35-no-ipv6.patch
deleted file mode 100644
index d82c887..00000000
--- a/sys-apps/iproute2/files/iproute2-2.6.35-no-ipv6.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-https://bugs.gentoo.org/326849
-
-allow ipv6 to be disabled
-
---- iproute2-2.6.31/ip/iptunnel.c
-+++ iproute2-2.6.31/ip/iptunnel.c
-@@ -456,13 +456,6 @@ int do_iptunnel(int argc, char **argv)
- 		break;
- 	case AF_INET:
- 		break;
--	/*
--	 * This is silly enough but we have no easy way to make it
--	 * protocol-independent because of unarranged structure between
--	 * IPv4 and IPv6.
--	 */
--	case AF_INET6:
--		return do_ip6tunnel(argc, argv);
- 	default:
- 		fprintf(stderr, "Unsupported family:%d\n", preferred_family);
- 		exit(-1);
---- iproute2-2.6.31/ip/Makefile
-+++ iproute2-2.6.31/ip/Makefile
-@@ -1,4 +1,4 @@
- IPOBJ=ip.o ipaddress.o ipaddrlabel.o iproute.o iprule.o \
--    rtm_map.o iptunnel.o ip6tunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \
-+    rtm_map.o iptunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \
-     ipmaddr.o ipmonitor.o ipmroute.o ipprefix.o \

diff --git a/sys-apps/iproute2/files/iproute2-2.6.35-xtables.patch b/sys-apps/iproute2/files/iproute2-2.6.35-xtables.patch
deleted file mode 100644
index 748c77b..00000000
--- a/sys-apps/iproute2/files/iproute2-2.6.35-xtables.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 035ea3a8a1c9f67721fa0b53540620c7c49bc8ab Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Sun, 21 Nov 2010 16:07:26 -0500
-Subject: [PATCH] m_xt: stop using xtables_set_revision()
-
-iptables dropped the xtables_set_revision() function around version 1.4.9,
-so set the rev directly ourselves.  This should be compatible back to the
-original version m_xt itself is designed for.
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- tc/m_xt.c |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/tc/m_xt.c b/tc/m_xt.c
-index bfc4937..ede9913 100644
---- a/tc/m_xt.c
-+++ b/tc/m_xt.c
-@@ -88,7 +88,7 @@ build_st(struct xtables_target *target, struct xt_entry_target *t)
- 		target->t = xtables_calloc(1, size);
- 		target->t->u.target_size = size;
- 		strcpy(target->t->u.user.name, target->name);
--		xtables_set_revision(target->t->u.user.name, target->revision);
-+		target->t->u.user.revision = target->revision;
- 
- 		if (target->init != NULL)
- 			target->init(target->t);
--- 
-1.7.3.1
-

diff --git a/sys-apps/iproute2/files/iproute2-2.6.38-parallel-build.patch b/sys-apps/iproute2/files/iproute2-2.6.38-parallel-build.patch
deleted file mode 100644
index 7966cfc..00000000
--- a/sys-apps/iproute2/files/iproute2-2.6.38-parallel-build.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-sent upstream already
-
-From f8a783bbe98b0fe5aaedbf623bc70471b88c9187 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Tue, 18 Oct 2011 17:36:55 -0400
-Subject: [PATCH] tc: fix parallel build file with lex/yacc
-
-Building iproute2 in parallel might hit the race failure:
-	emp_ematch.l:2:30: fatal error: emp_ematch.yacc.h:
-		No such file or directory
-	make[1]: *** [emp_ematch.lex.o] Error 1
-
-This is because we currently allow the yacc/lex files to generate and
-compile in parallel.  So add a simple dependency to make sure yacc has
-finished before we attempt to compile the lex output.
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- tc/Makefile |    5 +++++
- 1 files changed, 5 insertions(+), 0 deletions(-)
-
-diff --git a/tc/Makefile b/tc/Makefile
-index 08aa4ce..b2ca165 100644
---- a/tc/Makefile
-+++ b/tc/Makefile
-@@ -136,6 +136,11 @@ m_xt_old.so: m_xt_old.c
- %.lex.c: %.l
- 	$(LEX) $(LEXFLAGS) -o$@ $<
- 
-+# our lexer includes the header from yacc, so make sure
-+# we don't attempt to compile it before the header has
-+# been generated as part of the yacc step.
-+emp_ematch.lex.o: emp_ematch.yacc.c
-+
- ifneq ($(SHARED_LIBS),y)
- 
- tc: static-syms.o
--- 
-1.7.6.1
-

diff --git a/sys-apps/iproute2/files/iproute2-3.1.0-no-ipv6.patch b/sys-apps/iproute2/files/iproute2-3.1.0-no-ipv6.patch
deleted file mode 100644
index 1282a1b..00000000
--- a/sys-apps/iproute2/files/iproute2-3.1.0-no-ipv6.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-https://bugs.gentoo.org/326849
-
-allow ipv6 to be disabled
-
---- a/ip/iptunnel.c
-+++ b/ip/iptunnel.c
-@@ -456,13 +456,6 @@ int do_iptunnel(int argc, char **argv)
- 		break;
- 	case AF_INET:
- 		break;
--	/*
--	 * This is silly enough but we have no easy way to make it
--	 * protocol-independent because of unarranged structure between
--	 * IPv4 and IPv6.
--	 */
--	case AF_INET6:
--		return do_ip6tunnel(argc, argv);
- 	default:
- 		fprintf(stderr, "Unsupported family:%d\n", preferred_family);
- 		exit(-1);
---- a/ip/Makefile
-+++ b/ip/Makefile
-@@ -1,6 +1,6 @@
- IPOBJ=ip.o ipaddress.o ipaddrlabel.o iproute.o iprule.o ipnetns.o \
--    rtm_map.o iptunnel.o ip6tunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \
--    ipmaddr.o ipmonitor.o ipmroute.o ipprefix.o iptuntap.o \
-+    rtm_map.o iptunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \
-+    ipmaddr.o ipmonitor.o ipmroute.o iptuntap.o \
-     ipxfrm.o xfrm_state.o xfrm_policy.o xfrm_monitor.o \
-     iplink_vlan.o link_veth.o link_gre.o iplink_can.o \
-     iplink_macvlan.o iplink_macvtap.o ipl2tp.o
---- a/ip/ipmonitor.c
-+++ b/ip/ipmonitor.c
-@@ -76,7 +76,6 @@ int accept_msg(const struct sockaddr_nl *who,
- 	if (n->nlmsg_type == RTM_NEWPREFIX) {
- 		if (prefix_banner)
- 			fprintf(fp, "[PREFIX]");
--		print_prefix(who, n, arg);
- 		return 0;
- 	}
- 	if (n->nlmsg_type == RTM_NEWRULE || n->nlmsg_type == RTM_DELRULE) {

diff --git a/sys-apps/iproute2/files/iproute2-3.10.0-no-ipv6.patch b/sys-apps/iproute2/files/iproute2-3.10.0-no-ipv6.patch
deleted file mode 100644
index 86d80d2..00000000
--- a/sys-apps/iproute2/files/iproute2-3.10.0-no-ipv6.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-https://bugs.gentoo.org/326849
-
-allow ipv6 to be disabled
-
---- a/ip/iptunnel.c
-+++ b/ip/iptunnel.c
-@@ -629,13 +629,6 @@ int do_iptunnel(int argc, char **argv)
- 		break;
- 	case AF_INET:
- 		break;
--	/*
--	 * This is silly enough but we have no easy way to make it
--	 * protocol-independent because of unarranged structure between
--	 * IPv4 and IPv6.
--	 */
--	case AF_INET6:
--		return do_ip6tunnel(argc, argv);
- 	default:
- 		fprintf(stderr, "Unsupported protocol family: %d\n", preferred_family);
- 		exit(-1);
---- a/ip/Makefile
-+++ b/ip/Makefile
-@@ -1,6 +1,6 @@
- IPOBJ=ip.o ipaddress.o ipaddrlabel.o iproute.o iprule.o ipnetns.o \
--    rtm_map.o iptunnel.o ip6tunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \
--    ipmaddr.o ipmonitor.o ipmroute.o ipprefix.o iptuntap.o 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 \
---- a/ip/ipmonitor.c
-+++ b/ip/ipmonitor.c
-@@ -96,7 +96,6 @@ static int accept_msg(const struct socka
- 	if (n->nlmsg_type == RTM_NEWPREFIX) {
- 		if (prefix_banner)
- 			fprintf(fp, "[PREFIX]");
--		print_prefix(who, n, arg);
- 		return 0;
- 	}
- 	if (n->nlmsg_type == RTM_NEWRULE || n->nlmsg_type == RTM_DELRULE) {

diff --git a/sys-apps/iproute2/files/iproute2-3.6.0-pkg-config.patch b/sys-apps/iproute2/files/iproute2-3.6.0-pkg-config.patch
deleted file mode 100644
index fcfee29..00000000
--- a/sys-apps/iproute2/files/iproute2-3.6.0-pkg-config.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 99762cbc216bb818e9fcbe37e1abf9b313968615 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Thu, 8 Nov 2012 11:31:26 -0500
-Subject: [PATCH] allow pkg-config to be customized
-
-Rather than hard coding `pkg-config`, use ${PKG_CONFIG} so people can
-override it to their specific version (like when cross-compiling).
-
-This is the same way the upstream pkg-config code works.
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- configure   | 6 ++++--
- tc/Makefile | 4 ++--
- 2 files changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/configure b/configure
-index 2c2d1c4..0bfedf9 100755
---- a/configure
-+++ b/configure
-@@ -2,6 +2,8 @@
- # This is not an autconf generated configure
- #
- INCLUDE=${1:-"$PWD/include"}
-+: ${PKG_CONFIG:=pkg-config}
-+echo "PKG_CONFIG:=${PKG_CONFIG}" >>Config
- 
- # Make a temp directory in build tree.
- TMPDIR=$(mktemp -d config.XXXXXX)
-@@ -51,7 +53,7 @@ int main(int argc, char **argv)
- 
- EOF
- 
--if gcc -I$INCLUDE $IPTC -o $TMPDIR/ipttest $TMPDIR/ipttest.c $IPTL $(pkg-config xtables --cflags --libs) -ldl >/dev/null 2>&1
-+if gcc -I$INCLUDE $IPTC -o $TMPDIR/ipttest $TMPDIR/ipttest.c $IPTL $(${PKG_CONFIG} xtables --cflags --libs) -ldl >/dev/null 2>&1
- then
- 	echo "TC_CONFIG_XT:=y" >>Config
- 	echo "using xtables"
-@@ -148,7 +150,7 @@ check_ipt()
- 
- check_ipt_lib_dir()
- {
--	IPT_LIB_DIR=$(pkg-config --variable=xtlibdir xtables)
-+	IPT_LIB_DIR=$(${PKG_CONFIG} --variable=xtlibdir xtables)
- 	if [ -n "$IPT_LIB_DIR" ]; then
- 		echo $IPT_LIB_DIR
- 		echo "IPT_LIB_DIR:=$IPT_LIB_DIR" >> Config
-diff --git a/tc/Makefile b/tc/Makefile
-index 389029d..696f891 100644
---- a/tc/Makefile
-+++ b/tc/Makefile
-@@ -135,10 +135,10 @@ q_atm.so: q_atm.c
- 	$(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm
- 
- m_xt.so: m_xt.c
--	$(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic -o m_xt.so m_xt.c $$(pkg-config xtables --cflags --libs)
-+	$(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic -o m_xt.so m_xt.c $$($(PKG_CONFIG) xtables --cflags --libs)
- 
- m_xt_old.so: m_xt_old.c
--	$(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic -o m_xt_old.so m_xt_old.c $$(pkg-config xtables --cflags --libs)
-+	$(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic -o m_xt_old.so m_xt_old.c $$($(PKG_CONFIG) xtables --cflags --libs)
- 
- %.yacc.c: %.y
- 	$(YACC) $(YACCFLAGS) -o $@ $<
--- 
-1.7.12.4
-

diff --git a/sys-apps/iproute2/files/iproute2-3.7.0-clang.patch b/sys-apps/iproute2/files/iproute2-3.7.0-clang.patch
deleted file mode 100644
index 17bb6ac..00000000
--- a/sys-apps/iproute2/files/iproute2-3.7.0-clang.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 048bff6e0206bca33ee70516521f3048e7714752 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Thu, 17 Jan 2013 18:00:50 +0000
-Subject: [PATCH] ipxfrm: use alloca to allocate stack space
-
-Clang doesn't support the gcc extension for embeddeding flexible arrays
-inside of structures.  Use the slightly more portable alloca().
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- ip/ipxfrm.c | 27 +++++++++++----------------
- 1 file changed, 11 insertions(+), 16 deletions(-)
-
-diff --git a/ip/ipxfrm.c b/ip/ipxfrm.c
-index c7b3420..dda4a7a 100644
---- a/ip/ipxfrm.c
-+++ b/ip/ipxfrm.c
-@@ -25,6 +25,7 @@
-  *	Masahide NAKAMURA @USAGI
-  */
- 
-+#include <alloca.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-@@ -555,16 +556,13 @@ static inline void xfrm_algo_print(struct xfrm_algo *algo, int type, int len,
- static void xfrm_aead_print(struct xfrm_algo_aead *algo, int len,
- 			    FILE *fp, const char *prefix)
- {
--	struct {
--		struct xfrm_algo algo;
--		char key[algo->alg_key_len / 8];
--	} base;
-+	struct xfrm_algo *base_algo = alloca(sizeof(*base_algo) + algo->alg_key_len / 8);
- 
--	memcpy(base.algo.alg_name, algo->alg_name, sizeof(base.algo.alg_name));
--	base.algo.alg_key_len = algo->alg_key_len;
--	memcpy(base.algo.alg_key, algo->alg_key, algo->alg_key_len / 8);
-+	memcpy(base_algo->alg_name, algo->alg_name, sizeof(base_algo->alg_name));
-+	base_algo->alg_key_len = algo->alg_key_len;
-+	memcpy(base_algo->alg_key, algo->alg_key, algo->alg_key_len / 8);
- 
--	__xfrm_algo_print(&base.algo, XFRMA_ALG_AEAD, len, fp, prefix, 0);
-+	__xfrm_algo_print(base_algo, XFRMA_ALG_AEAD, len, fp, prefix, 0);
- 
- 	fprintf(fp, " %d", algo->alg_icv_len);
- 
-@@ -574,16 +572,13 @@ static void xfrm_aead_print(struct xfrm_algo_aead *algo, int len,
- static void xfrm_auth_trunc_print(struct xfrm_algo_auth *algo, int len,
- 				  FILE *fp, const char *prefix)
- {
--	struct {
--		struct xfrm_algo algo;
--		char key[algo->alg_key_len / 8];
--	} base;
-+	struct xfrm_algo *base_algo = alloca(sizeof(*base_algo) + algo->alg_key_len / 8);
- 
--	memcpy(base.algo.alg_name, algo->alg_name, sizeof(base.algo.alg_name));
--	base.algo.alg_key_len = algo->alg_key_len;
--	memcpy(base.algo.alg_key, algo->alg_key, algo->alg_key_len / 8);
-+	memcpy(base_algo->alg_name, algo->alg_name, sizeof(base_algo->alg_name));
-+	base_algo->alg_key_len = algo->alg_key_len;
-+	memcpy(base_algo->alg_key, algo->alg_key, algo->alg_key_len / 8);
- 
--	__xfrm_algo_print(&base.algo, XFRMA_ALG_AUTH_TRUNC, len, fp, prefix, 0);
-+	__xfrm_algo_print(base_algo, XFRMA_ALG_AUTH_TRUNC, len, fp, prefix, 0);
- 
- 	fprintf(fp, " %d", algo->alg_trunc_len);
- 
--- 
-1.8.0.2
-

diff --git a/sys-apps/iproute2/files/iproute2-3.7.0-man7.patch b/sys-apps/iproute2/files/iproute2-3.7.0-man7.patch
deleted file mode 100644
index 947714a..00000000
--- a/sys-apps/iproute2/files/iproute2-3.7.0-man7.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 18c1de8d742792d43ff81ebff9af5389e5be7cae Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Fri, 11 Jan 2013 11:34:08 -0500
-Subject: [PATCH] [iproute2] add man7 to subdirs list
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The man dir misses the man7 as a subdir which means none of the pages
-get installed.
-
-URL: https://bugs.gentoo.org/451166
-Reported-by: Marcin Mirosław <bug@mejor.pl>
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- man/Makefile      |  2 +-
- man/man7/Makefile | 13 +++++++++++++
- 2 files changed, 14 insertions(+), 1 deletion(-)
- create mode 100644 man/man7/Makefile
-
-diff --git a/man/Makefile b/man/Makefile
-index 67fea05..9a60fa7 100644
---- a/man/Makefile
-+++ b/man/Makefile
-@@ -2,7 +2,7 @@ INSTALL=install
- INSTALLDIR=install -m 0755 -d
- INSTALLMAN=install -m 0644
- 
--SUBDIRS = man3 man8
-+SUBDIRS = man3 man7 man8
- 
- all:
- 	@for subdir in $(SUBDIRS); do $(MAKE) -C $$subdir; done
-diff --git a/man/man7/Makefile b/man/man7/Makefile
-new file mode 100644
-index 0000000..ccfd839
---- /dev/null
-+++ b/man/man7/Makefile
-@@ -0,0 +1,13 @@
-+MAN7PAGES = tc-hfsc.7
-+
-+all:
-+
-+distclean: clean
-+
-+clean:
-+
-+install:
-+	$(INSTALLDIR) $(DESTDIR)$(MANDIR)/man7
-+	$(INSTALLMAN) $(MAN7PAGES) $(DESTDIR)$(MANDIR)/man7
-+
-+.PHONY: install clean distclean
--- 
-1.8.0.2
-

diff --git a/sys-apps/iproute2/files/iproute2-3.8.0-old-mount-libc.patch b/sys-apps/iproute2/files/iproute2-3.8.0-old-mount-libc.patch
deleted file mode 100644
index 96280e0..00000000
--- a/sys-apps/iproute2/files/iproute2-3.8.0-old-mount-libc.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 03fdb011dd661315a83998af8af779d8f089e3fe Mon Sep 17 00:00:00 2001
-From: Stephen Hemminger <stephen@networkplumber.org>
-Date: Wed, 17 Apr 2013 13:33:26 -0700
-Subject: [PATCH] ipnetns: fix build on older systems
-
-Debian Squeeze has out of date <sys/mount.h> without the required flags.
----
- ip/ipnetns.c | 14 ++++++++++++++
- 1 file changed, 14 insertions(+)
-
-diff --git a/ip/ipnetns.c b/ip/ipnetns.c
-index b047b97..c9bc20a 100644
---- a/ip/ipnetns.c
-+++ b/ip/ipnetns.c
-@@ -29,6 +29,20 @@
- #define MNT_DETACH	0x00000002	/* Just detach from the tree */
- #endif /* MNT_DETACH */
- 
-+/* sys/mount.h may be out too old to have these */
-+#ifndef MS_REC
-+#define MS_REC		16384
-+#endif
-+
-+#ifndef MS_SLAVE
-+#define MS_SLAVE	(1 << 19)
-+#endif
-+
-+#ifndef MS_SHARED
-+#define MS_SHARED	(1 << 20)
-+#endif
-+
-+
- #ifndef HAVE_SETNS
- static int setns(int fd, int nstype)
- {
--- 
-1.8.2.1
-

diff --git a/sys-apps/iproute2/files/iproute2-4.0.0-tc-show-buffer-overflow.patch b/sys-apps/iproute2/files/iproute2-4.0.0-tc-show-buffer-overflow.patch
deleted file mode 100644
index 6c6c9a5..00000000
--- a/sys-apps/iproute2/files/iproute2-4.0.0-tc-show-buffer-overflow.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-https://bugs.gentoo.org/546928
-
-From 46679bbbe89699016d31486de7599590d02a5054 Mon Sep 17 00:00:00 2001
-From: Vadim Kochan <vadim4j@gmail.com>
-Date: Mon, 20 Apr 2015 08:33:32 +0300
-Subject: [PATCH] tc util: Fix possible buffer overflow when print class id
-
-Use correct handle buffer length.
-
-Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
----
- tc/tc_util.c | 19 ++++++++++---------
- 1 file changed, 10 insertions(+), 9 deletions(-)
-
-diff --git a/tc/tc_util.c b/tc/tc_util.c
-index 1d3153d..dc2b70f 100644
---- a/tc/tc_util.c
-+++ b/tc/tc_util.c
-@@ -128,30 +128,31 @@ ok:
- 	return 0;
- }
- 
--int print_tc_classid(char *buf, int len, __u32 h)
-+int print_tc_classid(char *buf, int blen, __u32 h)
- {
--	char handle[40] = {};
-+	SPRINT_BUF(handle) = {};
-+	int hlen = SPRINT_BSIZE - 1;
- 
- 	if (h == TC_H_ROOT)
- 		sprintf(handle, "root");
- 	else if (h == TC_H_UNSPEC)
--		snprintf(handle, len, "none");
-+		snprintf(handle, hlen, "none");
- 	else if (TC_H_MAJ(h) == 0)
--		snprintf(handle, len, ":%x", TC_H_MIN(h));
-+		snprintf(handle, hlen, ":%x", TC_H_MIN(h));
- 	else if (TC_H_MIN(h) == 0)
--		snprintf(handle, len, "%x:", TC_H_MAJ(h) >> 16);
-+		snprintf(handle, hlen, "%x:", TC_H_MAJ(h) >> 16);
- 	else
--		snprintf(handle, len, "%x:%x", TC_H_MAJ(h) >> 16, TC_H_MIN(h));
-+		snprintf(handle, hlen, "%x:%x", TC_H_MAJ(h) >> 16, TC_H_MIN(h));
- 
- 	if (use_names) {
- 		char clname[IDNAME_MAX] = {};
- 
- 		if (id_to_name(cls_names, h, clname))
--			snprintf(buf, len, "%s#%s", clname, handle);
-+			snprintf(buf, blen, "%s#%s", clname, handle);
- 		else
--			snprintf(buf, len, "%s", handle);
-+			snprintf(buf, blen, "%s", handle);
- 	} else {
--		snprintf(buf, len, "%s", handle);
-+		snprintf(buf, blen, "%s", handle);
- 	}
- 
- 	return 0;
--- 
-2.3.5
-

diff --git a/sys-apps/iproute2/iproute2-2.6.38.ebuild b/sys-apps/iproute2/iproute2-2.6.38.ebuild
deleted file mode 100644
index 7a86829..00000000
--- a/sys-apps/iproute2/iproute2-2.6.38.ebuild
+++ /dev/null
@@ -1,90 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="4"
-
-inherit eutils multilib toolchain-funcs flag-o-matic
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
-	inherit git-2
-	SRC_URI=""
-	#KEYWORDS=""
-else
-	SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.bz2"
-	KEYWORDS="alpha amd64 arm 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 minimal"
-
-RDEPEND="!net-misc/arpd
-	!minimal? ( berkdb? ( sys-libs/db ) )
-	atm? ( net-dialup/linux-atm )"
-DEPEND="${RDEPEND}
-	sys-devel/bison
-	sys-devel/flex
-	>=sys-kernel/linux-headers-2.6.27
-	elibc_glibc? ( >=sys-libs/glibc-2.7 )"
-
-src_prepare() {
-	epatch "${FILESDIR}"/${PN}-2.6.29.1-hfsc.patch #291907
-	epatch "${FILESDIR}"/${PN}-2.6.38-parallel-build.patch
-
-	sed -i \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
-		Makefile || die
-
-	# build against system headers
-	rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-
-	# don't build arpd if USE=-berkdb #81660
-	use berkdb || sed -i '/^TARGETS=/s: arpd : :' misc/Makefile
-
-	use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc:' Makefile
-}
-
-src_configure() {
-	echo "TC_CONFIG_ATM:=$(use atm && echo "y" || echo "n")" > Config
-
-	# Use correct iptables dir, #144265 #293709
-	append-cppflags -DIPT_LIB_DIR=\\\"`$(tc-getPKG_CONFIG) xtables --variable=xtlibdir`\\\"
-}
-
-src_compile() {
-	emake \
-		CC="$(tc-getCC)" \
-		AR="$(tc-getAR)"
-}
-
-src_install() {
-	if use minimal ; then
-		into /
-		dosbin tc/tc
-		return 0
-	fi
-
-	emake \
-		DESTDIR="${D}" \
-		SBINDIR=/sbin \
-		DOCDIR=/usr/share/doc/${PF} \
-		MANDIR=/usr/share/man \
-		install
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-
-	if use berkdb ; then
-		dodir /var/lib/arpd
-		# bug 47482, arpd doesn't need to be in /sbin
-		dodir /usr/sbin
-		mv "${ED}"/sbin/arpd "${ED}"/usr/sbin/
-	fi
-}

diff --git a/sys-apps/iproute2/iproute2-3.17.0.ebuild b/sys-apps/iproute2/iproute2-3.17.0.ebuild
deleted file mode 100644
index cb91909..00000000
--- a/sys-apps/iproute2/iproute2-3.17.0.ebuild
+++ /dev/null
@@ -1,124 +0,0 @@
-# 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="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb +iptables ipv6 minimal selinux"
-
-RDEPEND="!net-misc/arpd
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	!minimal? ( berkdb? ( sys-libs/db ) )
-	atm? ( net-dialup/linux-atm )
-	selinux? ( sys-libs/libselinux )"
-DEPEND="${RDEPEND}
-	app-arch/xz-utils
-	iptables? ( virtual/pkgconfig )
-	sys-devel/bison
-	sys-devel/flex
-	>=sys-kernel/linux-headers-2.6.27
-	elibc_glibc? ( >=sys-libs/glibc-2.7 )"
-
-src_prepare() {
-	epatch "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-	use ipv6 || epatch "${FILESDIR}"/${PN}-3.10.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' \
-		ip/ipnetns.c \
-		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:' 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)
-	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
-		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-3.19.0.ebuild b/sys-apps/iproute2/iproute2-3.19.0.ebuild
deleted file mode 100644
index d836d95..00000000
--- a/sys-apps/iproute2/iproute2-3.19.0.ebuild
+++ /dev/null
@@ -1,124 +0,0 @@
-# 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="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb +iptables ipv6 minimal selinux"
-
-RDEPEND="!net-misc/arpd
-	iptables? ( >=net-firewall/iptables-1.4.20:= )
-	!minimal? ( berkdb? ( sys-libs/db ) )
-	atm? ( net-dialup/linux-atm )
-	selinux? ( sys-libs/libselinux )"
-DEPEND="${RDEPEND}
-	app-arch/xz-utils
-	iptables? ( virtual/pkgconfig )
-	sys-devel/bison
-	sys-devel/flex
-	>=sys-kernel/linux-headers-2.6.27
-	elibc_glibc? ( >=sys-libs/glibc-2.7 )"
-
-src_prepare() {
-	epatch "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-	use ipv6 || epatch "${FILESDIR}"/${PN}-3.10.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:' 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)
-	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
-		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-3.3.0.ebuild b/sys-apps/iproute2/iproute2-3.3.0.ebuild
deleted file mode 100644
index 145c617..00000000
--- a/sys-apps/iproute2/iproute2-3.3.0.ebuild
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="4"
-
-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
-	SRC_URI=""
-	#KEYWORDS=""
-else
-	SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.bz2"
-	KEYWORDS="~alpha amd64 arm 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"
-
-RDEPEND="!net-misc/arpd
-	iptables? ( >=net-firewall/iptables-1.4.5 )
-	!minimal? ( berkdb? ( sys-libs/db ) )
-	atm? ( net-dialup/linux-atm )"
-DEPEND="${RDEPEND}
-	iptables? ( virtual/pkgconfig )
-	sys-devel/bison
-	sys-devel/flex
-	>=sys-kernel/linux-headers-2.6.27
-	elibc_glibc? ( >=sys-libs/glibc-2.7 )"
-
-src_prepare() {
-	epatch "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-	use ipv6 || epatch "${FILESDIR}"/${PN}-3.1.0-no-ipv6.patch #326849
-
-	sed -i \
-		-e '/^CC =/d' \
-		-e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
-		-e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
-		Makefile || die
-
-	# build against system headers
-	rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
-	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:' 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)
-	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
-		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
-
-	dolib.a lib/libnetlink.a
-	insinto /usr/include
-	doins include/libnetlink.h
-
-	if use berkdb ; then
-		dodir /var/lib/arpd
-		# bug 47482, arpd doesn't need to be in /sbin
-		dodir /usr/sbin
-		mv "${ED}"/sbin/arpd "${ED}"/usr/sbin/
-	fi
-}

diff --git a/sys-apps/iproute2/iproute2-3.8.0.ebuild b/sys-apps/iproute2/iproute2-3.8.0.ebuild
deleted file mode 100644
index 4710e79..00000000
--- a/sys-apps/iproute2/iproute2-3.8.0.ebuild
+++ /dev/null
@@ -1,117 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="4"
-
-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="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb +iptables ipv6 minimal"
-
-RDEPEND="!net-misc/arpd
-	iptables? ( >=net-firewall/iptables-1.4.16 )
-	!minimal? ( berkdb? ( sys-libs/db ) )
-	atm? ( net-dialup/linux-atm )"
-DEPEND="${RDEPEND}
-	app-arch/xz-utils
-	iptables? ( virtual/pkgconfig )
-	sys-devel/bison
-	sys-devel/flex
-	>=sys-kernel/linux-headers-2.6.27
-	elibc_glibc? ( >=sys-libs/glibc-2.7 )"
-
-src_prepare() {
-	epatch "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-	epatch "${FILESDIR}"/${P}-old-mount-libc.patch #468120
-	use ipv6 || epatch "${FILESDIR}"/${PN}-3.1.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
-
-	# 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:' 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)
-	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
-		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.0.0-r2.ebuild b/sys-apps/iproute2/iproute2-4.0.0-r2.ebuild
deleted file mode 100644
index 0aa37ca..00000000
--- a/sys-apps/iproute2/iproute2-4.0.0-r2.ebuild
+++ /dev/null
@@ -1,129 +0,0 @@
-# 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="https://wiki.linuxfoundation.org/networking/iproute2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="atm berkdb +iptables ipv6 minimal selinux"
-
-RDEPEND="!net-misc/arpd
-	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
-DEPEND="${RDEPEND}
-	app-arch/xz-utils
-	iptables? ( virtual/pkgconfig )
-	sys-devel/bison
-	sys-devel/flex
-	>=sys-kernel/linux-headers-3.7
-	elibc_glibc? ( >=sys-libs/glibc-2.7 )"
-
-src_prepare() {
-	epatch "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-	epatch "${FILESDIR}"/${P}-tc-show-buffer-overflow.patch #546928
-	use ipv6 || epatch "${FILESDIR}"/${PN}-3.10.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_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.1.1.ebuild b/sys-apps/iproute2/iproute2-4.1.1.ebuild
deleted file mode 100644
index b75fabb..00000000
--- a/sys-apps/iproute2/iproute2-4.1.1.ebuild
+++ /dev/null
@@ -1,131 +0,0 @@
-# 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="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 )
-	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}-3.10.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
-}

diff --git a/sys-apps/iproute2/iproute2-4.2.0.ebuild b/sys-apps/iproute2/iproute2-4.2.0.ebuild
deleted file mode 100644
index 769baed..00000000
--- a/sys-apps/iproute2/iproute2-4.2.0.ebuild
+++ /dev/null
@@ -1,131 +0,0 @@
-# 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="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 )
-	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
-}

diff --git a/sys-apps/iproute2/iproute2-4.3.0.ebuild b/sys-apps/iproute2/iproute2-4.3.0.ebuild
deleted file mode 100644
index 3a95333..00000000
--- a/sys-apps/iproute2/iproute2-4.3.0.ebuild
+++ /dev/null
@@ -1,129 +0,0 @@
-# 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="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 )
-	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
-
-	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] 21+ messages in thread

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

commit:     f5fefd6f8988e4148f4e055c712fe4f8969bc1b5
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon May  1 17:29:17 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon May  1 17:29:17 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f5fefd6f

sys-apps/iproute2: Bump to version 4.11.0

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 sys-apps/iproute2/Manifest                         |   1 +
 .../iproute2/files/iproute2-4.11.0-no-ipv6.patch   |  37 ++++++
 sys-apps/iproute2/iproute2-4.11.0.ebuild           | 138 +++++++++++++++++++++
 3 files changed, 176 insertions(+)

diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest
index e867873b1c1..6b97f1a79bb 100644
--- a/sys-apps/iproute2/Manifest
+++ b/sys-apps/iproute2/Manifest
@@ -1,4 +1,5 @@
 DIST iproute2-4.10.0.tar.xz 626944 SHA256 22b1e1c1fc704ad35837e5a66103739727b8b48ac90b48c13f79b7367ff0a9a8 SHA512 e54477e167455e7ef5da4adc168d63eaa96091b63dc987fffe918cbb005eceed18a62283ca99ee2512dc0e960f47ae21b39ffbe399c1612fd9cea147c34c581b WHIRLPOOL 7034f87835b13d275d2e065ee00d869060ae20c7dd325d8974da414db20328195e5968ede2f0b6925ddf67de3712b5945f54276c6ce5c8367ba28520c2adb859
+DIST iproute2-4.11.0.tar.xz 657100 SHA256 72671028bda696d0cb8f48ec8e702581c3a501caeed33eec3a81d7041cbc8026 SHA512 e6cc3dbe2779670a752ab346c1a432b496033448d1645aa0161b3f7b683b3f9939ab09db12199b794cc64dff257faaf0d151046feea9031a6139176e08b4f4fa WHIRLPOOL 9bf25b018d3f392a2e2f4faf4c3877f52ec4b0aebb082d9c2e2c3e80c0c8f3885c122c5d211c4c6ef014506d786213b36938728f63b581079274a3116fc85581
 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.11.0-no-ipv6.patch b/sys-apps/iproute2/files/iproute2-4.11.0-no-ipv6.patch
new file mode 100644
index 00000000000..fc855dcf220
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-4.11.0-no-ipv6.patch
@@ -0,0 +1,37 @@
+--- iproute2-4.11.0/ip/ipmonitor.c
++++ iproute2-4.11.0/ip/ipmonitor.c
+@@ -114,7 +114,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.11.0/ip/iptunnel.c
++++ iproute2-4.11.0/ip/iptunnel.c
+@@ -589,13 +589,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.11.0/ip/Makefile
++++ iproute2-4.11.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_dummy.o \
+     iplink_ifb.o iplink_nlmon.o iplink_team.o iplink_vcan.o \
+     iplink_vlan.o link_veth.o link_gre.o iplink_can.o iplink_xdp.o \

diff --git a/sys-apps/iproute2/iproute2-4.11.0.ebuild b/sys-apps/iproute2/iproute2-4.11.0.ebuild
new file mode 100644
index 00000000000..74f13e14182
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-4.11.0.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2017 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="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="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 )
+	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
+)
+
+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_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] 21+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/, sys-apps/iproute2/files/
@ 2017-12-15 11:48 Thomas Deutschmann
  0 siblings, 0 replies; 21+ messages in thread
From: Thomas Deutschmann @ 2017-12-15 11:48 UTC (permalink / raw
  To: gentoo-commits

commit:     5eafd8616730adc6677072d82c2c9e48c351b507
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 15 11:35:36 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Dec 15 11:48:50 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5eafd861

sys-apps/iproute2: Rev bump

Closes: https://bugs.gentoo.org/640654
Bug: https://bugzilla.redhat.com/1514963
Package-Manager: Portage-2.3.18, Repoman-2.3.6

 .../files/iproute2-4.14.1-fix-tc-actions.patch     | 222 +++++++++++++++++++++
 sys-apps/iproute2/iproute2-4.14.1-r2.ebuild        | 146 ++++++++++++++
 2 files changed, 368 insertions(+)

diff --git a/sys-apps/iproute2/files/iproute2-4.14.1-fix-tc-actions.patch b/sys-apps/iproute2/files/iproute2-4.14.1-fix-tc-actions.patch
new file mode 100644
index 00000000000..a8b7aaa9efe
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-4.14.1-fix-tc-actions.patch
@@ -0,0 +1,222 @@
+From 3572e01a090a298e2f4c4f796bad6639b652e031 Mon Sep 17 00:00:00 2001
+From: Michal Privoznik <mprivozn@redhat.com>
+Date: Fri, 8 Dec 2017 11:18:07 +0100
+Subject: tc: util: Don't call NEXT_ARG_FWD() in __parse_action_control()
+
+Not all callers want parse_action_control*() to advance the
+arguments. For instance act_parse_police() does the argument
+advancing itself.
+
+Fixes: e67aba559581 ("tc: actions: add helpers to parse and print control actions")
+Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
+---
+ tc/m_bpf.c        |  1 +
+ tc/m_connmark.c   |  1 +
+ tc/m_csum.c       |  1 +
+ tc/m_gact.c       | 10 +++++-----
+ tc/m_ife.c        |  1 +
+ tc/m_mirred.c     |  4 +++-
+ tc/m_nat.c        |  1 +
+ tc/m_pedit.c      |  1 +
+ tc/m_sample.c     |  1 +
+ tc/m_skbedit.c    |  1 +
+ tc/m_skbmod.c     |  1 +
+ tc/m_tunnel_key.c |  1 +
+ tc/m_vlan.c       |  1 +
+ tc/tc_util.c      |  1 -
+ 14 files changed, 19 insertions(+), 7 deletions(-)
+
+diff --git a/tc/m_bpf.c b/tc/m_bpf.c
+index 1c1f71c..576f69c 100644
+--- a/tc/m_bpf.c
++++ b/tc/m_bpf.c
+@@ -129,6 +129,7 @@ opt_bpf:
+ 
+ 	parse_action_control_dflt(&argc, &argv, &parm.action,
+ 				  false, TC_ACT_PIPE);
++	NEXT_ARG_FWD();
+ 
+ 	if (argc) {
+ 		if (matches(*argv, "index") == 0) {
+diff --git a/tc/m_connmark.c b/tc/m_connmark.c
+index 37d7185..47c7a8c 100644
+--- a/tc/m_connmark.c
++++ b/tc/m_connmark.c
+@@ -82,6 +82,7 @@ parse_connmark(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
+ 	}
+ 
+ 	parse_action_control_dflt(&argc, &argv, &sel.action, false, TC_ACT_PIPE);
++	NEXT_ARG_FWD();
+ 
+ 	if (argc) {
+ 		if (matches(*argv, "index") == 0) {
+diff --git a/tc/m_csum.c b/tc/m_csum.c
+index 7b15673..e1352c0 100644
+--- a/tc/m_csum.c
++++ b/tc/m_csum.c
+@@ -124,6 +124,7 @@ parse_csum(struct action_util *a, int *argc_p,
+ 	}
+ 
+ 	parse_action_control_dflt(&argc, &argv, &sel.action, false, TC_ACT_OK);
++	NEXT_ARG_FWD();
+ 
+ 	if (argc) {
+ 		if (matches(*argv, "index") == 0) {
+diff --git a/tc/m_gact.c b/tc/m_gact.c
+index e7d91da..b30b042 100644
+--- a/tc/m_gact.c
++++ b/tc/m_gact.c
+@@ -87,14 +87,13 @@ parse_gact(struct action_util *a, int *argc_p, char ***argv_p,
+ 	if (argc < 0)
+ 		return -1;
+ 
+-
+-	if (matches(*argv, "gact") == 0) {
+-		argc--;
+-		argv++;
+-	} else if (parse_action_control(&argc, &argv, &p.action, false) == -1) {
++	if (matches(*argv, "gact") != 0 &&
++		parse_action_control(&argc, &argv, &p.action, false) == -1) {
+ 		usage();	/* does not return */
+ 	}
+ 
++	NEXT_ARG_FWD();
++
+ #ifdef CONFIG_GACT_PROB
+ 	if (argc > 0) {
+ 		if (matches(*argv, "random") == 0) {
+@@ -114,6 +113,7 @@ parse_gact(struct action_util *a, int *argc_p, char ***argv_p,
+ 			if (parse_action_control(&argc, &argv,
+ 						 &pp.paction, false) == -1)
+ 				usage();
++			NEXT_ARG_FWD();
+ 			if (get_u16(&pp.pval, *argv, 10)) {
+ 				fprintf(stderr,
+ 					"Illegal probability val 0x%x\n",
+diff --git a/tc/m_ife.c b/tc/m_ife.c
+index 205efc9..4647f6a 100644
+--- a/tc/m_ife.c
++++ b/tc/m_ife.c
+@@ -159,6 +159,7 @@ static int parse_ife(struct action_util *a, int *argc_p, char ***argv_p,
+ 
+ 	parse_action_control_dflt(&argc, &argv, &p.action, false, TC_ACT_PIPE);
+ 
++	NEXT_ARG_FWD();
+ 	if (argc) {
+ 		if (matches(*argv, "index") == 0) {
+ 			NEXT_ARG();
+diff --git a/tc/m_mirred.c b/tc/m_mirred.c
+index 3870d3a..aa7ce6d 100644
+--- a/tc/m_mirred.c
++++ b/tc/m_mirred.c
+@@ -202,8 +202,10 @@ parse_direction(struct action_util *a, int *argc_p, char ***argv_p,
+ 	}
+ 
+ 
+-	if (p.eaction == TCA_EGRESS_MIRROR || p.eaction == TCA_INGRESS_MIRROR)
++	if (p.eaction == TCA_EGRESS_MIRROR || p.eaction == TCA_INGRESS_MIRROR) {
+ 		parse_action_control(&argc, &argv, &p.action, false);
++		NEXT_ARG_FWD();
++	}
+ 
+ 	if (argc) {
+ 		if (iok && matches(*argv, "index") == 0) {
+diff --git a/tc/m_nat.c b/tc/m_nat.c
+index 1e4ff51..f5de4d4 100644
+--- a/tc/m_nat.c
++++ b/tc/m_nat.c
+@@ -116,6 +116,7 @@ parse_nat(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, struct
+ 
+ 	parse_action_control_dflt(&argc, &argv, &sel.action, false, TC_ACT_OK);
+ 
++	NEXT_ARG_FWD();
+ 	if (argc) {
+ 		if (matches(*argv, "index") == 0) {
+ 			NEXT_ARG();
+diff --git a/tc/m_pedit.c b/tc/m_pedit.c
+index 26549ee..dc57f14 100644
+--- a/tc/m_pedit.c
++++ b/tc/m_pedit.c
+@@ -672,6 +672,7 @@ int parse_pedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
+ 
+ 	parse_action_control_dflt(&argc, &argv, &sel.sel.action, false, TC_ACT_OK);
+ 
++	NEXT_ARG_FWD();
+ 	if (argc) {
+ 		if (matches(*argv, "index") == 0) {
+ 			NEXT_ARG();
+diff --git a/tc/m_sample.c b/tc/m_sample.c
+index ff5ee6b..31774c0 100644
+--- a/tc/m_sample.c
++++ b/tc/m_sample.c
+@@ -100,6 +100,7 @@ static int parse_sample(struct action_util *a, int *argc_p, char ***argv_p,
+ 
+ 	parse_action_control_dflt(&argc, &argv, &p.action, false, TC_ACT_PIPE);
+ 
++	NEXT_ARG_FWD();
+ 	if (argc) {
+ 		if (matches(*argv, "index") == 0) {
+ 			NEXT_ARG();
+diff --git a/tc/m_skbedit.c b/tc/m_skbedit.c
+index aa374fc..c41a7bb 100644
+--- a/tc/m_skbedit.c
++++ b/tc/m_skbedit.c
+@@ -123,6 +123,7 @@ parse_skbedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
+ 	parse_action_control_dflt(&argc, &argv, &sel.action,
+ 				  false, TC_ACT_PIPE);
+ 
++	NEXT_ARG_FWD();
+ 	if (argc) {
+ 		if (matches(*argv, "index") == 0) {
+ 			NEXT_ARG();
+diff --git a/tc/m_skbmod.c b/tc/m_skbmod.c
+index 561b73f..bc268df 100644
+--- a/tc/m_skbmod.c
++++ b/tc/m_skbmod.c
+@@ -124,6 +124,7 @@ static int parse_skbmod(struct action_util *a, int *argc_p, char ***argv_p,
+ 
+ 	parse_action_control_dflt(&argc, &argv, &p.action, false, TC_ACT_PIPE);
+ 
++	NEXT_ARG_FWD();
+ 	if (argc) {
+ 		if (matches(*argv, "index") == 0) {
+ 			NEXT_ARG();
+diff --git a/tc/m_tunnel_key.c b/tc/m_tunnel_key.c
+index 1cdd035..2dc9187 100644
+--- a/tc/m_tunnel_key.c
++++ b/tc/m_tunnel_key.c
+@@ -175,6 +175,7 @@ static int parse_tunnel_key(struct action_util *a, int *argc_p, char ***argv_p,
+ 	parse_action_control_dflt(&argc, &argv, &parm.action,
+ 				  false, TC_ACT_PIPE);
+ 
++	NEXT_ARG_FWD();
+ 	if (argc) {
+ 		if (matches(*argv, "index") == 0) {
+ 			NEXT_ARG();
+diff --git a/tc/m_vlan.c b/tc/m_vlan.c
+index 161759f..edae0d1 100644
+--- a/tc/m_vlan.c
++++ b/tc/m_vlan.c
+@@ -131,6 +131,7 @@ static int parse_vlan(struct action_util *a, int *argc_p, char ***argv_p,
+ 	parse_action_control_dflt(&argc, &argv, &parm.action,
+ 				  false, TC_ACT_PIPE);
+ 
++	NEXT_ARG_FWD();
+ 	if (argc) {
+ 		if (matches(*argv, "index") == 0) {
+ 			NEXT_ARG();
+diff --git a/tc/tc_util.c b/tc/tc_util.c
+index 1887905..ee9a70a 100644
+--- a/tc/tc_util.c
++++ b/tc/tc_util.c
+@@ -586,7 +586,6 @@ static int __parse_action_control(int *argc_p, char ***argv_p, int *result_p,
+ 		}
+ 		result |= jump_cnt;
+ 	}
+-	NEXT_ARG_FWD();
+ 	*argc_p = argc;
+ 	*argv_p = argv;
+ 	*result_p = result;
+-- 
+cgit v1.1
+

diff --git a/sys-apps/iproute2/iproute2-4.14.1-r2.ebuild b/sys-apps/iproute2/iproute2-4.14.1-r2.ebuild
new file mode 100644
index 00000000000..ab9012f964c
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-4.14.1-r2.ebuild
@@ -0,0 +1,146 @@
+# 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
+	"${FILESDIR}"/${P}-fix-tc-actions.patch
+)
+
+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"...
+	default
+
+	# ...now switch on/off requested features via USE flags
+	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_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] 21+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/, sys-apps/iproute2/files/
@ 2018-01-09 23:41 Mike Frysinger
  0 siblings, 0 replies; 21+ messages in thread
From: Mike Frysinger @ 2018-01-09 23:41 UTC (permalink / raw
  To: gentoo-commits

commit:     333b1e3a9086215ff466114e1762172ef3124ee3
Author:     Mike Frysinger <vapier <AT> chromium <DOT> org>
AuthorDate: Tue Jan  9 23:40:41 2018 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Jan  9 23:40:50 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=333b1e3a

sys-apps/iproute2: clean up scripts to use /bin/sh only

 .../files/iproute2-4.14.1-posix-shell.patch        |  65 +++++++++
 sys-apps/iproute2/iproute2-4.14.1-r4.ebuild        | 153 +++++++++++++++++++++
 2 files changed, 218 insertions(+)

diff --git a/sys-apps/iproute2/files/iproute2-4.14.1-posix-shell.patch b/sys-apps/iproute2/files/iproute2-4.14.1-posix-shell.patch
new file mode 100644
index 00000000000..e5efc9068ce
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-4.14.1-posix-shell.patch
@@ -0,0 +1,65 @@
+https://marc.info/?l=linux-netdev&m=151554000532498&w=2
+
+From aec69bbc285e5498add5384b6018564355594233 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@chromium.org>
+Date: Tue, 9 Jan 2018 18:16:53 -0500
+Subject: [PATCH iproute2] ifcfg/rtpr: convert to POSIX shell
+
+These files are already mostly written in POSIX shell, so convert their
+shebangs to /bin/sh and tweak the few bashisms in here.
+
+URL: https://crbug.com/756559
+Reported-by: Pat Erley <perley@chromium.org>
+Signed-off-by: Mike Frysinger <vapier@chromium.org>
+---
+ ip/ifcfg | 12 ++++++------
+ ip/rtpr  |  2 +-
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/ip/ifcfg b/ip/ifcfg
+index 851b9215ab63..5b34decd4480 100644
+--- a/ip/ifcfg
++++ b/ip/ifcfg
+@@ -1,3 +1,3 @@
+-#! /bin/bash
++#! /bin/sh
+ 
+ CheckForwarding () {
+@@ -7,7 +7,7 @@ CheckForwarding () {
+   fwd=0
+   if [ -d $sbase ]; then
+     for dir in $sbase/*/forwarding; do
+-      fwd=$[$fwd + `cat $dir`]
++      fwd=$(( fwd + $(cat "$dir") ))
+     done
+   else
+     fwd=2
+@@ -128,12 +128,12 @@ fi
+ arping -q -A -c 1 -I $dev $ipaddr
+ noarp=$?
+ ( sleep 2 ;
+-  arping -q -U -c 1 -I $dev $ipaddr ) >& /dev/null </dev/null &
++  arping -q -U -c 1 -I $dev $ipaddr ) >/dev/null 2>&1 </dev/null &
+ 
+-ip route add unreachable 224.0.0.0/24 >& /dev/null
+-ip route add unreachable 255.255.255.255 >& /dev/null
++ip route add unreachable 224.0.0.0/24 >/dev/null 2>&1
++ip route add unreachable 255.255.255.255 >/dev/null 2>&1
+ if [ "`ip link ls $dev | grep -c MULTICAST`" -ge 1 ]; then
+-  ip route add 224.0.0.0/4 dev $dev scope global >& /dev/null
++  ip route add 224.0.0.0/4 dev $dev scope global >/dev/null 2>&1
+ fi
+ 
+ if [ $fwd -eq 0 ]; then
+diff --git a/ip/rtpr b/ip/rtpr
+index 192a476f817e..7e48674bcf53 100644
+--- a/ip/rtpr
++++ b/ip/rtpr
+@@ -1,3 +1,3 @@
+-#! /bin/bash
++#! /bin/sh
+ 
+ exec tr "[\\\\]" "[
+-- 
+2.15.1
+

diff --git a/sys-apps/iproute2/iproute2-4.14.1-r4.ebuild b/sys-apps/iproute2/iproute2-4.14.1-r4.ebuild
new file mode 100644
index 00000000000..c9c21b326b4
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-4.14.1-r4.ebuild
@@ -0,0 +1,153 @@
+# 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
+	"${FILESDIR}"/${P}-posix-shell.patch
+)
+
+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] 21+ messages in thread

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

commit:     a828c0687225ce4a3a310986c41160fd63576412
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Apr  3 10:23:26 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Apr  3 10:24:08 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a828c068

sys-apps/iproute2: Bump to version 4.16.0

Package-Manager: Portage-2.3.28, Repoman-2.3.9

 sys-apps/iproute2/Manifest                         |   1 +
 .../files/iproute2-4.16.0-configure-nomagic.patch  | 191 +++++++++++++++++++++
 sys-apps/iproute2/iproute2-4.16.0.ebuild           | 152 ++++++++++++++++
 3 files changed, 344 insertions(+)

diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest
index ad319ef1cd9..eedf9e981d9 100644
--- a/sys-apps/iproute2/Manifest
+++ b/sys-apps/iproute2/Manifest
@@ -4,6 +4,7 @@ DIST iproute2-4.12.0.tar.xz 662424 BLAKE2B 6c6608d4a157e46932834c09e91d6a786a04c
 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.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

diff --git a/sys-apps/iproute2/files/iproute2-4.16.0-configure-nomagic.patch b/sys-apps/iproute2/files/iproute2-4.16.0-configure-nomagic.patch
new file mode 100644
index 00000000000..01a1fe2d812
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-4.16.0-configure-nomagic.patch
@@ -0,0 +1,191 @@
+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>
+
+Forward-ported from v4.14.1 to v4.16.0 by Lars Wendler <polynomial-c@gentoo.org>
+
+--- iproute2-4.16.0/bridge/Makefile
++++ iproute2-4.16.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.16.0/config.include
++++ iproute2-4.16.0/config.include
+@@ -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:
+--- iproute2-4.16.0/configure
++++ iproute2-4.16.0/configure
+@@ -212,7 +212,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
+@@ -257,8 +257,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
+@@ -272,8 +272,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
+@@ -286,8 +286,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
+@@ -426,7 +426,3 @@
+ 
+ echo -n "libcap support: "
+ check_cap
+-
+-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
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0
+ include ../config.mk
++include ../config.include
+ 
+ TARGETS :=
+ 
+--- iproute2-4.16.0/genl/Makefile
++++ iproute2-4.16.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.16.0/ip/Makefile
++++ iproute2-4.16.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.16.0/lib/Makefile
++++ iproute2-4.16.0/lib/Makefile
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0
+ include ../config.mk
++include ../config.include
+ 
+ CFLAGS += -fPIC
+ 
+--- iproute2-4.16.0/misc/Makefile
++++ iproute2-4.16.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.16.0/netem/Makefile
++++ iproute2-4.16.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.16.0/rdma/Makefile
++++ iproute2-4.16.0/rdma/Makefile
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0
+ include ../config.mk
++include ../config.include
+ 
+ TARGETS :=
+ 
+--- iproute2-4.16.0/tc/Makefile
++++ iproute2-4.16.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.16.0/tipc/Makefile
++++ iproute2-4.16.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-4.16.0.ebuild b/sys-apps/iproute2/iproute2-4.16.0.ebuild
new file mode 100644
index 00000000000..0181e8c6b83
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-4.16.0.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
+)
+
+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 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] 21+ messages in thread

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

commit:     b7e2c129c2c3fdd467ddaccd85b5adcecbffefdc
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  8 10:51:58 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Jan  8 10:51:58 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7e2c129

sys-apps/iproute2: Bump to version 4.20.0

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

 sys-apps/iproute2/Manifest                         |   1 +
 .../files/iproute2-4.20.0-configure-nomagic.patch  | 208 +++++++++++++++++++++
 .../iproute2/files/iproute2-4.20.0-no-ipv6.patch   |  38 ++++
 sys-apps/iproute2/iproute2-4.20.0.ebuild           | 155 +++++++++++++++
 4 files changed, 402 insertions(+)

diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest
index 0c3e61bbdad..683c8dc8668 100644
--- a/sys-apps/iproute2/Manifest
+++ b/sys-apps/iproute2/Manifest
@@ -1,3 +1,4 @@
 DIST iproute2-4.14.1.tar.xz 636876 BLAKE2B 232dbe29b9af516d8345c86c044359d3b0cfe73fb88a2ba1dcd05534b52dea37c9155d2b273a4a0d40b55fba8b5503a0fbe5bc71f37864c0a2ba9d6f08b6bf41 SHA512 e593b68c46ef5f98bd6911ee7beb38388a14935a29fefabdeccc96aa012593b6f3a49b3bb1baed7d77e54f1f4a857172e058b73407f4070f158b8713f44f5d2c
 DIST iproute2-4.17.0.tar.xz 675268 BLAKE2B 3d1455c119c9c56b11a64092c152fcea2b161f571006878215425b95deef779fed523368252ce672a1a70251c019edbe6ff2bdac8c3ee8abab1fb29e2a3c669c SHA512 ccd7fb70afd58f1fcd4e17c38a24607207da853c4d6118fda423efa6e51faad3ad03c4d6d58a579c40ef9c68aaf13b1c455e12b0c36e155712d3d4db3c2ff4b5
 DIST iproute2-4.19.0.tar.xz 720408 BLAKE2B 2d0ece5dd8f1beb7912d025c269a9edd2ecd87aea04971a28eca9f9b7ea82d0e4aa397c9338c0cb6cb463887678a541a5407644e82244ffbbae0eb8f6ac088e8 SHA512 47c750da2247705b1b1d1621f58987333e54370d0fff2f24106194022de793ff35dfd67fd1be127ce019008705702092d31dac49abf930a7c0dc5c7e7c0665b8
+DIST iproute2-4.20.0.tar.xz 707016 BLAKE2B d62c6b995c4c1f79617e2f8149ff2ed297d741965e81bffebfa475514f5e96f0c9300e65d12bdd14ab492ce66675677eb41af6816876d5e1360218e4f32f4bc8 SHA512 ed29638c864062e199152c7b3b24b6495987ca6f79cc9ab1b529dab37a8a840fa2b5858d5db2b94eeefa1c0d72ff666a790107e27d11a597b189bfb7a01a4b8b

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
new file mode 100644
index 00000000000..94df85017df
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-4.20.0-configure-nomagic.patch
@@ -0,0 +1,208 @@
+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/files/iproute2-4.20.0-no-ipv6.patch b/sys-apps/iproute2/files/iproute2-4.20.0-no-ipv6.patch
new file mode 100644
index 00000000000..31733e99f72
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-4.20.0-no-ipv6.patch
@@ -0,0 +1,38 @@
+--- 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/iproute2-4.20.0.ebuild b/sys-apps/iproute2/iproute2-4.20.0.ebuild
new file mode 100644
index 00000000000..aa41574d98b
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-4.20.0.ebuild
@@ -0,0 +1,155 @@
+# Copyright 1999-2019 Gentoo Authors
+# 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 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}
+	app-arch/xz-utils
+	iptables? ( virtual/pkgconfig )
+	>=sys-devel/bison-2.4
+	sys-devel/flex
+	>=sys-kernel/linux-headers-3.16
+	virtual/pkgconfig
+	elibc_glibc? ( >=sys-libs/glibc-2.7 )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
+	"${FILESDIR}"/${PN}-4.20.0-configure-nomagic.patch # bug 643722
+)
+
+src_prepare() {
+	if ! use ipv6 ; then
+		PATCHES+=(
+			"${FILESDIR}"/${PN}-4.20.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_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
+}
+
+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] 21+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/, sys-apps/iproute2/files/
@ 2019-09-25 14:01 Thomas Deutschmann
  0 siblings, 0 replies; 21+ messages in thread
From: Thomas Deutschmann @ 2019-09-25 14:01 UTC (permalink / raw
  To: gentoo-commits

commit:     07866a257c4ddf91baf828c5a02ac977d67ea855
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 25 13:59:34 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Sep 25 13:59:47 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07866a25

sys-apps/iproute2: fix build on musl

Closes: https://bugs.gentoo.org/690486
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 .../iproute2-5.2.0-fix-sys-queue-h-on-musl.patch   | 83 ++++++++++++++++++++++
 sys-apps/iproute2/iproute2-5.2.0-r1.ebuild         |  1 +
 2 files changed, 84 insertions(+)

diff --git a/sys-apps/iproute2/files/iproute2-5.2.0-fix-sys-queue-h-on-musl.patch b/sys-apps/iproute2/files/iproute2-5.2.0-fix-sys-queue-h-on-musl.patch
new file mode 100644
index 00000000000..6bc129fa31f
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-5.2.0-fix-sys-queue-h-on-musl.patch
@@ -0,0 +1,83 @@
+From 33267017faf1a188d1286f5c423454a060517e39 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Fri, 26 Jul 2019 22:01:05 +0100
+Subject: iproute2: devlink: port from sys/queue.h to list.h
+
+sys/queue.h does not exist on linux-musl targets and fails build as:
+
+    devlink.c:28:10: fatal error: sys/queue.h: No such file or directory
+       28 | #include <sys/queue.h>
+          |          ^~~~~~~~~~~~~
+
+The change ports to list.h API and drops dependency of 'sys/queue.h'.
+The API maps one-to-one.
+
+Build-tested on linux-musl and linux-glibc.
+
+Bug: https://bugs.gentoo.org/690486
+CC: Stephen Hemminger <stephen@networkplumber.org>
+CC: netdev@vger.kernel.org
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
+---
+ devlink/devlink.c | 15 +++++++--------
+ 1 file changed, 7 insertions(+), 8 deletions(-)
+
+diff --git a/devlink/devlink.c b/devlink/devlink.c
+index bb023c0c..0ea401ae 100644
+--- a/devlink/devlink.c
++++ b/devlink/devlink.c
+@@ -25,7 +25,6 @@
+ #include <linux/devlink.h>
+ #include <libmnl/libmnl.h>
+ #include <netinet/ether.h>
+-#include <sys/queue.h>
+ 
+ #include "SNAPSHOT.h"
+ #include "list.h"
+@@ -5981,13 +5980,13 @@ static int fmsg_value_show(struct dl *dl, int type, struct nlattr *nl_data)
+ 
+ struct nest_qentry {
+ 	int attr_type;
+-	TAILQ_ENTRY(nest_qentry) nest_entries;
++	struct list_head nest_entries;
+ };
+ 
+ struct fmsg_cb_data {
+ 	struct dl *dl;
+ 	uint8_t value_type;
+-	TAILQ_HEAD(, nest_qentry) qhead;
++	struct list_head qhead;
+ };
+ 
+ static int cmd_fmsg_nest_queue(struct fmsg_cb_data *fmsg_data,
+@@ -6001,13 +6000,13 @@ static int cmd_fmsg_nest_queue(struct fmsg_cb_data *fmsg_data,
+ 			return -ENOMEM;
+ 
+ 		entry->attr_type = *attr_value;
+-		TAILQ_INSERT_HEAD(&fmsg_data->qhead, entry, nest_entries);
++		list_add(&fmsg_data->qhead, &entry->nest_entries);
+ 	} else {
+-		if (TAILQ_EMPTY(&fmsg_data->qhead))
++		if (list_empty(&fmsg_data->qhead))
+ 			return MNL_CB_ERROR;
+-		entry = TAILQ_FIRST(&fmsg_data->qhead);
++		entry = list_first_entry(&fmsg_data->qhead, struct nest_qentry, nest_entries);
+ 		*attr_value = entry->attr_type;
+-		TAILQ_REMOVE(&fmsg_data->qhead, entry, nest_entries);
++		list_del(&entry->nest_entries);
+ 		free(entry);
+ 	}
+ 	return MNL_CB_OK;
+@@ -6116,7 +6115,7 @@ static int cmd_health_object_common(struct dl *dl, uint8_t cmd, uint16_t flags)
+ 		return err;
+ 
+ 	data.dl = dl;
+-	TAILQ_INIT(&data.qhead);
++	INIT_LIST_HEAD(&data.qhead);
+ 	err = _mnlg_socket_sndrcv(dl->nlg, nlh, cmd_fmsg_object_cb, &data);
+ 	return err;
+ }
+-- 
+cgit 1.2-0.3.lf.el7
+

diff --git a/sys-apps/iproute2/iproute2-5.2.0-r1.ebuild b/sys-apps/iproute2/iproute2-5.2.0-r1.ebuild
index 5beda6e4bc4..a9648404f62 100644
--- a/sys-apps/iproute2/iproute2-5.2.0-r1.ebuild
+++ b/sys-apps/iproute2/iproute2-5.2.0-r1.ebuild
@@ -48,6 +48,7 @@ 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.2.0-fix-sys-queue-h-on-musl.patch
 )
 
 src_prepare() {


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/, sys-apps/iproute2/files/
@ 2020-06-15  9:54 David Seifert
  0 siblings, 0 replies; 21+ messages in thread
From: David Seifert @ 2020-06-15  9:54 UTC (permalink / raw
  To: gentoo-commits

commit:     54d131edd288aa09a6faaf079ec1b03cf9f293e4
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 15 09:53:51 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Mon Jun 15 09:53:51 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54d131ed

sys-apps/iproute2: Patch for missing #include <signal.h>

Package-Manager: Portage-2.3.101, Repoman-2.3.22
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../iproute2/files/iproute2-5.7.0-mix-signal.h-include.patch   | 10 ++++++++++
 sys-apps/iproute2/iproute2-5.7.0.ebuild                        |  1 +
 2 files changed, 11 insertions(+)

diff --git a/sys-apps/iproute2/files/iproute2-5.7.0-mix-signal.h-include.patch b/sys-apps/iproute2/files/iproute2-5.7.0-mix-signal.h-include.patch
new file mode 100644
index 00000000000..be606c107fc
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-5.7.0-mix-signal.h-include.patch
@@ -0,0 +1,10 @@
+--- a/devlink/devlink.c
++++ b/devlink/devlink.c
+@@ -15,6 +15,7 @@
+ #include <string.h>
+ #include <stdbool.h>
+ #include <unistd.h>
++#include <signal.h>
+ #include <getopt.h>
+ #include <limits.h>
+ #include <errno.h>

diff --git a/sys-apps/iproute2/iproute2-5.7.0.ebuild b/sys-apps/iproute2/iproute2-5.7.0.ebuild
index 7dcb54c51f5..6a78d7f40fb 100644
--- a/sys-apps/iproute2/iproute2-5.7.0.ebuild
+++ b/sys-apps/iproute2/iproute2-5.7.0.ebuild
@@ -48,6 +48,7 @@ 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() {


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/, sys-apps/iproute2/files/
@ 2020-08-09  9:38 Lars Wendler
  0 siblings, 0 replies; 21+ messages in thread
From: Lars Wendler @ 2020-08-09  9:38 UTC (permalink / raw
  To: gentoo-commits

commit:     38028475fc979ef549bb9c94ed4c1a82d8d1f08b
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sun Aug  9 09:38:16 2020 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sun Aug  9 09:38:16 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=38028475

sys-apps/iproute2: Removed old

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

 sys-apps/iproute2/Manifest                         |   2 -
 .../iproute2/files/iproute2-4.11.0-no-ipv6.patch   |  37 ----
 .../files/iproute2-4.17.0-configure-nomagic.patch  | 207 ---------------------
 .../iproute2-5.2.0-fix-sys-queue-h-on-musl.patch   |  83 ---------
 sys-apps/iproute2/iproute2-5.2.0-r1.ebuild         | 163 ----------------
 sys-apps/iproute2/iproute2-5.6.0.ebuild            | 164 ----------------
 6 files changed, 656 deletions(-)

diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest
index 8ac2dfb271b..33005e6d740 100644
--- a/sys-apps/iproute2/Manifest
+++ b/sys-apps/iproute2/Manifest
@@ -1,5 +1,3 @@
-DIST iproute2-5.2.0.tar.xz 729540 BLAKE2B 72d082b4f39b6b9f0040149ea14d3c5c6d999eb4955b708ef49a3276f3c574eab757e2c81f10a11e2ce5f709c7849bbf6556e40c7f261fc72d498046f73eade4 SHA512 82bbeae29d98129d822c95ff7523186569e32c66132b8d781d501d61f396b04d122e3d13057dd4236455264008e5bfac7cb63c325908fc1c46d416cbde6ac7e1
 DIST iproute2-5.4.0.tar.xz 741328 BLAKE2B 8c7b74aa64526180e793165eb3d0f1ee07d4589fa982aa91e4e0775595c096d73677e85bb7f073cbe14e6de6b166d31efba94554f8c7df3320b168341818fcba SHA512 26d1230e10d9ba4466edd3fe95cb6f595df691eeb27b87ae845ceb9da09fe11c2e0daa8d67187121320413f9ee7131fd426182055eb285be7c4de558d9e47051
-DIST iproute2-5.6.0.tar.xz 754812 BLAKE2B 5232c206052dcbc489284cb5a4169bf2555f9bdf7c122e23be07f7a5a18e0c828f5b4f3bb4afb6d33919919d211c67a20626ad10556e4ae41f90619d6eed445f SHA512 e52c6c8b676ab79401ae815fe3f80268c1edb490c0a00826e0f7181a816e9bf6549df9e77a40b0d56855db8ad312179b3a40002a2dd6f66c807039cff0cdfb6c
 DIST iproute2-5.7.0.tar.xz 764436 BLAKE2B 842229730139f8931c4ff3d548fe56c7c86b6bb7be5cc1a7dd896ddce34c039467fb90d0c258cdc91276edc59b9b19f53c39a36c79b54b15a78436b44c595eed SHA512 d5ef68e0eb8e84fbff68c2e7dd4097b9ceb438c928d17ede4130876802dfeafe8bf08d82b4fd39005314e0679c0b261aaa3d6a0a2ff364074a43a043a855a634
 DIST iproute2-5.8.0.tar.xz 780612 BLAKE2B 5d86af8d981f5e9582d5eb0aaffbe15891964a86f3a1da408ce2f46101b1bb6beac8d4492dab1865391c212ef596c9256b680bdcb346d440e38cbb636a23cdc1 SHA512 f2a3f7dcf5cb39ca7cd14f0e40e45641eccf4b93427c527a09fd789ac8621c5c3359769ca61fcc8bab7e915edd943c39b7c3e15cbfc497187aa6271eed0a9152

diff --git a/sys-apps/iproute2/files/iproute2-4.11.0-no-ipv6.patch b/sys-apps/iproute2/files/iproute2-4.11.0-no-ipv6.patch
deleted file mode 100644
index fc855dcf220..00000000000
--- a/sys-apps/iproute2/files/iproute2-4.11.0-no-ipv6.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- iproute2-4.11.0/ip/ipmonitor.c
-+++ iproute2-4.11.0/ip/ipmonitor.c
-@@ -114,7 +114,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.11.0/ip/iptunnel.c
-+++ iproute2-4.11.0/ip/iptunnel.c
-@@ -589,13 +589,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.11.0/ip/Makefile
-+++ iproute2-4.11.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_dummy.o \
-     iplink_ifb.o iplink_nlmon.o iplink_team.o iplink_vcan.o \
-     iplink_vlan.o link_veth.o link_gre.o iplink_can.o iplink_xdp.o \

diff --git a/sys-apps/iproute2/files/iproute2-4.17.0-configure-nomagic.patch b/sys-apps/iproute2/files/iproute2-4.17.0-configure-nomagic.patch
deleted file mode 100644
index 30b5db3bc3c..00000000000
--- a/sys-apps/iproute2/files/iproute2-4.17.0-configure-nomagic.patch
+++ /dev/null
@@ -1,207 +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>
-
---- 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
- 
- include ../config.mk
-+include ../config.include
- 
- all: bridge
- 
---- 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)
-+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) -c -o $@ $<
-+
-+# vim: ft=make:
---- iproute2-4.17.0/configure
-+++ iproute2-4.17.0/configure
-@@ -212,7 +212,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
-@@ -257,8 +257,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
-@@ -272,8 +272,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
-@@ -286,8 +286,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
-@@ -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: "
- check_cap
--
--echo >> $CONFIG
--echo "%.o: %.c" >> $CONFIG
--echo '	$(QUIET_CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<' >> $CONFIG
---- 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
-+include ../config.include
- 
- TARGETS :=
- 
---- iproute2-4.17.0/genl/Makefile
-+++ iproute2-4.17.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.17.0/ip/Makefile
-+++ iproute2-4.17.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.17.0/lib/Makefile
-+++ iproute2-4.17.0/lib/Makefile
-@@ -1,5 +1,6 @@
- # SPDX-License-Identifier: GPL-2.0
- include ../config.mk
-+include ../config.include
- 
- CFLAGS += -fPIC
- 
---- iproute2-4.17.0/misc/Makefile
-+++ iproute2-4.17.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.17.0/netem/Makefile
-+++ iproute2-4.17.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.17.0/rdma/Makefile
-+++ iproute2-4.17.0/rdma/Makefile
-@@ -1,5 +1,6 @@
- # SPDX-License-Identifier: GPL-2.0
- include ../config.mk
-+include ../config.include
- 
- TARGETS :=
- 
---- iproute2-4.17.0/tc/Makefile
-+++ iproute2-4.17.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.17.0/tipc/Makefile
-+++ iproute2-4.17.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/files/iproute2-5.2.0-fix-sys-queue-h-on-musl.patch b/sys-apps/iproute2/files/iproute2-5.2.0-fix-sys-queue-h-on-musl.patch
deleted file mode 100644
index 6bc129fa31f..00000000000
--- a/sys-apps/iproute2/files/iproute2-5.2.0-fix-sys-queue-h-on-musl.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From 33267017faf1a188d1286f5c423454a060517e39 Mon Sep 17 00:00:00 2001
-From: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Fri, 26 Jul 2019 22:01:05 +0100
-Subject: iproute2: devlink: port from sys/queue.h to list.h
-
-sys/queue.h does not exist on linux-musl targets and fails build as:
-
-    devlink.c:28:10: fatal error: sys/queue.h: No such file or directory
-       28 | #include <sys/queue.h>
-          |          ^~~~~~~~~~~~~
-
-The change ports to list.h API and drops dependency of 'sys/queue.h'.
-The API maps one-to-one.
-
-Build-tested on linux-musl and linux-glibc.
-
-Bug: https://bugs.gentoo.org/690486
-CC: Stephen Hemminger <stephen@networkplumber.org>
-CC: netdev@vger.kernel.org
-Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
----
- devlink/devlink.c | 15 +++++++--------
- 1 file changed, 7 insertions(+), 8 deletions(-)
-
-diff --git a/devlink/devlink.c b/devlink/devlink.c
-index bb023c0c..0ea401ae 100644
---- a/devlink/devlink.c
-+++ b/devlink/devlink.c
-@@ -25,7 +25,6 @@
- #include <linux/devlink.h>
- #include <libmnl/libmnl.h>
- #include <netinet/ether.h>
--#include <sys/queue.h>
- 
- #include "SNAPSHOT.h"
- #include "list.h"
-@@ -5981,13 +5980,13 @@ static int fmsg_value_show(struct dl *dl, int type, struct nlattr *nl_data)
- 
- struct nest_qentry {
- 	int attr_type;
--	TAILQ_ENTRY(nest_qentry) nest_entries;
-+	struct list_head nest_entries;
- };
- 
- struct fmsg_cb_data {
- 	struct dl *dl;
- 	uint8_t value_type;
--	TAILQ_HEAD(, nest_qentry) qhead;
-+	struct list_head qhead;
- };
- 
- static int cmd_fmsg_nest_queue(struct fmsg_cb_data *fmsg_data,
-@@ -6001,13 +6000,13 @@ static int cmd_fmsg_nest_queue(struct fmsg_cb_data *fmsg_data,
- 			return -ENOMEM;
- 
- 		entry->attr_type = *attr_value;
--		TAILQ_INSERT_HEAD(&fmsg_data->qhead, entry, nest_entries);
-+		list_add(&fmsg_data->qhead, &entry->nest_entries);
- 	} else {
--		if (TAILQ_EMPTY(&fmsg_data->qhead))
-+		if (list_empty(&fmsg_data->qhead))
- 			return MNL_CB_ERROR;
--		entry = TAILQ_FIRST(&fmsg_data->qhead);
-+		entry = list_first_entry(&fmsg_data->qhead, struct nest_qentry, nest_entries);
- 		*attr_value = entry->attr_type;
--		TAILQ_REMOVE(&fmsg_data->qhead, entry, nest_entries);
-+		list_del(&entry->nest_entries);
- 		free(entry);
- 	}
- 	return MNL_CB_OK;
-@@ -6116,7 +6115,7 @@ static int cmd_health_object_common(struct dl *dl, uint8_t cmd, uint16_t flags)
- 		return err;
- 
- 	data.dl = dl;
--	TAILQ_INIT(&data.qhead);
-+	INIT_LIST_HEAD(&data.qhead);
- 	err = _mnlg_socket_sndrcv(dl->nlg, nlh, cmd_fmsg_object_cb, &data);
- 	return err;
- }
--- 
-cgit 1.2-0.3.lf.el7
-

diff --git a/sys-apps/iproute2/iproute2-5.2.0-r1.ebuild b/sys-apps/iproute2/iproute2-5.2.0-r1.ebuild
deleted file mode 100644
index a42b969cc0b..00000000000
--- a/sys-apps/iproute2/iproute2-5.2.0-r1.ebuild
+++ /dev/null
@@ -1,163 +0,0 @@
-# Copyright 1999-2020 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.2.0-fix-sys-queue-h-on-musl.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
-
-	# 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 || 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
-}
-
-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
-	fi
-}

diff --git a/sys-apps/iproute2/iproute2-5.6.0.ebuild b/sys-apps/iproute2/iproute2-5.6.0.ebuild
deleted file mode 100644
index 622ac0d6894..00000000000
--- a/sys-apps/iproute2/iproute2-5.6.0.ebuild
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright 1999-2020 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
-)
-
-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
-
-	# 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 || 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
-}
-
-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] 21+ messages in thread

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

commit:     7ee8c2f8e9f83cb62171ee9d37827c08db1b23bc
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 23 14:36:32 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Feb 23 14:55:35 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ee8c2f8

sys-apps/iproute2: Bump to version 5.11.0

Dropped keywords until dev-libs/libbpf has synced keywords

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

 sys-apps/iproute2/Manifest                         |   1 +
 .../files/iproute2-5.11.0-configure-nomagic.patch  | 235 +++++++++++++++++++++
 sys-apps/iproute2/iproute2-5.11.0.ebuild           | 170 +++++++++++++++
 sys-apps/iproute2/metadata.xml                     |   2 +
 4 files changed, 408 insertions(+)

diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest
index e8d4aadc7e0..f91943551f4 100644
--- a/sys-apps/iproute2/Manifest
+++ b/sys-apps/iproute2/Manifest
@@ -1,2 +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.7.0.tar.xz 764436 BLAKE2B 842229730139f8931c4ff3d548fe56c7c86b6bb7be5cc1a7dd896ddce34c039467fb90d0c258cdc91276edc59b9b19f53c39a36c79b54b15a78436b44c595eed SHA512 d5ef68e0eb8e84fbff68c2e7dd4097b9ceb438c928d17ede4130876802dfeafe8bf08d82b4fd39005314e0679c0b261aaa3d6a0a2ff364074a43a043a855a634

diff --git a/sys-apps/iproute2/files/iproute2-5.11.0-configure-nomagic.patch b/sys-apps/iproute2/files/iproute2-5.11.0-configure-nomagic.patch
new file mode 100644
index 00000000000..8ccd02a10e2
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-5.11.0-configure-nomagic.patch
@@ -0,0 +1,235 @@
+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>
+
+--- iproute2-5.11.0/bridge/Makefile
++++ iproute2-5.11.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.11.0/config.include
++++ iproute2-5.11.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.11.0/configure
++++ iproute2-5.11.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.11.0/dcb/Makefile
++++ iproute2-5.11.0/dcb/Makefile
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0
+ include ../config.mk
++include ../config.include
+ 
+ TARGETS :=
+ 
+--- iproute2-5.11.0/devlink/Makefile
++++ iproute2-5.11.0/devlink/Makefile
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0
+ include ../config.mk
++include ../config.include
+ 
+ TARGETS :=
+ 
+--- iproute2-5.11.0/genl/Makefile
++++ iproute2-5.11.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.11.0/ip/Makefile
++++ iproute2-5.11.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.11.0/lib/Makefile
++++ iproute2-5.11.0/lib/Makefile
+@@ -1,5 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0
+ include ../config.mk
++include ../config.include
+ 
+ CFLAGS += -fPIC
+ 
+--- iproute2-5.11.0/misc/Makefile
++++ iproute2-5.11.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.11.0/netem/Makefile
++++ iproute2-5.11.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.11.0/rdma/Makefile
++++ iproute2-5.11.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.11.0/tc/Makefile
++++ iproute2-5.11.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.11.0/tipc/Makefile
++++ iproute2-5.11.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.11.0.ebuild b/sys-apps/iproute2/iproute2-5.11.0.ebuild
new file mode 100644
index 00000000000..20fb9338058
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-5.11.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.11.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
+		elog "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
+}

diff --git a/sys-apps/iproute2/metadata.xml b/sys-apps/iproute2/metadata.xml
index 66ef219fafa..fe67c6bd882 100644
--- a/sys-apps/iproute2/metadata.xml
+++ b/sys-apps/iproute2/metadata.xml
@@ -7,8 +7,10 @@
 </maintainer>
 <use>
 	<flag name="berkdb">build programs that use berkdb (just arpd)</flag>
+	<flag name="bpf">Use <pkg>dev-libs/libbpf</pkg></flag>
 	<flag name="elf">support loading eBPF programs from ELFs (e.g. LLVM's eBPF backend)</flag>
 	<flag name="iptables">include support for iptables filtering</flag>
+	<flag name="libbsd">Use <pkg>dev-libs/libbsd</pkg> instead of internal funcs</flag>
 	<flag name="minimal">only install ip and tc programs, without eBPF support</flag>
 </use>
 <upstream>


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

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

commit:     405e55107265eada57895caab0c39d0b17b5a270
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 13 08:08:00 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jan 13 08:10:17 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=405e5510

sys-apps/iproute2: fix build on musl

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

 ...route2-5.16.0-fix-ax25.h-include-for-musl.patch | 23 ++++++++++++++++++++++
 sys-apps/iproute2/iproute2-5.16.0.ebuild           |  1 +
 2 files changed, 24 insertions(+)

diff --git a/sys-apps/iproute2/files/iproute2-5.16.0-fix-ax25.h-include-for-musl.patch b/sys-apps/iproute2/files/iproute2-5.16.0-fix-ax25.h-include-for-musl.patch
new file mode 100644
index 000000000000..8644a93ba115
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-5.16.0-fix-ax25.h-include-for-musl.patch
@@ -0,0 +1,23 @@
+From: Sam James <sam@gentoo.org>
+Date: Thu, 13 Jan 2022 08:05:33 +0000
+Subject: [PATCH] Fix ax25.h include for musl
+
+ax25.h isn't guaranteed to be avilable in netax25/*;
+it's dependent on our choice of libc (it's not available
+on musl at least) [0].
+
+Let's use the version from linux-headers.
+
+[0] https://sourceware.org/glibc/wiki/Synchronizing_Headers
+Bug: https://bugs.gentoo.org/831102
+--- a/lib/ax25_ntop.c
++++ b/lib/ax25_ntop.c
+@@ -2,7 +2,7 @@
+ 
+ #include <errno.h>
+ #include <sys/socket.h>
+-#include <netax25/ax25.h>
++#include <linux/ax25.h>
+ 
+ #include "utils.h"
+ 

diff --git a/sys-apps/iproute2/iproute2-5.16.0.ebuild b/sys-apps/iproute2/iproute2-5.16.0.ebuild
index c26a054ac839..a86a737045cb 100644
--- a/sys-apps/iproute2/iproute2-5.16.0.ebuild
+++ b/sys-apps/iproute2/iproute2-5.16.0.ebuild
@@ -50,6 +50,7 @@ PATCHES=(
 	"${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}-5.16.0-fix-ax25.h-include-for-musl.patch
 )
 
 doecho() {


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

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

commit:     a92a9f6ab23a9b1eee9b8486a71455c1907c7e92
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 10 08:07:19 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Aug 10 08:07:29 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a92a9f6a

sys-apps/iproute2: fix musl build

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

 sys-apps/iproute2/files/iproute2-5.19.0-musl.patch | 48 ++++++++++++++++++++++
 sys-apps/iproute2/iproute2-5.19.0.ebuild           |  1 +
 2 files changed, 49 insertions(+)

diff --git a/sys-apps/iproute2/files/iproute2-5.19.0-musl.patch b/sys-apps/iproute2/files/iproute2-5.19.0-musl.patch
new file mode 100644
index 000000000000..e907ba9454bf
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-5.19.0-musl.patch
@@ -0,0 +1,48 @@
+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/iproute2-5.19.0.ebuild b/sys-apps/iproute2/iproute2-5.19.0.ebuild
index b3c0b0e984dc..0ad41a520dc0 100644
--- a/sys-apps/iproute2/iproute2-5.19.0.ebuild
+++ b/sys-apps/iproute2/iproute2-5.19.0.ebuild
@@ -51,6 +51,7 @@ PATCHES=(
 	"${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
 )
 
 src_prepare() {


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

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

commit:     536cf403364a92aa6dbfb443da92ce5fe2e71277
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 12 19:24:13 2022 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Fri Aug 12 19:24:13 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=536cf403

sys-apps/iproute2: Revbump, enable colour by default (bug #820236)

Also add patch to 9999 ebuild.

Closes: https://bugs.gentoo.org/820236
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 sys-apps/iproute2/files/iproute2-default-color-auto.patch          | 7 +++++++
 .../iproute2/{iproute2-5.19.0.ebuild => iproute2-5.19.0-r1.ebuild} | 1 +
 sys-apps/iproute2/iproute2-9999.ebuild                             | 1 +
 3 files changed, 9 insertions(+)

diff --git a/sys-apps/iproute2/files/iproute2-default-color-auto.patch b/sys-apps/iproute2/files/iproute2-default-color-auto.patch
new file mode 100644
index 000000000000..eb017ecd61c8
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-default-color-auto.patch
@@ -0,0 +1,7 @@
+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.19.0.ebuild b/sys-apps/iproute2/iproute2-5.19.0-r1.ebuild
similarity index 99%
rename from sys-apps/iproute2/iproute2-5.19.0.ebuild
rename to sys-apps/iproute2/iproute2-5.19.0-r1.ebuild
index 0ad41a520dc0..2ff11fd9105b 100644
--- a/sys-apps/iproute2/iproute2-5.19.0.ebuild
+++ b/sys-apps/iproute2/iproute2-5.19.0-r1.ebuild
@@ -52,6 +52,7 @@ PATCHES=(
 	#"${FILESDIR}"/${PN}-5.1.0-portability.patch
 	"${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
 	"${FILESDIR}"/${P}-musl.patch
+	"${FILESDIR}"/${PN}-default-color-auto.patch
 )
 
 src_prepare() {

diff --git a/sys-apps/iproute2/iproute2-9999.ebuild b/sys-apps/iproute2/iproute2-9999.ebuild
index b3c0b0e984dc..8aaa6cc859d8 100644
--- a/sys-apps/iproute2/iproute2-9999.ebuild
+++ b/sys-apps/iproute2/iproute2-9999.ebuild
@@ -51,6 +51,7 @@ PATCHES=(
 	"${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() {


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

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

commit:     7be86a097533f3ec489851a31aa6cb749afca66f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 13 13:53:24 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Aug 13 13:53:24 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7be86a09

sys-apps/iproute2: backport setns check fix

Could have led to a build w/o setns support.

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

 .../files/iproute2-5.19.0-setns-check.patch        | 22 ++++++++++++++++++++++
 ...-5.19.0-r1.ebuild => iproute2-5.19.0-r2.ebuild} |  1 +
 2 files changed, 23 insertions(+)

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
new file mode 100644
index 000000000000..ff97d12195e2
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-5.19.0-setns-check.patch
@@ -0,0 +1,22 @@
+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.19.0-r1.ebuild b/sys-apps/iproute2/iproute2-5.19.0-r2.ebuild
similarity index 99%
rename from sys-apps/iproute2/iproute2-5.19.0-r1.ebuild
rename to sys-apps/iproute2/iproute2-5.19.0-r2.ebuild
index 2ff11fd9105b..f0a6ca796fa7 100644
--- a/sys-apps/iproute2/iproute2-5.19.0-r1.ebuild
+++ b/sys-apps/iproute2/iproute2-5.19.0-r2.ebuild
@@ -52,6 +52,7 @@ PATCHES=(
 	#"${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
 )
 


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

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

commit:     32765ef2ededce753ce94fe8568e4254a4cacdfd
Author:     Violet Purcell <vimproved <AT> inventati <DOT> org>
AuthorDate: Tue Jun 27 19:07:30 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jun 27 19:53:53 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32765ef2

sys-apps/iproute2: Add missing limits.h include to bridge/mdb.c

Fixes build on musl.

Signed-off-by: Violet Purcell <vimproved <AT> inventati.org>
Closes: https://github.com/gentoo/gentoo/pull/31646
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...route2-6.4.0-add-missing-limits.h-include.patch | 22 ++++++++++++++++++++++
 sys-apps/iproute2/iproute2-6.4.0.ebuild            |  1 +
 2 files changed, 23 insertions(+)

diff --git a/sys-apps/iproute2/files/iproute2-6.4.0-add-missing-limits.h-include.patch b/sys-apps/iproute2/files/iproute2-6.4.0-add-missing-limits.h-include.patch
new file mode 100644
index 000000000000..63d1397d8d3b
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-6.4.0-add-missing-limits.h-include.patch
@@ -0,0 +1,22 @@
+From https://github.com/shemminger/iproute2/pull/69/commits/030013c4b9ba032869f72b766e28eaf8c8099f36 Mon Sep 17 00:00:00 2001
+From: Violet Purcell <vimproved@inventati.org>
+Date: Tue, 27 Jun 2023 18:58:05 +0000
+Subject: [PATCH] bridge: mdb: add missing limits.h include
+
+Adding limits.h include for USHRT_MAX and ULONG_MAX. Don't rely on it
+being transitively include (as it is not on musl).
+
+Signed-off-by: Violet Purcell <vimproved@inventati.org>
+--- a/bridge/mdb.c
++++ b/bridge/mdb.c
+@@ -15,6 +15,7 @@
+ #include <string.h>
+ #include <arpa/inet.h>
+ #include <netdb.h>
++#include <limits.h>
+ 
+ #include "libnetlink.h"
+ #include "utils.h"
+-- 
+2.41.0
+

diff --git a/sys-apps/iproute2/iproute2-6.4.0.ebuild b/sys-apps/iproute2/iproute2-6.4.0.ebuild
index 5281e47ca76a..1a167417ca7d 100644
--- a/sys-apps/iproute2/iproute2-6.4.0.ebuild
+++ b/sys-apps/iproute2/iproute2-6.4.0.ebuild
@@ -52,6 +52,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-3.1.0-mtu.patch # bug #291907
 	"${FILESDIR}"/${PN}-5.12.0-configure-nomagic.patch # bug #643722
 	"${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
+	"${FILESDIR}"/${PN}-6.4.0-add-missing-limits.h-include.patch
 )
 
 src_prepare() {


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

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

commit:     c3c6d4e7b793d066a31e52d536aaa02dc370f2d4
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 16 10:23:29 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Sep 16 10:23:29 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3c6d4e7

sys-apps/iproute2: rebase patches

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

 ...iproute2-6.5.0-configure-nomagic-nolibbsd.patch | 246 +++++++++++++++++++++
 sys-apps/iproute2/files/iproute2-6.5.0-mtu.patch   |  50 +++++
 sys-apps/iproute2/iproute2-6.5.0.ebuild            |   4 +-
 3 files changed, 298 insertions(+), 2 deletions(-)

diff --git a/sys-apps/iproute2/files/iproute2-6.5.0-configure-nomagic-nolibbsd.patch b/sys-apps/iproute2/files/iproute2-6.5.0-configure-nomagic-nolibbsd.patch
new file mode 100644
index 000000000000..4618fb9c94ef
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-6.5.0-configure-nomagic-nolibbsd.patch
@@ -0,0 +1,246 @@
+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
+@@ -202,7 +202,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
+@@ -269,8 +269,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
+@@ -388,8 +388,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_CFLAGS += -DHAVE_SELINUX' `${PKG_CONFIG} --cflags libselinux` >>$CONFIG
++		echo 'HAVE_SELINUX_LDLIBS +=' `${PKG_CONFIG} --libs libselinux` >>$CONFIG
+ 	else
+ 		echo "no"
+ 	fi
+@@ -414,8 +414,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
+@@ -455,8 +455,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
+@@ -472,8 +472,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
+@@ -633,7 +633,3 @@ check_strlcpy
+ 
+ echo -n "libcap support: "
+ check_cap
+-
+-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
+-- 
+2.42.0
+

diff --git a/sys-apps/iproute2/files/iproute2-6.5.0-mtu.patch b/sys-apps/iproute2/files/iproute2-6.5.0-mtu.patch
new file mode 100644
index 000000000000..f2895021eb1b
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-6.5.0-mtu.patch
@@ -0,0 +1,50 @@
+http://bugs.gentoo.org/291907
+
+This patch was merged from two patches extracted from this thread:
+http://markmail.org/thread/qkd76gpdgefpjlfn
+
+tc_stab.c: small fixes to commandline help
+
+
+tc_core.c:
+As kernel part of things relies on cell align which is always set to -1,
+I also added it to userspace computation stage. This way if someone
+specified e.g. 2048 and 512 for mtu and tsize respectively, one wouldn't
+end with tsize supporting mtu 4096 suddenly, New default mtu is also set
+to 2048 (disregarding weirdness of setting mtu to such values).
+
+
+Unless I missed something, this is harmless and feels cleaner, but if it's
+not allowed, documentation will have to be changed back to 2047 + extra
+explanation as well.
+--- a/tc/tc_core.c
++++ b/tc/tc_core.c
+@@ -197,12 +197,12 @@ int tc_calc_size_table(struct tc_sizespec *s, __u16 **stab)
+ 	}
+ 
+ 	if (s->mtu == 0)
+-		s->mtu = 2047;
++		s->mtu = 2048;
+ 	if (s->tsize == 0)
+ 		s->tsize = 512;
+ 
+ 	s->cell_log = 0;
+-	while ((s->mtu >> s->cell_log) > s->tsize - 1)
++	while ((s->mtu - 1 >> s->cell_log) > s->tsize - 1)
+ 		s->cell_log++;
+ 
+ 	*stab = malloc(s->tsize * sizeof(__u16));
+--- a/tc/tc_stab.c
++++ b/tc/tc_stab.c
+@@ -27,7 +27,7 @@ static void stab_help(void)
+ 	fprintf(stderr,
+ 		"Usage: ... stab [ mtu BYTES ] [ tsize SLOTS ] [ mpu BYTES ]\n"
+ 		"                [ overhead BYTES ] [ linklayer TYPE ] ...\n"
+-		"   mtu       : max packet size we create rate map for {2047}\n"
++		"   mtu       : max packet size we create size table for {2048}\n"
+ 		"   tsize     : how many slots should size table have {512}\n"
+ 		"   mpu       : minimum packet size used in rate computations\n"
+ 		"   overhead  : per-packet size overhead used in rate computations\n"
+-- 
+2.42.0
+

diff --git a/sys-apps/iproute2/iproute2-6.5.0.ebuild b/sys-apps/iproute2/iproute2-6.5.0.ebuild
index aa192060459e..92b9a7188d80 100644
--- a/sys-apps/iproute2/iproute2-6.5.0.ebuild
+++ b/sys-apps/iproute2/iproute2-6.5.0.ebuild
@@ -48,8 +48,8 @@ BDEPEND="
 "
 
 PATCHES=(
-	"${FILESDIR}"/${PN}-3.1.0-mtu.patch # bug #291907
-	"${FILESDIR}"/${PN}-5.12.0-configure-nomagic-nolibbsd.patch # bug #643722 & #911727
+	"${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
 )


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

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

commit:     68de100047e59fb73d796848ef4c4735958a1651
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  2 02:51:24 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Dec  2 03:28:16 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68de1000

sys-apps/iproute2: add strlcpy modern C configure patch

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

 ...Add-_GNU_SOURCE-to-strlcpy-configure-test.patch |  25 +++
 sys-apps/iproute2/iproute2-6.6.0-r1.ebuild         | 215 +++++++++++++++++++++
 2 files changed, 240 insertions(+)

diff --git a/sys-apps/iproute2/files/iproute2-6.6.0-configure-Add-_GNU_SOURCE-to-strlcpy-configure-test.patch b/sys-apps/iproute2/files/iproute2-6.6.0-configure-Add-_GNU_SOURCE-to-strlcpy-configure-test.patch
new file mode 100644
index 000000000000..0969ff0a7ab9
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-6.6.0-configure-Add-_GNU_SOURCE-to-strlcpy-configure-test.patch
@@ -0,0 +1,25 @@
+https://lore.kernel.org/netdev/20231202024705.1375296-1-sam@gentoo.org/T/#u
+
+From 3dc0bf34c1571429c08a8d0c08a69502e3e4575c Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sat, 2 Dec 2023 02:46:05 +0000
+Subject: [PATCH] configure: Add _GNU_SOURCE to strlcpy configure test
+
+>=glibc-2.38 adds strlcpy but it's guarded under a feature-test macro. Just
+add _GNU_SOURCE to the configure test because we already pass _GNU_SOURCE unconditionally
+in the Makefiles when building iproute2.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/configure
++++ b/configure
+@@ -445,6 +445,7 @@ EOF
+ check_strlcpy()
+ {
+     cat >$TMPDIR/strtest.c <<EOF
++#define _GNU_SOURCE
+ #include <string.h>
+ int main(int argc, char **argv) {
+ 	char dst[10];
+-- 
+2.43.0
+

diff --git a/sys-apps/iproute2/iproute2-6.6.0-r1.ebuild b/sys-apps/iproute2/iproute2-6.6.0-r1.ebuild
new file mode 100644
index 000000000000..e097dc28345f
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-6.6.0-r1.ebuild
@@ -0,0 +1,215 @@
+# 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
+)
+
+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] 21+ messages in thread

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

commit:     e3c47497d87f81047266c2eb95057ab8c57f7685
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 28 02:14:00 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 28 02:14:07 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3c47497

sys-apps/iproute2: drop 6.4.0, 6.4.0-r1, 6.5.0

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

 sys-apps/iproute2/Manifest                         |   2 -
 sys-apps/iproute2/files/iproute2-3.1.0-mtu.patch   |  48 ----
 ...proute2-5.12.0-configure-nomagic-nolibbsd.patch | 242 --------------------
 .../files/iproute2-5.12.0-configure-nomagic.patch  | 245 ---------------------
 ...route2-6.4.0-add-missing-limits.h-include.patch |  22 --
 sys-apps/iproute2/iproute2-6.4.0-r1.ebuild         | 215 ------------------
 sys-apps/iproute2/iproute2-6.4.0.ebuild            | 220 ------------------
 sys-apps/iproute2/iproute2-6.5.0.ebuild            | 214 ------------------
 sys-apps/iproute2/metadata.xml                     |   1 -
 9 files changed, 1209 deletions(-)

diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest
index 3f38b2833dde..2b69febe4c67 100644
--- a/sys-apps/iproute2/Manifest
+++ b/sys-apps/iproute2/Manifest
@@ -1,3 +1 @@
-DIST iproute2-6.4.0.tar.xz 922164 BLAKE2B 76369d2a794afd13dba1a34ee9a7425775bb7b43c22164274749c01b18d061669aa5abd51d32a15d68f48e75f4837a887dfc28ea41e34d8e4c36b2ab865628dd SHA512 42330be6e061302694ea301765ff8d3cbfaeca4b1d06e39778861e4390ed211c03cb2d41498190202b659f7f5647b1ca4857410ef8c16fd601a35e7162788d21
-DIST iproute2-6.5.0.tar.xz 925940 BLAKE2B 537a956c2fb59df25e90d7899a981e5408c5ee029df2bb87461b899ecf8fe4424a1db5d1b1b67a67bdb2555f6cc4aaf099b0544a2c92ffc3843adc3d17defb96 SHA512 615ba6924becdf08af3f491d347d84897ff0198426d65b194c87146c4527b0856fc51688b59834abe1cb6f9a70b93c66ff7ade6b7c305c1ece0fd6a29df6bc54
 DIST iproute2-6.6.0.tar.xz 917964 BLAKE2B 9d20f19c04c2bbde7a3ae53e61e4623b119570c8446f34b93ddadd64677caa432e00ee085498bc277e0842cc2124340c7100925106d0ef2c11dd8002aacac08f SHA512 21c99a3ba8e1d0047933e99b48fb00901eef18899cd5854000ae910d9d84d13aeafa48b32184775531285782909f4d283d0784491691a1f10462dab147de359d

diff --git a/sys-apps/iproute2/files/iproute2-3.1.0-mtu.patch b/sys-apps/iproute2/files/iproute2-3.1.0-mtu.patch
deleted file mode 100644
index fa12dad2d79e..000000000000
--- a/sys-apps/iproute2/files/iproute2-3.1.0-mtu.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-http://bugs.gentoo.org/291907
-
-This patch was merged from two patches extracted from this thread:
-http://markmail.org/thread/qkd76gpdgefpjlfn
-
-tc_stab.c: small fixes to commandline help
-
-
-tc_core.c:
-As kernel part of things relies on cell align which is always set to -1,
-I also added it to userspace computation stage. This way if someone
-specified e.g. 2048 and 512 for mtu and tsize respectively, one wouldn't
-end with tsize supporting mtu 4096 suddenly, New default mtu is also set
-to 2048 (disregarding weirdness of setting mtu to such values).
-
-
-Unless I missed something, this is harmless and feels cleaner, but if it's
-not allowed, documentation will have to be changed back to 2047 + extra
-explanation as well.
-
---- iproute2/tc/tc_core.c
-+++ iproute2/tc/tc_core.c
-@@ -155,12 +155,12 @@
- 	}
- 
- 	if (s->mtu == 0)
--		s->mtu = 2047;
-+		s->mtu = 2048;
- 	if (s->tsize == 0)
- 		s->tsize = 512;
- 
- 	s->cell_log = 0;
--	while ((s->mtu >> s->cell_log) > s->tsize - 1)
-+	while ((s->mtu - 1 >> s->cell_log) > s->tsize - 1)
- 		s->cell_log++;
- 
- 	*stab = malloc(s->tsize * sizeof(__u16));
---- iproute2/tc/tc_stab.c
-+++ iproute2/tc/tc_stab.c
-@@ -32,7 +32,7 @@
- 	fprintf(stderr,
- 		"Usage: ... stab [ mtu BYTES ] [ tsize SLOTS ] [ mpu BYTES ] \n"
- 		"                [ overhead BYTES ] [ linklayer TYPE ] ...\n"
--		"   mtu       : max packet size we create rate map for {2047}\n"
-+		"   mtu       : max packet size we create size table for {2048}\n"
- 		"   tsize     : how many slots should size table have {512}\n"
- 		"   mpu       : minimum packet size used in rate computations\n"
- 		"   overhead  : per-packet size overhead used in rate computations\n"

diff --git a/sys-apps/iproute2/files/iproute2-5.12.0-configure-nomagic-nolibbsd.patch b/sys-apps/iproute2/files/iproute2-5.12.0-configure-nomagic-nolibbsd.patch
deleted file mode 100644
index 4f88da3c20c5..000000000000
--- a/sys-apps/iproute2/files/iproute2-5.12.0-configure-nomagic-nolibbsd.patch
+++ /dev/null
@@ -1,242 +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 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>
-
---- 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,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-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/files/iproute2-5.12.0-configure-nomagic.patch b/sys-apps/iproute2/files/iproute2-5.12.0-configure-nomagic.patch
deleted file mode 100644
index 7dbb3a6dcb1f..000000000000
--- a/sys-apps/iproute2/files/iproute2-5.12.0-configure-nomagic.patch
+++ /dev/null
@@ -1,245 +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 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/files/iproute2-6.4.0-add-missing-limits.h-include.patch b/sys-apps/iproute2/files/iproute2-6.4.0-add-missing-limits.h-include.patch
deleted file mode 100644
index 63d1397d8d3b..000000000000
--- a/sys-apps/iproute2/files/iproute2-6.4.0-add-missing-limits.h-include.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From https://github.com/shemminger/iproute2/pull/69/commits/030013c4b9ba032869f72b766e28eaf8c8099f36 Mon Sep 17 00:00:00 2001
-From: Violet Purcell <vimproved@inventati.org>
-Date: Tue, 27 Jun 2023 18:58:05 +0000
-Subject: [PATCH] bridge: mdb: add missing limits.h include
-
-Adding limits.h include for USHRT_MAX and ULONG_MAX. Don't rely on it
-being transitively include (as it is not on musl).
-
-Signed-off-by: Violet Purcell <vimproved@inventati.org>
---- a/bridge/mdb.c
-+++ b/bridge/mdb.c
-@@ -15,6 +15,7 @@
- #include <string.h>
- #include <arpa/inet.h>
- #include <netdb.h>
-+#include <limits.h>
- 
- #include "libnetlink.h"
- #include "utils.h"
--- 
-2.41.0
-

diff --git a/sys-apps/iproute2/iproute2-6.4.0-r1.ebuild b/sys-apps/iproute2/iproute2-6.4.0-r1.ebuild
deleted file mode 100644
index f03d49fa174a..000000000000
--- a/sys-apps/iproute2/iproute2-6.4.0-r1.ebuild
+++ /dev/null
@@ -1,215 +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-add-missing-limits.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.4.0.ebuild b/sys-apps/iproute2/iproute2-6.4.0.ebuild
deleted file mode 100644
index d897c4a4d038..000000000000
--- a/sys-apps/iproute2/iproute2-6.4.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.7.0-mix-signal.h-include.patch
-	"${FILESDIR}"/${PN}-6.4.0-add-missing-limits.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.5.0.ebuild b/sys-apps/iproute2/iproute2-6.5.0.ebuild
deleted file mode 100644
index eaa31b09ac5a..000000000000
--- a/sys-apps/iproute2/iproute2-6.5.0.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}-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
-)
-
-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
-}

diff --git a/sys-apps/iproute2/metadata.xml b/sys-apps/iproute2/metadata.xml
index f4d408562814..640c98301205 100644
--- a/sys-apps/iproute2/metadata.xml
+++ b/sys-apps/iproute2/metadata.xml
@@ -10,7 +10,6 @@
 		<flag name="bpf">Use <pkg>dev-libs/libbpf</pkg></flag>
 		<flag name="elf">support loading eBPF programs from ELFs (e.g. LLVM's eBPF backend)</flag>
 		<flag name="iptables">include support for iptables filtering</flag>
-		<flag name="libbsd">Use <pkg>dev-libs/libbsd</pkg> instead of internal funcs</flag>
 		<flag name="minimal">only install ip and tc programs, without eBPF support</flag>
 		<flag name="nfs">Support RPC lookups via <pkg>net-libs/libtirpc</pkg> in ss</flag>
 	</use>


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

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

commit:     98a56c6f56e4d687a04807cf0ab190d21f822ec8
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Mon May 13 17:35:22 2024 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Mon May 13 17:35:38 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98a56c6f

sys-apps/iproute2: add 6.9.0

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

 sys-apps/iproute2/Manifest                       |   1 +
 sys-apps/iproute2/files/iproute2-6.9.0-mtu.patch |  32 ++++
 sys-apps/iproute2/iproute2-6.9.0.ebuild          | 212 +++++++++++++++++++++++
 3 files changed, 245 insertions(+)

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

diff --git a/sys-apps/iproute2/files/iproute2-6.9.0-mtu.patch b/sys-apps/iproute2/files/iproute2-6.9.0-mtu.patch
new file mode 100644
index 000000000000..0e80ea122e06
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-6.9.0-mtu.patch
@@ -0,0 +1,32 @@
+diff --git a/tc/tc_core.c b/tc/tc_core.c
+index 37547e9b..58234c9f 100644
+--- a/tc/tc_core.c
++++ b/tc/tc_core.c
+@@ -188,12 +188,12 @@ int tc_calc_size_table(struct tc_sizespec *s, __u16 **stab)
+ 	}
+ 
+ 	if (s->mtu == 0)
+-		s->mtu = 2047;
++		s->mtu = 2048;
+ 	if (s->tsize == 0)
+ 		s->tsize = 512;
+ 
+ 	s->cell_log = 0;
+-	while ((s->mtu >> s->cell_log) > s->tsize - 1)
++	while (((s->mtu - 1) >> s->cell_log) > s->tsize - 1)
+ 		s->cell_log++;
+ 
+ 	*stab = malloc(s->tsize * sizeof(__u16));
+diff --git a/tc/tc_stab.c b/tc/tc_stab.c
+index a7733726..f4ffd618 100644
+--- a/tc/tc_stab.c
++++ b/tc/tc_stab.c
+@@ -27,7 +27,7 @@ static void stab_help(void)
+ 	fprintf(stderr,
+ 		"Usage: ... stab [ mtu BYTES ] [ tsize SLOTS ] [ mpu BYTES ]\n"
+ 		"                [ overhead BYTES ] [ linklayer TYPE ] ...\n"
+-		"   mtu       : max packet size we create rate map for {2047}\n"
++		"   mtu       : max packet size we create size table for {2048}\n"
+ 		"   tsize     : how many slots should size table have {512}\n"
+ 		"   mpu       : minimum packet size used in rate computations\n"
+ 		"   overhead  : per-packet size overhead used in rate computations\n"

diff --git a/sys-apps/iproute2/iproute2-6.9.0.ebuild b/sys-apps/iproute2/iproute2-6.9.0.ebuild
new file mode 100644
index 000000000000..3d0c9ec799da
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-6.9.0.ebuild
@@ -0,0 +1,212 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo toolchain-funcs flag-o-matic
+
+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"
+# 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.9.0-mtu.patch # bug #291907
+	"${FILESDIR}"/${PN}-6.8.0-configure-nomagic-nolibbsd.patch # bug #643722 & #911727
+	"${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
+
+	# build system does not pass CFLAGS to LDFLAGS, as is recommended by GCC upstream
+	# https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-flto
+	# https://bugs.gentoo.org/929233
+	append-ldflags ${CFLAGS}
+
+	# 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
+	mv "${ED}"/{s,}bin/ss || die # bug #547264
+
+	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 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] 21+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/, sys-apps/iproute2/files/
@ 2024-08-04 16:17 Andreas K. Hüttel
  0 siblings, 0 replies; 21+ messages in thread
From: Andreas K. Hüttel @ 2024-08-04 16:17 UTC (permalink / raw
  To: gentoo-commits

commit:     0564906652c69469deab2b7814bb4736d7be5881
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Aug  4 16:16:13 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Aug  4 16:17:21 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05649066

sys-apps/iproute2: fix build on musl

Closes: https://bugs.gentoo.org/936234
Closes: https://bugs.gentoo.org/926341
Closes: https://github.com/gentoo/gentoo/pull/37658
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 .../iproute2/files/iproute2-6.10.0-musl-1.patch    | 41 +++++++++++++++++++++
 .../iproute2/files/iproute2-6.10.0-musl-2.patch    | 43 ++++++++++++++++++++++
 sys-apps/iproute2/iproute2-6.10.0.ebuild           |  2 +
 3 files changed, 86 insertions(+)

diff --git a/sys-apps/iproute2/files/iproute2-6.10.0-musl-1.patch b/sys-apps/iproute2/files/iproute2-6.10.0-musl-1.patch
new file mode 100644
index 000000000000..c1b7788debdc
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-6.10.0-musl-1.patch
@@ -0,0 +1,41 @@
+From fbbe03cbc4fa8c801967aac2e2c444e93b2ca96a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= <dilfridge@gentoo.org>
+Date: Sun, 4 Aug 2024 16:22:07 +0200
+Subject: [PATCH 1/2] libnetlink.h: Include <endian.h> explicitly for musl
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The code added in "f_flower: implement pfcp opts" uses h2be64,
+defined in endian.h. While this is pulled in around some corners
+for glibc (see below), that's not the case for musl and an
+explicit include is required there.
+
+. /usr/include/libmnl/libmnl.h
+.. /usr/include/sys/socket.h
+... /usr/include/bits/socket.h
+.... /usr/include/sys/types.h
+..... /usr/include/endian.h
+
+Fixes: 976dca372 ("f_flower: implement pfcp opts")
+Bug: https://bugs.gentoo.org/936234
+Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
+---
+ include/libnetlink.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/include/libnetlink.h b/include/libnetlink.h
+index 30f0c2d2..7074e913 100644
+--- a/include/libnetlink.h
++++ b/include/libnetlink.h
+@@ -4,6 +4,7 @@
+ 
+ #include <stdio.h>
+ #include <string.h>
++#include <endian.h>
+ #include <asm/types.h>
+ #include <linux/netlink.h>
+ #include <linux/rtnetlink.h>
+-- 
+2.44.2
+

diff --git a/sys-apps/iproute2/files/iproute2-6.10.0-musl-2.patch b/sys-apps/iproute2/files/iproute2-6.10.0-musl-2.patch
new file mode 100644
index 000000000000..11764be0964d
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-6.10.0-musl-2.patch
@@ -0,0 +1,43 @@
+From 40a430cf13876120416d82d581745033d273576c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= <dilfridge@gentoo.org>
+Date: Sun, 4 Aug 2024 17:47:35 +0200
+Subject: [PATCH 2/2] rdma.c: Add <libgen.h> include for basename on musl
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This include file is required on musl for availability of basename.
+
+Note that for glibc adding the include can have the side effect of
+switching from the GNU implementation of basename (which does not touch
+its argument) to the POSIX implementation (which under certain
+circumstances modifies the string passed to it, e.g. removing trailing
+slashes).
+
+This is safe however since the C99 and C11 standard says:
+> The parameters argc and argv and the strings pointed to by the argv
+> array shall be modifiable by the program, and retain their last-stored
+> values between program startup and program termination.
+(multiple google results, unfortunately no official reference link)
+
+Bug: https://bugs.gentoo.org/926341
+Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
+---
+ rdma/rdma.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/rdma/rdma.c b/rdma/rdma.c
+index 131c6b2a..f835bf3f 100644
+--- a/rdma/rdma.c
++++ b/rdma/rdma.c
+@@ -4,6 +4,7 @@
+  * Authors:     Leon Romanovsky <leonro@mellanox.com>
+  */
+ 
++#include <libgen.h>
+ #include "rdma.h"
+ #include "version.h"
+ #include "color.h"
+-- 
+2.44.2
+

diff --git a/sys-apps/iproute2/iproute2-6.10.0.ebuild b/sys-apps/iproute2/iproute2-6.10.0.ebuild
index 3d0c9ec799da..0b232fbeecbb 100644
--- a/sys-apps/iproute2/iproute2-6.10.0.ebuild
+++ b/sys-apps/iproute2/iproute2-6.10.0.ebuild
@@ -48,6 +48,8 @@ BDEPEND="
 "
 
 PATCHES=(
+	"${FILESDIR}"/${PN}-6.10.0-musl-1.patch # bug #936234
+	"${FILESDIR}"/${PN}-6.10.0-musl-2.patch # bug #926341
 	"${FILESDIR}"/${PN}-6.9.0-mtu.patch # bug #291907
 	"${FILESDIR}"/${PN}-6.8.0-configure-nomagic-nolibbsd.patch # bug #643722 & #911727
 	"${FILESDIR}"/${PN}-6.8.0-disable-libbsd-fallback.patch # bug #911727


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

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

commit:     c30544fbe5db966812c5309dd083b5367006475d
Author:     Ian Jordan <immoloism <AT> gmail <DOT> com>
AuthorDate: Sat Sep 21 04:51:19 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Sep 24 06:04:46 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c30544fb

sys-apps/iproute2: musl fixes

Cherry picking Holger's patch to prevent releng from having musl stage fails
until this is upstreamed on any arch that is ~ARCH only.

Closes: https://bugs.gentoo.org/939811
Co-authored-by: Holger Hoffstätte <holger <AT> applied-asynchrony.com>
Signed-off-by: Ian Jordan <immoloism <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/iproute2-6.11.0-musl-fixes.patch         |  35 ++++
 sys-apps/iproute2/iproute2-6.11.0-r1.ebuild        | 215 +++++++++++++++++++++
 2 files changed, 250 insertions(+)

diff --git a/sys-apps/iproute2/files/iproute2-6.11.0-musl-fixes.patch b/sys-apps/iproute2/files/iproute2-6.11.0-musl-fixes.patch
new file mode 100644
index 000000000000..bc2f6a366e4d
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-6.11.0-musl-fixes.patch
@@ -0,0 +1,35 @@
+From https://bugs.gentoo.org/939811
+From: Holger Hoffstätte <holger@applied-asynchrony.com>
+
+--- a/bridge/mst.c
++++ b/bridge/mst.c
+@@ -4,8 +4,6 @@
+  */
+ 
+ #include <stdio.h>
+-#include <linux/if_bridge.h>
+-#include <net/if.h>
+ 
+ #include "libnetlink.h"
+ #include "json_print.h"
+@@ -13,6 +11,9 @@
+ 
+ #include "br_common.h"
+ 
++#include <linux/if_bridge.h>
++#include <net/if.h>
++
+ #define MST_ID_LEN 9
+ 
+ #define __stringify_1(x...) #x
+--- a/include/json_print.h
++++ b/include/json_print.h
+@@ -11,6 +11,8 @@
+ #include "json_writer.h"
+ #include "color.h"
+ 
++const struct timeval;
++
+ #define _IS_JSON_CONTEXT(type) (is_json_context() && (type & PRINT_JSON || type & PRINT_ANY))
+ #define _IS_FP_CONTEXT(type)   (!is_json_context() && (type & PRINT_FP || type & PRINT_ANY))
+ 

diff --git a/sys-apps/iproute2/iproute2-6.11.0-r1.ebuild b/sys-apps/iproute2/iproute2-6.11.0-r1.ebuild
new file mode 100644
index 000000000000..98f97cdff569
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-6.11.0-r1.ebuild
@@ -0,0 +1,215 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo toolchain-funcs flag-o-matic
+
+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 ~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"
+# 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-0.6:= )
+	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.10.0-musl-1.patch # bug #936234
+	"${FILESDIR}"/${PN}-6.10.0-musl-2.patch # bug #926341
+	"${FILESDIR}"/${PN}-6.9.0-mtu.patch # bug #291907
+	"${FILESDIR}"/${PN}-6.8.0-configure-nomagic-nolibbsd.patch # bug #643722 & #911727
+	"${FILESDIR}"/${PN}-6.8.0-disable-libbsd-fallback.patch # bug #911727
+	"${FILESDIR}"/${PN}-6.11.0-musl-fixes.patch # bug #939811
+)
+
+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
+
+	# build system does not pass CFLAGS to LDFLAGS, as is recommended by GCC upstream
+	# https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-flto
+	# https://bugs.gentoo.org/929233
+	append-ldflags ${CFLAGS}
+
+	# 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
+	mv "${ED}"/{s,}bin/ss || die # bug #547264
+
+	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 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] 21+ messages in thread

end of thread, other threads:[~2024-09-24  6:06 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-10  8:07 [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/, sys-apps/iproute2/files/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2024-09-24  6:06 Sam James
2024-08-04 16:17 Andreas K. Hüttel
2024-05-13 17:35 Patrick McLean
2023-12-28  2:19 Sam James
2023-12-02  4:03 Sam James
2023-09-16 10:25 Sam James
2023-06-27 19:54 Sam James
2022-08-13 13:59 Sam James
2022-08-12 19:25 Patrick McLean
2022-01-13  8:10 Sam James
2021-02-23 14:55 Lars Wendler
2020-08-09  9:38 Lars Wendler
2020-06-15  9:54 David Seifert
2019-09-25 14:01 Thomas Deutschmann
2019-01-08 10:52 Lars Wendler
2018-04-03 10:24 Lars Wendler
2018-01-09 23:41 Mike Frysinger
2017-12-15 11:48 Thomas Deutschmann
2017-05-01 17:29 Lars Wendler
2016-12-18  0:14 Mike Frysinger

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