96954f0134
#### Why I did it Fix sonic-db-cli high CPU usage on SONiC startup issue: https://github.com/Azure/sonic-buildimage/issues/10218 ETA of this issue will be 2022/05/31 #### How I did it Re-write sonic-cli with c++ in sonic-swss-common: https://github.com/Azure/sonic-swss-common/pull/607 Modify swss-common rules and slave.mk to install c++ version sonic-db-cli. #### How to verify it Pass all E2E test scenario. #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 #### Description for the changelog Build and install c++ version sonic-db-cli from swss-common. #### Link to config_db schema for YANG module changes <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/SONiC/wiki/Configuration. --> #### A picture of a cute animal (not mandatory but encouraged)
43 lines
1.8 KiB
Makefile
43 lines
1.8 KiB
Makefile
# libswsscommon package
|
|
|
|
LIBSWSSCOMMON_VERSION = 1.0.0
|
|
LIBSWSSCOMMON_NAME = libswsscommon
|
|
|
|
LIBSWSSCOMMON = $(LIBSWSSCOMMON_NAME)_$(LIBSWSSCOMMON_VERSION)_$(CONFIGURED_ARCH).deb
|
|
$(LIBSWSSCOMMON)_SRC_PATH = $(SRC_PATH)/sonic-swss-common
|
|
$(LIBSWSSCOMMON)_VERSION = $(LIBSWSSCOMMON_VERSION)
|
|
$(LIBSWSSCOMMON)_NAME = $(LIBSWSSCOMMON_NAME)
|
|
$(LIBSWSSCOMMON)_DEPENDS += $(LIBHIREDIS_DEV) $(LIBNL3_DEV) $(LIBNL_GENL3_DEV) \
|
|
$(LIBNL_ROUTE3_DEV) $(LIBNL_NF3_DEV) \
|
|
$(LIBNL_CLI_DEV)
|
|
$(LIBSWSSCOMMON)_RDEPENDS += $(LIBHIREDIS) $(LIBNL3) $(LIBNL_GENL3) \
|
|
$(LIBNL_ROUTE3) $(LIBNL_NF3) $(LIBNL_CLI)
|
|
SONIC_DPKG_DEBS += $(LIBSWSSCOMMON)
|
|
|
|
LIBSWSSCOMMON_DEV = $(LIBSWSSCOMMON_NAME)-dev_$(LIBSWSSCOMMON_VERSION)_$(CONFIGURED_ARCH).deb
|
|
$(eval $(call add_derived_package,$(LIBSWSSCOMMON),$(LIBSWSSCOMMON_DEV)))
|
|
|
|
ifeq ($(ENABLE_PY2_MODULES), y)
|
|
PYTHON_SWSSCOMMON = python-swsscommon_$(LIBSWSSCOMMON_VERSION)_$(CONFIGURED_ARCH).deb
|
|
$(eval $(call add_derived_package,$(LIBSWSSCOMMON),$(PYTHON_SWSSCOMMON)))
|
|
else
|
|
$(LIBSWSSCOMMON)_BUILD_ENV += DEB_BUILD_PROFILES=nopython2
|
|
endif
|
|
|
|
PYTHON3_SWSSCOMMON = python3-swsscommon_$(LIBSWSSCOMMON_VERSION)_$(CONFIGURED_ARCH).deb
|
|
$(eval $(call add_derived_package,$(LIBSWSSCOMMON),$(PYTHON3_SWSSCOMMON)))
|
|
|
|
LIBSWSSCOMMON_DBG = $(LIBSWSSCOMMON_NAME)-dbg_$(LIBSWSSCOMMON_VERSION)_$(CONFIGURED_ARCH).deb
|
|
$(LIBSWSSCOMMON_DBG)_DEPENDS += $(LIBSWSSCOMMON)
|
|
$(LIBSWSSCOMMON_DBG)_RDEPENDS += $(LIBSWSSCOMMON)
|
|
$(eval $(call add_derived_package,$(LIBSWSSCOMMON),$(LIBSWSSCOMMON_DBG)))
|
|
|
|
SONIC_DB_CLI = sonic-db-cli_$(LIBSWSSCOMMON_VERSION)_$(CONFIGURED_ARCH).deb
|
|
$(eval $(call add_derived_package,$(LIBSWSSCOMMON),$(SONIC_DB_CLI)))
|
|
|
|
# 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-swss-common
|
|
|