Skip to content
Open
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
31 changes: 28 additions & 3 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,25 @@ Standards-Version: 1.0.0

Package: syncd
Architecture: any
Build-Profiles: <syncd !vs>
Build-Profiles: <syncd !vs !asan>
Depends: ${misc:Pre-Depends}
Recommends: ${shlibs:Depends}
Conflicts: syncd-rpc, syncd-vs
Conflicts: syncd-rpc, syncd-vs, syncd-asan
Description: This package contains sync daemon for SONiC project.
This sync daemon syncs the ASIC_DB in Redis database and the real ASIC via SAI.

Package: syncd-asan
Architecture: any
Build-Profiles: <syncd asan !vs !rpc>
Depends: ${misc:Pre-Depends}
Comment on lines +17 to +20
Recommends: ${shlibs:Depends}
Conflicts: syncd, syncd-rpc, syncd-vs
Description: This package contains ASAN-instrumented sync daemon for SONiC project.
This sync daemon syncs the ASIC_DB in Redis database and the real ASIC via SAI.

Package: syncd-rpc
Architecture: any
Build-Profiles: <syncd rpc !vs>
Build-Profiles: <syncd rpc !vs !asan>
Depends: ${misc:Pre-Depends}
Recommends: ${shlibs:Depends}
Conflicts: syncd, syncd-vs
Expand All @@ -33,6 +42,22 @@ Conflicts: syncd-rpc, syncd
Description: This package contains sync daemon for SONiC project linked with virtual switch.
This sync daemon syncs the ASIC_DB in Redis database and the real ASIC via SAI.

Package: syncd-dbgsym
Architecture: any
Build-Profiles: <syncd !vs !asan>
Section: debug
Priority: extra
Depends: syncd (= ${binary:Version})
Comment on lines +48 to +50
Description: debugging symbols for syncd

Package: syncd-asan-dbgsym
Architecture: any
Build-Profiles: <syncd asan !vs !rpc>
Section: debug
Priority: extra
Depends: syncd-asan (= ${binary:Version})
Description: debugging symbols for syncd-asan

Package: libsairedis
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Pre-Depends}
Expand Down
32 changes: 31 additions & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ ifneq ($(filter rpc,$(DEB_BUILD_PROFILES)),)
make install DESTDIR=$(shell pwd)/debian/tmp
dh_install -N syncd
else
dh_install
ifneq ($(filter asan,$(DEB_BUILD_PROFILES)),)
dh_install -N syncd
else
dh_install -N syncd-asan
endif
endif
ifneq ($(filter rpc,$(DEB_BUILD_PROFILES)),)
sed -i 's|ENABLE_SAITHRIFT=0|ENABLE_SAITHRIFT=1 # Add a comment to fix https://github.com/Azure/sonic-buildimage/issues/2694 |' debian/syncd-rpc/usr/bin/syncd_init_common.sh
Expand All @@ -78,3 +82,29 @@ override_dh_installinit:

override_dh_shlibdeps:
$(LD_LIBRARY_PATH_CONFIG) dh_shlibdeps -- --ignore-missing-info -xlibsai

SYNCD_STRIP_PKG =
SYNCD_DBG_PKG =

ifneq ($(filter syncd,$(DEB_BUILD_PROFILES)),)
ifeq ($(filter vs,$(DEB_BUILD_PROFILES)),)
ifneq ($(filter rpc,$(DEB_BUILD_PROFILES)),)
SYNCD_STRIP_PKG = syncd-rpc
SYNCD_DBG_PKG = syncd-rpc-dbgsym
else ifneq ($(filter asan,$(DEB_BUILD_PROFILES)),)
SYNCD_STRIP_PKG = syncd
SYNCD_DBG_PKG = syncd-asan-dbgsym
else
SYNCD_STRIP_PKG = syncd-asan
SYNCD_DBG_PKG = syncd-dbgsym
endif
endif
endif

override_dh_strip:
ifneq ($(SYNCD_STRIP_PKG),)
dh_strip -p$(SYNCD_STRIP_PKG) --dbg-package=$(SYNCD_DBG_PKG)
dh_strip --remaining-packages
else
dh_strip
endif
8 changes: 8 additions & 0 deletions debian/syncd-asan.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
usr/bin/saidump
usr/bin/saiplayer
usr/bin/saisdkdump
usr/bin/saidiscovery
usr/bin/saiasiccmp
usr/bin/syncd*
syncd/scripts/* usr/bin
usr/lib/*/libMdioIpcClient.so.*
Loading