diff options
4 files changed, 21 insertions, 47 deletions
diff --git a/recipes-containers/containerd/containerd-opencontainers/0001-Makefile-allow-GO_BUILD_FLAGS-to-be-externally-speci.patch b/recipes-containers/containerd/containerd-opencontainers/0001-Makefile-allow-GO_BUILD_FLAGS-to-be-externally-speci.patch index 7f4d7518..0ef0d38f 100644 --- a/recipes-containers/containerd/containerd-opencontainers/0001-Makefile-allow-GO_BUILD_FLAGS-to-be-externally-speci.patch +++ b/recipes-containers/containerd/containerd-opencontainers/0001-Makefile-allow-GO_BUILD_FLAGS-to-be-externally-speci.patch | |||
@@ -19,10 +19,10 @@ Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | |||
19 | Makefile | 3 ++- | 19 | Makefile | 3 ++- |
20 | 1 file changed, 2 insertions(+), 1 deletion(-) | 20 | 1 file changed, 2 insertions(+), 1 deletion(-) |
21 | 21 | ||
22 | diff --git git.orig/src/import/Makefile git.orig/src/import/Makefile | 22 | diff --git git.orig/Makefile git.orig/Makefile |
23 | index c61418e60..54a10eb42 100644 | 23 | index c61418e60..54a10eb42 100644 |
24 | --- git.orig/src/import/Makefile | 24 | --- git.orig/Makefile |
25 | +++ git.orig/src/import/Makefile | 25 | +++ git.orig/Makefile |
26 | @@ -112,7 +112,8 @@ endif | 26 | @@ -112,7 +112,8 @@ endif |
27 | GOPATHS=$(shell echo ${GOPATH} | tr ":" "\n" | tr ";" "\n") | 27 | GOPATHS=$(shell echo ${GOPATH} | tr ":" "\n" | tr ";" "\n") |
28 | 28 | ||
diff --git a/recipes-containers/containerd/containerd-opencontainers/0001-build-don-t-use-gcflags-to-define-trimpath.patch b/recipes-containers/containerd/containerd-opencontainers/0001-build-don-t-use-gcflags-to-define-trimpath.patch index f1dea5a4..b499de5d 100644 --- a/recipes-containers/containerd/containerd-opencontainers/0001-build-don-t-use-gcflags-to-define-trimpath.patch +++ b/recipes-containers/containerd/containerd-opencontainers/0001-build-don-t-use-gcflags-to-define-trimpath.patch | |||
@@ -13,10 +13,10 @@ Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | |||
13 | Makefile | 1 - | 13 | Makefile | 1 - |
14 | 1 file changed, 1 deletion(-) | 14 | 1 file changed, 1 deletion(-) |
15 | 15 | ||
16 | diff --git git.orig/src/import/Makefile git.orig/src/import/Makefile | 16 | diff --git git.orig/Makefile git.orig/Makefile |
17 | index 4a6c13042..debb57925 100644 | 17 | index 4a6c13042..debb57925 100644 |
18 | --- git.orig/src/import/Makefile | 18 | --- git.orig/Makefile |
19 | +++ git.orig/src/import/Makefile | 19 | +++ git.orig/Makefile |
20 | @@ -130,7 +130,6 @@ TESTFLAGS_RACE= | 20 | @@ -130,7 +130,6 @@ TESTFLAGS_RACE= |
21 | # See Golang issue re: '-trimpath': https://github.com/golang/go/issues/13809 | 21 | # See Golang issue re: '-trimpath': https://github.com/golang/go/issues/13809 |
22 | GO_GCFLAGS=$(shell \ | 22 | GO_GCFLAGS=$(shell \ |
diff --git a/recipes-containers/containerd/containerd-opencontainers_git.bb b/recipes-containers/containerd/containerd-opencontainers_git.bb index edc3a5cb..8847f31f 100644 --- a/recipes-containers/containerd/containerd-opencontainers_git.bb +++ b/recipes-containers/containerd/containerd-opencontainers_git.bb | |||
@@ -6,14 +6,14 @@ DESCRIPTION = "containerd is a daemon to control runC, built for performance and | |||
6 | 6 | ||
7 | 7 | ||
8 | SRCREV = "579a6380ec93ab92a6e7f26167fe4f18dfcf2a4b" | 8 | SRCREV = "579a6380ec93ab92a6e7f26167fe4f18dfcf2a4b" |
9 | SRC_URI = "git://github.com/containerd/containerd;branch=release/1.6;protocol=https \ | 9 | SRC_URI = "git://github.com/containerd/containerd;branch=release/1.6;protocol=https;destsuffix=git/src/github.com/containerd/containerd \ |
10 | file://0001-Makefile-allow-GO_BUILD_FLAGS-to-be-externally-speci.patch \ | 10 | file://0001-Makefile-allow-GO_BUILD_FLAGS-to-be-externally-speci.patch \ |
11 | file://0001-build-don-t-use-gcflags-to-define-trimpath.patch \ | 11 | file://0001-build-don-t-use-gcflags-to-define-trimpath.patch \ |
12 | " | 12 | " |
13 | 13 | ||
14 | # Apache-2.0 for containerd | 14 | # Apache-2.0 for containerd |
15 | LICENSE = "Apache-2.0" | 15 | LICENSE = "Apache-2.0" |
16 | LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=1269f40c0d099c21a871163984590d89" | 16 | LIC_FILES_CHKSUM = "file://LICENSE;md5=1269f40c0d099c21a871163984590d89" |
17 | 17 | ||
18 | CONTAINERD_VERSION = "v1.6.8" | 18 | CONTAINERD_VERSION = "v1.6.8" |
19 | CVE_VERSION = "1.6.8" | 19 | CVE_VERSION = "1.6.8" |
@@ -23,7 +23,7 @@ CVE_VERSION = "1.6.8" | |||
23 | PROVIDES += "virtual/containerd" | 23 | PROVIDES += "virtual/containerd" |
24 | RPROVIDES:${PN} = "virtual-containerd" | 24 | RPROVIDES:${PN} = "virtual-containerd" |
25 | 25 | ||
26 | S = "${WORKDIR}/git" | 26 | S = "${WORKDIR}/git/src/github.com/containerd/containerd" |
27 | 27 | ||
28 | PV = "${CONTAINERD_VERSION}+git${SRCPV}" | 28 | PV = "${CONTAINERD_VERSION}+git${SRCPV}" |
29 | 29 | ||
@@ -41,34 +41,7 @@ do_configure[noexec] = "1" | |||
41 | do_compile() { | 41 | do_compile() { |
42 | export GOARCH="${TARGET_GOARCH}" | 42 | export GOARCH="${TARGET_GOARCH}" |
43 | 43 | ||
44 | # link fixups for compilation | 44 | export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go:${WORKDIR}/git/" |
45 | rm -f ${S}/src/import/vendor/src | ||
46 | ln -sf ./ ${S}/src/import/vendor/src | ||
47 | |||
48 | mkdir -p ${S}/src/import/vendor/src/github.com/containerd/containerd/ | ||
49 | mkdir -p ${S}/src/import/vendor/src/github.com/containerd/containerd/pkg/ | ||
50 | mkdir -p ${S}/src/import/vendor/src/github.com/containerd/containerd/contrib/ | ||
51 | # without this, the stress test parts of the build fail | ||
52 | cp ${S}/src/import/*.go ${S}/src/import/vendor/src/github.com/containerd/containerd | ||
53 | |||
54 | for c in content timeout ttrpcutil oom stdio process errdefs fs images mount snapshots linux api runtimes defaults progress \ | ||
55 | protobuf reference diff platforms runtime remotes version archive dialer gc metadata \ | ||
56 | metrics filters identifiers labels leases plugin server services \ | ||
57 | cmd cio containers namespaces oci events log reaper sys rootfs nvidia seed apparmor seccomp \ | ||
58 | cap cri userns atomic ioutil os registrar seutil runtimeoptions netns \ | ||
59 | shutdown schedcore tracing kmutex; do | ||
60 | if [ -d ${S}/src/import/${c} ]; then | ||
61 | ln -sfn ${S}/src/import/${c} ${S}/src/import/vendor/github.com/containerd/containerd/${c} | ||
62 | fi | ||
63 | if [ -d ${S}/src/import/pkg/${c} ]; then | ||
64 | ln -sfn ${S}/src/import/pkg/${c} ${S}/src/import/vendor/github.com/containerd/containerd/pkg/${c} | ||
65 | fi | ||
66 | if [ -d ${S}/src/import/contrib/${c} ]; then | ||
67 | ln -sfn ${S}/src/import/contrib/${c} ${S}/src/import/vendor/github.com/containerd/containerd/contrib/${c} | ||
68 | fi | ||
69 | done | ||
70 | |||
71 | export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" | ||
72 | export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" | 45 | export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" |
73 | 46 | ||
74 | # Pass the needed cflags/ldflags so that cgo | 47 | # Pass the needed cflags/ldflags so that cgo |
@@ -87,7 +60,8 @@ do_compile() { | |||
87 | export GO_BUILD_FLAGS="-trimpath -a -pkgdir dontusecurrentpkgs" | 60 | export GO_BUILD_FLAGS="-trimpath -a -pkgdir dontusecurrentpkgs" |
88 | export GO111MODULE=off | 61 | export GO111MODULE=off |
89 | 62 | ||
90 | cd ${S}/src/import | 63 | cd ${S} |
64 | |||
91 | oe_runmake binaries | 65 | oe_runmake binaries |
92 | } | 66 | } |
93 | 67 | ||
@@ -98,11 +72,11 @@ SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','conta | |||
98 | do_install() { | 72 | do_install() { |
99 | mkdir -p ${D}/${bindir} | 73 | mkdir -p ${D}/${bindir} |
100 | 74 | ||
101 | cp ${S}/src/import/bin/containerd ${D}/${bindir}/containerd | 75 | cp ${S}/bin/containerd ${D}/${bindir}/containerd |
102 | cp ${S}/src/import/bin/containerd-shim ${D}/${bindir}/containerd-shim | 76 | cp ${S}/bin/containerd-shim ${D}/${bindir}/containerd-shim |
103 | cp ${S}/src/import/bin/containerd-shim-runc-v1 ${D}/${bindir}/containerd-shim-runc-v1 | 77 | cp ${S}/bin/containerd-shim-runc-v1 ${D}/${bindir}/containerd-shim-runc-v1 |
104 | cp ${S}/src/import/bin/containerd-shim-runc-v2 ${D}/${bindir}/containerd-shim-runc-v2 | 78 | cp ${S}/bin/containerd-shim-runc-v2 ${D}/${bindir}/containerd-shim-runc-v2 |
105 | cp ${S}/src/import/bin/ctr ${D}/${bindir}/containerd-ctr | 79 | cp ${S}/bin/ctr ${D}/${bindir}/containerd-ctr |
106 | 80 | ||
107 | ln -sf containerd ${D}/${bindir}/docker-containerd | 81 | ln -sf containerd ${D}/${bindir}/docker-containerd |
108 | ln -sf containerd-shim ${D}/${bindir}/docker-containerd-shim | 82 | ln -sf containerd-shim ${D}/${bindir}/docker-containerd-shim |
@@ -112,7 +86,7 @@ do_install() { | |||
112 | 86 | ||
113 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | 87 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
114 | install -d ${D}${systemd_unitdir}/system | 88 | install -d ${D}${systemd_unitdir}/system |
115 | install -m 644 ${S}/src/import/containerd.service ${D}/${systemd_unitdir}/system | 89 | install -m 644 ${S}/containerd.service ${D}/${systemd_unitdir}/system |
116 | # adjust from /usr/local/bin to /usr/bin/ | 90 | # adjust from /usr/local/bin to /usr/bin/ |
117 | sed -e "s:/usr/local/bin/containerd:${bindir}/containerd:g" -i ${D}/${systemd_unitdir}/system/containerd.service | 91 | sed -e "s:/usr/local/bin/containerd:${bindir}/containerd:g" -i ${D}/${systemd_unitdir}/system/containerd.service |
118 | fi | 92 | fi |
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 544881ef..95f23172 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 | |||
@@ -12,10 +12,10 @@ Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | |||
12 | Makefile | 8 ++++---- | 12 | Makefile | 8 ++++---- |
13 | 1 file changed, 4 insertions(+), 4 deletions(-) | 13 | 1 file changed, 4 insertions(+), 4 deletions(-) |
14 | 14 | ||
15 | Index: git/src/import/Makefile | 15 | Index: git/Makefile |
16 | =================================================================== | 16 | =================================================================== |
17 | --- git.orig/src/import/Makefile | 17 | --- git.orig/Makefile |
18 | +++ git/src/import/Makefile | 18 | +++ git/Makefile |
19 | @@ -121,7 +121,7 @@ | 19 | @@ -121,7 +121,7 @@ |
20 | TESTFLAGS_PARALLEL ?= 8 | 20 | TESTFLAGS_PARALLEL ?= 8 |
21 | 21 | ||