* [master][scarthgap][meta-virtualization][PATCH 1/3] cni: pass BuildVersion info to avoid runtime warning
@ 2024-04-24 8:11 changqing.li
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
0 siblings, 2 replies; 3+ messages in thread
From: changqing.li @ 2024-04-24 8:11 UTC (permalink / raw)
To: meta-virtualization
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [master][scarthgap][meta-virtualization][PATCH 2/3] containerd-opencontainers: fix wrong version display
2024-04-24 8:11 [master][scarthgap][meta-virtualization][PATCH 1/3] cni: pass BuildVersion info to avoid runtime warning changqing.li
@ 2024-04-24 8:11 ` changqing.li
2024-04-24 8:11 ` [master][scarthgap][meta-virtualization][PATCH 3/3] kubernetes: Pass -trimpath to build changqing.li
1 sibling, 0 replies; 3+ messages in thread
From: changqing.li @ 2024-04-24 8:11 UTC (permalink / raw)
To: meta-virtualization
From: Changqing Li <changqing.li@windriver.com>
Update Makefile to fix following containerd version:
containerd github.com/containerd/containerd/v2 2.0.0-beta.0+unknown
it should be like:
containerd github.com/containerd/containerd/v2 v2.0.0-beta.2-204-gb1624c362.m b1624c3628954e769dd50783b63823040b2db38c.m
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
...file-update-PACKAGE-and-PKG-settings.patch | 41 +++++++++++++++++++
.../containerd-opencontainers_git.bb | 1 +
2 files changed, 42 insertions(+)
create mode 100644 recipes-containers/containerd/containerd-opencontainers/0001-Makefile-update-PACKAGE-and-PKG-settings.patch
diff --git a/recipes-containers/containerd/containerd-opencontainers/0001-Makefile-update-PACKAGE-and-PKG-settings.patch b/recipes-containers/containerd/containerd-opencontainers/0001-Makefile-update-PACKAGE-and-PKG-settings.patch
new file mode 100644
index 00000000..bc70c199
--- /dev/null
+++ b/recipes-containers/containerd/containerd-opencontainers/0001-Makefile-update-PACKAGE-and-PKG-settings.patch
@@ -0,0 +1,41 @@
+From 26b4a947ebd3ed50af46bf882009b53b92a9f094 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Wed, 24 Apr 2024 13:58:27 +0800
+Subject: [PATCH] Makefile: update PACKAGE and PKG settings
+
+Current settings make containerd version is displayed
+as "2.0.0-rc.1+unknown", update PACKAGE and PKG settings to
+correct the version
+
+Upstream-Status: Submitted [https://github.com/containerd/containerd/pull/10125]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index a5b244191..a68c07038 100644
+--- a/Makefile
++++ b/Makefile
+@@ -34,7 +34,7 @@ TEST_IMAGE_LIST ?=
+ # Used to populate variables in version package.
+ VERSION ?= $(shell git describe --match 'v[0-9]*' --dirty='.m' --always)
+ REVISION ?= $(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi)
+-PACKAGE=github.com/containerd/containerd
++PACKAGE=github.com/containerd/containerd/v2
+ SHIM_CGO_ENABLED ?= 0
+
+ ifneq "$(strip $(shell command -v $(GO) 2>/dev/null))" ""
+@@ -81,7 +81,7 @@ STATICRELEASE=containerd-static-$(VERSION:v%=%)-${GOOS}-${GOARCH}
+ CRIRELEASE=cri-containerd-$(VERSION:v%=%)-${GOOS}-${GOARCH}
+ CRICNIRELEASE=cri-containerd-cni-$(VERSION:v%=%)-${GOOS}-${GOARCH}
+
+-PKG=github.com/containerd/containerd/v2
++PKG=github.com/containerd/containerd
+
+ # Project binaries.
+ COMMANDS=ctr containerd containerd-stress
+--
+2.25.1
+
diff --git a/recipes-containers/containerd/containerd-opencontainers_git.bb b/recipes-containers/containerd/containerd-opencontainers_git.bb
index 10d1ce8b..8df22432 100644
--- a/recipes-containers/containerd/containerd-opencontainers_git.bb
+++ b/recipes-containers/containerd/containerd-opencontainers_git.bb
@@ -9,6 +9,7 @@ SRCREV = "b1624c3628954e769dd50783b63823040b2db38c"
SRC_URI = "git://github.com/containerd/containerd;branch=main;protocol=https;destsuffix=git/src/github.com/containerd/containerd \
file://0001-Makefile-allow-GO_BUILD_FLAGS-to-be-externally-speci.patch \
file://0001-build-don-t-use-gcflags-to-define-trimpath.patch \
+ file://0001-Makefile-update-PACKAGE-and-PKG-settings.patch \
"
# Apache-2.0 for containerd
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [master][scarthgap][meta-virtualization][PATCH 3/3] kubernetes: Pass -trimpath to build
2024-04-24 8:11 [master][scarthgap][meta-virtualization][PATCH 1/3] cni: pass BuildVersion info to avoid runtime warning changqing.li
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 ` changqing.li
1 sibling, 0 replies; 3+ messages in thread
From: changqing.li @ 2024-04-24 8:11 UTC (permalink / raw)
To: meta-virtualization
From: Changqing Li <changqing.li@windriver.com>
Fix following QA WARNING:
WARNING: QA Issue: File /usr/bin/kubectl in package kubectl contains reference to TMPDIR [buildpaths]
WARNING: QA Issue: File /usr/bin/kubeadm in package kubeadm contains reference to TMPDIR [buildpaths]
WARNING: QA Issue: File /usr/bin/kube-proxy in package kube-proxy contains reference to TMPDIR [buildpaths]
WARNING: QA Issue: File /usr/bin/kube-apiserver in package kubernetes-misc contains reference to TMPDIR
WARNING: QA Issue: File /usr/bin/kubelet in package kubelet contains reference to TMPDIR [buildpaths]
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
recipes-containers/kubernetes/kubernetes_git.bb | 1 +
1 file changed, 1 insertion(+)
diff --git a/recipes-containers/kubernetes/kubernetes_git.bb b/recipes-containers/kubernetes/kubernetes_git.bb
index caa5ec17..d7874dfa 100644
--- a/recipes-containers/kubernetes/kubernetes_git.bb
+++ b/recipes-containers/kubernetes/kubernetes_git.bb
@@ -92,6 +92,7 @@ do_compile() {
export CC="${CC}"
export LD="${LD}"
export GOBIN=""
+ export GOFLAGS="-trimpath"
# to limit what is built, use 'WHAT', i.e. make WHAT=cmd/kubelet
make cross CGO_FLAGS=${CGO_FLAGS} GO=${GO} KUBE_BUILD_PLATFORMS=${GOOS}/${GOARCH} GOLDFLAGS="" DBG=1
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-24 8:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-24 8:11 [master][scarthgap][meta-virtualization][PATCH 1/3] cni: pass BuildVersion info to avoid runtime warning changqing.li
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
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 NNTP newsgroup(s).