mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-22 06:51:26 +02:00
app-emulation/rkt: version bumps
- Adapt 0.7 release and live ebuild to autotools buildsystem - Add use flags for stage1 flavor selecction
This commit is contained in:
parent
823c03873f
commit
211003ea2f
@ -1 +1,3 @@
|
|||||||
DIST pxe-444.5.0.img 114147963 SHA256 26aaee080c50e8ccb0aca81e22f7b64307e31ca0f5b4d8aa989a2381bb56879c SHA512 aad9983e90fc1c0924df505c91a2a9912cec8083fa3ec7b9b67d6de82daf4b420de638d7bde5f129770815d6fbac53913c6a80e254b3777981787730bafb4e08 WHIRLPOOL 1e373a8728a01bf6e53b2760d24187a19aec9d32f05f04de8557f6fec01f652d577781f447463188a50070aaf31f48b2c67317989d89d9c114920b0e0cd8edaf
|
DIST pxe-444.5.0.img 114147963 SHA256 26aaee080c50e8ccb0aca81e22f7b64307e31ca0f5b4d8aa989a2381bb56879c SHA512 aad9983e90fc1c0924df505c91a2a9912cec8083fa3ec7b9b67d6de82daf4b420de638d7bde5f129770815d6fbac53913c6a80e254b3777981787730bafb4e08 WHIRLPOOL 1e373a8728a01bf6e53b2760d24187a19aec9d32f05f04de8557f6fec01f652d577781f447463188a50070aaf31f48b2c67317989d89d9c114920b0e0cd8edaf
|
||||||
|
DIST rkt-pxe-709.0.0.img 148919232 SHA256 d0df52bee7134fdeb6bc4d973e7ff651979894c0895423e2e9a0dd35279e7c3b SHA512 dc2f70eb29ebfe32b66201fc7fe3a343eee66feb2ad5fa1635bb4a979252440e378d28496f567e8a7761942a9e42e1f846626626e81ec9be38f4980cd4a8db99 WHIRLPOOL 72960971ad2e97e13305b0c21496b306c43185aee94c369d2ce3aad522701926a9cb0fbbd250b789f4beadbda3f872ea1a007943545279c0d904c673cc32fd93
|
||||||
|
DIST rkt-pxe-738.1.0.img 151780780 SHA256 805a4c491281553c8927f3dd1a7bec50cca29209d0a7264870e7155d794ecbe6 SHA512 7774cc64dfa874f08f48cba0c15103e9eca86ffd87dcb24f765a9b56074e72f6862a663a4007a0a7dd296740ae91bf4edf7290fa35659b0b1572fe2f5dad3256 WHIRLPOOL 5973a6036d650c576bb0bd365c8c9ea35776501c1fd2baf1d7c00d06496fab35e9c796096ef89b095e7a922e2062dce6c0d1c85cd3101022e0aca84277d18cb9
|
||||||
|
16
sdk_container/src/third_party/coreos-overlay/app-emulation/rkt/metadata.xml
vendored
Normal file
16
sdk_container/src/third_party/coreos-overlay/app-emulation/rkt/metadata.xml
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||||
|
<pkgmetadata>
|
||||||
|
<longdescription lang="en">
|
||||||
|
rkt is a new container runtime, designed for composability, security,
|
||||||
|
and speed. Today we are releasing a prototype version on GitHub to begin
|
||||||
|
gathering feedback from our community and explain why we are building
|
||||||
|
rkt.
|
||||||
|
</longdescription>
|
||||||
|
<use>
|
||||||
|
<flag name="actool">Install the actool for ACI manipulation</flag>
|
||||||
|
<flag name="rkt_stage1_coreos">Download and use a prebuilt stage1.aci from CoreOS</flag>
|
||||||
|
<flag name="rkt_stage1_src">Build the stage1.aci from source</flag>
|
||||||
|
<flag name="rkt_stage1_host">Assemble stage1.aci from host binaries</flag>
|
||||||
|
</use>
|
||||||
|
</pkgmetadata>
|
@ -1 +0,0 @@
|
|||||||
rkt-9999.ebuild
|
|
57
sdk_container/src/third_party/coreos-overlay/app-emulation/rkt/rkt-0.5.5-r1.ebuild
vendored
Normal file
57
sdk_container/src/third_party/coreos-overlay/app-emulation/rkt/rkt-0.5.5-r1.ebuild
vendored
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
# Copyright (c) 2015 CoreOS, Inc.
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=5
|
||||||
|
CROS_WORKON_PROJECT="coreos/rkt"
|
||||||
|
CROS_WORKON_LOCALNAME="rkt"
|
||||||
|
CROS_WORKON_REPO="git://github.com"
|
||||||
|
inherit cros-workon systemd
|
||||||
|
|
||||||
|
if [[ "${PV}" == 9999 ]]; then
|
||||||
|
KEYWORDS="~amd64"
|
||||||
|
else
|
||||||
|
CROS_WORKON_COMMIT="40ced98c320c056e343fe9c3eaeb90a4ff248936" # v0.5.5
|
||||||
|
KEYWORDS="amd64"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Must be in sync with stage1/rootfs/usr_from_coreos/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="App Container runtime"
|
||||||
|
HOMEPAGE="https://github.com/coreos/rkt"
|
||||||
|
SRC_URI="${IMG_URL} -> pxe-${IMG_RELEASE}.img"
|
||||||
|
|
||||||
|
LICENSE="Apache-2.0"
|
||||||
|
SLOT="0"
|
||||||
|
IUSE=""
|
||||||
|
|
||||||
|
DEPEND=">=dev-lang/go-1.3
|
||||||
|
app-arch/cpio
|
||||||
|
sys-fs/squashfs-tools"
|
||||||
|
RDEPEND="!app-emulation/rocket"
|
||||||
|
|
||||||
|
src_unpack() {
|
||||||
|
local cache="${S}/stage1/rootfs/usr_from_coreos/cache"
|
||||||
|
|
||||||
|
cros-workon_src_unpack
|
||||||
|
|
||||||
|
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() {
|
||||||
|
RKT_STAGE1_IMAGE=/usr/share/rkt/stage1.aci CGO_ENABLED=0 ./build || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
dobin "${S}/bin/rkt"
|
||||||
|
|
||||||
|
insinto /usr/share/rkt
|
||||||
|
doins "${S}/bin/stage1.aci"
|
||||||
|
|
||||||
|
systemd_dounit "${FILESDIR}"/${PN}-gc.service
|
||||||
|
systemd_dounit "${FILESDIR}"/${PN}-gc.timer
|
||||||
|
}
|
1
sdk_container/src/third_party/coreos-overlay/app-emulation/rkt/rkt-0.7.0.ebuild
vendored
Symbolic link
1
sdk_container/src/third_party/coreos-overlay/app-emulation/rkt/rkt-0.7.0.ebuild
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
rkt-9999.ebuild
|
@ -1,57 +1,106 @@
|
|||||||
# Copyright (c) 2015 CoreOS, Inc.
|
# Copyright 1999-2015 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: $
|
||||||
|
|
||||||
EAPI=5
|
EAPI=5
|
||||||
|
|
||||||
|
AUTOTOOLS_AUTORECONF=yes
|
||||||
|
AUTOTOOLS_IN_SOURCE_BUILD=yes
|
||||||
|
|
||||||
|
inherit autotools-utils flag-o-matic systemd toolchain-funcs
|
||||||
|
inherit cros-workon
|
||||||
|
|
||||||
CROS_WORKON_PROJECT="coreos/rkt"
|
CROS_WORKON_PROJECT="coreos/rkt"
|
||||||
CROS_WORKON_LOCALNAME="rkt"
|
CROS_WORKON_LOCALNAME="rkt"
|
||||||
CROS_WORKON_REPO="git://github.com"
|
CROS_WORKON_REPO="git://github.com"
|
||||||
inherit cros-workon systemd
|
|
||||||
|
|
||||||
if [[ "${PV}" == 9999 ]]; then
|
if [[ "${PV}" == "9999" ]]; then
|
||||||
KEYWORDS="~amd64"
|
KEYWORDS="~amd64"
|
||||||
else
|
PXE_VERSION="738.1.0"
|
||||||
CROS_WORKON_COMMIT="40ced98c320c056e343fe9c3eaeb90a4ff248936" # v0.5.5
|
|
||||||
KEYWORDS="amd64"
|
elif [[ "${PV}" == "0.7.0" ]]; then
|
||||||
|
KEYWORDS="amd64"
|
||||||
|
PXE_VERSION="709.0.0"
|
||||||
|
CROS_WORKON_COMMIT="9579f4bf57851a1a326c81ec2ab0ed2fdfab8d24"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Must be in sync with stage1/rootfs/usr_from_coreos/cache.sh
|
PXE_URI="http://alpha.release.core-os.net/amd64-usr/${PXE_VERSION}/coreos_production_pxe_image.cpio.gz"
|
||||||
IMG_RELEASE="444.5.0"
|
PXE_FILE="${PN}-pxe-${PXE_VERSION}.img"
|
||||||
IMG_URL="http://stable.release.core-os.net/amd64-usr/${IMG_RELEASE}/coreos_production_pxe_image.cpio.gz"
|
|
||||||
|
|
||||||
DESCRIPTION="App Container runtime"
|
SRC_URI="rkt_stage1_coreos? ( $PXE_URI -> $PXE_FILE )"
|
||||||
|
|
||||||
|
DESCRIPTION="A CLI for running app containers, and an implementation of the App
|
||||||
|
Container Spec."
|
||||||
HOMEPAGE="https://github.com/coreos/rkt"
|
HOMEPAGE="https://github.com/coreos/rkt"
|
||||||
SRC_URI="${IMG_URL} -> pxe-${IMG_RELEASE}.img"
|
|
||||||
|
|
||||||
LICENSE="Apache-2.0"
|
LICENSE="Apache-2.0"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
IUSE=""
|
IUSE="doc examples +rkt_stage1_coreos rkt_stage1_host rkt_stage1_src +actool"
|
||||||
|
REQUIRED_USE="^^ ( rkt_stage1_coreos rkt_stage1_host rkt_stage1_src )"
|
||||||
|
|
||||||
DEPEND=">=dev-lang/go-1.3
|
DEPEND=">=dev-lang/go-1.4.1
|
||||||
app-arch/cpio
|
app-arch/cpio
|
||||||
sys-fs/squashfs-tools"
|
sys-fs/squashfs-tools
|
||||||
RDEPEND="!app-emulation/rocket"
|
dev-perl/Capture-Tiny
|
||||||
|
rkt_stage1_src? (
|
||||||
|
>=sys-apps/systemd-220
|
||||||
|
app-shells/bash
|
||||||
|
)"
|
||||||
|
RDEPEND="!app-emulation/rocket
|
||||||
|
rkt_stage1_host? (
|
||||||
|
>=sys-apps/systemd-220
|
||||||
|
app-shells/bash
|
||||||
|
)"
|
||||||
|
|
||||||
src_unpack() {
|
BUILDDIR="build-${P}"
|
||||||
local cache="${S}/stage1/rootfs/usr_from_coreos/cache"
|
|
||||||
|
|
||||||
cros-workon_src_unpack
|
src_configure() {
|
||||||
|
local myeconfargs=(
|
||||||
|
--with-stage1-image-path="/usr/share/rkt/stage1.aci"
|
||||||
|
)
|
||||||
|
|
||||||
mkdir -p "${cache}" || die
|
if use rkt_stage1_host; then
|
||||||
cp "${DISTDIR}/pxe-${IMG_RELEASE}.img" "${cache}/pxe.img" || die
|
myeconfargs+=( --with-stage1="host" )
|
||||||
}
|
fi
|
||||||
|
if use rkt_stage1_src; then
|
||||||
|
myeconfargs+=( --with-stage1="src" )
|
||||||
|
fi
|
||||||
|
if use rkt_stage1_coreos; then
|
||||||
|
myeconfargs+=( --with-stage1="coreos" )
|
||||||
|
mkdir -p "${BUILDDIR}/tmp/usr_from_coreos/" || die
|
||||||
|
cp "${DISTDIR}/${PXE_FILE}" "${BUILDDIR}/tmp/usr_from_coreos/pxe.img" || die
|
||||||
|
fi
|
||||||
|
|
||||||
# TODO: Use or adapt coreos-go.eclass so we have half a chance of
|
# Go's 6l linker does not support PIE, disable so cgo binaries
|
||||||
# cross-compiling builds working
|
# which use 6l+gcc for linking can be built correctly.
|
||||||
src_compile() {
|
if gcc-specs-pie; then
|
||||||
RKT_STAGE1_IMAGE=/usr/share/rkt/stage1.aci CGO_ENABLED=0 ./build || die
|
append-ldflags -nopie
|
||||||
|
fi
|
||||||
|
|
||||||
|
export CC=$(tc-getCC)
|
||||||
|
export CGO_ENABLED=1
|
||||||
|
export CGO_CFLAGS="${CFLAGS}"
|
||||||
|
export CGO_CPPFLAGS="${CPPFLAGS}"
|
||||||
|
export CGO_CXXFLAGS="${CXXFLAGS}"
|
||||||
|
export CGO_LDFLAGS="${LDFLAGS}"
|
||||||
|
export BUILDDIR
|
||||||
|
|
||||||
|
autotools-utils_src_configure
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
dobin "${S}/bin/rkt"
|
dodoc README.md
|
||||||
|
use doc && dodoc -r Documentation
|
||||||
|
use examples && dodoc -r examples
|
||||||
|
use actool && dobin "${S}/${BUILDDIR}/bin/actool"
|
||||||
|
|
||||||
insinto /usr/share/rkt
|
dobin "${S}/${BUILDDIR}/bin/rkt"
|
||||||
doins "${S}/bin/stage1.aci"
|
|
||||||
|
insinto /usr/share/rkt/
|
||||||
|
doins "${S}/${BUILDDIR}/bin/stage1.aci"
|
||||||
|
|
||||||
systemd_dounit "${FILESDIR}"/${PN}-gc.service
|
systemd_dounit "${FILESDIR}"/${PN}-gc.service
|
||||||
systemd_dounit "${FILESDIR}"/${PN}-gc.timer
|
systemd_dounit "${FILESDIR}"/${PN}-gc.timer
|
||||||
|
systemd_dounit "${S}"/dist/init/systemd/${PN}-metadata.service
|
||||||
|
systemd_dounit "${S}"/dist/init/systemd/${PN}-metadata.socket
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user