commit:     f5b30611ae531c861d26f859cd888c3b6c3cc87d
Author:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Tue Apr  3 18:16:03 2018 +0000
Commit:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Tue Apr  3 18:16:03 2018 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=f5b30611

sys-apps/iproute2: version bump to 4.16.0

 sys-apps/iproute2/Manifest                         |   1 +
 .../files/iproute2-4.16.0-configure-nomagic.patch  | 191 +++++++++++++++++++++
 sys-apps/iproute2/iproute2-4.15.0.ebuild           |   7 +-
 ...route2-4.15.0.ebuild => iproute2-4.16.0.ebuild} |   9 +-
 sys-apps/iproute2/metadata.xml                     |   1 +
 5 files changed, 202 insertions(+), 7 deletions(-)

diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest
index 0390df9..769cee9 100644
--- a/sys-apps/iproute2/Manifest
+++ b/sys-apps/iproute2/Manifest
@@ -1,2 +1,3 @@
 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

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 0000000..01a1fe2
--- /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 <robb...@gentoo.org>
+
+Forward-ported from v4.14.1 to v4.16.0 by Lars Wendler 
<polynomia...@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.15.0.ebuild 
b/sys-apps/iproute2/iproute2-4.15.0.ebuild
index fddcf37..4b485e8 100644
--- a/sys-apps/iproute2/iproute2-4.15.0.ebuild
+++ b/sys-apps/iproute2/iproute2-4.15.0.ebuild
@@ -18,12 +18,13 @@ 
HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2";
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="atm berkdb +iptables ipv6 minimal selinux"
+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 virtual/libelf )
+       !minimal? ( net-libs/libmnl )
+       elf? ( virtual/libelf )
        iptables? ( >=net-firewall/iptables-1.4.20:= )
        berkdb? ( sys-libs/db:= )
        atm? ( net-dialup/linux-atm )
@@ -102,7 +103,7 @@ src_configure() {
        TC_CONFIG_IPSET := y
        HAVE_BERKELEY_DB := $(usex berkdb y n)
        HAVE_MNL      := $(usex minimal n y)
-       HAVE_ELF      := $(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

diff --git a/sys-apps/iproute2/iproute2-4.15.0.ebuild 
b/sys-apps/iproute2/iproute2-4.16.0.ebuild
similarity index 95%
copy from sys-apps/iproute2/iproute2-4.15.0.ebuild
copy to sys-apps/iproute2/iproute2-4.16.0.ebuild
index fddcf37..842de0b 100644
--- a/sys-apps/iproute2/iproute2-4.15.0.ebuild
+++ b/sys-apps/iproute2/iproute2-4.16.0.ebuild
@@ -18,12 +18,13 @@ 
HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2";
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="atm berkdb +iptables ipv6 minimal selinux"
+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 virtual/libelf )
+       !minimal? ( net-libs/libmnl )
+       elf? ( virtual/libelf )
        iptables? ( >=net-firewall/iptables-1.4.20:= )
        berkdb? ( sys-libs/db:= )
        atm? ( net-dialup/linux-atm )
@@ -42,7 +43,7 @@ DEPEND="
 
 PATCHES=(
        "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
-       "${FILESDIR}"/${PN}-4.14.1-configure-nomagic.patch # bug 643722
+       "${FILESDIR}"/${PN}-4.16.0-configure-nomagic.patch # bug 643722
        "${FILESDIR}"/${PN}-4.15.0-musl.patch
 )
 
@@ -102,7 +103,7 @@ src_configure() {
        TC_CONFIG_IPSET := y
        HAVE_BERKELEY_DB := $(usex berkdb y n)
        HAVE_MNL      := $(usex minimal n y)
-       HAVE_ELF      := $(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

diff --git a/sys-apps/iproute2/metadata.xml b/sys-apps/iproute2/metadata.xml
index 2605d5f..ad652ef 100644
--- a/sys-apps/iproute2/metadata.xml
+++ b/sys-apps/iproute2/metadata.xml
@@ -7,6 +7,7 @@
 </maintainer>
 <use>
        <flag name="berkdb">build programs that use berkdb (just arpd)</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="minimal">only install ip and tc programs, without eBPF 
support</flag>
 </use>

Reply via email to