mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 20:59:41 +02:00

Recently in the oe-core the go.bbclass changed and requires the defition of the GO_IMPORT variable. This was intended to simplify how the compilation works with go packages and it is still a work in progress. This patch set makes the recipes compatible to generate the same end result as before using the new go.bbclass from oe-core. Any patches that were included in the recipes had to have the paths adjusted because the new go.bbclass manipulates the notion of S to be S + "src" + "$GO_IMPORT" internally for the purpose of unpack, patch and compile. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
76 lines
2.1 KiB
Diff
76 lines
2.1 KiB
Diff
From e1146182a8cebb5a6133a9e298a5e4acf99652e9 Mon Sep 17 00:00:00 2001
|
|
From: Justin Cormack <justin.cormack@docker.com>
|
|
Date: Fri, 23 Jun 2017 17:16:08 -0700
|
|
Subject: [PATCH 2/3] Remove Platform as no longer in OCI spec
|
|
|
|
This was never used, just validated, so was removed from spec.
|
|
|
|
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
|
|
---
|
|
libcontainer/specconv/example.go | 5 -----
|
|
spec.go | 14 --------------
|
|
2 files changed, 19 deletions(-)
|
|
|
|
diff --git a/libcontainer/specconv/example.go b/libcontainer/specconv/example.go
|
|
index 33134116..d6621194 100644
|
|
--- a/src/import/libcontainer/specconv/example.go
|
|
+++ b/src/import/libcontainer/specconv/example.go
|
|
@@ -2,7 +2,6 @@ package specconv
|
|
|
|
import (
|
|
"os"
|
|
- "runtime"
|
|
"strings"
|
|
|
|
"github.com/opencontainers/runtime-spec/specs-go"
|
|
@@ -15,10 +14,6 @@ func sPtr(s string) *string { return &s }
|
|
func Example() *specs.Spec {
|
|
return &specs.Spec{
|
|
Version: specs.Version,
|
|
- Platform: specs.Platform{
|
|
- OS: runtime.GOOS,
|
|
- Arch: runtime.GOARCH,
|
|
- },
|
|
Root: specs.Root{
|
|
Path: "rootfs",
|
|
Readonly: true,
|
|
diff --git a/spec.go b/spec.go
|
|
index 92d38f57..876937d2 100644
|
|
--- a/src/import/spec.go
|
|
+++ b/src/import/spec.go
|
|
@@ -7,7 +7,6 @@ import (
|
|
"fmt"
|
|
"io/ioutil"
|
|
"os"
|
|
- "runtime"
|
|
|
|
"github.com/opencontainers/runc/libcontainer/configs"
|
|
"github.com/opencontainers/runc/libcontainer/specconv"
|
|
@@ -131,9 +130,6 @@ func loadSpec(cPath string) (spec *specs.Spec, err error) {
|
|
if err = json.NewDecoder(cf).Decode(&spec); err != nil {
|
|
return nil, err
|
|
}
|
|
- if err = validatePlatform(&spec.Platform); err != nil {
|
|
- return nil, err
|
|
- }
|
|
return spec, validateProcessSpec(spec.Process)
|
|
}
|
|
|
|
@@ -148,13 +144,3 @@ func createLibContainerRlimit(rlimit specs.LinuxRlimit) (configs.Rlimit, error)
|
|
Soft: rlimit.Soft,
|
|
}, nil
|
|
}
|
|
-
|
|
-func validatePlatform(platform *specs.Platform) error {
|
|
- if platform.OS != runtime.GOOS {
|
|
- return fmt.Errorf("target os %s mismatch with current os %s", platform.OS, runtime.GOOS)
|
|
- }
|
|
- if platform.Arch != runtime.GOARCH {
|
|
- return fmt.Errorf("target arch %s mismatch with current arch %s", platform.Arch, runtime.GOARCH)
|
|
- }
|
|
- return nil
|
|
-}
|
|
--
|
|
2.11.0
|
|
|