meta-virtualization/recipes-containers/containerd/containerd_git.bb
Bruce Ashfield 578c27a645 containerd: update to v2.0.3
Bumping containerd to version v2.0.3, which comprises the following commits:

    eaa7ca80d proxy: break up writes from the remote writer to avoid grpc limits
    c7f64196f Fix privileged container sysfs can't be rw because pod is ro by default
    569af34cb Prefer runtime options for PluginInfo request
    b8dde9189 Prepare release notes for v2.0.3
    0ce93e16a prevent oom watcher depend on shim pkg.
    f3284aa68 CI: arm64-8core-32gb -> ubuntu-24.04-arm
    92ae2951f Update CDI dependency to v0.8.1.
    f95a426b8 move the device after the options when using mkfs.ext4
    4d19a6adf update build to go1.23.6, test go1.24.0
    c738c3aab build(deps): bump actions/cache from 4.1.2 to 4.2.0
    b5313993c Revert "Add timestamp to PodSandboxStatusResponse for kubernetes Evented PLEG"
    697c59c63 Update runc binary to v1.2.5
    fcf64305c Update vendor files to fix build failure
    d3437eb29 Upgrade x/net to 0.33.0
    0785bd8cc Update install-imgcrypt to allow change install repo
    06891f899 fix go-cni race condition
    79cdbf61b cri,nri: block NRI plugin sync. during event processing.
    9d5cfce83 Update github.com/containerd/imgcrypt to v2.0.0
    1f4e5688e update to go1.23.5 / go1.22.11
    f58939c33 Remove deprecated WithCDIDevices in oci spec opts
    3d53430fe Move CDI device spec out of the OCI package
    3a6ab80d0 build(deps): bump google.golang.org/protobuf from 1.35.1 to 1.35.2
    cdaf4dfb4 Prepare release notes for v2.0.2
    eb125e1dd Update platforms to latest rc
    468079c5c Remove confusing warning in cri runtime config migration
    a2d9d4fd5 Fix runtime platform loading in cri image plugin init
    184ffad01 Add integ test to check tty leak
    17181ed33 fix master tty leak due to leaking init container object
    8666e7422 Bump up otelttrpc to 0.1.0
    7373ddd70 update runc binary to v1.2.4
    c4270430d ctr: `ctr images import --all-platforms`: fix unpack
    f34147772 downgrade go-difflib and go-spew to tagged releases

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2025-03-06 17:17:59 +00:00

106 lines
3.9 KiB
BlitzBasic

HOMEPAGE = "https://github.com/containerd/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 = "06b99ca80cdbfbc6cc8bd567021738c9af2b36ce"
SRC_URI = "git://github.com/containerd/containerd;branch=release/2.0;protocol=https;destsuffix=git/src/github.com/containerd/containerd/v2 \
file://0001-Makefile-allow-GO_BUILD_FLAGS-to-be-externally-speci.patch \
file://0001-build-don-t-use-gcflags-to-define-trimpath.patch \
file://cni-containerd-net.conflist \
"
# Apache-2.0 for containerd
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1269f40c0d099c21a871163984590d89"
CONTAINERD_VERSION = "v2.0.2"
CVE_VERSION = "v2.0.2"
# EXTRA_OEMAKE += "GODEBUG=1"
# containerd-opencontainers is to provide compatibility with external
# packagegroups / recipes that depend on the existing split of containerd
# between docker and opencontainers. We can drop it in the future.
PROVIDES += "virtual/containerd containerd-opencontainers"
RPROVIDES:${PN} = "virtual-containerd containerd-opencontainers"
S = "${WORKDIR}/git/src/github.com/containerd/containerd/v2"
PV = "${CONTAINERD_VERSION}+git"
inherit go
inherit goarch
GO_IMPORT = "import"
INSANE_SKIP:${PN} += "ldflags"
do_configure[noexec] = "1"
do_compile() {
export GOARCH="${TARGET_GOARCH}"
export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go:${WORKDIR}/git/"
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}"
# fixes:
# cannot find package runtime/cgo (using -importcfg)
# ... recipe-sysroot-native/usr/lib/aarch64-poky-linux/go/pkg/tool/linux_amd64/link:
# cannot open file : open : no such file or directory
export GO_BUILD_FLAGS="-trimpath -a -pkgdir dontusecurrentpkgs"
export GO111MODULE=off
cd ${S}
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}/bin/containerd ${D}/${bindir}/containerd
cp ${S}/bin/containerd-shim-runc-v2 ${D}/${bindir}/containerd-shim-runc-v2
cp ${S}/bin/ctr ${D}/${bindir}/containerd-ctr
ln -sf containerd ${D}/${bindir}/docker-containerd
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 ${S}/containerd.service ${D}/${systemd_unitdir}/system
# adjust from /usr/local/bin to /usr/bin/
sed -e "s:/usr/local/bin/containerd:${bindir}/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).*"
RDEPENDS:${PN} += " ${VIRTUAL-RUNTIME_container_runtime}"
## This may need to be made conditional on K3S or similar being
## configured in the distro, since we may have collisions.
CNI_NETWORKING_FILES ?= "${UNPACKDIR}/cni-containerd-net.conflist"
inherit cni_networking