summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2016-02-29 10:21:40 -0800
committerZac Medico <zmedico@gentoo.org>2016-02-29 10:24:39 -0800
commit1b6b6de34f19dceb3a64c66cd5d2bbb4ada29355 (patch)
treef128db282a5ea62474ce05ff5dedd62ebe1ca08b /app-emulation/rkt
parentapp-emulation/rkt: Whitespace (diff)
downloadgentoo-1b6b6de34f19dceb3a64c66cd5d2bbb4ada29355.tar.gz
gentoo-1b6b6de34f19dceb3a64c66cd5d2bbb4ada29355.tar.bz2
gentoo-1b6b6de34f19dceb3a64c66cd5d2bbb4ada29355.zip
app-emulation/rkt: support rkt_stage1_host
Package-Manager: portage-2.2.27
Diffstat (limited to 'app-emulation/rkt')
-rw-r--r--app-emulation/rkt/rkt-1.1.0.ebuild25
1 files changed, 17 insertions, 8 deletions
diff --git a/app-emulation/rkt/rkt-1.1.0.ebuild b/app-emulation/rkt/rkt-1.1.0.ebuild
index 4ae5909bdf62..3628d9e2a697 100644
--- a/app-emulation/rkt/rkt-1.1.0.ebuild
+++ b/app-emulation/rkt/rkt-1.1.0.ebuild
@@ -32,8 +32,8 @@ HOMEPAGE="https://github.com/coreos/rkt"
LICENSE="Apache-2.0"
SLOT="0"
-IUSE="doc examples +rkt_stage1_coreos +rkt_stage1_fly rkt_stage1_kvm rkt_stage1_src +actool"
-REQUIRED_USE="|| ( rkt_stage1_coreos rkt_stage1_fly rkt_stage1_kvm rkt_stage1_src )"
+IUSE="doc examples +rkt_stage1_coreos +rkt_stage1_fly rkt_stage1_host rkt_stage1_kvm rkt_stage1_src +actool systemd"
+REQUIRED_USE="|| ( rkt_stage1_coreos rkt_stage1_fly rkt_stage1_host rkt_stage1_kvm rkt_stage1_src ) rkt_stage1_host? ( systemd )"
DEPEND=">=dev-lang/go-1.4.1
app-arch/cpio
@@ -41,7 +41,11 @@ DEPEND=">=dev-lang/go-1.4.1
sys-fs/squashfs-tools
dev-perl/Capture-Tiny"
-RDEPEND="!app-emulation/rocket"
+RDEPEND="!app-emulation/rocket
+ systemd? (
+ >=sys-apps/systemd-222
+ app-shells/bash:0
+ )"
BUILDDIR="build-${P}"
STAGE1_DEFAULT_LOCATION="/usr/share/rkt/stage1.aci"
@@ -84,6 +88,12 @@ src_prepare() {
sed -e 's|wget .*|ln -s "$${DISTDIR}/linux-'${KVM_LINUX_VERSION}'.tar.xz" "$@"|' \
-i stage1/usr_from_kvm/kernel.mk || die
+ if use rkt_stage1_host; then
+ # Make systemdUnitsPath consistent with host
+ sed -e 's|\(systemdUnitsPath := \).*|\1"'$(systemd_get_systemunitdir)'"|' \
+ -i stage1/init/init.go || die
+ fi
+
autotools-utils_src_prepare
}
@@ -93,11 +103,8 @@ src_configure() {
--with-stage1-default-location="${STAGE1_DEFAULT_LOCATION}"
)
- # TODO:
- # - fix rkt_stage1_kvm to not download kernel sources with wget
- # - fix rkt_stage1_host to not fail during launch
-
# enable flavors (first is default)
+ use rkt_stage1_host && flavors+=",host"
use rkt_stage1_src && flavors+=",src"
use rkt_stage1_coreos && flavors+=",coreos"
use rkt_stage1_fly && flavors+=",fly"
@@ -148,7 +155,9 @@ src_install() {
doins "${S}/${BUILDDIR}/bin/"*.aci
# create symlink for default stage1 image path
- if use rkt_stage1_src; then
+ if use rkt_stage1_host; then
+ dosym stage1-host.aci "${STAGE1_DEFAULT_LOCATION}"
+ elif use rkt_stage1_src; then
dosym stage1-src.aci "${STAGE1_DEFAULT_LOCATION}"
elif use rkt_stage1_coreos; then
dosym stage1-coreos.aci "${STAGE1_DEFAULT_LOCATION}"