Unverified Commit 8c4c05dd authored by boklm's avatar boklm
Browse files

Bug 23585: fix build with runc version 1.0.0~rc2

Some distributions are packaging runc version 1.0.0~rc2, which seems to
be half between runc 0.1.1 and runc 1.0.0.

This version requires the same command line parameters as version 1.0.0,
however it requires a config.json in the same format as 0.1.1.

The output from `runc --version` on 1.0.0~rc2 is:
runc version spec: 1.0.0-rc2-dev

So we add a var/runc_spec100 function which is true when the runc
version spec is exactly 1.0.0 (as returned by runc stable 1.0.x
releases), and use it in projects/common/runc-config.json.
parent 36600281
{
"ociVersion": "1.0.0[% IF !c("var_p/runc100") %]-rc1[% END %]",
"ociVersion": "1.0.0[% IF !c("var_p/runc_spec100") %]-rc1[% END %]",
"platform": {
"os": "linux",
[% IF c("var/container/arch") == 'i386' -%]
......@@ -22,7 +22,7 @@
"TERM=xterm"
],
"cwd": "/",
[% IF c("var_p/runc100") -%]
[% IF c("var_p/runc_spec100") -%]
"capabilities": {
"bounding": [
"CAP_AUDIT_WRITE",
......@@ -250,7 +250,7 @@
"/proc/kcore",
"/proc/latency_stats",
"/proc/timer_stats",
[% IF c("var_p/runc100") -%]
[% IF c("var_p/runc_spec100") -%]
"/proc/timer_list",
"/sys/firmware",
[% END -%]
......
......@@ -379,5 +379,11 @@ ENV:
my ($out) = capture_exec('sudo', 'runc', '--version');
return !($out =~ m/^runc version 0.1.1/);
},
# runc_spec100 is true if runc spec is exactly 1.0.0
# We will need to update this when there is a new spec version available
runc_spec100 => sub {
my ($out) = capture_exec('sudo', 'runc', '--version');
return $out =~ m/^runc version spec: 1\.0\.0$/;
},
},
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment