Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libyang: upgrade to v3 step 6 -- cleanup libyang1 references #21790

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
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
7 changes: 3 additions & 4 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,9 @@

# yang
/src/sonic-yang-models/ @praveen-li @dgsudharsan @rathnasabapathyv @venkatmahalingam @qiluo-msft
/src/sonic-yang-mgmt/ @sonet-net/sonic-management
/src/libyang/ @sonic-net/sonic-management
/src/libyang1/ @sonic-net/sonic-management
/src/libyang2/ @sonic-net/sonic-management
/src/sonic-yang-mgmt/ @sonic-net/sonic-management
/src/libyang3/ @sonic-net/sonic-management
/src/libyang3-py3/ @sonic-net/sonic-management

# bgpcfgd
/src/sonic-bgpcfgd/ @StormLiangMS
Expand Down
6 changes: 5 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,8 @@
url = https://github.com/Marvell-switching/sonic-platform-marvell.git
[submodule "platform/vpp"]
path = platform/vpp
url = https://github.com/sonic-net/sonic-platform-vpp.git
url = https://github.com/sonic-net/sonic-platform-vpp.git
[submodule "src/libyang3-py3"]
path = src/libyang3-py3
url = https://github.com/CESNET/libyang-python.git
tag = v3.0.3
3 changes: 2 additions & 1 deletion dockers/docker-config-engine-bookworm/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ RUN apt-get update && \
apt-utils \
build-essential \
python3-dev \
python3-yaml
python3-yaml \
python3-cffi

{%- if CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" %}
RUN apt-get install -y \
Expand Down
3 changes: 2 additions & 1 deletion dockers/docker-config-engine-bullseye/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ RUN apt-get update && \
apt-get install -y \
apt-utils \
build-essential \
python3-dev
python3-dev \
python3-cffi

{%- if CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" %}
RUN apt-get install -y \
Expand Down
3 changes: 2 additions & 1 deletion dockers/docker-config-engine-buster/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ RUN apt-get update && \
apt-get install -y \
apt-utils \
build-essential \
python3-dev
python3-dev \
python3-cffi

{%- if CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" %}
RUN apt-get install -y \
Expand Down
2 changes: 1 addition & 1 deletion dockers/docker-config-engine/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update

# Dependencies for sonic-cfggen
RUN apt-get install -y build-essential python-dev
RUN apt-get install -y build-essential python-dev python3-cffi

# Install python-redis
RUN pip install redis>=3.5.3
Expand Down
2 changes: 1 addition & 1 deletion files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ if [[ $CONFIGURED_ARCH == armhf || $CONFIGURED_ARCH == arm64 ]]; then
fi

# Install sonic-yang-models Python 3 package, install dependencies
sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/libyang_*.deb $debs_path/libyang-cpp_*.deb $debs_path/python3-yang_*.deb || \
sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/libyang3_*.deb $debs_path/python3-libyang_*.deb || \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f
SONIC_YANG_MODEL_PY3_WHEEL_NAME=$(basename {{sonic_yang_models_py3_wheel_path}})
sudo cp {{sonic_yang_models_py3_wheel_path}} $FILESYSTEM_ROOT/$SONIC_YANG_MODEL_PY3_WHEEL_NAME
Expand Down
5 changes: 2 additions & 3 deletions platform/vs/docker-sonic-vs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ $(DOCKER_SONIC_VS)_DEPENDS += $(SYNCD_VS) \
$(LIBTEAMDCTL) \
$(LIBTEAM_UTILS) \
$(SONIC_DEVICE_DATA) \
$(LIBYANG) \
$(LIBYANG_CPP) \
$(LIBYANG_PY3) \
$(LIBYANG3) \
$(LIBYANG3_PY3) \
$(SONIC_UTILITIES_DATA) \
$(SONIC_HOST_SERVICES_DATA)

Expand Down
4 changes: 2 additions & 2 deletions rules/docker-bmp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $(DOCKER_BMP)_PYTHON_WHEELS = $(SONIC_BMPCFGD)
$(DOCKER_BMP)_INSTALL_DEBS = $(LIBSWSSCOMMON) \
$(SONIC_BMPD) \
$(PYTHON3_SWSSCOMMON) \
$(LIBYANG_PY3)
$(LIBYANG3_PY3)

$(DOCKER_BMP)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BOOKWORM)_DBG_DEPENDS)

Expand Down Expand Up @@ -43,4 +43,4 @@ $(DOCKER_BMP)_RUN_OPT += -v /etc/localtime:/etc/localtime:ro
$(DOCKER_BMP)_RUN_OPT += -v /var/run/dbus:/var/run/dbus:rw

$(DOCKER_BMP)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
$(DOCKER_BMP)_BASE_IMAGE_FILES += monit_bmp:/etc/monit/conf.d
$(DOCKER_BMP)_BASE_IMAGE_FILES += monit_bmp:/etc/monit/conf.d
5 changes: 2 additions & 3 deletions rules/docker-config-engine-bookworm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ DOCKER_CONFIG_ENGINE_BOOKWORM = docker-config-engine-bookworm.gz
$(DOCKER_CONFIG_ENGINE_BOOKWORM)_PATH = $(DOCKERS_PATH)/docker-config-engine-bookworm

$(DOCKER_CONFIG_ENGINE_BOOKWORM)_DEPENDS += $(LIBSWSSCOMMON) \
$(LIBYANG) \
$(LIBYANG_CPP) \
$(LIBYANG_PY3) \
$(LIBYANG3) \
$(LIBYANG3_PY3) \
$(PYTHON3_SWSSCOMMON) \
$(SONIC_DB_CLI) \
$(SONIC_EVENTD)
Expand Down
5 changes: 2 additions & 3 deletions rules/docker-config-engine-bullseye.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ DOCKER_CONFIG_ENGINE_BULLSEYE = docker-config-engine-bullseye.gz
$(DOCKER_CONFIG_ENGINE_BULLSEYE)_PATH = $(DOCKERS_PATH)/docker-config-engine-bullseye

$(DOCKER_CONFIG_ENGINE_BULLSEYE)_DEPENDS += $(LIBSWSSCOMMON) \
$(LIBYANG) \
$(LIBYANG_CPP) \
$(LIBYANG_PY3) \
$(LIBYANG3) \
$(LIBYANG3_PY3) \
$(PYTHON3_SWSSCOMMON) \
$(SONIC_DB_CLI) \
$(SONIC_EVENTD)
Expand Down
5 changes: 2 additions & 3 deletions rules/docker-config-engine-buster.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ DOCKER_CONFIG_ENGINE_BUSTER = docker-config-engine-buster.gz
$(DOCKER_CONFIG_ENGINE_BUSTER)_PATH = $(DOCKERS_PATH)/docker-config-engine-buster

$(DOCKER_CONFIG_ENGINE_BUSTER)_DEPENDS += $(LIBSWSSCOMMON) \
$(LIBYANG) \
$(LIBYANG_CPP) \
$(LIBYANG_PY3) \
$(LIBYANG3) \
$(LIBYANG3_PY3) \
$(PYTHON3_SWSSCOMMON) \
$(SONIC_DB_CLI)
$(DOCKER_CONFIG_ENGINE_BUSTER)_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY3) \
Expand Down
4 changes: 2 additions & 2 deletions rules/docker-fpm-frr.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ DOCKER_FPM_FRR_DBG = $(DOCKER_FPM_FRR_STEM)-$(DBG_IMAGE_MARK).gz
$(DOCKER_FPM_FRR)_PATH = $(DOCKERS_PATH)/$(DOCKER_FPM_FRR_STEM)
$(DOCKER_FPM_FRR)_PYTHON_WHEELS += $(SONIC_BGPCFGD) $(SONIC_FRR_MGMT_FRAMEWORK)

$(DOCKER_FPM_FRR)_DEPENDS += $(FRR) $(FRR_SNMP) $(SWSS) $(LIBYANG2)
$(DOCKER_FPM_FRR)_DEPENDS += $(FRR) $(FRR_SNMP) $(SWSS) $(LIBYANG3)
$(DOCKER_FPM_FRR)_DBG_DEPENDS = $($(DOCKER_SWSS_LAYER_BOOKWORM)_DBG_DEPENDS)
$(DOCKER_FPM_FRR)_DBG_DEPENDS += $(SWSS_DBG) $(LIBSWSSCOMMON_DBG) \
$(FRR_DBG) $(FRR_SNMP_DBG) $(LIBYANG2_DBG)
$(FRR_DBG) $(FRR_SNMP_DBG) $(LIBYANG3_DBG)

$(DOCKER_FPM_FRR)_DBG_IMAGE_PACKAGES = $($(DOCKER_SWSS_LAYER_BOOKWORM)_DBG_IMAGE_PACKAGES)

Expand Down
2 changes: 1 addition & 1 deletion rules/docker-macsec.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $(DOCKER_MACSEC)_DBG_IMAGE_PACKAGES = $($(DOCKER_SWSS_LAYER_BOOKWORM)_DBG_IMAGE_
$(DOCKER_MACSEC)_LOAD_DOCKERS += $(DOCKER_SWSS_LAYER_BOOKWORM)

$(DOCKER_MACSEC)_INSTALL_PYTHON_WHEELS = $(SONIC_UTILITIES_PY3)
$(DOCKER_MACSEC)_INSTALL_DEBS = $(PYTHON3_SWSSCOMMON) $(LIBYANG_PY3)
$(DOCKER_MACSEC)_INSTALL_DEBS = $(PYTHON3_SWSSCOMMON) $(LIBYANG3_PY3)

SONIC_DOCKER_IMAGES += $(DOCKER_MACSEC)
SONIC_BOOKWORM_DOCKERS += $(DOCKER_MACSEC)
Expand Down
5 changes: 2 additions & 3 deletions rules/frr.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ export FRR_VERSION FRR_SUBVERSION FRR_BRANCH FRR_TAG


FRR = frr_$(FRR_VERSION)-sonic-$(FRR_SUBVERSION)_$(CONFIGURED_ARCH).deb
$(FRR)_DEPENDS += $(LIBSNMP_DEV) $(LIBYANG2) $(LIBYANG2_DEV)
$(FRR)_RDEPENDS += $(LIBYANG2)
$(FRR)_UNINSTALLS = $(LIBYANG2_DEV) $(LIBYANG2)
$(FRR)_DEPENDS += $(LIBSNMP_DEV) $(LIBYANG3) $(LIBYANG3_DEV)
$(FRR)_RDEPENDS += $(LIBYANG3)
$(FRR)_SRC_PATH = $(SRC_PATH)/sonic-frr
SONIC_MAKE_DEBS += $(FRR)

Expand Down
10 changes: 0 additions & 10 deletions rules/libyang.dep

This file was deleted.

35 changes: 0 additions & 35 deletions rules/libyang.mk

This file was deleted.

10 changes: 0 additions & 10 deletions rules/libyang1.dep

This file was deleted.

43 changes: 0 additions & 43 deletions rules/libyang1.mk

This file was deleted.

10 changes: 0 additions & 10 deletions rules/libyang2.dep

This file was deleted.

31 changes: 0 additions & 31 deletions rules/libyang2.mk

This file was deleted.

12 changes: 12 additions & 0 deletions rules/libyang3-py3.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

SPATH := $($(LIBYANG3_PY3)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/libyang3-py3.mk rules/libyang3-py3.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
SMDEP_FILES := $(addprefix $(SPATH)/,$(shell cd $(SPATH) && find . -type f -exec sh -c 'git ls-files --error-unmatch "$0" >/dev/null 2>&1' {} \; -printf '%P\n'))
SMDEP_FILES += $(addprefix $(SPATH).patch/,$(shell cd $(SPATH).patch && find . -type f -exec sh -c 'git ls-files --error-unmatch "$0" >/dev/null 2>&1' {} \; -printf '%P\n'))

$(LIBYANG3_PY3)_CACHE_MODE := GIT_CONTENT_SHA
$(LIBYANG3_PY3)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(LIBYANG3_PY3)_DEP_FILES := $(DEP_FILES)
$(LIBYANG3_PY3)_SMDEP_FILES := $(SMDEP_FILES)
$(LIBYANG3_PY3)_SMDEP_PATHS := $(SPATH)
18 changes: 18 additions & 0 deletions rules/libyang3-py3.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# libyang3 python3 deb package

LIBYANG3_PY3_VERSION = 3.0.3
LIBYANG3_PY3_SUBVERSION = 1
LIBYANG3_PY3_FULLVERSION = $(LIBYANG3_PY3_VERSION)-$(LIBYANG3_PY3_SUBVERSION)

export LIBYANG3_PY3_VERSION
export LIBYANG3_PY3_SUBVERSION
export LIBYANG3_PY3_FULLVERSION

LIBYANG3_PY3 = python3-libyang_$(LIBYANG3_PY3_FULLVERSION)_$(CONFIGURED_ARCH).deb
$(LIBYANG3_PY3)_SRC_PATH = $(SRC_PATH)/libyang3-py3
$(LIBYANG3_PY3)_DEPENDS += $(LIBYANG3) $(LIBYANG3_DEV)
$(LIBYANG3_PY3)_RDEPENDS += $(LIBYANG3)
SONIC_DPKG_DEBS += $(LIBYANG3_PY3)

export LIBYANG3_PY3

10 changes: 10 additions & 0 deletions rules/libyang3.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

SPATH := $($(LIBYANG3)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/libyang3.mk rules/libyang3.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files $(SPATH))

$(LIBYANG3)_CACHE_MODE := GIT_CONTENT_SHA
$(LIBYANG3)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(LIBYANG3)_DEP_FILES := $(DEP_FILES)

28 changes: 28 additions & 0 deletions rules/libyang3.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# libyang3

LIBYANG3_VERSION = 3.7.8
LIBYANG3_SUBVERSION = 2
LIBYANG3_FULLVERSION = $(LIBYANG3_VERSION)-$(LIBYANG3_SUBVERSION)

export LIBYANG3_VERSION
export LIBYANG3_SUBVERSION
export LIBYANG3_FULLVERSION

LIBYANG3 = libyang3_$(LIBYANG3_FULLVERSION)_$(CONFIGURED_ARCH).deb
$(LIBYANG3)_SRC_PATH = $(SRC_PATH)/libyang3
SONIC_MAKE_DEBS += $(LIBYANG3)

LIBYANG3_DEV = libyang-dev_$(LIBYANG3_FULLVERSION)_$(CONFIGURED_ARCH).deb
$(eval $(call add_derived_package,$(LIBYANG3),$(LIBYANG3_DEV)))

LIBYANG3_TOOLS = libyang3-tools_$(LIBYANG3_FULLVERSION)_$(CONFIGURED_ARCH).deb
$(eval $(call add_derived_package,$(LIBYANG3),$(LIBYANG3_TOOLS)))

LIBYANG3_DBG = libyang3-dbgsym_$(LIBYANG3_FULLVERSION)_$(CONFIGURED_ARCH).deb
$(eval $(call add_derived_package,$(LIBYANG3),$(LIBYANG3_DBG)))

LIBYANG3_TOOLS_DBG = libyang3-tools-dbgsym_$(LIBYANG3_FULLVERSION)_$(CONFIGURED_ARCH).deb
$(eval $(call add_derived_package,$(LIBYANG3),$(LIBYANG3_TOOLS_DBG)))

export LIBYANG3 LIBYANG3_DBG LIBYANG3_DEV LIBYANG3_TOOLS LIBYANG3_TOOLS_DBG

Loading
Loading