From 35e6a7e66fea1ac94cc9a195fb544e0bc45f13a6 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Fri, 6 Mar 2015 17:37:50 -0500 Subject: [PATCH] rocket: general cleanup and install stage1.aci This freshens up the current rocket ebuild, using emerge to download the PXE image for proper caching between builds and fixing dependencies. For reference this is how big the build is as-is: 6.8M /build/amd64-usr/usr/bin/rkt 12M /build/amd64-usr/usr/share/rkt/stage1.aci We may be able to improve that size but for now this will do. --- .../app-emulation/rocket/Manifest | 1 + ...0.3.2-r1.ebuild => rocket-0.3.2-r2.ebuild} | 0 .../app-emulation/rocket/rocket-9999.ebuild | 38 +++++++++++-------- 3 files changed, 24 insertions(+), 15 deletions(-) create mode 100644 sdk_container/src/third_party/coreos-overlay/app-emulation/rocket/Manifest rename sdk_container/src/third_party/coreos-overlay/app-emulation/rocket/{rocket-0.3.2-r1.ebuild => rocket-0.3.2-r2.ebuild} (100%) diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/rocket/Manifest b/sdk_container/src/third_party/coreos-overlay/app-emulation/rocket/Manifest new file mode 100644 index 0000000000..34dc8dba8a --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/rocket/Manifest @@ -0,0 +1 @@ +DIST pxe-444.5.0.img 114147963 SHA256 26aaee080c50e8ccb0aca81e22f7b64307e31ca0f5b4d8aa989a2381bb56879c SHA512 aad9983e90fc1c0924df505c91a2a9912cec8083fa3ec7b9b67d6de82daf4b420de638d7bde5f129770815d6fbac53913c6a80e254b3777981787730bafb4e08 WHIRLPOOL 1e373a8728a01bf6e53b2760d24187a19aec9d32f05f04de8557f6fec01f652d577781f447463188a50070aaf31f48b2c67317989d89d9c114920b0e0cd8edaf diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/rocket/rocket-0.3.2-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/rocket/rocket-0.3.2-r2.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/app-emulation/rocket/rocket-0.3.2-r1.ebuild rename to sdk_container/src/third_party/coreos-overlay/app-emulation/rocket/rocket-0.3.2-r2.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/rocket/rocket-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/rocket/rocket-9999.ebuild index 17758fd271..cae743a158 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/rocket/rocket-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/rocket/rocket-9999.ebuild @@ -1,10 +1,7 @@ -# -# Copyright (c) 2014 CoreOS, Inc.. All rights reserved. +# Copyright (c) 2015 CoreOS, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header:$ -# -EAPI=4 +EAPI=5 CROS_WORKON_PROJECT="coreos/rocket" CROS_WORKON_LOCALNAME="rocket" CROS_WORKON_REPO="git://github.com" @@ -17,30 +14,41 @@ else KEYWORDS="amd64" fi +# Must be in sync with stage1/rootfs/usr/cache.sh +IMG_RELEASE="444.5.0" +IMG_URL="http://stable.release.core-os.net/amd64-usr/${IMG_RELEASE}/coreos_production_pxe_image.cpio.gz" + DESCRIPTION="rocket" HOMEPAGE="https://github.com/coreos/rocket" -SRC_URI="" +SRC_URI="${IMG_URL} -> pxe-${IMG_RELEASE}.img" LICENSE="Apache-2.0" SLOT="0" IUSE="" -DEPEND=" - >=dev-lang/go-1.2 - dev-util/go-bindata -" +DEPEND=">=dev-lang/go-1.2 + app-arch/cpio + sys-fs/squashfs-tools" +RDEPEND="" src_unpack() { + local cache="${S}/stage1/rootfs/usr/cache" + cros-workon_src_unpack - ${S}/stage1/rootfs/usr/cache.sh - mv cache ${S}/stage1/rootfs/usr/ - GOPATH=${S}/gopath go get github.com/appc/spec/... + + mkdir -p "${cache}" || die + cp "${DISTDIR}/pxe-${IMG_RELEASE}.img" "${cache}/pxe.img" || die } +# TODO: Use or adapt coreos-go.eclass so we have half a chance of +# cross-compiling builds working src_compile() { - ./build + RKT_STAGE1_IMAGE=/usr/share/rkt/stage1.aci ./build || die } src_install() { - dobin ${S}/bin/rkt + dobin "${S}/bin/rkt" + + insinto /usr/share/rkt + doins "${S}/bin/stage1.aci" }