app-containers/crun - 1.28 (gentoo)

Search

Install

Install this version:

emerge -a =app-containers/crun-1.28

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =app-containers/crun-1.28

Or alternatively:

emerge --autounmask-write -a =app-containers/crun-1.28

Package Information

Description:
Fast and low-memory footprint OCI Container Runtime fully written in C
Homepage:
https://github.com/containers/crun
License:
GPL-2+ LGPL-2.1+

Ebuild Details

Version EAPI Keywords Slot
1.28 8 ~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv 0
View Raw Ebuild
# Copyright 2019-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{11..14} )

inherit autotools libtool python-any-r1 flag-o-matic toolchain-funcs

DESCRIPTION="Fast and low-memory footprint OCI Container Runtime fully written in C"
HOMEPAGE="https://github.com/containers/crun"

if [[ "${PV}" == *9999* ]]; then
	inherit git-r3
	EGIT_REPO_URI="https://github.com/containers/${PN}.git"
else
	SRC_URI="https://github.com/containers/${PN}/releases/download/${PV}/${P}.tar.gz"
	KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv"
fi

LICENSE="GPL-2+ LGPL-2.1+"
SLOT="0"
IUSE="+bpf +caps criu +seccomp selinux systemd static-libs"

DEPEND="
	dev-libs/json-c:=
	sys-kernel/linux-headers
	caps? ( sys-libs/libcap )
	criu? ( >=sys-process/criu-3.15 )
	elibc_musl? ( sys-libs/error-standalone )
	seccomp? ( sys-libs/libseccomp )
	systemd? ( sys-apps/systemd:= )
"
RDEPEND="${DEPEND}
	selinux? ( sec-policy/selinux-container )
"
BDEPEND="
	${PYTHON_DEPS}
	virtual/pkgconfig
"

PATCHES=(
	"${FILESDIR}"/${P}-export-json_gen.patch
)

src_prepare() {
	default
	elibtoolize
	eautoreconf
}

src_configure() {
	if use elibc_musl ; then
		append-cflags "$($(tc-getPKG_CONFIG) --cflags error-standalone)"
		append-libs "$($(tc-getPKG_CONFIG) --libs error-standalone)"
	fi
	local myeconfargs=(
		--cache-file="${S}"/config.cache
		$(use_enable bpf)
		$(use_enable caps)
		$(use_enable criu)
		$(use_enable seccomp)
		$(use_enable systemd)
		--enable-shared
		$(use_enable static-libs static)
	)

	econf "${myeconfargs[@]}"
}

src_test() {
	emake check-TESTS -C ./libocispec

	# The crun test suite is comprehensive to the extent that tests will fail
	# within a sandbox environment, due to the nature of the privileges
	# required to create linux "containers".
	local supported_tests=(
		"tests/tests_libcrun_utils"
		"tests/tests_libcrun_errors"
		"tests/tests_libcrun_intelrdt"
	)
	emake check-TESTS TESTS="${supported_tests[*]}" CFLAGS="${CFLAGS} -std=gnu17"
}

src_install() {
	emake "DESTDIR=${D}" install-exec
	doman crun.1
	einstalldocs

	find "${ED}" -name '*.la' -type f -delete || die
}

USE Flags

Manage flags for this package: euse -i <flag> -p app-containers/crun | euse -E <flag> -p app-containers/crun | euse -D <flag> -p app-containers/crun

Global/Standard Flags

bpf
Default: Enabled (+)
caps
Default: Enabled (+)
seccomp
Default: Enabled (+)

Inherited Eclasses

Dependencies

DEPEND

	dev-libs/json-c:=
	sys-kernel/linux-headers
	caps? ( sys-libs/libcap )
	criu? ( >=sys-process/criu-3.15 )
	elibc_musl? ( sys-libs/error-standalone )
	seccomp? ( sys-libs/libseccomp )
	systemd? ( sys-apps/systemd:= )

RDEPEND

	dev-libs/json-c:=
	sys-kernel/linux-headers
	caps? ( sys-libs/libcap )
	criu? ( >=sys-process/criu-3.15 )
	elibc_musl? ( sys-libs/error-standalone )
	seccomp? ( sys-libs/libseccomp )
	systemd? ( sys-apps/systemd:= )

	selinux? ( sec-policy/selinux-container )

BDEPEND

	
	virtual/pkgconfig

Manifest for 1.28

Type File Size Source URLs
DIST crun-1.28.tar.gz 1585077 bytes https://github.com/containers/crun/releases/download/1.28/crun-1.28.tar.gz