From c4fa5d2582974476e30cc3cf1f8b0db1623f5979 Mon Sep 17 00:00:00 2001 From: Saikrishna Arcot Date: Mon, 17 Oct 2022 18:10:36 -0700 Subject: [PATCH 1/4] Switch to using non-recursive automake This can help increase build parallelization. On my dev VM, this decreased the compilation time from 2:55 to about 2:28 (Bullseye, Python 2 disabled, -j12). Time improvements may be more noticeable on systems with more CPU cores. Signed-off-by: Saikrishna Arcot --- Makefile.am | 25 ++++++- common/Makefile.am | 140 ++++++++++++++++++--------------------- configure.ac | 8 +-- pyext/Makefile.am | 6 +- pyext/py2/Makefile.am | 25 +++---- pyext/py3/Makefile.am | 25 +++---- sonic-db-cli/Makefile.am | 28 +++----- tests/Makefile.am | 84 +++++++++++------------ 8 files changed, 158 insertions(+), 183 deletions(-) diff --git a/Makefile.am b/Makefile.am index a77d6b9a4..f17afd601 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,26 @@ -SUBDIRS = common pyext sonic-db-cli tests +lib_LTLIBRARIES = +bin_PROGRAMS = + +INCLUDES = -I $(srcdir) + +if DEBUG +DBGFLAGS = -ggdb -DDEBUG +else +DBGFLAGS = -g -DNDEBUG +endif + +SWIG_SOURCES = pyext/swsscommon.i +SWIG_FLAG = -Wall -c++ -python -keyword +if ARCH64 +SWIG_FLAG += -DSWIGWORDSIZE64 +endif + +CLEANFILES = + +include common/Makefile.am +include pyext/Makefile.am +include sonic-db-cli/Makefile.am +include tests/Makefile.am + ACLOCAL_AMFLAGS = -I m4 diff --git a/common/Makefile.am b/common/Makefile.am index e9e9d1a19..f8e58633f 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -1,86 +1,76 @@ -INCLUDES = -I $(top_srcdir) -lib_LTLIBRARIES = libswsscommon.la +lib_LTLIBRARIES += common/libswsscommon.la -EXTRA_DIST = \ - consumer_state_table_pops.lua \ - consumer_table_pops.lua \ - producer_state_table_apply_view.lua \ - table_dump.lua \ - portcounter.lua \ - fdb_flush.lua \ - fdb_flush.v2.lua +dist_swss_DATA = \ + common/consumer_state_table_pops.lua \ + common/consumer_table_pops.lua \ + common/producer_state_table_apply_view.lua \ + common/table_dump.lua \ + common/portcounter.lua \ + common/fdb_flush.lua \ + common/fdb_flush.v2.lua -EXTRA_CONF_DIST = database_config.json +dist_swsscommon_DATA= common/database_config.json swssdir = $(datadir)/swss swsscommondir = /var/run/redis/sonic-db -dist_swss_DATA = $(EXTRA_DIST) -dist_swsscommon_DATA = $(EXTRA_CONF_DIST) +bin_PROGRAMS += common/swssloglevel -bin_PROGRAMS = swssloglevel +common_libswsscommon_la_SOURCES = \ + common/events_common.cpp \ + common/events_service.cpp \ + common/events.cpp \ + common/logger.cpp \ + common/redisreply.cpp \ + common/configdb.cpp \ + common/dbconnector.cpp \ + common/dbinterface.cpp \ + common/defaultvalueprovider.cpp \ + common/sonicv2connector.cpp \ + common/table.cpp \ + common/json.cpp \ + common/producertable.cpp \ + common/producerstatetable.cpp \ + common/rediscommand.cpp \ + common/redistran.cpp \ + common/redisselect.cpp \ + common/select.cpp \ + common/selectableevent.cpp \ + common/selectabletimer.cpp \ + common/consumertable.cpp \ + common/consumertablebase.cpp \ + common/consumerstatetable.cpp \ + common/ipaddress.cpp \ + common/ipprefix.cpp \ + common/ipaddresses.cpp \ + common/macaddress.cpp \ + common/netdispatcher.cpp \ + common/netlink.cpp \ + common/nfnetlink.cpp \ + common/notificationconsumer.cpp \ + common/notificationproducer.cpp \ + common/linkcache.cpp \ + common/portmap.cpp \ + common/pubsub.cpp \ + common/tokenize.cpp \ + common/exec.cpp \ + common/saiaclschema.cpp \ + common/subscriberstatetable.cpp \ + common/timestamp.cpp \ + common/warm_restart.cpp \ + common/luatable.cpp \ + common/countertable.cpp \ + common/redisutility.cpp \ + common/restart_waiter.cpp \ + common/redis_table_waiter.cpp -if DEBUG -DBGFLAGS = -ggdb -DDEBUG -else -DBGFLAGS = -g -DNDEBUG -endif +common_libswsscommon_la_CXXFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(LIBNL_CFLAGS) $(CODE_COVERAGE_CXXFLAGS) +common_libswsscommon_la_CPPFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(LIBNL_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS) +common_libswsscommon_la_LIBADD = -lpthread $(LIBNL_LIBS) $(CODE_COVERAGE_LIBS) -lzmq -lboost_serialization -luuid -lyang -libswsscommon_la_SOURCES = \ - events_common.cpp \ - events_service.cpp \ - events.cpp \ - logger.cpp \ - redisreply.cpp \ - configdb.cpp \ - dbconnector.cpp \ - dbinterface.cpp \ - defaultvalueprovider.cpp \ - sonicv2connector.cpp \ - table.cpp \ - json.cpp \ - producertable.cpp \ - producerstatetable.cpp \ - rediscommand.cpp \ - redistran.cpp \ - redisselect.cpp \ - select.cpp \ - selectableevent.cpp \ - selectabletimer.cpp \ - consumertable.cpp \ - consumertablebase.cpp \ - consumerstatetable.cpp \ - ipaddress.cpp \ - ipprefix.cpp \ - ipaddresses.cpp \ - macaddress.cpp \ - netdispatcher.cpp \ - netlink.cpp \ - nfnetlink.cpp \ - notificationconsumer.cpp \ - notificationproducer.cpp \ - linkcache.cpp \ - portmap.cpp \ - pubsub.cpp \ - tokenize.cpp \ - exec.cpp \ - saiaclschema.cpp \ - subscriberstatetable.cpp \ - timestamp.cpp \ - warm_restart.cpp \ - luatable.cpp \ - countertable.cpp \ - redisutility.cpp \ - restart_waiter.cpp \ - redis_table_waiter.cpp +common_swssloglevel_SOURCES = common/loglevel.cpp -libswsscommon_la_CXXFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(LIBNL_CFLAGS) $(CODE_COVERAGE_CXXFLAGS) -libswsscommon_la_CPPFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(LIBNL_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS) -libswsscommon_la_LIBADD = -lpthread $(LIBNL_LIBS) $(CODE_COVERAGE_LIBS) -lzmq -lboost_serialization -luuid -lyang - -swssloglevel_SOURCES = loglevel.cpp - -swssloglevel_CXXFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CODE_COVERAGE_CXXFLAGS) -swssloglevel_CPPFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CODE_COVERAGE_CPPFLAGS) -swssloglevel_LDADD = libswsscommon.la $(CODE_COVERAGE_LIBS) +common_swssloglevel_CXXFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CODE_COVERAGE_CXXFLAGS) +common_swssloglevel_CPPFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CODE_COVERAGE_CPPFLAGS) +common_swssloglevel_LDADD = common/libswsscommon.la $(CODE_COVERAGE_LIBS) diff --git a/configure.ac b/configure.ac index eda00eaeb..24f815c88 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_CONFIG_SRCDIR([]) AC_CONFIG_AUX_DIR(config) AM_CONFIG_HEADER(config.h) AC_CONFIG_MACRO_DIR([m4]) -AM_INIT_AUTOMAKE([foreign]) +AM_INIT_AUTOMAKE([foreign subdir-objects]) AC_LANG_C AC_LANG([C++]) AC_PROG_CC @@ -94,12 +94,6 @@ AC_SUBST(CFLAGS_COMMON) AC_CONFIG_FILES([ Makefile - common/Makefile - pyext/Makefile - pyext/py2/Makefile - pyext/py3/Makefile - sonic-db-cli/Makefile - tests/Makefile ]) AC_OUTPUT diff --git a/pyext/Makefile.am b/pyext/Makefile.am index f7c1915f7..f2b5c8929 100644 --- a/pyext/Makefile.am +++ b/pyext/Makefile.am @@ -1,6 +1,4 @@ -SUBDIRS = py3 if PYTHON2 -SUBDIRS += py2 +include pyext/py2/Makefile.am endif - -ACLOCAL_AMFLAGS = -I m4 +include pyext/py3/Makefile.am diff --git a/pyext/py2/Makefile.am b/pyext/py2/Makefile.am index f7f772778..2e69dcd48 100644 --- a/pyext/py2/Makefile.am +++ b/pyext/py2/Makefile.am @@ -1,19 +1,12 @@ -SWIG_SOURCES = ../swsscommon.i +pkgpython_PYTHON = pyext/py2/swsscommon.py pyext/py2/__init__.py +pkgpyexec_LTLIBRARIES = pyext/py2/_swsscommon.la -pkgpython_PYTHON = swsscommon.py __init__.py -pkgpyexec_LTLIBRARIES = _swsscommon.la +pyext_py2__swsscommon_la_SOURCES = pyext/py2/swsscommon_wrap.cpp +pyext_py2__swsscommon_la_CPPFLAGS = -std=c++11 -Icommon -I/usr/include/python$(PYTHON_VERSION) +pyext_py2__swsscommon_la_LDFLAGS = -module +pyext_py2__swsscommon_la_LIBADD = common/libswsscommon.la -lpython$(PYTHON_VERSION) -_swsscommon_la_SOURCES = swsscommon_wrap.cpp -_swsscommon_la_CPPFLAGS = -std=c++11 -I../../common -I/usr/include/python$(PYTHON_VERSION) -_swsscommon_la_LDFLAGS = -module -_swsscommon_la_LIBADD = ../../common/libswsscommon.la -lpython$(PYTHON_VERSION) +pyext/py2/swsscommon_wrap.cpp: $(SWIG_SOURCES) + $(SWIG) $(SWIG_FLAG) -Icommon -o $@ $< -SWIG_FLAG = -Wall -c++ -python -keyword -if ARCH64 -SWIG_FLAG += -DSWIGWORDSIZE64 -endif - -swsscommon_wrap.cpp: $(SWIG_SOURCES) - $(SWIG) $(SWIG_FLAG) -I../../common -o $@ $< - -CLEANFILES = swsscommon_wrap.cpp +CLEANFILES += pyext/py2/swsscommon_wrap.cpp pyext/py2/swsscommon.py diff --git a/pyext/py3/Makefile.am b/pyext/py3/Makefile.am index 30d50af44..3e2bbdc21 100644 --- a/pyext/py3/Makefile.am +++ b/pyext/py3/Makefile.am @@ -1,19 +1,12 @@ -SWIG_SOURCES = ../swsscommon.i +pkgpython3_PYTHON = pyext/py3/swsscommon.py pyext/py3/__init__.py +pkgpy3exec_LTLIBRARIES = pyext/py3/_swsscommon.la -pkgpython3_PYTHON = swsscommon.py __init__.py -pkgpy3exec_LTLIBRARIES = _swsscommon.la +pyext_py3__swsscommon_la_SOURCES = pyext/py3/swsscommon_wrap.cpp +pyext_py3__swsscommon_la_CPPFLAGS = -std=c++11 -Icommon -I/usr/include/python$(PYTHON3_VERSION) +pyext_py3__swsscommon_la_LDFLAGS = -module +pyext_py3__swsscommon_la_LIBADD = common/libswsscommon.la $(PYTHON3_BLDLIBRARY) -_swsscommon_la_SOURCES = swsscommon_wrap.cpp -_swsscommon_la_CPPFLAGS = -std=c++11 -I../../common -I/usr/include/python$(PYTHON3_VERSION) -_swsscommon_la_LDFLAGS = -module -_swsscommon_la_LIBADD = ../../common/libswsscommon.la $(PYTHON3_BLDLIBRARY) +pyext/py3/swsscommon_wrap.cpp: $(SWIG_SOURCES) + $(SWIG) $(SWIG_FLAG) -Icommon -o $@ $< -SWIG_FLAG = -Wall -c++ -python -keyword -if ARCH64 -SWIG_FLAG += -DSWIGWORDSIZE64 -endif - -swsscommon_wrap.cpp: $(SWIG_SOURCES) - $(SWIG) $(SWIG_FLAG) -I../../common -o $@ $< - -CLEANFILES = swsscommon_wrap.cpp +CLEANFILES += pyext/py3/swsscommon_wrap.cpp pyext/py3/swsscommon.py diff --git a/sonic-db-cli/Makefile.am b/sonic-db-cli/Makefile.am index a8b52653a..a0c65edef 100755 --- a/sonic-db-cli/Makefile.am +++ b/sonic-db-cli/Makefile.am @@ -1,19 +1,11 @@ -INCLUDES = -I $(top_srcdir) +lib_LTLIBRARIES += sonic-db-cli/libsonicdbcli.la +sonic_db_cli_libsonicdbcli_la_SOURCES = sonic-db-cli/sonic-db-cli.cpp +sonic_db_cli_libsonicdbcli_la_CFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) +sonic_db_cli_libsonicdbcli_la_CPPFLAGS = $(DBGFLAGS) $(AM_CPPFLAGS) $(CFLAGS_COMMON) +sonic_db_cli_libsonicdbcli_la_LIBADD = common/libswsscommon.la -lpthread -if DEBUG -DBGFLAGS = -ggdb -DDEBUG -else -DBGFLAGS = -g -DNDEBUG -endif - -lib_LTLIBRARIES = libsonicdbcli.la -libsonicdbcli_la_SOURCES = sonic-db-cli.cpp -libsonicdbcli_la_CFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) -libsonicdbcli_la_CPPFLAGS = $(DBGFLAGS) $(AM_CPPFLAGS) $(CFLAGS_COMMON) -libsonicdbcli_la_LDFLAGS = -L$(top_srcdir)/common -lswsscommon -lpthread - -bin_PROGRAMS = sonic-db-cli -sonic_db_cli_SOURCES = sonic-db-cli.cpp main.cpp -sonic_db_cli_CFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) -sonic_db_cli_CPPFLAGS = $(DBGFLAGS) $(AM_CPPFLAGS) $(CFLAGS_COMMON) -sonic_db_cli_LDFLAGS = -L$(top_srcdir)/common -lswsscommon -lpthread +bin_PROGRAMS += sonic-db-cli/sonic-db-cli +sonic_db_cli_sonic_db_cli_SOURCES = sonic-db-cli/sonic-db-cli.cpp sonic-db-cli/main.cpp +sonic_db_cli_sonic_db_cli_CFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) +sonic_db_cli_sonic_db_cli_CPPFLAGS = $(DBGFLAGS) $(AM_CPPFLAGS) $(CFLAGS_COMMON) +sonic_db_cli_sonic_db_cli_LDADD = common/libswsscommon.la -lpthread diff --git a/tests/Makefile.am b/tests/Makefile.am index 2c3e8aaf9..53b9d639b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,51 +1,43 @@ -INCLUDES = -I $(top_srcdir) - -bin_PROGRAMS = tests - -if DEBUG -DBGFLAGS = -ggdb -DDEBUG -else -DBGFLAGS = -g -DNDEBUG -endif +bin_PROGRAMS += tests/tests CFLAGS_GTEST = LDADD_GTEST = -L/usr/src/gtest -lgtest -lgtest_main -lgmock -lgmock_main -tests_SOURCES = redis_ut.cpp \ - redis_piped_ut.cpp \ - redis_state_ut.cpp \ - redis_piped_state_ut.cpp \ - tokenize_ut.cpp \ - json_ut.cpp \ - ntf_ut.cpp \ - ipaddress_ut.cpp \ - ipprefix_ut.cpp \ - macaddress_ut.cpp \ - converter_ut.cpp \ - exec_ut.cpp \ - redis_subscriber_state_ut.cpp \ - selectable_priority.cpp \ - warm_restart_ut.cpp \ - redis_multi_db_ut.cpp \ - logger_ut.cpp \ - redis_multi_ns_ut.cpp \ - fdb_flush.cpp \ - stringutility_ut.cpp \ - redisutility_ut.cpp \ - boolean_ut.cpp \ - status_code_util_test.cpp \ - saiaclschema_ut.cpp \ - countertable_ut.cpp \ - timer_ut.cpp \ - cli_ut.cpp \ - defaultvalueprovider_ut.cpp \ - events_common_ut.cpp \ - events_service_ut.cpp \ - events_ut.cpp \ - restart_waiter_ut.cpp \ - redis_table_waiter_ut.cpp \ - main.cpp +tests_tests_SOURCES = tests/redis_ut.cpp \ + tests/redis_piped_ut.cpp \ + tests/redis_state_ut.cpp \ + tests/redis_piped_state_ut.cpp \ + tests/tokenize_ut.cpp \ + tests/json_ut.cpp \ + tests/ntf_ut.cpp \ + tests/ipaddress_ut.cpp \ + tests/ipprefix_ut.cpp \ + tests/macaddress_ut.cpp \ + tests/converter_ut.cpp \ + tests/exec_ut.cpp \ + tests/redis_subscriber_state_ut.cpp \ + tests/selectable_priority.cpp \ + tests/warm_restart_ut.cpp \ + tests/redis_multi_db_ut.cpp \ + tests/logger_ut.cpp \ + tests/redis_multi_ns_ut.cpp \ + tests/fdb_flush.cpp \ + tests/stringutility_ut.cpp \ + tests/redisutility_ut.cpp \ + tests/boolean_ut.cpp \ + tests/status_code_util_test.cpp \ + tests/saiaclschema_ut.cpp \ + tests/countertable_ut.cpp \ + tests/timer_ut.cpp \ + tests/cli_ut.cpp \ + tests/defaultvalueprovider_ut.cpp \ + tests/events_common_ut.cpp \ + tests/events_service_ut.cpp \ + tests/events_ut.cpp \ + tests/restart_waiter_ut.cpp \ + tests/redis_table_waiter_ut.cpp \ + tests/main.cpp -tests_CFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_GTEST) $(LIBNL_CFLAGS) -tests_CPPFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_GTEST) $(LIBNL_CFLAGS) -tests_LDADD = $(LDADD_GTEST) -lpthread -L$(top_srcdir)/common -lswsscommon $(LIBNL_LIBS) $(CODE_COVERAGE_LIBS) -L$(top_srcdir)/sonic-db-cli -lsonicdbcli -lzmq -luuid -lboost_serialization +tests_tests_CFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_GTEST) $(LIBNL_CFLAGS) +tests_tests_CPPFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_GTEST) $(LIBNL_CFLAGS) +tests_tests_LDADD = $(LDADD_GTEST) -lpthread common/libswsscommon.la $(LIBNL_LIBS) $(CODE_COVERAGE_LIBS) sonic-db-cli/libsonicdbcli.la -lzmq -luuid -lboost_serialization From e832de16b7fd99de4c998dace43bbe72640392fb Mon Sep 17 00:00:00 2001 From: Saikrishna Arcot Date: Mon, 17 Oct 2022 23:47:10 -0700 Subject: [PATCH 2/4] Update debian packaging Update to using debhelper compat 12, remove some overrides that are no longer needed, use automatically-generated dbgsym packages, and disable the static build. Signed-off-by: Saikrishna Arcot --- Makefile.am | 2 -- debian/compat | 2 +- debian/control | 10 ++-------- debian/rules | 9 --------- 4 files changed, 3 insertions(+), 20 deletions(-) diff --git a/Makefile.am b/Makefile.am index f17afd601..3551760e2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,8 +1,6 @@ lib_LTLIBRARIES = bin_PROGRAMS = -INCLUDES = -I $(srcdir) - if DEBUG DBGFLAGS = -ggdb -DDEBUG else diff --git a/debian/compat b/debian/compat index f599e28b8..48082f72f 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -10 +12 diff --git a/debian/control b/debian/control index e7ae8d1d3..4836ac104 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: sonic Maintainer: Shuotian Cheng Section: net Priority: optional -Build-Depends: dh-exec (>=0.3), debhelper (>= 9), autotools-dev, libboost-dev | libboost1.71-dev | libboost1.74-dev +Build-Depends: dh-exec (>=0.3), debhelper (>= 12), autotools-dev, libboost-dev Standards-Version: 1.0.0 Package: libswsscommon @@ -11,15 +11,9 @@ Depends: ${shlibs:Depends}, ${misc:Pre-Depends} Section: libs Description: This package contains Switch State Service common library. -Package: libswsscommon-dbg -Architecture: any -Depends: libswsscommon (= ${binary:Version}), ${misc:Depends} -Section: debug -Description: debugging symbols for libswsscommon library. - Package: libswsscommon-dev Architecture: any -Depends: libswsscommon (= ${binary:Version}), libboost-dev | libboost1.71-dev | libboost1.74-dev +Depends: libswsscommon (= ${binary:Version}), libboost-dev Section: libdevel Description: This package contains development files for Switch State Service. diff --git a/debian/rules b/debian/rules index 7890ad2bb..371a637d0 100755 --- a/debian/rules +++ b/debian/rules @@ -16,8 +16,6 @@ include /usr/share/dpkg/default.mk # package maintainers to append LDFLAGS #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -DEBIAN_DIST_CODENAME := $(shell lsb_release -sc | sed -e 's/\#/ /g') - DOPACKAGES = $(shell dh_listpackages) # For Debian jessie, stretch, and buster, and Ubuntu bionic and focal, build @@ -37,10 +35,3 @@ endif override_dh_auto_configure: dh_auto_configure -- $(CONFIGURE_ARGS) $(DEB_CONFIGURE_EXTRA_FLAGS) # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) - -override_dh_clean: - dh_clean - rm -f pyext/swsscommon.py pyext/swsscommon_wrap.cpp - -override_dh_strip: - dh_strip -plibswsscommon --dbg-package=libswsscommon-dbg From ff8155d2cd35d6d8c865307775ba5fe92337329f Mon Sep 17 00:00:00 2001 From: Saikrishna Arcot Date: Mon, 17 Oct 2022 23:49:18 -0700 Subject: [PATCH 3/4] Always enable all hardening Make sure hardened build flags are always used. Signed-off-by: Saikrishna Arcot --- debian/rules | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/rules b/debian/rules index 371a637d0..a9c5eccbb 100755 --- a/debian/rules +++ b/debian/rules @@ -8,7 +8,7 @@ DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/default.mk # see FEATURE AREAS in dpkg-buildflags(1) -#export DEB_BUILD_MAINT_OPTIONS = hardening=+all +export DEB_BUILD_MAINT_OPTIONS = hardening=+all # see ENVIRONMENT in dpkg-buildflags(1) # package maintainers to append CFLAGS @@ -18,6 +18,8 @@ include /usr/share/dpkg/default.mk DOPACKAGES = $(shell dh_listpackages) +CONFIGURE_ARGS = --disable-static + # For Debian jessie, stretch, and buster, and Ubuntu bionic and focal, build # Python 2 bindings. This is controlled by the build profile being used. ifneq (,$(filter python-swsscommon,$(DOPACKAGES))) @@ -26,9 +28,9 @@ else CONFIGURE_ARGS += --disable-python2 endif -# main packaging script based on dh7 syntax +# main packaging script %: - dh $@ --with autoreconf + dh $@ # dh_make generated override targets # This is example for Cmake (See https://bugs.debian.org/641051 ) From 1404402b47ec6dd7bc99fd4c714c4496292576d0 Mon Sep 17 00:00:00 2001 From: Saikrishna Arcot Date: Tue, 18 Oct 2022 13:13:02 -0700 Subject: [PATCH 4/4] Re-add libboost1.71-dev as a dependency, since the Buster slave containers have that installed instead of just libboost-dev Signed-off-by: Saikrishna Arcot --- debian/control | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 4836ac104..d0640da27 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: sonic Maintainer: Shuotian Cheng Section: net Priority: optional -Build-Depends: dh-exec (>=0.3), debhelper (>= 12), autotools-dev, libboost-dev +Build-Depends: dh-exec (>=0.3), debhelper (>= 12), autotools-dev, libboost-dev | libboost1.71-dev Standards-Version: 1.0.0 Package: libswsscommon @@ -13,7 +13,7 @@ Description: This package contains Switch State Service common library. Package: libswsscommon-dev Architecture: any -Depends: libswsscommon (= ${binary:Version}), libboost-dev +Depends: libswsscommon (= ${binary:Version}), libboost-dev | libboost1.71-dev Section: libdevel Description: This package contains development files for Switch State Service.