[build] add a dependency on libnetsnmptrapd40 for libsnmp-dev#25370
[build] add a dependency on libnetsnmptrapd40 for libsnmp-dev#25370liushilongbuaa merged 21 commits intosonic-net:masterfrom
Conversation
Signed-off-by: yijingyan2 <yijingyan@microsoft.com>
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: yijingyan2 <yijingyan@microsoft.com>
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: yijingyan2 <yijingyan@microsoft.com>
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: yijingyan2 <yijingyan@microsoft.com>
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: yijingyan2 <yijingyan@microsoft.com>
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: yijingyan2 <yijingyan@microsoft.com>
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: yijingyan2 <yijingyan@microsoft.com>
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…into snmp-add-dependency
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run Azure.sonic-buildimage |
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
405b21c to
11723f5
Compare
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Yijing Yan <yijingyan@microsoft.com>
11723f5 to
b906af1
Compare
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Yijing Yan <yijingyan@microsoft.com>
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Yijing Yan <yijingyan@microsoft.com>
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…the local build libsnmp-dev Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com>
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
This PR fixes SNMP package dependency issues during installation by adding libnetsnmptrapd40 as a dependency for libsnmp-dev and adding runtime dependencies for debug symbol packages. The PR also removes libsnmp-dev from the sonic-slave-bookworm Dockerfile since it's now built from source, and standardizes apt-get usage in build scripts.
Changes:
- Added libnetsnmptrapd40 dependency to libsnmp-dev to resolve dpkg version mismatch errors
- Added RDEPENDS for snmp-dbgsym and snmpd-dbgsym packages to fix dependency conflicts
- Removed libsnmp-dev from sonic-slave-bookworm Dockerfile to avoid conflicts with source-built version
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/snmpd/Makefile | Added libnetsnmptrapd40 to DERIVED_TARGETS list for package build |
| sonic-slave-bookworm/Dockerfile.j2 | Removed libsnmp-dev from apt-get install lists (2 locations) to avoid conflicts with source build |
| rules/snmpd.mk | Added RDEPENDS for debug packages, defined LIBNETSNMPTRAPD40 with trixie/bookworm variants, updated LIBSNMP_DEV dependencies |
| build_debug_docker_j2.sh | Changed "apt update" to "apt-get update" and "apt" to "apt-get" for consistency |
Comments suppressed due to low confidence (1)
src/snmpd/Makefile:19
- The DERIVED_TARGETS list needs to handle the trixie build environment where packages have t64 suffixes. When building for trixie, dpkg-buildpackage will produce libsnmp40t64 and libnetsnmptrapd40t64 instead of libsnmp40 and libnetsnmptrapd40. Since line 60 moves packages listed in DERIVED_TARGETS, the build will fail for trixie if these names don't match the actual built packages.
Add conditional handling similar to the approach in rules/snmpd.mk, checking the SNMPD_VERSION to determine if t64 variants should be listed. For example, check if SNMPD_VERSION contains "5.9.4" (trixie version) and list libsnmp40t64 and libnetsnmptrapd40t64 accordingly.
DERIVED_TARGETS = snmptrapd_$(SNMPD_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
snmptrapd-dbgsym_$(SNMPD_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
snmp_$(SNMPD_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
snmpd_$(SNMPD_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
snmp-dbgsym_$(SNMPD_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
snmpd-dbgsym_$(SNMPD_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
libsnmp40_$(SNMPD_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
libsnmp40-dbgsym_$(SNMPD_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
libnetsnmptrapd40_$(SNMPD_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
libsnmp-dev_$(SNMPD_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
libsnmp-perl_$(SNMPD_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
libsnmp-perl-dbgsym_$(SNMPD_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
tkmib_$(SNMPD_VERSION_FULL)_all.deb
…et#25370) Use local built libsnmp-dev related packages instead of debian in sonic-slave-bookworm. It will avoid snmp related packages breaking reproducible build. --------- Signed-off-by: Yijing Yan <yijingyan@microsoft.com> Signed-off-by: Feng Pan <fenpan@microsoft.com>
Why I did it