From: <changqing.li@windriver.com>
To: <meta-virtualization@lists.yoctoproject.org>
Subject: [master][scarthgap][meta-virtualization][PATCH 1/3] cni: pass BuildVersion info to avoid runtime warning
Date: Wed, 24 Apr 2024 16:11:55 +0800 [thread overview]
Message-ID: <20240424081157.2608243-1-changqing.li@windriver.com> (raw)
From: Changqing Li <changqing.li@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.Chen@windriver.com>
Signed-off-by: Changqing Li <changqing.li@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
next reply other threads:[~2024-04-24 8:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-24 8:11 changqing.li [this message]
2024-04-24 8:11 ` [master][scarthgap][meta-virtualization][PATCH 2/3] containerd-opencontainers: fix wrong version display changqing.li
2024-04-24 8:11 ` [master][scarthgap][meta-virtualization][PATCH 3/3] kubernetes: Pass -trimpath to build changqing.li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240424081157.2608243-1-changqing.li@windriver.com \
--to=changqing.li@windriver.com \
--cc=meta-virtualization@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).