diff options
Diffstat (limited to 'recipes-containers/runc/runc-docker/0002-Remove-Platform-as-no-longer-in-OCI-spec.patch')
-rw-r--r-- | recipes-containers/runc/runc-docker/0002-Remove-Platform-as-no-longer-in-OCI-spec.patch | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/recipes-containers/runc/runc-docker/0002-Remove-Platform-as-no-longer-in-OCI-spec.patch b/recipes-containers/runc/runc-docker/0002-Remove-Platform-as-no-longer-in-OCI-spec.patch new file mode 100644 index 00000000..6ec286a8 --- /dev/null +++ b/recipes-containers/runc/runc-docker/0002-Remove-Platform-as-no-longer-in-OCI-spec.patch | |||
@@ -0,0 +1,75 @@ | |||
1 | From e1146182a8cebb5a6133a9e298a5e4acf99652e9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Justin Cormack <justin.cormack@docker.com> | ||
3 | Date: Fri, 23 Jun 2017 17:16:08 -0700 | ||
4 | Subject: [PATCH 2/3] Remove Platform as no longer in OCI spec | ||
5 | |||
6 | This was never used, just validated, so was removed from spec. | ||
7 | |||
8 | Signed-off-by: Justin Cormack <justin.cormack@docker.com> | ||
9 | --- | ||
10 | libcontainer/specconv/example.go | 5 ----- | ||
11 | spec.go | 14 -------------- | ||
12 | 2 files changed, 19 deletions(-) | ||
13 | |||
14 | diff --git a/libcontainer/specconv/example.go b/libcontainer/specconv/example.go | ||
15 | index 33134116..d6621194 100644 | ||
16 | --- a/libcontainer/specconv/example.go | ||
17 | +++ b/libcontainer/specconv/example.go | ||
18 | @@ -2,7 +2,6 @@ package specconv | ||
19 | |||
20 | import ( | ||
21 | "os" | ||
22 | - "runtime" | ||
23 | "strings" | ||
24 | |||
25 | "github.com/opencontainers/runtime-spec/specs-go" | ||
26 | @@ -15,10 +14,6 @@ func sPtr(s string) *string { return &s } | ||
27 | func Example() *specs.Spec { | ||
28 | return &specs.Spec{ | ||
29 | Version: specs.Version, | ||
30 | - Platform: specs.Platform{ | ||
31 | - OS: runtime.GOOS, | ||
32 | - Arch: runtime.GOARCH, | ||
33 | - }, | ||
34 | Root: specs.Root{ | ||
35 | Path: "rootfs", | ||
36 | Readonly: true, | ||
37 | diff --git a/spec.go b/spec.go | ||
38 | index 92d38f57..876937d2 100644 | ||
39 | --- a/spec.go | ||
40 | +++ b/spec.go | ||
41 | @@ -7,7 +7,6 @@ import ( | ||
42 | "fmt" | ||
43 | "io/ioutil" | ||
44 | "os" | ||
45 | - "runtime" | ||
46 | |||
47 | "github.com/opencontainers/runc/libcontainer/configs" | ||
48 | "github.com/opencontainers/runc/libcontainer/specconv" | ||
49 | @@ -131,9 +130,6 @@ func loadSpec(cPath string) (spec *specs.Spec, err error) { | ||
50 | if err = json.NewDecoder(cf).Decode(&spec); err != nil { | ||
51 | return nil, err | ||
52 | } | ||
53 | - if err = validatePlatform(&spec.Platform); err != nil { | ||
54 | - return nil, err | ||
55 | - } | ||
56 | return spec, validateProcessSpec(spec.Process) | ||
57 | } | ||
58 | |||
59 | @@ -148,13 +144,3 @@ func createLibContainerRlimit(rlimit specs.LinuxRlimit) (configs.Rlimit, error) | ||
60 | Soft: rlimit.Soft, | ||
61 | }, nil | ||
62 | } | ||
63 | - | ||
64 | -func validatePlatform(platform *specs.Platform) error { | ||
65 | - if platform.OS != runtime.GOOS { | ||
66 | - return fmt.Errorf("target os %s mismatch with current os %s", platform.OS, runtime.GOOS) | ||
67 | - } | ||
68 | - if platform.Arch != runtime.GOARCH { | ||
69 | - return fmt.Errorf("target arch %s mismatch with current arch %s", platform.Arch, runtime.GOARCH) | ||
70 | - } | ||
71 | - return nil | ||
72 | -} | ||
73 | -- | ||
74 | 2.11.0 | ||
75 | |||