Merge pull request #1714 from steveeJ/rkt-0.15.0

app-emulation/rkt: 0.13.0 -> 0.15.0, add fly stage1
This commit is contained in:
Alex Crawford 2016-01-13 09:38:21 -08:00
commit 71484782c6
4 changed files with 46 additions and 16 deletions

View File

@ -10,6 +10,7 @@
<use> <use>
<flag name="actool">Install the actool for ACI manipulation</flag> <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_coreos">Download and use a prebuilt stage1.aci from CoreOS</flag>
<flag name="rkt_stage1_fly">Build the experimental fly stage1 for chroot-only isolation</flag>
<flag name="rkt_stage1_src">Build the stage1.aci from source</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> <flag name="rkt_stage1_host">Assemble stage1.aci from host binaries</flag>
</use> </use>

View File

@ -14,12 +14,11 @@ 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"
if [[ "${PV}" == "9999" ]]; then if [[ "${PV}" == "9999" ]]; then
KEYWORDS="~amd64" KEYWORDS="~amd64"
else else
KEYWORDS="amd64" KEYWORDS="amd64"
CROS_WORKON_COMMIT="830d80ce39f3b68ca39dd5ec88920f7d7431d436" # v0.13.0 CROS_WORKON_COMMIT="36079186a84b27b3ac632c3732c7620f7ecb737c" # v0.15.0
fi fi
PXE_VERSION="794.1.0" PXE_VERSION="794.1.0"
@ -35,9 +34,10 @@ HOMEPAGE="https://github.com/coreos/rkt"
LICENSE="Apache-2.0" LICENSE="Apache-2.0"
SLOT="0" SLOT="0"
IUSE="doc examples +rkt_stage1_coreos rkt_stage1_host rkt_stage1_src +actool" IUSE="doc examples +rkt_stage1_coreos +rkt_stage1_fly rkt_stage1_host rkt_stage1_src +actool"
REQUIRED_USE="^^ ( rkt_stage1_coreos rkt_stage1_host rkt_stage1_src )" REQUIRED_USE="|| ( rkt_stage1_coreos rkt_stage1_fly rkt_stage1_host rkt_stage1_src )"
COMMON_DEPEND="sys-apps/acl"
DEPEND=">=dev-lang/go-1.4.1 DEPEND=">=dev-lang/go-1.4.1
app-arch/cpio app-arch/cpio
sys-fs/squashfs-tools sys-fs/squashfs-tools
@ -45,30 +45,51 @@ DEPEND=">=dev-lang/go-1.4.1
rkt_stage1_src? ( rkt_stage1_src? (
>=sys-apps/systemd-222 >=sys-apps/systemd-222
app-shells/bash app-shells/bash
)" )
${COMMON_DEPEND}"
RDEPEND="!app-emulation/rocket RDEPEND="!app-emulation/rocket
actool? ( !app-emulation/actool ) actool? ( !app-emulation/actool )
rkt_stage1_host? ( rkt_stage1_host? (
~sys-apps/systemd-222 ~sys-apps/systemd-222
app-shells/bash app-shells/bash
)" )
${COMMON_DEPEND}"
BUILDDIR="build-${P}" BUILDDIR="build-${P}"
STAGE1INSTALLDIR="/usr/share/rkt/"
STAGE1FIRST=""
STAGE1FLAVORS=""
function add_stage1() {
if [[ ${STAGE1FIRST} == "" ]]; then
STAGE1FIRST=$1
STAGE1FLAVORS=$1
else
STAGE1FLAVORS="${STAGE1FLAVORS},$1"
fi
}
src_configure() { src_configure() {
local myeconfargs=() local myeconfargs=()
if use rkt_stage1_host; then if use rkt_stage1_coreos; then
STAGE1FLAVOR="host" add_stage1 "coreos"
elif use rkt_stage1_src; then
STAGE1FLAVOR="src"
elif use rkt_stage1_coreos; then
STAGE1FLAVOR="coreos"
myeconfargs+=( --with-coreos-local-pxe-image-path="${DISTDIR}/${PXE_FILE}" ) myeconfargs+=( --with-coreos-local-pxe-image-path="${DISTDIR}/${PXE_FILE}" )
myeconfargs+=( --with-coreos-local-pxe-image-systemd-version=v"${PXE_SYSTEMD_VERSION}" ) myeconfargs+=( --with-coreos-local-pxe-image-systemd-version=v"${PXE_SYSTEMD_VERSION}" )
fi fi
myeconfargs+=( --with-stage1-flavors="${STAGE1FLAVOR}" ) if use rkt_stage1_fly; then
myeconfargs+=( --with-stage1-default-location="/usr/share/rkt/stage1-${STAGE1FLAVOR}.aci" ) add_stage1 "fly"
fi
if use rkt_stage1_host; then
add_stage1 "host"
fi
if use rkt_stage1_src; then
add_stage1 "src"
fi
myeconfargs+=( --with-stage1-flavors="${STAGE1FLAVORS}" )
myeconfargs+=( --with-stage1-default-location="/usr/share/rkt/stage1-${STAGE1FIRST}.aci" )
# Go's 6l linker does not support PIE, disable so cgo binaries # Go's 6l linker does not support PIE, disable so cgo binaries
# which use 6l+gcc for linking can be built correctly. # which use 6l+gcc for linking can be built correctly.
@ -95,8 +116,12 @@ src_install() {
dobin "${S}/${BUILDDIR}/bin/rkt" dobin "${S}/${BUILDDIR}/bin/rkt"
insinto /usr/share/rkt/ einfo The following stage1 ACIs have been installed to ${STAGE1INSTALLDIR}:
doins "${S}/${BUILDDIR}/bin/stage1-${STAGE1FLAVOR}.aci" insinto ${STAGE1INSTALLDIR}
for stage1aci in "${S}/${BUILDDIR}"/bin/stage1-*.aci; do
doins "${stage1aci}"
einfo $(basename "${stage1aci}")
done
systemd_dounit "${S}"/dist/init/systemd/${PN}-gc.service systemd_dounit "${S}"/dist/init/systemd/${PN}-gc.service
systemd_dounit "${S}"/dist/init/systemd/${PN}-gc.timer systemd_dounit "${S}"/dist/init/systemd/${PN}-gc.timer

View File

@ -15,3 +15,7 @@
# Require our ca-certificates package based directly on Mozilla's # Require our ca-certificates package based directly on Mozilla's
# certificate store provided in NSS rather than the Gentoo/Debian package. # certificate store provided in NSS rather than the Gentoo/Debian package.
>=app-misc/ca-certificates-20000000 >=app-misc/ca-certificates-20000000
# mask an accidental rkt major version bump to ensure it's not chosen over more
# recent releases
=app-emulation/rkt-13.0