[submodule]: Update submodule sonic-swss/sonic-dash-api/protobuf (#17413)
### Why I did it 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. ##### Work item tracking - Microsoft ADO **(number only)**: #### How I did it 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) ``` #### How to verify it Check Azp
This commit is contained in:
parent
164916681a
commit
7d4f348c09
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -112,8 +112,8 @@
|
|||||||
[submodule "src/dhcpmon"]
|
[submodule "src/dhcpmon"]
|
||||||
path = src/dhcpmon
|
path = src/dhcpmon
|
||||||
url = https://github.com/sonic-net/sonic-dhcpmon.git
|
url = https://github.com/sonic-net/sonic-dhcpmon.git
|
||||||
[submodule "src/sonic-dash-api/sonic-dash-api"]
|
[submodule "src/sonic-dash-api"]
|
||||||
path = src/sonic-dash-api/sonic-dash-api
|
path = src/sonic-dash-api
|
||||||
url = https://github.com/sonic-net/sonic-dash-api.git
|
url = https://github.com/sonic-net/sonic-dash-api.git
|
||||||
[submodule "platform/marvell-arm64/mrvl-prestera"]
|
[submodule "platform/marvell-arm64/mrvl-prestera"]
|
||||||
path = platform/marvell-arm64/mrvl-prestera
|
path = platform/marvell-arm64/mrvl-prestera
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
# protobuf package
|
# 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 = 3.21.12
|
||||||
PROTOBUF_VERSION_FULL = $(PROTOBUF_VERSION)-3
|
PROTOBUF_VERSION_FULL = $(PROTOBUF_VERSION)-3
|
||||||
@ -30,3 +33,5 @@ PYTHON3_PROTOBUF = python3-protobuf_$(PROTOBUF_VERSION_FULL)_$(CONFIGURED_ARCH).
|
|||||||
$(PYTHON3_PROTOBUF)_DEPENDS = $(PROTOBUF_DEV) $(PROTOBUF)
|
$(PYTHON3_PROTOBUF)_DEPENDS = $(PROTOBUF_DEV) $(PROTOBUF)
|
||||||
$(PYTHON3_PROTOBUF)_RDEPENDS = $(PROTOBUF)
|
$(PYTHON3_PROTOBUF)_RDEPENDS = $(PROTOBUF)
|
||||||
$(eval $(call add_derived_package,$(PROTOBUF),$(PYTHON3_PROTOBUF)))
|
$(eval $(call add_derived_package,$(PROTOBUF),$(PYTHON3_PROTOBUF)))
|
||||||
|
|
||||||
|
endif
|
||||||
|
@ -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 = libdashapi_$(LIB_SONIC_DASH_API_VERSION)_$(CONFIGURED_ARCH).deb
|
||||||
$(LIB_SONIC_DASH_API)_SRC_PATH = $(SRC_PATH)/sonic-dash-api
|
$(LIB_SONIC_DASH_API)_SRC_PATH = $(SRC_PATH)/sonic-dash-api
|
||||||
|
|
||||||
|
ifeq ($(BLDENV),bullseye)
|
||||||
$(LIB_SONIC_DASH_API)_DEPENDS += $(PROTOBUF) $(PROTOBUF_LITE) $(PROTOBUF_DEV) $(PROTOBUF_COMPILER)
|
$(LIB_SONIC_DASH_API)_DEPENDS += $(PROTOBUF) $(PROTOBUF_LITE) $(PROTOBUF_DEV) $(PROTOBUF_COMPILER)
|
||||||
$(LIB_SONIC_DASH_API)_RDEPENDS += $(PROTOBUF) $(PROTOBUF_LITE) $(PYTHON3_PROTOBUF)
|
$(LIB_SONIC_DASH_API)_RDEPENDS += $(PROTOBUF) $(PROTOBUF_LITE) $(PYTHON3_PROTOBUF)
|
||||||
|
endif
|
||||||
|
|
||||||
SONIC_DPKG_DEBS += $(LIB_SONIC_DASH_API)
|
SONIC_DPKG_DEBS += $(LIB_SONIC_DASH_API)
|
||||||
|
|
||||||
|
@ -417,11 +417,8 @@ RUN apt-get update && apt-get install -y \
|
|||||||
libauparse-dev \
|
libauparse-dev \
|
||||||
auditd \
|
auditd \
|
||||||
# For protobuf
|
# For protobuf
|
||||||
dh-elpa \
|
protobuf-compiler \
|
||||||
xmlto \
|
libprotobuf-dev
|
||||||
rake-compiler \
|
|
||||||
default-jdk \
|
|
||||||
libgoogle-gson-java
|
|
||||||
|
|
||||||
{%- if CROSS_BUILD_ENVIRON == "y" %}
|
{%- if CROSS_BUILD_ENVIRON == "y" %}
|
||||||
# Arm vs. amd64 versions conflict - remove amd64 packages
|
# Arm vs. amd64 versions conflict - remove amd64 packages
|
||||||
|
1
src/sonic-dash-api
Submodule
1
src/sonic-dash-api
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit d4448c78b4e0afd1ec6dfaa390aef5c650cee4b3
|
2
src/sonic-dash-api/.gitignore
vendored
2
src/sonic-dash-api/.gitignore
vendored
@ -1,2 +0,0 @@
|
|||||||
build
|
|
||||||
debian/sonic-dash-api
|
|
@ -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
|
|
@ -1,6 +0,0 @@
|
|||||||
sonic (1.0.0) stable; urgency=medium
|
|
||||||
|
|
||||||
* Initial release.
|
|
||||||
|
|
||||||
-- Ze Gan <zegan@microsoft.com> Wed, 14 Jun 2023 12:00:00 -0800
|
|
||||||
|
|
@ -1 +0,0 @@
|
|||||||
11
|
|
@ -1,13 +0,0 @@
|
|||||||
Source: sonic
|
|
||||||
Maintainer: Ze Gan <zegan@microsoft.com>
|
|
||||||
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.
|
|
@ -1,8 +0,0 @@
|
|||||||
#!/usr/bin/make -f
|
|
||||||
#export DH_VERBOSE = 1
|
|
||||||
|
|
||||||
%:
|
|
||||||
dh $@
|
|
||||||
|
|
||||||
override_dh_auto_build:
|
|
||||||
make all
|
|
@ -1,5 +0,0 @@
|
|||||||
import sys
|
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
|
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 3f728d1bbf65d2e8c41bdc023d5c07702a7f848b
|
|
@ -1 +1 @@
|
|||||||
Subproject commit d839eec3c02a5911645dbfc93aa5bb474bbff38f
|
Subproject commit fd852084d49f54bb15fa414eff4b2eab546ed64a
|
Loading…
Reference in New Issue
Block a user