Skip to content

Commit

Permalink
frr: upgrade 8.4.4 -> 9.0.1
Browse files Browse the repository at this point in the history
Upgrade FRR to 9.0.1:

* drop all existing patches since they are included in 9.0.1
* add a patch fixing (harmless) error messages in log
* license files moved to doc/licenses
* protobuf-c-native (for protoc) and protobuf-c are now needed

Changelogs:
https://github.com/FRRouting/frr/releases/tag/frr-9.0.1
FRRouting/frr@31ed3dd
https://github.com/FRRouting/frr/releases/tag/frr-9.0
FRRouting/frr@2863e7e

Signed-off-by: Jonas Gorski <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
  • Loading branch information
KanjiMonster authored and kraj committed Sep 22, 2023
1 parent e88e02b commit 401eb49
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 237 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
From 312d5ee1592f8c5b616d330233d1de2643f759e2 Mon Sep 17 00:00:00 2001
From: Jonas Gorski <[email protected]>
Date: Thu, 14 Sep 2023 17:04:16 +0200
Subject: [PATCH] tools: make --quiet actually suppress output

When calling daemon_stop() with --quiet and e.g. the pidfile is empty,
it won't return early since while "$fail" is set, "$2" is "--quiet", so
the if condition isn't met and it will continue executing, resulting
in error messages in the log:

> Sep 14 14:48:33 localhost watchfrr[2085]: [YFT0P-5Q5YX] Forked background command [pid 2086]: /usr/lib/frr/watchfrr.sh restart all
> Sep 14 14:48:33 localhost frrinit.sh[2075]: /usr/lib/frr/frrcommon.sh: line 216: kill: `': not a pid or valid job spec
> Sep 14 14:48:33 localhost frrinit.sh[2075]: /usr/lib/frr/frrcommon.sh: line 216: kill: `': not a pid or valid job spec
> Sep 14 14:48:33 localhost frrinit.sh[2075]: /usr/lib/frr/frrcommon.sh: line 216: kill: `': not a pid or valid job spec

Fix this by moving the --quiet check into the block to log_failure_msg(),
and also add the check to all other invocations of log_*_msg() to make
--quiet properly suppress output.

Fixes: 19a99d89f088 ("tools: suppress unuseful warnings during restarting frr")
Signed-off-by: Jonas Gorski <[email protected]>
Upstream-Status: Backport [https://github.com/FRRouting/frr/commit/312d5ee1592f8c5b616d330233d1de2643f759e2]
---
tools/frrcommon.sh.in | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/frrcommon.sh.in b/tools/frrcommon.sh.in
index f1f70119097e..00b63a78e2bc 100755
--- a/tools/frrcommon.sh.in
+++ b/tools/frrcommon.sh.in
@@ -207,8 +207,8 @@ daemon_stop() {
[ -z "$fail" -a -z "$pid" ] && fail="pid file is empty"
[ -n "$fail" ] || kill -0 "$pid" 2>/dev/null || fail="pid $pid not running"

- if [ -n "$fail" ] && [ "$2" != "--quiet" ]; then
- log_failure_msg "Cannot stop $dmninst: $fail"
+ if [ -n "$fail" ]; then
+ [ "$2" = "--quiet" ] || log_failure_msg "Cannot stop $dmninst: $fail"
return 1
fi

@@ -220,11 +220,11 @@ daemon_stop() {
[ $(( cnt -= 1 )) -gt 0 ] || break
done
if kill -0 "$pid" 2>/dev/null; then
- log_failure_msg "Failed to stop $dmninst, pid $pid still running"
+ [ "$2" = "--quiet" ] || log_failure_msg "Failed to stop $dmninst, pid $pid still running"
still_running=1
return 1
else
- log_success_msg "Stopped $dmninst"
+ [ "$2" = "--quiet" ] || log_success_msg "Stopped $dmninst"
rm -f "$pidfile"
return 0
fi
--
2.42.0

54 changes: 0 additions & 54 deletions meta-networking/recipes-protocols/frr/frr/CVE-2023-3748.patch

This file was deleted.

106 changes: 0 additions & 106 deletions meta-networking/recipes-protocols/frr/frr/CVE-2023-41358.patch

This file was deleted.

35 changes: 0 additions & 35 deletions meta-networking/recipes-protocols/frr/frr/CVE-2023-41360.patch

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,15 @@ HOMEPAGE = "https://frrouting.org/"
SECTION = "net"

LICENSE = "GPL-2.0-only & LGPL-2.1-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://COPYING-LGPLv2.1;md5=4fbd65380cdd255951079008b364516c"
LIC_FILES_CHKSUM = "file://doc/licenses/GPL-2.0;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://doc/licenses/LGPL-2.1;md5=4fbd65380cdd255951079008b364516c"

SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/8.4 \
SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/9.0 \
file://frr.pam \
file://0001-m4-ax_python.m4-check-for-python-x.y-emded.pc-not-py.patch \
file://CVE-2023-3748.patch \
file://CVE-2023-41358.patch \
file://CVE-2023-41360.patch \
file://0001-tools-make-quiet-actually-suppress-output.patch \
"

SRCREV = "45e36c0c00a517ad1606135b18c5753e210cfc0d"
SRCREV = "31ed3dd753d62b5d8916998bc32814007e91364b"

UPSTREAM_CHECK_GITTAGREGEX = "frr-(?P<pver>\d+(\.\d+)+)$"

Expand All @@ -28,7 +25,7 @@ S = "${WORKDIR}/git"
inherit autotools-brokensep python3native pkgconfig useradd systemd

DEPENDS:class-native = "bison-native elfutils-native"
DEPENDS:class-target = "bison-native json-c readline c-ares libyang frr-native"
DEPENDS:class-target = "bison-native json-c readline c-ares libyang frr-native protobuf-c-native protobuf-c"

RDEPENDS:${PN}:class-target = "iproute2 python3-core bash"

Expand Down Expand Up @@ -64,6 +61,9 @@ EXTRA_OECONF:class-target = "--sbindir=${libdir}/frr \

CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"

# https://github.com/FRRouting/frr/issues/14469
DEBUG_PREFIX_MAP:remove = "-fcanon-prefix-map"

LDFLAGS:append:mips = " -latomic"
LDFLAGS:append:mipsel = " -latomic"
LDFLAGS:append:powerpc = " -latomic"
Expand Down

0 comments on commit 401eb49

Please sign in to comment.