-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MACsec container and wpa_supplicant component #5700
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
91262a8
Add compile configuration to support wpa supplicant 2.9
Pterosaur e7e5013
Fix : Duplicate build wpasupplicant
Pterosaur 32a6a0e
Add docker base buster
Pterosaur a5f76a2
Merge branch 'remote master' of https://github.com/Azure/sonic-buildi…
Pterosaur e6ccfd7
Reset useless file
Pterosaur 982f0c5
add macsec Docker
Pterosaur 4e1196b
change wpasupplicant file mode
Pterosaur 82e88ce
change file mode
Pterosaur ce25799
Add wpa dependencies in build environment
Pterosaur 91607dc
Add wpa dependencies in build environment
Pterosaur 749ab4d
Remove useless spaces
Pterosaur bdcf0be
Merge branch 'master' of https://github.com/Azure/sonic-buildimage in…
Pterosaur 4b19914
Merge master of https://github.com/Azure/sonic-buildimage
Pterosaur d68bd32
Use SONiC libnl
Pterosaur 7bc8230
temp_fix: Checkout to SONiC Plugin branch
Pterosaur 827cab4
Merge branch 'master' of https://github.com/Azure/sonic-buildimage in…
Pterosaur 5aef671
Merge branch 'master' of https://github.com/Azure/sonic-buildimage in…
Pterosaur fc95f94
Merge branch 'master' into macsec
Pterosaur e9e0b89
change file mode
Pterosaur 8890750
Add wpa_supplicant SONiC plugin patch
Pterosaur 7d69ee1
Change debian wpa_supplicant to sonic_hostap
Pterosaur 6ad9245
Merge branch 'master' into macsec
Pterosaur 5dccaf2
formmat indent
Pterosaur d801a51
Fix compile error
Pterosaur 9d82e31
temp fix wpa supplicant compile bug
Pterosaur 82fbfc7
Merge branch 'master' into macsec
Pterosaur 7b969de
Change wpa repo source from debian to Azure/sonic-wpa-supplicant
Pterosaur 7169af2
Add sonic_wpa_supplicant as submodule
Pterosaur 1a0595b
[testonly]: Set shell as verbose mode
Pterosaur 992ae50
Fix dep files
Pterosaur File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %} | ||
FROM docker-config-engine-buster | ||
|
||
ARG docker_container_name | ||
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf | ||
|
||
## Make apt-get non-interactive | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update | ||
|
||
{% if docker_macsec_debs.strip() -%} | ||
# Copy locally-built Debian package dependencies | ||
{{ copy_files("debs/", docker_macsec_debs.split(' '), "/debs/") }} | ||
|
||
# Install locally-built Debian packages and implicitly install their dependencies | ||
{{ install_debian_packages(docker_macsec_debs.split(' ')) }} | ||
{%- endif %} | ||
|
||
RUN apt-get clean -y && \ | ||
apt-get autoclean -y && \ | ||
apt-get autoremove -y && \ | ||
rm -rf /debs | ||
|
||
COPY ["start.sh", "/usr/bin/"] | ||
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] | ||
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] | ||
COPY ["critical_processes", "/etc/supervisor"] | ||
|
||
# ENTRYPOINT ["/usr/bin/supervisord"] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env bash | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
DPATH := $($(DOCKER_MACSEC)_PATH) | ||
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/docker-macsec.mk rules/docker-macsec.dep | ||
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) | ||
DEP_FILES += $(shell git ls-files $(DPATH)) | ||
|
||
$(DOCKER_MACSEC)_CACHE_MODE := GIT_CONTENT_SHA | ||
$(DOCKER_MACSEC)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) | ||
$(DOCKER_MACSEC)_DEP_FILES := $(DEP_FILES) | ||
|
||
$(eval $(call add_dbg_docker,$(DOCKER_MACSEC),$(DOCKER_MACSEC_DBG))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# docker image for macsec agent | ||
|
||
DOCKER_MACSEC_STEM = docker-macsec | ||
DOCKER_MACSEC = $(DOCKER_MACSEC_STEM).gz | ||
DOCKER_MACSEC_DBG = $(DOCKER_MACSEC_STEM)-$(DBG_IMAGE_MARK).gz | ||
|
||
$(DOCKER_MACSEC)_PATH = $(DOCKERS_PATH)/$(DOCKER_MACSEC_STEM) | ||
|
||
$(DOCKER_MACSEC)_DEPENDS += $(SWSS) $(WPASUPPLICANT) $(REDIS_TOOLS) $(LIBNL3) $(LIBNL_GENL3) $(LIBNL_ROUTE3) | ||
$(DOCKER_MACSEC)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS) | ||
$(DOCKER_MACSEC)_DBG_DEPENDS += $(SWSS_DBG) $(LIBSWSSCOMMON_DBG) | ||
$(DOCKER_MACSEC)_DBG_DEPENDS += $(WPASUPPLICANT_DBG) | ||
|
||
$(DOCKER_MACSEC)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES) | ||
|
||
$(DOCKER_MACSEC)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) | ||
|
||
SONIC_DOCKER_IMAGES += $(DOCKER_MACSEC) | ||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_MACSEC) | ||
SONIC_BUSTER_DOCKERS += $(DOCKER_MACSEC) | ||
|
||
SONIC_DOCKER_DBG_IMAGES += $(DOCKER_MACSEC_DBG) | ||
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_MACSEC_DBG) | ||
SONIC_BUSTER_DBG_DOCKERS += $(DOCKER_MACSEC_DBG) | ||
|
||
$(DOCKER_MACSEC)_CONTAINER_NAME = macsec | ||
$(DOCKER_MACSEC)_RUN_OPT += --privileged -t | ||
$(DOCKER_MACSEC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro | ||
$(DOCKER_MACSEC)_RUN_OPT += -v /host/warmboot:/var/warmboot | ||
|
||
# $(DOCKER_MACSEC)_BASE_IMAGE_FILES += macsecctl:/usr/bin/macsecctl | ||
$(DOCKER_MACSEC)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
SPATH := $($(WPASUPPLICANT)_SRC_PATH) | ||
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/wpasupplicant.mk rules/wpasupplicant.dep | ||
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) | ||
# Account files under the src/wpasupplicant/ except submodule directory. | ||
DEP_FILES += $(shell git ls-files $(SPATH) | grep -Ev 'sonic-wpa-supplicant') | ||
|
||
# Account for source files under the sonic-wpa-supplicant submodule directory as well. | ||
WPASUPPLICANT_SPATH := $(SPATH)/sonic-wpa-supplicant | ||
SMDEP_FILES := $(addprefix $(WPASUPPLICANT_SPATH)/,$(shell cd $(WPASUPPLICANT_SPATH) && git ls-files)) | ||
|
||
$(WPASUPPLICANT)_CACHE_MODE := GIT_CONTENT_SHA | ||
$(WPASUPPLICANT)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) | ||
$(WPASUPPLICANT)_DEP_FILES := $(DEP_FILES) | ||
$(WPASUPPLICANT)_SMDEP_FILES := $(SMDEP_FILES) | ||
$(WPASUPPLICANT)_SMDEP_PATHS := $(WPASUPPLICANT_SPATH) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# wpa package | ||
|
||
WPASUPPLICANT_VERSION = 2.9.0-14 | ||
|
||
export WPASUPPLICANT_VERSION | ||
|
||
WPASUPPLICANT = wpasupplicant_$(WPASUPPLICANT_VERSION)_$(CONFIGURED_ARCH).deb | ||
$(WPASUPPLICANT)_SRC_PATH = $(SRC_PATH)/wpasupplicant | ||
$(WPASUPPLICANT)_DEPENDS += $(LIBSWSSCOMMON_DEV) $(LIBNL3_DEV) $(LIBNL_GENL3_DEV) $(LIBNL_ROUTE3_DEV) | ||
$(WPASUPPLICANT)_RDEPENDS += $(LIBSWSSCOMMON) $(LIBNL3) $(LIBNL_GENL3) $(LIBNL_ROUTE3) | ||
SONIC_MAKE_DEBS += $(WPASUPPLICANT) | ||
|
||
WPASUPPLICANT_DBG = wpasupplicant-dbgsym_$(WPASUPPLICANT_VERSION)_$(CONFIGURED_ARCH).deb | ||
$(eval $(call add_derived_package,$(WPASUPPLICANT),$(WPASUPPLICANT_DBG))) | ||
|
||
# The .c, .cpp, .h & .hpp files under src/{$DBG_SRC_ARCHIVE list} | ||
# are archived into debug one image to facilitate debugging. | ||
# | ||
DBG_SRC_ARCHIVE += wpasupplicant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.ONESHELL: | ||
SHELL = /bin/bash | ||
.SHELLFLAGS += -e | ||
|
||
MAIN_TARGET = wpasupplicant_$(WPASUPPLICANT_VERSION)_$(CONFIGURED_ARCH).deb | ||
DERIVED_TARGETS = wpasupplicant-dbgsym_$(WPASUPPLICANT_VERSION)_$(CONFIGURED_ARCH).deb | ||
|
||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : | ||
# Clone wpa repo | ||
pushd ./sonic-wpa-supplicant | ||
dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) | ||
popd | ||
|
||
# Move the newly-built .deb packages to the destination directory | ||
mv $(DERIVED_TARGETS) $* $(DEST)/ | ||
|
||
$(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET) |
Submodule sonic-wpa-supplicant
added at
288cca
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We build our own libnl3 and libhiredis. Please depend on them instead of pre-install the vanilla ones in sonic-slave.