From 4d60a7ee39c5aed1ad41b85fd7ce769c98d598fd Mon Sep 17 00:00:00 2001 From: Kalimuthu Velappan Date: Thu, 20 Oct 2022 00:11:26 -0700 Subject: [PATCH 1/9] Fix for build hooks debian permission error --- src/sonic-build-hooks/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-build-hooks/Makefile b/src/sonic-build-hooks/Makefile index f20acac0b143..5866f879d7b3 100644 --- a/src/sonic-build-hooks/Makefile +++ b/src/sonic-build-hooks/Makefile @@ -28,7 +28,7 @@ DEPENDS := $(shell find scripts hooks debian -type f) $(SONIC_BUILD_HOOKS_TARGET): $(DEPENDS) @rm -rf $(BUILDINFO_DIR)/$(SONIC_BUILD_HOOKS) $(TMP_DIR) @mkdir -p $(DEBIAN_DIR) $(SCRIPTS_PATH) $(HOOKS_PATH) $(SYMBOL_LINK_PATH) $(TRUSTED_GPG_PATH) $(BUILDINFO_DIR) - @chmod 0775 $(DEBIAN_DIR) + @chmod 00775 $(DEBIAN_DIR) @cp debian/* $(DEBIAN_DIR)/ @cp scripts/* $(SCRIPTS_PATH)/ @cp hooks/* $(HOOKS_PATH)/ From b9d07e365d3752ca1eb76fbd7dead1383b6fdd6b Mon Sep 17 00:00:00 2001 From: Syed Hasan Raza Naqvi Date: Fri, 1 Mar 2024 00:14:03 +0000 Subject: [PATCH 2/9] Migrate FRR to bookworm. --- dockers/docker-fpm-frr/Dockerfile.j2 | 2 +- rules/docker-fpm-frr.mk | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dockers/docker-fpm-frr/Dockerfile.j2 b/dockers/docker-fpm-frr/Dockerfile.j2 index d0cb32d02ec5..b0dc413c8c89 100644 --- a/dockers/docker-fpm-frr/Dockerfile.j2 +++ b/dockers/docker-fpm-frr/Dockerfile.j2 @@ -1,5 +1,5 @@ {% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %} -FROM docker-swss-layer-bullseye-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}} +FROM docker-swss-layer-bookworm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}} ARG docker_container_name ARG frr_user_uid diff --git a/rules/docker-fpm-frr.mk b/rules/docker-fpm-frr.mk index bcc293e0257f..04432675cf42 100644 --- a/rules/docker-fpm-frr.mk +++ b/rules/docker-fpm-frr.mk @@ -8,13 +8,13 @@ $(DOCKER_FPM_FRR)_PATH = $(DOCKERS_PATH)/$(DOCKER_FPM_FRR_STEM) $(DOCKER_FPM_FRR)_PYTHON_WHEELS += $(SONIC_BGPCFGD) $(SONIC_FRR_MGMT_FRAMEWORK) $(DOCKER_FPM_FRR)_DEPENDS += $(FRR) $(FRR_SNMP) $(SWSS) $(LIBYANG2) $(SONIC_RSYSLOG_PLUGIN) -$(DOCKER_FPM_FRR)_DBG_DEPENDS = $($(DOCKER_SWSS_LAYER_BULLSEYE)_DBG_DEPENDS) +$(DOCKER_FPM_FRR)_DBG_DEPENDS = $($(DOCKER_SWSS_LAYER_BOOKWORM)_DBG_DEPENDS) $(DOCKER_FPM_FRR)_DBG_DEPENDS += $(SWSS_DBG) $(LIBSWSSCOMMON_DBG) \ $(FRR_DBG) $(FRR_SNMP_DBG) $(LIBYANG2_DBG) $(SONIC_RSYSLOG_PLUGIN) -$(DOCKER_FPM_FRR)_DBG_IMAGE_PACKAGES = $($(DOCKER_SWSS_LAYER_BULLSEYE)_DBG_IMAGE_PACKAGES) +$(DOCKER_FPM_FRR)_DBG_IMAGE_PACKAGES = $($(DOCKER_SWSS_LAYER_BOOKWORM)_DBG_IMAGE_PACKAGES) -$(DOCKER_FPM_FRR)_LOAD_DOCKERS += $(DOCKER_SWSS_LAYER_BULLSEYE) +$(DOCKER_FPM_FRR)_LOAD_DOCKERS += $(DOCKER_SWSS_LAYER_BOOKWORM) $(DOCKER_FPM_FRR)_VERSION = 1.0.0 $(DOCKER_FPM_FRR)_PACKAGE_NAME = fpm-frr @@ -41,5 +41,5 @@ $(DOCKER_FPM_FRR)_BASE_IMAGE_FILES += TSB:/usr/bin/TSB $(DOCKER_FPM_FRR)_BASE_IMAGE_FILES += TSC:/usr/bin/TSC $(DOCKER_FPM_FRR)_BASE_IMAGE_FILES += TS:/usr/bin/TS -SONIC_BULLSEYE_DOCKERS += $(DOCKER_FPM_FRR) -SONIC_BULLSEYE_DBG_DOCKERS += $(DOCKER_FPM_FRR_DBG) +SONIC_BOOKWORM_DOCKERS += $(DOCKER_FPM_FRR) +SONIC_BOOKWORM_DBG_DOCKERS += $(DOCKER_FPM_FRR_DBG) From d0bf7e587327ac49b8d5c8c3a971d91a8ac87425 Mon Sep 17 00:00:00 2001 From: Hasan Naqvi <56742004+hasan-brcm@users.noreply.github.com> Date: Thu, 29 Feb 2024 18:14:27 -0800 Subject: [PATCH 3/9] Revert Makefile change. --- src/sonic-build-hooks/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-build-hooks/Makefile b/src/sonic-build-hooks/Makefile index 5866f879d7b3..f20acac0b143 100644 --- a/src/sonic-build-hooks/Makefile +++ b/src/sonic-build-hooks/Makefile @@ -28,7 +28,7 @@ DEPENDS := $(shell find scripts hooks debian -type f) $(SONIC_BUILD_HOOKS_TARGET): $(DEPENDS) @rm -rf $(BUILDINFO_DIR)/$(SONIC_BUILD_HOOKS) $(TMP_DIR) @mkdir -p $(DEBIAN_DIR) $(SCRIPTS_PATH) $(HOOKS_PATH) $(SYMBOL_LINK_PATH) $(TRUSTED_GPG_PATH) $(BUILDINFO_DIR) - @chmod 00775 $(DEBIAN_DIR) + @chmod 0775 $(DEBIAN_DIR) @cp debian/* $(DEBIAN_DIR)/ @cp scripts/* $(SCRIPTS_PATH)/ @cp hooks/* $(HOOKS_PATH)/ From 41c4b79a6051a1290980c81f052dabb553165ae2 Mon Sep 17 00:00:00 2001 From: Hasan Naqvi <56742004+hasan-brcm@users.noreply.github.com> Date: Mon, 22 Apr 2024 13:58:15 -0700 Subject: [PATCH 4/9] Update libyang.mk --- rules/libyang.mk | 3 --- 1 file changed, 3 deletions(-) diff --git a/rules/libyang.mk b/rules/libyang.mk index 6f7483ee5bd6..a8e6734459ea 100644 --- a/rules/libyang.mk +++ b/rules/libyang.mk @@ -12,10 +12,7 @@ LIBYANG = libyang_$(LIBYANG_VERSION)_$(CONFIGURED_ARCH).deb $(LIBYANG)_SRC_PATH = $(SRC_PATH)/libyang # introduce artifical dependency between LIBYANG and FRR # make sure LIBYANG is compile after FRR -# TODO: Remove once snmp build has been updated -ifeq ($(BLDENV),bullseye) $(LIBYANG)_AFTER = $(FRR) -endif SONIC_MAKE_DEBS += $(LIBYANG) LIBYANG_DEV = libyang-dev_$(LIBYANG_VERSION)_$(CONFIGURED_ARCH).deb From a26d3a9c4bfe2e6fa4e7d24d3ec9c38391ad34a6 Mon Sep 17 00:00:00 2001 From: Hasan Naqvi <56742004+hasan-brcm@users.noreply.github.com> Date: Thu, 9 May 2024 13:20:07 -0700 Subject: [PATCH 5/9] Update Makefile Add DEBEMAIL env variable required by debian gpb dch command. ``` gbp:error: Either 'EMAIL' or 'DEBEMAIL' must be set in the environment for 'dch' to work make[1]: *** [Makefile:11: /sonic/target/debs/bookworm/frr_8.5.4-sonic-0_amd64.deb] Error 1 ``` --- src/sonic-frr/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sonic-frr/Makefile b/src/sonic-frr/Makefile index 704786daae17..c7c43ccecc0e 100644 --- a/src/sonic-frr/Makefile +++ b/src/sonic-frr/Makefile @@ -7,6 +7,9 @@ DERIVED_TARGET = $(FRR_PYTHONTOOLS) $(FRR_DBG) $(FRR_SNMP) $(FRR_SNMP_DBG) SUFFIX = $(shell date +%Y%m%d\.%H%M%S) STG_BRANCH = stg_temp.$(SUFFIX) +# DEBEMAIL required by gpb dch +export DEBEMAIL := sonicproject@googlegroups.com + $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : # Build the package pushd ./frr From 107850d8c11019aca0c9d309a5eee8004d0795be Mon Sep 17 00:00:00 2001 From: Hasan Naqvi <56742004+hasan-brcm@users.noreply.github.com> Date: Wed, 22 May 2024 00:44:53 -0700 Subject: [PATCH 6/9] Update test_bbr.py --- src/sonic-bgpcfgd/tests/test_bbr.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/sonic-bgpcfgd/tests/test_bbr.py b/src/sonic-bgpcfgd/tests/test_bbr.py index b11277bae7b8..a4935fcdd371 100644 --- a/src/sonic-bgpcfgd/tests/test_bbr.py +++ b/src/sonic-bgpcfgd/tests/test_bbr.py @@ -5,9 +5,7 @@ from copy import deepcopy from . import swsscommon_test - -with patch.dict("sys.modules", swsscommon=swsscommon_test): - from bgpcfgd.managers_bbr import BBRMgr +from bgpcfgd.managers_bbr import BBRMgr global_constants = { "bgp": { From f51e52283890bd83535721a784ce500b60dedc6f Mon Sep 17 00:00:00 2001 From: Hasan Naqvi <56742004+hasan-brcm@users.noreply.github.com> Date: Wed, 22 May 2024 00:45:18 -0700 Subject: [PATCH 7/9] Update test_setsrc.py --- src/sonic-bgpcfgd/tests/test_setsrc.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sonic-bgpcfgd/tests/test_setsrc.py b/src/sonic-bgpcfgd/tests/test_setsrc.py index 4de72102b613..ad4c1c74ba5e 100644 --- a/src/sonic-bgpcfgd/tests/test_setsrc.py +++ b/src/sonic-bgpcfgd/tests/test_setsrc.py @@ -7,8 +7,7 @@ from . import swsscommon_test from swsscommon import swsscommon -with patch.dict("sys.modules", swsscommon=swsscommon_test): - from bgpcfgd.managers_setsrc import ZebraSetSrc +from bgpcfgd.managers_setsrc import ZebraSetSrc TEMPLATE_PATH = os.path.abspath('../../dockers/docker-fpm-frr/frr') From 10dde389a71117f2f6303f0fc9bb8f9a41321939 Mon Sep 17 00:00:00 2001 From: Hasan Naqvi <56742004+hasan-brcm@users.noreply.github.com> Date: Thu, 30 May 2024 18:03:13 -0700 Subject: [PATCH 8/9] Update test_bbr.py --- src/sonic-bgpcfgd/tests/test_bbr.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sonic-bgpcfgd/tests/test_bbr.py b/src/sonic-bgpcfgd/tests/test_bbr.py index a4935fcdd371..b95b94493af4 100644 --- a/src/sonic-bgpcfgd/tests/test_bbr.py +++ b/src/sonic-bgpcfgd/tests/test_bbr.py @@ -5,6 +5,9 @@ from copy import deepcopy from . import swsscommon_test +import sys +sys.modules["swsscommon"] = swsscommon_test + from bgpcfgd.managers_bbr import BBRMgr global_constants = { From 70af120494a765e4c9a37e7c9d70b23a1230db84 Mon Sep 17 00:00:00 2001 From: Hasan Naqvi <56742004+hasan-brcm@users.noreply.github.com> Date: Thu, 30 May 2024 18:04:27 -0700 Subject: [PATCH 9/9] Update test_setsrc.py --- src/sonic-bgpcfgd/tests/test_setsrc.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sonic-bgpcfgd/tests/test_setsrc.py b/src/sonic-bgpcfgd/tests/test_setsrc.py index ad4c1c74ba5e..17d6ea96f2e9 100644 --- a/src/sonic-bgpcfgd/tests/test_setsrc.py +++ b/src/sonic-bgpcfgd/tests/test_setsrc.py @@ -7,6 +7,9 @@ from . import swsscommon_test from swsscommon import swsscommon +import sys +sys.modules["swsscommon"] = swsscommon_test + from bgpcfgd.managers_setsrc import ZebraSetSrc TEMPLATE_PATH = os.path.abspath('../../dockers/docker-fpm-frr/frr')