diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2019-02-10 23:59:47 +0000 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2019-02-11 02:34:05 +0000 |
commit | f4853222b5d599672658e6d134370c48a0068f48 (patch) | |
tree | 8d6cfa189643fd0f3f74d0e4aa6fba5efd6caaab | |
parent | d63b33b18fa3914b67f4a8c65fa3bb44c3416bb1 (diff) | |
download | meta-virtualization-f4853222b5d599672658e6d134370c48a0068f48.tar.gz |
containerd: update to v1.2.0
refreshing the containerd support to 1.2.x. We have to tweak the package
linking and update the go compile patch, but otherwise, the build is
unchanged.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
3 files changed, 46 insertions, 15 deletions
diff --git a/recipes-containers/containerd/containerd-opencontainers_git.bb b/recipes-containers/containerd/containerd-opencontainers_git.bb index c6b4f5e4..7755f7db 100644 --- a/recipes-containers/containerd/containerd-opencontainers_git.bb +++ b/recipes-containers/containerd/containerd-opencontainers_git.bb | |||
@@ -1,11 +1,13 @@ | |||
1 | SRCREV = "cfd04396dc68220d1cecbe686a6cc3aa5ce3667c" | 1 | SRCREV = "0190e5f3900227fc739afbc8f4a03df968dc337b" |
2 | SRC_URI = "git://github.com/containerd/containerd;nobranch=1 \ | 2 | SRC_URI = "git://github.com/containerd/containerd;nobranch=1 \ |
3 | file://0001-build-use-oe-provided-GO-and-flags.patch \ | 3 | file://0001-build-use-oe-provided-GO-and-flags.patch \ |
4 | " | 4 | " |
5 | 5 | ||
6 | include containerd.inc | 6 | include containerd.inc |
7 | 7 | ||
8 | CONTAINERD_VERSION = "v1.0.2" | 8 | LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=1269f40c0d099c21a871163984590d89" |
9 | |||
10 | CONTAINERD_VERSION = "v1.2.0" | ||
9 | 11 | ||
10 | PROVIDES += "virtual/containerd" | 12 | PROVIDES += "virtual/containerd" |
11 | RPROVIDES_${PN} = "virtual/containerd" | 13 | RPROVIDES_${PN} = "virtual/containerd" |
diff --git a/recipes-containers/containerd/containerd.inc b/recipes-containers/containerd/containerd.inc index a3f13011..91b4ebc6 100644 --- a/recipes-containers/containerd/containerd.inc +++ b/recipes-containers/containerd/containerd.inc | |||
@@ -34,14 +34,24 @@ do_compile() { | |||
34 | ln -sf ./ ${S}/src/import/vendor/src | 34 | ln -sf ./ ${S}/src/import/vendor/src |
35 | 35 | ||
36 | mkdir -p ${S}/src/import/vendor/src/github.com/containerd/containerd/ | 36 | mkdir -p ${S}/src/import/vendor/src/github.com/containerd/containerd/ |
37 | mkdir -p ${S}/src/import/vendor/src/github.com/containerd/containerd/pkg/ | ||
38 | mkdir -p ${S}/src/import/vendor/src/github.com/containerd/containerd/contrib/ | ||
37 | # without this, the stress test parts of the build fail | 39 | # without this, the stress test parts of the build fail |
38 | cp ${S}/src/import/*.go ${S}/src/import/vendor/src/github.com/containerd/containerd | 40 | cp ${S}/src/import/*.go ${S}/src/import/vendor/src/github.com/containerd/containerd |
39 | 41 | ||
40 | for c in content errdefs fs images mount snapshots linux api runtimes defaults progress \ | 42 | for c in content errdefs fs images mount snapshots linux api runtimes defaults progress \ |
41 | protobuf reference diff platforms runtime remotes version archive dialer gc metadata \ | 43 | protobuf reference diff platforms runtime remotes version archive dialer gc metadata \ |
42 | metrics filters identifiers labels leases plugin server services \ | 44 | metrics filters identifiers labels leases plugin server services \ |
43 | cmd cio containers namespaces oci events log reaper sys rootfs; do | 45 | cmd cio containers namespaces oci events log reaper sys rootfs nvidia seed apparmor seccomp; do |
44 | ln -sfn ${S}/src/import/${c} ${S}/src/import/vendor/github.com/containerd/containerd/${c} | 46 | if [ -d ${S}/src/import/${c} ]; then |
47 | ln -sfn ${S}/src/import/${c} ${S}/src/import/vendor/github.com/containerd/containerd/${c} | ||
48 | fi | ||
49 | if [ -d ${S}/src/import/pkg/${c} ]; then | ||
50 | ln -sfn ${S}/src/import/pkg/${c} ${S}/src/import/vendor/github.com/containerd/containerd/pkg/${c} | ||
51 | fi | ||
52 | if [ -d ${S}/src/import/contrib/${c} ]; then | ||
53 | ln -sfn ${S}/src/import/contrib/${c} ${S}/src/import/vendor/github.com/containerd/containerd/contrib/${c} | ||
54 | fi | ||
45 | done | 55 | done |
46 | 56 | ||
47 | export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" | 57 | export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" |
diff --git a/recipes-containers/containerd/files/0001-build-use-oe-provided-GO-and-flags.patch b/recipes-containers/containerd/files/0001-build-use-oe-provided-GO-and-flags.patch index 75a984be..c2433f14 100644 --- a/recipes-containers/containerd/files/0001-build-use-oe-provided-GO-and-flags.patch +++ b/recipes-containers/containerd/files/0001-build-use-oe-provided-GO-and-flags.patch | |||
@@ -1,26 +1,45 @@ | |||
1 | From e31acef290181434efaf47e70db7ad0d92dbe300 Mon Sep 17 00:00:00 2001 | 1 | From 408e8b526d490af817a64b7220e8e2c3789de58f Mon Sep 17 00:00:00 2001 |
2 | From: Bruce Ashfield <bruce.ashfield@windriver.com> | 2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> |
3 | Date: Thu, 19 Apr 2018 17:09:51 -0400 | 3 | Date: Sun, 10 Feb 2019 23:46:06 +0000 |
4 | Subject: [PATCH] build: use oe provided GO and flags | 4 | Subject: [PATCH] build: use oe provided GO and flags |
5 | 5 | ||
6 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | 6 | We want to use the go compiler as defined in the oe-enviroment, not the |
7 | generic call to 'go'. Without changing this, we'll get things like cgo | ||
8 | errors and invalid flag combos. | ||
9 | |||
10 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
7 | --- | 11 | --- |
8 | Makefile | 2 +- | 12 | Makefile | 8 ++++---- |
9 | 1 file changed, 1 insertion(+), 1 deletion(-) | 13 | 1 file changed, 4 insertions(+), 4 deletions(-) |
10 | 14 | ||
11 | diff --git a/src/import/Makefile b/src/import/Makefile | 15 | diff --git a/src/import/Makefile b/src/import/Makefile |
12 | index 9d8cf8a18fbc..492d033fe2a7 100644 | 16 | index 8e680133..fd7d2813 100644 |
13 | --- a/src/import/Makefile | 17 | --- a/src/import/Makefile |
14 | +++ b/src/import/Makefile | 18 | +++ b/src/import/Makefile |
15 | @@ -134,7 +134,7 @@ bin/%: cmd/% FORCE | 19 | @@ -179,19 +179,19 @@ FORCE: |
20 | # Build a binary from a cmd. | ||
21 | bin/%: cmd/% FORCE | ||
22 | @echo "$(WHALE) $@${BINARY_SUFFIX}" | ||
23 | - @go build ${DEBUG_GO_GCFLAGS} ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@${BINARY_SUFFIX} ${GO_LDFLAGS} ${GO_TAGS} ./$< | ||
24 | + @$(GO) build ${GO_BUILD_FLAGS} ${DEBUG_GO_GCFLAGS} ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@${BINARY_SUFFIX} ${GO_LDFLAGS} ${GO_TAGS} ./$< | ||
16 | 25 | ||
17 | bin/containerd-shim: cmd/containerd-shim FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220 | 26 | bin/containerd-shim: cmd/containerd-shim FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220 |
18 | @echo "$(WHALE) bin/containerd-shim" | 27 | @echo "$(WHALE) bin/containerd-shim" |
19 | - @CGO_ENABLED=0 go build -o bin/containerd-shim ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim | 28 | - @CGO_ENABLED=0 go build ${GO_BUILD_FLAGS} -o bin/containerd-shim ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim |
20 | + @$(GO) build -o bin/containerd-shim ${SHIM_GO_LDFLAGS} $(GOBUILDFLAGS) ${GO_TAGS} ./cmd/containerd-shim | 29 | + @$(GO) build ${GO_BUILD_FLAGS} -o bin/containerd-shim ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim |
30 | |||
31 | bin/containerd-shim-runc-v1: cmd/containerd-shim-runc-v1 FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220 | ||
32 | @echo "$(WHALE) bin/containerd-shim-runc-v1" | ||
33 | - @CGO_ENABLED=0 go build ${GO_BUILD_FLAGS} -o bin/containerd-shim-runc-v1 ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v1 | ||
34 | + @$(GO) build ${GO_BUILD_FLAGS} -o bin/containerd-shim-runc-v1 ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v1 | ||
35 | |||
36 | bin/containerd-shim-runhcs-v1: cmd/containerd-shim-runhcs-v1 FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220 | ||
37 | @echo "$(WHALE) bin/containerd-shim-runhcs-v1${BINARY_SUFFIX}" | ||
38 | - @CGO_ENABLED=0 go build ${GO_BUILD_FLAGS} -o bin/containerd-shim-runhcs-v1${BINARY_SUFFIX} ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runhcs-v1 | ||
39 | + @$(GO) build ${GO_BUILD_FLAGS} -o bin/containerd-shim-runhcs-v1${BINARY_SUFFIX} ${SHIM_GO_LDFLAGS} $(GOBUILDFLAGS) ${GO_TAGS} ./cmd/containerd-shim-runhcs-v1 | ||
21 | 40 | ||
22 | binaries: $(BINARIES) ## build binaries | 41 | binaries: $(BINARIES) ## build binaries |
23 | @echo "$(WHALE) $@" | 42 | @echo "$(WHALE) $@" |
24 | -- | 43 | -- |
25 | 2.4.0.53.g8440f74 | 44 | 2.19.1 |
26 | 45 | ||