1 |
commit: 1b6b6de34f19dceb3a64c66cd5d2bbb4ada29355 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 29 18:21:40 2016 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 29 18:24:39 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b6b6de3 |
7 |
|
8 |
app-emulation/rkt: support rkt_stage1_host |
9 |
|
10 |
Package-Manager: portage-2.2.27 |
11 |
|
12 |
app-emulation/rkt/rkt-1.1.0.ebuild | 25 +++++++++++++++++-------- |
13 |
1 file changed, 17 insertions(+), 8 deletions(-) |
14 |
|
15 |
diff --git a/app-emulation/rkt/rkt-1.1.0.ebuild b/app-emulation/rkt/rkt-1.1.0.ebuild |
16 |
index 4ae5909..3628d9e 100644 |
17 |
--- a/app-emulation/rkt/rkt-1.1.0.ebuild |
18 |
+++ b/app-emulation/rkt/rkt-1.1.0.ebuild |
19 |
@@ -32,8 +32,8 @@ HOMEPAGE="https://github.com/coreos/rkt" |
20 |
|
21 |
LICENSE="Apache-2.0" |
22 |
SLOT="0" |
23 |
-IUSE="doc examples +rkt_stage1_coreos +rkt_stage1_fly rkt_stage1_kvm rkt_stage1_src +actool" |
24 |
-REQUIRED_USE="|| ( rkt_stage1_coreos rkt_stage1_fly rkt_stage1_kvm rkt_stage1_src )" |
25 |
+IUSE="doc examples +rkt_stage1_coreos +rkt_stage1_fly rkt_stage1_host rkt_stage1_kvm rkt_stage1_src +actool systemd" |
26 |
+REQUIRED_USE="|| ( rkt_stage1_coreos rkt_stage1_fly rkt_stage1_host rkt_stage1_kvm rkt_stage1_src ) rkt_stage1_host? ( systemd )" |
27 |
|
28 |
DEPEND=">=dev-lang/go-1.4.1 |
29 |
app-arch/cpio |
30 |
@@ -41,7 +41,11 @@ DEPEND=">=dev-lang/go-1.4.1 |
31 |
sys-fs/squashfs-tools |
32 |
dev-perl/Capture-Tiny" |
33 |
|
34 |
-RDEPEND="!app-emulation/rocket" |
35 |
+RDEPEND="!app-emulation/rocket |
36 |
+ systemd? ( |
37 |
+ >=sys-apps/systemd-222 |
38 |
+ app-shells/bash:0 |
39 |
+ )" |
40 |
|
41 |
BUILDDIR="build-${P}" |
42 |
STAGE1_DEFAULT_LOCATION="/usr/share/rkt/stage1.aci" |
43 |
@@ -84,6 +88,12 @@ src_prepare() { |
44 |
sed -e 's|wget .*|ln -s "$${DISTDIR}/linux-'${KVM_LINUX_VERSION}'.tar.xz" "$@"|' \ |
45 |
-i stage1/usr_from_kvm/kernel.mk || die |
46 |
|
47 |
+ if use rkt_stage1_host; then |
48 |
+ # Make systemdUnitsPath consistent with host |
49 |
+ sed -e 's|\(systemdUnitsPath := \).*|\1"'$(systemd_get_systemunitdir)'"|' \ |
50 |
+ -i stage1/init/init.go || die |
51 |
+ fi |
52 |
+ |
53 |
autotools-utils_src_prepare |
54 |
} |
55 |
|
56 |
@@ -93,11 +103,8 @@ src_configure() { |
57 |
--with-stage1-default-location="${STAGE1_DEFAULT_LOCATION}" |
58 |
) |
59 |
|
60 |
- # TODO: |
61 |
- # - fix rkt_stage1_kvm to not download kernel sources with wget |
62 |
- # - fix rkt_stage1_host to not fail during launch |
63 |
- |
64 |
# enable flavors (first is default) |
65 |
+ use rkt_stage1_host && flavors+=",host" |
66 |
use rkt_stage1_src && flavors+=",src" |
67 |
use rkt_stage1_coreos && flavors+=",coreos" |
68 |
use rkt_stage1_fly && flavors+=",fly" |
69 |
@@ -148,7 +155,9 @@ src_install() { |
70 |
doins "${S}/${BUILDDIR}/bin/"*.aci |
71 |
|
72 |
# create symlink for default stage1 image path |
73 |
- if use rkt_stage1_src; then |
74 |
+ if use rkt_stage1_host; then |
75 |
+ dosym stage1-host.aci "${STAGE1_DEFAULT_LOCATION}" |
76 |
+ elif use rkt_stage1_src; then |
77 |
dosym stage1-src.aci "${STAGE1_DEFAULT_LOCATION}" |
78 |
elif use rkt_stage1_coreos; then |
79 |
dosym stage1-coreos.aci "${STAGE1_DEFAULT_LOCATION}" |