summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2021-12-14 00:46:27 -0800
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2021-12-14 00:55:34 -0800
commit4436c576989993d6d56e402d8717e53825ad140f (patch)
tree81c5e11bae444ccb9bc478caaa5fea584aa0ee9f
parentdev-scheme/racket: fix pkg_preinst; do not die on pkg_config (diff)
downloadgentoo-4436c576.tar.gz
gentoo-4436c576.tar.bz2
gentoo-4436c576.zip
app-emulation/runc: add 1.0.3
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
-rw-r--r--app-emulation/runc/Manifest1
-rw-r--r--app-emulation/runc/runc-1.0.3.ebuild78
2 files changed, 79 insertions, 0 deletions
diff --git a/app-emulation/runc/Manifest b/app-emulation/runc/Manifest
index 3bbb8a657007..e896bdf3b837 100644
--- a/app-emulation/runc/Manifest
+++ b/app-emulation/runc/Manifest
@@ -1 +1,2 @@
DIST runc-1.0.2.tar.gz 2374156 BLAKE2B 526520adb7127e46e7258de75e66a15a5aac216a2a2fcb91f4d9c5da393892242c4d93c5f5483ab111bf29eed7d8f0c8c138ae83a22809d72802a981dcda0395 SHA512 434abd6d7ad2508c2272b627d8aeeb28ecd8461899bff463e7d2c7abbc0f0cbb2e0bafbfe81fc534fad506b1acb4bda3e05639ecd908bc9d0d2e9356f1e56e26
+DIST runc-1.0.3.tar.gz 2375241 BLAKE2B 0fb9368ab5442462001c15a67a71821133ad90d16cac5aac760e52b2477db69c0a5dd59df42601119b19ede508889796c994a24624f88ec6a1a29dad19e0bf33 SHA512 64a1894c2b4ed5a68b185e88548fc9fbbd01d8a9495feed59fb196aa06763d64cfb71ca6cbc09d1defa26a0d94ad58626296585741f23df2e290147ba6c4c26e
diff --git a/app-emulation/runc/runc-1.0.3.ebuild b/app-emulation/runc/runc-1.0.3.ebuild
new file mode 100644
index 000000000000..92c4b7440bdb
--- /dev/null
+++ b/app-emulation/runc/runc-1.0.3.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit go-module linux-info
+
+# update on bump, look for https://github.com/docker\
+# docker-ce/blob/<docker ver OR branch>/components/engine/hack/dockerfile/install/runc.installer
+RUNC_COMMIT=f46b6ba2c9314cfc8caae24a32ec5fe9ef1059fe
+CONFIG_CHECK="~USER_NS"
+
+DESCRIPTION="runc container cli tools"
+HOMEPAGE="http://runc.io"
+MY_PV="${PV/_/-}"
+SRC_URI="https://github.com/opencontainers/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0 BSD-2 BSD MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="apparmor hardened +kmem +seccomp test"
+
+DEPEND="seccomp? ( sys-libs/libseccomp )"
+
+RDEPEND="
+ ${DEPEND}
+ !app-emulation/docker-runc
+ apparmor? ( sys-libs/libapparmor )
+"
+
+BDEPEND="
+ dev-go/go-md2man
+ test? ( "${RDEPEND}" )
+"
+
+# tests need busybox binary, and portage namespace
+# sandboxing disabled: mount-sandbox pid-sandbox ipc-sandbox
+# majority of tests pass
+RESTRICT+=" test"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+src_compile() {
+ # Taken from app-emulation/docker-1.7.0-r1
+ export CGO_CFLAGS="-I${ESYSROOT}/usr/include"
+ export CGO_LDFLAGS="$(usex hardened '-fno-PIC ' '')
+ -L${ESYSROOT}/usr/$(get_libdir)"
+
+ # build up optional flags
+ local options=(
+ $(usev apparmor)
+ $(usev seccomp)
+ $(usex kmem '' 'nokmem')
+ )
+
+ myemakeargs=(
+ BUILDTAGS="${options[*]}"
+ COMMIT="${RUNC_COMMIT}"
+ )
+
+ emake "${myemakeargs[@]}" runc man
+}
+
+src_install() {
+ myemakeargs+=(
+ PREFIX="${ED}/usr"
+ BINDIR="${ED}/usr/bin"
+ MANDIR="${ED}/usr/share/man"
+ )
+ emake "${myemakeargs[@]}" install install-man install-bash
+
+ local DOCS=( README.md PRINCIPLES.md docs/. )
+ einstalldocs
+}
+
+src_test() {
+ emake "${myemakeargs[@]}" localunittest
+}