Skip to content
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

Added debug symbols to many debug dockers. #3098

Merged
merged 5 commits into from
Jul 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,28 @@ fi
sudo sed -i 's/EBTABLES_LOAD_ON_START="no"/EBTABLES_LOAD_ON_START="yes"/g' ${FILESYSTEM_ROOT}/etc/default/ebtables
sudo cp files/image_config/ebtables/ebtables.filter ${FILESYSTEM_ROOT}/etc

## Debug Image specific changes
## Update motd for debug image
if [ "$DEBUG_IMG" == "y" ]
then
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '**************' >> /etc/motd"
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo 'Running DEBUG image' >> /etc/motd"
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '**************' >> /etc/motd"
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '/src has the sources' >> /etc/motd"
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '/src is mounted in each docker' >> /etc/motd"
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '/debug is created for core files or temp files' >> /etc/motd"
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo 'Create a subdir under /debug to upload your files' >> /etc/motd"
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '/debug is mounted in each docker' >> /etc/motd"

sudo mkdir -p $FILESYSTEM_ROOT/src
pushd src
../scripts/dbg_files.sh | sudo tar -cvzf ../$FILESYSTEM_ROOT/src/sonic_src.tar.gz -T -
popd

sudo mkdir -p $FILESYSTEM_ROOT/debug

fi

## Remove gcc and python dev pkgs
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y remove gcc libpython2.7-dev

Expand Down
7 changes: 0 additions & 7 deletions dockers/docker-base-stretch/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@ RUN apt-get -y purge \
{{ install_debian_packages(docker_base_stretch_debs.split(' ')) }}
{%- endif %}

{% if docker_base_stretch_dbgs.strip() -%}
# Install common debug-packages
RUN apt-get -y install docker_base_stretch_dbgs.split(' ') | join(' ')
{% else %}
RUN ln /usr/bin/vim.tiny /usr/bin/vim
{%- endif %}

# Clean up apt
# Remove /var/lib/apt/lists/*, could be obsoleted for derived images
RUN apt-get clean -y && \
Expand Down
3 changes: 3 additions & 0 deletions files/build_templates/docker_image_ctl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ start() {
# TODO: Mellanox will remove the --tmpfs exception after SDK socket path changed in new SDK version
{%- endif %}
docker create {{docker_image_run_opt}} \
{%- if install_debug_image == "y" %}
-v /src:/src:ro -v /debug:/debug:rw \
{%- endif %}
{%- if '--log-driver=json-file' in docker_image_run_opt or '--log-driver' not in docker_image_run_opt %}
--log-opt max-size=2M --log-opt max-file=5 \
{%- endif %}
Expand Down
3 changes: 0 additions & 3 deletions rules/docker-base-stretch.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ OPENSSH = openssh-client
SSHPASS = sshpass
STRACE = strace
$(DOCKER_BASE_STRETCH)_DBG_IMAGE_PACKAGES += $(GDB) $(GDBSERVER) $(VIM) $(OPENSSH) $(SSHPASS) $(STRACE)
ifeq ($(INSTALL_DEBUG_TOOLS),y)
$(DOCKER_BASE_STRETCH)_DBG_PACKAGES += $($(DOCKER_BASE_STRETCH)_DBG_IMAGE_PACKAGES)
endif

SONIC_DOCKER_IMAGES += $(DOCKER_BASE_STRETCH)
SONIC_STRETCH_DOCKERS += $(DOCKER_BASE_STRETCH)
1 change: 1 addition & 0 deletions rules/docker-database.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ $(DOCKER_DATABASE)_PATH = $(DOCKERS_PATH)/$(DOCKER_DATABASE_STEM)

$(DOCKER_DATABASE)_DEPENDS += $(REDIS_TOOLS) $(REDIS_SERVER)
$(DOCKER_DATABASE)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_DEPENDS)
$(DOCKER_DATABASE)_DBG_DEPENDS += $(REDIS_SERVER_DBG)

$(DOCKER_DATABASE)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_IMAGE_PACKAGES)

Expand Down
2 changes: 2 additions & 0 deletions rules/docker-dhcp-relay.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ $(DOCKER_DHCP_RELAY)_PATH = $(DOCKERS_PATH)/$(DOCKER_DHCP_RELAY_STEM)

$(DOCKER_DHCP_RELAY)_DEPENDS += $(ISC_DHCP_RELAY) $(REDIS_TOOLS)
$(DOCKER_DHCP_RELAY)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_DEPENDS)
$(DOCKER_DHCP_RELAY)_DBG_DEPENDS += $(ISC_DHCP_RELAY_DBG)

$(DOCKER_DHCP_RELAY)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_IMAGE_PACKAGES)

$(DOCKER_DHCP_RELAY)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_STRETCH)
Expand Down
20 changes: 17 additions & 3 deletions rules/docker-fpm-frr.mk
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
# docker image for fpm-frr

DOCKER_FPM_FRR = docker-fpm-frr.gz
$(DOCKER_FPM_FRR)_PATH = $(DOCKERS_PATH)/docker-fpm-frr
DOCKER_FPM_FRR_STEM = docker-fpm-frr
DOCKER_FPM_FRR = $(DOCKER_FPM_FRR_STEM).gz
DOCKER_FPM_FRR_DBG = $(DOCKER_FPM_FRR_STEM)-$(DBG_IMAGE_MARK).gz

$(DOCKER_FPM_FRR)_PATH = $(DOCKERS_PATH)/$(DOCKER_FPM_FRR_STEM)

$(DOCKER_FPM_FRR)_DEPENDS += $(FRR) $(FRR_SNMP) $(SWSS) $(LIBYANG)
$(DOCKER_FPM_FRR)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_DEPENDS)
$(DOCKER_FPM_FRR)_DBG_DEPENDS += $(SWSS_DBG) $(LIBSWSSCOMMON_DBG) \
$(FRR_DBG) $(FRR_SNMP_DBG) $(LIBYANG_DBG)

$(DOCKER_FPM_FRR)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_IMAGE_PACKAGES)

$(DOCKER_FPM_FRR)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH)

SONIC_DOCKER_IMAGES += $(DOCKER_FPM_FRR)
SONIC_STRETCH_DOCKERS += $(DOCKER_FPM_FRR)

SONIC_DOCKER_DBG_IMAGES += $(DOCKER_FPM_FRR_DBG)
SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_FPM_FRR_DBG)

$(DOCKER_FPM_FRR)_CONTAINER_NAME = bgp
$(DOCKER_FPM_FRR)_RUN_OPT += --net=host --privileged -t
Expand All @@ -13,4 +28,3 @@ $(DOCKER_FPM_FRR)_RUN_OPT += -v /etc/sonic/frr:/etc/frr:rw

$(DOCKER_FPM_FRR)_BASE_IMAGE_FILES += vtysh:/usr/bin/vtysh

SONIC_STRETCH_DOCKERS += $(DOCKER_FPM_FRR)
1 change: 1 addition & 0 deletions rules/docker-fpm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ ifeq ($(SONIC_ROUTING_STACK), quagga)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_FPM_QUAGGA)
else ifeq ($(SONIC_ROUTING_STACK), frr)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_FPM_FRR)
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_FPM_FRR_DBG)
else
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_FPM_GOBGP)
endif
17 changes: 16 additions & 1 deletion rules/docker-lldp-sv2.mk
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
# docker image for lldp agent

DOCKER_LLDP_SV2 = docker-lldp-sv2.gz
DOCKER_LLDP_SV2_STEM = docker-lldp-sv2
DOCKER_LLDP_SV2 = $(DOCKER_LLDP_SV2_STEM).gz
DOCKER_LLDP_SV2_DBG = $(DOCKER_LLDP_SV2_STEM)-$(DBG_IMAGE_MARK).gz

$(DOCKER_LLDP_SV2)_PATH = $(DOCKERS_PATH)/docker-lldp-sv2

$(DOCKER_LLDP_SV2)_DEPENDS += $(LLDPD) $(LIBSWSSCOMMON) $(PYTHON_SWSSCOMMON)

$(DOCKER_LLDP_SV2)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_DEPENDS)
$(DOCKER_LLDP_SV2)_DBG_DEPENDS += $(LLDPD_DBG) $(LIBSWSSCOMMON_DBG)

$(DOCKER_LLDP_SV2)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_IMAGE_PACKAGES)

$(DOCKER_LLDP_SV2)_PYTHON_WHEELS += $(DBSYNCD_PY2)
$(DOCKER_LLDP_SV2)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH)

SONIC_DOCKER_IMAGES += $(DOCKER_LLDP_SV2)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_LLDP_SV2)
SONIC_STRETCH_DOCKERS += $(DOCKER_LLDP_SV2)

SONIC_DOCKER_DBG_IMAGES += $(DOCKER_LLDP_SV2_DBG)
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_LLDP_SV2_DBG)
SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_LLDP_SV2_DBG)

$(DOCKER_LLDP_SV2)_CONTAINER_NAME = lldp
$(DOCKER_LLDP_SV2)_RUN_OPT += --net=host --privileged -t
$(DOCKER_LLDP_SV2)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
Expand Down
4 changes: 3 additions & 1 deletion rules/docker-platform-monitor.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ $(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PLATFORM_API_PY2)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_DAEMON_BASE_PY2)

$(DOCKER_PLATFORM_MONITOR)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_DEPENDS)
$(DOCKER_PLATFORM_MONITOR)_DBG_DEPENDS += $(LIBSWSSCOMMON_DBG)
$(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_STRETCH)_DBG_IMAGE_PACKAGES)

$(DOCKER_PLATFORM_MONITOR)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_STRETCH)
Expand Down
2 changes: 2 additions & 0 deletions rules/docker-router-advertiser.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ $(DOCKER_ROUTER_ADVERTISER)_PATH = $(DOCKERS_PATH)/$(DOCKER_ROUTER_ADVERTISER_ST

$(DOCKER_ROUTER_ADVERTISER)_DEPENDS += $(RADVD) $(REDIS_TOOLS)
$(DOCKER_ROUTER_ADVERTISER)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_DEPENDS)
$(DOCKER_ROUTER_ADVERTISER)_DBG_DEPENDS += $(RADVD_DBG)

$(DOCKER_ROUTER_ADVERTISER)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_IMAGE_PACKAGES)

$(DOCKER_ROUTER_ADVERTISER)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_STRETCH)
Expand Down
17 changes: 16 additions & 1 deletion rules/docker-snmp-sv2.mk
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
# docker image for snmp agent

DOCKER_SNMP_SV2 = docker-snmp-sv2.gz
DOCKER_SNMP_SV2_STEM = docker-snmp-sv2
DOCKER_SNMP_SV2 = $(DOCKER_SNMP_SV2_STEM).gz
DOCKER_SNMP_SV2_DBG = $(DOCKER_SNMP_SV2_STEM)-$(DBG_IMAGE_MARK).gz

$(DOCKER_SNMP_SV2)_PATH = $(DOCKERS_PATH)/docker-snmp-sv2

## TODO: remove LIBPY3_DEV if we can get pip3 directly
$(DOCKER_SNMP_SV2)_DEPENDS += $(SNMP) $(SNMPD) $(PY3) $(LIBPY3_DEV)

$(DOCKER_SNMP_SV2)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_DEPENDS)
$(DOCKER_SNMP_SV2)_DBG_DEPENDS += $(SNMP_DBG) $(SNMPD_DBG) $(LIBSNMP_DBG)

$(DOCKER_SNMP_SV2)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_IMAGE_PACKAGES)

$(DOCKER_SNMP_SV2)_PYTHON_WHEELS += $(SONIC_PLATFORM_COMMON_PY3) $(SWSSSDK_PY3) $(ASYNCSNMP_PY3)
$(DOCKER_SNMP_SV2)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH)

SONIC_DOCKER_IMAGES += $(DOCKER_SNMP_SV2)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SNMP_SV2)
SONIC_STRETCH_DOCKERS += $(DOCKER_SNMP_SV2)

SONIC_DOCKER_DBG_IMAGES += $(DOCKER_SNMP_SV2_DBG)
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_SNMP_SV2_DBG)
SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SNMP_SV2_DBG)

$(DOCKER_SNMP_SV2)_CONTAINER_NAME = snmp
$(DOCKER_SNMP_SV2)_RUN_OPT += --net=host --privileged -t
$(DOCKER_SNMP_SV2)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
Expand Down
2 changes: 2 additions & 0 deletions rules/docker-teamd.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ $(DOCKER_TEAMD)_PATH = $(DOCKERS_PATH)/$(DOCKER_TEAMD_STEM)
$(DOCKER_TEAMD)_DEPENDS += $(SWSS) $(LIBTEAMDCT) $(LIBTEAM_UTILS) $(REDIS_TOOLS)
$(DOCKER_TEAMD)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_DEPENDS)
$(DOCKER_TEAMD)_DBG_DEPENDS += $(SWSS_DBG) $(LIBSWSSCOMMON_DBG)
$(DOCKER_TEAMD)_DBG_DEPENDS += $(LIBTEAMDCT_DBG) $(LIBTEAM_UTILS_DBG)

$(DOCKER_TEAMD)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_IMAGE_PACKAGES)

$(DOCKER_TEAMD)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH)
Expand Down
5 changes: 5 additions & 0 deletions rules/frr.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@ FRR_SNMP_DBG = frr-snmp-dbgsym_$(FRR_VERSION)-sonic-$(FRR_SUBVERSION)_amd64.deb
$(eval $(call add_derived_package,$(FRR),$(FRR_SNMP_DBG)))

export FRR FRR_PYTHONTOOLS FRR_DBG FRR_SNMP FRR_SNMP_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 += sonic-frr
3 changes: 3 additions & 0 deletions rules/isc-dhcp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ $(ISC_DHCP_RELAY)_SRC_PATH = $(SRC_PATH)/isc-dhcp
SONIC_MAKE_DEBS += $(ISC_DHCP_RELAY)

SONIC_STRETCH_DEBS += $(ISC_DHCP_RELAY)

ISC_DHCP_RELAY_DBG = isc-dhcp-relay-dbgsym_$(ISC_DHCP_VERSION)_amd64.deb
$(eval $(call add_derived_package,$(ISC_DHCP_RELAY),$(ISC_DHCP_RELAY_DBG)))
5 changes: 5 additions & 0 deletions rules/libnl3.mk
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,8 @@ $(eval $(call add_derived_package,$(LIBNL3),$(LIBNL_CLI)))
LIBNL_CLI_DEV = libnl-cli-3-dev_$(LIBNL3_VERSION)_amd64.deb
$(LIBNL_CLI_DEV)_DEPENDS += $(LIBNL_CLI) $(LIBNL_GENL3_DEV) $(LIBNL_NF3_DEV) $(LIBNL_ROUTE3_DEV)
$(eval $(call add_derived_package,$(LIBNL3),$(LIBNL_CLI_DEV)))

# The .c, .cpp, .h & .hpp files under src/{$DBG_SRC_ARCHIVE list}
# are archived into debug one image to facilitate debugging.
#
DBG_SRC_ARCHIVE += libnl3
14 changes: 14 additions & 0 deletions rules/libteam.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,27 @@ $(LIBTEAM)_SRC_PATH = $(SRC_PATH)/libteam
$(LIBTEAM)_DEPENDS += $(LIBNL_GENL3_DEV) $(LIBNL_CLI_DEV)
SONIC_MAKE_DEBS += $(LIBTEAM)

LIBTEAM_DBG = libteam5-dbgsym_$(LIBTEAM_VERSION)_amd64.deb
$(eval $(call add_derived_package,$(LIBTEAM),$(LIBTEAM_DBG)))

LIBTEAM_DEV = libteam-dev_$(LIBTEAM_VERSION)_amd64.deb
$(LIBTEAM_DEV)_DEPENDS += $(LIBTEAMDCT)
$(eval $(call add_derived_package,$(LIBTEAM),$(LIBTEAM_DEV)))

LIBTEAMDCT = libteamdctl0_$(LIBTEAM_VERSION)_amd64.deb
$(eval $(call add_derived_package,$(LIBTEAM),$(LIBTEAMDCT)))

LIBTEAMDCT_DBG = libteamdctl0-dbgsym_$(LIBTEAM_VERSION)_amd64.deb
$(eval $(call add_derived_package,$(LIBTEAMDCT),$(LIBTEAMDCT_DBG)))

LIBTEAM_UTILS = libteam-utils_$(LIBTEAM_VERSION)_amd64.deb
$(LIBTEAM_UTILS)_DEPENDS += $(LIBTEAMDCT)
$(eval $(call add_derived_package,$(LIBTEAM),$(LIBTEAM_UTILS)))

LIBTEAM_UTILS_DBG = libteam-utils-dbgsym_$(LIBTEAM_VERSION)_amd64.deb
$(eval $(call add_derived_package,$(LIBTEAM_UTILS),$(LIBTEAM_UTILS_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 += libteam
5 changes: 4 additions & 1 deletion rules/libyang.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ SONIC_STRETCH_DEBS += $(LIBYANG)
LIBYANG_DEV = libyang-dev_$(LIBYANG_VERSION)-$(LIBYANG_SUBVERSION)_amd64.deb
$(eval $(call add_derived_package,$(LIBYANG),$(LIBYANG_DEV)))

export LIBYANG LIBYANG_DEV
LIBYANG_DBG = libyang$(LIBYANG_VERSION_BASE)-dbgsym_$(LIBYANG_VERSION)-$(LIBYANG_SUBVERSION)_amd64.deb
$(eval $(call add_derived_package,$(LIBYANG),$(LIBYANG_DBG)))

export LIBYANG LIBYANG_DEV LIBYANG_DBG
9 changes: 9 additions & 0 deletions rules/lldpd.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,17 @@ SONIC_MAKE_DEBS += $(LLDPD)
LIBLLDPCTL = liblldpctl-dev_$(LLDPD_VERSION_FULL)_amd64.deb
$(eval $(call add_derived_package,$(LLDPD),$(LIBLLDPCTL)))

LLDPD_DBG = lldpd-dbgsym_$(LLDPD_VERSION_FULL)_amd64.deb
$(eval $(call add_derived_package,$(LLDPD),$(LLDPD_DBG)))

# Export these variables so they can be used in a sub-make
export LLDPD_VERSION
export LLDPD_VERSION_FULL
export LLDPD
export LIBLLDPCTL
export LLDPD_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 += lldpd
17 changes: 17 additions & 0 deletions rules/lm-sensors.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,38 @@ LM_SENSORS_VERSION_FULL=$(LM_SENSORS_VERSION)-4
LM_SENSORS = lm-sensors_$(LM_SENSORS_VERSION_FULL)_amd64.deb
$(LM_SENSORS)_SRC_PATH = $(SRC_PATH)/lm-sensors

LM_SENSORS_DBG = lm-sensors-dbgsym_$(LM_SENSORS_VERSION_FULL)_amd64.deb
$(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 = libsensors4_$(LM_SENSORS_VERSION_FULL)_amd64.deb
$(eval $(call add_derived_package,$(LM_SENSORS),$(LIBSENSORS)))

LIBSENSORS_DBG = libsensors4-dbgsym_$(LM_SENSORS_VERSION_FULL)_amd64.deb
$(eval $(call add_derived_package,$(LIBSENSORS),$(LIBSENSORS_DBG)))

SENSORD = sensord_$(LM_SENSORS_VERSION_FULL)_amd64.deb
$(eval $(call add_derived_package,$(LM_SENSORS),$(SENSORD)))
$(SENSORD)_DEPENDS += $(LIBSENSORS) $(LM_SENSORS)

SENSORD_DBG = sensord-dbgsym_$(LM_SENSORS_VERSION_FULL)_amd64.deb
$(eval $(call add_derived_package,$(SENSORD),$(SENSORD_DBG)))

SONIC_MAKE_DEBS += $(LM_SENSORS)

# The .c, .cpp, .h & .hpp files under src/{$DBG_SRC_ARCHIVE list}
# are archived into debug one image to facilitate debugging.
#
DBG_SRC_ARCHIVE += lm-sensors

export LM_SENSORS
export FANCONTROL
export LIBSENSORS
export SENSORD
export LM_SENSORS_VERSION
export LM_SENSORS_VERSION_FULL
export LM_SENSORS_DBG
export LIBSENSORS_DBG
export SENSORD_DBG
8 changes: 8 additions & 0 deletions rules/radvd.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@ RADVD = radvd_$(RADVD_VERSION)_amd64.deb
$(RADVD)_SRC_PATH = $(SRC_PATH)/radvd
SONIC_MAKE_DEBS += $(RADVD)
SONIC_STRETCH_DEBS += $(RADVD)

RADVD_DBG = radvd-dbgsym_$(RADVD_VERSION)_amd64.deb
$(eval $(call add_derived_package,$(RADVD),$(RADVD_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 += radvd
8 changes: 8 additions & 0 deletions rules/redis.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,16 @@ SONIC_MAKE_DEBS += $(REDIS_TOOLS)
REDIS_SERVER = redis-server_$(REDIS_VERSION)_amd64.deb
$(eval $(call add_derived_package,$(REDIS_TOOLS),$(REDIS_SERVER)))

REDIS_SERVER_DBG = redis-server-dbgsym_$(REDIS_VERSION)_amd64.deb
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In recent builds, redis-server-dbgsym package is NOT found.

dpkg-deb: building package 'redis' in '../redis_5.0.3-3~bpo9+2_all.deb'.
dpkg-deb: building package 'redis-tools-dbgsym' in '../redis-tools-dbgsym_5.0.3-3~bpo9+2_amd64.deb'.
dpkg-deb: building package 'redis-tools' in '../redis-tools_5.0.3-3~bpo9+2_amd64.deb'.
dpkg-deb: building package 'redis-sentinel' in '../redis-sentinel_5.0.3-3~bpo9+2_amd64.deb'.
dpkg-deb: building package 'redis-server' in '../redis-server_5.0.3-3~bpo9+2_amd64.deb'.
make[2]: Leaving directory '/sonic/src/redis/redis_build/redis-5.0.3'
 dpkg-genbuildinfo --build=binary
 dpkg-genchanges --build=binary >../redis_5.0.3-3~bpo9+2_amd64.changes
dpkg-genchanges: info: binary-only upload (no source code included)
 dpkg-source --after-build redis-5.0.3
dpkg-source: info: using options from redis-5.0.3/debian/source/options: --extend-diff-ignore=^\.travis\.yml$
dpkg-buildpackage: info: binary-only upload (no source included)
/sonic/src/redis/redis_build /sonic/src/redis
mv: cannot stat 'redis-server-dbgsym_5.0.3-3~bpo9+2_amd64.deb': No such file or directory
Makefile:14: recipe for target '/sonic/target/debs/stretch/redis-server_5.0.3-3~bpo9+2_amd64.deb' failed

$(eval $(call add_derived_package,$(REDIS_SERVER),$(REDIS_SERVER_DBG)))

REDIS_SENTINEL = redis-sentinel_$(REDIS_VERSION)_amd64.deb
$(REDIS_SENTINEL)_DEPENDS += $(REDIS_SERVER)
$(REDIS_SENTINEL)_RDEPENDS += $(REDIS_SERVER)
$(eval $(call add_derived_package,$(REDIS_TOOLS),$(REDIS_SENTINEL)))

# The .c, .cpp, .h & .hpp files under src/{$DBG_SRC_ARCHIVE list}
# are archived into debug one image to facilitate debugging.
#
DBG_SRC_ARCHIVE += redis

6 changes: 6 additions & 0 deletions rules/sairedis.mk
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,9 @@ LIBSAIMETADATA_DBG = libsaimetadata-dbg_1.0.0_amd64.deb
$(LIBSAIMETADATA_DBG)_DEPENDS += $(LIBSAIMETADATA)
$(LIBSAIMETADATA_DBG)_RDEPENDS += $(LIBSAIMETADATA)
$(eval $(call add_derived_package,$(LIBSAIREDIS),$(LIBSAIMETADATA_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 += sonic-sairedis

12 changes: 12 additions & 0 deletions rules/snmpd.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ $(SNMPD)_DEPENDS += $(LIBSNMP)
$(SNMPD)_RDEPENDS += $(LIBSNMP)
$(eval $(call add_derived_package,$(LIBSNMP_BASE),$(SNMPD)))

SNMP_DBG = snmp-dbgsym_$(SNMPD_VERSION_FULL)_amd64.deb
$(eval $(call add_derived_package,$(SNMP),$(SNMP_DBG)))

SNMPD_DBG = snmpd-dbgsym_$(SNMPD_VERSION_FULL)_amd64.deb
$(eval $(call add_derived_package,$(SNMPD),$(SNMPD_DBG)))

LIBSNMP = libsnmp30_$(SNMPD_VERSION_FULL)_amd64.deb
$(LIBSNMP)_RDEPENDS += $(LIBSNMP_BASE)
$(eval $(call add_derived_package,$(LIBSNMP_BASE),$(LIBSNMP)))
Expand Down Expand Up @@ -53,3 +59,9 @@ TKMIB = tkmib_$(SNMPD_VERSION_FULL)_all.deb
$(TKMIB)_DEPENDS += $(LIBSNMP_PERL)
$(TKMIB)_RDEPENDS += $(LIBSNMP_PERL)
$(eval $(call add_derived_package,$(LIBSNMP_BASE),$(TKMIB)))

# The .c, .cpp, .h & .hpp files under src/{$DBG_SRC_ARCHIVE list}
# are archived into debug one image to facilitate debugging.
#
DBG_SRC_ARCHIVE += snmpd

Loading