From ca9f2f4b562916655ab89c202a575b5e8bbc2c35 Mon Sep 17 00:00:00 2001 From: Lucian CRISTIAN Date: Thu, 23 Jan 2025 21:47:21 +0200 Subject: [PATCH] frr: update to 10.2.1 update to current stable branch Signed-off-by: Lucian CRISTIAN --- net/frr/Makefile | 10 +-- net/frr/patches/098-fix_mips_libyang.patch | 2 +- .../patches/900-gcc-14-compatibility.patch | 83 ------------------ net/frr/patches/997-reverse_python_test.patch | 2 +- .../patches/998-lib-fix-error-on-MacOS.patch | 85 ------------------- 5 files changed, 7 insertions(+), 175 deletions(-) delete mode 100644 net/frr/patches/900-gcc-14-compatibility.patch delete mode 100644 net/frr/patches/998-lib-fix-error-on-MacOS.patch diff --git a/net/frr/Makefile b/net/frr/Makefile index 40cdd200e4..de69a07b69 100644 --- a/net/frr/Makefile +++ b/net/frr/Makefile @@ -7,15 +7,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=frr -PKG_VERSION:=9.0.0 -PKG_RELEASE:=7 -PKG_SOURCE_DATE:=2023-08-12 +PKG_VERSION:=10.2.1 +PKG_RELEASE:=1 +PKG_SOURCE_DATE:=2025-01-21 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz -PKG_SOURCE_VERSION:=9852228d1e87bdbad13e0fed8313203f00bf26af +PKG_SOURCE_VERSION:=989328c7e47c7bbcf3364d5424ac17f49fd05c57 PKG_SOURCE_URL:=https://codeload.github.com/FRRouting/frr/tar.gz/$(PKG_SOURCE_VERSION)? -PKG_HASH:=6e611cd86ae9787a4b8d71411fdc38ad1fe843a839756c9c386848ffde81f6cf +PKG_HASH:=d8ea2bad243cfcfd96b9b4a5dd524fe1deeb577cd535529babe24a02cae26f06 PKG_MAINTAINER:=Lucian Cristian PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION) diff --git a/net/frr/patches/098-fix_mips_libyang.patch b/net/frr/patches/098-fix_mips_libyang.patch index b69b6e4373..39a84a7647 100644 --- a/net/frr/patches/098-fix_mips_libyang.patch +++ b/net/frr/patches/098-fix_mips_libyang.patch @@ -1,6 +1,6 @@ --- a/lib/northbound.h +++ b/lib/northbound.h -@@ -627,11 +627,7 @@ struct frr_yang_module_info { +@@ -665,11 +665,7 @@ struct frr_yang_module_info { /* Priority - lower priorities are processed first. */ uint32_t priority; diff --git a/net/frr/patches/900-gcc-14-compatibility.patch b/net/frr/patches/900-gcc-14-compatibility.patch deleted file mode 100644 index 789402a732..0000000000 --- a/net/frr/patches/900-gcc-14-compatibility.patch +++ /dev/null @@ -1,83 +0,0 @@ -From d286461971735a0b81a53039f38f66c47c632196 Mon Sep 17 00:00:00 2001 -From: Georgi Valkov -Date: Mon, 27 May 2024 17:30:54 +0300 -Subject: [PATCH] zebra: fix compilation with GCC14 - -Fixes: -zebra/zebra_netns_notify.c: In function 'zebra_ns_ready_read': -zebra/zebra_netns_notify.c:265:40: error: implicit declaration of function 'basename' [-Wimplicit-function-declaration] - 265 | if (strmatch(VRF_DEFAULT_NAME, basename(netnspath))) { - | ^~~~~~~~ - -Fixed by including libgen.h, then since basename may modify its -parameter, allocate a copy on the stack, using strdupa, and pass the -temporary string to basename. - -According to the man page for basename: -With glibc, one gets the POSIX version of basename() when - is included, and the GNU version otherwise. - -The POSIX version of basename may modify the contents of path, -so we should to pass a copy when calling this function. - -[1] https://man7.org/linux/man-pages/man3/basename.3.html - -Signed-off-by: Georgi Valkov ---- ---- a/zebra/zebra_netns_notify.c -+++ b/zebra/zebra_netns_notify.c -@@ -14,6 +14,7 @@ - #include - #endif - #include -+#include - #include - #include - -@@ -233,6 +234,7 @@ static void zebra_ns_ready_read(struct e - { - struct zebra_netns_info *zns_info = EVENT_ARG(t); - const char *netnspath; -+ const char *netnspath_basename; - int err, stop_retry = 0; - - if (!zns_info) -@@ -260,23 +262,24 @@ static void zebra_ns_ready_read(struct e - zebra_ns_continue_read(zns_info, stop_retry); - return; - } -+ netnspath_basename = basename(strdupa(netnspath)); - - /* check default name is not already set */ -- if (strmatch(VRF_DEFAULT_NAME, basename(netnspath))) { -- zlog_warn("NS notify : NS %s is already default VRF.Cancel VRF Creation", basename(netnspath)); -+ if (strmatch(VRF_DEFAULT_NAME, netnspath_basename)) { -+ zlog_warn("NS notify : NS %s is already default VRF.Cancel VRF Creation", netnspath_basename); - zebra_ns_continue_read(zns_info, 1); - return; - } -- if (zebra_ns_notify_is_default_netns(basename(netnspath))) { -+ if (zebra_ns_notify_is_default_netns(netnspath_basename)) { - zlog_warn( - "NS notify : NS %s is default VRF. Ignore VRF creation", -- basename(netnspath)); -+ netnspath_basename); - zebra_ns_continue_read(zns_info, 1); - return; - } - - /* success : close fd and create zns context */ -- zebra_ns_notify_create_context_from_entry_name(basename(netnspath)); -+ zebra_ns_notify_create_context_from_entry_name(netnspath_basename); - zebra_ns_continue_read(zns_info, 1); - } - -@@ -395,7 +398,7 @@ void zebra_ns_notify_parse(void) - continue; - } - /* check default name is not already set */ -- if (strmatch(VRF_DEFAULT_NAME, basename(dent->d_name))) { -+ if (strmatch(VRF_DEFAULT_NAME, basename(strdupa(dent->d_name)))) { - zlog_warn("NS notify : NS %s is already default VRF.Cancel VRF Creation", dent->d_name); - continue; - } diff --git a/net/frr/patches/997-reverse_python_test.patch b/net/frr/patches/997-reverse_python_test.patch index aa3e0f87df..16232c410a 100644 --- a/net/frr/patches/997-reverse_python_test.patch +++ b/net/frr/patches/997-reverse_python_test.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -855,7 +855,6 @@ fi +@@ -913,7 +913,6 @@ AC_DEFINE_UNQUOTED([DFLT_NAME], ["$DFLT_ # AS_IF([test "$host" = "$build"], [ diff --git a/net/frr/patches/998-lib-fix-error-on-MacOS.patch b/net/frr/patches/998-lib-fix-error-on-MacOS.patch deleted file mode 100644 index 6ee727b673..0000000000 --- a/net/frr/patches/998-lib-fix-error-on-MacOS.patch +++ /dev/null @@ -1,85 +0,0 @@ -From ad26e0926d1fa20bfdd9b5f63cec4db9837f880a Mon Sep 17 00:00:00 2001 -From: Ruben Kerkhof -Date: Wed, 18 Mar 2020 15:40:39 +0100 -Subject: [PATCH] lib: fix error on MacOS - -Sections use a different syntax for Mach-O executables. - -Fixes: - -lib/bfd.c:35:1: error: argument to 'section' attribute is not valid for this target: mach-o section specifier requires a segment and section separated by a - comma -DEFINE_MTYPE_STATIC(LIB, BFD_INFO, "BFD info") -^ -./lib/memory.h:140:2: note: expanded from macro 'DEFINE_MTYPE_STATIC' - DEFINE_MTYPE_ATTR(group, name, static, desc) \ - ^ -./lib/memory.h:110:26: note: expanded from macro 'DEFINE_MTYPE_ATTR' - __attribute__((section(".data.mtypes"))) = { { \ - ^ -1 error generated. - -Signed-off-by: Ruben Kerkhof -Signed-off-by: Georgi Valkov ---- - lib/memory.h | 43 +++++++++++++++++++++++++++---------------- - 1 file changed, 27 insertions(+), 16 deletions(-) - ---- a/lib/compiler.h -+++ b/lib/compiler.h -@@ -447,6 +447,12 @@ _Static_assert(sizeof(_uint64_t) == 8 && - #define unlikely(_x) !!(_x) - #endif - -+#ifdef __MACH__ -+#define _DATA_SECTION(name) __attribute__((section("__DATA," name))) -+#else -+#define _DATA_SECTION(name) __attribute__((section(".data." name))) -+#endif -+ - #ifdef __cplusplus - } - #endif ---- a/lib/memory.h -+++ b/lib/memory.h -@@ -69,14 +69,12 @@ struct memgroup { - - #define DECLARE_MGROUP(name) extern struct memgroup _mg_##name - #define _DEFINE_MGROUP(mname, desc, ...) \ -- struct memgroup _mg_##mname \ -- __attribute__((section(".data.mgroups"))) = { \ -- .name = desc, \ -- .types = NULL, \ -- .next = NULL, \ -- .insert = NULL, \ -- .ref = NULL, \ -- __VA_ARGS__ \ -+ struct memgroup _mg_##mname _DATA_SECTION("mgroups") = { \ -+ .name = desc, \ -+ .types = NULL, \ -+ .next = NULL, \ -+ .insert = NULL, \ -+ .ref = NULL, \ - }; \ - static void _mginit_##mname(void) __attribute__((_CONSTRUCTOR(1000))); \ - static void _mginit_##mname(void) \ -@@ -105,13 +103,12 @@ struct memgroup { - /* end */ - - #define DEFINE_MTYPE_ATTR(group, mname, attr, desc) \ -- attr struct memtype MTYPE_##mname[1] \ -- __attribute__((section(".data.mtypes"))) = { { \ -- .name = desc, \ -- .next = NULL, \ -- .n_alloc = 0, \ -- .size = 0, \ -- .ref = NULL, \ -+ attr struct memtype MTYPE_##mname[1] _DATA_SECTION("mtypes") = { { \ -+ .name = desc, \ -+ .next = NULL, \ -+ .n_alloc = 0, \ -+ .size = 0, \ -+ .ref = NULL, \ - } }; \ - static void _mtinit_##mname(void) __attribute__((_CONSTRUCTOR(1001))); \ - static void _mtinit_##mname(void) \ -- 2.30.2