Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-containers/runc/
Date: Mon, 02 Jan 2023 22:22:28
Message-Id: 1672698105.44711d3988a18ae2953421f20c0572e93eaf8975.williamh@gentoo
1 commit: 44711d3988a18ae2953421f20c0572e93eaf8975
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 2 22:21:45 2023 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 2 22:21:45 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44711d39
7
8 app-containers/runc: add 1.1.4
9
10 Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
11
12 app-containers/runc/Manifest | 1 +
13 app-containers/runc/runc-1.1.4.ebuild | 78 +++++++++++++++++++++++++++++++++++
14 2 files changed, 79 insertions(+)
15
16 diff --git a/app-containers/runc/Manifest b/app-containers/runc/Manifest
17 index a2c2fb30da3f..5f8b6d16045a 100644
18 --- a/app-containers/runc/Manifest
19 +++ b/app-containers/runc/Manifest
20 @@ -1 +1,2 @@
21 DIST runc-1.1.3.tar.gz 2333384 BLAKE2B 7530faa80a6d51c840a1ea702ec59580a3e42514f5932a7dd4df9f80ff93245bde05accd572a942190b6be76316f38a408566b003ad380611376e73abe3cb5c0 SHA512 27fce2569d0dc710a0f90095957be30c29da24ce1d2b8e115b9dc11d36f5226d98c4b2d8b92ecfa7581eade90bc51c5d9bccaf15fcb2542dafebe4fabc6e1cd9
22 +DIST runc-1.1.4.tar.gz 2334639 BLAKE2B bc7eb7de29e8ebb9ce146bc77bf6cfc116f4af3e28c0344059183cf0c8082c629ccb235531c368cce99915991b25df0b50b7cbb98b9c6a7d141ba6cc15958651 SHA512 c8e79ad839964680d29ab56a4de255f91192741951673025da6889c544a232d4d392db2da8005d8e22999a37bfbc9c9fe7f6043b165bc4edc2f2a29261d8a3d6
23
24 diff --git a/app-containers/runc/runc-1.1.4.ebuild b/app-containers/runc/runc-1.1.4.ebuild
25 new file mode 100644
26 index 000000000000..e54c791a9b78
27 --- /dev/null
28 +++ b/app-containers/runc/runc-1.1.4.ebuild
29 @@ -0,0 +1,78 @@
30 +# Copyright 1999-2023 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +inherit go-module linux-info
35 +
36 +# update on bump, look for https://github.com/docker\
37 +# docker-ce/blob/<docker ver OR branch>/components/engine/hack/dockerfile/install/runc.installer
38 +RUNC_COMMIT=5fd4c4d144137e991c4acebb2146ab1483a97925
39 +CONFIG_CHECK="~USER_NS"
40 +
41 +DESCRIPTION="runc container cli tools"
42 +HOMEPAGE="http://github.com/opencontainers/runc/"
43 +MY_PV="${PV/_/-}"
44 +SRC_URI="https://github.com/opencontainers/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
45 +
46 +LICENSE="Apache-2.0 BSD-2 BSD MIT"
47 +SLOT="0"
48 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
49 +IUSE="apparmor hardened +kmem +seccomp selinux test"
50 +
51 +DEPEND="seccomp? ( sys-libs/libseccomp )"
52 +
53 +RDEPEND="
54 + ${DEPEND}
55 + !app-emulation/docker-runc
56 + apparmor? ( sys-libs/libapparmor )
57 + selinux? ( sec-policy/selinux-container )
58 +"
59 +
60 +BDEPEND="
61 + dev-go/go-md2man
62 + test? ( "${RDEPEND}" )
63 +"
64 +
65 +# tests need busybox binary, and portage namespace
66 +# sandboxing disabled: mount-sandbox pid-sandbox ipc-sandbox
67 +# majority of tests pass
68 +RESTRICT+=" test"
69 +
70 +S="${WORKDIR}/${PN}-${MY_PV}"
71 +
72 +src_compile() {
73 + # Taken from app-containers/docker-1.7.0-r1
74 + export CGO_CFLAGS="-I${ESYSROOT}/usr/include"
75 + export CGO_LDFLAGS="$(usex hardened '-fno-PIC ' '')
76 + -L${ESYSROOT}/usr/$(get_libdir)"
77 +
78 + # build up optional flags
79 + local options=(
80 + $(usev apparmor)
81 + $(usev seccomp)
82 + $(usex kmem '' 'nokmem')
83 + )
84 +
85 + myemakeargs=(
86 + BUILDTAGS="${options[*]}"
87 + COMMIT="${RUNC_COMMIT}"
88 + )
89 +
90 + emake "${myemakeargs[@]}" runc man
91 +}
92 +
93 +src_install() {
94 + myemakeargs+=(
95 + PREFIX="${ED}/usr"
96 + BINDIR="${ED}/usr/bin"
97 + MANDIR="${ED}/usr/share/man"
98 + )
99 + emake "${myemakeargs[@]}" install install-man install-bash
100 +
101 + local DOCS=( README.md PRINCIPLES.md docs/. )
102 + einstalldocs
103 +}
104 +
105 +src_test() {
106 + emake "${myemakeargs[@]}" localunittest
107 +}