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: Fri, 06 Apr 2018 22:03:06
Message-Id: 1523052052.338877c5db2066c54a0b9b54464347e9b9901417.mrueg@gentoo
1 commit: 338877c5db2066c54a0b9b54464347e9b9901417
2 Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 6 21:41:11 2018 +0000
4 Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 6 22:00:52 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=338877c5
7
8 app-emulation/runc: Use full commit hash
9
10 Package-Manager: Portage-2.3.28, Repoman-2.3.9
11
12 app-emulation/runc/runc-1.0.0_rc5-r1.ebuild | 54 +++++++++++++++++++++++++++++
13 1 file changed, 54 insertions(+)
14
15 diff --git a/app-emulation/runc/runc-1.0.0_rc5-r1.ebuild b/app-emulation/runc/runc-1.0.0_rc5-r1.ebuild
16 new file mode 100644
17 index 00000000000..d733f98a812
18 --- /dev/null
19 +++ b/app-emulation/runc/runc-1.0.0_rc5-r1.ebuild
20 @@ -0,0 +1,54 @@
21 +# Copyright 1999-2018 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=6
25 +EGO_PN="github.com/opencontainers/${PN}"
26 +
27 +if [[ ${PV} == *9999 ]]; then
28 + inherit golang-build golang-vcs
29 +else
30 + MY_PV="${PV/_/-}"
31 + EGIT_COMMIT="v${MY_PV}"
32 + RUNC_COMMIT="4fc53a81fb7c994640722ac585fa9ca548971871" # Change this when you update the ebuild
33 + SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
34 + KEYWORDS="~amd64 ~arm ~ppc64"
35 + inherit golang-build golang-vcs-snapshot
36 +fi
37 +
38 +DESCRIPTION="runc container cli tools"
39 +HOMEPAGE="http://runc.io"
40 +
41 +LICENSE="Apache-2.0"
42 +SLOT="0"
43 +IUSE="+ambient apparmor hardened +seccomp"
44 +
45 +RDEPEND="
46 + apparmor? ( sys-libs/libapparmor )
47 + seccomp? ( sys-libs/libseccomp )
48 + !app-emulation/docker-runc
49 +"
50 +
51 +src_compile() {
52 + # Taken from app-emulation/docker-1.7.0-r1
53 + export CGO_CFLAGS="-I${ROOT}/usr/include"
54 + export CGO_LDFLAGS="$(usex hardened '-fno-PIC ' '')
55 + -L${ROOT}/usr/$(get_libdir)"
56 +
57 + # build up optional flags
58 + local options=(
59 + $(usex ambient 'ambient')
60 + $(usex apparmor 'apparmor')
61 + $(usex seccomp 'seccomp')
62 + )
63 +
64 + GOPATH="${S}"\
65 + emake BUILDTAGS="${options[*]}" \
66 + COMMIT="${RUNC_COMMIT}" -C src/${EGO_PN}
67 +}
68 +
69 +src_install() {
70 + pushd src/${EGO_PN} || die
71 + dobin runc
72 + dodoc README.md PRINCIPLES.md
73 + popd || die
74 +}