summaryrefslogtreecommitdiffstats
path: root/recipes-containers/containerd/containerd-opencontainers_git.bb
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2024-04-26 20:52:43 +0000
committerBruce Ashfield <bruce.ashfield@gmail.com>2024-05-13 22:32:38 -0400
commite7a13cbbc39fd61d8192f5d4427111f666c9ab8b (patch)
tree86f64d4b7de17cf3e07617381ceefa95df0f3941 /recipes-containers/containerd/containerd-opencontainers_git.bb
parent89e2b594dcfd0643b84830dce5e7a5e2cbb046cd (diff)
downloadmeta-virtualization-e7a13cbbc39fd61d8192f5d4427111f666c9ab8b.tar.gz
containerd: consolidate to "containerd"
We no longer need the split between container-docker and containerd-opencontainers and dependent layers have been given over a year to adapt. We do keep the provides and rprovides around for a bit longer, but those will also be removed in the future. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-containers/containerd/containerd-opencontainers_git.bb')
-rw-r--r--recipes-containers/containerd/containerd-opencontainers_git.bb99
1 files changed, 0 insertions, 99 deletions
diff --git a/recipes-containers/containerd/containerd-opencontainers_git.bb b/recipes-containers/containerd/containerd-opencontainers_git.bb
deleted file mode 100644
index ed73e398..00000000
--- a/recipes-containers/containerd/containerd-opencontainers_git.bb
+++ /dev/null
@@ -1,99 +0,0 @@
1HOMEPAGE = "https://github.com/containerd/containerd"
2SUMMARY = "containerd is a daemon to control runC"
3DESCRIPTION = "containerd is a daemon to control runC, built for performance and density. \
4 containerd leverages runC's advanced features such as seccomp and user namespace \
5 support as well as checkpoint and restore for cloning and live migration of containers."
6
7
8SRCREV = "b1624c3628954e769dd50783b63823040b2db38c"
9SRC_URI = "git://github.com/containerd/containerd;branch=main;protocol=https;destsuffix=git/src/github.com/containerd/containerd/v2 \
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 \
12 file://0001-Makefile-update-default-PACKAGE-to-v2.patch \
13 "
14
15# Apache-2.0 for containerd
16LICENSE = "Apache-2.0"
17LIC_FILES_CHKSUM = "file://LICENSE;md5=1269f40c0d099c21a871163984590d89"
18
19CONTAINERD_VERSION = "v2.0.0-beta.0"
20CVE_VERSION = "v2.0.0-beta.0"
21
22# EXTRA_OEMAKE += "GODEBUG=1"
23
24PROVIDES += "virtual/containerd"
25RPROVIDES:${PN} = "virtual-containerd"
26
27S = "${WORKDIR}/git/src/github.com/containerd/containerd/v2"
28
29PV = "${CONTAINERD_VERSION}+git"
30
31inherit go
32inherit goarch
33
34GO_IMPORT = "import"
35
36INSANE_SKIP:${PN} += "ldflags"
37
38do_configure[noexec] = "1"
39
40do_compile() {
41 export GOARCH="${TARGET_GOARCH}"
42
43 export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go:${WORKDIR}/git/"
44 export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
45
46 # Pass the needed cflags/ldflags so that cgo
47 # can find the needed headers files and libraries
48 export CGO_ENABLED="1"
49 export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
50 export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
51 export BUILDTAGS="no_btrfs static_build netgo"
52 export CFLAGS="${CFLAGS}"
53 export LDFLAGS="${LDFLAGS}"
54 export SHIM_CGO_ENABLED="${CGO_ENABLED}"
55 # fixes:
56 # cannot find package runtime/cgo (using -importcfg)
57 # ... recipe-sysroot-native/usr/lib/aarch64-poky-linux/go/pkg/tool/linux_amd64/link:
58 # cannot open file : open : no such file or directory
59 export GO_BUILD_FLAGS="-trimpath -a -pkgdir dontusecurrentpkgs"
60 export GO111MODULE=off
61
62 cd ${S}
63
64 oe_runmake binaries
65}
66
67inherit systemd
68SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
69SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','containerd.service','',d)}"
70
71do_install() {
72 mkdir -p ${D}/${bindir}
73
74 cp ${S}/bin/containerd ${D}/${bindir}/containerd
75 cp ${S}/bin/containerd-shim-runc-v2 ${D}/${bindir}/containerd-shim-runc-v2
76 cp ${S}/bin/ctr ${D}/${bindir}/containerd-ctr
77
78 ln -sf containerd ${D}/${bindir}/docker-containerd
79 ln -sf containerd-ctr ${D}/${bindir}/docker-containerd-ctr
80
81 ln -sf containerd-ctr ${D}/${bindir}/ctr
82
83 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
84 install -d ${D}${systemd_unitdir}/system
85 install -m 644 ${S}/containerd.service ${D}/${systemd_unitdir}/system
86 # adjust from /usr/local/bin to /usr/bin/
87 sed -e "s:/usr/local/bin/containerd:${bindir}/containerd:g" -i ${D}/${systemd_unitdir}/system/containerd.service
88 fi
89}
90
91FILES:${PN} += "${systemd_system_unitdir}/*"
92
93INSANE_SKIP:${PN} += "ldflags already-stripped"
94
95COMPATIBLE_HOST = "^(?!(qemu)?mips).*"
96
97RDEPENDS:${PN} += " ${VIRTUAL-RUNTIME_container_runtime}"
98
99CVE_PRODUCT = "containerd"