summaryrefslogtreecommitdiffstats
path: root/recipes-containers/runc/runc-docker/0002-Remove-Platform-as-no-longer-in-OCI-spec.patch
diff options
context:
space:
mode:
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.patch75
1 files changed, 0 insertions, 75 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
deleted file mode 100644
index 7970dec3..00000000
--- a/recipes-containers/runc/runc-docker/0002-Remove-Platform-as-no-longer-in-OCI-spec.patch
+++ /dev/null
@@ -1,75 +0,0 @@
1From e1146182a8cebb5a6133a9e298a5e4acf99652e9 Mon Sep 17 00:00:00 2001
2From: Justin Cormack <justin.cormack@docker.com>
3Date: Fri, 23 Jun 2017 17:16:08 -0700
4Subject: [PATCH 2/3] Remove Platform as no longer in OCI spec
5
6This was never used, just validated, so was removed from spec.
7
8Signed-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
14diff --git a/libcontainer/specconv/example.go b/libcontainer/specconv/example.go
15index 33134116..d6621194 100644
16--- a/src/import/libcontainer/specconv/example.go
17+++ b/src/import/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,
37diff --git a/spec.go b/spec.go
38index 92d38f57..876937d2 100644
39--- a/src/import/spec.go
40+++ b/src/import/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--
742.11.0
75