From 7c09e361ba4f1b368c7d02f4bab3d6afd641996e Mon Sep 17 00:00:00 2001 From: Alexander Allen Date: Wed, 19 Jan 2022 20:53:59 +0000 Subject: [PATCH 1/5] Upgrade mellanox platform containers (syncd / saiserver / syncd-rpc) and pmon to bullseye --- dockers/docker-platform-monitor/Dockerfile.j2 | 2 +- platform/mellanox/docker-saiserver-mlnx.mk | 7 ++-- .../docker-saiserver-mlnx/Dockerfile.j2 | 4 +-- platform/mellanox/docker-syncd-mlnx-rpc.mk | 4 +-- .../docker-syncd-mlnx-rpc/Dockerfile.j2 | 31 ++++++++++------- .../docker-syncd-mlnx-rpc/ptf_nn_agent.conf | 2 +- platform/mellanox/docker-syncd-mlnx.mk | 2 +- .../mellanox/docker-syncd-mlnx/Dockerfile.j2 | 11 ++++--- platform/mellanox/issu-version.mk | 2 -- platform/mellanox/issu-version/Makefile | 5 --- platform/mellanox/libsaithrift-dev.mk | 7 +--- platform/mellanox/mft.mk | 2 -- platform/mellanox/mft/Makefile | 2 -- platform/template/docker-syncd-bullseye.mk | 33 +++++++++++++++++++ rules/docker-platform-monitor.mk | 10 +++--- rules/sonic-ledd.mk | 2 +- rules/sonic-psud.mk | 2 +- rules/sonic-syseepromd.mk | 2 +- rules/sonic-thermalctld.mk | 2 +- rules/sonic-xcvrd.mk | 2 +- sonic-slave-bullseye/Dockerfile.j2 | 4 +++ 21 files changed, 81 insertions(+), 57 deletions(-) create mode 100644 platform/template/docker-syncd-bullseye.mk diff --git a/dockers/docker-platform-monitor/Dockerfile.j2 b/dockers/docker-platform-monitor/Dockerfile.j2 index 4f5e941dd92a..720c45362d7f 100755 --- a/dockers/docker-platform-monitor/Dockerfile.j2 +++ b/dockers/docker-platform-monitor/Dockerfile.j2 @@ -1,5 +1,5 @@ {% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %} -FROM docker-config-engine-buster +FROM docker-config-engine-bullseye ARG docker_container_name ARG image_version diff --git a/platform/mellanox/docker-saiserver-mlnx.mk b/platform/mellanox/docker-saiserver-mlnx.mk index d71349a28ae7..74fb96f91d1b 100644 --- a/platform/mellanox/docker-saiserver-mlnx.mk +++ b/platform/mellanox/docker-saiserver-mlnx.mk @@ -20,15 +20,12 @@ DOCKER_SAISERVER_MLNX = docker-saiserver$(SAITHRIFT_VER)-mlnx.gz $(DOCKER_SAISERVER_MLNX)_PATH = $(PLATFORM_PATH)/docker-saiserver-mlnx $(DOCKER_SAISERVER_MLNX)_DEPENDS += $(SAISERVER) $(PYTHON_SDK_API) $(DOCKER_SAISERVER_MLNX)_PYTHON_DEBS += $(MLNX_SFPD) -$(DOCKER_SAISERVER_MLNX)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_SAISERVER_MLNX)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BULLSEYE) SONIC_DOCKER_IMAGES += $(DOCKER_SAISERVER_MLNX) -SONIC_BUSTER_DOCKERS += $(DOCKER_SAISERVER_MLNX) - $(DOCKER_SAISERVER_MLNX)_CONTAINER_NAME = saiserver$(SAITHRIFT_VER) +SONIC_BULLSEYE_DOCKERS += $(DOCKER_SAISERVER_MLNX) $(DOCKER_SAISERVER_MLNX)_RUN_OPT += --privileged -t $(DOCKER_SAISERVER_MLNX)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SAISERVER_MLNX)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro $(DOCKER_SYNCD_BASE)_RUN_OPT += --tmpfs /run/criu - -SONIC_BUSTER_DOCKERS += $(DOCKER_SAISERVER_MLNX) diff --git a/platform/mellanox/docker-saiserver-mlnx/Dockerfile.j2 b/platform/mellanox/docker-saiserver-mlnx/Dockerfile.j2 index b356f145c9a4..62c6468b7804 100644 --- a/platform/mellanox/docker-saiserver-mlnx/Dockerfile.j2 +++ b/platform/mellanox/docker-saiserver-mlnx/Dockerfile.j2 @@ -15,7 +15,7 @@ ## limitations under the License. ## {% from "dockers/dockerfile-macros.j2" import install_debian_packages %} -FROM docker-config-engine-buster +FROM docker-config-engine-bullseye ARG docker_container_name RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf @@ -41,7 +41,7 @@ python-debs/{{ deb }}{{' '}} {%- endfor -%} debs/ -RUN apt-get install -y --no-install-recommends libxml2 iptables libbsd0 protobuf-c-compiler protobuf-compiler python-protobuf libprotobuf-c1 python-future python-ipaddr libnet1 pkg-config asciidoc xmlto +RUN apt-get install -y --no-install-recommends libxml2 iptables libbsd0 protobuf-c-compiler protobuf-compiler python3-protobuf libprotobuf-c1 python3-future python3-ipaddr libnet1 pkg-config asciidoc xmlto {{ install_debian_packages(docker_saiserver_mlnx_debs.split(' ')) }} diff --git a/platform/mellanox/docker-syncd-mlnx-rpc.mk b/platform/mellanox/docker-syncd-mlnx-rpc.mk index fb740cdee4e9..9d6ce4bc6f1b 100644 --- a/platform/mellanox/docker-syncd-mlnx-rpc.mk +++ b/platform/mellanox/docker-syncd-mlnx-rpc.mk @@ -30,7 +30,7 @@ endif $(DOCKER_SYNCD_MLNX_RPC)_PYTHON_DEBS += $(MLNX_SFPD) $(DOCKER_SYNCD_MLNX_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_MLNX_RPC) -SONIC_BUSTER_DOCKERS += $(DOCKER_SYNCD_MLNX_RPC) +SONIC_BULLSEYE_DOCKERS += $(DOCKER_SYNCD_MLNX_RPC) ifeq ($(ENABLE_SYNCD_RPC),y) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_MLNX_RPC) endif @@ -42,5 +42,3 @@ $(DOCKER_SYNCD_MLNX_RPC)_RUN_OPT += --privileged -t $(DOCKER_SYNCD_MLNX_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_MLNX_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro $(DOCKER_SYNCD_MLNX_RPC)_RUN_OPT += -v /host/warmboot:/var/warmboot - -SONIC_BUSTER_DOCKERS += $(DOCKER_SYNCD_MLNX_RPC) diff --git a/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 b/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 index 50850039c01d..c38c30571ea4 100644 --- a/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 +++ b/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 @@ -24,21 +24,10 @@ RUN mkdir -p /var/run/sx_sdk RUN apt-get purge -y syncd -{% if docker_syncd_mlnx_rpc_debs.strip() -%} -# Copy locally-built Debian package dependencies -{{ copy_files("debs/", docker_syncd_mlnx_rpc_debs.split(' '), "/debs/") }} -{% endif %} - -{% if docker_syncd_mlnx_rpc_pydebs.strip() -%} -# Copy locally-built Debian package dependencies -{{ copy_files("python-debs/", docker_syncd_mlnx_rpc_pydebs.split(' '), "/debs/") }} -{% endif %} - ## Pre-install the fundamental packages RUN apt-get update \ && apt-get -y install \ net-tools \ - python-pip \ python-setuptools \ build-essential \ libssl-dev \ @@ -48,7 +37,22 @@ RUN apt-get update \ cmake \ libqt5core5a \ libqt5network5 \ - libboost-atomic1.71.0 + libboost-atomic1.74.0 + +# Build and install python-scapy +RUN curl http://ftp.us.debian.org/debian/pool/main/s/scapy/python-scapy_2.4.0-2_all.deb --output python-scapy_2.4.0-2_all.deb \ + && dpkg -i python-scapy_2.4.0-2_all.deb \ + && apt install -f + +{% if docker_syncd_mlnx_rpc_debs.strip() -%} +# Copy locally-built Debian package dependencies +{{ copy_files("debs/", docker_syncd_mlnx_rpc_debs.split(' '), "/debs/") }} +{% endif %} + +{% if docker_syncd_mlnx_rpc_pydebs.strip() -%} +# Copy locally-built Debian package dependencies +{{ copy_files("python-debs/", docker_syncd_mlnx_rpc_pydebs.split(' '), "/debs/") }} +{% endif %} {% if docker_syncd_mlnx_rpc_debs.strip() -%} # Install locally-built Debian packages and implicitly install their dependencies @@ -60,6 +64,9 @@ RUN apt-get update \ {{ install_debian_packages(docker_syncd_mlnx_rpc_pydebs.split(' ')) }} {% endif %} +# Install pip2 since it is no longer in the APT upstream +RUN curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py \ + && python2 get-pip.py RUN wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz \ && tar xvfz 1.0.0.tar.gz \ diff --git a/platform/mellanox/docker-syncd-mlnx-rpc/ptf_nn_agent.conf b/platform/mellanox/docker-syncd-mlnx-rpc/ptf_nn_agent.conf index cd6a7d4db75d..80812464a19e 100644 --- a/platform/mellanox/docker-syncd-mlnx-rpc/ptf_nn_agent.conf +++ b/platform/mellanox/docker-syncd-mlnx-rpc/ptf_nn_agent.conf @@ -1,5 +1,5 @@ [program:ptf_nn_agent] -command=/usr/bin/python /opt/ptf_nn_agent.py --device-socket 1@tcp://0.0.0.0:10900 -i 1-3@Ethernet12 --set-nn-rcv-buffer=109430400 --set-iface-rcv-buffer=109430400 --set-nn-snd-buffer=109430400 --set-iface-snd-buffer=109430400 +command=/usr/bin/python2 /opt/ptf_nn_agent.py --device-socket 1@tcp://0.0.0.0:10900 -i 1-3@Ethernet12 --set-nn-rcv-buffer=109430400 --set-iface-rcv-buffer=109430400 --set-nn-snd-buffer=109430400 --set-iface-snd-buffer=109430400 process_name=ptf_nn_agent stdout_logfile=/tmp/ptf_nn_agent.out.log stderr_logfile=/tmp/ptf_nn_agent.err.log diff --git a/platform/mellanox/docker-syncd-mlnx.mk b/platform/mellanox/docker-syncd-mlnx.mk index a2e733782b9e..1328d0e0d0dd 100644 --- a/platform/mellanox/docker-syncd-mlnx.mk +++ b/platform/mellanox/docker-syncd-mlnx.mk @@ -17,7 +17,7 @@ # docker image for mlnx syncd DOCKER_SYNCD_PLATFORM_CODE = mlnx -include $(PLATFORM_PATH)/../template/docker-syncd-base.mk +include $(PLATFORM_PATH)/../template/docker-syncd-bullseye.mk $(DOCKER_SYNCD_BASE)_DEPENDS += $(SYNCD) $(PYTHON_SDK_API) $(MFT) diff --git a/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 b/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 index 404db43c70aa..ed52957453af 100755 --- a/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 +++ b/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 @@ -15,7 +15,7 @@ ## limitations under the License. ## {% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %} -FROM docker-config-engine-buster +FROM docker-config-engine-bullseye ARG docker_container_name @@ -29,11 +29,12 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && \ apt-get install -y \ libxml2 \ - python-pip \ - python-dev \ - python-setuptools + python3-pip \ + python3-dev \ + python-is-python3 \ + python3-setuptools -RUN pip2 install --upgrade pip +RUN pip3 install --upgrade pip RUN apt-get purge -y python-pip {% if docker_syncd_mlnx_debs.strip() -%} diff --git a/platform/mellanox/issu-version.mk b/platform/mellanox/issu-version.mk index d369ec600236..ee0855c56ced 100644 --- a/platform/mellanox/issu-version.mk +++ b/platform/mellanox/issu-version.mk @@ -19,9 +19,7 @@ ISSU_VERSION_FILE = issu-version $(ISSU_VERSION_FILE)_SRC_PATH = $(PLATFORM_PATH)/issu-version -ifeq ($(BLDENV), buster) $(ISSU_VERSION_FILE)_DEPENDS += $(APPLIBS) -endif SONIC_MAKE_FILES += $(ISSU_VERSION_FILE) diff --git a/platform/mellanox/issu-version/Makefile b/platform/mellanox/issu-version/Makefile index 2578e9ff060b..fbb21af74902 100644 --- a/platform/mellanox/issu-version/Makefile +++ b/platform/mellanox/issu-version/Makefile @@ -19,15 +19,10 @@ SHELL = /bin/bash .SHELLFLAGS += -e MAIN_TARGET = issu-version -BUSTER_FILES_PATH = /sonic/target/files/buster $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : -ifneq (,$(findstring buster,$(DEST))) sx_sdk --version | egrep -o 'ISSU [0-9]+' > $(DEST)/$(MAIN_TARGET) || { echo "ISSU version is undefined: $(sx_sdk --version)" rm $(DEST)/$(MAIN_TARGET) exit 1 } -else - cp $(BUSTER_FILES_PATH)/$(MAIN_TARGET) $(DEST)/$(MAIN_TARGET) -endif diff --git a/platform/mellanox/libsaithrift-dev.mk b/platform/mellanox/libsaithrift-dev.mk index 579a41f02a24..4ee241eab4c7 100644 --- a/platform/mellanox/libsaithrift-dev.mk +++ b/platform/mellanox/libsaithrift-dev.mk @@ -20,14 +20,9 @@ SAI_VER = 0.9.4 LIBSAITHRIFT_DEV = libsaithrift$(SAITHRIFT_VER)-dev_$(SAI_VER)_amd64.deb $(LIBSAITHRIFT_DEV)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI -ifeq ($(SAITHRIFT_V2),y) -$(LIBSAITHRIFT_DEV)_DEPENDS += $(LIBTHRIFT_0_14_1) $(LIBTHRIFT_0_14_1_DEV) $(PYTHON3_THRIFT_0_14_1) $(THRIFT_0_14_1_COMPILER) -$(LIBSAITHRIFT_DEV)_RDEPENDS += $(LIBTHRIFT_0_14_1) -$(LIBSAITHRIFT_DEV)_BUILD_ENV = SAITHRIFTV2=true SAITHRIFT_VER=v2 -else $(LIBSAITHRIFT_DEV)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(PYTHON_THRIFT) $(THRIFT_COMPILER) $(LIBSAITHRIFT_DEV)_RDEPENDS += $(LIBTHRIFT) -endif +$(LIBSAITHRIFT_DEV)_BUILD_ENV = SAITHRIFT_VER=v2 # Workaround to use python3 in build $(LIBSAITHRIFT_DEV)_DEPENDS += $(MLNX_SAI) $(MLNX_SAI_DEV) $(LIBSAITHRIFT_DEV)_RDEPENDS += $(MLNX_SAI) diff --git a/platform/mellanox/mft.mk b/platform/mellanox/mft.mk index 981c456906b3..7dc654381f5a 100644 --- a/platform/mellanox/mft.mk +++ b/platform/mellanox/mft.mk @@ -25,12 +25,10 @@ MFT = mft_$(MFT_VERSION)-$(MFT_REVISION)_amd64.deb $(MFT)_SRC_PATH = $(PLATFORM_PATH)/mft SONIC_MAKE_DEBS += $(MFT) -ifeq ($(BLDENV), bullseye) $(MFT)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON) KERNEL_MFT = kernel-mft-dkms-modules-$(KVERSION)_$(MFT_VERSION)_amd64.deb $(eval $(call add_derived_package,$(MFT),$(KERNEL_MFT))) -endif MFT_OEM = mft-oem_$(MFT_VERSION)-$(MFT_REVISION)_amd64.deb $(eval $(call add_derived_package,$(MFT),$(MFT_OEM))) diff --git a/platform/mellanox/mft/Makefile b/platform/mellanox/mft/Makefile index ed2fe7b1d1a1..755ef4afc220 100644 --- a/platform/mellanox/mft/Makefile +++ b/platform/mellanox/mft/Makefile @@ -35,7 +35,6 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : wget -O $(MFT_TGZ) http://www.mellanox.com/downloads/MFT/$(MFT_TGZ) tar xzf $(MFT_TGZ) -ifneq (,$(findstring bullseye,$(DEST))) pushd $(MFT_NAME)/SDEBS # put a lock here because dpkg does not allow installing packages in parallel @@ -63,7 +62,6 @@ ifneq (,$(findstring bullseye,$(DEST))) popd rm -rf $(DKMS_TMP) -endif # fix timestamp because we do not actually build tools, only kernel touch $(MFT_NAME)/DEBS/*.deb diff --git a/platform/template/docker-syncd-bullseye.mk b/platform/template/docker-syncd-bullseye.mk new file mode 100644 index 000000000000..d98d351acae5 --- /dev/null +++ b/platform/template/docker-syncd-bullseye.mk @@ -0,0 +1,33 @@ +# docker image for syncd + + +DOCKER_SYNCD_BASE_STEM = docker-syncd-$(DOCKER_SYNCD_PLATFORM_CODE) +DOCKER_SYNCD_BASE = $(DOCKER_SYNCD_BASE_STEM).gz +DOCKER_SYNCD_BASE_DBG = $(DOCKER_SYNCD_BASE_STEM)-$(DBG_IMAGE_MARK).gz + +$(DOCKER_SYNCD_BASE)_PATH = $(PLATFORM_PATH)/docker-syncd-$(DOCKER_SYNCD_PLATFORM_CODE) + +$(DOCKER_SYNCD_BASE)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT) + +$(DOCKER_SYNCD_BASE)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BULLSEYE) +$(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_DEPENDS) +$(DOCKER_SYNCD_BASE)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_IMAGE_PACKAGES) + +SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BASE) +ifneq ($(ENABLE_SYNCD_RPC),y) +SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_BASE) +endif + +SONIC_DOCKER_DBG_IMAGES += $(DOCKER_SYNCD_BASE_DBG) +ifneq ($(ENABLE_SYNCD_RPC),y) +SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_SYNCD_BASE_DBG) +endif + +$(DOCKER_SYNCD_BASE)_CONTAINER_NAME = syncd +$(DOCKER_SYNCD_BASE)_RUN_OPT += --privileged -t +$(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf +$(DOCKER_SYNCD_BASE)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro + +SONIC_BULLSEYE_DOCKERS += $(DOCKER_SYNCD_BASE) +SONIC_BULLSEYE_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) + diff --git a/rules/docker-platform-monitor.mk b/rules/docker-platform-monitor.mk index 21babbcb49f4..bcfd6000fa00 100644 --- a/rules/docker-platform-monitor.mk +++ b/rules/docker-platform-monitor.mk @@ -27,13 +27,13 @@ ifeq ($(PDDF_SUPPORT),y) $(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(PDDF_PLATFORM_API_BASE_PY3) endif -$(DOCKER_PLATFORM_MONITOR)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS) +$(DOCKER_PLATFORM_MONITOR)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_DEPENDS) $(DOCKER_PLATFORM_MONITOR)_DBG_DEPENDS += $(LIBSWSSCOMMON_DBG) $(LIBSENSORS_DBG) $(DOCKER_PLATFORM_MONITOR)_DBG_DEPENDS += $(LM_SENSORS_DBG) $(SENSORD_DBG) -$(DOCKER_PLATFORM_MONITOR)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES) +$(DOCKER_PLATFORM_MONITOR)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_IMAGE_PACKAGES) -$(DOCKER_PLATFORM_MONITOR)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_PLATFORM_MONITOR)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BULLSEYE) $(DOCKER_PLATFORM_MONITOR)_VERSION = 1.0.0 $(DOCKER_PLATFORM_MONITOR)_PACKAGE_NAME = pmon @@ -66,5 +66,5 @@ $(DOCKER_PLATFORM_MONITOR)_BASE_IMAGE_FILES += cmd_wrapper:/usr/sbin/SmartCmd $(DOCKER_PLATFORM_MONITOR)_BASE_IMAGE_FILES += cmd_wrapper:/usr/bin/ethtool $(DOCKER_PLATFORM_MONITOR)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT) -SONIC_BUSTER_DOCKERS += $(DOCKER_PLATFORM_MONITOR) -SONIC_BUSTER_DBG_DOCKERS += $(DOCKER_PLATFORM_MONITOR_DBG) +SONIC_BULLSEYE_DOCKERS += $(DOCKER_PLATFORM_MONITOR) +SONIC_BULLSEYE_DBG_DOCKERS += $(DOCKER_PLATFORM_MONITOR_DBG) diff --git a/rules/sonic-ledd.mk b/rules/sonic-ledd.mk index 1439d2c506b0..6abd3eda11cc 100644 --- a/rules/sonic-ledd.mk +++ b/rules/sonic-ledd.mk @@ -13,7 +13,7 @@ SONIC_PYTHON_WHEELS += $(SONIC_LEDD_PY2) SONIC_LEDD_PY3 = sonic_ledd-1.1-py3-none-any.whl $(SONIC_LEDD_PY3)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-ledd -$(SONIC_LEDD_PY3)_DEPENDS = $(SONIC_PY_COMMON_PY3) $(SONIC_LEDD_PY2) +$(SONIC_LEDD_PY3)_DEPENDS = $(SONIC_PY_COMMON_PY3) $(SONIC_LEDD_PY3)_DEBS_DEPENDS = $(LIBSWSSCOMMON) $(PYTHON3_SWSSCOMMON) $(SONIC_LEDD_PY3)_PYTHON_VERSION = 3 SONIC_PYTHON_WHEELS += $(SONIC_LEDD_PY3) diff --git a/rules/sonic-psud.mk b/rules/sonic-psud.mk index a576be3ea03a..1c878f7e7ecf 100644 --- a/rules/sonic-psud.mk +++ b/rules/sonic-psud.mk @@ -13,7 +13,7 @@ SONIC_PYTHON_WHEELS += $(SONIC_PSUD_PY2) SONIC_PSUD_PY3 = sonic_psud-1.0-py3-none-any.whl $(SONIC_PSUD_PY3)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-psud -$(SONIC_PSUD_PY3)_DEPENDS = $(SONIC_PY_COMMON_PY3) $(SONIC_PLATFORM_COMMON_PY3) $(SONIC_PSUD_PY2) +$(SONIC_PSUD_PY3)_DEPENDS = $(SONIC_PY_COMMON_PY3) $(SONIC_PLATFORM_COMMON_PY3) $(SONIC_PSUD_PY3)_DEBS_DEPENDS = $(LIBSWSSCOMMON) $(PYTHON3_SWSSCOMMON) $(SONIC_PSUD_PY3)_PYTHON_VERSION = 3 SONIC_PYTHON_WHEELS += $(SONIC_PSUD_PY3) diff --git a/rules/sonic-syseepromd.mk b/rules/sonic-syseepromd.mk index 03cc20a38f7a..9f1ba5907128 100644 --- a/rules/sonic-syseepromd.mk +++ b/rules/sonic-syseepromd.mk @@ -13,7 +13,7 @@ SONIC_PYTHON_WHEELS += $(SONIC_SYSEEPROMD_PY2) SONIC_SYSEEPROMD_PY3 = sonic_syseepromd-1.0-py3-none-any.whl $(SONIC_SYSEEPROMD_PY3)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-syseepromd -$(SONIC_SYSEEPROMD_PY3)_DEPENDS = $(SONIC_PY_COMMON_PY3) $(SONIC_PLATFORM_COMMON_PY3) $(SONIC_SYSEEPROMD_PY2) +$(SONIC_SYSEEPROMD_PY3)_DEPENDS = $(SONIC_PY_COMMON_PY3) $(SONIC_PLATFORM_COMMON_PY3) $(SONIC_SYSEEPROMD_PY3)_DEBS_DEPENDS = $(LIBSWSSCOMMON) $(PYTHON3_SWSSCOMMON) $(SONIC_SYSEEPROMD_PY3)_PYTHON_VERSION = 3 SONIC_PYTHON_WHEELS += $(SONIC_SYSEEPROMD_PY3) diff --git a/rules/sonic-thermalctld.mk b/rules/sonic-thermalctld.mk index a73196e674c0..eb17d3eb1aa1 100644 --- a/rules/sonic-thermalctld.mk +++ b/rules/sonic-thermalctld.mk @@ -13,7 +13,7 @@ SONIC_PYTHON_WHEELS += $(SONIC_THERMALCTLD_PY2) SONIC_THERMALCTLD_PY3 = sonic_thermalctld-1.0-py3-none-any.whl $(SONIC_THERMALCTLD_PY3)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-thermalctld -$(SONIC_THERMALCTLD_PY3)_DEPENDS = $(SONIC_PY_COMMON_PY3) $(SONIC_PLATFORM_COMMON_PY3) $(SONIC_THERMALCTLD_PY2) +$(SONIC_THERMALCTLD_PY3)_DEPENDS = $(SONIC_PY_COMMON_PY3) $(SONIC_PLATFORM_COMMON_PY3) $(SONIC_THERMALCTLD_PY3)_DEBS_DEPENDS = $(LIBSWSSCOMMON) $(PYTHON3_SWSSCOMMON) $(SONIC_THERMALCTLD_PY3)_PYTHON_VERSION = 3 SONIC_PYTHON_WHEELS += $(SONIC_THERMALCTLD_PY3) diff --git a/rules/sonic-xcvrd.mk b/rules/sonic-xcvrd.mk index 018363f367fd..a322fbd4e1b3 100644 --- a/rules/sonic-xcvrd.mk +++ b/rules/sonic-xcvrd.mk @@ -13,7 +13,7 @@ SONIC_PYTHON_WHEELS += $(SONIC_XCVRD_PY2) SONIC_XCVRD_PY3 = sonic_xcvrd-1.0-py3-none-any.whl $(SONIC_XCVRD_PY3)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-xcvrd -$(SONIC_XCVRD_PY3)_DEPENDS = $(SONIC_PY_COMMON_PY3) $(SONIC_XCVRD_PY2) $(SONIC_PLATFORM_COMMON_PY3) +$(SONIC_XCVRD_PY3)_DEPENDS = $(SONIC_PY_COMMON_PY3) $(SONIC_PLATFORM_COMMON_PY3) $(SONIC_XCVRD_PY3)_DEBS_DEPENDS = $(LIBSWSSCOMMON) $(PYTHON3_SWSSCOMMON) $(SONIC_XCVRD_PY3)_PYTHON_VERSION = 3 SONIC_PYTHON_WHEELS += $(SONIC_XCVRD_PY3) diff --git a/sonic-slave-bullseye/Dockerfile.j2 b/sonic-slave-bullseye/Dockerfile.j2 index 741f708de269..8c05cd5272e7 100644 --- a/sonic-slave-bullseye/Dockerfile.j2 +++ b/sonic-slave-bullseye/Dockerfile.j2 @@ -65,6 +65,9 @@ RUN apt-get update && apt-get install -y \ dh-exec \ kmod \ libtinyxml2-dev \ + python-all \ + python-dev \ + python-setuptools \ python3 \ python3-pip \ libncurses5-dev \ @@ -74,6 +77,7 @@ RUN apt-get update && apt-get install -y \ devscripts \ git-buildpackage \ perl-modules \ + libclass-accessor-perl \ libswitch-perl \ libzmq5 \ libzmq3-dev \ From 1fe84f481f0698c08ec544223ec073c7ae24249a Mon Sep 17 00:00:00 2001 From: Alexander Allen Date: Mon, 2 May 2022 17:19:15 +0000 Subject: [PATCH 2/5] Add libsensors-dev to targets --- rules/lm-sensors.mk | 4 ++++ src/lm-sensors/Makefile | 1 + 2 files changed, 5 insertions(+) diff --git a/rules/lm-sensors.mk b/rules/lm-sensors.mk index 414aeb72b229..b507804e31a0 100644 --- a/rules/lm-sensors.mk +++ b/rules/lm-sensors.mk @@ -3,6 +3,7 @@ LM_SENSORS_MAJOR_VERSION = 3 LM_SENSORS_MINOR_VERSION = 5 LM_SENSORS_PATCH_VERSION = 0 +LM_SENSORS_DEV_VERSION = 4 LM_SENSORS_VERSION=$(LM_SENSORS_MAJOR_VERSION).$(LM_SENSORS_MINOR_VERSION).$(LM_SENSORS_PATCH_VERSION) LM_SENSORS_VERSION_FULL=$(LM_SENSORS_VERSION)-3 @@ -22,6 +23,9 @@ $(eval $(call add_derived_package,$(LM_SENSORS),$(LIBSENSORS))) LIBSENSORS_DBG = libsensors$(LM_SENSORS_MINOR_VERSION)-dbgsym_$(LM_SENSORS_VERSION_FULL)_$(CONFIGURED_ARCH).deb $(eval $(call add_derived_package,$(LM_SENSORS),$(LIBSENSORS_DBG))) +LIBSENSORS_DEV = libsensors$(LM_SENSORS_DEV_VERSION)-dev_$(LM_SENSORS_VERSION_FULL)_$(CONFIGURED_ARCH).deb +$(eval $(call add_derived_package,$(LM_SENSORS),$(LIBSENSORS_DEV))) + SENSORD = sensord_$(LM_SENSORS_VERSION_FULL)_$(CONFIGURED_ARCH).deb $(eval $(call add_derived_package,$(LM_SENSORS),$(SENSORD))) $(SENSORD)_DEPENDS += $(LIBSENSORS) $(LM_SENSORS) diff --git a/src/lm-sensors/Makefile b/src/lm-sensors/Makefile index a5aa3ba7d885..4125f06ecb0a 100644 --- a/src/lm-sensors/Makefile +++ b/src/lm-sensors/Makefile @@ -9,6 +9,7 @@ DERIVED_TARGETS = fancontrol_$(LM_SENSORS_VERSION_FULL)_all.deb \ sensord_$(LM_SENSORS_VERSION_FULL)_$(CONFIGURED_ARCH).deb \ $(LM_SENSORS_DBG) \ $(LIBSENSORS_DBG) \ + $(LIBSENSORS_DEV) \ $(SENSORD_DBG) $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : From 290fc78f42195b7f7fe4f7b304950a4bfe6bc97e Mon Sep 17 00:00:00 2001 From: Alexander Allen Date: Fri, 6 May 2022 03:35:14 +0000 Subject: [PATCH 3/5] Export LIBSENSORS_DEV target --- rules/lm-sensors.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/rules/lm-sensors.mk b/rules/lm-sensors.mk index b507804e31a0..fbfa19985115 100644 --- a/rules/lm-sensors.mk +++ b/rules/lm-sensors.mk @@ -48,4 +48,5 @@ export LM_SENSORS_VERSION export LM_SENSORS_VERSION_FULL export LM_SENSORS_DBG export LIBSENSORS_DBG +export LIBSENSORS_DEV export SENSORD_DBG From 8e10bb24fe90d3b9099e1d05bedfa37d17034218 Mon Sep 17 00:00:00 2001 From: Alexander Allen Date: Fri, 6 May 2022 16:55:41 +0000 Subject: [PATCH 4/5] Add dependency of libsensors-dev --- rules/lm-sensors.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/lm-sensors.mk b/rules/lm-sensors.mk index fbfa19985115..338481c07af2 100644 --- a/rules/lm-sensors.mk +++ b/rules/lm-sensors.mk @@ -28,7 +28,7 @@ $(eval $(call add_derived_package,$(LM_SENSORS),$(LIBSENSORS_DEV))) SENSORD = sensord_$(LM_SENSORS_VERSION_FULL)_$(CONFIGURED_ARCH).deb $(eval $(call add_derived_package,$(LM_SENSORS),$(SENSORD))) -$(SENSORD)_DEPENDS += $(LIBSENSORS) $(LM_SENSORS) +$(SENSORD)_DEPENDS += $(LIBSENSORS) $(LM_SENSORS) $(LIBSENSORS_DEV) SENSORD_DBG = sensord-dbgsym_$(LM_SENSORS_VERSION_FULL)_$(CONFIGURED_ARCH).deb $(eval $(call add_derived_package,$(LM_SENSORS),$(SENSORD_DBG))) From 7d04e1a30b541aeb5d63bde47b3e347e4a37cb99 Mon Sep 17 00:00:00 2001 From: Alexander Allen Date: Sun, 8 May 2022 02:58:45 +0000 Subject: [PATCH 5/5] Revert attempts to add libsensors-dev as a target and elect to upgrade lm sensors to minor version 6 --- rules/lm-sensors.mk | 17 +++++++---------- src/lm-sensors/Makefile | 1 - 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/rules/lm-sensors.mk b/rules/lm-sensors.mk index 338481c07af2..b33f7cc3a61c 100644 --- a/rules/lm-sensors.mk +++ b/rules/lm-sensors.mk @@ -1,12 +1,13 @@ # lm-senensors package LM_SENSORS_MAJOR_VERSION = 3 -LM_SENSORS_MINOR_VERSION = 5 +LM_SENSORS_MINOR_VERSION = 6 LM_SENSORS_PATCH_VERSION = 0 -LM_SENSORS_DEV_VERSION = 4 + +LIBSENSORS_VERSION = 5 LM_SENSORS_VERSION=$(LM_SENSORS_MAJOR_VERSION).$(LM_SENSORS_MINOR_VERSION).$(LM_SENSORS_PATCH_VERSION) -LM_SENSORS_VERSION_FULL=$(LM_SENSORS_VERSION)-3 +LM_SENSORS_VERSION_FULL=$(LM_SENSORS_VERSION)-7 LM_SENSORS = lm-sensors_$(LM_SENSORS_VERSION_FULL)_$(CONFIGURED_ARCH).deb $(LM_SENSORS)_SRC_PATH = $(SRC_PATH)/lm-sensors @@ -17,18 +18,15 @@ $(eval $(call add_derived_package,$(LM_SENSORS),$(LM_SENSORS_DBG))) FANCONTROL = fancontrol_$(LM_SENSORS_VERSION_FULL)_all.deb $(eval $(call add_derived_package,$(LM_SENSORS),$(FANCONTROL))) -LIBSENSORS = libsensors$(LM_SENSORS_MINOR_VERSION)_$(LM_SENSORS_VERSION_FULL)_$(CONFIGURED_ARCH).deb +LIBSENSORS = libsensors$(LIBSENSORS_VERSION)_$(LM_SENSORS_VERSION_FULL)_$(CONFIGURED_ARCH).deb $(eval $(call add_derived_package,$(LM_SENSORS),$(LIBSENSORS))) -LIBSENSORS_DBG = libsensors$(LM_SENSORS_MINOR_VERSION)-dbgsym_$(LM_SENSORS_VERSION_FULL)_$(CONFIGURED_ARCH).deb +LIBSENSORS_DBG = libsensors$(LIBSENSORS_VERSION)-dbgsym_$(LM_SENSORS_VERSION_FULL)_$(CONFIGURED_ARCH).deb $(eval $(call add_derived_package,$(LM_SENSORS),$(LIBSENSORS_DBG))) -LIBSENSORS_DEV = libsensors$(LM_SENSORS_DEV_VERSION)-dev_$(LM_SENSORS_VERSION_FULL)_$(CONFIGURED_ARCH).deb -$(eval $(call add_derived_package,$(LM_SENSORS),$(LIBSENSORS_DEV))) - SENSORD = sensord_$(LM_SENSORS_VERSION_FULL)_$(CONFIGURED_ARCH).deb $(eval $(call add_derived_package,$(LM_SENSORS),$(SENSORD))) -$(SENSORD)_DEPENDS += $(LIBSENSORS) $(LM_SENSORS) $(LIBSENSORS_DEV) +$(SENSORD)_DEPENDS += $(LIBSENSORS) $(LM_SENSORS) SENSORD_DBG = sensord-dbgsym_$(LM_SENSORS_VERSION_FULL)_$(CONFIGURED_ARCH).deb $(eval $(call add_derived_package,$(LM_SENSORS),$(SENSORD_DBG))) @@ -48,5 +46,4 @@ export LM_SENSORS_VERSION export LM_SENSORS_VERSION_FULL export LM_SENSORS_DBG export LIBSENSORS_DBG -export LIBSENSORS_DEV export SENSORD_DBG diff --git a/src/lm-sensors/Makefile b/src/lm-sensors/Makefile index 4125f06ecb0a..a5aa3ba7d885 100644 --- a/src/lm-sensors/Makefile +++ b/src/lm-sensors/Makefile @@ -9,7 +9,6 @@ DERIVED_TARGETS = fancontrol_$(LM_SENSORS_VERSION_FULL)_all.deb \ sensord_$(LM_SENSORS_VERSION_FULL)_$(CONFIGURED_ARCH).deb \ $(LM_SENSORS_DBG) \ $(LIBSENSORS_DBG) \ - $(LIBSENSORS_DEV) \ $(SENSORD_DBG) $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :