X Tutup
Skip to content

Commit 039c240

Browse files
committed
move runc version to a separate file for easier consumption
This moves the runc version to build to scripts/setup/runc-version, which makes it easier for packagers to find the default version to use. The RUNC_VERSION environment variable can still be used to override the version, which can be used (e.g.) to test against different versions in our CI. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 79a51cd) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 0e957e5 commit 039c240

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

RUNC.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ provided by [runc](https://github.com/opencontainers/runc).
33

44
Development (`-dev`) and pre-releases of containerd may depend features in `runc`
55
that have not yet been released, and may require a specific runc build. The version
6-
of runc that is tested against in our CI can be found in the `RUNC_VERSION` variable
7-
in the [`script/setup/install-runc`](../script/setup/install-runc) script, which
8-
may point to a git-commit (for pre releases) or tag in the runc repository.
6+
of runc that is tested against in our CI can be found in the [`script/setup/runc-version`](../script/setup/runc-version)
7+
file, which may point to a git-commit (for pre releases) or tag in the runc
8+
repository.
99

1010
For regular (non-pre-)releases of containerd releases, we attempt to use released
1111
(tagged) versions of runc. We recommend using a version of runc that's equal to
12-
or higher than the version of runc described in [`script/setup/install-runc`](../script/setup/install-runc).
12+
or higher than the version of runc described in [`script/setup/runc-version`](../script/setup/runc-version).
1313

1414
If you encounter any runtime errors, make sure your runc is in sync with the
1515
commit or tag provided in that file.

contrib/Dockerfile.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ RUN apt-get update && apt-get install -y \
3636
libseccomp-dev \
3737
--no-install-recommends
3838

39-
COPY script/setup/install-runc install-runc
39+
COPY script/setup/runc-version script/setup/install-runc ./
4040
# Allow overriding the version of runc to install through build-args
4141
ARG RUNC_VERSION
4242
ARG GOPROXY=direct

script/setup/install-runc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121
set -eu -o pipefail
2222

2323
function install_runc() {
24-
# When updating RUNC_VERSION, consider updating the runc module in go.mod as well
25-
: "${RUNC_VERSION:=v1.0.0-rc93}"
24+
script_dir="$(cd -- "$(dirname -- "$0")" > /dev/null 2>&1; pwd -P)"
25+
26+
# When updating runc-version, consider updating the runc module in go.mod as well
27+
: "${RUNC_VERSION:=$(cat "${script_dir}/runc-version")}"
2628

2729
TMPROOT=$(mktemp -d)
2830
git clone https://github.com/opencontainers/runc.git "${TMPROOT}"/runc

script/setup/runc-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v1.0.0-rc93

0 commit comments

Comments
 (0)
X Tutup