diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/docker-runc/Manifest b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker-runc/Manifest index d89e50721c..c1dbb60bae 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/docker-runc/Manifest +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker-runc/Manifest @@ -1,2 +1,3 @@ DIST docker-runc-1.0.0_rc2_p136.tar.gz 561705 SHA256 2954cb6b468b3806a08c45656acc2019035bc9994c2a9b4249cfde4d9b3a7c93 SHA512 6052b95042082c3345caf25d3646f47b82c151ff3aca2ca4510dbf72ee80056d8c4077f2a1b48a9f4178c41185835ff51461e52ad47969534ea6febf7cac74f1 WHIRLPOOL ede821987006a54e7a87f88d9a5104d4a4ecc05a614e111fefa669f5ae436c11004debfe919bec0808194f2d96442775718a0208a1a374a9dd56a896f7dd8640 DIST docker-runc-1.0.0_rc4_p171.tar.gz 1189298 SHA256 0838504b63fe8c2055c8307cd9f9d5e79d96c03ac86069fba3b9bc7fa459502b SHA512 a5bf97ce284317e03e63ee0e39228d77848fcde2f6322de06eebc2536978b5d87fd8c3fbccb2e74ef8c80fbaa28f3d0b24074cb9fde01e268593332aacd57695 WHIRLPOOL f0264dc7e5319ed1cd44db3ee2d7f37fe1476f1827f71fc3ee5e9fb45ef139f5e72b31a1f7e402c2e3a595524b1fd96d6a5175c379f78130c54d53a1e26a0bca +DIST docker-runc-1.0.0_rc4_p205.tar.gz 1184954 SHA256 fa9854008f64f71b798ca63aed5be774aa432888bfda0d3ec60f2571647af156 SHA512 c7b24ca6212ce500d1d4c3a1776be5ca116d4f005d71e5fe8f2228c26f039058f3dd1071e9e39aa9c93272a49f7ff2ac86e2fbbcf6115cc3de65a370127d8ea5 WHIRLPOOL c9396ddd948672d59287eb4e07053a1af7e74fa82c1b687e489850ab3dce91ebed8bc0af16b25ddbe8452adeb8ccf46fbc941f368cdc7a889662becfcbd7928a diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/docker-runc/docker-runc-1.0.0_rc4_p205.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker-runc/docker-runc-1.0.0_rc4_p205.ebuild new file mode 100644 index 0000000000..d1ed542012 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker-runc/docker-runc-1.0.0_rc4_p205.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +GITHUB_URI="github.com/opencontainers/runc" +COREOS_GO_PACKAGE="${GITHUB_URI}" +COREOS_GO_VERSION="go1.9" +# the commit of runc that docker uses. +# see https://github.com/docker/docker-ce/blob/v18.02.0-ce/components/engine/hack/dockerfile/binaries-commits#L6 +# Note: this commit is only really present in the `docker/runc` repository. +# Update the patch number when this commit is changed (i.e. the _p in the ebuild). +# The patch version is arbitrarily the number of commits since the tag version +# spcified in the ebuild name. For example: +# $ git log --oneline v1.0.0-rc4..${COMMIT_ID} | wc -l +COMMIT_ID="9f9c96235cc97674e935002fc3d78361b696a69e" + +inherit eutils flag-o-matic coreos-go vcs-snapshot + +SRC_URI="https://${GITHUB_URI}/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz" +KEYWORDS="amd64 arm64" + +DESCRIPTION="runc container cli tools (docker fork)" +HOMEPAGE="http://runc.io" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="ambient apparmor hardened +seccomp selinux" + +RDEPEND=" + apparmor? ( sys-libs/libapparmor ) + seccomp? ( sys-libs/libseccomp ) + !app-emulation/runc +" + +S=${WORKDIR}/${P}/src/${COREOS_GO_PACKAGE} + +RESTRICT="test" + +src_unpack() { + mkdir -p "${S}" + tar --strip-components=1 -C "${S}" -xf "${DISTDIR}/${A}" +} + +PATCHES=( + "${FILESDIR}/0001-Delay-unshare-of-clone-newipc-for-selinux.patch" +) + +src_compile() { + # Taken from app-emulation/docker-1.7.0-r1 + export CGO_CFLAGS="-I${ROOT}/usr/include" + export CGO_LDFLAGS="$(usex hardened '-fno-PIC ' '') + -L${ROOT}/usr/$(get_libdir)" + + # build up optional flags + local options=( + $(usex ambient 'ambient' '') + $(usex apparmor 'apparmor' '') + $(usex seccomp 'seccomp' '') + $(usex selinux 'selinux' '') + ) + + # CoreOS: Don't try to install dependencies. + sed -i 's/go build -i /go build /' Makefile + + GOPATH="${WORKDIR}/${P}" emake BUILDTAGS="${options[*]}" \ + COMMIT="${COMMIT_ID}" +} + +src_install() { + dobin runc +}