From fef78c102407c77b5d5aa4c5b164c9a093bb76af Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Wed, 24 Apr 2024 21:34:41 +0900 Subject: [PATCH] install-runc: pin Go to 1.21 runc is incompatible with Go 1.22 on glibc-based distros (opencontainers/runc issue 4233) Signed-off-by: Akihiro Suda --- script/setup/install-runc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/script/setup/install-runc b/script/setup/install-runc index 07a3be7c8..6bdd023ce 100755 --- a/script/setup/install-runc +++ b/script/setup/install-runc @@ -34,11 +34,18 @@ function install_runc() { : "${RUNC_REPO:=https://github.com/opencontainers/runc.git}" TMPROOT=$(mktemp -d) + # runc is incompatible with Go 1.22 on glibc-based distros + # https://github.com/opencontainers/runc/issues/4233 + GO121DIR="${TMPROOT}"/go121 + mkdir -p "${GO121DIR}" + GOBIN="${GO121DIR}" go install golang.org/dl/go1.21.9@latest + GO121="${GO121DIR}"/go1.21.9 + $GO121 download git clone "${RUNC_REPO}" "${TMPROOT}"/runc pushd "${TMPROOT}"/runc git checkout "${RUNC_VERSION}" - make BUILDTAGS='seccomp' runc - $SUDO make install + make GO=$GO121 BUILDTAGS='seccomp' runc + $SUDO make GO=$GO121 install popd rm -fR "${TMPROOT}" }