package/frr: bump to version 10.4.1

Update FRR to the latest stable version (10.4.1 see [1], 10.4.0 see [2]).

As protobuf-c is no longer mandatory (see [3]), a new option
BR2_PACKAGE_FRR_PROTOBUF is added to enable/disable it.

getloadavg function [4] is now used by FRR but older libcs (e.g. uClibc,
dietlibc) lack this function, to fix the compilation, a patch must be
applied on FRR.

[1] https://github.com/FRRouting/frr/commit/88f5c06cbc1c
[2] https://github.com/FRRouting/frr/releases/tag/frr-10.4.0
[3] https://github.com/FRRouting/frr/commit/e51c16a4ca92
[4] https://github.com/FRRouting/frr/commit/ff76fb21d7b3

Signed-off-by: Maxime Leroy <maxime@leroys.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Maxime Leroy
2025-08-11 18:11:06 +02:00
committed by Julien Olivain
parent 7b3bf7b29c
commit da8587d2db
4 changed files with 77 additions and 12 deletions

View File

@@ -0,0 +1,49 @@
From d76100a2b9a2ec814ad0a1fb844a395a6dc2f6bd Mon Sep 17 00:00:00 2001
From: Maxime Leroy <maxime@leroys.fr>
Date: Mon, 11 Aug 2025 13:44:02 +0200
Subject: [PATCH] lib: make getloadavg() optional in late timer warnings
Commit ff76fb21d7b3 ("lib: improve late timer warnings") added an
unconditional getloadavg() call. Older libcs (e.g. uClibc, dietlibc)
lack this function, breaking the build. Before, no system load was
shown, so skipping it restores prior behavior.
Fixes: ff76fb21d7b3 ("lib: improve late timer warnings")
Signed-off-by: Maxime Leroy <maxime@leroys.fr>
Upstream: https://github.com/FRRouting/frr/pull/19366
---
configure.ac | 1 +
lib/event.c | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/configure.ac b/configure.ac
index 87eba6784a..b8ef7bb777 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1369,6 +1369,7 @@ dnl ---------------
AC_CHECK_FUNCS([ \
strlcat strlcpy \
getgrouplist \
+ getloadavg \
openat \
unlinkat \
posix_fallocate \
diff --git a/lib/event.c b/lib/event.c
index 1eb41d07ce..22876574fb 100644
--- a/lib/event.c
+++ b/lib/event.c
@@ -1924,7 +1924,11 @@ static void event_tardy_warn(struct event *thread, unsigned long since_us)
double loadavg[3];
int rv;
+#ifdef HAVE_GETLOADAVG
rv = getloadavg(loadavg, array_size(loadavg));
+#else
+ rv = -1;
+#endif
if (rv < 0)
bprintfrr(&fb, "not available");
else {
--
2.43.0

View File

@@ -1,19 +1,15 @@
config BR2_PACKAGE_FRR
bool "frr"
depends on BR2_TOOLCHAIN_HAS_THREADS # protobuf-c
depends on BR2_TOOLCHAIN_HAS_THREADS # pthread
depends on !BR2_STATIC_LIBS # libyang
depends on BR2_USE_MMU # fork()
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c, libyang
depends on BR2_INSTALL_LIBSTDCPP # protobuf-c
depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS # protobuf-c
depends on BR2_HOST_GCC_AT_LEAST_7 # protobuf-c
select BR2_PACKAGE_BASH
select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # bash
select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC
select BR2_PACKAGE_LIBYANG
select BR2_PACKAGE_READLINE
select BR2_PACKAGE_JSON_C
select BR2_PACKAGE_PROTOBUF_C
help
The FRRouting Protocol Suite.
@@ -43,11 +39,24 @@ config BR2_PACKAGE_FRR_NHRPD
help
Build Next Hop Routing Protocol daemon.
config BR2_PACKAGE_FRR_PROTOBUF
bool "Protobuf support (Binary-FPM and MLAG)"
default y
depends on BR2_INSTALL_LIBSTDCPP # protobuf-c
depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS # protobuf-c
depends on BR2_HOST_GCC_AT_LEAST_7 # protobuf-c
select BR2_PACKAGE_PROTOBUF_C
help
Build FRR with protobuf-based Binary-FPM export and MLAG
peer synchronization.
endif
comment "frr needs a toolchain w/ threads, dynamic library, C++, host gcc >= 7"
depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
comment "frr needs a toolchain w/ threads, dynamic library"
depends on BR2_TOOLCHAIN_HAS_SYNC_4
depends on BR2_USE_MMU
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS || \
!BR2_INSTALL_LIBSTDCPP || !BR2_HOST_GCC_AT_LEAST_7
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
comment "protobuf support for frr needs a toolchain w/ protobuf, C++, host gcc >= 7"
depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_HOST_GCC_AT_LEAST_7

View File

@@ -1,5 +1,5 @@
# Locally calculated
sha256 df4bc4f644f93be09f75c0e0e325b2f6a3ee6d1c6db429b6f36874e88a66ee33 frr-10.3.1.tar.gz
sha256 8e4003eaba168626c5ea7a6735f2c85c87b04214e6f8c8f2715b21f8ae40970b frr-10.4.1.tar.gz
sha256 7bf053957d6c38e39a06a112c60ff35b228d3bd03edbe8c9a03508b051128d16 COPYING
sha256 f9e0c21faf738da586281c0beaad3cd56204c19085a10fe05e4d3d7f8b5863d2 doc/licenses/BSD-2-Clause
sha256 aca297b8fd3a43e3bb200f1e2e043c0db6c897325f5ff7f23f7530302a6bf713 doc/licenses/BSD-3-Clause

View File

@@ -4,7 +4,7 @@
#
################################################################################
FRR_VERSION = 10.3.1
FRR_VERSION = 10.4.1
FRR_SITE = $(call github,FRRouting,frr,frr-$(FRR_VERSION))
FRR_LICENSE = GPL-2.0+
FRR_LICENSE_FILES = \
@@ -25,7 +25,6 @@ FRR_CPE_ID_PRODUCT = free_range_routing
FRR_AUTORECONF = YES
FRR_DEPENDENCIES = host-frr readline json-c libyang \
protobuf-c \
$(if $(BR2_PACKAGE_C_ARES),c-ares) \
$(if $(BR2_PACKAGE_LIBXCRYPT),libxcrypt)
@@ -89,6 +88,14 @@ else
FRR_CONF_OPTS += --disable-bfdd
endif
# Optional protobuf support
ifeq ($(BR2_PACKAGE_FRR_PROTOBUF),y)
FRR_DEPENDENCIES += protobuf-c
FRR_CONF_OPTS += --enable-protobuf
else
FRR_CONF_OPTS += --disable-protobuf
endif
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
FRR_CONF_ENV += LIBS=-latomic
endif