Add pmon daemons python3 build support (#6176)

**- Why I did it**

python2 is end of life and SONiC is going to support python3. This PR is going to support:

1. Build pmon daemons with python3
2. Install and run python3 version pmon daemons

**- How I did it**

1. Change pmon daemons make files to build bothe python2 and python3 whl
2. Change docker-platform-monitor make files to install both python2 and python3 whl
3. Change pmon docker startup files to start pmon daemons according to the supported platform API version
This commit is contained in:
Junchao-Mellanox 2020-12-29 02:19:24 +08:00 committed by GitHub
parent 721c68c855
commit 51f896b33e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 273 additions and 180 deletions

View File

@ -84,7 +84,7 @@ RUN apt-get purge -y \
/python-wheels \
~/.cache
COPY ["docker_init.sh", "lm-sensors.sh", "start.sh", "/usr/bin/"]
COPY ["docker_init.sh", "lm-sensors.sh", "/usr/bin/"]
COPY ["docker-pmon.supervisord.conf.j2", "/usr/share/sonic/templates/"]
COPY ["ssd_tools/*", "/usr/bin/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]

View File

@ -27,17 +27,6 @@ stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
[program:start]
command=/usr/bin/start.sh
priority=2
autostart=false
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog
startsecs=0
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
{% if not skip_chassisd and IS_MODULAR_CHASSIS == 1 %}
[program:chassisd]
command=/usr/local/bin/chassisd
@ -61,7 +50,7 @@ stdout_logfile=syslog
stderr_logfile=syslog
startsecs=0
dependent_startup=true
dependent_startup_wait_for=start:exited
dependent_startup_wait_for=rsyslogd:running
{% endif %}
{% if not skip_fancontrol and HAVE_FANCONTROL_CONF == 1 %}
@ -74,7 +63,7 @@ stdout_logfile=syslog
stderr_logfile=syslog
startsecs=10
dependent_startup=true
dependent_startup_wait_for=start:exited
dependent_startup_wait_for=rsyslogd:running
{% endif %}
{% if not skip_ledd %}
@ -87,15 +76,15 @@ stdout_logfile=syslog
stderr_logfile=syslog
startsecs=0
dependent_startup=true
dependent_startup_wait_for=start:exited
dependent_startup_wait_for=rsyslogd:running
{% endif %}
{% if not skip_xcvrd %}
[program:xcvrd]
{% if delay_xcvrd %}
command=bash -c "sleep 30 && /usr/local/bin/xcvrd"
command=bash -c "sleep 30 && {% if API_VERSION == 3 and 'xcvrd' not in python2_daemons %}python3 {% else %} python2 {% endif %}/usr/local/bin/xcvrd"
{% else %}
command=/usr/local/bin/xcvrd
command={% if API_VERSION == 3 and 'xcvrd' not in python2_daemons %}python3 {% else %} python2 {% endif %}/usr/local/bin/xcvrd
{% endif %}
priority=6
autostart=false
@ -104,12 +93,12 @@ stdout_logfile=syslog
stderr_logfile=syslog
startsecs=0
dependent_startup=true
dependent_startup_wait_for=start:exited
dependent_startup_wait_for=rsyslogd:running
{% endif %}
{% if not skip_psud %}
[program:psud]
command=/usr/local/bin/psud
command={% if API_VERSION == 3 and 'psud' not in python2_daemons %}python3 {% else %} python2 {% endif %}/usr/local/bin/psud
priority=7
autostart=false
autorestart=false
@ -117,12 +106,12 @@ stdout_logfile=syslog
stderr_logfile=syslog
startsecs=0
dependent_startup=true
dependent_startup_wait_for=start:exited
dependent_startup_wait_for=rsyslogd:running
{% endif %}
{% if not skip_syseepromd %}
[program:syseepromd]
command=/usr/local/bin/syseepromd
command={% if API_VERSION == 3 and 'syseepromd' not in python2_daemons %}python3 {% else %} python2 {% endif %}/usr/local/bin/syseepromd
priority=8
autostart=false
autorestart=unexpected
@ -130,12 +119,12 @@ stdout_logfile=syslog
stderr_logfile=syslog
startsecs=10
dependent_startup=true
dependent_startup_wait_for=start:exited
dependent_startup_wait_for=rsyslogd:running
{% endif %}
{% if not skip_thermalctld %}
[program:thermalctld]
command=/usr/local/bin/thermalctld
command={% if API_VERSION == 3 and 'thermalctld' not in python2_daemons %}python3 {% else %} python2 {% endif %}/usr/local/bin/thermalctld
priority=9
autostart=false
autorestart=unexpected
@ -144,7 +133,7 @@ stderr_logfile=syslog
startsecs=10
startretries=50
dependent_startup=true
dependent_startup_wait_for=start:exited
dependent_startup_wait_for=rsyslogd:running
{% endif %}
{% if not skip_pcied %}
@ -157,5 +146,5 @@ stdout_logfile=syslog
stderr_logfile=syslog
startsecs=10
dependent_startup=true
dependent_startup_wait_for=start:exited
dependent_startup_wait_for=rsyslogd:running
{% endif %}

View File

@ -5,45 +5,102 @@ mkdir -p /etc/supervisor/conf.d/
SENSORS_CONF_FILE="/usr/share/sonic/platform/sensors.conf"
FANCONTROL_CONF_FILE="/usr/share/sonic/platform/fancontrol"
SUPERVISOR_CONF_TEMPLATE="/usr/share/sonic/templates/docker-pmon.supervisord.conf.j2"
SUPERVISOR_CONF_FILE="/etc/supervisor/conf.d/supervisord.conf"
PMON_DAEMON_CONTROL_FILE="/usr/share/sonic/platform/pmon_daemon_control.json"
MODULAR_CHASSISDB_CONF_FILE="/usr/share/sonic/platform/chassisdb.conf"
HAVE_SENSORS_CONF=0
HAVE_FANCONTROL_CONF=0
IS_MODULAR_CHASSIS=0
# Default use python2 version
SONIC_PLATFORM_API_PYTHON_VERSION=2
declare -r EXIT_SUCCESS="0"
if [ "${RUNTIME_OWNER}" == "" ]; then
RUNTIME_OWNER="kube"
fi
CTR_SCRIPT="/usr/share/sonic/scripts/container_startup.py"
if test -f ${CTR_SCRIPT}
then
${CTR_SCRIPT} -f pmon -o ${RUNTIME_OWNER} -v ${IMAGE_VERSION}
fi
mkdir -p /var/sonic
echo "# Config files managed by sonic-config-engine" > /var/sonic/config_status
# If this platform has synchronization script, run it
if [ -e /usr/share/sonic/platform/platform_wait ]; then
/usr/share/sonic/platform/platform_wait
EXIT_CODE="$?"
if [ "${EXIT_CODE}" != "${EXIT_SUCCESS}" ]; then
exit "${EXIT_CODE}"
fi
fi
# If the Python 2 sonic-platform package is not installed, try to install it
python2 -c "import sonic_platform" > /dev/null 2>&1 || pip2 show sonic-platform > /dev/null 2>&1
if [ $? -ne 0 ]; then
SONIC_PLATFORM_WHEEL="/usr/share/sonic/platform/sonic_platform-1.0-py2-none-any.whl"
echo "sonic-platform package not installed, attempting to install..."
if [ -e ${SONIC_PLATFORM_WHEEL} ]; then
pip2 install ${SONIC_PLATFORM_WHEEL}
if [ $? -eq 0 ]; then
echo "Successfully installed ${SONIC_PLATFORM_WHEEL}"
else
echo "Error: Failed to install ${SONIC_PLATFORM_WHEEL}"
fi
else
echo "Error: Unable to locate ${SONIC_PLATFORM_WHEEL}"
fi
fi
# If the Python 3 sonic-platform package is not installed, try to install it
python3 -c "import sonic_platform" > /dev/null 2>&1 || pip3 show sonic-platform > /dev/null 2>&1
if [ $? -ne 0 ]; then
SONIC_PLATFORM_WHEEL="/usr/share/sonic/platform/sonic_platform-1.0-py3-none-any.whl"
echo "sonic-platform package not installed, attempting to install..."
if [ -e ${SONIC_PLATFORM_WHEEL} ]; then
pip3 install ${SONIC_PLATFORM_WHEEL}
if [ $? -eq 0 ]; then
echo "Successfully installed ${SONIC_PLATFORM_WHEEL}"
SONIC_PLATFORM_API_PYTHON_VERSION=3
else
echo "Error: Failed to install ${SONIC_PLATFORM_WHEEL}"
fi
else
echo "Error: Unable to locate ${SONIC_PLATFORM_WHEEL}"
fi
else
SONIC_PLATFORM_API_PYTHON_VERSION=3
fi
if [ -e $SENSORS_CONF_FILE ]; then
HAVE_SENSORS_CONF=1
mkdir -p /etc/sensors.d
/bin/cp -f $SENSORS_CONF_FILE /etc/sensors.d/
fi
if [ -e $FANCONTROL_CONF_FILE ]; then
HAVE_FANCONTROL_CONF=1
rm -f /var/run/fancontrol.pid
/bin/cp -f $FANCONTROL_CONF_FILE /etc/
fi
if [ -e $MODULAR_CHASSISDB_CONF_FILE ]; then
IS_MODULAR_CHASSIS=1
fi
confvar="{\"HAVE_SENSORS_CONF\":$HAVE_SENSORS_CONF, \"HAVE_FANCONTROL_CONF\":$HAVE_FANCONTROL_CONF, \"IS_MODULAR_CHASSIS\":$IS_MODULAR_CHASSIS}"
confvar="{\"HAVE_SENSORS_CONF\":$HAVE_SENSORS_CONF, \"HAVE_FANCONTROL_CONF\":$HAVE_FANCONTROL_CONF, \"API_VERSION\":$SONIC_PLATFORM_API_PYTHON_VERSION, \"IS_MODULAR_CHASSIS\":$IS_MODULAR_CHASSIS}"
if [ -e /usr/share/sonic/platform/pmon_daemon_control.json ];
if [ -e $PMON_DAEMON_CONTROL_FILE ];
then
sonic-cfggen -j /usr/share/sonic/platform/pmon_daemon_control.json -a "$confvar" -t /usr/share/sonic/templates/docker-pmon.supervisord.conf.j2 > /etc/supervisor/conf.d/supervisord.conf
sonic-cfggen -j $PMON_DAEMON_CONTROL_FILE -a "$confvar" -t $SUPERVISOR_CONF_TEMPLATE > $SUPERVISOR_CONF_FILE
else
sonic-cfggen -a "$confvar" -t /usr/share/sonic/templates/docker-pmon.supervisord.conf.j2 > /etc/supervisor/conf.d/supervisord.conf
fi
# If this platform has an lm-sensors config file, copy it to its proper place
if [ $HAVE_SENSORS_CONF -eq 1 ]; then
mkdir -p /etc/sensors.d
/bin/cp -f $SENSORS_CONF_FILE /etc/sensors.d/
fi
# If this platform has a fancontrol config file, copy it to its proper place
if [ $HAVE_FANCONTROL_CONF -eq 1 ]; then
# Remove stale pid file if it exists
rm -f /var/run/fancontrol.pid
/bin/cp -f $FANCONTROL_CONF_FILE /etc/
sonic-cfggen -a "$confvar" -t $SUPERVISOR_CONF_TEMPLATE > $SUPERVISOR_CONF_FILE
fi
exec /usr/local/bin/supervisord

View File

@ -1,60 +0,0 @@
#!/usr/bin/env bash
declare -r EXIT_SUCCESS="0"
if [ "${RUNTIME_OWNER}" == "" ]; then
RUNTIME_OWNER="kube"
fi
CTR_SCRIPT="/usr/share/sonic/scripts/container_startup.py"
if test -f ${CTR_SCRIPT}
then
${CTR_SCRIPT} -f pmon -o ${RUNTIME_OWNER} -v ${IMAGE_VERSION}
fi
mkdir -p /var/sonic
echo "# Config files managed by sonic-config-engine" > /var/sonic/config_status
# If this platform has synchronization script, run it
if [ -e /usr/share/sonic/platform/platform_wait ]; then
/usr/share/sonic/platform/platform_wait
EXIT_CODE="$?"
if [ "${EXIT_CODE}" != "${EXIT_SUCCESS}" ]; then
supervisorctl shutdown
exit "${EXIT_CODE}"
fi
fi
# If the Python 2 sonic-platform package is not installed, try to install it
python2 -c "import sonic_platform" > /dev/null 2>&1 || pip2 show sonic-platform > /dev/null 2>&1
if [ $? -ne 0 ]; then
SONIC_PLATFORM_WHEEL="/usr/share/sonic/platform/sonic_platform-1.0-py2-none-any.whl"
echo "sonic-platform package not installed, attempting to install..."
if [ -e ${SONIC_PLATFORM_WHEEL} ]; then
pip2 install ${SONIC_PLATFORM_WHEEL}
if [ $? -eq 0 ]; then
echo "Successfully installed ${SONIC_PLATFORM_WHEEL}"
else
echo "Error: Failed to install ${SONIC_PLATFORM_WHEEL}"
fi
else
echo "Error: Unable to locate ${SONIC_PLATFORM_WHEEL}"
fi
fi
# If the Python 3 sonic-platform package is not installed, try to install it
python3 -c "import sonic_platform" > /dev/null 2>&1 || pip3 show sonic-platform > /dev/null 2>&1
if [ $? -ne 0 ]; then
SONIC_PLATFORM_WHEEL="/usr/share/sonic/platform/sonic_platform-1.0-py3-none-any.whl"
echo "sonic-platform package not installed, attempting to install..."
if [ -e ${SONIC_PLATFORM_WHEEL} ]; then
pip3 install ${SONIC_PLATFORM_WHEEL}
if [ $? -eq 0 ]; then
echo "Successfully installed ${SONIC_PLATFORM_WHEEL}"
else
echo "Error: Failed to install ${SONIC_PLATFORM_WHEEL}"
fi
else
echo "Error: Unable to locate ${SONIC_PLATFORM_WHEEL}"
fi
fi

View File

@ -17,12 +17,18 @@ $(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY3)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_CONFIG_ENGINE_PY2)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PLATFORM_API_PY2)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PLATFORM_API_PY3)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_LEDD)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PCIED)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PSUD)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_SYSEEPROMD)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_THERMALCTLD)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_XCVRD)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_LEDD_PY2)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PCIED_PY2)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PSUD_PY2)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_SYSEEPROMD_PY2)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_THERMALCTLD_PY2)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_XCVRD_PY2)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_LEDD_PY3)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PCIED_PY3)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PSUD_PY3)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_SYSEEPROMD_PY3)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_THERMALCTLD_PY3)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_XCVRD_PY3)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_CHASSISD_PY3)
ifeq ($(PDDF_SUPPORT),y)

View File

@ -1,10 +1,16 @@
SPATH := $($(SONIC_LEDD)_SRC_PATH)
SPATH := $($(SONIC_LEDD_PY2)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/sonic-ledd.mk rules/sonic-ledd.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
SMDEP_FILES := $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files))
$(SONIC_LEDD)_CACHE_MODE := GIT_CONTENT_SHA
$(SONIC_LEDD)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(SONIC_LEDD)_DEP_FILES := $(DEP_FILES)
$(SONIC_LEDD)_SMDEP_FILES := $(SMDEP_FILES)
$(SONIC_LEDD)_SMDEP_PATHS := $(SPATH)
$(SONIC_LEDD_PY2)_CACHE_MODE := GIT_CONTENT_SHA
$(SONIC_LEDD_PY2)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(SONIC_LEDD_PY2)_DEP_FILES := $(DEP_FILES)
$(SONIC_LEDD_PY2)_SMDEP_FILES := $(SMDEP_FILES)
$(SONIC_LEDD_PY2)_SMDEP_PATHS := $(SPATH)
$(SONIC_LEDD_PY3)_CACHE_MODE := GIT_CONTENT_SHA
$(SONIC_LEDD_PY3)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(SONIC_LEDD_PY3)_DEP_FILES := $(DEP_FILES)
$(SONIC_LEDD_PY3)_SMDEP_FILES := $(SMDEP_FILES)
$(SONIC_LEDD_PY3)_SMDEP_PATHS := $(SPATH)

View File

@ -1,8 +1,19 @@
# sonic-ledd (SONiC Front-panel LED control daemon) Debian package
SONIC_LEDD = sonic_ledd-1.1-py2-none-any.whl
$(SONIC_LEDD)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-ledd
$(SONIC_LEDD)_DEPENDS = $(SONIC_PY_COMMON_PY2)
$(SONIC_LEDD)_DEBS_DEPENDS = $(LIBSWSSCOMMON) $(PYTHON_SWSSCOMMON) $(PYTHON3_SWSSCOMMON)
$(SONIC_LEDD)_PYTHON_VERSION = 2
SONIC_PYTHON_WHEELS += $(SONIC_LEDD)
# SONIC_LEDD_PY2 package
SONIC_LEDD_PY2 = sonic_ledd-1.1-py2-none-any.whl
$(SONIC_LEDD_PY2)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-ledd
$(SONIC_LEDD_PY2)_DEPENDS = $(SONIC_PY_COMMON_PY2)
$(SONIC_LEDD_PY2)_DEBS_DEPENDS = $(LIBSWSSCOMMON) $(PYTHON_SWSSCOMMON)
$(SONIC_LEDD_PY2)_PYTHON_VERSION = 2
SONIC_PYTHON_WHEELS += $(SONIC_LEDD_PY2)
# SONIC_LEDD_PY3 package
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)_DEBS_DEPENDS = $(LIBSWSSCOMMON) $(PYTHON3_SWSSCOMMON)
$(SONIC_LEDD_PY3)_PYTHON_VERSION = 3
SONIC_PYTHON_WHEELS += $(SONIC_LEDD_PY3)

View File

@ -1,10 +1,16 @@
SPATH:= $($(SONIC_PCIED)_SRC_PATH)
SPATH:= $($(SONIC_PCIED_PY2)_SRC_PATH)
DEP_FILES:= $(SONIC_COMMON_FILES_LIST) rules/sonic-pcied.mk rules/sonic-pcied.dep
DEP_FILES+= $(SONIC_COMMON_BASE_FILES_LIST)
SMDEP_FILES:= $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files))
$(SONIC_PCIED)_CACHE_MODE:= GIT_CONTENT_SHA
$(SONIC_PCIED)_DEP_FLAGS:= $(SONIC_COMMON_FLAGS_LIST)
$(SONIC_PCIED)_DEP_FILES:= $(DEP_FILES)
$(SONIC_PCIED)_SMDEP_FILES:= $(SMDEP_FILES)
$(SONIC_PCIED)_SMDEP_PATHS:= $(SPATH)
$(SONIC_PCIED_PY2)_CACHE_MODE:= GIT_CONTENT_SHA
$(SONIC_PCIED_PY2)_DEP_FLAGS:= $(SONIC_COMMON_FLAGS_LIST)
$(SONIC_PCIED_PY2)_DEP_FILES:= $(DEP_FILES)
$(SONIC_PCIED_PY2)_SMDEP_FILES:= $(SMDEP_FILES)
$(SONIC_PCIED_PY2)_SMDEP_PATHS:= $(SPATH)
$(SONIC_PCIED_PY3)_CACHE_MODE:= GIT_CONTENT_SHA
$(SONIC_PCIED_PY3)_DEP_FLAGS:= $(SONIC_COMMON_FLAGS_LIST)
$(SONIC_PCIED_PY3)_DEP_FILES:= $(DEP_FILES)
$(SONIC_PCIED_PY3)_SMDEP_FILES:= $(SMDEP_FILES)
$(SONIC_PCIED_PY3)_SMDEP_PATHS:= $(SPATH)

View File

@ -1,7 +1,17 @@
# sonic-pcied (SONiC PCIe Monitor daemon) Debian package
SONIC_PCIED = sonic_pcied-1.0-py2-none-any.whl
$(SONIC_PCIED)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-pcied
$(SONIC_PCIED)_DEPENDS = $(SONIC_PY_COMMON_PY2)
$(SONIC_PCIED)_PYTHON_VERSION = 2
SONIC_PYTHON_WHEELS += $(SONIC_PCIED)
# SONIC_PCIED_PY2 package
SONIC_PCIED_PY2 = sonic_pcied-1.0-py2-none-any.whl
$(SONIC_PCIED_PY2)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-pcied
$(SONIC_PCIED_PY2)_DEPENDS = $(SONIC_PY_COMMON_PY2)
$(SONIC_PCIED_PY2)_PYTHON_VERSION = 2
SONIC_PYTHON_WHEELS += $(SONIC_PCIED_PY2)
# SONIC_PCIED_PY3 package
SONIC_PCIED_PY3 = sonic_pcied-1.0-py3-none-any.whl
$(SONIC_PCIED_PY3)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-pcied
$(SONIC_PCIED_PY3)_DEPENDS = $(SONIC_PY_COMMON_PY3) $(SONIC_PCIED_PY2)
$(SONIC_PCIED_PY3)_PYTHON_VERSION = 3
SONIC_PYTHON_WHEELS += $(SONIC_PCIED_PY3)

View File

@ -1,10 +1,16 @@
SPATH := $($(SONIC_PSUD)_SRC_PATH)
SPATH := $($(SONIC_PSUD_PY2)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/sonic-psud.mk rules/sonic-psud.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
SMDEP_FILES := $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files))
$(SONIC_PSUD)_CACHE_MODE := GIT_CONTENT_SHA
$(SONIC_PSUD)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(SONIC_PSUD)_DEP_FILES := $(DEP_FILES)
$(SONIC_PSUD)_SMDEP_FILES := $(SMDEP_FILES)
$(SONIC_PSUD)_SMDEP_PATHS := $(SPATH)
$(SONIC_PSUD_PY2)_CACHE_MODE := GIT_CONTENT_SHA
$(SONIC_PSUD_PY2)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(SONIC_PSUD_PY2)_DEP_FILES := $(DEP_FILES)
$(SONIC_PSUD_PY2)_SMDEP_FILES := $(SMDEP_FILES)
$(SONIC_PSUD_PY2)_SMDEP_PATHS := $(SPATH)
$(SONIC_PSUD_PY3)_CACHE_MODE := GIT_CONTENT_SHA
$(SONIC_PSUD_PY3)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(SONIC_PSUD_PY3)_DEP_FILES := $(DEP_FILES)
$(SONIC_PSUD_PY3)_SMDEP_FILES := $(SMDEP_FILES)
$(SONIC_PSUD_PY3)_SMDEP_PATHS := $(SPATH)

View File

@ -1,8 +1,19 @@
# sonic-psud (SONiC PSU daemon) Debian package
SONIC_PSUD = sonic_psud-1.0-py2-none-any.whl
$(SONIC_PSUD)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-psud
$(SONIC_PSUD)_DEPENDS = $(SONIC_PY_COMMON_PY2)
$(SONIC_PSUD)_DEBS_DEPENDS = $(LIBSWSSCOMMON) $(PYTHON_SWSSCOMMON) $(PYTHON3_SWSSCOMMON)
$(SONIC_PSUD)_PYTHON_VERSION = 2
SONIC_PYTHON_WHEELS += $(SONIC_PSUD)
# SONIC_PSUD_PY2 package
SONIC_PSUD_PY2 = sonic_psud-1.0-py2-none-any.whl
$(SONIC_PSUD_PY2)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-psud
$(SONIC_PSUD_PY2)_DEPENDS = $(SONIC_PY_COMMON_PY2)
$(SONIC_PSUD_PY2)_DEBS_DEPENDS = $(LIBSWSSCOMMON) $(PYTHON_SWSSCOMMON)
$(SONIC_PSUD_PY2)_PYTHON_VERSION = 2
SONIC_PYTHON_WHEELS += $(SONIC_PSUD_PY2)
# SONIC_PSUD_PY3 package
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_PSUD_PY2)
$(SONIC_PSUD_PY3)_DEBS_DEPENDS = $(LIBSWSSCOMMON) $(PYTHON3_SWSSCOMMON)
$(SONIC_PSUD_PY3)_PYTHON_VERSION = 3
SONIC_PYTHON_WHEELS += $(SONIC_PSUD_PY3)

View File

@ -1,10 +1,16 @@
SPATH := $($(SONIC_SYSEEPROMD)_SRC_PATH)
SPATH := $($(SONIC_SYSEEPROMD_PY2)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/sonic-syseepromd.mk rules/sonic-syseepromd.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
SMDEP_FILES := $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files))
$(SONIC_SYSEEPROMD)_CACHE_MODE := GIT_CONTENT_SHA
$(SONIC_SYSEEPROMD)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(SONIC_SYSEEPROMD)_DEP_FILES := $(DEP_FILES)
$(SONIC_SYSEEPROMD)_SMDEP_FILES := $(SMDEP_FILES)
$(SONIC_SYSEEPROMD)_SMDEP_PATHS := $(SPATH)
$(SONIC_SYSEEPROMD_PY2)_CACHE_MODE := GIT_CONTENT_SHA
$(SONIC_SYSEEPROMD_PY2)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(SONIC_SYSEEPROMD_PY2)_DEP_FILES := $(DEP_FILES)
$(SONIC_SYSEEPROMD_PY2)_SMDEP_FILES := $(SMDEP_FILES)
$(SONIC_SYSEEPROMD_PY2)_SMDEP_PATHS := $(SPATH)
$(SONIC_SYSEEPROMD_PY3)_CACHE_MODE := GIT_CONTENT_SHA
$(SONIC_SYSEEPROMD_PY3)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(SONIC_SYSEEPROMD_PY3)_DEP_FILES := $(DEP_FILES)
$(SONIC_SYSEEPROMD_PY3)_SMDEP_FILES := $(SMDEP_FILES)
$(SONIC_SYSEEPROMD_PY3)_SMDEP_PATHS := $(SPATH)

View File

@ -1,8 +1,19 @@
# sonic-syseepromd (SONiC Syseeprom gathering daemon) Debian package
SONIC_SYSEEPROMD = sonic_syseepromd-1.0-py2-none-any.whl
$(SONIC_SYSEEPROMD)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-syseepromd
$(SONIC_SYSEEPROMD)_DEPENDS = $(SONIC_PY_COMMON_PY2)
$(SONIC_SYSEEPROMD)_DEBS_DEPENDS = $(LIBSWSSCOMMON) $(PYTHON_SWSSCOMMON) $(PYTHON3_SWSSCOMMON)
$(SONIC_SYSEEPROMD)_PYTHON_VERSION = 2
SONIC_PYTHON_WHEELS += $(SONIC_SYSEEPROMD)
# SONIC_SYSEEPROMD_PY2 package
SONIC_SYSEEPROMD_PY2 = sonic_syseepromd-1.0-py2-none-any.whl
$(SONIC_SYSEEPROMD_PY2)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-syseepromd
$(SONIC_SYSEEPROMD_PY2)_DEPENDS = $(SONIC_PY_COMMON_PY2)
$(SONIC_SYSEEPROMD_PY2)_DEBS_DEPENDS = $(LIBSWSSCOMMON) $(PYTHON_SWSSCOMMON)
$(SONIC_SYSEEPROMD_PY2)_PYTHON_VERSION = 2
SONIC_PYTHON_WHEELS += $(SONIC_SYSEEPROMD_PY2)
# SONIC_SYSEEPROMD_PY3 package
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_SYSEEPROMD_PY2)
$(SONIC_SYSEEPROMD_PY3)_DEBS_DEPENDS = $(LIBSWSSCOMMON) $(PYTHON3_SWSSCOMMON)
$(SONIC_SYSEEPROMD_PY3)_PYTHON_VERSION = 3
SONIC_PYTHON_WHEELS += $(SONIC_SYSEEPROMD_PY3)

View File

@ -1,10 +1,16 @@
SPATH := $($(SONIC_THERMALCTLD)_SRC_PATH)
SPATH := $($(SONIC_THERMALCTLD_PY2)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/sonic-thermalctld.mk rules/sonic-thermalctld.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
SMDEP_FILES := $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files))
$(SONIC_THERMALCTLD)_CACHE_MODE := GIT_CONTENT_SHA
$(SONIC_THERMALCTLD)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(SONIC_THERMALCTLD)_DEP_FILES := $(DEP_FILES)
$(SONIC_THERMALCTLD)_SMDEP_FILES := $(SMDEP_FILES)
$(SONIC_THERMALCTLD)_SMDEP_PATHS := $(SPATH)
$(SONIC_THERMALCTLD_PY2)_CACHE_MODE := GIT_CONTENT_SHA
$(SONIC_THERMALCTLD_PY2)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(SONIC_THERMALCTLD_PY2)_DEP_FILES := $(DEP_FILES)
$(SONIC_THERMALCTLD_PY2)_SMDEP_FILES := $(SMDEP_FILES)
$(SONIC_THERMALCTLD_PY2)_SMDEP_PATHS := $(SPATH)
$(SONIC_THERMALCTLD_PY3)_CACHE_MODE := GIT_CONTENT_SHA
$(SONIC_THERMALCTLD_PY3)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(SONIC_THERMALCTLD_PY3)_DEP_FILES := $(DEP_FILES)
$(SONIC_THERMALCTLD_PY3)_SMDEP_FILES := $(SMDEP_FILES)
$(SONIC_THERMALCTLD_PY3)_SMDEP_PATHS := $(SPATH)

View File

@ -1,8 +1,19 @@
# sonic-thermalctld (SONiC Thermal control daemon) Debian package
SONIC_THERMALCTLD = sonic_thermalctld-1.0-py2-none-any.whl
$(SONIC_THERMALCTLD)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-thermalctld
$(SONIC_THERMALCTLD)_DEPENDS = $(SONIC_PY_COMMON_PY2)
$(SONIC_THERMALCTLD)_DEBS_DEPENDS = $(LIBSWSSCOMMON) $(PYTHON_SWSSCOMMON) $(PYTHON3_SWSSCOMMON)
$(SONIC_THERMALCTLD)_PYTHON_VERSION = 2
SONIC_PYTHON_WHEELS += $(SONIC_THERMALCTLD)
# SONIC_THERMALCTLD_PY2 package
SONIC_THERMALCTLD_PY2 = sonic_thermalctld-1.0-py2-none-any.whl
$(SONIC_THERMALCTLD_PY2)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-thermalctld
$(SONIC_THERMALCTLD_PY2)_DEPENDS = $(SONIC_PY_COMMON_PY2)
$(SONIC_THERMALCTLD_PY2)_DEBS_DEPENDS = $(LIBSWSSCOMMON) $(PYTHON_SWSSCOMMON)
$(SONIC_THERMALCTLD_PY2)_PYTHON_VERSION = 2
SONIC_PYTHON_WHEELS += $(SONIC_THERMALCTLD_PY2)
# SONIC_THERMALCTLD_PY3 package
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_THERMALCTLD_PY2)
$(SONIC_THERMALCTLD_PY3)_DEBS_DEPENDS = $(LIBSWSSCOMMON) $(PYTHON3_SWSSCOMMON)
$(SONIC_THERMALCTLD_PY3)_PYTHON_VERSION = 3
SONIC_PYTHON_WHEELS += $(SONIC_THERMALCTLD_PY3)

View File

@ -1,10 +1,16 @@
SPATH := $($(SONIC_XCVRD)_SRC_PATH)
SPATH := $($(SONIC_XCVRD_PY2)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/sonic-xcvrd.mk rules/sonic-xcvrd.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
SMDEP_FILES := $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files))
$(SONIC_XCVRD)_CACHE_MODE := GIT_CONTENT_SHA
$(SONIC_XCVRD)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(SONIC_XCVRD)_DEP_FILES := $(DEP_FILES)
$(SONIC_XCVRD)_SMDEP_FILES := $(SMDEP_FILES)
$(SONIC_XCVRD)_SMDEP_PATHS := $(SPATH)
$(SONIC_XCVRD_PY2)_CACHE_MODE := GIT_CONTENT_SHA
$(SONIC_XCVRD_PY2)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(SONIC_XCVRD_PY2)_DEP_FILES := $(DEP_FILES)
$(SONIC_XCVRD_PY2)_SMDEP_FILES := $(SMDEP_FILES)
$(SONIC_XCVRD_PY2)_SMDEP_PATHS := $(SPATH)
$(SONIC_XCVRD_PY3)_CACHE_MODE := GIT_CONTENT_SHA
$(SONIC_XCVRD_PY3)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(SONIC_XCVRD_PY3)_DEP_FILES := $(DEP_FILES)
$(SONIC_XCVRD_PY3)_SMDEP_FILES := $(SMDEP_FILES)
$(SONIC_XCVRD_PY3)_SMDEP_PATHS := $(SPATH)

View File

@ -1,8 +1,19 @@
# sonic-xcvrd (SONiC Transceiver monitoring daemon) Debian package
SONIC_XCVRD = sonic_xcvrd-1.0-py2-none-any.whl
$(SONIC_XCVRD)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-xcvrd
$(SONIC_XCVRD)_DEPENDS = $(SONIC_PY_COMMON_PY2)
$(SONIC_XCVRD)_DEBS_DEPENDS = $(LIBSWSSCOMMON) $(PYTHON_SWSSCOMMON) $(PYTHON3_SWSSCOMMON)
$(SONIC_XCVRD)_PYTHON_VERSION = 2
SONIC_PYTHON_WHEELS += $(SONIC_XCVRD)
# SONIC_XCVRD_PY2 package
SONIC_XCVRD_PY2 = sonic_xcvrd-1.0-py2-none-any.whl
$(SONIC_XCVRD_PY2)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-xcvrd
$(SONIC_XCVRD_PY2)_DEPENDS = $(SONIC_PY_COMMON_PY2) $(SONIC_PLATFORM_COMMON_PY2) $(SONIC_PLATFORM_API_PY2)
$(SONIC_XCVRD_PY2)_DEBS_DEPENDS = $(LIBSWSSCOMMON) $(PYTHON_SWSSCOMMON)
$(SONIC_XCVRD_PY2)_PYTHON_VERSION = 2
SONIC_PYTHON_WHEELS += $(SONIC_XCVRD_PY2)
# SONIC_XCVRD_PY3 package
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_PLATFORM_API_PY3)
$(SONIC_XCVRD_PY3)_DEBS_DEPENDS = $(LIBSWSSCOMMON) $(PYTHON3_SWSSCOMMON)
$(SONIC_XCVRD_PY3)_PYTHON_VERSION = 3
SONIC_PYTHON_WHEELS += $(SONIC_XCVRD_PY3)