iproute2: bump to version 4.16.0
PATCH 1/1 iproute2: bump to version 4.16.0
Drop uClibc-ng compatibility patch. Current uClibc-ng provides the needed definitions.
Drop the libc-config.h musl compatibility workaround patch. iproute2 update its headers copy to current kernel version for which this workaround is no longer needed.
Don't modify tc/Makefile to make XT_LIB_DIR get the value of IPT_LIB_DIR. Pass the correct value directly in CFLAGS.
Add a patch removing arpd dependency on threading support.
Rename IPROUTE2_WITH_IPTABLES to IPROUTE2_DISABLE_IPTABLES which better describes what it does.
Don't patch the configure script for the cross compiler. The CC environment variable is enough.
Don't force the CCOPTS make variable. The CFLAGS environment variable does the trick for target code.
Don't patch CCOPTS out of netem/Makefile. The CBUILD_CFLAGS environment variable can pass the host CFLAGS to host code.
The ifcfg script is now POSIX shell compatible. Remove its installation dependency on bash.
Pass installation DESTDIR in the environment. Don't force SBINDIR, DOCDIR, and MANDIR. The default values are fine.
--- ...workaround-to-the-libc-compat.h-copy.patch | 38 ------------ .../0001-arpd-remove-pthread-dependency.patch | 37 ++++++++++++ ...-local-PF_VSOCK-AF_VSOCK-definitions.patch | 58 ------------------- package/iproute2/iproute2.hash | 2 +- package/iproute2/iproute2.mk | 39 +++---------- 5 files changed, 46 insertions(+), 128 deletions(-) delete mode 100644 package/iproute2/0001-Add-the-musl-workaround-to-the-libc-compat.h-copy.patch create mode 100644 package/iproute2/0001-arpd-remove-pthread-dependency.patch delete mode 100644 package/iproute2/0002-ss-add-local-PF_VSOCK-AF_VSOCK-definitions.patch
package/iproute2/0001-Add-the-musl-workaround-to-the-libc-compat.h-copy.patch deleted +0 -38
@@ -1,38 +0,0 @@ -From 909a6f10157114e09936d2dd545175d7ed84c0fb Mon Sep 17 00:00:00 2001 -From: Baruch Siach <[email protected]> -Date: Thu, 22 Dec 2016 15:26:30 +0200 -Subject: [PATCH] Add the musl workaround to the libc-compat.h copy - -The libc-compat.h kernel header uses glibc specific macros (__GLIBC__ and -__USE_MISC) to solve conflicts with libc provided headers. This patch makes -libc-compat.h work also for musl libc. - -Signed-off-by: Baruch Siach <[email protected]> ---- -Upstream status: libc-compat.h is a local copy of a kernel headers. A proper -musl fix must go to the kernel first. ---- - include/uapi/linux/libc-compat.h | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h -index 9ab3ace08e2b..e768459d89f9 100644 ---- a/include/uapi/linux/libc-compat.h -+++ b/include/uapi/linux/libc-compat.h -@@ -50,10 +50,12 @@ - #define _LIBC_COMPAT_H - - /* We have included glibc headers... */ --#if defined(__GLIBC__) -+#if 1 -+#define __USE_MISC - - /* Coordinate with glibc net/if.h header. */ - #if defined(_NET_IF_H) && defined(__USE_MISC) -+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0 - - /* GLIBC headers included first so don't define anything - * that would already be defined. */ --- -2.15.0 -
package/iproute2/0001-arpd-remove-pthread-dependency.patch new file +37 -0
@@ -0,0 +1,37 @@ +From 4a4f4d491f89bdd580fdd7a901a3300cb5e9789e Mon Sep 17 00:00:00 2001 +From: Baruch Siach <[email protected]> +Date: Tue, 1 May 2018 15:33:47 +0300 +Subject: [PATCH] arpd: remove pthread dependency + +Explicit link with pthread is not needed when linking dynamically. Even +static link with recent libdb does not pull in the code that uses +pthread. Finally, the configure check introduced in commit a25df4887d7 +(configure: Check for Berkeley DB for arpd compilation) does not add +-lpthread to its link command. + +This change allows arpd build with toolchains that do not provide +threads support. + +Signed-off-by: Baruch Siach <[email protected]> +--- +Upstream status: http://patchwork.ozlabs.org/patch/907031/ + + misc/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/misc/Makefile b/misc/Makefile +index 34ef6b21b4ed..b2dd6b26e2dc 100644 +--- a/misc/Makefile ++++ b/misc/Makefile +@@ -25,7 +25,7 @@ rtacct: rtacct.c + $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o rtacct rtacct.c $(LDLIBS) -lm + + arpd: arpd.c +- $(QUIET_CC)$(CC) $(CFLAGS) -I$(DBM_INCLUDE) $(LDFLAGS) -o arpd arpd.c $(LDLIBS) -ldb -lpthread ++ $(QUIET_CC)$(CC) $(CFLAGS) -I$(DBM_INCLUDE) $(LDFLAGS) -o arpd arpd.c $(LDLIBS) -ldb + + ssfilter.c: ssfilter.y + $(QUIET_YACC)bison ssfilter.y -o ssfilter.c +-- +2.17.0 +
package/iproute2/0002-ss-add-local-PF_VSOCK-AF_VSOCK-definitions.patch deleted +0 -58
58 lines not on this page · raw message
package/iproute2/iproute2.hash +1 -1
@@ -1,3 +1,3 @@ # From https://kernel.org/pub/linux/utils/net/iproute2/sha256sums.asc -sha256 48d4616a99d7b609b7b795c0ae8ec57099fb0271ed89253e8772c02327798355 iproute2-4.15.0.tar.xz +sha256 0c5c24020fd7349fe25728c5edee9fb6a1bc8a38f08e23be5c57a6301e55ee0a iproute2-4.16.0.tar.xz sha256 e6d6a009505e345fe949e1310334fcb0747f28dae2856759de102ab66b722cb4 COPYING
package/iproute2/iproute2.mk +8 -31
@@ -4,7 +4,7 @@ # ################################################################################ -IPROUTE2_VERSION = 4.15.0 +IPROUTE2_VERSION = 4.16.0 IPROUTE2_SOURCE = iproute2-$(IPROUTE2_VERSION).tar.xz IPROUTE2_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/net/iproute2 IPROUTE2_DEPENDENCIES = host-bison host-flex host-pkgconf \
@@ -22,57 +22,34 @@ ifeq ($(BR2_PACKAGE_ELFUTILS),y) IPROUTE2_DEPENDENCIES += elfutils endif -# If we've got iptables enable xtables support for tc ifeq ($(BR2_PACKAGE_IPTABLES)x$(BR2_STATIC_LIBS),yx) IPROUTE2_DEPENDENCIES += iptables -define IPROUTE2_WITH_IPTABLES - # Makefile is busted so it never passes IPT_LIB_DIR properly - $(SED) "s/-DIPT/-DXT/" $(@D)/tc/Makefile -endef else -define IPROUTE2_WITH_IPTABLES +define IPROUTE2_DISABLE_IPTABLES # m_xt.so is built unconditionally echo "TC_CONFIG_XT:=n" >>$(@D)/config.mk endef endif -# arpd needs BerkeleyDB and links against pthread -ifeq ($(BR2_PACKAGE_BERKELEYDB_COMPAT185)$(BR2_TOOLCHAIN_HAS_THREADS),yy) +ifeq ($(BR2_PACKAGE_BERKELEYDB_COMPAT185),y) IPROUTE2_DEPENDENCIES += berkeleydb -else -define IPROUTE2_DISABLE_ARPD - echo "HAVE_BERKELEY_DB:=n" >> $(@D)/config.mk -endef -endif - -# ifcfg needs bash -ifeq ($(BR2_PACKAGE_BASH),) -define IPROUTE2_REMOVE_IFCFG - rm -f $(TARGET_DIR)/sbin/ifcfg -endef endif define IPROUTE2_CONFIGURE_CMDS - $(SED) 's/gcc/$$CC $$CFLAGS/g' $(@D)/configure cd $(@D) && $(TARGET_CONFIGURE_OPTS) ./configure - $(IPROUTE2_DISABLE_ARPD) - $(IPROUTE2_WITH_IPTABLES) + $(IPROUTE2_DISABLE_IPTABLES) endef define IPROUTE2_BUILD_CMDS - $(SED) 's/$$(CCOPTS)//' $(@D)/netem/Makefile - $(TARGET_MAKE_ENV) LDFLAGS="$(TARGET_LDFLAGS)" $(MAKE) \ + $(TARGET_MAKE_ENV) LDFLAGS="$(TARGET_LDFLAGS)" \ + CFLAGS="$(TARGET_CFLAGS) -DXT_LIB_DIR=\\\"/usr/lib/xtables\\\"" \ + CBUILD_CFLAGS="$(HOST_CFLAGS)" $(MAKE) V=1 LIBDB_LIBS=-lpthread \ DBM_INCLUDE="$(STAGING_DIR)/usr/include" \ - CCOPTS="$(TARGET_CFLAGS) -D_GNU_SOURCE" \ SHARED_LIBS="$(if $(BR2_STATIC_LIBS),n,y)" -C $(@D) endef define IPROUTE2_INSTALL_TARGET_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" \ - SBINDIR=/sbin \ - DOCDIR=/usr/share/doc/iproute2-$(IPROUTE2_VERSION) \ - MANDIR=/usr/share/man install - $(IPROUTE2_REMOVE_IFCFG) + $(TARGET_MAKE_ENV) DESTDIR="$(TARGET_DIR)" $(MAKE) -C $(@D) install endef $(eval $(generic-package))
Signature · 1 line
2.17.0
Thomas Petazzoni
AppliedPATCH 1/1 iproute2: bump to version 4.16.0
Hello,
Quoted 31 lines · Baruch Siach
Drop uClibc-ng compatibility patch. Current uClibc-ng provides the needed definitions.
Drop the
libc-config.hmusl compatibility workaround patch. iproute2 update its headers copy to current kernel version for which this workaround is no longer needed.Don't modify tc/Makefile to make
XT_LIB_DIRget the value ofIPT_LIB_DIR. Pass the correct value directly in CFLAGS.Add a patch removing arpd dependency on threading support.
Rename
IPROUTE2_WITH_IPTABLEStoIPROUTE2_DISABLE_IPTABLESwhich better describes what it does.Don't patch the configure script for the cross compiler. The CC environment variable is enough.
Don't force the CCOPTS make variable. The CFLAGS environment variable does the trick for target code.
Don't patch CCOPTS out of netem/Makefile. The
CBUILD_CFLAGSenvironment variable can pass the host CFLAGS to host code.The ifcfg script is now POSIX shell compatible. Remove its installation dependency on bash.
Pass installation DESTDIR in the environment. Don't force SBINDIR, DOCDIR, and MANDIR. The default values are fine.
Signed-off-by Baruch Siach <[email protected]>
Quoted 10 lines
--- ...workaround-to-the-libc-compat.h-copy.patch | 38 ------------ .../0001-arpd-remove-pthread-dependency.patch | 37 ++++++++++++ ...-local-PF_VSOCK-AF_VSOCK-definitions.patch | 58 ------------------- package/iproute2/iproute2.hash | 2 +- package/iproute2/iproute2.mk | 39 +++---------- 5 files changed, 46 insertions(+), 128 deletions(-) delete mode 100644 package/iproute2/0001-Add-the-musl-workaround-to-the-libc-compat.h-copy.patch create mode 100644 package/iproute2/0001-arpd-remove-pthread-dependency.patch delete mode 100644 package/iproute2/0002-ss-add-local-PF_VSOCK-AF_VSOCK-definitions.patch
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com