Skip to content

[build] add LIBYANG3_PY3 to lib-packages#27881

Merged
yxieca-admin merged 2 commits into
sonic-net:202605from
yijingyan2:lib-package-fix
Jun 14, 2026
Merged

[build] add LIBYANG3_PY3 to lib-packages#27881
yxieca-admin merged 2 commits into
sonic-net:202605from
yijingyan2:lib-package-fix

Conversation

@yijingyan2

Copy link
Copy Markdown
Contributor

cherry-pick: #27836

Why I did it

I noticed that the sonic-swss-common build was failing in sonic-net/sonic-swss-common#1205 because the python3-libyang*.deb were not being published by sonic-buildimage builds.

How I did it

This PR fixes the issue by making the common_libs pipeline actually publish python3-libyang.

How to verify it

Ran a local build:

make init
BLDENV=bookworm make -f Makefile.work configure PLATFORM=vs ENABLE_DOCKER_BASE_PULL=y
BLDENV=bookworm SONIC_BUILD_JOBS=$(nproc) make -f Makefile.work lib-packages ENABLE_DOCKER_BASE_PULL=y

Verified that python3-libyang was built:

$> ls -lt target/debs/bookworm/ | grep libyang
-rw-r--r-- 1 bgallagher bgallagher   30284 Jun 11 21:47 python3-libyang_3.1.0-1_amd64.deb.log
-rw-r--r-- 1 bgallagher bgallagher   66648 Jun 11 21:47 python3-libyang_3.1.0-1_amd64.deb
-rw-r--r-- 1 bgallagher bgallagher     375 Jun 11 21:47 libyang-dev_3.12.2-1_amd64.deb-install.log
-rw-r--r-- 1 bgallagher bgallagher     436 Jun 11 21:47 libyang3_3.12.2-1_amd64.deb-install.log
-rw-r--r-- 1 bgallagher bgallagher     115 Jun 11 21:36 libyang-dev_3.12.2-1_amd64.deb.log
-rw-r--r-- 1 bgallagher bgallagher  829428 Jun 11 21:36 libyang-dev_3.12.2-1_amd64.deb
-rw-r--r-- 1 bgallagher bgallagher  656282 Jun 11 21:36 libyang3_3.12.2-1_amd64.deb.log
-rw-r--r-- 1 bgallagher bgallagher 1744356 Jun 11 21:36 libyang3-dbgsym_3.12.2-1_amd64.deb
-rw-r--r-- 1 bgallagher bgallagher  499644 Jun 11 21:36 libyang3_3.12.2-1_amd64.deb
-rw-r--r-- 1 bgallagher bgallagher   73504 Jun 11 21:36 libyang3-tools_3.12.2-1_amd64.deb
-rw-r--r-- 1 bgallagher bgallagher  132616 Jun 11 21:36 libyang3-tools-dbgsym_3.12.2-1_amd64.deb

Spun up a container, installed the packages and verified libyang can be imported in Python code:

docker run -it --rm -v $PWD/target/debs/bookworm:/debs \
  sonicdev-microsoft.azurecr.io:443/sonic-slave-bookworm:master-amd64 bash

(in the container)
root@668f226e35f3:/# sudo apt-get install -y /debs/libyang3_*.deb /debs/libyang-dev_3*.deb /debs/python3-libyang_*.deb
root@668f226e35f3:/# python3 -c 'import libyang; print("ok")'
ok

Which release branch to backport (provide reason below if selected)

  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202605

Tested branch (Please provide the tested image version)

Description for the changelog

Fix sonic-swss-common builds

Link to config_db schema for YANG module changes

N/A

Signed-off-by: Yijing Yan <yijingyan@microsoft.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@yijingyan2 yijingyan2 changed the title add LIBYANG3_PY3 to lib-packages [build] add LIBYANG3_PY3 to lib-packages Jun 14, 2026
@yijingyan2 yijingyan2 mentioned this pull request Jun 14, 2026
9 tasks
@linux-foundation-easycla

Copy link
Copy Markdown

CLA Not Signed

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@yxieca-admin yxieca-admin merged commit 2d1d944 into sonic-net:202605 Jun 14, 2026
6 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants