Skip to content

[action] [PR:345] [ci]: Install libyang3 for linkmgrd builds - #347

Merged
mssonicbld merged 1 commit into
sonic-net:202605from
mssonicbld:cherry/202605/345
Jun 16, 2026
Merged

[action] [PR:345] [ci]: Install libyang3 for linkmgrd builds#347
mssonicbld merged 1 commit into
sonic-net:202605from
mssonicbld:cherry/202605/345

Conversation

@mssonicbld

Copy link
Copy Markdown
Collaborator

Why I did it

linkmgrd CI currently assumes the common-lib artifact contains libyang_*.deb, but the current SONiC common-lib artifact publishes libyang3_*.deb and libyang-dev_*.deb. This causes Azure to download zero packages and then fail with dpkg --install needs at least one package archive file argument.

CodeQL also downloads libswsscommon without extracting the matching SONiC libyang3, so the link step cannot resolve libyang.so.3.

How I did it

  • Update Azure artifact patterns to download libyang3_*.deb and libyang-dev_*.deb.
  • Make Azure fail with a clear message if no libyang packages are downloaded.
  • Extract matching common-lib libyang3 packages in CodeQL before building against downloaded libswsscommon.
  • Add -Wl,-rpath-link for the extracted library directory so CodeQL's linker can resolve libyang.so.3.

How to verify it

  • Run the Azure sonic-linkmgrd pipeline.
  • Run the GitHub CodeQL workflow.
  • Confirm the libyang install step finds packages and CodeQL no longer fails with unresolved ly_* symbols from libswsscommon.

Signed-off-by: Sonic Build Admin sonicbld@microsoft.com

## Why I did it

linkmgrd CI currently assumes the common-lib artifact contains `libyang_*.deb`, but the current SONiC common-lib artifact publishes `libyang3_*.deb` and `libyang-dev_*.deb`. This causes Azure to download zero packages and then fail with `dpkg --install needs at least one package archive file argument`.

CodeQL also downloads `libswsscommon` without extracting the matching SONiC `libyang3`, so the link step cannot resolve `libyang.so.3`.

## How I did it

- Update Azure artifact patterns to download `libyang3_*.deb` and `libyang-dev_*.deb`.
- Make Azure fail with a clear message if no libyang packages are downloaded.
- Extract matching common-lib `libyang3` packages in CodeQL before building against downloaded `libswsscommon`.
- Add `-Wl,-rpath-link` for the extracted library directory so CodeQL's linker can resolve `libyang.so.3`.

## How to verify it

- Run the Azure `sonic-linkmgrd` pipeline.
- Run the GitHub CodeQL workflow.
- Confirm the libyang install step finds packages and CodeQL no longer fails with unresolved `ly_*` symbols from `libswsscommon`.

Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator Author

Original PR: #345

@mssonicbld

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

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

@mssonicbld
mssonicbld merged commit d0a9965 into sonic-net:202605 Jun 16, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant