From 0c44d3ddff510cb977ccfc4a5e6859b450fd92ab Mon Sep 17 00:00:00 2001 From: wumiao_nokia Date: Mon, 4 Mar 2024 18:47:07 -0500 Subject: [PATCH] Make macsec container to build with bookworm (#18148) Why I did it We Nokia took the task to make macsec container to work with bookworm. This PR requires another PR for sonic-wpa-supplicant(sonic-net/sonic-wpa-supplicant#80) to be in first. Otherwise sonic build will fail for bookworm wpasupplicant debian package. How I did it How to verify it After build and boot up system with new image, macsec container should run with bookworm. Corresponding mgmt macsec suite will work here. Which release branch to backport (provide reason below if selected) Tested branch (Please provide the tested image version) Tested with latest master of sonic-buildimage. Built vs image and loaded into vs testing environment. Code pass with macsec test suites. Description for the changelog Make macsec container to build with bookworm --- dockers/docker-macsec/Dockerfile.j2 | 2 +- rules/docker-macsec.mk | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/dockers/docker-macsec/Dockerfile.j2 b/dockers/docker-macsec/Dockerfile.j2 index 3ec18b1372..fc8674859f 100644 --- a/dockers/docker-macsec/Dockerfile.j2 +++ b/dockers/docker-macsec/Dockerfile.j2 @@ -1,5 +1,5 @@ {% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %} -FROM docker-config-engine-bullseye-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}} +FROM docker-swss-layer-bookworm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}} ARG docker_container_name diff --git a/rules/docker-macsec.mk b/rules/docker-macsec.mk index acadbea64b..c36518aafe 100644 --- a/rules/docker-macsec.mk +++ b/rules/docker-macsec.mk @@ -6,21 +6,21 @@ DOCKER_MACSEC_DBG = $(DOCKER_MACSEC_STEM)-$(DBG_IMAGE_MARK).gz $(DOCKER_MACSEC)_PATH = $(DOCKERS_PATH)/$(DOCKER_MACSEC_STEM) -$(DOCKER_MACSEC)_DEPENDS += $(SWSS) $(WPASUPPLICANT) $(LIBSWSSCOMMON) $(LIBNL3) $(LIBNL_GENL3) $(LIBNL_ROUTE3) -$(DOCKER_MACSEC)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_DEPENDS) -$(DOCKER_MACSEC)_DBG_DEPENDS += $(SWSS_DBG) $(WPASUPPLICANT_DBG) $(LIBSWSSCOMMON_DBG) +$(DOCKER_MACSEC)_DEPENDS += $(WPASUPPLICANT) +$(DOCKER_MACSEC)_DBG_DEPENDS = $($(DOCKER_SWSS_LAYER_BOOKWORM)_DBG_DEPENDS) +$(DOCKER_MACSEC)_DBG_DEPENDS += $(WPASUPPLICANT_DBG) -$(DOCKER_MACSEC)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_IMAGE_PACKAGES) +$(DOCKER_MACSEC)_DBG_IMAGE_PACKAGES = $($(DOCKER_SWSS_LAYER_BOOKWORM)_DBG_IMAGE_PACKAGES) -$(DOCKER_MACSEC)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BULLSEYE) +$(DOCKER_MACSEC)_LOAD_DOCKERS += $(DOCKER_SWSS_LAYER_BOOKWORM) $(DOCKER_MACSEC)_INSTALL_PYTHON_WHEELS = $(SONIC_UTILITIES_PY3) $(DOCKER_MACSEC)_INSTALL_DEBS = $(PYTHON3_SWSSCOMMON) $(LIBYANG_PY3) SONIC_DOCKER_IMAGES += $(DOCKER_MACSEC) -SONIC_BULLSEYE_DOCKERS += $(DOCKER_MACSEC) +SONIC_BOOKWORM_DOCKERS += $(DOCKER_MACSEC) SONIC_DOCKER_DBG_IMAGES += $(DOCKER_MACSEC_DBG) -SONIC_BULLSEYE_DBG_DOCKERS += $(DOCKER_MACSEC_DBG) +SONIC_BOOKWORM_DBG_DOCKERS += $(DOCKER_MACSEC_DBG) ifeq ($(INCLUDE_KUBERNETES),y) $(DOCKER_MACSEC)_DEFAULT_FEATURE_OWNER = kube @@ -28,7 +28,6 @@ endif $(DOCKER_MACSEC)_DEFAULT_FEATURE_STATE_ENABLED = y - ifeq ($(INCLUDE_MACSEC),y) ifeq ($(INSTALL_DEBUG_TOOLS),y) SONIC_PACKAGES_LOCAL += $(DOCKER_MACSEC_DBG)