Skip to content

Commit

Permalink
install-runc: pin Go to 1.21
Browse files Browse the repository at this point in the history
runc is incompatible with Go 1.22 on glibc-based distros
(opencontainers/runc issue 4233)

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
  • Loading branch information
AkihiroSuda committed Apr 30, 2024
1 parent 7feb1f3 commit fef78c1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions script/setup/install-runc
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
}
Expand Down

0 comments on commit fef78c1

Please sign in to comment.