From 406a5ac9774a58e312c7252a0f06b5bf077c0662 Mon Sep 17 00:00:00 2001 From: Nick Owens Date: Wed, 22 Jun 2016 11:27:13 -0700 Subject: [PATCH] app-emulation/runc: import 0.1.0 from upstream portage --- .../app-emulation/runc/Manifest | 1 + .../app-emulation/runc/metadata.xml | 20 ++++++++ .../app-emulation/runc/runc-0.1.0.ebuild | 48 +++++++++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 sdk_container/src/third_party/coreos-overlay/app-emulation/runc/Manifest create mode 100644 sdk_container/src/third_party/coreos-overlay/app-emulation/runc/metadata.xml create mode 100644 sdk_container/src/third_party/coreos-overlay/app-emulation/runc/runc-0.1.0.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/runc/Manifest b/sdk_container/src/third_party/coreos-overlay/app-emulation/runc/Manifest new file mode 100644 index 0000000000..6a23ea9eac --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/runc/Manifest @@ -0,0 +1 @@ +DIST runc-0.1.0.tar.gz 496358 SHA256 681d6d89541ae2e06757f999a242a1f97bbcb1ad6e10f4cdee287ec4a9d2bff9 SHA512 8a9ff02b0161eda0a730194b0fbf7ad76e8f379992e74061ef49302da3492fd0c53f06db9153ded4d934d67bbf6f4291d6154254f1b924ef73c97c44cd14ffcf WHIRLPOOL 81f488a4f1e23e8704a9fa8404965b2f12f74a875ba8e67dc15de93f43b075dc538cd0d89c7a1187cb74ac6320317b5985855945fb8bf8f749d6736df47b844a diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/runc/metadata.xml b/sdk_container/src/third_party/coreos-overlay/app-emulation/runc/metadata.xml new file mode 100644 index 0000000000..5dc82f3cb5 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/runc/metadata.xml @@ -0,0 +1,20 @@ + + + + + runc is a CLI tool for spawning and running containers according + to the OCF (Open Container Format) specification. + + + cardoe@gentoo.org + Doug Goldstein + + + + Enable AppArmor support. + + + + opencontainers/runc + + diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/runc/runc-0.1.0.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/runc/runc-0.1.0.ebuild new file mode 100644 index 0000000000..dc7f12579c --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/runc/runc-0.1.0.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit eutils multilib + +DESCRIPTION="runc container cli tools" +HOMEPAGE="http://runc.io" + +GITHUB_URI="github.com/opencontainers/runc" + +if [[ ${PV} == *9999* ]]; then + EGIT_REPO_URI="git://${GITHUB_URI}.git" + inherit git-r3 +else + SRC_URI="https://${GITHUB_URI}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="amd64" +fi + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="+seccomp" + +DEPEND=">=dev-lang/go-1.4:=" +RDEPEND="seccomp? ( sys-libs/libseccomp )" + +src_compile() { + # Taken from app-emulation/docker-1.7.0-r1 + export CGO_CFLAGS="-I${ROOT}/usr/include" + export CGO_LDFLAGS="-L${ROOT}/usr/$(get_libdir)" + + # Setup GOPATH so things build + rm -rf .gopath + mkdir -p .gopath/src/"$(dirname "${GITHUB_URI}")" + ln -sf ../../../.. .gopath/src/"${GITHUB_URI}" + export GOPATH="${PWD}/.gopath:${PWD}/vendor" + + # build up optional flags + local options=( $(usex seccomp "seccomp") ) + + emake BUILDTAGS="${options[@]}" +} + +src_install() { + dobin runc +}