From 3b47273cedad16ccf3b5ea22bfa88b6fe85a2c13 Mon Sep 17 00:00:00 2001 From: Yi Zhao Date: Fri, 14 Jan 2022 09:39:39 +0800 Subject: bridge-utils: upgrade 1.7 -> 1.7.1 * Update SRC_URI to official git repo per [1] * Refresh patches * Backport a patch to fix build error with musl [1] https://wiki.linuxfoundation.org/networking/bridge Signed-off-by: Yi Zhao Signed-off-by: Khem Raj --- .../0001-include-missing-kernel-header.patch | 33 +++++ ...uild-don-t-ignore-CFLAGS-from-environment.patch | 40 ++++++ ...ridge-Modifying-the-AR-to-cross-toolchain.patch | 51 +++++++ .../bridge-utils/0004-cleanup-includes.patch | 149 +++++++++++++++++++++ ...uild-don-t-ignore-CFLAGS-from-environment.patch | 40 ------ ...ridge-Modifying-the-AR-to-cross-toolchain.patch | 51 ------- .../bridge-utils/bridge-utils/kernel-headers.patch | 33 ----- .../bridge-utils/bridge-utils_1.7.1.bb | 36 +++++ .../bridge-utils/bridge-utils_1.7.bb | 35 ----- 9 files changed, 309 insertions(+), 159 deletions(-) create mode 100644 meta-networking/recipes-support/bridge-utils/bridge-utils/0001-include-missing-kernel-header.patch create mode 100644 meta-networking/recipes-support/bridge-utils/bridge-utils/0002-build-don-t-ignore-CFLAGS-from-environment.patch create mode 100644 meta-networking/recipes-support/bridge-utils/bridge-utils/0003-libbridge-Modifying-the-AR-to-cross-toolchain.patch create mode 100644 meta-networking/recipes-support/bridge-utils/bridge-utils/0004-cleanup-includes.patch delete mode 100644 meta-networking/recipes-support/bridge-utils/bridge-utils/0005-build-don-t-ignore-CFLAGS-from-environment.patch delete mode 100644 meta-networking/recipes-support/bridge-utils/bridge-utils/0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch delete mode 100644 meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch create mode 100644 meta-networking/recipes-support/bridge-utils/bridge-utils_1.7.1.bb delete mode 100644 meta-networking/recipes-support/bridge-utils/bridge-utils_1.7.bb (limited to 'meta-networking/recipes-support/bridge-utils') diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils/0001-include-missing-kernel-header.patch b/meta-networking/recipes-support/bridge-utils/bridge-utils/0001-include-missing-kernel-header.patch new file mode 100644 index 0000000000..dbd6b18c42 --- /dev/null +++ b/meta-networking/recipes-support/bridge-utils/bridge-utils/0001-include-missing-kernel-header.patch @@ -0,0 +1,33 @@ +From 203801ae47399569868aa468988e711ba3ddfa92 Mon Sep 17 00:00:00 2001 +From: Joe MacDonald +Date: Mon, 30 Oct 2017 13:18:20 -0400 +Subject: [PATCH] include missing kernel header + +Fixes errors like + +| /b/kraj/jlinux-next/poky/build/tmp-eglibc/sysroots/re-64b/usr/include/linux/if_bridge.h:172:20: error: field 'ip6' has incomplete type +| In file included from ../libbridge/libbridge.h:24:0, + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +Signed-off-by: Joe MacDonald +--- + libbridge/libbridge.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libbridge/libbridge.h b/libbridge/libbridge.h +index 962f316..422ec33 100644 +--- a/libbridge/libbridge.h ++++ b/libbridge/libbridge.h +@@ -24,6 +24,7 @@ + #include + #include + ++#include + #include + #include + +-- +2.17.1 + diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils/0002-build-don-t-ignore-CFLAGS-from-environment.patch b/meta-networking/recipes-support/bridge-utils/bridge-utils/0002-build-don-t-ignore-CFLAGS-from-environment.patch new file mode 100644 index 0000000000..5ec563b6b1 --- /dev/null +++ b/meta-networking/recipes-support/bridge-utils/bridge-utils/0002-build-don-t-ignore-CFLAGS-from-environment.patch @@ -0,0 +1,40 @@ +From 0c1a66fc62cc321d307c94f962031283142eea69 Mon Sep 17 00:00:00 2001 +From: Joe MacDonald +Date: Mon, 30 Oct 2017 13:37:48 -0400 +Subject: [PATCH] build: don't ignore CFLAGS from environment +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +We need to take them into account so as to behave nicely towards +build environments which expect to be able to set them, e.g. for +optimisation flags, or debug options. + +Therefore they need to be added to the compiler command line of +every source file, and in addition, the same CFLAGS that were +used during compilation must also always be used during linking! + +Upstream-Status: Pending + +Signed-off-by: André Draszik +Signed-off-by: Joe MacDonald +--- + brctl/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/brctl/Makefile.in b/brctl/Makefile.in +index e1956d6..eff260c 100644 +--- a/brctl/Makefile.in ++++ b/brctl/Makefile.in +@@ -34,7 +34,7 @@ install: $(PROGRAMS) + $(INSTALL) -m 755 $(PROGRAMS) $(DESTDIR)$(sbindir) + + brctl: $(brctl_OBJECTS) ../libbridge/libbridge.a +- $(CC) $(LDFLAGS) $(brctl_OBJECTS) $(LIBS) -o brctl ++ $(CC) $(CFLAGS) $(LDFLAGS) $(brctl_OBJECTS) $(LIBS) -o brctl + + %.o: %.c brctl.h + $(CC) $(CFLAGS) $(INCLUDE) -c $< +-- +2.17.1 + diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils/0003-libbridge-Modifying-the-AR-to-cross-toolchain.patch b/meta-networking/recipes-support/bridge-utils/bridge-utils/0003-libbridge-Modifying-the-AR-to-cross-toolchain.patch new file mode 100644 index 0000000000..586ebfec68 --- /dev/null +++ b/meta-networking/recipes-support/bridge-utils/bridge-utils/0003-libbridge-Modifying-the-AR-to-cross-toolchain.patch @@ -0,0 +1,51 @@ +From 99264c688ff98d8f0f237cba6c7098eb4d5a12a7 Mon Sep 17 00:00:00 2001 +From: Joe MacDonald +Date: Mon, 30 Oct 2017 13:48:33 -0400 +Subject: [PATCH] libbridge: Modifying the AR to cross toolchain +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The Makefile uses the host “ar” tool when it should be using the ar from +the target toolchain. + +Upstream-Status: Pending + +Signed-off-by: Li Zhou +Signed-off-by: Joe MacDonald +--- + configure.ac | 4 ++++ + libbridge/Makefile.in | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 66817bb..bcc6946 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -12,6 +12,10 @@ dnl Checks for programs. + AC_PROG_CC + AC_PROG_INSTALL + AC_PROG_RANLIB ++AN_MAKEVAR([AR], [AC_PROG_AR]) ++AN_PROGRAM([ar], [AC_PROG_AR]) ++AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)]) ++AC_PROG_AR + + dnl Checks for header files. + AC_HEADER_STDC +diff --git a/libbridge/Makefile.in b/libbridge/Makefile.in +index 7932bfe..bd55e9b 100644 +--- a/libbridge/Makefile.in ++++ b/libbridge/Makefile.in +@@ -1,7 +1,7 @@ + + KERNEL_HEADERS=-I@KERNEL_HEADERS@ + +-AR=ar ++AR=@AR@ + RANLIB=@RANLIB@ + + CC=@CC@ +-- +2.17.1 + diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils/0004-cleanup-includes.patch b/meta-networking/recipes-support/bridge-utils/bridge-utils/0004-cleanup-includes.patch new file mode 100644 index 0000000000..eb5c53d9ed --- /dev/null +++ b/meta-networking/recipes-support/bridge-utils/bridge-utils/0004-cleanup-includes.patch @@ -0,0 +1,149 @@ +From 1763c5b7f8f72d651d62337029c3bdfb269491e4 Mon Sep 17 00:00:00 2001 +From: Stephen Hemminger +Date: Fri, 7 Jan 2022 08:44:19 -0800 +Subject: [PATCH] cleanup includes + +Use IWYU to only include necessary headers. +Should resolve build issues for distros that need limits.h +to find PATH_MAX. + +Upstream-Status: Backport +[https://git.kernel.org/pub/scm/network/bridge/bridge-utils.git/commit/?h=main&id=1763c5b7f8f72d651d62337029c3bdfb269491e4] + +Signed-off-by: Stephen Hemminger +Signed-off-by: Yi Zhao +--- + brctl/brctl.c | 1 - + brctl/brctl_cmd.c | 3 ++- + brctl/brctl_disp.c | 1 - + libbridge/libbridge_devif.c | 5 ++++- + libbridge/libbridge_if.c | 5 +---- + libbridge/libbridge_init.c | 4 +++- + libbridge/libbridge_misc.c | 5 +---- + 7 files changed, 11 insertions(+), 13 deletions(-) + +diff --git a/brctl/brctl.c b/brctl/brctl.c +index 8855234..d2fa005 100644 +--- a/brctl/brctl.c ++++ b/brctl/brctl.c +@@ -17,7 +17,6 @@ + */ + + #include +-#include + #include + #include + #include +diff --git a/brctl/brctl_cmd.c b/brctl/brctl_cmd.c +index 81f7dfa..4167503 100644 +--- a/brctl/brctl_cmd.c ++++ b/brctl/brctl_cmd.c +@@ -18,10 +18,11 @@ + + #include + #include ++#include + #include + #include + #include +-#include ++ + #include "libbridge.h" + #include "brctl.h" + +diff --git a/brctl/brctl_disp.c b/brctl/brctl_disp.c +index 3e81241..f6bf2af 100644 +--- a/brctl/brctl_disp.c ++++ b/brctl/brctl_disp.c +@@ -17,7 +17,6 @@ + */ + + #include +-#include + #include + #include + +diff --git a/libbridge/libbridge_devif.c b/libbridge/libbridge_devif.c +index 8b7d954..3aac0f9 100644 +--- a/libbridge/libbridge_devif.c ++++ b/libbridge/libbridge_devif.c +@@ -18,12 +18,15 @@ + + + #include +-#include + #include + #include + #include + #include + #include ++#include ++ ++#include ++#include + + #include "libbridge.h" + #include "libbridge_private.h" +diff --git a/libbridge/libbridge_if.c b/libbridge/libbridge_if.c +index 5f3aed1..96dda30 100644 +--- a/libbridge/libbridge_if.c ++++ b/libbridge/libbridge_if.c +@@ -16,12 +16,9 @@ + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +-#include +-#include + #include +-#include +-#include + #include ++#include + + #include "libbridge.h" + #include "libbridge_private.h" +diff --git a/libbridge/libbridge_init.c b/libbridge/libbridge_init.c +index c914971..d572895 100644 +--- a/libbridge/libbridge_init.c ++++ b/libbridge/libbridge_init.c +@@ -16,14 +16,16 @@ + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + ++#include + #include + #include + #include + #include + #include + #include +-#include + #include ++#include ++#include + + #include "libbridge.h" + #include "libbridge_private.h" +diff --git a/libbridge/libbridge_misc.c b/libbridge/libbridge_misc.c +index 9379e93..5b146fd 100644 +--- a/libbridge/libbridge_misc.c ++++ b/libbridge/libbridge_misc.c +@@ -16,14 +16,11 @@ + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +-#include + #include + #include +-#include + #include +-#include "libbridge.h" +-#include "libbridge_private.h" + ++#include "libbridge.h" + + static const char *state_names[5] = { + [BR_STATE_DISABLED] = "disabled", +-- +2.17.1 + diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils/0005-build-don-t-ignore-CFLAGS-from-environment.patch b/meta-networking/recipes-support/bridge-utils/bridge-utils/0005-build-don-t-ignore-CFLAGS-from-environment.patch deleted file mode 100644 index 0a72c6b2c4..0000000000 --- a/meta-networking/recipes-support/bridge-utils/bridge-utils/0005-build-don-t-ignore-CFLAGS-from-environment.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 9d63838d12c772dfe33371e2bb8b8191625539f2 Mon Sep 17 00:00:00 2001 -From: Joe MacDonald -Date: Mon, 30 Oct 2017 13:37:48 -0400 -Subject: [PATCH] build: don't ignore CFLAGS from environment -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -We need to take them into account so as to behave nicely towards -build environments which expect to be able to set them, e.g. for -optimisation flags, or debug options. - -Therefore they need to be added to the compiler command line of -every source file, and in addition, the same CFLAGS that were -used during compilation must also always be used during linking! - -Upstream-Status: Pending - -Signed-off-by: André Draszik -Signed-off-by: Joe MacDonald ---- - brctl/Makefile.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/brctl/Makefile.in b/brctl/Makefile.in -index e1956d6..eff260c 100644 ---- a/brctl/Makefile.in -+++ b/brctl/Makefile.in -@@ -34,7 +34,7 @@ install: $(PROGRAMS) - $(INSTALL) -m 755 $(PROGRAMS) $(DESTDIR)$(sbindir) - - brctl: $(brctl_OBJECTS) ../libbridge/libbridge.a -- $(CC) $(LDFLAGS) $(brctl_OBJECTS) $(LIBS) -o brctl -+ $(CC) $(CFLAGS) $(LDFLAGS) $(brctl_OBJECTS) $(LIBS) -o brctl - - %.o: %.c brctl.h - $(CC) $(CFLAGS) $(INCLUDE) -c $< --- -2.7.4 - diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils/0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch b/meta-networking/recipes-support/bridge-utils/bridge-utils/0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch deleted file mode 100644 index 3f65761f54..0000000000 --- a/meta-networking/recipes-support/bridge-utils/bridge-utils/0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch +++ /dev/null @@ -1,51 +0,0 @@ -From c924f66743c054d7ebafef90ca1bbebc96732357 Mon Sep 17 00:00:00 2001 -From: Joe MacDonald -Date: Mon, 30 Oct 2017 13:48:33 -0400 -Subject: [PATCH] libbridge: Modifying the AR to cross toolchain -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The Makefile uses the host “ar” tool when it should be using the ar from -the target toolchain. - -Upstream-Status: Pending - -Signed-off-by: Li Zhou -Signed-off-by: Joe MacDonald ---- - configure.ac | 1 + - libbridge/Makefile.in | 2 +- - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 8b2e2ea..8426b7c 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -12,6 +12,10 @@ dnl Checks for programs. - AC_PROG_CC - AC_PROG_INSTALL - AC_PROG_RANLIB -+AN_MAKEVAR([AR], [AC_PROG_AR]) -+AN_PROGRAM([ar], [AC_PROG_AR]) -+AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)]) -+AC_PROG_AR - - dnl Checks for header files. - AC_HEADER_STDC -diff --git a/libbridge/Makefile.in b/libbridge/Makefile.in -index 7932bfe..bd55e9b 100644 ---- a/libbridge/Makefile.in -+++ b/libbridge/Makefile.in -@@ -1,7 +1,7 @@ - - KERNEL_HEADERS=-I@KERNEL_HEADERS@ - --AR=ar -+AR=@AR@ - RANLIB=@RANLIB@ - - CC=@CC@ --- -2.7.4 - diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch b/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch deleted file mode 100644 index 8a23a3070c..0000000000 --- a/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 824f838cc9c7b8a44174358446993d61be7bbb3f Mon Sep 17 00:00:00 2001 -From: Joe MacDonald -Date: Mon, 30 Oct 2017 13:18:20 -0400 -Subject: [PATCH] include missing kernel header - -Fixes errors like - -| /b/kraj/jlinux-next/poky/build/tmp-eglibc/sysroots/re-64b/usr/include/linux/if_bridge.h:172:20: error: field 'ip6' has incomplete type -| In file included from ../libbridge/libbridge.h:24:0, - -Upstream-Status: Pending - -Signed-off-by: Khem Raj -Signed-off-by: Joe MacDonald ---- - libbridge/libbridge.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/libbridge/libbridge.h b/libbridge/libbridge.h -index c038b92..fd09306 100644 ---- a/libbridge/libbridge.h -+++ b/libbridge/libbridge.h -@@ -24,6 +24,7 @@ - #include - #include - -+#include - #include - #include - --- -2.7.4 - diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils_1.7.1.bb b/meta-networking/recipes-support/bridge-utils/bridge-utils_1.7.1.bb new file mode 100644 index 0000000000..85a7e59d57 --- /dev/null +++ b/meta-networking/recipes-support/bridge-utils/bridge-utils_1.7.1.bb @@ -0,0 +1,36 @@ +SUMMARY = "Tools for ethernet bridging" +HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge" +SECTION = "net" +LICENSE = "GPLv2" + +LIC_FILES_CHKSUM = "file://COPYING;md5=f9d20a453221a1b7e32ae84694da2c37" + +SRCREV = "75d949b9fae9718201422f0bd3d1103e67dd597c" + +SRC_URI = "\ + git://git.kernel.org/pub/scm/network/bridge/bridge-utils.git;branch=main \ + file://0001-include-missing-kernel-header.patch \ + file://0002-build-don-t-ignore-CFLAGS-from-environment.patch \ + file://0003-libbridge-Modifying-the-AR-to-cross-toolchain.patch \ + file://0004-cleanup-includes.patch \ +" + +S = "${WORKDIR}/git" + +DEPENDS = "sysfsutils" + +inherit autotools-brokensep update-alternatives + +ALTERNATIVE:${PN} = "brctl" +ALTERNATIVE_PRIORITY[brctl] = "100" +ALTERNATIVE_LINK_NAME[brctl] = "${sbindir}/brctl" + +EXTRA_OECONF = "--with-linux-headers=${STAGING_INCDIR}" + +do_install:append () { + install -d ${D}/${datadir}/bridge-utils + install -d ${D}/${sysconfdir}/network/if-pre-up.d + install -d ${D}/${sysconfdir}/network/if-post-down.d +} + +RRECOMMENDS:${PN} = "kernel-module-bridge" diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils_1.7.bb b/meta-networking/recipes-support/bridge-utils/bridge-utils_1.7.bb deleted file mode 100644 index b8975dec0b..0000000000 --- a/meta-networking/recipes-support/bridge-utils/bridge-utils_1.7.bb +++ /dev/null @@ -1,35 +0,0 @@ -SUMMARY = "Tools for ethernet bridging" -HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge" -SECTION = "net" -LICENSE = "GPLv2" - -LIC_FILES_CHKSUM = "file://COPYING;md5=f9d20a453221a1b7e32ae84694da2c37" - -SRCREV = "ab8a2cc330253321be7bc69dea88bfaa3d48415e" - -SRC_URI = "\ - git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/bridge-utils.git;branch=main \ - file://kernel-headers.patch \ - file://0005-build-don-t-ignore-CFLAGS-from-environment.patch \ - file://0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch \ -" - -S = "${WORKDIR}/git" - -DEPENDS = "sysfsutils" - -inherit autotools-brokensep update-alternatives - -ALTERNATIVE:${PN} = "brctl" -ALTERNATIVE_PRIORITY[brctl] = "100" -ALTERNATIVE_LINK_NAME[brctl] = "${sbindir}/brctl" - -EXTRA_OECONF = "--with-linux-headers=${STAGING_INCDIR}" - -do_install:append () { - install -d ${D}/${datadir}/bridge-utils - install -d ${D}/${sysconfdir}/network/if-pre-up.d - install -d ${D}/${sysconfdir}/network/if-post-down.d -} - -RRECOMMENDS:${PN} = "kernel-module-bridge" -- cgit v1.2.3-54-g00ecf