Skip to content

Commit

Permalink
Make macsec container to build with bookworm (#18148)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
wumiaont authored Mar 4, 2024
1 parent d4ca86b commit 0c44d3d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dockers/docker-macsec/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -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

Expand Down
15 changes: 7 additions & 8 deletions rules/docker-macsec.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,28 @@ 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
endif

$(DOCKER_MACSEC)_DEFAULT_FEATURE_STATE_ENABLED = y


ifeq ($(INCLUDE_MACSEC),y)
ifeq ($(INSTALL_DEBUG_TOOLS),y)
SONIC_PACKAGES_LOCAL += $(DOCKER_MACSEC_DBG)
Expand Down

0 comments on commit 0c44d3d

Please sign in to comment.