mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 12:50:22 +02:00
containerd: remove container-docker and consolidate .inc files
There has been a warning in the containerd-docker recipe for quite some time, which indicates that it will be removed in the future. That time has come and we delete that recipe. It is no longer updated and everyone should be using the opencontainers variant. Now that we don't need the .inc, we delete it and consolidate in the single recipe. We also enable the systemd service by default, since docker is no longer in the picture and starting the daemon/service. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
parent
cd6feb72b8
commit
e0cd8599f1
|
@ -1,22 +0,0 @@
|
||||||
SRCREV = "3addd840653146c90a254301d6c3a663c7fd6429"
|
|
||||||
SRC_URI = "\
|
|
||||||
git://github.com/docker/containerd.git;branch=v0.2.x;destsuffix=git/src/github.com/containerd/containerd \
|
|
||||||
"
|
|
||||||
|
|
||||||
|
|
||||||
LIC_FILES_CHKSUM = "file://LICENSE.code;md5=aadc30f9c14d876ded7bedc0afd2d3d7"
|
|
||||||
|
|
||||||
include containerd.inc
|
|
||||||
|
|
||||||
CONTAINERD_VERSION = "v0.2.x"
|
|
||||||
S = "${WORKDIR}/git/src/github.com/containerd/containerd"
|
|
||||||
|
|
||||||
PROVIDES += "virtual/containerd"
|
|
||||||
RPROVIDES_${PN} = "virtual/containerd"
|
|
||||||
|
|
||||||
DEPENDS += "btrfs-tools"
|
|
||||||
|
|
||||||
do_compile_prepend() {
|
|
||||||
bberror "${PN} is depreciated and will be removed in the future"
|
|
||||||
bbfatal "use container-opencontainers for a working configuration"
|
|
||||||
}
|
|
|
@ -1,11 +1,19 @@
|
||||||
|
HOMEPAGE = "https://github.com/docker/containerd"
|
||||||
|
SUMMARY = "containerd is a daemon to control runC"
|
||||||
|
DESCRIPTION = "containerd is a daemon to control runC, built for performance and density. \
|
||||||
|
containerd leverages runC's advanced features such as seccomp and user namespace \
|
||||||
|
support as well as checkpoint and restore for cloning and live migration of containers."
|
||||||
|
|
||||||
|
|
||||||
SRCREV = "33d90b72d1e44987118ac111d4f7a108d412099b"
|
SRCREV = "33d90b72d1e44987118ac111d4f7a108d412099b"
|
||||||
SRC_URI = "git://github.com/containerd/containerd;branch=release/1.4 \
|
SRC_URI = "git://github.com/containerd/containerd;branch=release/1.4 \
|
||||||
file://0001-build-use-oe-provided-GO-and-flags.patch \
|
file://0001-build-use-oe-provided-GO-and-flags.patch \
|
||||||
file://0001-Add-build-option-GODEBUG-1.patch \
|
file://0001-Add-build-option-GODEBUG-1.patch \
|
||||||
|
file://containerd.service \
|
||||||
"
|
"
|
||||||
|
|
||||||
include containerd.inc
|
# Apache-2.0 for containerd
|
||||||
|
LICENSE = "Apache-2.0"
|
||||||
LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=1269f40c0d099c21a871163984590d89"
|
LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=1269f40c0d099c21a871163984590d89"
|
||||||
|
|
||||||
CONTAINERD_VERSION = "v1.4.3"
|
CONTAINERD_VERSION = "v1.4.3"
|
||||||
|
@ -14,3 +22,97 @@ EXTRA_OEMAKE += "GODEBUG=1"
|
||||||
|
|
||||||
PROVIDES += "virtual/containerd"
|
PROVIDES += "virtual/containerd"
|
||||||
RPROVIDES_${PN} = "virtual/containerd"
|
RPROVIDES_${PN} = "virtual/containerd"
|
||||||
|
|
||||||
|
|
||||||
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
|
PV = "${CONTAINERD_VERSION}+git${SRCPV}"
|
||||||
|
|
||||||
|
inherit go
|
||||||
|
inherit goarch
|
||||||
|
|
||||||
|
GO_IMPORT = "import"
|
||||||
|
|
||||||
|
CONTAINERD_PKG="github.com/containerd/containerd"
|
||||||
|
|
||||||
|
INSANE_SKIP_${PN} += "ldflags"
|
||||||
|
|
||||||
|
do_configure[noexec] = "1"
|
||||||
|
|
||||||
|
do_compile() {
|
||||||
|
export GOARCH="${TARGET_GOARCH}"
|
||||||
|
|
||||||
|
# link fixups for compilation
|
||||||
|
rm -f ${S}/src/import/vendor/src
|
||||||
|
ln -sf ./ ${S}/src/import/vendor/src
|
||||||
|
|
||||||
|
mkdir -p ${S}/src/import/vendor/src/github.com/containerd/containerd/
|
||||||
|
mkdir -p ${S}/src/import/vendor/src/github.com/containerd/containerd/pkg/
|
||||||
|
mkdir -p ${S}/src/import/vendor/src/github.com/containerd/containerd/contrib/
|
||||||
|
# without this, the stress test parts of the build fail
|
||||||
|
cp ${S}/src/import/*.go ${S}/src/import/vendor/src/github.com/containerd/containerd
|
||||||
|
|
||||||
|
for c in content timeout ttrpcutil oom stdio process errdefs fs images mount snapshots linux api runtimes defaults progress \
|
||||||
|
protobuf reference diff platforms runtime remotes version archive dialer gc metadata \
|
||||||
|
metrics filters identifiers labels leases plugin server services \
|
||||||
|
cmd cio containers namespaces oci events log reaper sys rootfs nvidia seed apparmor seccomp; do
|
||||||
|
if [ -d ${S}/src/import/${c} ]; then
|
||||||
|
ln -sfn ${S}/src/import/${c} ${S}/src/import/vendor/github.com/containerd/containerd/${c}
|
||||||
|
fi
|
||||||
|
if [ -d ${S}/src/import/pkg/${c} ]; then
|
||||||
|
ln -sfn ${S}/src/import/pkg/${c} ${S}/src/import/vendor/github.com/containerd/containerd/pkg/${c}
|
||||||
|
fi
|
||||||
|
if [ -d ${S}/src/import/contrib/${c} ]; then
|
||||||
|
ln -sfn ${S}/src/import/contrib/${c} ${S}/src/import/vendor/github.com/containerd/containerd/contrib/${c}
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
|
||||||
|
export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
|
||||||
|
|
||||||
|
# Pass the needed cflags/ldflags so that cgo
|
||||||
|
# can find the needed headers files and libraries
|
||||||
|
export CGO_ENABLED="1"
|
||||||
|
export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
|
||||||
|
export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
|
||||||
|
export BUILDTAGS="no_btrfs static_build netgo"
|
||||||
|
export CFLAGS="${CFLAGS}"
|
||||||
|
export LDFLAGS="${LDFLAGS}"
|
||||||
|
export SHIM_CGO_ENABLED="${CGO_ENABLED}"
|
||||||
|
|
||||||
|
cd ${S}/src/import
|
||||||
|
oe_runmake binaries
|
||||||
|
}
|
||||||
|
|
||||||
|
inherit systemd
|
||||||
|
SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
|
||||||
|
SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','containerd.service','',d)}"
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
mkdir -p ${D}/${bindir}
|
||||||
|
|
||||||
|
cp ${S}/src/import/bin/containerd ${D}/${bindir}/containerd
|
||||||
|
cp ${S}/src/import/bin/containerd-shim ${D}/${bindir}/containerd-shim
|
||||||
|
cp ${S}/src/import/bin/containerd-shim-runc-v1 ${D}/${bindir}/containerd-shim-runc-v1
|
||||||
|
cp ${S}/src/import/bin/containerd-shim-runc-v2 ${D}/${bindir}/containerd-shim-runc-v2
|
||||||
|
cp ${S}/src/import/bin/ctr ${D}/${bindir}/containerd-ctr
|
||||||
|
|
||||||
|
ln -sf containerd ${D}/${bindir}/docker-containerd
|
||||||
|
ln -sf containerd-shim ${D}/${bindir}/docker-containerd-shim
|
||||||
|
ln -sf containerd-ctr ${D}/${bindir}/docker-containerd-ctr
|
||||||
|
|
||||||
|
ln -sf containerd-ctr ${D}/${bindir}/ctr
|
||||||
|
|
||||||
|
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
|
||||||
|
install -d ${D}${systemd_unitdir}/system
|
||||||
|
install -m 644 ${WORKDIR}/containerd.service ${D}/${systemd_unitdir}/system
|
||||||
|
# adjust from /usr/local/bin to /usr/bin/
|
||||||
|
sed -e "s:/usr/local/bin/containerd:${bindir}/docker-containerd:g" -i ${D}/${systemd_unitdir}/system/containerd.service
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
FILES_${PN} += "${systemd_system_unitdir}/*"
|
||||||
|
|
||||||
|
INSANE_SKIP_${PN} += "ldflags already-stripped"
|
||||||
|
|
||||||
|
COMPATIBLE_HOST = "^(?!(qemu)?mips).*"
|
||||||
|
|
|
@ -1,105 +0,0 @@
|
||||||
HOMEPAGE = "https://github.com/docker/containerd"
|
|
||||||
SUMMARY = "containerd is a daemon to control runC"
|
|
||||||
DESCRIPTION = "containerd is a daemon to control runC, built for performance and density. \
|
|
||||||
containerd leverages runC's advanced features such as seccomp and user namespace \
|
|
||||||
support as well as checkpoint and restore for cloning and live migration of containers."
|
|
||||||
|
|
||||||
# Apache-2.0 for containerd
|
|
||||||
LICENSE = "Apache-2.0"
|
|
||||||
LIC_FILES_CHKSUM ?= "file://src/import/LICENSE.code;md5=aadc30f9c14d876ded7bedc0afd2d3d7"
|
|
||||||
|
|
||||||
SRC_URI += "file://containerd.service"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
PV = "${CONTAINERD_VERSION}+git${SRCPV}"
|
|
||||||
|
|
||||||
inherit go
|
|
||||||
inherit goarch
|
|
||||||
|
|
||||||
GO_IMPORT = "import"
|
|
||||||
|
|
||||||
CONTAINERD_PKG="github.com/containerd/containerd"
|
|
||||||
|
|
||||||
INSANE_SKIP_${PN} += "ldflags"
|
|
||||||
|
|
||||||
do_configure[noexec] = "1"
|
|
||||||
|
|
||||||
do_compile() {
|
|
||||||
export GOARCH="${TARGET_GOARCH}"
|
|
||||||
|
|
||||||
# link fixups for compilation
|
|
||||||
rm -f ${S}/src/import/vendor/src
|
|
||||||
ln -sf ./ ${S}/src/import/vendor/src
|
|
||||||
|
|
||||||
mkdir -p ${S}/src/import/vendor/src/github.com/containerd/containerd/
|
|
||||||
mkdir -p ${S}/src/import/vendor/src/github.com/containerd/containerd/pkg/
|
|
||||||
mkdir -p ${S}/src/import/vendor/src/github.com/containerd/containerd/contrib/
|
|
||||||
# without this, the stress test parts of the build fail
|
|
||||||
cp ${S}/src/import/*.go ${S}/src/import/vendor/src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
for c in content timeout ttrpcutil oom stdio process errdefs fs images mount snapshots linux api runtimes defaults progress \
|
|
||||||
protobuf reference diff platforms runtime remotes version archive dialer gc metadata \
|
|
||||||
metrics filters identifiers labels leases plugin server services \
|
|
||||||
cmd cio containers namespaces oci events log reaper sys rootfs nvidia seed apparmor seccomp; do
|
|
||||||
if [ -d ${S}/src/import/${c} ]; then
|
|
||||||
ln -sfn ${S}/src/import/${c} ${S}/src/import/vendor/github.com/containerd/containerd/${c}
|
|
||||||
fi
|
|
||||||
if [ -d ${S}/src/import/pkg/${c} ]; then
|
|
||||||
ln -sfn ${S}/src/import/pkg/${c} ${S}/src/import/vendor/github.com/containerd/containerd/pkg/${c}
|
|
||||||
fi
|
|
||||||
if [ -d ${S}/src/import/contrib/${c} ]; then
|
|
||||||
ln -sfn ${S}/src/import/contrib/${c} ${S}/src/import/vendor/github.com/containerd/containerd/contrib/${c}
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
|
|
||||||
export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
|
|
||||||
|
|
||||||
# Pass the needed cflags/ldflags so that cgo
|
|
||||||
# can find the needed headers files and libraries
|
|
||||||
export CGO_ENABLED="1"
|
|
||||||
export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
|
|
||||||
export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
|
|
||||||
export BUILDTAGS="no_btrfs static_build netgo"
|
|
||||||
export CFLAGS="${CFLAGS}"
|
|
||||||
export LDFLAGS="${LDFLAGS}"
|
|
||||||
export SHIM_CGO_ENABLED="${CGO_ENABLED}"
|
|
||||||
|
|
||||||
cd ${S}/src/import
|
|
||||||
oe_runmake binaries
|
|
||||||
}
|
|
||||||
|
|
||||||
# Note: disabled for now, since docker is launching containerd
|
|
||||||
# inherit systemd
|
|
||||||
# SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
|
|
||||||
# SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','containerd.service','',d)}"
|
|
||||||
|
|
||||||
do_install() {
|
|
||||||
mkdir -p ${D}/${bindir}
|
|
||||||
|
|
||||||
cp ${S}/src/import/bin/containerd ${D}/${bindir}/containerd
|
|
||||||
cp ${S}/src/import/bin/containerd-shim ${D}/${bindir}/containerd-shim
|
|
||||||
cp ${S}/src/import/bin/containerd-shim-runc-v1 ${D}/${bindir}/containerd-shim-runc-v1
|
|
||||||
cp ${S}/src/import/bin/containerd-shim-runc-v2 ${D}/${bindir}/containerd-shim-runc-v2
|
|
||||||
cp ${S}/src/import/bin/ctr ${D}/${bindir}/containerd-ctr
|
|
||||||
|
|
||||||
ln -sf containerd ${D}/${bindir}/docker-containerd
|
|
||||||
ln -sf containerd-shim ${D}/${bindir}/docker-containerd-shim
|
|
||||||
ln -sf containerd-ctr ${D}/${bindir}/docker-containerd-ctr
|
|
||||||
|
|
||||||
ln -sf containerd-ctr ${D}/${bindir}/ctr
|
|
||||||
|
|
||||||
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
|
|
||||||
install -d ${D}${systemd_unitdir}/system
|
|
||||||
install -m 644 ${WORKDIR}/containerd.service ${D}/${systemd_unitdir}/system
|
|
||||||
# adjust from /usr/local/bin to /usr/bin/
|
|
||||||
sed -e "s:/usr/local/bin/containerd:${bindir}/docker-containerd:g" -i ${D}/${systemd_unitdir}/system/containerd.service
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
FILES_${PN} += "${systemd_system_unitdir}/*"
|
|
||||||
|
|
||||||
INSANE_SKIP_${PN} += "ldflags already-stripped"
|
|
||||||
|
|
||||||
COMPATIBLE_HOST = "^(?!(qemu)?mips).*"
|
|
Loading…
Reference in New Issue
Block a user