Gentoo Archives: gentoo-commits

From: "Manuel Rüger" <mrueg@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/runc/
Date: Mon, 11 Feb 2019 19:33:33
Message-Id: 1549913540.13a596864392907dd399a93bf66cab2b0d5f49f9.mrueg@gentoo
1 commit: 13a596864392907dd399a93bf66cab2b0d5f49f9
2 Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 11 19:32:20 2019 +0000
4 Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 11 19:32:20 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13a59686
7
8 app-emulation/runc: Backport fix
9
10 Package-Manager: Portage-2.3.59, Repoman-2.3.12
11 Signed-off-by: Manuel Rüger <mrueg <AT> gentoo.org>
12
13 .../runc/runc-1.0.0_rc5_p20180509-r1.ebuild | 62 ++++++++++++++++++++++
14 1 file changed, 62 insertions(+)
15
16 diff --git a/app-emulation/runc/runc-1.0.0_rc5_p20180509-r1.ebuild b/app-emulation/runc/runc-1.0.0_rc5_p20180509-r1.ebuild
17 new file mode 100644
18 index 00000000000..2aca18c8e96
19 --- /dev/null
20 +++ b/app-emulation/runc/runc-1.0.0_rc5_p20180509-r1.ebuild
21 @@ -0,0 +1,62 @@
22 +# Copyright 1999-2019 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=6
26 +EGO_PN="github.com/opencontainers/${PN}"
27 +
28 +if [[ ${PV} == *9999 ]]; then
29 + inherit golang-build golang-vcs
30 +else
31 + MY_PV="${PV/_/-}"
32 + EGIT_COMMIT="v${MY_PV}"
33 + RUNC_COMMIT="69663f0bd4b60df09991c08812a60108003fa340" # Change this when you update the ebuild
34 + SRC_URI="https://${EGO_PN}/archive/${RUNC_COMMIT}.tar.gz -> ${P}.tar.gz"
35 + KEYWORDS="~amd64 ~arm ~arm64 ~ppc64"
36 + inherit golang-build golang-vcs-snapshot
37 +fi
38 +
39 +DESCRIPTION="runc container cli tools"
40 +HOMEPAGE="http://runc.io"
41 +
42 +LICENSE="Apache-2.0"
43 +SLOT="0"
44 +IUSE="+ambient apparmor hardened +seccomp"
45 +
46 +RDEPEND="
47 + apparmor? ( sys-libs/libapparmor )
48 + seccomp? ( sys-libs/libseccomp )
49 + !app-emulation/docker-runc
50 +"
51 +
52 +PATCHES=( "${FILESDIR}"/runc-fix-cve.patch )
53 +
54 +src_prepare() {
55 + pushd src/${EGO_PN} || die
56 + default
57 + popd || die
58 +}
59 +
60 +src_compile() {
61 + # Taken from app-emulation/docker-1.7.0-r1
62 + export CGO_CFLAGS="-I${ROOT}/usr/include"
63 + export CGO_LDFLAGS="$(usex hardened '-fno-PIC ' '')
64 + -L${ROOT}/usr/$(get_libdir)"
65 +
66 + # build up optional flags
67 + local options=(
68 + $(usex ambient 'ambient')
69 + $(usex apparmor 'apparmor')
70 + $(usex seccomp 'seccomp')
71 + )
72 +
73 + GOPATH="${S}"\
74 + emake BUILDTAGS="${options[*]}" \
75 + COMMIT="${RUNC_COMMIT}" -C src/${EGO_PN}
76 +}
77 +
78 +src_install() {
79 + pushd src/${EGO_PN} || die
80 + dobin runc
81 + dodoc README.md PRINCIPLES.md
82 + popd || die
83 +}