diff options
author | William Hubbs <williamh@gentoo.org> | 2023-07-21 00:16:59 -0500 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2023-07-21 00:16:59 -0500 |
commit | f6743108984f2bb1e4a900ab7110168afe2731a1 (patch) | |
tree | 8a9a35164296fc7d3859955e5f1b6b3176abf2b8 /app-containers/containerd | |
parent | app-containers/docker: add 24.0.4-r1 for go 1.20.6 (diff) | |
download | gentoo-f6743108984f2bb1e4a900ab7110168afe2731a1.tar.gz gentoo-f6743108984f2bb1e4a900ab7110168afe2731a1.tar.bz2 gentoo-f6743108984f2bb1e4a900ab7110168afe2731a1.zip |
app-containers/containerd: add 1.7.1-r1 to drop gen-manpages binary
Signed-off-by: William Hubbs <williamh@gentoo.org>
Diffstat (limited to 'app-containers/containerd')
-rw-r--r-- | app-containers/containerd/containerd-1.7.1-r1.ebuild | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/app-containers/containerd/containerd-1.7.1-r1.ebuild b/app-containers/containerd/containerd-1.7.1-r1.ebuild new file mode 100644 index 000000000000..b5779d355999 --- /dev/null +++ b/app-containers/containerd/containerd-1.7.1-r1.ebuild @@ -0,0 +1,86 @@ +# Copyright 2022-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit go-module systemd +GIT_REVISION=2806fc1057397dbaeefbea0e4e17bddfbd388f38 + +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.7[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 +} |