From e28b48b842d7a0223bffe9351f6f7d319549c1b8 Mon Sep 17 00:00:00 2001 From: Ze Gan Date: Thu, 21 Dec 2023 09:25:23 +0800 Subject: [PATCH] [202311][submodule]: Update submodule sonic-swss/sonic-dash-api/protobuf (#17521) * [submodule]: Update submodule sonic-swss/sonic-dash-api/protobuf (#17413) 1. Protobuf 3.21 has been released in the Debian bookworm 2. Update submodule sonic-swss and sonic-dash-api because they include related updates. - Microsoft ADO **(number only)**: 1. In the protobuf.mk, If it isn't bullseye, ignore to compile the protobuf package 2. Move sonic-swss commits: ``` fd852084 (HEAD, origin/master, origin/HEAD) [dashrouteorch]: Rename dash route namespace (#2966) ``` 3. Move sonic-dash-api and move build chain to its submodule ``` d4448c7 (HEAD, origin/master, origin/HEAD, master) [azp]: Add multi-platform artifacts (#11) 8a5e5cc [debian]: Add debian package (#10) d96163a [misc]: Add dash utils and its tests (#9) ``` Signed-off-by: Ze Gan --- .gitmodules | 4 +-- rules/protobuf.mk | 51 +++++++++++++++------------- rules/sonic-dash-api.mk | 6 ++-- src/sonic-dash-api | 1 + src/sonic-dash-api/.gitignore | 2 -- src/sonic-dash-api/Makefile | 47 ------------------------- src/sonic-dash-api/debian/changelog | 6 ---- src/sonic-dash-api/debian/compat | 1 - src/sonic-dash-api/debian/control | 13 ------- src/sonic-dash-api/debian/rules | 8 ----- src/sonic-dash-api/pypkg/__init__.py | 5 --- src/sonic-dash-api/sonic-dash-api | 1 - src/sonic-swss | 2 +- 13 files changed, 36 insertions(+), 111 deletions(-) create mode 160000 src/sonic-dash-api delete mode 100644 src/sonic-dash-api/.gitignore delete mode 100644 src/sonic-dash-api/Makefile delete mode 100644 src/sonic-dash-api/debian/changelog delete mode 100644 src/sonic-dash-api/debian/compat delete mode 100644 src/sonic-dash-api/debian/control delete mode 100755 src/sonic-dash-api/debian/rules delete mode 100644 src/sonic-dash-api/pypkg/__init__.py delete mode 160000 src/sonic-dash-api/sonic-dash-api diff --git a/.gitmodules b/.gitmodules index fa60b665d48d..26bfb47d2801 100644 --- a/.gitmodules +++ b/.gitmodules @@ -120,8 +120,8 @@ [submodule "src/dhcpmon"] path = src/dhcpmon url = https://github.com/sonic-net/sonic-dhcpmon.git -[submodule "src/sonic-dash-api/sonic-dash-api"] - path = src/sonic-dash-api/sonic-dash-api +[submodule "src/sonic-dash-api"] + path = src/sonic-dash-api url = https://github.com/sonic-net/sonic-dash-api.git [submodule "platform/marvell-arm64/mrvl-prestera"] path = platform/marvell-arm64/mrvl-prestera diff --git a/rules/protobuf.mk b/rules/protobuf.mk index 5e50eac86292..866eb6b99f3e 100644 --- a/rules/protobuf.mk +++ b/rules/protobuf.mk @@ -1,32 +1,37 @@ # protobuf package +# Protobuf 3.21.12 has been released in bookworm, So we only need to build it +# in the bullseye environment. +ifeq ($(BLDENV),bullseye) -PROTOBUF_VERSION = 3.21.12 -PROTOBUF_VERSION_FULL = $(PROTOBUF_VERSION)-3 + PROTOBUF_VERSION = 3.21.12 + PROTOBUF_VERSION_FULL = $(PROTOBUF_VERSION)-3 -export PROTOBUF_VERSION -export PROTOBUF_VERSION_FULL + export PROTOBUF_VERSION + export PROTOBUF_VERSION_FULL -PROTOBUF = libprotobuf32_$(PROTOBUF_VERSION_FULL)_$(CONFIGURED_ARCH).deb -$(PROTOBUF)_SRC_PATH = $(SRC_PATH)/protobuf -SONIC_MAKE_DEBS += $(PROTOBUF) + PROTOBUF = libprotobuf32_$(PROTOBUF_VERSION_FULL)_$(CONFIGURED_ARCH).deb + $(PROTOBUF)_SRC_PATH = $(SRC_PATH)/protobuf + SONIC_MAKE_DEBS += $(PROTOBUF) -PROTOBUF_DEV = libprotobuf-dev_$(PROTOBUF_VERSION_FULL)_$(CONFIGURED_ARCH).deb -$(PROTOBUF_DEV)_DEPENDS = $(PROTOBUF) $(PROTOBUF_LITE) -$(eval $(call add_derived_package,$(PROTOBUF),$(PROTOBUF_DEV))) + PROTOBUF_DEV = libprotobuf-dev_$(PROTOBUF_VERSION_FULL)_$(CONFIGURED_ARCH).deb + $(PROTOBUF_DEV)_DEPENDS = $(PROTOBUF) $(PROTOBUF_LITE) + $(eval $(call add_derived_package,$(PROTOBUF),$(PROTOBUF_DEV))) -PROTOBUF_LITE = libprotobuf-lite32_$(PROTOBUF_VERSION_FULL)_$(CONFIGURED_ARCH).deb -$(eval $(call add_derived_package,$(PROTOBUF),$(PROTOBUF_LITE))) + PROTOBUF_LITE = libprotobuf-lite32_$(PROTOBUF_VERSION_FULL)_$(CONFIGURED_ARCH).deb + $(eval $(call add_derived_package,$(PROTOBUF),$(PROTOBUF_LITE))) -PROTOC32 = libprotoc32_$(PROTOBUF_VERSION_FULL)_$(CONFIGURED_ARCH).deb -$(PROTOC32)_RDEPENDS = $(PROTOBUF) $(PROTOBUF_LITE) -$(eval $(call add_derived_package,$(PROTOBUF),$(PROTOC32))) + PROTOC32 = libprotoc32_$(PROTOBUF_VERSION_FULL)_$(CONFIGURED_ARCH).deb + $(PROTOC32)_RDEPENDS = $(PROTOBUF) $(PROTOBUF_LITE) + $(eval $(call add_derived_package,$(PROTOBUF),$(PROTOC32))) -PROTOBUF_COMPILER = protobuf-compiler_$(PROTOBUF_VERSION_FULL)_$(CONFIGURED_ARCH).deb -$(PROTOBUF_COMPILER)_DEPENDS = $(PROTOC32) -$(PROTOBUF_COMPILER)_RDEPENDS = $(PROTOC32) -$(eval $(call add_derived_package,$(PROTOBUF),$(PROTOBUF_COMPILER))) + PROTOBUF_COMPILER = protobuf-compiler_$(PROTOBUF_VERSION_FULL)_$(CONFIGURED_ARCH).deb + $(PROTOBUF_COMPILER)_DEPENDS = $(PROTOC32) + $(PROTOBUF_COMPILER)_RDEPENDS = $(PROTOC32) + $(eval $(call add_derived_package,$(PROTOBUF),$(PROTOBUF_COMPILER))) -PYTHON3_PROTOBUF = python3-protobuf_$(PROTOBUF_VERSION_FULL)_$(CONFIGURED_ARCH).deb -$(PYTHON3_PROTOBUF)_DEPENDS = $(PROTOBUF_DEV) $(PROTOBUF) -$(PYTHON3_PROTOBUF)_RDEPENDS = $(PROTOBUF) -$(eval $(call add_derived_package,$(PROTOBUF),$(PYTHON3_PROTOBUF))) + PYTHON3_PROTOBUF = python3-protobuf_$(PROTOBUF_VERSION_FULL)_$(CONFIGURED_ARCH).deb + $(PYTHON3_PROTOBUF)_DEPENDS = $(PROTOBUF_DEV) $(PROTOBUF) + $(PYTHON3_PROTOBUF)_RDEPENDS = $(PROTOBUF) + $(eval $(call add_derived_package,$(PROTOBUF),$(PYTHON3_PROTOBUF))) + +endif diff --git a/rules/sonic-dash-api.mk b/rules/sonic-dash-api.mk index e6d9e34c0395..742b2c3f9c6d 100644 --- a/rules/sonic-dash-api.mk +++ b/rules/sonic-dash-api.mk @@ -5,8 +5,10 @@ LIB_SONIC_DASH_API_VERSION = 1.0.0 LIB_SONIC_DASH_API = libdashapi_$(LIB_SONIC_DASH_API_VERSION)_$(CONFIGURED_ARCH).deb $(LIB_SONIC_DASH_API)_SRC_PATH = $(SRC_PATH)/sonic-dash-api -$(LIB_SONIC_DASH_API)_DEPENDS += $(PROTOBUF) $(PROTOBUF_LITE) $(PROTOBUF_DEV) $(PROTOBUF_COMPILER) -$(LIB_SONIC_DASH_API)_RDEPENDS += $(PROTOBUF) $(PROTOBUF_LITE) $(PYTHON3_PROTOBUF) +ifeq ($(BLDENV),bullseye) + $(LIB_SONIC_DASH_API)_DEPENDS += $(PROTOBUF) $(PROTOBUF_LITE) $(PROTOBUF_DEV) $(PROTOBUF_COMPILER) + $(LIB_SONIC_DASH_API)_RDEPENDS += $(PROTOBUF) $(PROTOBUF_LITE) $(PYTHON3_PROTOBUF) +endif SONIC_DPKG_DEBS += $(LIB_SONIC_DASH_API) diff --git a/src/sonic-dash-api b/src/sonic-dash-api new file mode 160000 index 000000000000..910814ffb4fd --- /dev/null +++ b/src/sonic-dash-api @@ -0,0 +1 @@ +Subproject commit 910814ffb4fd2e44e183d8d92086a724c62f5f1d diff --git a/src/sonic-dash-api/.gitignore b/src/sonic-dash-api/.gitignore deleted file mode 100644 index ff64e429bd09..000000000000 --- a/src/sonic-dash-api/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -build -debian/sonic-dash-api diff --git a/src/sonic-dash-api/Makefile b/src/sonic-dash-api/Makefile deleted file mode 100644 index 0031800cced7..000000000000 --- a/src/sonic-dash-api/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -.ONESHELL: -SHELL = /bin/bash -.SHELLFLAGS += -e - -RM := rm -rf -CP := cp -rf -MKDIR := mkdir -MV := mv -LIBDASHAPI := libdashapi.so -BUILD_DIR := build -PYPKG_DIR := pypkg -DESTDIR := -DASH_API_PROTO_DIR := sonic-dash-api/proto -INSTALLED_HEADER_DIR := $(DESTDIR)/usr/include/dash_api -INSTALLED_LIB_DIR := $(DESTDIR)/usr/lib -INSTALLED_PYTHON_DIR := $(DESTDIR)/usr/lib/python3/dist-packages/dash_api - -all: compile_cpp_proto dashapi.so compile_py_proto - -compile_cpp_proto: - $(MKDIR) -p $(BUILD_DIR) - protoc -I=$(DASH_API_PROTO_DIR) --cpp_out=$(BUILD_DIR) $(DASH_API_PROTO_DIR)/*.proto - -dashapi.so: compile_cpp_proto - g++ -std=c++14 -fPIC -shared -o $(BUILD_DIR)/$(LIBDASHAPI) $(wildcard $(BUILD_DIR)/*.pb.cc) -lprotobuf - -compile_py_proto: - protoc -I=$(DASH_API_PROTO_DIR) --python_out=$(PYPKG_DIR) $(DASH_API_PROTO_DIR)/*.proto - -clean: - $(RM) $(BUILD_DIR) - $(RM) $(PYPKG_DIR)/*_pb2.py - -install: - $(MKDIR) -p $(INSTALLED_HEADER_DIR) - $(CP) $(BUILD_DIR)/*.pb.h $(INSTALLED_HEADER_DIR) - $(MKDIR) -p $(INSTALLED_LIB_DIR) - $(CP) $(BUILD_DIR)/$(LIBDASHAPI) $(INSTALLED_LIB_DIR) - $(MKDIR) -p $(INSTALLED_PYTHON_DIR) - $(CP) $(PYPKG_DIR)/* $(INSTALLED_PYTHON_DIR) - -uninstall: - $(RM) $(INSTALLED_HEADER_DIR) - $(RM) $(INSTALLED_LIB_DIR)/$(LIBDASHAPI) - $(RM) $(INSTALLED_PYTHON_DIR) - -.PHONY: uninstall clean diff --git a/src/sonic-dash-api/debian/changelog b/src/sonic-dash-api/debian/changelog deleted file mode 100644 index e5cb52398c4c..000000000000 --- a/src/sonic-dash-api/debian/changelog +++ /dev/null @@ -1,6 +0,0 @@ -sonic (1.0.0) stable; urgency=medium - - * Initial release. - - -- Ze Gan Wed, 14 Jun 2023 12:00:00 -0800 - diff --git a/src/sonic-dash-api/debian/compat b/src/sonic-dash-api/debian/compat deleted file mode 100644 index 9d607966b721..000000000000 --- a/src/sonic-dash-api/debian/compat +++ /dev/null @@ -1 +0,0 @@ -11 \ No newline at end of file diff --git a/src/sonic-dash-api/debian/control b/src/sonic-dash-api/debian/control deleted file mode 100644 index 545204fbe7da..000000000000 --- a/src/sonic-dash-api/debian/control +++ /dev/null @@ -1,13 +0,0 @@ -Source: sonic -Maintainer: Ze Gan -Section: net -Priority: optional -Build-Depends: dh-exec (>=0.3), debhelper (>= 12), autotools-dev, -Standards-Version: 1.0.0 - -Package: libdashapi -Architecture: any -Build-Depends: protobuf-compiler (>=3.21.12), libprotobuf-dev (>=3.21.12) -Depends: libprotobuf32 (>=3.21.12), libprotobuf-lite32 (>=3.21.12) -Section: libs -Description: DASH API definition for the SONiC project. diff --git a/src/sonic-dash-api/debian/rules b/src/sonic-dash-api/debian/rules deleted file mode 100755 index e661a7acd0bf..000000000000 --- a/src/sonic-dash-api/debian/rules +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/make -f -#export DH_VERBOSE = 1 - -%: - dh $@ - -override_dh_auto_build: - make all diff --git a/src/sonic-dash-api/pypkg/__init__.py b/src/sonic-dash-api/pypkg/__init__.py deleted file mode 100644 index ade95c521abf..000000000000 --- a/src/sonic-dash-api/pypkg/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -import sys -import os - - -sys.path.insert(0, os.path.abspath(os.path.dirname(__file__))) diff --git a/src/sonic-dash-api/sonic-dash-api b/src/sonic-dash-api/sonic-dash-api deleted file mode 160000 index 3f728d1bbf65..000000000000 --- a/src/sonic-dash-api/sonic-dash-api +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3f728d1bbf65d2e8c41bdc023d5c07702a7f848b diff --git a/src/sonic-swss b/src/sonic-swss index d839eec3c02a..7e691347274e 160000 --- a/src/sonic-swss +++ b/src/sonic-swss @@ -1 +1 @@ -Subproject commit d839eec3c02a5911645dbfc93aa5bb474bbff38f +Subproject commit 7e691347274ebc17e1c6655396db6826a72d4fc3