From da9d57b2956f2197cbd69f17cffc1087b3c54698 Mon Sep 17 00:00:00 2001 From: Yue Tao Date: Tue, 18 Apr 2023 17:13:19 +0800 Subject: [PATCH] containerd: upgrade Build-Depends to Golang 1.17 The Build-Depends package "golang-github-containernetworking-plugins" has been upgraded to 1.2.0 by https://review.opendev.org/c/starlingx/integ/+/878722, that causes a build issue of containerd: ===================== src/github.com/containernetworking/plugins/vendor/golang.org/x/sys/unix/syscall.go:83:16: undefined: unsafe.Slice src/github.com/containernetworking/plugins/vendor/golang.org/x/sys/unix/syscall_linux.go:2270:9: undefined: unsafe.Slice src/github.com/containernetworking/plugins/vendor/golang.org/x/sys/unix/syscall_unix.go:118:7: undefined: unsafe.Slice src/github.com/containernetworking/plugins/vendor/golang.org/x/sys/unix/sysvshm_unix.go:33:7: undefined: unsafe.Slice ===================== The "unsafe.Slice" is introduced since Golong 1.17, so change the Build-Depends. Test Plan: - PASS: build-pkgs -a -c - PASS: build-image Closes-Bug: 2016936 Signed-off-by: Yue Tao Change-Id: Ic14ef5f273e5d6b5deb2de00f74d3b823bd198ad --- kubernetes/containerd/debian/deb_folder/rules | 1 + ...7-due-to-containernetworking-plugins.patch | 27 +++++++++++++++++++ .../containerd/debian/deb_patches/series | 1 + 3 files changed, 29 insertions(+) create mode 100644 kubernetes/containerd/debian/deb_patches/0001-Update-to-Go-1.17-due-to-containernetworking-plugins.patch create mode 100644 kubernetes/containerd/debian/deb_patches/series diff --git a/kubernetes/containerd/debian/deb_folder/rules b/kubernetes/containerd/debian/deb_folder/rules index bdd5d4b02..7b083e44f 100755 --- a/kubernetes/containerd/debian/deb_folder/rules +++ b/kubernetes/containerd/debian/deb_folder/rules @@ -24,6 +24,7 @@ CRI_FILE += vendor/k8s.io vendor/github.com/docker/docker CRI_FILE += vendor/github.com/containerd/imgcrypt export DH_GOLANG_EXCLUDES := $(EXCLUDES) +export PATH := /usr/lib/go-1.17/bin:$(PATH) %: dh $@ --buildsystem=golang --with=golang --builddirectory=_build diff --git a/kubernetes/containerd/debian/deb_patches/0001-Update-to-Go-1.17-due-to-containernetworking-plugins.patch b/kubernetes/containerd/debian/deb_patches/0001-Update-to-Go-1.17-due-to-containernetworking-plugins.patch new file mode 100644 index 000000000..e56b3f815 --- /dev/null +++ b/kubernetes/containerd/debian/deb_patches/0001-Update-to-Go-1.17-due-to-containernetworking-plugins.patch @@ -0,0 +1,27 @@ +From 5a09ae888e41a92bcb76c6d0ec5fe452fe0695bf Mon Sep 17 00:00:00 2001 +From: Yue Tao +Date: Tue, 18 Apr 2023 08:41:40 +0000 +Subject: [PATCH] Update to Go 1.17 due to containernetworking-plugins upgraded + to v1.2.0 + +Signed-off-by: Yue Tao +--- + debian/control | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/debian/control b/debian/control +index 57a3a9c..db17fb8 100644 +--- a/debian/control ++++ b/debian/control +@@ -8,7 +8,7 @@ Uploaders: Tianon Gravi , + Build-Depends: debhelper-compat (= 13), + dh-golang, + go-md2man, +- golang-any, ++ golang-1.17, + golang-github-burntsushi-toml-dev, + golang-github-containerd-btrfs-dev (>= 0.0~git20200117.1539353~), + golang-github-containerd-cgroups-dev (>= 0.0~git20200817.7a3c009~), +-- +2.30.2 + diff --git a/kubernetes/containerd/debian/deb_patches/series b/kubernetes/containerd/debian/deb_patches/series new file mode 100644 index 000000000..3233de58d --- /dev/null +++ b/kubernetes/containerd/debian/deb_patches/series @@ -0,0 +1 @@ +0001-Update-to-Go-1.17-due-to-containernetworking-plugins.patch