summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2021-12-19 23:26:45 -0800
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2021-12-20 00:51:23 -0800
commite0d5f4f032989ca6acf69b41778396be959e900f (patch)
treee9353927ef17fb3f86459df6b5f3cb6123f24e8d /app-containers/crun
parentdev-python/pip: Fix generating completions with vendored distutils (diff)
downloadgentoo-e0d5f4f032989ca6acf69b41778396be959e900f.tar.gz
gentoo-e0d5f4f032989ca6acf69b41778396be959e900f.tar.bz2
gentoo-e0d5f4f032989ca6acf69b41778396be959e900f.zip
Move {app-emulation -> app-containers}/crun
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'app-containers/crun')
-rw-r--r--app-containers/crun/Manifest3
-rw-r--r--app-containers/crun/crun-0.19.1-r1.ebuild70
-rw-r--r--app-containers/crun/crun-1.2.ebuild57
-rw-r--r--app-containers/crun/crun-1.3.ebuild60
-rw-r--r--app-containers/crun/files/libcrun-linkage.patch29
-rw-r--r--app-containers/crun/metadata.xml31
6 files changed, 250 insertions, 0 deletions
diff --git a/app-containers/crun/Manifest b/app-containers/crun/Manifest
new file mode 100644
index 000000000000..e4bf92580755
--- /dev/null
+++ b/app-containers/crun/Manifest
@@ -0,0 +1,3 @@
+DIST crun-0.19.1.tar.gz 1870594 BLAKE2B 1780a2936ff39ec80836c4c9ae072e2fc30703a31a79786337290c62dd433b5a35dcfa953be370703d1baab3de93fdb376c99ab76dff1470883c61726c313144 SHA512 f93f79d1d63d6749bcf92d48542d9555f3ad47657c959c7c06701861d7a5a4171969f00f6dff3878286970a48aba3314c25e35c005463e606533b0ff7843d994
+DIST crun-1.2.tar.gz 1879836 BLAKE2B 45370e3206a13c963d694f338dc0a00de24253025d31ec893353905235b239b8e7f626ddd4ee0cc32da2b3f5676b42f59f3214a1eb9c3af4612483cd6fd14693 SHA512 5cadaf0eb0e9bcf53726e7f6ffb664c8327f0f4e7cdbf75ae8a0cd4759f7c8a8a2611df65ca1436a50d7af5d37505aac861d7db4d46a93c3832362228cb37cbc
+DIST crun-1.3.tar.gz 1889283 BLAKE2B d7e7f676ca5db8322b9da2110c9a9e8eb11b13b5e9f1432ccc6ef12bf6ae7db3a28e3227fac86091589a215394ec577e91ccbffec532dabf44be746cb8a5d404 SHA512 9600bdacf5fd2defa542230b6e134920eb80e9d4c49598167b9d58887719765c174f1ac8559c0092dc1b5435274124e0b29c3d0830df86d1cfd690d67c746016
diff --git a/app-containers/crun/crun-0.19.1-r1.ebuild b/app-containers/crun/crun-0.19.1-r1.ebuild
new file mode 100644
index 000000000000..0590fee263af
--- /dev/null
+++ b/app-containers/crun/crun-0.19.1-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 2019-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+
+inherit autotools python-any-r1
+
+DESCRIPTION="A fast and low-memory footprint OCI Container Runtime fully written in C"
+HOMEPAGE="https://github.com/containers/crun"
+SRC_URI="https://github.com/containers/${PN}/releases/download/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~arm64 ppc64"
+IUSE="+bpf +caps criu +seccomp systemd static-libs"
+
+DEPEND="
+ sys-kernel/linux-headers
+ >=dev-libs/yajl-2.0.0
+ caps? ( sys-libs/libcap )
+ criu? ( >=sys-process/criu-3.15 )
+ seccomp? ( sys-libs/libseccomp )
+ systemd? ( sys-apps/systemd:= )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ ${PYTHON_DEPS}
+"
+
+# 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".
+RESTRICT="test"
+
+DOCS=( README.md )
+
+PATCHES=( "${FILESDIR}/libcrun-linkage.patch" )
+
+src_prepare() {
+ default
+
+ # for libcrun-linkage.patch
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable bpf)
+ $(use_enable caps)
+ $(use_enable criu)
+ $(use_enable seccomp)
+ $(use_enable systemd)
+ $(usex static-libs '--enable-shared --enable-static' '--enable-shared --disable-static' '' '')
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ emake -C libocispec
+ emake crun
+}
+
+src_install() {
+ emake "DESTDIR=${D}" install-exec
+ doman crun.1
+ einstalldocs
+}
diff --git a/app-containers/crun/crun-1.2.ebuild b/app-containers/crun/crun-1.2.ebuild
new file mode 100644
index 000000000000..0fef6a729b1c
--- /dev/null
+++ b/app-containers/crun/crun-1.2.ebuild
@@ -0,0 +1,57 @@
+# Copyright 2019-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..10} )
+
+inherit autotools python-any-r1
+
+DESCRIPTION="A fast and low-memory footprint OCI Container Runtime fully written in C"
+HOMEPAGE="https://github.com/containers/crun"
+SRC_URI="https://github.com/containers/${PN}/releases/download/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64"
+IUSE="+bpf +caps criu +seccomp systemd static-libs"
+
+DEPEND="
+ sys-kernel/linux-headers
+ >=dev-libs/yajl-2.0.0
+ caps? ( sys-libs/libcap )
+ criu? ( >=sys-process/criu-3.15 )
+ seccomp? ( sys-libs/libseccomp )
+ systemd? ( sys-apps/systemd:= )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="${PYTHON_DEPS}"
+
+# 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".
+RESTRICT="test"
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable bpf)
+ $(use_enable caps)
+ $(use_enable criu)
+ $(use_enable seccomp)
+ $(use_enable systemd)
+ $(usex static-libs '--enable-shared --enable-static' '--enable-shared --disable-static' '' '')
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ emake -C libocispec
+ emake crun
+}
+
+src_install() {
+ emake "DESTDIR=${D}" install-exec
+ doman crun.1
+ einstalldocs
+}
diff --git a/app-containers/crun/crun-1.3.ebuild b/app-containers/crun/crun-1.3.ebuild
new file mode 100644
index 000000000000..5de80d420e29
--- /dev/null
+++ b/app-containers/crun/crun-1.3.ebuild
@@ -0,0 +1,60 @@
+# Copyright 2019-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit python-any-r1
+
+DESCRIPTION="A fast and low-memory footprint OCI Container Runtime fully written in C"
+HOMEPAGE="https://github.com/containers/crun"
+SRC_URI="https://github.com/containers/${PN}/releases/download/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64"
+IUSE="+bpf +caps criu +seccomp systemd static-libs"
+
+DEPEND="
+ dev-libs/yajl:=
+ sys-kernel/linux-headers
+ caps? ( sys-libs/libcap )
+ criu? ( >=sys-process/criu-3.15 )
+ seccomp? ( sys-libs/libseccomp )
+ systemd? ( sys-apps/systemd:= )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ ${PYTHON_DEPS}
+ virtual/pkgconfig
+"
+
+# 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".
+RESTRICT="test"
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable bpf)
+ $(use_enable caps)
+ $(use_enable criu)
+ $(use_enable seccomp)
+ $(use_enable systemd)
+ $(usex static-libs '--enable-shared --enable-static' '--enable-shared --disable-static' '' '')
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ emake -C libocispec
+ emake crun
+}
+
+src_install() {
+ emake "DESTDIR=${D}" install-exec
+ doman crun.1
+ einstalldocs
+}
diff --git a/app-containers/crun/files/libcrun-linkage.patch b/app-containers/crun/files/libcrun-linkage.patch
new file mode 100644
index 000000000000..72156ac931c8
--- /dev/null
+++ b/app-containers/crun/files/libcrun-linkage.patch
@@ -0,0 +1,29 @@
+From 7cfdf094071fcff038bab573c1eeee599fa17b16 Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev <gyakovlev@gentoo.org>
+Date: Mon, 2 Aug 2021 03:53:25 -0700
+Subject: [PATCH] Makefile.am: link libcrun to $(FOUND_LIBS)
+
+otherwise libcrun consumers fail at runtime with
+symbol lookup errors
+
+Closes: https://github.com/containers/crun/issues/711
+Issue: https://github.com/containers/crun/issues/340
+Downstream-bug: https://bugs.gentoo.org/717750
+Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
+---
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 150e933a..7e5a4406 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -46,7 +46,7 @@ libocispec/libocispec.la:
+
+ libcrun_la_SOURCES = $(libcrun_SOURCES)
+ libcrun_la_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -fvisibility=hidden
+-libcrun_la_LIBADD = libocispec/libocispec.la $(maybe_libyajl.la)
++libcrun_la_LIBADD = libocispec/libocispec.la $(FOUND_LIBS) $(maybe_libyajl.la)
+ libcrun_la_LDFLAGS = -Wl,--version-script=$(abs_top_srcdir)/libcrun.lds
+
+ # build a version with all the symbols visible for testing
diff --git a/app-containers/crun/metadata.xml b/app-containers/crun/metadata.xml
new file mode 100644
index 000000000000..c87b3b38a78c
--- /dev/null
+++ b/app-containers/crun/metadata.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>robert@gnzler.io</email>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">
+ While most of the tools used in the Linux containers ecosystem are written in
+ Go, crun authors believe C is a better fit for a lower level tool like a
+ container runtime. runc; the most used implementation of the OCI runtime specs
+ written in Go, re-execs itself and use a module written in C for setting up
+ the environment before the container process starts.
+
+ crun aims to be also usable as a library that can be easily included in
+ programs without requiring an external process for managing OCI containers.
+ </longdescription>
+ <upstream>
+ <changelog>https://github.com/containers/crun/releases</changelog>
+ <remote-id type="github">containers/crun</remote-id>
+ </upstream>
+ <use>
+ <flag name="bpf">Enable in Kernel, eBPF (enhanced Berkley Packet Filter)
+ support for managing device controllers.
+ </flag>
+ <flag name="criu">Enable CRIU based checkpoint/restore support</flag>
+ </use>
+</pkgmetadata>