Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release 0.9.1 #774

Open
wants to merge 5 commits into
base: release-0.9.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# v0.9.1

This release is a hotfix based on v0.9.0 with runtime-spec 1.0.2 support and a
switch to Go modules, to allow `go install` to use the correct version of the
spec.

# Additions
* Switch to go modules.
* generate: add support for --process-umask (backport of #706).

# v0.9.0

## Additions
Expand Down Expand Up @@ -87,7 +97,7 @@
* validate: CheckLinux is platform dependent (#560).
* validation: Add error judgment to SetConfig (#585).
* validate: allow non-linux compatibility (#588).

## Minor fixes and documentation

* cgroups_v1: Correction parameters (#629).
Expand All @@ -106,7 +116,7 @@
* runtimetest: fix uid_map parsing (#596).
* Fix condition in BlockIO test (#595).
* generate/seccomp: platform independent values (#561).

# v0.5.0
## Additions

Expand Down
97 changes: 0 additions & 97 deletions Godeps/Godeps.json

This file was deleted.

5 changes: 0 additions & 5 deletions Godeps/Readme

This file was deleted.

2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.0
0.9.1+dev
5 changes: 5 additions & 0 deletions cmd/oci-runtime-tool/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ var generateFlags = []cli.Flag{
cli.BoolFlag{Name: "process-rlimits-remove-all", Usage: "remove all resource limits for processes inside the container. "},
cli.BoolFlag{Name: "process-terminal", Usage: "specifies whether a terminal is attached to the process"},
cli.IntFlag{Name: "process-uid", Usage: "uid for the process"},
cli.StringFlag{Name: "process-umask", Usage: "umask for the process"},
cli.StringFlag{Name: "process-username", Usage: "username for the process"},
cli.StringFlag{Name: "rootfs-path", Value: "rootfs", Usage: "path to the root filesystem"},
cli.BoolFlag{Name: "rootfs-readonly", Usage: "make the container's rootfs readonly"},
Expand Down Expand Up @@ -234,6 +235,10 @@ func setupSpec(g *generate.Generator, context *cli.Context) error {
g.SetProcessUsername(context.String("process-username"))
}

if context.IsSet("process-umask") {
g.SetProcessUmask(uint32(context.Int("process-umask")))
}

if context.IsSet("process-gid") {
g.SetProcessGID(uint32(context.Int("process-gid")))
}
Expand Down
6 changes: 6 additions & 0 deletions generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,12 @@ func (g *Generator) SetProcessUsername(username string) {
g.Config.Process.User.Username = username
}

// SetProcessUmask sets g.Config.Process.User.Umask.
func (g *Generator) SetProcessUmask(umask uint32) {
g.initConfigProcess()
g.Config.Process.User.Umask = umask
}

// SetProcessGID sets g.Config.Process.User.GID.
func (g *Generator) SetProcessGID(gid uint32) {
g.initConfigProcess()
Expand Down
27 changes: 27 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module github.com/opencontainers/runtime-tools

go 1.12

require (
github.com/blang/semver v3.5.0+incompatible
github.com/hashicorp/go-multierror v1.0.0
github.com/mndrix/tap-go v0.0.0-20171203230836-629fa407e90b
github.com/mrunalp/fileutils v0.0.0-20160930181131-4ee1cc9a8058
github.com/opencontainers/runtime-spec v1.0.2
github.com/opencontainers/selinux v1.0.1-0.20190118194646-2d93b96e1a01
github.com/satori/go.uuid v1.1.0
github.com/sirupsen/logrus v1.0.2-0.20170713114250-a3f95b5c4235
github.com/stretchr/testify v1.1.5-0.20170809224252-890a5c3458b4
github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8
github.com/urfave/cli v1.19.1
github.com/xeipuuv/gojsonschema v0.0.0-20170528113821-0c8571ac0ce1
golang.org/x/sys v0.0.0-20170407050850-f3918c30c5c2
)

require (
github.com/davecgh/go-spew v1.1.1-0.20170829195320-a47672248388 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20170225233418-6fe8760cad35 // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20150808065054-e02fc20de94c // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
40 changes: 40 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
github.com/blang/semver v3.5.0+incompatible h1:CGxCgetQ64DKk7rdZ++Vfnb1+ogGNnB17OJKJXD2Cfs=
github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
github.com/davecgh/go-spew v1.1.1-0.20170829195320-a47672248388 h1:c9n+0y02ovmvU9O/gS/fqw6HRlUwG645A2AJckmQVy0=
github.com/davecgh/go-spew v1.1.1-0.20170829195320-a47672248388/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o=
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
github.com/mndrix/tap-go v0.0.0-20171203230836-629fa407e90b h1:Ga1nclDSe8gOw37MVLMhfu2QKWtD6gvtQ298zsKVh8g=
github.com/mndrix/tap-go v0.0.0-20171203230836-629fa407e90b/go.mod h1:pzzDgJWZ34fGzaAZGFW22KVZDfyrYW+QABMrWnJBnSs=
github.com/mrunalp/fileutils v0.0.0-20160930181131-4ee1cc9a8058 h1:A4y2IxU1GcIzlcmUlQ6yr/mrvYZhqo+HakAPwgwaa6s=
github.com/mrunalp/fileutils v0.0.0-20160930181131-4ee1cc9a8058/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0=
github.com/opencontainers/runtime-spec v1.0.2 h1:UfAcuLBJB9Coz72x1hgl8O5RVzTdNiaglX6v2DM6FI0=
github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
github.com/opencontainers/selinux v1.0.1-0.20190118194646-2d93b96e1a01 h1:dnzLtetwnb+YigvM1T8m88Gvtum9Z+XA4r7WqWz+dlk=
github.com/opencontainers/selinux v1.0.1-0.20190118194646-2d93b96e1a01/go.mod h1:+BLncwf63G4dgOzykXAxcmnFlUaOlkDdmw/CqsW6pjs=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/satori/go.uuid v1.1.0 h1:B9KXyj+GzIpJbV7gmr873NsY6zpbxNy24CBtGrk7jHo=
github.com/satori/go.uuid v1.1.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
github.com/sirupsen/logrus v1.0.2-0.20170713114250-a3f95b5c4235 h1:aPIH7fk87dLHot2nJ8bbakmAgwM4RZJtGEkwQ52pQCg=
github.com/sirupsen/logrus v1.0.2-0.20170713114250-a3f95b5c4235/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
github.com/stretchr/testify v1.1.5-0.20170809224252-890a5c3458b4 h1:c5DdG2to+wHgjlxcmknq5BnzaaJ0N0W842kLlOSurXc=
github.com/stretchr/testify v1.1.5-0.20170809224252-890a5c3458b4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8 h1:zLV6q4e8Jv9EHjNg/iHfzwDkCve6Ua5jCygptrtXHvI=
github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
github.com/urfave/cli v1.19.1 h1:0mKm4ZoB74PxYmZVua162y1dGt1qc10MyymYRBf3lb8=
github.com/urfave/cli v1.19.1/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/xeipuuv/gojsonpointer v0.0.0-20170225233418-6fe8760cad35 h1:0TnXeVP6mx+A4CBf8cQVkQfkhyGBQCmJcT4g6zKzm7M=
github.com/xeipuuv/gojsonpointer v0.0.0-20170225233418-6fe8760cad35/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
github.com/xeipuuv/gojsonreference v0.0.0-20150808065054-e02fc20de94c h1:XZWnr3bsDQWAZg4Ne+cPoXRPILrNlPNQfxBuwLl43is=
github.com/xeipuuv/gojsonreference v0.0.0-20150808065054-e02fc20de94c/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
github.com/xeipuuv/gojsonschema v0.0.0-20170528113821-0c8571ac0ce1 h1:p7SJSlzQ0w/wo+yjj+lnaOsAFlC0AL+t6QWkR2P7X18=
github.com/xeipuuv/gojsonschema v0.0.0-20170528113821-0c8571ac0ce1/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs=
golang.org/x/sys v0.0.0-20170407050850-f3918c30c5c2 h1:niKkabq6kYToDafvvFw9MeTkT4ifSvpOCRP6pFxOCZE=
golang.org/x/sys v0.0.0-20170407050850-f3918c30c5c2/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
4 changes: 2 additions & 2 deletions validate/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func TestJSONSchema(t *testing.T) {
}{
{
config: &rspec.Spec{},
error: "1 error occurred:\n\t* Version string empty\nRefer to: https://github.com/opencontainers/runtime-spec/blob/v1.0.1/config.md#specification-version\n\n",
error: "1 error occurred:\n\t* Version string empty\nRefer to: https://github.com/opencontainers/runtime-spec/blob/v1.0.2/config.md#specification-version\n\n",
},
{
config: &rspec.Spec{
Expand All @@ -62,7 +62,7 @@ func TestJSONSchema(t *testing.T) {
Version: "1.0.0",
Process: &rspec.Process{},
},
error: "process.args: Invalid type. Expected: array, given: null",
error: "1 error occurred:\n\t* args: args is required\n\n",
},
{
config: &rspec.Spec{
Expand Down
1 change: 1 addition & 0 deletions validation/process_user/process_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ func main() {
g.SetProcessUID(10)
g.SetProcessGID(10)
g.AddProcessAdditionalGid(5)
g.SetProcessUmask(002)
case "windows":
g.SetProcessUsername("test")
default:
Expand Down
2 changes: 1 addition & 1 deletion vendor/github.com/hashicorp/errwrap/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions vendor/github.com/hashicorp/errwrap/go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/mndrix/tap-go/tap.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading