mirror of
https://github.com/containerd/containerd.git
synced 2026-11-06 05:17:02 +00:00
Merge pull request #14465 from thc1006/backport/static-runc-release-2.4
[release/2.4] script/setup/install-runc: build runc statically
This commit is contained in:
2 files changed
+11
-3
No files matched your search
@@ -38,7 +38,14 @@ function install_runc() {
|
||||
git clone "${RUNC_REPO}" "${TMPROOT}"/runc
|
||||
pushd "${TMPROOT}"/runc
|
||||
git checkout "${RUNC_VERSION}"
|
||||
env -u VERSION make BUILDTAGS='seccomp' runc
|
||||
# Static build, like the runc release binaries, so the binary does not
|
||||
# depend on the build host's glibc and libseccomp. Needs libseccomp.a;
|
||||
# set RUNC_DYNAMIC=1 where it is not available (e.g. EL).
|
||||
if [ -n "${RUNC_DYNAMIC:-}" ]; then
|
||||
env -u VERSION make BUILDTAGS='seccomp' runc
|
||||
else
|
||||
env -u VERSION make BUILDTAGS='seccomp' static
|
||||
fi
|
||||
$SUDO make install
|
||||
popd
|
||||
}
|
||||
|
||||
@@ -78,8 +78,9 @@ fi
|
||||
|
||||
cd "${containerd_dir}"
|
||||
|
||||
# Install runc (pass RUNC_FLAVOR=crun to install crun as runc)
|
||||
RUNC_FLAVOR="${RUNC_FLAVOR}" script/setup/install-runc
|
||||
# Install runc (pass RUNC_FLAVOR=crun to install crun as runc).
|
||||
# EL has no libseccomp-static, so build runc dynamically like runc's own CI does.
|
||||
RUNC_FLAVOR="${RUNC_FLAVOR}" RUNC_DYNAMIC=1 script/setup/install-runc
|
||||
type runc
|
||||
runc --version
|
||||
# "type -ap" may print the same file under multiple names, e.g., on
|
||||
|
||||
Reference in new issue
Block a user