From 2c4f8077fd2ea0bfa8f274c3aa18952093037daf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 21 Feb 2023 09:25:31 +0100 Subject: [PATCH 1/2] Revert "shim-v2: Bump Ubuntu container image to 22.04" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 9d78bf90861bcf2464aebf028b4cc233ec38ec26. Golang binaries are built statically by default, unless linking against CGO, which we do. In this case we dynamically link against glibc, causing us troubles when running a binary built with Ubuntu 22.04 on Ubuntu 20.04 (which will still be supported for the next few years ...) Signed-off-by: Fabiano FidĂȘncio --- tools/packaging/static-build/shim-v2/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/packaging/static-build/shim-v2/Dockerfile b/tools/packaging/static-build/shim-v2/Dockerfile index 5d4fe8f88c..045e4f2c99 100644 --- a/tools/packaging/static-build/shim-v2/Dockerfile +++ b/tools/packaging/static-build/shim-v2/Dockerfile @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: Apache-2.0 -FROM ubuntu:22.04 +FROM ubuntu:20.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && \ From b4a1527aa664ec54ce4fc2941bc5858622ba944f Mon Sep 17 00:00:00 2001 From: SinghWang Date: Mon, 20 Feb 2023 13:45:11 +0800 Subject: [PATCH 2/2] kata-deploy: Fix static shim-v2 build on arm64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Following Jong Wu suggestion, let's link /usr/bin/musl-gcc to /usr/bin/aarch64-linux-musl-gcc. Fixes: #6320 Signed-off-by: SinghWang Signed-off-by: Fabiano FidĂȘncio --- tools/packaging/static-build/shim-v2/install_go_rust.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/packaging/static-build/shim-v2/install_go_rust.sh b/tools/packaging/static-build/shim-v2/install_go_rust.sh index 502d5f085c..078f49d37d 100755 --- a/tools/packaging/static-build/shim-v2/install_go_rust.sh +++ b/tools/packaging/static-build/shim-v2/install_go_rust.sh @@ -58,6 +58,10 @@ case "${ARCH}" in aarch64) goarch=arm64 LIBC=musl + # This is a hack needed as part of Ubuntu 20.04 + if [ ! -f /usr/bin/aarch64-linux-musl-gcc ]; then + ln -sf /usr/bin/musl-gcc /usr/bin/aarch64-linux-musl-gcc + fi ;; ppc64le) goarch=${ARCH}