From 84f06794ff8ef37fb117797708d8045db2dcf94f Mon Sep 17 00:00:00 2001 From: Samuel Bernardo Date: Wed, 12 Jun 2024 00:15:00 +0100 Subject: Add containerd recent release Signed-off-by: Samuel Bernardo --- app-containers/containerd/Manifest | 5 ++ app-containers/containerd/containerd-1.7.18.ebuild | 86 ++++++++++++++++++++++ app-containers/containerd/files/containerd.confd | 3 + app-containers/containerd/files/containerd.initd | 26 +++++++ app-containers/containerd/metadata.xml | 24 ++++++ 5 files changed, 144 insertions(+) create mode 100644 app-containers/containerd/Manifest create mode 100644 app-containers/containerd/containerd-1.7.18.ebuild create mode 100644 app-containers/containerd/files/containerd.confd create mode 100644 app-containers/containerd/files/containerd.initd create mode 100644 app-containers/containerd/metadata.xml diff --git a/app-containers/containerd/Manifest b/app-containers/containerd/Manifest new file mode 100644 index 0000000..7f16599 --- /dev/null +++ b/app-containers/containerd/Manifest @@ -0,0 +1,5 @@ +AUX containerd.confd 124 BLAKE2B 25f72941a47374fa0de3a2dce3d8ca57420f013a0d7527e59697499490ed964b7606819c6d67b9eee1ac6691fa52a65750446d8e46ed9af708d946c24e86704b SHA512 66d891b0d2a541fee2017382ccbea6ea3f93d94c4ff15e1d8626ed84d3d7c0231b0939b2473804d41ac3ad2714267255347d1c671e1d99952d484a8b555948be +AUX containerd.initd 794 BLAKE2B 88a1976615e4e9d67c10ed3748aadd74ae13ef4cf004bb5b5d45216275715e3acffa8c0c98309d81298795ac007bde02d2f3afd466c7c54e58012a12f156198f SHA512 f31b088e988beb84ef029992255018561417c0e92803dffe35ec481515e1be79ba4611cc139bb5000b0ac79a437f1a6dec3516d6f9580d4b384f1e0f092d8370 +DIST containerd-1.7.18.tar.gz 9958128 BLAKE2B be015500dbd23f30b7046cfe717c2af2e66c8119af1b39bda35e2f78c170159851cb8d10a50bfcfb3407ffc011d07788888f7e026b70908667077f5596e43ea0 SHA512 39ecc27246f4f9e9827df2ef52574287b16cb5da0ffd954a4bfa29f063f453ec97feb82cc30ff27410e091ba535c1a941ddd10021256c71021b397eb86024f12 +EBUILD containerd-1.7.18.ebuild 1979 BLAKE2B 7554f583e3637d657f400c184e0b702a81495de56c5846731421b94ffc3db27988b0ed956d8b55786e2a040c106876c65e764700897673c5bf90a2ada5488f3a SHA512 a7f1733f2d0e4e41941f7b101dd61ff03ff1c2423f1680ca31fa8e299cfe24f2d5fb631862defc754234075f0ab23cee41a7e3eb1c85968b23dbb368d0a18705 +MISC metadata.xml 981 BLAKE2B 78f44dd46331f9159931ff289a5adfdc177cb5e0c1d12cf717fad4f227b15ae40f479f40554dc4855009342cb7d699aaa543a0fbcc962789fe100a1cc9b350c5 SHA512 a171a3fcd67d8b410148d3e99477ea69be7e84ba2a2d24739343bfde29b88f8f799530c3b1107829ebd52eb847b4f5c25e4d4701ea9a2bc196c761b0768906d1 diff --git a/app-containers/containerd/containerd-1.7.18.ebuild b/app-containers/containerd/containerd-1.7.18.ebuild new file mode 100644 index 0000000..fecdf70 --- /dev/null +++ b/app-containers/containerd/containerd-1.7.18.ebuild @@ -0,0 +1,86 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit go-module systemd +GIT_REVISION=ae71819c4f5e67bb4d5ae76a6b735f29cc25774e + +DESCRIPTION="A daemon to control runC" +HOMEPAGE="https://containerd.io/" +SRC_URI="https://github.com/containerd/containerd/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" +IUSE="apparmor btrfs device-mapper +cri hardened +seccomp selinux test" + +DEPEND=" + btrfs? ( sys-fs/btrfs-progs ) + seccomp? ( sys-libs/libseccomp ) +" + +# recommended version of runc is found in script/setup/runc-version +RDEPEND=" + ${DEPEND} + ~app-containers/runc-1.1.12[apparmor?,seccomp?] +" + +BDEPEND=" + dev-go/go-md2man + virtual/pkgconfig +" + +# tests require root or docker +RESTRICT+="test" + +src_prepare() { + default + sed -i \ + -e "s/-s -w//" \ + -e "s/-mod=readonly//" \ + Makefile || die + sed -i \ + -e "s:/usr/local:/usr:" \ + containerd.service || die +} + +src_compile() { + local options=( + $(usev apparmor) + $(usex btrfs "" "no_btrfs") + $(usex cri "" "no_cri") + $(usex device-mapper "" "no_devmapper") + $(usev seccomp) + $(usev selinux) + ) + + myemakeargs=( + BUILDTAGS="${options[*]}" + LDFLAGS="$(usex hardened '-extldflags -fno-PIC' '')" + REVISION="${GIT_REVISION}" + VERSION=v${PV} + ) + + # race condition in man target https://bugs.gentoo.org/765100 + # we need to explicitly specify GOFLAGS for "go run" to use vendor source + emake "${myemakeargs[@]}" man -j1 #nowarn + emake "${myemakeargs[@]}" all + +} + +src_install() { + rm "${D}"/bin/gen-manpages + dobin bin/* + doman man/* + newconfd "${FILESDIR}"/${PN}.confd "${PN}" + newinitd "${FILESDIR}"/${PN}.initd "${PN}" + systemd_dounit containerd.service + keepdir /var/lib/containerd + + # we already installed manpages, remove markdown source + # before installing docs directory + rm -r docs/man || die + + local DOCS=( ADOPTERS.md README.md RELEASES.md ROADMAP.md SCOPE.md docs/. ) + einstalldocs +} diff --git a/app-containers/containerd/files/containerd.confd b/app-containers/containerd/files/containerd.confd new file mode 100644 index 0000000..22ef832 --- /dev/null +++ b/app-containers/containerd/files/containerd.confd @@ -0,0 +1,3 @@ +# This is the delay to be used in the start_post function to wait for +# the socket to be active. +#containerd_socket_delay=5 diff --git a/app-containers/containerd/files/containerd.initd b/app-containers/containerd/files/containerd.initd new file mode 100644 index 0000000..143305c --- /dev/null +++ b/app-containers/containerd/files/containerd.initd @@ -0,0 +1,26 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="Containerd container runtime" +command="/usr/bin/containerd" +command_args="${command_args:-}" +command_background="true" +pidfile="${pidfile:-/run/${RC_SVCNAME}.pid}" +start_stop_daemon_args="--stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log --stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log" + +start_pre() { + checkpath -m 0750 -d "/var/log/${RC_SVCNAME}" + + ulimit -n 1048576 + + # Having non-zero limits causes performance problems due to accounting overhead + # in the kernel. We recommend using cgroups to do container-local accounting. + ulimit -u unlimited + + return 0 +} + +start_post() { + ewaitfile ${containerd_socket_delay:-5} /run/containerd/containerd.sock +} diff --git a/app-containers/containerd/metadata.xml b/app-containers/containerd/metadata.xml new file mode 100644 index 0000000..4ee50fa --- /dev/null +++ b/app-containers/containerd/metadata.xml @@ -0,0 +1,24 @@ + + + + + Containerd is a daemon with an API and a command line client, to manage + containers on one machine. It uses runC to run containers according to + the OCI specification. Containerd has advanced features such as seccomp + and user namespace support as well as checkpoint and restore for cloning + and live migration of containers. + + + williamh@gentoo.org + William Hubbs + + + Support for BTRFS snapshot driver + Support for Kubernetes CRI + Support for device mapper snapshot driver + + + containerd/containerd + cpe:/a:linuxfoundation:containerd + + -- cgit v1.2.3-65-gdbad