From f71ef8ed1eac82554d9ea9355e6ea93de7a68ab0 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sat, 4 May 2024 16:15:54 +0200 Subject: Docker: T6283: T6250: no need to include rtrlib and libyang in general FRR build tracks the rtrlib and libyang version, so only one place is needed to build to sources. (cherry picked from commit 6ff4b31c4a75583424edd0deb479d1dacc42d6b3) --- docker/Dockerfile | 12 ------------ packages/frr/Jenkinsfile | 2 +- packages/frr/build-frr.sh | 2 +- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index b2c4981b..927c2fa9 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -217,18 +217,6 @@ RUN apt-get update && apt-get install -y \ build-essential RUN gem install --no-document fpm -# Build rtrlib release 0.8.0 -RUN export RTRLIB_VERSION="0.8.0" export ARCH=$(dpkg-architecture -qDEB_HOST_ARCH) && \ - git clone https://github.com/rtrlib/rtrlib.git /tmp/rtrlib && cd /tmp/rtrlib && \ - mk-build-deps --install --tool "apt-get --yes --no-install-recommends" && \ - dpkg-buildpackage -uc -us -tc -b && \ - dpkg -i ../librtr0*_${ARCH}.deb ../librtr-dev*_${ARCH}.deb ../rtr-tools*_${ARCH}.deb - -RUN export LIBYANG_VERSION="v2.1.128" export ARCH=$(dpkg-architecture -qDEB_HOST_ARCH) && \ - git clone https://github.com/CESNET/libyang.git /tmp/libyang && cd /tmp/libyang && \ - pipx run apkg build -i && find pkg/pkgs -type f -name *.deb -exec mv -t .. {} + && \ - dpkg -i ../libyang*.deb - # Packages needed for vyos-1x RUN pip install --break-system-packages \ git+https://github.com/aristanetworks/j2lint.git@341b5d5db86 \ diff --git a/packages/frr/Jenkinsfile b/packages/frr/Jenkinsfile index 80cd03f5..9a00240a 100644 --- a/packages/frr/Jenkinsfile +++ b/packages/frr/Jenkinsfile @@ -32,7 +32,7 @@ def pkgList = [ ['name': 'frr', 'scmCommit': 'stable/9.1', 'scmUrl': 'https://github.com/FRRouting/frr.git', - 'buildCmd': 'sudo mk-build-deps --install --tool "apt-get --yes --no-install-recommends"; cd ..; ./build-frr.sh'], + 'buildCmd': 'sudo dpkg -i ../*.deb; sudo mk-build-deps --install --tool "apt-get --yes --no-install-recommends"; cd ..; ./build-frr.sh'], ] // Start package build using library function from https://github.com/vyos/vyos-build diff --git a/packages/frr/build-frr.sh b/packages/frr/build-frr.sh index 8be3cb4b..7171a883 100755 --- a/packages/frr/build-frr.sh +++ b/packages/frr/build-frr.sh @@ -31,7 +31,7 @@ fi echo "I: Ensure Debian build dependencies are met" sudo apt-get -y install chrpath gawk install-info libcap-dev libjson-c-dev librtr-dev -sudo apt-get -y install libpam-dev libprotobuf-c-dev libpython3-dev:native libsnmp-dev protobuf-c-compiler python3-dev:native texinfo lua5.3 +sudo apt-get -y install libpam-dev libprotobuf-c-dev libpython3-dev:native python3-sphinx:native libsnmp-dev protobuf-c-compiler python3-dev:native texinfo lua5.3 # Build Debian FRR package echo "I: Build Debian FRR Package" -- cgit v1.2.3 From 869f49fb5279b8ea8d4bbf14d1adacff365d2d0a Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sat, 4 May 2024 16:17:38 +0200 Subject: frr: T6283: add pending upstream patch (cherry picked from commit 1b61973b9143aa8a04cc7c857ec567fa962e4e43) --- ...001-bgpd-fix-no-set-as-path-prepend-ASNUM.patch | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 packages/frr/patches/0001-bgpd-fix-no-set-as-path-prepend-ASNUM.patch diff --git a/packages/frr/patches/0001-bgpd-fix-no-set-as-path-prepend-ASNUM.patch b/packages/frr/patches/0001-bgpd-fix-no-set-as-path-prepend-ASNUM.patch new file mode 100644 index 00000000..9b87e302 --- /dev/null +++ b/packages/frr/patches/0001-bgpd-fix-no-set-as-path-prepend-ASNUM.patch @@ -0,0 +1,70 @@ +From e069a1c8d52bb6e7808303df488d7ce912e4f652 Mon Sep 17 00:00:00 2001 +From: Donatas Abraitis +Date: Thu, 2 May 2024 23:07:19 +0300 +Subject: [PATCH 1/2] bgpd: Fix `no set as-path prepend ASNUM...` + +If entering `no set as-path prepend 1 2 3`, it's warned as unknown command. + +Now fixed, and the following combinations work fine: + +``` +no set as-path prepend +no set as-path prepend last-as +no set as-path prepend last-as 1 +no set as-path prepend 1 +no set as-path prepend 1 2 +``` + +Fixes: https://github.com/FRRouting/frr/issues/15912 + +Signed-off-by: Donatas Abraitis +--- + bgpd/bgp_routemap.c | 17 +++++++++++++---- + 1 file changed, 13 insertions(+), 4 deletions(-) + +diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c +index 4875697aa106..7eb97dae4d24 100644 +--- a/bgpd/bgp_routemap.c ++++ b/bgpd/bgp_routemap.c +@@ -6288,13 +6288,12 @@ DEFPY_YANG( + } + + DEFUN_YANG (no_set_aspath_prepend, +- no_set_aspath_prepend_cmd, +- "no set as-path prepend [ASNUM] [last-as [(1-10)]]", ++ no_set_aspath_prepend_last_as_cmd, ++ "no set as-path prepend [last-as [(1-10)]]", + NO_STR + SET_STR + "Transform BGP AS_PATH attribute\n" + "Prepend to the as-path\n" +- AS_STR + "Use the peers AS-number\n" + "Number of times to insert\n") + { +@@ -6305,6 +6304,15 @@ DEFUN_YANG (no_set_aspath_prepend, + return nb_cli_apply_changes(vty, NULL); + } + ++ALIAS_YANG (no_set_aspath_prepend, ++ no_set_aspath_prepend_as_cmd, ++ "no set as-path prepend ASNUM...", ++ NO_STR ++ SET_STR ++ "Transform BGP AS_PATH attribute\n" ++ "Prepend to the as-path\n" ++ AS_STR) ++ + DEFUN_YANG (set_aspath_exclude, + set_aspath_exclude_cmd, + "set as-path exclude ASNUM...", +@@ -7981,7 +7989,8 @@ void bgp_route_map_init(void) + install_element(RMAP_NODE, &set_aspath_exclude_access_list_cmd); + install_element(RMAP_NODE, &set_aspath_replace_asn_cmd); + install_element(RMAP_NODE, &set_aspath_replace_access_list_cmd); +- install_element(RMAP_NODE, &no_set_aspath_prepend_cmd); ++ install_element(RMAP_NODE, &no_set_aspath_prepend_last_as_cmd); ++ install_element(RMAP_NODE, &no_set_aspath_prepend_as_cmd); + install_element(RMAP_NODE, &no_set_aspath_exclude_cmd); + install_element(RMAP_NODE, &no_set_aspath_exclude_all_cmd); + install_element(RMAP_NODE, &no_set_aspath_exclude_access_list_cmd); -- cgit v1.2.3 From a7be110850274ecc5545fbdfa94715c5a57ae37c Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sat, 4 May 2024 16:17:50 +0200 Subject: frr: T6250: add pending upstream patch (cherry picked from commit 38cae97177191ad6876a4ce7afb4f53b21bf746c) --- ...llow-using-optional-table-id-for-negative.patch | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 packages/frr/patches/0002-bgpd-allow-using-optional-table-id-for-negative.patch diff --git a/packages/frr/patches/0002-bgpd-allow-using-optional-table-id-for-negative.patch b/packages/frr/patches/0002-bgpd-allow-using-optional-table-id-for-negative.patch new file mode 100644 index 00000000..c414490e --- /dev/null +++ b/packages/frr/patches/0002-bgpd-allow-using-optional-table-id-for-negative.patch @@ -0,0 +1,29 @@ +From e411988a86f1b719fb16ec4c30499bfc650b4ea7 Mon Sep 17 00:00:00 2001 +From: Donatas Abraitis +Date: Fri, 3 May 2024 08:58:21 +0300 +Subject: [PATCH 2/2] bgpd: Allow using optional table id for negative `no set + table X` command + +Signed-off-by: Donatas Abraitis +--- + bgpd/bgp_routemap.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c +index 7eb97dae4d24..df5c2557bd26 100644 +--- a/bgpd/bgp_routemap.c ++++ b/bgpd/bgp_routemap.c +@@ -5897,10 +5897,11 @@ DEFUN_YANG (set_table_id, + + DEFUN_YANG (no_set_table_id, + no_set_table_id_cmd, +- "no set table", ++ "no set table [(1-4294967295)]", + NO_STR + SET_STR +- "export route to non-main kernel table\n") ++ "export route to non-main kernel table\n" ++ "Kernel routing table id\n") + { + const char *xpath = "./set-action[action='frr-bgp-route-map:table']"; + nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL); -- cgit v1.2.3