From 84287daee01e5f8661dbf5098f4eb2f4d0b1b959 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Fri, 3 Jan 2025 11:45:18 +0100 Subject: iproute2: update 6.11.0 -> 6.12.0 (From OE-Core rev: f8c665ca16bf643039bd3f0a918ea9cf9d1a3726) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- ...netlink.h-add-missing-include-for-htobe64.patch | 2 +- .../0001-ip-rearrange-and-prune-header-files.patch | 90 ++++++++++++++++ .../0002-bridge-mst-fix-a-musl-build-issue.patch | 76 -------------- ...bridge-mst-fix-a-further-musl-build-issue.patch | 59 ----------- .../iproute2/iproute2_6.11.0.bb | 116 --------------------- .../iproute2/iproute2_6.12.0.bb | 112 ++++++++++++++++++++ 6 files changed, 203 insertions(+), 252 deletions(-) create mode 100644 meta/recipes-connectivity/iproute2/iproute2/0001-ip-rearrange-and-prune-header-files.patch delete mode 100644 meta/recipes-connectivity/iproute2/iproute2/0002-bridge-mst-fix-a-musl-build-issue.patch delete mode 100644 meta/recipes-connectivity/iproute2/iproute2/0003-bridge-mst-fix-a-further-musl-build-issue.patch delete mode 100644 meta/recipes-connectivity/iproute2/iproute2_6.11.0.bb create mode 100644 meta/recipes-connectivity/iproute2/iproute2_6.12.0.bb (limited to 'meta/recipes-connectivity') diff --git a/meta/recipes-connectivity/iproute2/iproute2/0001-include-libnetlink.h-add-missing-include-for-htobe64.patch b/meta/recipes-connectivity/iproute2/iproute2/0001-include-libnetlink.h-add-missing-include-for-htobe64.patch index 555d63b240..03af400ecd 100644 --- a/meta/recipes-connectivity/iproute2/iproute2/0001-include-libnetlink.h-add-missing-include-for-htobe64.patch +++ b/meta/recipes-connectivity/iproute2/iproute2/0001-include-libnetlink.h-add-missing-include-for-htobe64.patch @@ -1,4 +1,4 @@ -From f3c574b27000fd887cee84ab47adf23f767cbea1 Mon Sep 17 00:00:00 2001 +From 4dc0613e229f6b4a57beb00dde14ef319a2dcad8 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Sat, 24 Aug 2024 15:32:25 +0200 Subject: [PATCH] include/libnetlink.h: add missing include for htobe64 diff --git a/meta/recipes-connectivity/iproute2/iproute2/0001-ip-rearrange-and-prune-header-files.patch b/meta/recipes-connectivity/iproute2/iproute2/0001-ip-rearrange-and-prune-header-files.patch new file mode 100644 index 0000000000..2f77910614 --- /dev/null +++ b/meta/recipes-connectivity/iproute2/iproute2/0001-ip-rearrange-and-prune-header-files.patch @@ -0,0 +1,90 @@ +From 714291a63246cb3e6b86eb2a78fa84216d768a4b Mon Sep 17 00:00:00 2001 +From: Stephen Hemminger +Date: Tue, 10 Dec 2024 13:38:08 -0800 +Subject: [PATCH] ip: rearrange and prune header files + +The recent report of issues with missing limits.h impacting musl +suggested looking at what files are and are not included in ip code. + +The standard practice is to put standard headers first, then system, +then local headers. Used iwyu to get suggestions about missing +and extraneous headers. + +Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=7e23da91fca6e5dedeb32a7d308cf20982e897c3] +Signed-off-by: Stephen Hemminger +Signed-off-by: Alexander Kanavin +--- + ip/iplink.c | 13 +++++-------- + ip/ipnetns.c | 19 +++++++++---------- + 2 files changed, 14 insertions(+), 18 deletions(-) + +diff --git a/ip/iplink.c b/ip/iplink.c +index e650a5c2..8df367ed 100644 +--- a/ip/iplink.c ++++ b/ip/iplink.c +@@ -11,17 +11,14 @@ + #include + #include + #include ++#include ++#include ++#include ++ + #include ++#include + #include +-#include + #include +-#include +-#include +-#include +-#include +-#include +-#include +-#include + + #include "rt_names.h" + #include "utils.h" +diff --git a/ip/ipnetns.c b/ip/ipnetns.c +index 5c943400..a20cd8bc 100644 +--- a/ip/ipnetns.c ++++ b/ip/ipnetns.c +@@ -1,21 +1,21 @@ + /* SPDX-License-Identifier: GPL-2.0 */ + #define _ATFILE_SOURCE +-#include +-#include +-#include +-#include +-#include +-#include +-#include ++ + #include ++#include + #include +-#include + #include + #include + #include + #include + #include +-#include ++#include ++ ++#include ++#include ++#include ++#include ++#include + + #include + +@@ -23,7 +23,6 @@ + #include "list.h" + #include "ip_common.h" + #include "namespace.h" +-#include "json_print.h" + + static int usage(void) + { diff --git a/meta/recipes-connectivity/iproute2/iproute2/0002-bridge-mst-fix-a-musl-build-issue.patch b/meta/recipes-connectivity/iproute2/iproute2/0002-bridge-mst-fix-a-musl-build-issue.patch deleted file mode 100644 index 3e266b9298..0000000000 --- a/meta/recipes-connectivity/iproute2/iproute2/0002-bridge-mst-fix-a-musl-build-issue.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 6a77abab92516e65f07f8657fc4e384c4541ce0e Mon Sep 17 00:00:00 2001 -From: Dario Binacchi -Date: Sun, 22 Sep 2024 16:50:10 +0200 -Subject: [PATCH] bridge: mst: fix a musl build issue - -This patch fixes a compilation error raised by the bump to version 6.11.0 -in Buildroot using musl as the C library for the cross-compilation -toolchain. - -After setting the CFLGAS - -ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) -IPROUTE2_CFLAGS += -D__UAPI_DEF_IN6_ADDR=0 -D__UAPI_DEF_SOCKADDR_IN6=0 \ - -D__UAPI_DEF_IPV6_MREQ=0 -endif - -to fix the following errors: - -In file included from ../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/arpa/inet.h:9, - from ../include/libnetlink.h:14, - from mst.c:10: -../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:23:8: error: redefinition of 'struct in6_addr' - 23 | struct in6_addr { - | ^~~~~~~~ -In file included from ../include/uapi/linux/if_bridge.h:19, - from mst.c:7: -../include/uapi/linux/in6.h:33:8: note: originally defined here - 33 | struct in6_addr { - | ^~~~~~~~ -../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:34:8: error: redefinition of 'struct sockaddr_in6' - 34 | struct sockaddr_in6 { - | ^~~~~~~~~~~~ -../include/uapi/linux/in6.h:50:8: note: originally defined here - 50 | struct sockaddr_in6 { - | ^~~~~~~~~~~~ -../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:42:8: error: redefinition of 'struct ipv6_mreq' - 42 | struct ipv6_mreq { - | ^~~~~~~~~ -../include/uapi/linux/in6.h:60:8: note: originally defined here - 60 | struct ipv6_mreq { - -I got this further errors - -../include/uapi/linux/in6.h:72:25: error: field 'flr_dst' has incomplete type - 72 | struct in6_addr flr_dst; - | ^~~~~~~ -../include/uapi/linux/if_bridge.h:711:41: error: field 'ip6' has incomplete type - 711 | struct in6_addr ip6; - | ^~~ - -fixed by including the netinet/in.h header. - -Upstream-Status: Backport -[https://kernel.googlesource.com/pub/scm/network/iproute2/iproute2/+/6a77abab92516e65f07f8657fc4e384c4541ce0e] - -Signed-off-by: Dario Binacchi -Signed-off-by: Stephen Hemminger ---- - bridge/mst.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/bridge/mst.c b/bridge/mst.c -index 873ca536..c8f7e660 100644 ---- a/bridge/mst.c -+++ b/bridge/mst.c -@@ -4,6 +4,7 @@ - */ - - #include -+#include - #include - #include - --- -2.39.5 (Apple Git-154) - diff --git a/meta/recipes-connectivity/iproute2/iproute2/0003-bridge-mst-fix-a-further-musl-build-issue.patch b/meta/recipes-connectivity/iproute2/iproute2/0003-bridge-mst-fix-a-further-musl-build-issue.patch deleted file mode 100644 index 6a30f6dcf8..0000000000 --- a/meta/recipes-connectivity/iproute2/iproute2/0003-bridge-mst-fix-a-further-musl-build-issue.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 043ef90e2fa94397eb5c85330889ca4146a6d58a Mon Sep 17 00:00:00 2001 -From: Dario Binacchi -Date: Sun, 22 Sep 2024 16:50:11 +0200 -Subject: [PATCH] bridge: mst: fix a further musl build issue - -This patch fixes the following build errors: - -In file included from mst.c:11: -../include/json_print.h:80:30: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration - 80 | _PRINT_FUNC(tv, const struct timeval *) - | ^~~~~~~ -../include/json_print.h:50:37: note: in definition of macro '_PRINT_FUNC' - 50 | type value); \ - | ^~~~ -../include/json_print.h:80:30: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration - 80 | _PRINT_FUNC(tv, const struct timeval *) - | ^~~~~~~ -../include/json_print.h:55:45: note: in definition of macro '_PRINT_FUNC' - 55 | type value) \ - | ^~~~ -../include/json_print.h: In function 'print_tv': -../include/json_print.h:58:48: error: passing argument 5 of 'print_color_tv' from incompatible pointer type [-Wincompatible-pointer-types] - 58 | value); \ - | ^~~~~ - | | - | const struct timeval * -../include/json_print.h:80:1: note: in expansion of macro '_PRINT_FUNC' - 80 | _PRINT_FUNC(tv, const struct timeval *) - | ^~~~~~~~~~~ -../include/json_print.h:50:42: note: expected 'const struct timeval *' but argument is of type 'const struct timeval *' - 50 | type value); \ - | ^ -../include/json_print.h:80:1: note: in expansion of macro '_PRINT_FUNC' - 80 | _PRINT_FUNC(tv, const struct timeval *) - -Upstream-Status: Backport -[https://kernel.googlesource.com/pub/scm/network/iproute2/iproute2/+/043ef90e2fa94397eb5c85330889ca4146a6d58a] - -Signed-off-by: Dario Binacchi -Signed-off-by: Stephen Hemminger ---- - bridge/mst.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/bridge/mst.c b/bridge/mst.c -index c8f7e660..fccb7fd6 100644 ---- a/bridge/mst.c -+++ b/bridge/mst.c -@@ -4,6 +4,7 @@ - */ - - #include -+#include - #include - #include - #include --- -2.39.5 (Apple Git-154) - diff --git a/meta/recipes-connectivity/iproute2/iproute2_6.11.0.bb b/meta/recipes-connectivity/iproute2/iproute2_6.11.0.bb deleted file mode 100644 index 652484a94d..0000000000 --- a/meta/recipes-connectivity/iproute2/iproute2_6.11.0.bb +++ /dev/null @@ -1,116 +0,0 @@ -SUMMARY = "TCP / IP networking and traffic control utilities" -DESCRIPTION = "Iproute2 is a collection of utilities for controlling \ -TCP / IP networking and traffic control in Linux. Of the utilities ip \ -and tc are the most important. ip controls IPv4 and IPv6 \ -configuration and tc stands for traffic control." -HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2" -SECTION = "base" -LICENSE = "GPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ - " - -DEPENDS = "flex-native bison-native iptables libcap" - -SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \ - file://0001-include-libnetlink.h-add-missing-include-for-htobe64.patch \ - " - -SRC_URI:append:libc-musl = "\ - file://0002-bridge-mst-fix-a-musl-build-issue.patch \ - file://0003-bridge-mst-fix-a-further-musl-build-issue.patch \ - " - -SRC_URI[sha256sum] = "1f795398a04aeaacd06a8f6ace2cfd913c33fa5953ca99daae83bb5c534611c3" - -inherit update-alternatives bash-completion pkgconfig - -PACKAGECONFIG ??= "tipc elf devlink" -PACKAGECONFIG[tipc] = ",,libmnl," -PACKAGECONFIG[elf] = ",,elfutils," -PACKAGECONFIG[devlink] = ",,libmnl," -PACKAGECONFIG[rdma] = ",,libmnl," -PACKAGECONFIG[selinux] = ",,libselinux" - -IPROUTE2_MAKE_SUBDIRS = "lib tc ip bridge misc genl ${@bb.utils.filter('PACKAGECONFIG', 'devlink tipc rdma', d)}" - -# This is needed with GCC-14 and musl -CFLAGS += "-Wno-error=incompatible-pointer-types" -# CFLAGS are computed in Makefile and reference CCOPTS -# -EXTRA_OEMAKE = "\ - CC='${CC}' \ - KERNEL_INCLUDE=${STAGING_INCDIR} \ - DOCDIR=${docdir}/iproute2 \ - SUBDIRS='${IPROUTE2_MAKE_SUBDIRS}' \ - SBINDIR='${base_sbindir}' \ - CONF_USR_DIR='${libdir}/iproute2' \ - LIBDIR='${libdir}' \ - CCOPTS='${CFLAGS}' \ -" - -do_configure:append () { - sh configure ${STAGING_INCDIR} - # Explicitly disable ATM support - sed -i -e '/TC_CONFIG_ATM/d' config.mk -} - -do_install () { - oe_runmake DESTDIR=${D} install - mv ${D}${base_sbindir}/ip ${D}${base_sbindir}/ip.iproute2 - install -d ${D}${datadir} - mv ${D}/share/* ${D}${datadir}/ || true - rm ${D}/share -rf || true - - # Remove support fot ipt and xt in tc. So tc library directory is not needed. - rm ${D}${libdir}/tc -rf -} - -# The .so files in iproute2-tc are modules, not traditional libraries -INSANE_SKIP:${PN}-tc = "dev-so" - -IPROUTE2_PACKAGES =+ "\ - ${PN}-bridge \ - ${PN}-devlink \ - ${PN}-genl \ - ${PN}-ifstat \ - ${PN}-ip \ - ${PN}-lnstat \ - ${PN}-nstat \ - ${PN}-routel \ - ${PN}-rtacct \ - ${PN}-ss \ - ${PN}-tc \ - ${PN}-tipc \ - ${PN}-rdma \ -" - -PACKAGE_BEFORE_PN = "${IPROUTE2_PACKAGES}" -RDEPENDS:${PN} += "${PN}-ip" - -FILES:${PN}-tc = "${base_sbindir}/tc* \ - ${libdir}/tc/*.so" -FILES:${PN}-lnstat = "${base_sbindir}/lnstat \ - ${base_sbindir}/ctstat \ - ${base_sbindir}/rtstat" -FILES:${PN}-ifstat = "${base_sbindir}/ifstat" -FILES:${PN}-ip = "${base_sbindir}/ip.* ${libdir}/iproute2" -FILES:${PN}-genl = "${base_sbindir}/genl" -FILES:${PN}-rtacct = "${base_sbindir}/rtacct" -FILES:${PN}-nstat = "${base_sbindir}/nstat" -FILES:${PN}-ss = "${base_sbindir}/ss" -FILES:${PN}-tipc = "${base_sbindir}/tipc" -FILES:${PN}-devlink = "${base_sbindir}/devlink" -FILES:${PN}-rdma = "${base_sbindir}/rdma" -FILES:${PN}-routel = "${base_sbindir}/routel" -FILES:${PN}-bridge = "${base_sbindir}/bridge" - -RDEPENDS:${PN}-routel = "python3-core" - -ALTERNATIVE:${PN}-ip = "ip" -ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}" -ALTERNATIVE_LINK_NAME[ip] = "${base_sbindir}/ip" -ALTERNATIVE_PRIORITY = "100" - -ALTERNATIVE:${PN}-tc = "tc" -ALTERNATIVE_LINK_NAME[tc] = "${base_sbindir}/tc" -ALTERNATIVE_PRIORITY_${PN}-tc = "100" diff --git a/meta/recipes-connectivity/iproute2/iproute2_6.12.0.bb b/meta/recipes-connectivity/iproute2/iproute2_6.12.0.bb new file mode 100644 index 0000000000..741d54799d --- /dev/null +++ b/meta/recipes-connectivity/iproute2/iproute2_6.12.0.bb @@ -0,0 +1,112 @@ +SUMMARY = "TCP / IP networking and traffic control utilities" +DESCRIPTION = "Iproute2 is a collection of utilities for controlling \ +TCP / IP networking and traffic control in Linux. Of the utilities ip \ +and tc are the most important. ip controls IPv4 and IPv6 \ +configuration and tc stands for traffic control." +HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2" +SECTION = "base" +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ + " + +DEPENDS = "flex-native bison-native iptables libcap" + +SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \ + file://0001-include-libnetlink.h-add-missing-include-for-htobe64.patch \ + file://0001-ip-rearrange-and-prune-header-files.patch \ + " + +SRC_URI[sha256sum] = "bbd141ef7b5d0127cc2152843ba61f274dc32814fa3e0f13e7d07a080bef53d9" + +inherit update-alternatives bash-completion pkgconfig + +PACKAGECONFIG ??= "tipc elf devlink" +PACKAGECONFIG[tipc] = ",,libmnl," +PACKAGECONFIG[elf] = ",,elfutils," +PACKAGECONFIG[devlink] = ",,libmnl," +PACKAGECONFIG[rdma] = ",,libmnl," +PACKAGECONFIG[selinux] = ",,libselinux" + +IPROUTE2_MAKE_SUBDIRS = "lib tc ip bridge misc genl ${@bb.utils.filter('PACKAGECONFIG', 'devlink tipc rdma', d)}" + +# This is needed with GCC-14 and musl +CFLAGS += "-Wno-error=incompatible-pointer-types" +# CFLAGS are computed in Makefile and reference CCOPTS +# +EXTRA_OEMAKE = "\ + CC='${CC}' \ + KERNEL_INCLUDE=${STAGING_INCDIR} \ + DOCDIR=${docdir}/iproute2 \ + SUBDIRS='${IPROUTE2_MAKE_SUBDIRS}' \ + SBINDIR='${base_sbindir}' \ + CONF_USR_DIR='${libdir}/iproute2' \ + LIBDIR='${libdir}' \ + CCOPTS='${CFLAGS}' \ +" + +do_configure:append () { + sh configure ${STAGING_INCDIR} + # Explicitly disable ATM support + sed -i -e '/TC_CONFIG_ATM/d' config.mk +} + +do_install () { + oe_runmake DESTDIR=${D} install + mv ${D}${base_sbindir}/ip ${D}${base_sbindir}/ip.iproute2 + install -d ${D}${datadir} + mv ${D}/share/* ${D}${datadir}/ || true + rm ${D}/share -rf || true + + # Remove support fot ipt and xt in tc. So tc library directory is not needed. + rm ${D}${libdir}/tc -rf +} + +# The .so files in iproute2-tc are modules, not traditional libraries +INSANE_SKIP:${PN}-tc = "dev-so" + +IPROUTE2_PACKAGES =+ "\ + ${PN}-bridge \ + ${PN}-devlink \ + ${PN}-genl \ + ${PN}-ifstat \ + ${PN}-ip \ + ${PN}-lnstat \ + ${PN}-nstat \ + ${PN}-routel \ + ${PN}-rtacct \ + ${PN}-ss \ + ${PN}-tc \ + ${PN}-tipc \ + ${PN}-rdma \ +" + +PACKAGE_BEFORE_PN = "${IPROUTE2_PACKAGES}" +RDEPENDS:${PN} += "${PN}-ip" + +FILES:${PN}-tc = "${base_sbindir}/tc* \ + ${libdir}/tc/*.so" +FILES:${PN}-lnstat = "${base_sbindir}/lnstat \ + ${base_sbindir}/ctstat \ + ${base_sbindir}/rtstat" +FILES:${PN}-ifstat = "${base_sbindir}/ifstat" +FILES:${PN}-ip = "${base_sbindir}/ip.* ${libdir}/iproute2" +FILES:${PN}-genl = "${base_sbindir}/genl" +FILES:${PN}-rtacct = "${base_sbindir}/rtacct" +FILES:${PN}-nstat = "${base_sbindir}/nstat" +FILES:${PN}-ss = "${base_sbindir}/ss" +FILES:${PN}-tipc = "${base_sbindir}/tipc" +FILES:${PN}-devlink = "${base_sbindir}/devlink" +FILES:${PN}-rdma = "${base_sbindir}/rdma" +FILES:${PN}-routel = "${base_sbindir}/routel" +FILES:${PN}-bridge = "${base_sbindir}/bridge" + +RDEPENDS:${PN}-routel = "python3-core" + +ALTERNATIVE:${PN}-ip = "ip" +ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}" +ALTERNATIVE_LINK_NAME[ip] = "${base_sbindir}/ip" +ALTERNATIVE_PRIORITY = "100" + +ALTERNATIVE:${PN}-tc = "tc" +ALTERNATIVE_LINK_NAME[tc] = "${base_sbindir}/tc" +ALTERNATIVE_PRIORITY_${PN}-tc = "100" -- cgit v1.2.3-54-g00ecf