From fdfe525fe8094f757c2658d05c78edbdb569ae18 Mon Sep 17 00:00:00 2001 From: David Michael Date: Fri, 18 Aug 2017 17:45:54 -0700 Subject: [PATCH] app-emulation/containerd: Sync with Gentoo for Docker 17.06 This adds "hardened" LDFLAGS to the build, and it also bumps the Go version to 1.8 to match the containerd Dockerfile. The only differences from the upstream 0.2.9 ebuild are now: 1. Use of the CoreOS Go eclasses 2. Addition of src_unpack to set up a Go workspace from the above 3. Inclusion of the containerd.service unit --- .../app-emulation/containerd/Manifest | 2 +- ...2-r1.ebuild => containerd-0.2.9_p7.ebuild} | 0 .../containerd/containerd-9999.ebuild | 33 +++++++++++-------- .../app-emulation/containerd/metadata.xml | 8 +++-- 4 files changed, 27 insertions(+), 16 deletions(-) rename sdk_container/src/third_party/coreos-overlay/app-emulation/containerd/{containerd-0.2.7_p2-r1.ebuild => containerd-0.2.9_p7.ebuild} (100%) diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/containerd/Manifest b/sdk_container/src/third_party/coreos-overlay/app-emulation/containerd/Manifest index a5e475b4fc..f6fa6c9be2 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/containerd/Manifest +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/containerd/Manifest @@ -1,2 +1,2 @@ DIST containerd-0.2.5.tar.gz 1003500 SHA256 88e099af66b50abe7f2159f13bdab793fa5199d8d5b9a9ef7a68171abb4359be SHA512 ba1e074bb7556a7c4be4d68dc62aa2fa4b823682c209d1609c1f11518a7b7167139ea159d31e0b21ba190d83115a67e5e45b54b6a4770742d49e9e561309551f WHIRLPOOL eb3622ba99c4d4806bda9a45853422a5b0b884869ed3be4c3caec4c20f49027e8db78b9885eca7bc83a0f3b08e9a66eca950390f0eda1ef2535fd3ab41623bf4 -DIST containerd-0.2.7_p2.tar.gz 1036065 SHA256 da89086a7c643702a2ddecec67a45d3d8e4b0d610dd19036be63e6bd54cc1a85 SHA512 b7d56adaac26c9f0fd0900467fb5f8500472b602d7ce2373704c08ae6a0b852051e469a4fa51c8db475499872a51fcdd65c2adc4124102e66b8ca86cc5b2ff2f WHIRLPOOL 98567c28df37dbe3ad9f926fdae35e5ceb2df50c90373e58b14b1b5204d6eb9763050acf90abd40b44791510809ba3390f91b61a77265db078a221055557a301 +DIST containerd-0.2.9_p7.tar.gz 1229549 SHA256 c506121c49e3bfea27018aa77e09e4734067f84ae85b6ef75ec31b488a91ae54 SHA512 900cf9c251c4de0f9848fb5bf26537226c1361d1a64a0fba853bda3805cb141fc2a849442fe885f0ee228b3e3a7018440af18898b484a54a7b75b4a86538aaa9 WHIRLPOOL 880f19a994f623b7cd8c3f771b5c56468681de349ae4196e60ffcb5a34d42ef423d8eefc82c07134c9e50c33bc0ecbfc1a9e47c3df987050d8dcb82da0178d80 diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/containerd/containerd-0.2.7_p2-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/containerd/containerd-0.2.9_p7.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/app-emulation/containerd/containerd-0.2.7_p2-r1.ebuild rename to sdk_container/src/third_party/coreos-overlay/app-emulation/containerd/containerd-0.2.9_p7.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/containerd/containerd-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/containerd/containerd-9999.ebuild index b4f5d1f80e..7e9f0a80e4 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/containerd/containerd-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/containerd/containerd-9999.ebuild @@ -1,12 +1,11 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Id$ -EAPI=5 +EAPI=6 -GITHUB_URI="github.com/docker/${PN}" +GITHUB_URI="github.com/containerd/containerd" COREOS_GO_PACKAGE="${GITHUB_URI}" -COREOS_GO_VERSION="go1.7" +COREOS_GO_VERSION="go1.8" if [[ ${PV} == *9999 ]]; then EGIT_REPO_URI="https://${GITHUB_URI}.git" @@ -15,9 +14,8 @@ else # Update the patch number when setting commit. # The patch number is arbitrarily chosen as the number of commits since the # tagged version. - # e.g. git log ${base_version}..${EGIT_COMMIT} --oneline | wc -l - # Note: 0.2.3 in the v0.2.x branch is not tagged, use 973f21f - EGIT_COMMIT="9048e5e50717ea4497b757314bad98ea3763c145" + # e.g. git log --oneline v0.2.9..${EGIT_COMMIT} | wc -l + EGIT_COMMIT="6e23458c129b551d5c9871e5174f6b1b7f6d1170" SRC_URI="https://${GITHUB_URI}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" KEYWORDS="amd64 arm64" inherit vcs-snapshot @@ -30,19 +28,28 @@ HOMEPAGE="https://containerd.tools" LICENSE="Apache-2.0" SLOT="0" -IUSE="seccomp" +IUSE="hardened +seccomp" DEPEND="" -RDEPEND="app-emulation/runc +RDEPEND=">=app-emulation/docker-runc-1.0.0_rc3 seccomp? ( sys-libs/libseccomp )" +S=${WORKDIR}/${P}/src/${COREOS_GO_PACKAGE} + +RESTRICT="test" + +src_unpack() { + mkdir -p "${S}" + tar --strip-components=1 -C "${S}" -xf "${DISTDIR}/${A}" +} + src_compile() { - local options=( $(usev seccomp) ) - LDFLAGS= emake GIT_COMMIT="$EGIT_COMMIT" BUILDTAGS="${options[*]}" + local options=( $(usex seccomp "seccomp" '') ) + export GOPATH="${WORKDIR}/${P}" # ${PWD}/vendor + LDFLAGS=$(usex hardened '-extldflags -fno-PIC' '') emake GIT_COMMIT="$EGIT_COMMIT" BUILDTAGS="${options[@]}" } src_install() { dobin bin/containerd* bin/ctr - systemd_dounit "${FILESDIR}/containerd.service" } diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/containerd/metadata.xml b/sdk_container/src/third_party/coreos-overlay/app-emulation/containerd/metadata.xml index 95132700bf..92b6d2585a 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/containerd/metadata.xml +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/containerd/metadata.xml @@ -13,8 +13,12 @@ Tianon - xarthisius@gentoo.org - Kacper Kowalik + mrueg@gentoo.org + Manuel RĂ¼ger + + + williamh@gentoo.org + William Hubbs docker/containerd