Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app-emulation/containerd/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST containerd-2.0.5-fb4c30d.tar.gz 10456686 BLAKE2B 5e619789910dec14a6b8e7e709b5761ad0c8ca98512da3b77d3a19cfc0ed164e90e46ad2bdb0aa459dcbc189a26c1737d95c1e8aaa7e1b0505dfbe6246525f14 SHA512 fd56cd560decfc396860daba79dbf734f07072a031cbd6274f7516a16d4612b6aaa914132107307e12af4fe5f01c7c92ebde3489855e6e352a7f3637e4b2ac38
DIST containerd-2.1.1-cb10766.tar.gz 10611313 BLAKE2B 76757bac64ecacd75014919b6fde003e0e7b796c72c9be7064bbb3b436ae717a84755c9341e9a7ba0e2ea9df3185d6b041df3dd0e7413f4bd05b60e4bdae8167 SHA512 1e09954dc23ec48dbed844eb905b20972e74d8ad34b65ff97b282a0d6ba55ec5e90eaf333aec00cfda7824afee60dd43fd33fbc424a3b994c311a39c97edf6cb
90 changes: 90 additions & 0 deletions app-emulation/containerd/containerd-2.1.1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Distributed under the terms of the GNU General Public License v2

EAPI=7
inherit go-module systemd

DESCRIPTION="A daemon to control runC"
HOMEPAGE="https://containerd.io/"
SRC_URI="https://github.com/containerd/containerd/tarball/cb1076646aa3740577fafbf3d914198b7fe8e3f7 -> containerd-2.1.1-cb10766.tar.gz"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="*"
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 at https://github.com/containerd/containerd/tree/release/1.5/script/setup
RDEPEND="
${DEPEND}
app-emulation/runc
"

BDEPEND="
dev-go/go-md2man
virtual/pkgconfig
"

# tests require root or docker
# upstream does not recommend stripping binary
RESTRICT+=" strip test"

post_src_unpack() {
if [ ! -d "${S}" ]; then
mv containerd-containerd* "${S}" || die
fi
}

src_prepare() {
default
sed -i \
-e "s/-s -w//" \
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="cb1076646aa3740577fafbf3d914198b7fe8e3f7"
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
# See https://bugs.funtoo.org/browse/FL-9417
export GOFLAGS="-v -x -mod=vendor"
emake "${myemakeargs[@]}" man -j1 #nowarn
emake "${myemakeargs[@]}" all

}

src_install() {
dobin bin/*
doman man/*
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
}
Loading