summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2020-09-22 15:25:48 -0700
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2020-09-22 15:50:57 -0700
commit1b388199dc189202d9739c02a2fcd15741739fed (patch)
tree6801c8233943706d711054b35d2e5677dd4c1961 /app-emulation/containerd
parentapp-emulation/runc: bump to 1.0.0_rc92 (diff)
downloadgentoo-1b388199dc189202d9739c02a2fcd15741739fed.tar.gz
gentoo-1b388199dc189202d9739c02a2fcd15741739fed.tar.bz2
gentoo-1b388199dc189202d9739c02a2fcd15741739fed.zip
app-emulation/containerd: bump to 1.4.1, improve ebuild
a lot of improvements, doc and manpage installation. device-mapper useflag added selinux useflag added Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'app-emulation/containerd')
-rw-r--r--app-emulation/containerd/Manifest1
-rw-r--r--app-emulation/containerd/containerd-1.4.1.ebuild85
-rw-r--r--app-emulation/containerd/files/containerd.initd-r126
-rw-r--r--app-emulation/containerd/metadata.xml1
4 files changed, 113 insertions, 0 deletions
diff --git a/app-emulation/containerd/Manifest b/app-emulation/containerd/Manifest
index 50dea9321e92..0008c98ed50e 100644
--- a/app-emulation/containerd/Manifest
+++ b/app-emulation/containerd/Manifest
@@ -7,3 +7,4 @@ DIST containerd-1.3.0.tar.gz 5697153 BLAKE2B c334cfd2aa11dd430c74bc9f3fe6f31d83f
DIST containerd-1.3.1.tar.gz 5703741 BLAKE2B 6eae3fe9714128e7a5378484115378629baf6c4f7ef4b795e625cc1fbc05323a123c2337c5b203a2c3c3b34486c81f7e5b3ad200c000c961931fc99347ef4513 SHA512 4991286d1a8a221dad24121c5e6cd31a00685d91e652546d0d97745624486450bc05ff4f889f2975c178c4c175fedd7b15f89121a7ce4e6687919aabd04501b4
DIST containerd-1.3.2.tar.gz 5704320 BLAKE2B 32ea22ff445cc66f4c8db8abdbaaa7fa0c8c620b294bda54f2319045af1925398057ba1a5cb5c265cfc73bcff5b49943013b517ecb3bd05f4504920c4a8d6f29 SHA512 768a19eb0829e196a61ddedaa11b0d6691caf8f9cc590a3e47ac77c1acad62e64b7a55017a1a6cccfcb87785a083d5ce131048b0e39e48c65e6cd5922382fc3c
DIST containerd-1.3.4.tar.gz 5700890 BLAKE2B 9d5642399eafbf3df25d2bdb6ffeb8e98362e9f2c6cdcd7a64fff12bad40f58fa97451228a607def408cc8a8cfbfce67c47fcfdf86865d8086d0b7aad7595d5a SHA512 b186d5aef3e5a0d35c12dcc3cfa5d48a9602f6278c4650942859a1ab6abd1299d33a1bc623376955a834a2626491196b604591d92a05d39745dfc33ff51ad5aa
+DIST containerd-1.4.1.tar.gz 6168048 BLAKE2B f050808d77c66caead8acba595b1cf91d7f386a77aae84d08840f458ba8141bb0e8763222f37b4295d2afedd5eb2fc311e8a69f6c01a08740ad27d2e7380b61f SHA512 e16196db59ba71cfd7e5515b8d2bc6336503e996419182274dfc5ac9caca901cf712f465698e9ff667747959faf93cdf66fe652c47a83a6ead6f6a3a22add43b
diff --git a/app-emulation/containerd/containerd-1.4.1.ebuild b/app-emulation/containerd/containerd-1.4.1.ebuild
new file mode 100644
index 000000000000..b1eae77465c4
--- /dev/null
+++ b/app-emulation/containerd/containerd-1.4.1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# update on bump
+CONTAINERD_COMMIT="c623d1b"
+EGO_PN="github.com/containerd/${PN}"
+MY_PV="${PV/_rc/-rc.}"
+
+inherit golang-vcs-snapshot toolchain-funcs
+
+DESCRIPTION="A daemon to control runC"
+HOMEPAGE="https://containerd.io/"
+SRC_URI="https://github.com/containerd/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+IUSE="apparmor btrfs device-mapper +cri hardened +seccomp selinux test"
+
+# ~pinned dependencies described in vendor.conf
+DEPEND="
+ btrfs? ( sys-fs/btrfs-progs )
+ seccomp? ( sys-libs/libseccomp )
+"
+
+RDEPEND="
+ ${DEPEND}
+ ~app-emulation/runc-1.0.0_rc92
+"
+
+BDEPEND="
+ dev-go/go-md2man
+ virtual/pkgconfig
+ test? ( "${RDEPEND}" )
+"
+
+# tests require root or docker
+# upstream does not recommend stripping binary
+RESTRICT="strip test"
+
+S="${WORKDIR}/${P}/src/${EGO_PN}"
+
+src_prepare() {
+ default
+ sed -i -e "s/git describe --match.*$/echo ${PV})/"\
+ -e "s/git rev-parse HEAD.*$/echo ${CONTAINERD_COMMIT})/"\
+ -e "s/-s -w//" \
+ Makefile || 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[*]}"
+ DESTDIR="${ED}"
+ LDFLAGS=$(usex hardened '-extldflags -fno-PIC' '')
+ )
+
+ export GOPATH="${WORKDIR}/${P}" # ${PWD}/vendor
+ export GOFLAGS="-v -x -mod=vendor"
+ emake "${myemakeargs[@]}" all man
+}
+
+src_install() {
+ dobin bin/*
+ doman man/*
+ newinitd "${FILESDIR}"/${PN}.initd-r1 "${PN}"
+ keepdir /var/lib/containerd
+
+ # we already installed manpages, remove markdown source
+ # before installing docs directory
+ rm -rf docs/man || die
+ local DOCS=( README.md PLUGINS.md docs/. )
+ einstalldocs
+}
diff --git a/app-emulation/containerd/files/containerd.initd-r1 b/app-emulation/containerd/files/containerd.initd-r1
new file mode 100644
index 000000000000..6536fc9ef209
--- /dev/null
+++ b/app-emulation/containerd/files/containerd.initd-r1
@@ -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 5 /run/containerd/containerd.sock
+}
diff --git a/app-emulation/containerd/metadata.xml b/app-emulation/containerd/metadata.xml
index 148cffdb35a3..534d7d6a1880 100644
--- a/app-emulation/containerd/metadata.xml
+++ b/app-emulation/containerd/metadata.xml
@@ -20,6 +20,7 @@
<flag name="apparmor">Support for AppArmor</flag>
<flag name="btrfs">Support for BTRFS snapshot driver</flag>
<flag name="cri">Support for Kubernetes CRI</flag>
+ <flag name="device-mapper">Support for device mapper snapshot driver</flag>
</use>
<upstream>
<remote-id type="github">containerd/containerd</remote-id>