From: Changqing Li <changqing...@windriver.com> The default value of BuildVersion is 'unknown' and it requires an override at link time to embed such version info into binary.
Signed-off-by: Chen Qi <qi.c...@windriver.com> Signed-off-by: Changqing Li <changqing...@windriver.com> --- recipes-networking/cni/cni_git.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes-networking/cni/cni_git.bb b/recipes-networking/cni/cni_git.bb index fda7af60..b41b47cf 100644 --- a/recipes-networking/cni/cni_git.bb +++ b/recipes-networking/cni/cni_git.bb @@ -34,6 +34,7 @@ LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464 GO_IMPORT = "import" PV = "v1.2.0-rc0+git${SRCREV_cni}" +CNI_VERSION = "v1.2.0" inherit go inherit goarch @@ -68,7 +69,7 @@ do_compile() { for p in $PLUGINS; do plugin="$(basename "$p")" echo "building: $p" - ${GO} build ${GOBUILDFLAGS} -o ${B}/plugins/bin/$plugin github.com/containernetworking/plugins/$p + ${GO} build ${GOBUILDFLAGS} -ldflags '-X github.com/containernetworking/plugins/pkg/utils/buildversion.BuildVersion=${CNI_VERSION}' -o ${B}/plugins/bin/$plugin github.com/containernetworking/plugins/$p done } -- 2.25.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#8695): https://lists.yoctoproject.org/g/meta-virtualization/message/8695 Mute This Topic: https://lists.yoctoproject.org/mt/105706504/21656 Group Owner: meta-virtualization+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-