Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: sys-apps/iproute2/files/, sys-apps/iproute2/
Date: Wed, 31 Oct 2018 23:58:12
Message-Id: 1541030165.d7bfa04a6987622e408d351c126faf78403b3231.blueness@gentoo
1 commit: d7bfa04a6987622e408d351c126faf78403b3231
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 31 23:56:05 2018 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 31 23:56:05 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=d7bfa04a
7
8 sys-apps/iproute2: remove older versions
9
10 Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
11 Package-Manager: Portage-2.3.49, Repoman-2.3.11
12
13 sys-apps/iproute2/Manifest | 2 -
14 sys-apps/iproute2/files/iproute2-4.14.0-musl.patch | 214 -------------------
15 .../files/iproute2-4.14.1-configure-nomagic.patch | 196 -----------------
16 .../files/iproute2-4.14.1-fix-tc-actions.patch | 222 -------------------
17 .../files/iproute2-4.14.1-posix-shell.patch | 65 ------
18 sys-apps/iproute2/files/iproute2-4.15.0-musl.patch | 234 ---------------------
19 .../files/iproute2-4.16.0-keep-family.patch | 25 ---
20 sys-apps/iproute2/iproute2-4.14.1-r2.ebuild | 147 -------------
21 sys-apps/iproute2/iproute2-4.14.1-r4.ebuild | 153 --------------
22 sys-apps/iproute2/iproute2-4.16.0-r1.ebuild | 153 --------------
23 10 files changed, 1411 deletions(-)
24
25 diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest
26 index 8df37a8..0bdf505 100644
27 --- a/sys-apps/iproute2/Manifest
28 +++ b/sys-apps/iproute2/Manifest
29 @@ -1,3 +1 @@
30 -DIST iproute2-4.14.1.tar.xz 636876 BLAKE2B 232dbe29b9af516d8345c86c044359d3b0cfe73fb88a2ba1dcd05534b52dea37c9155d2b273a4a0d40b55fba8b5503a0fbe5bc71f37864c0a2ba9d6f08b6bf41 SHA512 e593b68c46ef5f98bd6911ee7beb38388a14935a29fefabdeccc96aa012593b6f3a49b3bb1baed7d77e54f1f4a857172e058b73407f4070f158b8713f44f5d2c
31 -DIST iproute2-4.16.0.tar.xz 661336 BLAKE2B 4efb08c88a60b1bbbeef807c0731e610032bfb11d022562c1df052d324eb43cb25b9523f49730d22a3f92eb06bd5037c70d8ed0b58276a0cf0854a0f82800b64 SHA512 a8fbc92665a8d4ca6ee1e894bfb27373cf6b16dac9e2ab3831e418fcc9b895acc7d6fc64efa0b0e37b3affd4ef8eacf4dae5715536138d6a05c65ad49a2becad
32 DIST iproute2-4.17.0.tar.xz 675268 BLAKE2B 3d1455c119c9c56b11a64092c152fcea2b161f571006878215425b95deef779fed523368252ce672a1a70251c019edbe6ff2bdac8c3ee8abab1fb29e2a3c669c SHA512 ccd7fb70afd58f1fcd4e17c38a24607207da853c4d6118fda423efa6e51faad3ad03c4d6d58a579c40ef9c68aaf13b1c455e12b0c36e155712d3d4db3c2ff4b5
33
34 diff --git a/sys-apps/iproute2/files/iproute2-4.14.0-musl.patch b/sys-apps/iproute2/files/iproute2-4.14.0-musl.patch
35 deleted file mode 100644
36 index 5efd948..0000000
37 --- a/sys-apps/iproute2/files/iproute2-4.14.0-musl.patch
38 +++ /dev/null
39 @@ -1,214 +0,0 @@
40 ---- iproute2-4.14.0.orig/include/uapi/linux/if_ether.h
41 -+++ iproute2-4.14.0/include/uapi/linux/if_ether.h
42 -@@ -22,6 +22,7 @@
43 - #define _LINUX_IF_ETHER_H
44 -
45 - #include <linux/types.h>
46 -+#include <linux/libc-compat.h>
47 -
48 - /*
49 - * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble
50 -@@ -142,11 +143,13 @@
51 - * This is an Ethernet frame header.
52 - */
53 -
54 -+#if __UAPI_DEF_ETHHDR
55 - struct ethhdr {
56 - unsigned char h_dest[ETH_ALEN]; /* destination eth addr */
57 - unsigned char h_source[ETH_ALEN]; /* source ether addr */
58 - __be16 h_proto; /* packet type ID field */
59 - } __attribute__((packed));
60 -+#endif
61 -
62 -
63 - #endif /* _LINUX_IF_ETHER_H */
64 ---- iproute2-4.14.0.orig/include/uapi/linux/if_tunnel.h
65 -+++ iproute2-4.14.0/include/uapi/linux/if_tunnel.h
66 -@@ -2,7 +2,6 @@
67 - #define _IF_TUNNEL_H_
68 -
69 - #include <linux/types.h>
70 --#include <linux/if.h>
71 - #include <linux/ip.h>
72 - #include <linux/in6.h>
73 - #include <asm/byteorder.h>
74 ---- iproute2-4.14.0.orig/include/uapi/linux/ip6_tunnel.h
75 -+++ iproute2-4.14.0/include/uapi/linux/ip6_tunnel.h
76 -@@ -2,7 +2,6 @@
77 - #define _IP6_TUNNEL_H
78 -
79 - #include <linux/types.h>
80 --#include <linux/if.h> /* For IFNAMSIZ. */
81 - #include <linux/in6.h> /* For struct in6_addr. */
82 -
83 - #define IPV6_TLV_TNL_ENCAP_LIMIT 4
84 ---- iproute2-4.14.0.orig/include/uapi/linux/kernel.h
85 -+++ iproute2-4.14.0/include/uapi/linux/kernel.h
86 -@@ -1,7 +1,9 @@
87 - #ifndef _LINUX_KERNEL_H
88 - #define _LINUX_KERNEL_H
89 -
90 -+#ifdef __GLIBC__
91 - #include <linux/sysinfo.h>
92 -+#endif
93 -
94 - /*
95 - * 'kernel.h' contains some often-used function prototypes etc
96 ---- iproute2-4.14.0.orig/include/uapi/linux/libc-compat.h
97 -+++ iproute2-4.14.0/include/uapi/linux/libc-compat.h
98 -@@ -48,47 +48,57 @@
99 - #ifndef _LIBC_COMPAT_H
100 - #define _LIBC_COMPAT_H
101 -
102 --/* We have included glibc headers... */
103 --#if defined(__GLIBC__)
104 -+/* We're used from userspace... */
105 -+#if !defined(__KERNEL__)
106 -
107 --/* Coordinate with glibc net/if.h header. */
108 -+/* Coordinate with libc net/if.h header. */
109 - #if defined(_NET_IF_H) && defined(__USE_MISC)
110 -
111 --/* GLIBC headers included first so don't define anything
112 -+/* libc headers included first so don't define anything
113 - * that would already be defined. */
114 -
115 - #define __UAPI_DEF_IF_IFCONF 0
116 - #define __UAPI_DEF_IF_IFMAP 0
117 - #define __UAPI_DEF_IF_IFNAMSIZ 0
118 - #define __UAPI_DEF_IF_IFREQ 0
119 --/* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */
120 - #define __UAPI_DEF_IF_NET_DEVICE_FLAGS 0
121 --/* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */
122 -+/* If libc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */
123 -+#if !defined(__GLIBC__)
124 -+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0
125 -+#else
126 - #ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO
127 - #define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1
128 - #endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */
129 -+#endif /* !defined(__GLIBC__) */
130 -
131 - #else /* _NET_IF_H */
132 -
133 - /* Linux headers included first, and we must define everything
134 -- * we need. The expectation is that glibc will check the
135 -+ * we need. The expectation is that libc will check the
136 - * __UAPI_DEF_* defines and adjust appropriately. */
137 -
138 - #define __UAPI_DEF_IF_IFCONF 1
139 - #define __UAPI_DEF_IF_IFMAP 1
140 - #define __UAPI_DEF_IF_IFNAMSIZ 1
141 - #define __UAPI_DEF_IF_IFREQ 1
142 --/* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */
143 - #define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1
144 --/* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */
145 -+/* If libc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */
146 - #define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1
147 -
148 - #endif /* _NET_IF_H */
149 -
150 --/* Coordinate with glibc netinet/in.h header. */
151 -+/* Coordinate with libc netinet/if_ether.h */
152 -+#ifdef _NETINET_IF_ETHER_H
153 -+#define __UAPI_DEF_ETHHDR 0
154 -+#else
155 -+/* glibc uses __NETINET_IF_ETHER_H and uses the uapi header */
156 -+#define __UAPI_DEF_ETHHDR 1
157 -+#endif /* _NETINET_IF_ETHER_H */
158 -+
159 -+/* Coordinate with libc netinet/in.h header. */
160 - #if defined(_NETINET_IN_H)
161 -
162 --/* GLIBC headers included first so don't define anything
163 -+/* libc headers included first so don't define anything
164 - * that would already be defined. */
165 - #define __UAPI_DEF_IN_ADDR 0
166 - #define __UAPI_DEF_IN_IPPROTO 0
167 -@@ -98,15 +108,7 @@
168 - #define __UAPI_DEF_IN_CLASS 0
169 -
170 - #define __UAPI_DEF_IN6_ADDR 0
171 --/* The exception is the in6_addr macros which must be defined
172 -- * if the glibc code didn't define them. This guard matches
173 -- * the guard in glibc/inet/netinet/in.h which defines the
174 -- * additional in6_addr macros e.g. s6_addr16, and s6_addr32. */
175 --#if defined(__USE_MISC) || defined (__USE_GNU)
176 - #define __UAPI_DEF_IN6_ADDR_ALT 0
177 --#else
178 --#define __UAPI_DEF_IN6_ADDR_ALT 1
179 --#endif
180 - #define __UAPI_DEF_SOCKADDR_IN6 0
181 - #define __UAPI_DEF_IPV6_MREQ 0
182 - #define __UAPI_DEF_IPPROTO_V6 0
183 -@@ -117,7 +119,7 @@
184 - #else
185 -
186 - /* Linux headers included first, and we must define everything
187 -- * we need. The expectation is that glibc will check the
188 -+ * we need. The expectation is that libc will check the
189 - * __UAPI_DEF_* defines and adjust appropriately. */
190 - #define __UAPI_DEF_IN_ADDR 1
191 - #define __UAPI_DEF_IN_IPPROTO 1
192 -@@ -127,7 +129,7 @@
193 - #define __UAPI_DEF_IN_CLASS 1
194 -
195 - #define __UAPI_DEF_IN6_ADDR 1
196 --/* We unconditionally define the in6_addr macros and glibc must
197 -+/* We unconditionally define the in6_addr macros and libc must
198 - * coordinate. */
199 - #define __UAPI_DEF_IN6_ADDR_ALT 1
200 - #define __UAPI_DEF_SOCKADDR_IN6 1
201 -@@ -168,18 +170,20 @@
202 - /* If we did not see any headers from any supported C libraries,
203 - * or we are being included in the kernel, then define everything
204 - * that we need. */
205 --#else /* !defined(__GLIBC__) */
206 -+#else /* defined(__KERNEL__) */
207 -
208 - /* Definitions for if.h */
209 - #define __UAPI_DEF_IF_IFCONF 1
210 - #define __UAPI_DEF_IF_IFMAP 1
211 - #define __UAPI_DEF_IF_IFNAMSIZ 1
212 - #define __UAPI_DEF_IF_IFREQ 1
213 --/* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */
214 - #define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1
215 --/* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */
216 -+/* If libc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */
217 - #define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1
218 -
219 -+/* Definitions for if/ether.h */
220 -+#define __UAPI_DEF_ETHHDR 1
221 -+
222 - /* Definitions for in.h */
223 - #define __UAPI_DEF_IN_ADDR 1
224 - #define __UAPI_DEF_IN_IPPROTO 1
225 -@@ -208,6 +212,6 @@
226 - /* Definitions for xattr.h */
227 - #define __UAPI_DEF_XATTR 1
228 -
229 --#endif /* __GLIBC__ */
230 -+#endif /* defined(__KERNEL__) */
231 -
232 - #endif /* _LIBC_COMPAT_H */
233 ---- iproute2-4.14.0.orig/include/uapi/linux/netfilter_ipv4/ip_tables.h
234 -+++ iproute2-4.14.0/include/uapi/linux/netfilter_ipv4/ip_tables.h
235 -@@ -17,7 +17,6 @@
236 -
237 - #include <linux/types.h>
238 -
239 --#include <linux/if.h>
240 - #include <linux/netfilter_ipv4.h>
241 -
242 - #include <linux/netfilter/x_tables.h>
243 ---- iproute2-4.14.0.orig/tc/f_flower.c
244 -+++ iproute2-4.14.0/tc/f_flower.c
245 -@@ -15,7 +15,7 @@
246 - #include <syslog.h>
247 - #include <string.h>
248 - #include <net/if.h>
249 --#include <linux/if_arp.h>
250 -+#include <net/if_arp.h>
251 - #include <linux/if_ether.h>
252 - #include <linux/ip.h>
253 - #include <linux/tc_act/tc_vlan.h>
254
255 diff --git a/sys-apps/iproute2/files/iproute2-4.14.1-configure-nomagic.patch b/sys-apps/iproute2/files/iproute2-4.14.1-configure-nomagic.patch
256 deleted file mode 100644
257 index 919249b..0000000
258 --- a/sys-apps/iproute2/files/iproute2-4.14.1-configure-nomagic.patch
259 +++ /dev/null
260 @@ -1,196 +0,0 @@
261 -The hand-rolled configure script, for multiple options (selinux,mnl,elf), sets
262 -a variable as well as modifying CFLAGS & LDLIBS.
263 -
264 -If config.mk is later amended to disable a feature, the CFLAGS/LDLIBS tweaks
265 -are still in place.
266 -
267 -Push the CFLAGS/LDLIBS changes into new conditional Makefile code, so that they
268 -are only passed when correctly needed.
269 -
270 -Prior Gentoo testcase for reproduction:
271 -USE=minimal ebuild ... compile.
272 -- Linking with libelf & libmnl based only on presence.
273 -- Links based on libselinux based only on presence.
274 -
275 -Closes: https://bugs.gentoo.org/643722
276 -Signed-off-by: Robin H. Johnson <robbat2@g.o>
277 -
278 -diff -Nuar --exclude '*~' --exclude '.*.swp' --exclude '*.orig' iproute2-4.14.1.orig/bridge/Makefile iproute2-4.14.1/bridge/Makefile
279 ---- iproute2-4.14.1.orig/bridge/Makefile 2017-11-13 10:09:57.000000000 -0800
280 -+++ iproute2-4.14.1/bridge/Makefile 2018-01-07 14:24:23.350726423 -0800
281 -@@ -1,6 +1,7 @@
282 - BROBJ = bridge.o fdb.o monitor.o link.o mdb.o vlan.o
283 -
284 - include ../config.mk
285 -+include ../config.include
286 -
287 - all: bridge
288 -
289 -diff -Nuar --exclude '*~' --exclude '.*.swp' --exclude '*.orig' iproute2-4.14.1.orig/config.include iproute2-4.14.1/config.include
290 ---- iproute2-4.14.1.orig/config.include 1969-12-31 16:00:00.000000000 -0800
291 -+++ iproute2-4.14.1/config.include 2018-01-07 14:25:34.406126921 -0800
292 -@@ -0,0 +1,22 @@
293 -+# We can only modify CFLAGS/LDLIBS after all the config options are known.
294 -+ifeq ($(IP_CONFIG_SETNS),y)
295 -+ CFLAGS += $(IP_CONFIG_SETNS_CFLAGS)
296 -+endif
297 -+ifeq ($(HAVE_ELF),y)
298 -+ CFLAGS += $(HAVE_ELF_CFLAGS)
299 -+ LDLIBS += $(HAVE_ELF_LDLIBS)
300 -+endif
301 -+ifeq ($(HAVE_SELINUX),y)
302 -+ CFLAGS += $(HAVE_SELINUX_CFLAGS)
303 -+ LDLIBS += $(HAVE_SELINUX_LDLIBS)
304 -+endif
305 -+ifeq ($(HAVE_MNL),y)
306 -+ CFLAGS += $(HAVE_MNL_CFLAGS)
307 -+ LDLIBS += $(HAVE_MNL_LDLIBS)
308 -+endif
309 -+
310 -+# Rules can only be declared after all variables in them are known.
311 -+%.o: %.c
312 -+ $(QUIET_CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
313 -+
314 -+# vim: ft=make:
315 -diff -Nuar --exclude '*~' --exclude '.*.swp' --exclude '*.orig' iproute2-4.14.1.orig/configure iproute2-4.14.1/configure
316 ---- iproute2-4.14.1.orig/configure 2017-11-13 10:09:57.000000000 -0800
317 -+++ iproute2-4.14.1/configure 2018-01-07 14:25:49.242419367 -0800
318 -@@ -223,7 +223,7 @@
319 - then
320 - echo "IP_CONFIG_SETNS:=y" >>$CONFIG
321 - echo "yes"
322 -- echo "CFLAGS += -DHAVE_SETNS" >>$CONFIG
323 -+ echo "IP_CONFIG_SETNS_CFLAGS += -DHAVE_SETNS" >>$CONFIG
324 - else
325 - echo "no"
326 - fi
327 -@@ -268,8 +268,8 @@
328 - echo "HAVE_ELF:=y" >>$CONFIG
329 - echo "yes"
330 -
331 -- echo 'CFLAGS += -DHAVE_ELF' `${PKG_CONFIG} libelf --cflags` >> $CONFIG
332 -- echo 'LDLIBS += ' `${PKG_CONFIG} libelf --libs` >>$CONFIG
333 -+ echo 'HAVE_ELF_CFLAGS += -DHAVE_ELF' `${PKG_CONFIG} libelf --cflags` >> $CONFIG
334 -+ echo 'HAVE_ELF_LDLIBS += ' `${PKG_CONFIG} libelf --libs` >>$CONFIG
335 - else
336 - echo "no"
337 - fi
338 -@@ -283,8 +283,8 @@
339 - echo "HAVE_SELINUX:=y" >>$CONFIG
340 - echo "yes"
341 -
342 -- echo 'LDLIBS +=' `${PKG_CONFIG} --libs libselinux` >>$CONFIG
343 -- echo 'CFLAGS += -DHAVE_SELINUX' `${PKG_CONFIG} --cflags libselinux` >>$CONFIG
344 -+ echo 'HAVE_SELINUX_CFLAGS += -DHAVE_SELINUX' `${PKG_CONFIG} --cflags libselinux` >>$CONFIG
345 -+ echo 'HAVE_SELINUX_LDLIBS +=' `${PKG_CONFIG} --libs libselinux` >>$CONFIG
346 - else
347 - echo "no"
348 - fi
349 -@@ -297,8 +297,8 @@
350 - echo "HAVE_MNL:=y" >>$CONFIG
351 - echo "yes"
352 -
353 -- echo 'CFLAGS += -DHAVE_LIBMNL' `${PKG_CONFIG} libmnl --cflags` >>$CONFIG
354 -- echo 'LDLIBS +=' `${PKG_CONFIG} libmnl --libs` >> $CONFIG
355 -+ echo 'HAVE_MNL_CFLAGS += -DHAVE_LIBMNL' `${PKG_CONFIG} libmnl --cflags` >>$CONFIG
356 -+ echo 'HAVE_MNL_LDLIBS +=' `${PKG_CONFIG} libmnl --libs` >> $CONFIG
357 - else
358 - echo "no"
359 - fi
360 -@@ -425,7 +425,3 @@
361 - echo -n "docs:"
362 - check_docs
363 - echo
364 --
365 --echo >> $CONFIG
366 --echo "%.o: %.c" >> $CONFIG
367 --echo ' $(QUIET_CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<' >> $CONFIG
368 -diff -Nuar --exclude '*~' --exclude '.*.swp' --exclude '*.orig' iproute2-4.14.1.orig/devlink/Makefile iproute2-4.14.1/devlink/Makefile
369 ---- iproute2-4.14.1.orig/devlink/Makefile 2017-11-13 10:09:57.000000000 -0800
370 -+++ iproute2-4.14.1/devlink/Makefile 2018-01-07 14:24:23.351726442 -0800
371 -@@ -1,4 +1,5 @@
372 - include ../config.mk
373 -+include ../config.include
374 -
375 - ifeq ($(HAVE_MNL),y)
376 -
377 -diff -Nuar --exclude '*~' --exclude '.*.swp' --exclude '*.orig' iproute2-4.14.1.orig/genl/Makefile iproute2-4.14.1/genl/Makefile
378 ---- iproute2-4.14.1.orig/genl/Makefile 2017-11-13 10:09:57.000000000 -0800
379 -+++ iproute2-4.14.1/genl/Makefile 2018-01-07 14:24:23.351726442 -0800
380 -@@ -1,6 +1,7 @@
381 - GENLOBJ=genl.o
382 -
383 - include ../config.mk
384 -+include ../config.include
385 - SHARED_LIBS ?= y
386 -
387 - CFLAGS += -fno-strict-aliasing
388 -diff -Nuar --exclude '*~' --exclude '.*.swp' --exclude '*.orig' iproute2-4.14.1.orig/ip/Makefile iproute2-4.14.1/ip/Makefile
389 ---- iproute2-4.14.1.orig/ip/Makefile 2017-11-13 10:09:57.000000000 -0800
390 -+++ iproute2-4.14.1/ip/Makefile 2018-01-07 14:24:23.351726442 -0800
391 -@@ -14,6 +14,7 @@
392 - RTMONOBJ=rtmon.o
393 -
394 - include ../config.mk
395 -+include ../config.include
396 -
397 - ALLOBJ=$(IPOBJ) $(RTMONOBJ)
398 - SCRIPTS=ifcfg rtpr routel routef
399 -diff -Nuar --exclude '*~' --exclude '.*.swp' --exclude '*.orig' iproute2-4.14.1.orig/lib/Makefile iproute2-4.14.1/lib/Makefile
400 ---- iproute2-4.14.1.orig/lib/Makefile 2017-11-13 10:09:57.000000000 -0800
401 -+++ iproute2-4.14.1/lib/Makefile 2018-01-07 14:24:23.351726442 -0800
402 -@@ -1,4 +1,5 @@
403 - include ../config.mk
404 -+include ../config.include
405 -
406 - CFLAGS += -fPIC
407 -
408 -diff -Nuar --exclude '*~' --exclude '.*.swp' --exclude '*.orig' iproute2-4.14.1.orig/misc/Makefile iproute2-4.14.1/misc/Makefile
409 ---- iproute2-4.14.1.orig/misc/Makefile 2017-11-13 10:09:57.000000000 -0800
410 -+++ iproute2-4.14.1/misc/Makefile 2018-01-07 14:24:23.351726442 -0800
411 -@@ -4,6 +4,7 @@
412 - TARGETS=ss nstat ifstat rtacct lnstat
413 -
414 - include ../config.mk
415 -+include ../config.include
416 -
417 - ifeq ($(HAVE_BERKELEY_DB),y)
418 - TARGETS += arpd
419 -diff -Nuar --exclude '*~' --exclude '.*.swp' --exclude '*.orig' iproute2-4.14.1.orig/netem/Makefile iproute2-4.14.1/netem/Makefile
420 ---- iproute2-4.14.1.orig/netem/Makefile 2017-11-13 10:09:57.000000000 -0800
421 -+++ iproute2-4.14.1/netem/Makefile 2018-01-07 14:24:23.351726442 -0800
422 -@@ -1,4 +1,5 @@
423 - include ../config.mk
424 -+include ../config.include
425 -
426 - DISTGEN = maketable normal pareto paretonormal
427 - DISTDATA = normal.dist pareto.dist paretonormal.dist experimental.dist
428 -diff -Nuar --exclude '*~' --exclude '.*.swp' --exclude '*.orig' iproute2-4.14.1.orig/rdma/Makefile iproute2-4.14.1/rdma/Makefile
429 ---- iproute2-4.14.1.orig/rdma/Makefile 2017-11-13 10:09:57.000000000 -0800
430 -+++ iproute2-4.14.1/rdma/Makefile 2018-01-07 14:24:23.352726462 -0800
431 -@@ -1,4 +1,5 @@
432 - include ../config.mk
433 -+include ../config.include
434 -
435 - ifeq ($(HAVE_MNL),y)
436 -
437 -diff -Nuar --exclude '*~' --exclude '.*.swp' --exclude '*.orig' iproute2-4.14.1.orig/tc/Makefile iproute2-4.14.1/tc/Makefile
438 ---- iproute2-4.14.1.orig/tc/Makefile 2017-11-13 10:09:57.000000000 -0800
439 -+++ iproute2-4.14.1/tc/Makefile 2018-01-07 14:24:23.352726462 -0800
440 -@@ -3,6 +3,7 @@
441 - emp_ematch.yacc.o emp_ematch.lex.o
442 -
443 - include ../config.mk
444 -+include ../config.include
445 -
446 - SHARED_LIBS ?= y
447 -
448 -diff -Nuar --exclude '*~' --exclude '.*.swp' --exclude '*.orig' iproute2-4.14.1.orig/tipc/Makefile iproute2-4.14.1/tipc/Makefile
449 ---- iproute2-4.14.1.orig/tipc/Makefile 2017-11-13 10:09:57.000000000 -0800
450 -+++ iproute2-4.14.1/tipc/Makefile 2018-01-07 14:24:23.352726462 -0800
451 -@@ -1,4 +1,5 @@
452 - include ../config.mk
453 -+include ../config.include
454 -
455 - ifeq ($(HAVE_MNL),y)
456 -
457
458 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
459 deleted file mode 100644
460 index a8b7aaa..0000000
461 --- a/sys-apps/iproute2/files/iproute2-4.14.1-fix-tc-actions.patch
462 +++ /dev/null
463 @@ -1,222 +0,0 @@
464 -From 3572e01a090a298e2f4c4f796bad6639b652e031 Mon Sep 17 00:00:00 2001
465 -From: Michal Privoznik <mprivozn@××××××.com>
466 -Date: Fri, 8 Dec 2017 11:18:07 +0100
467 -Subject: tc: util: Don't call NEXT_ARG_FWD() in __parse_action_control()
468 -
469 -Not all callers want parse_action_control*() to advance the
470 -arguments. For instance act_parse_police() does the argument
471 -advancing itself.
472 -
473 -Fixes: e67aba559581 ("tc: actions: add helpers to parse and print control actions")
474 -Signed-off-by: Michal Privoznik <mprivozn@××××××.com>
475 ----
476 - tc/m_bpf.c | 1 +
477 - tc/m_connmark.c | 1 +
478 - tc/m_csum.c | 1 +
479 - tc/m_gact.c | 10 +++++-----
480 - tc/m_ife.c | 1 +
481 - tc/m_mirred.c | 4 +++-
482 - tc/m_nat.c | 1 +
483 - tc/m_pedit.c | 1 +
484 - tc/m_sample.c | 1 +
485 - tc/m_skbedit.c | 1 +
486 - tc/m_skbmod.c | 1 +
487 - tc/m_tunnel_key.c | 1 +
488 - tc/m_vlan.c | 1 +
489 - tc/tc_util.c | 1 -
490 - 14 files changed, 19 insertions(+), 7 deletions(-)
491 -
492 -diff --git a/tc/m_bpf.c b/tc/m_bpf.c
493 -index 1c1f71c..576f69c 100644
494 ---- a/tc/m_bpf.c
495 -+++ b/tc/m_bpf.c
496 -@@ -129,6 +129,7 @@ opt_bpf:
497 -
498 - parse_action_control_dflt(&argc, &argv, &parm.action,
499 - false, TC_ACT_PIPE);
500 -+ NEXT_ARG_FWD();
501 -
502 - if (argc) {
503 - if (matches(*argv, "index") == 0) {
504 -diff --git a/tc/m_connmark.c b/tc/m_connmark.c
505 -index 37d7185..47c7a8c 100644
506 ---- a/tc/m_connmark.c
507 -+++ b/tc/m_connmark.c
508 -@@ -82,6 +82,7 @@ parse_connmark(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
509 - }
510 -
511 - parse_action_control_dflt(&argc, &argv, &sel.action, false, TC_ACT_PIPE);
512 -+ NEXT_ARG_FWD();
513 -
514 - if (argc) {
515 - if (matches(*argv, "index") == 0) {
516 -diff --git a/tc/m_csum.c b/tc/m_csum.c
517 -index 7b15673..e1352c0 100644
518 ---- a/tc/m_csum.c
519 -+++ b/tc/m_csum.c
520 -@@ -124,6 +124,7 @@ parse_csum(struct action_util *a, int *argc_p,
521 - }
522 -
523 - parse_action_control_dflt(&argc, &argv, &sel.action, false, TC_ACT_OK);
524 -+ NEXT_ARG_FWD();
525 -
526 - if (argc) {
527 - if (matches(*argv, "index") == 0) {
528 -diff --git a/tc/m_gact.c b/tc/m_gact.c
529 -index e7d91da..b30b042 100644
530 ---- a/tc/m_gact.c
531 -+++ b/tc/m_gact.c
532 -@@ -87,14 +87,13 @@ parse_gact(struct action_util *a, int *argc_p, char ***argv_p,
533 - if (argc < 0)
534 - return -1;
535 -
536 --
537 -- if (matches(*argv, "gact") == 0) {
538 -- argc--;
539 -- argv++;
540 -- } else if (parse_action_control(&argc, &argv, &p.action, false) == -1) {
541 -+ if (matches(*argv, "gact") != 0 &&
542 -+ parse_action_control(&argc, &argv, &p.action, false) == -1) {
543 - usage(); /* does not return */
544 - }
545 -
546 -+ NEXT_ARG_FWD();
547 -+
548 - #ifdef CONFIG_GACT_PROB
549 - if (argc > 0) {
550 - if (matches(*argv, "random") == 0) {
551 -@@ -114,6 +113,7 @@ parse_gact(struct action_util *a, int *argc_p, char ***argv_p,
552 - if (parse_action_control(&argc, &argv,
553 - &pp.paction, false) == -1)
554 - usage();
555 -+ NEXT_ARG_FWD();
556 - if (get_u16(&pp.pval, *argv, 10)) {
557 - fprintf(stderr,
558 - "Illegal probability val 0x%x\n",
559 -diff --git a/tc/m_ife.c b/tc/m_ife.c
560 -index 205efc9..4647f6a 100644
561 ---- a/tc/m_ife.c
562 -+++ b/tc/m_ife.c
563 -@@ -159,6 +159,7 @@ static int parse_ife(struct action_util *a, int *argc_p, char ***argv_p,
564 -
565 - parse_action_control_dflt(&argc, &argv, &p.action, false, TC_ACT_PIPE);
566 -
567 -+ NEXT_ARG_FWD();
568 - if (argc) {
569 - if (matches(*argv, "index") == 0) {
570 - NEXT_ARG();
571 -diff --git a/tc/m_mirred.c b/tc/m_mirred.c
572 -index 3870d3a..aa7ce6d 100644
573 ---- a/tc/m_mirred.c
574 -+++ b/tc/m_mirred.c
575 -@@ -202,8 +202,10 @@ parse_direction(struct action_util *a, int *argc_p, char ***argv_p,
576 - }
577 -
578 -
579 -- if (p.eaction == TCA_EGRESS_MIRROR || p.eaction == TCA_INGRESS_MIRROR)
580 -+ if (p.eaction == TCA_EGRESS_MIRROR || p.eaction == TCA_INGRESS_MIRROR) {
581 - parse_action_control(&argc, &argv, &p.action, false);
582 -+ NEXT_ARG_FWD();
583 -+ }
584 -
585 - if (argc) {
586 - if (iok && matches(*argv, "index") == 0) {
587 -diff --git a/tc/m_nat.c b/tc/m_nat.c
588 -index 1e4ff51..f5de4d4 100644
589 ---- a/tc/m_nat.c
590 -+++ b/tc/m_nat.c
591 -@@ -116,6 +116,7 @@ parse_nat(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, struct
592 -
593 - parse_action_control_dflt(&argc, &argv, &sel.action, false, TC_ACT_OK);
594 -
595 -+ NEXT_ARG_FWD();
596 - if (argc) {
597 - if (matches(*argv, "index") == 0) {
598 - NEXT_ARG();
599 -diff --git a/tc/m_pedit.c b/tc/m_pedit.c
600 -index 26549ee..dc57f14 100644
601 ---- a/tc/m_pedit.c
602 -+++ b/tc/m_pedit.c
603 -@@ -672,6 +672,7 @@ int parse_pedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
604 -
605 - parse_action_control_dflt(&argc, &argv, &sel.sel.action, false, TC_ACT_OK);
606 -
607 -+ NEXT_ARG_FWD();
608 - if (argc) {
609 - if (matches(*argv, "index") == 0) {
610 - NEXT_ARG();
611 -diff --git a/tc/m_sample.c b/tc/m_sample.c
612 -index ff5ee6b..31774c0 100644
613 ---- a/tc/m_sample.c
614 -+++ b/tc/m_sample.c
615 -@@ -100,6 +100,7 @@ static int parse_sample(struct action_util *a, int *argc_p, char ***argv_p,
616 -
617 - parse_action_control_dflt(&argc, &argv, &p.action, false, TC_ACT_PIPE);
618 -
619 -+ NEXT_ARG_FWD();
620 - if (argc) {
621 - if (matches(*argv, "index") == 0) {
622 - NEXT_ARG();
623 -diff --git a/tc/m_skbedit.c b/tc/m_skbedit.c
624 -index aa374fc..c41a7bb 100644
625 ---- a/tc/m_skbedit.c
626 -+++ b/tc/m_skbedit.c
627 -@@ -123,6 +123,7 @@ parse_skbedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
628 - parse_action_control_dflt(&argc, &argv, &sel.action,
629 - false, TC_ACT_PIPE);
630 -
631 -+ NEXT_ARG_FWD();
632 - if (argc) {
633 - if (matches(*argv, "index") == 0) {
634 - NEXT_ARG();
635 -diff --git a/tc/m_skbmod.c b/tc/m_skbmod.c
636 -index 561b73f..bc268df 100644
637 ---- a/tc/m_skbmod.c
638 -+++ b/tc/m_skbmod.c
639 -@@ -124,6 +124,7 @@ static int parse_skbmod(struct action_util *a, int *argc_p, char ***argv_p,
640 -
641 - parse_action_control_dflt(&argc, &argv, &p.action, false, TC_ACT_PIPE);
642 -
643 -+ NEXT_ARG_FWD();
644 - if (argc) {
645 - if (matches(*argv, "index") == 0) {
646 - NEXT_ARG();
647 -diff --git a/tc/m_tunnel_key.c b/tc/m_tunnel_key.c
648 -index 1cdd035..2dc9187 100644
649 ---- a/tc/m_tunnel_key.c
650 -+++ b/tc/m_tunnel_key.c
651 -@@ -175,6 +175,7 @@ static int parse_tunnel_key(struct action_util *a, int *argc_p, char ***argv_p,
652 - parse_action_control_dflt(&argc, &argv, &parm.action,
653 - false, TC_ACT_PIPE);
654 -
655 -+ NEXT_ARG_FWD();
656 - if (argc) {
657 - if (matches(*argv, "index") == 0) {
658 - NEXT_ARG();
659 -diff --git a/tc/m_vlan.c b/tc/m_vlan.c
660 -index 161759f..edae0d1 100644
661 ---- a/tc/m_vlan.c
662 -+++ b/tc/m_vlan.c
663 -@@ -131,6 +131,7 @@ static int parse_vlan(struct action_util *a, int *argc_p, char ***argv_p,
664 - parse_action_control_dflt(&argc, &argv, &parm.action,
665 - false, TC_ACT_PIPE);
666 -
667 -+ NEXT_ARG_FWD();
668 - if (argc) {
669 - if (matches(*argv, "index") == 0) {
670 - NEXT_ARG();
671 -diff --git a/tc/tc_util.c b/tc/tc_util.c
672 -index 1887905..ee9a70a 100644
673 ---- a/tc/tc_util.c
674 -+++ b/tc/tc_util.c
675 -@@ -586,7 +586,6 @@ static int __parse_action_control(int *argc_p, char ***argv_p, int *result_p,
676 - }
677 - result |= jump_cnt;
678 - }
679 -- NEXT_ARG_FWD();
680 - *argc_p = argc;
681 - *argv_p = argv;
682 - *result_p = result;
683 ---
684 -cgit v1.1
685 -
686
687 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
688 deleted file mode 100644
689 index e5efc90..0000000
690 --- a/sys-apps/iproute2/files/iproute2-4.14.1-posix-shell.patch
691 +++ /dev/null
692 @@ -1,65 +0,0 @@
693 -https://marc.info/?l=linux-netdev&m=151554000532498&w=2
694 -
695 -From aec69bbc285e5498add5384b6018564355594233 Mon Sep 17 00:00:00 2001
696 -From: Mike Frysinger <vapier@××××××××.org>
697 -Date: Tue, 9 Jan 2018 18:16:53 -0500
698 -Subject: [PATCH iproute2] ifcfg/rtpr: convert to POSIX shell
699 -
700 -These files are already mostly written in POSIX shell, so convert their
701 -shebangs to /bin/sh and tweak the few bashisms in here.
702 -
703 -URL: https://crbug.com/756559
704 -Reported-by: Pat Erley <perley@××××××××.org>
705 -Signed-off-by: Mike Frysinger <vapier@××××××××.org>
706 ----
707 - ip/ifcfg | 12 ++++++------
708 - ip/rtpr | 2 +-
709 - 2 files changed, 7 insertions(+), 7 deletions(-)
710 -
711 -diff --git a/ip/ifcfg b/ip/ifcfg
712 -index 851b9215ab63..5b34decd4480 100644
713 ---- a/ip/ifcfg
714 -+++ b/ip/ifcfg
715 -@@ -1,3 +1,3 @@
716 --#! /bin/bash
717 -+#! /bin/sh
718 -
719 - CheckForwarding () {
720 -@@ -7,7 +7,7 @@ CheckForwarding () {
721 - fwd=0
722 - if [ -d $sbase ]; then
723 - for dir in $sbase/*/forwarding; do
724 -- fwd=$[$fwd + `cat $dir`]
725 -+ fwd=$(( fwd + $(cat "$dir") ))
726 - done
727 - else
728 - fwd=2
729 -@@ -128,12 +128,12 @@ fi
730 - arping -q -A -c 1 -I $dev $ipaddr
731 - noarp=$?
732 - ( sleep 2 ;
733 -- arping -q -U -c 1 -I $dev $ipaddr ) >& /dev/null </dev/null &
734 -+ arping -q -U -c 1 -I $dev $ipaddr ) >/dev/null 2>&1 </dev/null &
735 -
736 --ip route add unreachable 224.0.0.0/24 >& /dev/null
737 --ip route add unreachable 255.255.255.255 >& /dev/null
738 -+ip route add unreachable 224.0.0.0/24 >/dev/null 2>&1
739 -+ip route add unreachable 255.255.255.255 >/dev/null 2>&1
740 - if [ "`ip link ls $dev | grep -c MULTICAST`" -ge 1 ]; then
741 -- ip route add 224.0.0.0/4 dev $dev scope global >& /dev/null
742 -+ ip route add 224.0.0.0/4 dev $dev scope global >/dev/null 2>&1
743 - fi
744 -
745 - if [ $fwd -eq 0 ]; then
746 -diff --git a/ip/rtpr b/ip/rtpr
747 -index 192a476f817e..7e48674bcf53 100644
748 ---- a/ip/rtpr
749 -+++ b/ip/rtpr
750 -@@ -1,3 +1,3 @@
751 --#! /bin/bash
752 -+#! /bin/sh
753 -
754 - exec tr "[\\\\]" "[
755 ---
756 -2.15.1
757 -
758
759 diff --git a/sys-apps/iproute2/files/iproute2-4.15.0-musl.patch b/sys-apps/iproute2/files/iproute2-4.15.0-musl.patch
760 deleted file mode 100644
761 index 8c4a924..0000000
762 --- a/sys-apps/iproute2/files/iproute2-4.15.0-musl.patch
763 +++ /dev/null
764 @@ -1,234 +0,0 @@
765 -diff -Naur iproute2-4.15.0.orig/include/uapi/linux/if_tunnel.h iproute2-4.15.0/include/uapi/linux/if_tunnel.h
766 ---- iproute2-4.15.0.orig/include/uapi/linux/if_tunnel.h 2018-01-30 12:22:46.392424243 -0800
767 -+++ iproute2-4.15.0/include/uapi/linux/if_tunnel.h 2018-01-30 12:23:57.131422976 -0800
768 -@@ -3,7 +3,6 @@
769 - #define _IF_TUNNEL_H_
770 -
771 - #include <linux/types.h>
772 --#include <linux/if.h>
773 - #include <linux/ip.h>
774 - #include <linux/in6.h>
775 - #include <asm/byteorder.h>
776 -diff -Naur iproute2-4.15.0.orig/include/uapi/linux/ip6_tunnel.h iproute2-4.15.0/include/uapi/linux/ip6_tunnel.h
777 ---- iproute2-4.15.0.orig/include/uapi/linux/ip6_tunnel.h 2018-01-30 12:22:46.393424243 -0800
778 -+++ iproute2-4.15.0/include/uapi/linux/ip6_tunnel.h 2018-01-30 12:24:05.957422818 -0800
779 -@@ -3,7 +3,6 @@
780 - #define _IP6_TUNNEL_H
781 -
782 - #include <linux/types.h>
783 --#include <linux/if.h> /* For IFNAMSIZ. */
784 - #include <linux/in6.h> /* For struct in6_addr. */
785 -
786 - #define IPV6_TLV_TNL_ENCAP_LIMIT 4
787 -diff -Naur iproute2-4.15.0.orig/include/uapi/linux/kernel.h iproute2-4.15.0/include/uapi/linux/kernel.h
788 ---- iproute2-4.15.0.orig/include/uapi/linux/kernel.h 2018-01-30 12:22:46.393424243 -0800
789 -+++ iproute2-4.15.0/include/uapi/linux/kernel.h 2018-01-30 12:24:21.576422539 -0800
790 -@@ -2,7 +2,9 @@
791 - #ifndef _LINUX_KERNEL_H
792 - #define _LINUX_KERNEL_H
793 -
794 -+#ifdef __GLIBC__
795 - #include <linux/sysinfo.h>
796 -+#endif
797 -
798 - /*
799 - * 'kernel.h' contains some often-used function prototypes etc
800 -diff -Naur iproute2-4.15.0.orig/include/uapi/linux/libc-compat.h iproute2-4.15.0/include/uapi/linux/libc-compat.h
801 ---- iproute2-4.15.0.orig/include/uapi/linux/libc-compat.h 2018-01-30 12:22:46.393424243 -0800
802 -+++ iproute2-4.15.0/include/uapi/linux/libc-compat.h 2018-01-30 12:33:58.575412206 -0800
803 -@@ -49,47 +49,57 @@
804 - #ifndef _LIBC_COMPAT_H
805 - #define _LIBC_COMPAT_H
806 -
807 --/* We have included glibc headers... */
808 --#if defined(__GLIBC__)
809 -+/* We're used from userspace... */
810 -+#if !defined(__KERNEL__)
811 -
812 --/* Coordinate with glibc net/if.h header. */
813 -+/* Coordinate with libc net/if.h header. */
814 - #if defined(_NET_IF_H) && defined(__USE_MISC)
815 -
816 --/* GLIBC headers included first so don't define anything
817 -+/* libc headers included first so don't define anything
818 - * that would already be defined. */
819 -
820 - #define __UAPI_DEF_IF_IFCONF 0
821 - #define __UAPI_DEF_IF_IFMAP 0
822 - #define __UAPI_DEF_IF_IFNAMSIZ 0
823 - #define __UAPI_DEF_IF_IFREQ 0
824 --/* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */
825 - #define __UAPI_DEF_IF_NET_DEVICE_FLAGS 0
826 -+#if !defined(__GLIBC__)
827 -+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0
828 -+#else
829 - /* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */
830 - #ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO
831 - #define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1
832 - #endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */
833 -+#endif /* !defined(__GLIBC__) */
834 -
835 - #else /* _NET_IF_H */
836 -
837 - /* Linux headers included first, and we must define everything
838 -- * we need. The expectation is that glibc will check the
839 -+ * we need. The expectation is that libc will check the
840 - * __UAPI_DEF_* defines and adjust appropriately. */
841 -
842 - #define __UAPI_DEF_IF_IFCONF 1
843 - #define __UAPI_DEF_IF_IFMAP 1
844 - #define __UAPI_DEF_IF_IFNAMSIZ 1
845 - #define __UAPI_DEF_IF_IFREQ 1
846 --/* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */
847 - #define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1
848 - /* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */
849 - #define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1
850 -
851 - #endif /* _NET_IF_H */
852 -
853 --/* Coordinate with glibc netinet/in.h header. */
854 -+/* Coordinate with libc netinet/if_ether.h */
855 -+#ifdef _NETINET_IF_ETHER_H
856 -+#define __UAPI_DEF_ETHHDR 0
857 -+#else
858 -+/* glibc uses __NETINET_IF_ETHER_H and uses the uapi header */
859 -+#define __UAPI_DEF_ETHHDR 1
860 -+#endif /* _NETINET_IF_ETHER_H */
861 -+
862 -+/* Coordinate with libc netinet/in.h header. */
863 - #if defined(_NETINET_IN_H)
864 -
865 --/* GLIBC headers included first so don't define anything
866 -+/* libc headers included first so don't define anything
867 - * that would already be defined. */
868 - #define __UAPI_DEF_IN_ADDR 0
869 - #define __UAPI_DEF_IN_IPPROTO 0
870 -@@ -99,15 +109,7 @@
871 - #define __UAPI_DEF_IN_CLASS 0
872 -
873 - #define __UAPI_DEF_IN6_ADDR 0
874 --/* The exception is the in6_addr macros which must be defined
875 -- * if the glibc code didn't define them. This guard matches
876 -- * the guard in glibc/inet/netinet/in.h which defines the
877 -- * additional in6_addr macros e.g. s6_addr16, and s6_addr32. */
878 --#if defined(__USE_MISC) || defined (__USE_GNU)
879 - #define __UAPI_DEF_IN6_ADDR_ALT 0
880 --#else
881 --#define __UAPI_DEF_IN6_ADDR_ALT 1
882 --#endif
883 - #define __UAPI_DEF_SOCKADDR_IN6 0
884 - #define __UAPI_DEF_IPV6_MREQ 0
885 - #define __UAPI_DEF_IPPROTO_V6 0
886 -@@ -118,7 +120,7 @@
887 - #else
888 -
889 - /* Linux headers included first, and we must define everything
890 -- * we need. The expectation is that glibc will check the
891 -+ * we need. The expectation is that libc will check the
892 - * __UAPI_DEF_* defines and adjust appropriately. */
893 - #define __UAPI_DEF_IN_ADDR 1
894 - #define __UAPI_DEF_IN_IPPROTO 1
895 -@@ -170,7 +172,7 @@
896 - * or we are being included in the kernel, then define everything
897 - * that we need. Check for previous __UAPI_* definitions to give
898 - * unsupported C libraries a way to opt out of any kernel definition. */
899 --#else /* !defined(__GLIBC__) */
900 -+#else /* defined(__KERNEL__) */
901 -
902 - /* Definitions for if.h */
903 - #ifndef __UAPI_DEF_IF_IFCONF
904 -@@ -185,7 +187,6 @@
905 - #ifndef __UAPI_DEF_IF_IFREQ
906 - #define __UAPI_DEF_IF_IFREQ 1
907 - #endif
908 --/* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */
909 - #ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS
910 - #define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1
911 - #endif
912 -@@ -262,7 +263,7 @@
913 - #define __UAPI_DEF_XATTR 1
914 - #endif
915 -
916 --#endif /* __GLIBC__ */
917 -+#endif /* defined(__KERNEL__) */
918 -
919 - /* Definitions for if_ether.h */
920 - /* allow libcs like musl to deactivate this, glibc does not implement this. */
921 -diff -Naur iproute2-4.15.0.orig/include/uapi/linux/netfilter_ipv4/ip_tables.h iproute2-4.15.0/include/uapi/linux/netfilter_ipv4/ip_tables.h
922 ---- iproute2-4.15.0.orig/include/uapi/linux/netfilter_ipv4/ip_tables.h 2018-01-30 12:22:46.394424243 -0800
923 -+++ iproute2-4.15.0/include/uapi/linux/netfilter_ipv4/ip_tables.h 2018-01-30 12:34:19.157411837 -0800
924 -@@ -18,7 +18,6 @@
925 -
926 - #include <linux/types.h>
927 -
928 --#include <linux/if.h>
929 - #include <linux/netfilter_ipv4.h>
930 -
931 - #include <linux/netfilter/x_tables.h>
932 -diff -Naur iproute2-4.15.0.orig/tc/f_flower.c iproute2-4.15.0/tc/f_flower.c
933 ---- iproute2-4.15.0.orig/tc/f_flower.c 2018-01-30 12:22:46.367424244 -0800
934 -+++ iproute2-4.15.0/tc/f_flower.c 2018-01-30 12:34:36.182411532 -0800
935 -@@ -14,7 +14,7 @@
936 - #include <unistd.h>
937 - #include <string.h>
938 - #include <net/if.h>
939 --#include <linux/if_arp.h>
940 -+#include <net/if_arp.h>
941 - #include <linux/if_ether.h>
942 - #include <linux/ip.h>
943 - #include <linux/tc_act/tc_vlan.h>
944 -diff -Naur iproute2-4.15.0.orig/tc/m_mirred.c iproute2-4.15.0/tc/m_mirred.c
945 ---- iproute2-4.15.0.orig/tc/m_mirred.c 2018-01-30 12:22:46.377424243 -0800
946 -+++ iproute2-4.15.0/tc/m_mirred.c 2018-01-30 12:57:12.620387241 -0800
947 -@@ -17,6 +17,7 @@
948 - #include <unistd.h>
949 - #include <fcntl.h>
950 - #include <sys/socket.h>
951 -+#include <net/if.h>
952 - #include <netinet/in.h>
953 - #include <arpa/inet.h>
954 - #include <string.h>
955 -diff -Naur iproute2-4.15.0.orig/tc/tc_class.c iproute2-4.15.0/tc/tc_class.c
956 ---- iproute2-4.15.0.orig/tc/tc_class.c 2018-01-30 12:22:46.369424244 -0800
957 -+++ iproute2-4.15.0/tc/tc_class.c 2018-01-30 12:54:53.420389734 -0800
958 -@@ -15,6 +15,7 @@
959 - #include <unistd.h>
960 - #include <fcntl.h>
961 - #include <sys/socket.h>
962 -+#include <net/if.h>
963 - #include <netinet/in.h>
964 - #include <arpa/inet.h>
965 - #include <string.h>
966 -diff -Naur iproute2-4.15.0.orig/tc/tc_filter.c iproute2-4.15.0/tc/tc_filter.c
967 ---- iproute2-4.15.0.orig/tc/tc_filter.c 2018-01-30 12:22:46.368424244 -0800
968 -+++ iproute2-4.15.0/tc/tc_filter.c 2018-01-30 12:56:02.186388502 -0800
969 -@@ -15,6 +15,7 @@
970 - #include <unistd.h>
971 - #include <fcntl.h>
972 - #include <sys/socket.h>
973 -+#include <net/if.h>
974 - #include <netinet/in.h>
975 - #include <arpa/inet.h>
976 - #include <string.h>
977 -diff -Naur iproute2-4.15.0.orig/tc/tc_qdisc.c iproute2-4.15.0/tc/tc_qdisc.c
978 ---- iproute2-4.15.0.orig/tc/tc_qdisc.c 2018-01-30 12:22:46.368424244 -0800
979 -+++ iproute2-4.15.0/tc/tc_qdisc.c 2018-01-30 12:53:37.801391088 -0800
980 -@@ -15,6 +15,7 @@
981 - #include <unistd.h>
982 - #include <fcntl.h>
983 - #include <sys/socket.h>
984 -+#include <net/if.h>
985 - #include <netinet/in.h>
986 - #include <arpa/inet.h>
987 - #include <string.h>
988 -diff -Naur iproute2-4.15.0.orig/tc/tc_util.h iproute2-4.15.0/tc/tc_util.h
989 ---- iproute2-4.15.0.orig/tc/tc_util.h 2018-01-30 12:22:46.367424244 -0800
990 -+++ iproute2-4.15.0/tc/tc_util.h 2018-01-30 12:51:24.463393476 -0800
991 -@@ -4,7 +4,6 @@
992 -
993 - #define MAX_MSG 16384
994 - #include <limits.h>
995 --#include <linux/if.h>
996 -
997 - #include <linux/pkt_sched.h>
998 - #include <linux/pkt_cls.h>
999
1000 diff --git a/sys-apps/iproute2/files/iproute2-4.16.0-keep-family.patch b/sys-apps/iproute2/files/iproute2-4.16.0-keep-family.patch
1001 deleted file mode 100644
1002 index d2940c9..0000000
1003 --- a/sys-apps/iproute2/files/iproute2-4.16.0-keep-family.patch
1004 +++ /dev/null
1005 @@ -1,25 +0,0 @@
1006 -Bug: https://bugs.gentoo.org/652986
1007 -
1008 -https://marc.info/?l=linux-netdev&m=152363743818340&w=2
1009 -
1010 ---- a/lib/utils.c
1011 -+++ b/lib/utils.c
1012 -@@ -568,7 +568,7 @@ static int __get_addr_1(inet_prefix *addr, const char *name, int family)
1013 - if (strcmp(name, "default") == 0) {
1014 - if ((family == AF_DECnet) || (family == AF_MPLS))
1015 - return -1;
1016 -- addr->family = (family != AF_UNSPEC) ? family : AF_INET;
1017 -+ addr->family = family;
1018 - addr->bytelen = af_byte_len(addr->family);
1019 - addr->bitlen = -2;
1020 - addr->flags |= PREFIXLEN_SPECIFIED;
1021 -@@ -579,7 +579,7 @@ static int __get_addr_1(inet_prefix *addr, const char *name, int family)
1022 - strcmp(name, "any") == 0) {
1023 - if ((family == AF_DECnet) || (family == AF_MPLS))
1024 - return -1;
1025 -- addr->family = AF_UNSPEC;
1026 -+ addr->family = family;
1027 - addr->bytelen = 0;
1028 - addr->bitlen = -2;
1029 - return 0;
1030 ---
1031
1032 diff --git a/sys-apps/iproute2/iproute2-4.14.1-r2.ebuild b/sys-apps/iproute2/iproute2-4.14.1-r2.ebuild
1033 deleted file mode 100644
1034 index d11c493..0000000
1035 --- a/sys-apps/iproute2/iproute2-4.14.1-r2.ebuild
1036 +++ /dev/null
1037 @@ -1,147 +0,0 @@
1038 -# Copyright 1999-2018 Gentoo Foundation
1039 -# Distributed under the terms of the GNU General Public License v2
1040 -
1041 -EAPI=6
1042 -
1043 -inherit toolchain-funcs flag-o-matic multilib
1044 -
1045 -if [[ ${PV} == "9999" ]] ; then
1046 - EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
1047 - inherit git-r3
1048 -else
1049 - SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
1050 - KEYWORDS="amd64 arm arm64 ~mips ppc x86"
1051 -fi
1052 -
1053 -DESCRIPTION="kernel routing and traffic control utilities"
1054 -HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
1055 -
1056 -LICENSE="GPL-2"
1057 -SLOT="0"
1058 -IUSE="atm berkdb +iptables ipv6 minimal selinux"
1059 -
1060 -# We could make libmnl optional, but it's tiny, so eh
1061 -RDEPEND="
1062 - !net-misc/arpd
1063 - !minimal? ( net-libs/libmnl virtual/libelf )
1064 - iptables? ( >=net-firewall/iptables-1.4.20:= )
1065 - berkdb? ( sys-libs/db:= )
1066 - atm? ( net-dialup/linux-atm )
1067 - selinux? ( sys-libs/libselinux )
1068 -"
1069 -# We require newer linux-headers for ipset support #549948 and some defines #553876
1070 -DEPEND="
1071 - ${RDEPEND}
1072 - app-arch/xz-utils
1073 - iptables? ( virtual/pkgconfig )
1074 - >=sys-devel/bison-2.4
1075 - sys-devel/flex
1076 - >=sys-kernel/linux-headers-3.16
1077 - elibc_glibc? ( >=sys-libs/glibc-2.7 )
1078 -"
1079 -
1080 -PATCHES=(
1081 - "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
1082 - "${FILESDIR}"/${P}-fix-tc-actions.patch
1083 - "${FILESDIR}"/${PN}-4.14.0-musl.patch
1084 -)
1085 -
1086 -src_prepare() {
1087 - if ! use ipv6 ; then
1088 - PATCHES+=(
1089 - "${FILESDIR}"/${PN}-4.11.0-no-ipv6.patch #326849
1090 - )
1091 - fi
1092 -
1093 - default
1094 -
1095 - sed -i \
1096 - -e '/^CC :\?=/d' \
1097 - -e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
1098 - -e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
1099 - -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
1100 - -e "/^WFLAGS/s:-Werror::" \
1101 - -e "/^DBM_INCLUDE/s:=.*:=${T}:" \
1102 - Makefile || die
1103 -
1104 - # Use /run instead of /var/run.
1105 - sed -i \
1106 - -e 's:/var/run:/run:g' \
1107 - include/namespace.h \
1108 - man/man8/ip-netns.8 || die
1109 -
1110 - # build against system headers
1111 - rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
1112 - sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
1113 -
1114 - use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
1115 -}
1116 -
1117 -src_configure() {
1118 - tc-export AR CC PKG_CONFIG
1119 -
1120 - # This sure is ugly. Should probably move into toolchain-funcs at some point.
1121 - local setns
1122 - pushd "${T}" >/dev/null
1123 - printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
1124 - ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
1125 - echo 'int main(){return 0;}' > test.c
1126 - ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
1127 - popd >/dev/null
1128 -
1129 - # run "configure" script first which will create "config.mk"...
1130 - default
1131 -
1132 - # ...now switch on/off requested features via USE flags
1133 - cat <<-EOF >> config.mk
1134 - TC_CONFIG_ATM := $(usex atm y n)
1135 - TC_CONFIG_XT := $(usex iptables y n)
1136 - TC_CONFIG_NO_XT := $(usex iptables n y)
1137 - # We've locked in recent enough kernel headers #549948
1138 - TC_CONFIG_IPSET := y
1139 - HAVE_BERKELEY_DB := $(usex berkdb y n)
1140 - HAVE_MNL := $(usex minimal n y)
1141 - HAVE_ELF := $(usex minimal n y)
1142 - HAVE_SELINUX := $(usex selinux y n)
1143 - IP_CONFIG_SETNS := ${setns}
1144 - # Use correct iptables dir, #144265 #293709
1145 - IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
1146 - EOF
1147 -}
1148 -
1149 -src_install() {
1150 - if use minimal ; then
1151 - into /
1152 - dosbin tc/tc
1153 - dobin ip/ip
1154 - return 0
1155 - fi
1156 -
1157 - emake \
1158 - DESTDIR="${D}" \
1159 - LIBDIR="${EPREFIX%/}"/$(get_libdir) \
1160 - SBINDIR="${EPREFIX%/}"/sbin \
1161 - CONFDIR="${EPREFIX%/}"/etc/iproute2 \
1162 - DOCDIR="${EPREFIX%/}"/usr/share/doc/${PF} \
1163 - MANDIR="${EPREFIX%/}"/usr/share/man \
1164 - ARPDDIR="${EPREFIX%/}"/var/lib/arpd \
1165 - install
1166 -
1167 - dodir /bin
1168 - mv "${ED%/}"/{s,}bin/ip || die #330115
1169 -
1170 - dolib.a lib/libnetlink.a
1171 - insinto /usr/include
1172 - doins include/libnetlink.h
1173 - # This local header pulls in a lot of linux headers it
1174 - # doesn't directly need. Delete this header that requires
1175 - # linux-headers-3.8 until that goes stable. #467716
1176 - sed -i '/linux\/netconf.h/d' "${ED%/}"/usr/include/libnetlink.h || die
1177 -
1178 - if use berkdb ; then
1179 - dodir /var/lib/arpd
1180 - # bug 47482, arpd doesn't need to be in /sbin
1181 - dodir /usr/bin
1182 - mv "${ED%/}"/sbin/arpd "${ED%/}"/usr/bin/ || die
1183 - fi
1184 -}
1185
1186 diff --git a/sys-apps/iproute2/iproute2-4.14.1-r4.ebuild b/sys-apps/iproute2/iproute2-4.14.1-r4.ebuild
1187 deleted file mode 100644
1188 index 0b21a84..0000000
1189 --- a/sys-apps/iproute2/iproute2-4.14.1-r4.ebuild
1190 +++ /dev/null
1191 @@ -1,153 +0,0 @@
1192 -# Copyright 1999-2018 Gentoo Foundation
1193 -# Distributed under the terms of the GNU General Public License v2
1194 -
1195 -EAPI=6
1196 -
1197 -inherit toolchain-funcs flag-o-matic multilib
1198 -
1199 -if [[ ${PV} == "9999" ]] ; then
1200 - EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
1201 - inherit git-r3
1202 -else
1203 - SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
1204 - KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
1205 -fi
1206 -
1207 -DESCRIPTION="kernel routing and traffic control utilities"
1208 -HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
1209 -
1210 -LICENSE="GPL-2"
1211 -SLOT="0"
1212 -IUSE="atm berkdb +iptables ipv6 minimal selinux"
1213 -
1214 -# We could make libmnl optional, but it's tiny, so eh
1215 -RDEPEND="
1216 - !net-misc/arpd
1217 - !minimal? ( net-libs/libmnl virtual/libelf )
1218 - iptables? ( >=net-firewall/iptables-1.4.20:= )
1219 - berkdb? ( sys-libs/db:= )
1220 - atm? ( net-dialup/linux-atm )
1221 - selinux? ( sys-libs/libselinux )
1222 -"
1223 -# We require newer linux-headers for ipset support #549948 and some defines #553876
1224 -DEPEND="
1225 - ${RDEPEND}
1226 - app-arch/xz-utils
1227 - iptables? ( virtual/pkgconfig )
1228 - >=sys-devel/bison-2.4
1229 - sys-devel/flex
1230 - >=sys-kernel/linux-headers-3.16
1231 - elibc_glibc? ( >=sys-libs/glibc-2.7 )
1232 -"
1233 -
1234 -PATCHES=(
1235 - "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
1236 - "${FILESDIR}"/${P}-fix-tc-actions.patch
1237 - "${FILESDIR}"/${P}-configure-nomagic.patch # bug 643722
1238 - "${FILESDIR}"/${P}-posix-shell.patch
1239 - "${FILESDIR}"/${PN}-4.14.0-musl.patch
1240 -)
1241 -
1242 -src_prepare() {
1243 - if ! use ipv6 ; then
1244 - PATCHES+=(
1245 - "${FILESDIR}"/${PN}-4.11.0-no-ipv6.patch #326849
1246 - )
1247 - fi
1248 -
1249 - default
1250 -
1251 - sed -i \
1252 - -e '/^CC :\?=/d' \
1253 - -e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
1254 - -e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
1255 - -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
1256 - -e "/^DBM_INCLUDE/s:=.*:=${T}:" \
1257 - Makefile || die
1258 -
1259 - # Use /run instead of /var/run.
1260 - sed -i \
1261 - -e 's:/var/run:/run:g' \
1262 - include/namespace.h \
1263 - man/man8/ip-netns.8 || die
1264 -
1265 - # build against system headers
1266 - rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
1267 - sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
1268 -
1269 - use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
1270 -}
1271 -
1272 -src_configure() {
1273 - tc-export AR CC PKG_CONFIG
1274 -
1275 - # This sure is ugly. Should probably move into toolchain-funcs at some point.
1276 - local setns
1277 - pushd "${T}" >/dev/null
1278 - printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
1279 - ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
1280 - echo 'int main(){return 0;}' > test.c
1281 - ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
1282 - popd >/dev/null
1283 -
1284 - # run "configure" script first which will create "config.mk"...
1285 - econf
1286 -
1287 - # ...now switch on/off requested features via USE flags
1288 - # this is only useful if the test did not set other things, per bug #643722
1289 - cat <<-EOF >> config.mk
1290 - TC_CONFIG_ATM := $(usex atm y n)
1291 - TC_CONFIG_XT := $(usex iptables y n)
1292 - TC_CONFIG_NO_XT := $(usex iptables n y)
1293 - # We've locked in recent enough kernel headers #549948
1294 - TC_CONFIG_IPSET := y
1295 - HAVE_BERKELEY_DB := $(usex berkdb y n)
1296 - HAVE_MNL := $(usex minimal n y)
1297 - HAVE_ELF := $(usex minimal n y)
1298 - HAVE_SELINUX := $(usex selinux y n)
1299 - IP_CONFIG_SETNS := ${setns}
1300 - # Use correct iptables dir, #144265 #293709
1301 - IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
1302 - EOF
1303 -}
1304 -
1305 -src_compile() {
1306 - emake V=1
1307 -}
1308 -
1309 -src_install() {
1310 - if use minimal ; then
1311 - into /
1312 - dosbin tc/tc
1313 - dobin ip/ip
1314 - return 0
1315 - fi
1316 -
1317 - emake \
1318 - DESTDIR="${D}" \
1319 - LIBDIR="${EPREFIX%/}"/$(get_libdir) \
1320 - SBINDIR="${EPREFIX%/}"/sbin \
1321 - CONFDIR="${EPREFIX%/}"/etc/iproute2 \
1322 - DOCDIR="${EPREFIX%/}"/usr/share/doc/${PF} \
1323 - MANDIR="${EPREFIX%/}"/usr/share/man \
1324 - ARPDDIR="${EPREFIX%/}"/var/lib/arpd \
1325 - install
1326 -
1327 - dodir /bin
1328 - mv "${ED%/}"/{s,}bin/ip || die #330115
1329 -
1330 - dolib.a lib/libnetlink.a
1331 - insinto /usr/include
1332 - doins include/libnetlink.h
1333 - # This local header pulls in a lot of linux headers it
1334 - # doesn't directly need. Delete this header that requires
1335 - # linux-headers-3.8 until that goes stable. #467716
1336 - sed -i '/linux\/netconf.h/d' "${ED%/}"/usr/include/libnetlink.h || die
1337 -
1338 - if use berkdb ; then
1339 - dodir /var/lib/arpd
1340 - # bug 47482, arpd doesn't need to be in /sbin
1341 - dodir /usr/bin
1342 - mv "${ED%/}"/sbin/arpd "${ED%/}"/usr/bin/ || die
1343 - fi
1344 -}
1345
1346 diff --git a/sys-apps/iproute2/iproute2-4.16.0-r1.ebuild b/sys-apps/iproute2/iproute2-4.16.0-r1.ebuild
1347 deleted file mode 100644
1348 index a37012e..0000000
1349 --- a/sys-apps/iproute2/iproute2-4.16.0-r1.ebuild
1350 +++ /dev/null
1351 @@ -1,153 +0,0 @@
1352 -# Copyright 1999-2018 Gentoo Foundation
1353 -# Distributed under the terms of the GNU General Public License v2
1354 -
1355 -EAPI=6
1356 -
1357 -inherit toolchain-funcs flag-o-matic multilib
1358 -
1359 -if [[ ${PV} == "9999" ]] ; then
1360 - EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
1361 - inherit git-r3
1362 -else
1363 - SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
1364 - KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
1365 -fi
1366 -
1367 -DESCRIPTION="kernel routing and traffic control utilities"
1368 -HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
1369 -
1370 -LICENSE="GPL-2"
1371 -SLOT="0"
1372 -IUSE="atm berkdb elf +iptables ipv6 minimal selinux"
1373 -
1374 -# We could make libmnl optional, but it's tiny, so eh
1375 -RDEPEND="
1376 - !net-misc/arpd
1377 - !minimal? ( net-libs/libmnl )
1378 - elf? ( virtual/libelf )
1379 - iptables? ( >=net-firewall/iptables-1.4.20:= )
1380 - berkdb? ( sys-libs/db:= )
1381 - atm? ( net-dialup/linux-atm )
1382 - selinux? ( sys-libs/libselinux )
1383 -"
1384 -# We require newer linux-headers for ipset support #549948 and some defines #553876
1385 -DEPEND="
1386 - ${RDEPEND}
1387 - app-arch/xz-utils
1388 - iptables? ( virtual/pkgconfig )
1389 - >=sys-devel/bison-2.4
1390 - sys-devel/flex
1391 - >=sys-kernel/linux-headers-3.16
1392 - elibc_glibc? ( >=sys-libs/glibc-2.7 )
1393 -"
1394 -
1395 -PATCHES=(
1396 - "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
1397 - "${FILESDIR}"/${PN}-4.16.0-configure-nomagic.patch # bug 643722
1398 - "${FILESDIR}"/${P}-keep-family.patch # bug 652986
1399 - "${FILESDIR}"/${PN}-4.15.0-musl.patch
1400 -)
1401 -
1402 -src_prepare() {
1403 - if ! use ipv6 ; then
1404 - PATCHES+=(
1405 - "${FILESDIR}"/${PN}-4.11.0-no-ipv6.patch #326849
1406 - )
1407 - fi
1408 -
1409 - default
1410 -
1411 - sed -i \
1412 - -e '/^CC :\?=/d' \
1413 - -e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
1414 - -e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
1415 - -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
1416 - -e "/^DBM_INCLUDE/s:=.*:=${T}:" \
1417 - Makefile || die
1418 -
1419 - # Use /run instead of /var/run.
1420 - sed -i \
1421 - -e 's:/var/run:/run:g' \
1422 - include/namespace.h \
1423 - man/man8/ip-netns.8 || die
1424 -
1425 - # build against system headers
1426 - rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
1427 - sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
1428 -
1429 - use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile
1430 -}
1431 -
1432 -src_configure() {
1433 - tc-export AR CC PKG_CONFIG
1434 -
1435 - # This sure is ugly. Should probably move into toolchain-funcs at some point.
1436 - local setns
1437 - pushd "${T}" >/dev/null
1438 - printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
1439 - ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
1440 - echo 'int main(){return 0;}' > test.c
1441 - ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
1442 - popd >/dev/null
1443 -
1444 - # run "configure" script first which will create "config.mk"...
1445 - econf
1446 -
1447 - # ...now switch on/off requested features via USE flags
1448 - # this is only useful if the test did not set other things, per bug #643722
1449 - cat <<-EOF >> config.mk
1450 - TC_CONFIG_ATM := $(usex atm y n)
1451 - TC_CONFIG_XT := $(usex iptables y n)
1452 - TC_CONFIG_NO_XT := $(usex iptables n y)
1453 - # We've locked in recent enough kernel headers #549948
1454 - TC_CONFIG_IPSET := y
1455 - HAVE_BERKELEY_DB := $(usex berkdb y n)
1456 - HAVE_MNL := $(usex minimal n y)
1457 - HAVE_ELF := $(usex elf y n)
1458 - HAVE_SELINUX := $(usex selinux y n)
1459 - IP_CONFIG_SETNS := ${setns}
1460 - # Use correct iptables dir, #144265 #293709
1461 - IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
1462 - EOF
1463 -}
1464 -
1465 -src_compile() {
1466 - emake V=1
1467 -}
1468 -
1469 -src_install() {
1470 - if use minimal ; then
1471 - into /
1472 - dosbin tc/tc
1473 - dobin ip/ip
1474 - return 0
1475 - fi
1476 -
1477 - emake \
1478 - DESTDIR="${D}" \
1479 - LIBDIR="${EPREFIX%/}"/$(get_libdir) \
1480 - SBINDIR="${EPREFIX%/}"/sbin \
1481 - CONFDIR="${EPREFIX%/}"/etc/iproute2 \
1482 - DOCDIR="${EPREFIX%/}"/usr/share/doc/${PF} \
1483 - MANDIR="${EPREFIX%/}"/usr/share/man \
1484 - ARPDDIR="${EPREFIX%/}"/var/lib/arpd \
1485 - install
1486 -
1487 - dodir /bin
1488 - mv "${ED%/}"/{s,}bin/ip || die #330115
1489 -
1490 - dolib.a lib/libnetlink.a
1491 - insinto /usr/include
1492 - doins include/libnetlink.h
1493 - # This local header pulls in a lot of linux headers it
1494 - # doesn't directly need. Delete this header that requires
1495 - # linux-headers-3.8 until that goes stable. #467716
1496 - sed -i '/linux\/netconf.h/d' "${ED%/}"/usr/include/libnetlink.h || die
1497 -
1498 - if use berkdb ; then
1499 - dodir /var/lib/arpd
1500 - # bug 47482, arpd doesn't need to be in /sbin
1501 - dodir /usr/bin
1502 - mv "${ED%/}"/sbin/arpd "${ED%/}"/usr/bin/ || die
1503 - fi
1504 -}