Skip to content

Commit 6beb3c6

Browse files
committed
go.mod: runtime-spec v1.1.0-rc.2
See https://github.com/opencontainers/runtime-spec/releases/tag/v1.1.0-rc.2 for the spec changes. The `runc features` json is now defined in https://github.com/opencontainers/runtime-spec/blob/v1.1.0-rc.2/specs-go/features/features.go Replaces PR 3829 Signed-off-by: Akihiro Suda <[email protected]>
1 parent 8eb801d commit 6beb3c6

File tree

9 files changed

+165
-136
lines changed

9 files changed

+165
-136
lines changed

docs/spec-conformance.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Spec conformance
22

3-
This branch of runc implements the [OCI Runtime Spec v1.1.0-rc.1](https://github.com/opencontainers/runtime-spec/tree/v1.1.0-rc.1)
3+
This branch of runc implements the [OCI Runtime Spec v1.1.0-rc.2](https://github.com/opencontainers/runtime-spec/tree/v1.1.0-rc.2)
44
for the `linux` platform.
55

66
The following features are not implemented yet:
@@ -10,8 +10,9 @@ Spec version | Feature | PR
1010
v1.0.0 | `SCMP_ARCH_PARISC` | Unplanned, due to lack of users
1111
v1.0.0 | `SCMP_ARCH_PARISC64` | Unplanned, due to lack of users
1212
v1.0.2 | `.linux.personality` | [#3126](https://github.com/opencontainers/runc/pull/3126)
13-
v1.1.0-rc.1 | `.linux.resources.cpu.burst` | [#3205](https://github.com/opencontainers/runc/pull/3205)
14-
v1.1.0-rc.1 | `.domainname` | [#3600](https://github.com/opencontainers/runc/pull/3600)
13+
v1.1.0-rc.1 | `.linux.resources.cpu.burst` | [#3749](https://github.com/opencontainers/runc/pull/3749)
1514
v1.1.0-rc.1 | `.[]mounts.uidMappings` | [#3717](https://github.com/opencontainers/runc/pull/3717)
1615
v1.1.0-rc.1 | `.[]mounts.gidMappings` | [#3717](https://github.com/opencontainers/runc/pull/3717)
17-
v1.1.0-rc.1 | `SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV` | TODO
16+
v1.1.0-rc.1 | `SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV` | TODO ([#3860](https://github.com/opencontainers/runc/issues/3860))
17+
v1.1.0-rc.2 | time namespaces | TODO ([#2345](https://github.com/opencontainers/runc/issues/2345))
18+
v1.1.0-rc.2 | rsvd hugetlb cgroup | TODO ([#3859](https://github.com/opencontainers/runc/issues/3859))

features.go

+10-5
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ import (
88
"github.com/opencontainers/runc/libcontainer/configs"
99
"github.com/opencontainers/runc/libcontainer/seccomp"
1010
"github.com/opencontainers/runc/libcontainer/specconv"
11-
"github.com/opencontainers/runc/types/features"
11+
runcfeatures "github.com/opencontainers/runc/types/features"
1212
"github.com/opencontainers/runtime-spec/specs-go"
13+
"github.com/opencontainers/runtime-spec/specs-go/features"
1314
"github.com/urfave/cli"
1415
)
1516

@@ -33,9 +34,9 @@ var featuresCommand = cli.Command{
3334
OCIVersionMin: "1.0.0",
3435
OCIVersionMax: specs.Version,
3536
Annotations: map[string]string{
36-
features.AnnotationRuncVersion: version,
37-
features.AnnotationRuncCommit: gitCommit,
38-
features.AnnotationRuncCheckpointEnabled: "true",
37+
runcfeatures.AnnotationRuncVersion: version,
38+
runcfeatures.AnnotationRuncCommit: gitCommit,
39+
runcfeatures.AnnotationRuncCheckpointEnabled: "true",
3940
},
4041
Hooks: configs.KnownHookNames(),
4142
MountOptions: specconv.KnownMountOptions(),
@@ -47,13 +48,17 @@ var featuresCommand = cli.Command{
4748
V2: &tru,
4849
Systemd: &tru,
4950
SystemdUser: &tru,
51+
Rdma: &tru,
5052
},
5153
Apparmor: &features.Apparmor{
5254
Enabled: &tru,
5355
},
5456
Selinux: &features.Selinux{
5557
Enabled: &tru,
5658
},
59+
IntelRdt: &features.IntelRdt{
60+
Enabled: &tru,
61+
},
5762
},
5863
}
5964

@@ -67,7 +72,7 @@ var featuresCommand = cli.Command{
6772
SupportedFlags: seccomp.SupportedFlags(),
6873
}
6974
major, minor, patch := seccomp.Version()
70-
feat.Annotations[features.AnnotationLibseccompVersion] = fmt.Sprintf("%d.%d.%d", major, minor, patch)
75+
feat.Annotations[runcfeatures.AnnotationLibseccompVersion] = fmt.Sprintf("%d.%d.%d", major, minor, patch)
7176
}
7277

7378
enc := json.NewEncoder(context.App.Writer)

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/godbus/dbus/v5 v5.1.0
1313
github.com/moby/sys/mountinfo v0.6.2
1414
github.com/mrunalp/fileutils v0.5.0
15-
github.com/opencontainers/runtime-spec v1.1.0-rc.1
15+
github.com/opencontainers/runtime-spec v1.1.0-rc.2
1616
github.com/opencontainers/selinux v1.11.0
1717
github.com/seccomp/libseccomp-golang v0.10.0
1818
github.com/sirupsen/logrus v1.9.0

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vyg
3030
github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI=
3131
github.com/mrunalp/fileutils v0.5.0 h1:NKzVxiH7eSk+OQ4M+ZYW1K6h27RUV3MI6NUTsHhU6Z4=
3232
github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ=
33-
github.com/opencontainers/runtime-spec v1.1.0-rc.1 h1:wHa9jroFfKGQqFHj0I1fMRKLl0pfj+ynAqBxo3v6u9w=
34-
github.com/opencontainers/runtime-spec v1.1.0-rc.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
33+
github.com/opencontainers/runtime-spec v1.1.0-rc.2 h1:ucBtEms2tamYYW/SvGpvq9yUN0NEVL6oyLEwDcTSrk8=
34+
github.com/opencontainers/runtime-spec v1.1.0-rc.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
3535
github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU=
3636
github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec=
3737
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=

types/features/features.go

+1-117
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,6 @@
1-
// Package features provides the JSON structure that is printed by `runc features` (since runc v1.1.0).
2-
// The types in this package are experimental and subject to change.
1+
// Package features provides the annotations for [github.com/opencontainers/runtime-spec/specs-go/features].
32
package features
43

5-
// Features represents the supported features of the runtime.
6-
type Features struct {
7-
// OCIVersionMin is the minimum OCI Runtime Spec version recognized by the runtime, e.g., "1.0.0".
8-
OCIVersionMin string `json:"ociVersionMin,omitempty"`
9-
10-
// OCIVersionMax is the maximum OCI Runtime Spec version recognized by the runtime, e.g., "1.0.2-dev".
11-
OCIVersionMax string `json:"ociVersionMax,omitempty"`
12-
13-
// Hooks is the list of the recognized hook names, e.g., "createRuntime".
14-
// Nil value means "unknown", not "no support for any hook".
15-
Hooks []string `json:"hooks,omitempty"`
16-
17-
// MountOptions is the list of the recognized mount options, e.g., "ro".
18-
// Nil value means "unknown", not "no support for any mount option".
19-
// This list does not contain filesystem-specific options passed to mount(2) syscall as (const void *).
20-
MountOptions []string `json:"mountOptions,omitempty"`
21-
22-
// Linux is specific to Linux.
23-
Linux *Linux `json:"linux,omitempty"`
24-
25-
// Annotations contains implementation-specific annotation strings,
26-
// such as the implementation version, and third-party extensions.
27-
Annotations map[string]string `json:"annotations,omitempty"`
28-
}
29-
30-
// Linux is specific to Linux.
31-
type Linux struct {
32-
// Namespaces is the list of the recognized namespaces, e.g., "mount".
33-
// Nil value means "unknown", not "no support for any namespace".
34-
Namespaces []string `json:"namespaces,omitempty"`
35-
36-
// Capabilities is the list of the recognized capabilities , e.g., "CAP_SYS_ADMIN".
37-
// Nil value means "unknown", not "no support for any capability".
38-
Capabilities []string `json:"capabilities,omitempty"`
39-
40-
Cgroup *Cgroup `json:"cgroup,omitempty"`
41-
Seccomp *Seccomp `json:"seccomp,omitempty"`
42-
Apparmor *Apparmor `json:"apparmor,omitempty"`
43-
Selinux *Selinux `json:"selinux,omitempty"`
44-
}
45-
46-
// Seccomp represents the "seccomp" field.
47-
type Seccomp struct {
48-
// Enabled is true if seccomp support is compiled in.
49-
// Nil value means "unknown", not "false".
50-
Enabled *bool `json:"enabled,omitempty"`
51-
52-
// Actions is the list of the recognized actions, e.g., "SCMP_ACT_NOTIFY".
53-
// Nil value means "unknown", not "no support for any action".
54-
Actions []string `json:"actions,omitempty"`
55-
56-
// Operators is the list of the recognized operators, e.g., "SCMP_CMP_NE".
57-
// Nil value means "unknown", not "no support for any operator".
58-
Operators []string `json:"operators,omitempty"`
59-
60-
// Archs is the list of the recognized archs, e.g., "SCMP_ARCH_X86_64".
61-
// Nil value means "unknown", not "no support for any arch".
62-
Archs []string `json:"archs,omitempty"`
63-
64-
// KnownFlags is the list of the recognized filter flags, e.g., "SECCOMP_FILTER_FLAG_LOG".
65-
// Nil value means "unknown", not "no flags are recognized".
66-
KnownFlags []string `json:"knownFlags,omitempty"`
67-
68-
// SupportedFlags is the list of the supported filter flags, e.g., "SECCOMP_FILTER_FLAG_LOG".
69-
// This list may be a subset of KnownFlags due to some flags
70-
// not supported by the current kernel and/or libseccomp.
71-
// Nil value means "unknown", not "no flags are supported".
72-
SupportedFlags []string `json:"supportedFlags,omitempty"`
73-
}
74-
75-
// Apparmor represents the "apparmor" field.
76-
type Apparmor struct {
77-
// Enabled is true if AppArmor support is compiled in.
78-
// Unrelated to whether the host supports AppArmor or not.
79-
// Nil value means "unknown", not "false".
80-
// Always true in the current version of runc.
81-
Enabled *bool `json:"enabled,omitempty"`
82-
}
83-
84-
// Selinux represents the "selinux" field.
85-
type Selinux struct {
86-
// Enabled is true if SELinux support is compiled in.
87-
// Unrelated to whether the host supports SELinux or not.
88-
// Nil value means "unknown", not "false".
89-
// Always true in the current version of runc.
90-
Enabled *bool `json:"enabled,omitempty"`
91-
}
92-
93-
// Cgroup represents the "cgroup" field.
94-
type Cgroup struct {
95-
// V1 represents whether Cgroup v1 support is compiled in.
96-
// Unrelated to whether the host uses cgroup v1 or not.
97-
// Nil value means "unknown", not "false".
98-
// Always true in the current version of runc.
99-
V1 *bool `json:"v1,omitempty"`
100-
101-
// V2 represents whether Cgroup v2 support is compiled in.
102-
// Unrelated to whether the host uses cgroup v2 or not.
103-
// Nil value means "unknown", not "false".
104-
// Always true in the current version of runc.
105-
V2 *bool `json:"v2,omitempty"`
106-
107-
// Systemd represents whether systemd-cgroup support is compiled in.
108-
// Unrelated to whether the host uses systemd or not.
109-
// Nil value means "unknown", not "false".
110-
// Always true in the current version of runc.
111-
Systemd *bool `json:"systemd,omitempty"`
112-
113-
// SystemdUser represents whether user-scoped systemd-cgroup support is compiled in.
114-
// Unrelated to whether the host uses systemd or not.
115-
// Nil value means "unknown", not "false".
116-
// Always true in the current version of runc.
117-
SystemdUser *bool `json:"systemdUser,omitempty"`
118-
}
119-
1204
const (
1215
// AnnotationRuncVersion represents the version of runc, e.g., "1.2.3", "1.2.3+dev", "1.2.3-rc.4.", "1.2.3-rc.4+dev".
1226
// Third party implementations such as crun and runsc MAY use this annotation to report the most compatible runc version,

vendor/github.com/opencontainers/runtime-spec/specs-go/config.go

+18-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)