diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2019-01-08 11:51:58 +0100 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2019-01-08 11:51:58 +0100 |
commit | b7e2c129c2c3fdd467ddaccd85b5adcecbffefdc (patch) | |
tree | c34a73e52706700d33bae22d0b228042d395df1e /sys-apps/iproute2/files | |
parent | net-misc/lldpd: Added dependency on sys-libs/readline (diff) | |
download | gentoo-b7e2c129c2c3fdd467ddaccd85b5adcecbffefdc.tar.gz gentoo-b7e2c129c2c3fdd467ddaccd85b5adcecbffefdc.tar.bz2 gentoo-b7e2c129c2c3fdd467ddaccd85b5adcecbffefdc.zip |
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@gentoo.org>
Diffstat (limited to 'sys-apps/iproute2/files')
-rw-r--r-- | sys-apps/iproute2/files/iproute2-4.20.0-configure-nomagic.patch | 208 | ||||
-rw-r--r-- | sys-apps/iproute2/files/iproute2-4.20.0-no-ipv6.patch | 38 |
2 files changed, 246 insertions, 0 deletions
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 000000000000..94df85017dfe --- /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 000000000000..31733e99f72c --- /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 \ |