From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-866282-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 7ABFB1388C0
	for <garchives@archives.gentoo.org>; Mon, 29 Feb 2016 18:24:50 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id EFB94E07A0;
	Mon, 29 Feb 2016 18:24:49 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 7F89EE07A0
	for <gentoo-commits@lists.gentoo.org>; Mon, 29 Feb 2016 18:24:49 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 33CA8340AB2
	for <gentoo-commits@lists.gentoo.org>; Mon, 29 Feb 2016 18:24:48 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id BBC3F16C4
	for <gentoo-commits@lists.gentoo.org>; Mon, 29 Feb 2016 18:24:45 +0000 (UTC)
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" <zmedico@gentoo.org>
Message-ID: <1456770279.1b6b6de34f19dceb3a64c66cd5d2bbb4ada29355.zmedico@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/rkt/
X-VCS-Repository: repo/gentoo
X-VCS-Files: app-emulation/rkt/rkt-1.1.0.ebuild
X-VCS-Directories: app-emulation/rkt/
X-VCS-Committer: zmedico
X-VCS-Committer-Name: Zac Medico
X-VCS-Revision: 1b6b6de34f19dceb3a64c66cd5d2bbb4ada29355
X-VCS-Branch: master
Date: Mon, 29 Feb 2016 18:24:45 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 29cb86fb-beda-4924-b109-e23fce4a4d4e
X-Archives-Hash: cf6394f624f99754dd5784a1cd574887

commit:     1b6b6de34f19dceb3a64c66cd5d2bbb4ada29355
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 29 18:21:40 2016 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Feb 29 18:24:39 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b6b6de3

app-emulation/rkt: support rkt_stage1_host

Package-Manager: portage-2.2.27

 app-emulation/rkt/rkt-1.1.0.ebuild | 25 +++++++++++++++++--------
 1 file 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 4ae5909..3628d9e 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}"