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
This commit is contained in:
wumiao_nokia 2024-03-04 18:47:07 -05:00 committed by GitHub
parent d4ca86bf9d
commit 0c44d3ddff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 9 deletions

View File

@ -1,5 +1,5 @@
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %} {% 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 ARG docker_container_name

View File

@ -6,21 +6,21 @@ DOCKER_MACSEC_DBG = $(DOCKER_MACSEC_STEM)-$(DBG_IMAGE_MARK).gz
$(DOCKER_MACSEC)_PATH = $(DOCKERS_PATH)/$(DOCKER_MACSEC_STEM) $(DOCKER_MACSEC)_PATH = $(DOCKERS_PATH)/$(DOCKER_MACSEC_STEM)
$(DOCKER_MACSEC)_DEPENDS += $(SWSS) $(WPASUPPLICANT) $(LIBSWSSCOMMON) $(LIBNL3) $(LIBNL_GENL3) $(LIBNL_ROUTE3) $(DOCKER_MACSEC)_DEPENDS += $(WPASUPPLICANT)
$(DOCKER_MACSEC)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_DEPENDS) $(DOCKER_MACSEC)_DBG_DEPENDS = $($(DOCKER_SWSS_LAYER_BOOKWORM)_DBG_DEPENDS)
$(DOCKER_MACSEC)_DBG_DEPENDS += $(SWSS_DBG) $(WPASUPPLICANT_DBG) $(LIBSWSSCOMMON_DBG) $(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_PYTHON_WHEELS = $(SONIC_UTILITIES_PY3)
$(DOCKER_MACSEC)_INSTALL_DEBS = $(PYTHON3_SWSSCOMMON) $(LIBYANG_PY3) $(DOCKER_MACSEC)_INSTALL_DEBS = $(PYTHON3_SWSSCOMMON) $(LIBYANG_PY3)
SONIC_DOCKER_IMAGES += $(DOCKER_MACSEC) SONIC_DOCKER_IMAGES += $(DOCKER_MACSEC)
SONIC_BULLSEYE_DOCKERS += $(DOCKER_MACSEC) SONIC_BOOKWORM_DOCKERS += $(DOCKER_MACSEC)
SONIC_DOCKER_DBG_IMAGES += $(DOCKER_MACSEC_DBG) 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) ifeq ($(INCLUDE_KUBERNETES),y)
$(DOCKER_MACSEC)_DEFAULT_FEATURE_OWNER = kube $(DOCKER_MACSEC)_DEFAULT_FEATURE_OWNER = kube
@ -28,7 +28,6 @@ endif
$(DOCKER_MACSEC)_DEFAULT_FEATURE_STATE_ENABLED = y $(DOCKER_MACSEC)_DEFAULT_FEATURE_STATE_ENABLED = y
ifeq ($(INCLUDE_MACSEC),y) ifeq ($(INCLUDE_MACSEC),y)
ifeq ($(INSTALL_DEBUG_TOOLS),y) ifeq ($(INSTALL_DEBUG_TOOLS),y)
SONIC_PACKAGES_LOCAL += $(DOCKER_MACSEC_DBG) SONIC_PACKAGES_LOCAL += $(DOCKER_MACSEC_DBG)