From 2451e7a683fe1dc76feea8a264d98b764fa03521 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Tue, 11 Aug 2020 14:38:11 +0200 Subject: [PATCH] vendor: update runtime-spec to d3f079a3f Signed-off-by: Giuseppe Scrivano --- Godeps/Godeps.json | 6 ++--- cmd/oci-runtime-tool/generate.go | 3 ++- generate/generate.go | 2 +- validation/process_user/process_user.go | 3 ++- .../runtime-spec/specs-go/config.go | 22 ++++++++++--------- .../runtime-spec/specs-go/state.go | 18 +++++++++++++++ .../runtime-spec/specs-go/version.go | 2 +- 7 files changed, 39 insertions(+), 17 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 7fd6d4aed..ef6efa8dd 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,7 +1,7 @@ { "ImportPath": "github.com/opencontainers/runtime-tools", "GoVersion": "go1.7", - "GodepVersion": "v77", + "GodepVersion": "v80", "Packages": [ "./..." ], @@ -35,8 +35,8 @@ }, { "ImportPath": "github.com/opencontainers/runtime-spec/specs-go", - "Comment": "v1.0.2", - "Rev": "c4ee7d12c742ffe806cd9350b6af3b4b19faed6f" + "Comment": "v1.0.2-18-gd3f079a", + "Rev": "d3f079a3fd5c503631012f71bc0fda66dcc9e755" }, { "ImportPath": "github.com/pmezard/go-difflib/difflib", diff --git a/cmd/oci-runtime-tool/generate.go b/cmd/oci-runtime-tool/generate.go index 950b64136..2a9bd9d1a 100644 --- a/cmd/oci-runtime-tool/generate.go +++ b/cmd/oci-runtime-tool/generate.go @@ -236,7 +236,8 @@ func setupSpec(g *generate.Generator, context *cli.Context) error { } if context.IsSet("process-umask") { - g.SetProcessUmask(uint32(context.Int("process-umask"))) + umask := uint32(context.Int("process-umask")) + g.SetProcessUmask(&umask) } if context.IsSet("process-gid") { diff --git a/generate/generate.go b/generate/generate.go index c757c20e0..f40aaa27e 100644 --- a/generate/generate.go +++ b/generate/generate.go @@ -445,7 +445,7 @@ func (g *Generator) SetProcessUsername(username string) { } // SetProcessUmask sets g.Config.Process.User.Umask. -func (g *Generator) SetProcessUmask(umask uint32) { +func (g *Generator) SetProcessUmask(umask *uint32) { g.initConfigProcess() g.Config.Process.User.Umask = umask } diff --git a/validation/process_user/process_user.go b/validation/process_user/process_user.go index ae6e526b5..603f7a3ec 100644 --- a/validation/process_user/process_user.go +++ b/validation/process_user/process_user.go @@ -17,7 +17,8 @@ func main() { g.SetProcessUID(10) g.SetProcessGID(10) g.AddProcessAdditionalGid(5) - g.SetProcessUmask(002) + umask := uint32(002) + g.SetProcessUmask(&umask) case "windows": g.SetProcessUsername("test") default: diff --git a/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go b/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go index c7c7c3d08..3dc9efd23 100644 --- a/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go +++ b/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go @@ -90,7 +90,7 @@ type User struct { // GID is the group id. GID uint32 `json:"gid" platform:"linux,solaris"` // Umask is the umask for the init process. - Umask uint32 `json:"umask,omitempty" platform:"linux,solaris"` + Umask *uint32 `json:"umask,omitempty" platform:"linux,solaris"` // AdditionalGids are additional group ids set for the container's process. AdditionalGids []uint32 `json:"additionalGids,omitempty" platform:"linux,solaris"` // Username is the user name. @@ -635,12 +635,13 @@ type LinuxSeccompAction string // Define actions for Seccomp rules const ( - ActKill LinuxSeccompAction = "SCMP_ACT_KILL" - ActTrap LinuxSeccompAction = "SCMP_ACT_TRAP" - ActErrno LinuxSeccompAction = "SCMP_ACT_ERRNO" - ActTrace LinuxSeccompAction = "SCMP_ACT_TRACE" - ActAllow LinuxSeccompAction = "SCMP_ACT_ALLOW" - ActLog LinuxSeccompAction = "SCMP_ACT_LOG" + ActKill LinuxSeccompAction = "SCMP_ACT_KILL" + ActKillProcess LinuxSeccompAction = "SCMP_ACT_KILL_PROCESS" + ActTrap LinuxSeccompAction = "SCMP_ACT_TRAP" + ActErrno LinuxSeccompAction = "SCMP_ACT_ERRNO" + ActTrace LinuxSeccompAction = "SCMP_ACT_TRACE" + ActAllow LinuxSeccompAction = "SCMP_ACT_ALLOW" + ActLog LinuxSeccompAction = "SCMP_ACT_LOG" ) // LinuxSeccompOperator used to match syscall arguments in Seccomp @@ -667,9 +668,10 @@ type LinuxSeccompArg struct { // LinuxSyscall is used to match a syscall in Seccomp type LinuxSyscall struct { - Names []string `json:"names"` - Action LinuxSeccompAction `json:"action"` - Args []LinuxSeccompArg `json:"args,omitempty"` + Names []string `json:"names"` + Action LinuxSeccompAction `json:"action"` + ErrnoRet *uint `json:"errnoRet,omitempty"` + Args []LinuxSeccompArg `json:"args,omitempty"` } // LinuxIntelRdt has container runtime resource constraints for Intel RDT diff --git a/vendor/github.com/opencontainers/runtime-spec/specs-go/state.go b/vendor/github.com/opencontainers/runtime-spec/specs-go/state.go index 89dce34be..765300f4d 100644 --- a/vendor/github.com/opencontainers/runtime-spec/specs-go/state.go +++ b/vendor/github.com/opencontainers/runtime-spec/specs-go/state.go @@ -1,5 +1,23 @@ package specs +// ContainerState represents the state of a container. +type ContainerState string + +const ( + // StateCreating indicates that the container is being created + StateCreating ContainerState = "creating" + + // StateCreated indicates that the runtime has finished the create operation + StateCreated ContainerState = "created" + + // StateRunning indicates that the container process has executed the + // user-specified program but has not exited + StateRunning ContainerState = "running" + + // StateStopped indicates that the container process has exited + StateStopped ContainerState = "stopped" +) + // State holds information about the runtime state of the container. type State struct { // Version is the version of the specification that is supported. diff --git a/vendor/github.com/opencontainers/runtime-spec/specs-go/version.go b/vendor/github.com/opencontainers/runtime-spec/specs-go/version.go index bda7e1ca9..596af0c2f 100644 --- a/vendor/github.com/opencontainers/runtime-spec/specs-go/version.go +++ b/vendor/github.com/opencontainers/runtime-spec/specs-go/version.go @@ -11,7 +11,7 @@ const ( VersionPatch = 2 // VersionDev indicates development branch. Releases will be empty string. - VersionDev = "" + VersionDev = "-dev" ) // Version is the specification version that the package types support.