summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-emulation/rkt/Manifest2
-rw-r--r--app-emulation/rkt/metadata.xml1
-rw-r--r--app-emulation/rkt/rkt-1.1.0.ebuild51
3 files changed, 52 insertions, 2 deletions
diff --git a/app-emulation/rkt/Manifest b/app-emulation/rkt/Manifest
index c025c72357ac..7703448b56ac 100644
--- a/app-emulation/rkt/Manifest
+++ b/app-emulation/rkt/Manifest
@@ -1,3 +1,5 @@
+DIST kvmtool-3c8aec9e2b5066412390559629dabeb7816ee8f2.tar.gz 241486 SHA256 a3e65e5331e8bb20b112ac2dcc252fbcc9b9a83ef20292874ed4682bc2d87dcc SHA512 21a9ec313a9f46d6ebc4b7badfcc731350f5e58781892f33d11b907e085b84e6eebcaf2f22d101ed46a570e87d6530468be0bf6c258f195a38d594407cb2471b WHIRLPOOL f998afe674ef1bb8050d944646d35854fb75c3ef00eb0379ba3a52ea80bc9590e793fd333cb45803f683a4d0ed21c61d6d1cc7b74d01eb9503a6d960eef9e143
+DIST linux-4.3.1.tar.xz 86900452 SHA256 11faaff6e7546038b868f524cdf42a5a1b67be9fdfd37d931723a8deb1811b72 SHA512 640db1a15db2e18f912e8ea93b01c784740d1a9957dc1d5580809448adb0713edfb02b7172f61362f0f362800c88f09dcc8165005250a757fbd942b59e36ba16 WHIRLPOOL f5de4ea768ad7a5cad21705c24b79773522207ffbc85209676b1a4ce067e031330ded68e2201953c477c3dae743f95521da230194be90be900afa30f39f943c5
DIST rkt-0.8.0.tar.gz 1749853 SHA256 c9eb0126b8ff2f059d7cedaab17ca73dce256f342092c9bf4a7ae20661f2a5aa SHA512 4e2c27fb40cd3d27de062631105db3ea04ed902f48abb647a8e4de249478dd8a145ac0b77fd5b261cc680df1bcaa4067accb8a597def9b3963108e2c1f3d9d5a WHIRLPOOL f65ddd8908ec30cfefa06e60cd4d8cdb2099ab279b6350790eb3e436b88c792efe28cea53569f48d42f6eec682635a4212f16fea9d184e6baa97877a643e1106
DIST rkt-1.0.0.tar.gz 2414183 SHA256 7e30b03fa51a34db095484c4b111c526e49bead4e33232e1b239090503d7ac97 SHA512 f176532486b68ebc15aae17cfcf31e0f97ce3afc96bfed1c4f918da41350ef21c170712cb071a8720f39ee757b7b9ba1e66730d6e12acb9753446b929801c4ff WHIRLPOOL b2fc3082693b474584292a6ec943a685826364632dc346b18233bf9b9d2feaf14981f4a7fcbd9e79b98c2466b2f24be9b57f6345c89aeea5d075cdbeee26aba5
DIST rkt-1.1.0.tar.gz 2426666 SHA256 df93dffc1deff470a5bebaa2610a07df8f48e69f660c81de0a31de13d7f7bfa5 SHA512 ef444843f411cd2d1fcd02f606bf5d0971eb314d708d1d54d07af9e3d69e1d74a7812456fd7cc46372ca6e42cfd5ac6af6b7b67e22890396f58d8982c0af1373 WHIRLPOOL 0579f5efd28d473ab4a0874d7218268a2a1143118b9f3e39670a683f05c7fb3b1b952aee75f0c923d76bc457c4d933c3c9b329f99960fa0a95cde2573225288b
diff --git a/app-emulation/rkt/metadata.xml b/app-emulation/rkt/metadata.xml
index 33d47776dd7f..7b1939a8dd31 100644
--- a/app-emulation/rkt/metadata.xml
+++ b/app-emulation/rkt/metadata.xml
@@ -15,6 +15,7 @@
<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_fly">Build stage1-fly.aci</flag>
+ <flag name="rkt_stage1_kvm">Build stage1-kvm.aci</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>
diff --git a/app-emulation/rkt/rkt-1.1.0.ebuild b/app-emulation/rkt/rkt-1.1.0.ebuild
index aab553164fdf..ce9a5ebb6c7e 100644
--- a/app-emulation/rkt/rkt-1.1.0.ebuild
+++ b/app-emulation/rkt/rkt-1.1.0.ebuild
@@ -13,11 +13,17 @@ KEYWORDS="~amd64"
PXE_VERSION="794.1.0"
PXE_SYSTEMD_VERSION="v222"
+KVM_LINUX_VERSION="4.3.1"
+KVMTOOL_VERSION="3c8aec9e2b5066412390559629dabeb7816ee8f2"
PXE_URI="http://alpha.release.core-os.net/amd64-usr/${PXE_VERSION}/coreos_production_pxe_image.cpio.gz"
PXE_FILE="${PN}-pxe-${PXE_VERSION}.img"
SRC_URI="https://github.com/coreos/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
rkt_stage1_coreos? ( $PXE_URI -> $PXE_FILE )
+rkt_stage1_kvm? (
+ https://kernel.googlesource.com/pub/scm/linux/kernel/git/will/kvmtool/+archive/${KVMTOOL_VERSION}.tar.gz -> kvmtool-${KVMTOOL_VERSION}.tar.gz
+ mirror://kernel/linux/kernel/v4.x/linux-${KVM_LINUX_VERSION}.tar.xz
+)
rkt_stage1_src? ( https://github.com/systemd/systemd/archive/${PXE_SYSTEMD_VERSION}.tar.gz -> systemd-${PXE_SYSTEMD_VERSION#v}.tar.gz )"
DESCRIPTION="A CLI for running app containers, and an implementation of the App
@@ -26,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_src +actool"
-REQUIRED_USE="|| ( rkt_stage1_coreos rkt_stage1_fly rkt_stage1_src )"
+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 )"
DEPEND=">=dev-lang/go-1.4.1
app-arch/cpio
@@ -40,6 +46,23 @@ RDEPEND="!app-emulation/rocket"
BUILDDIR="build-${P}"
STAGE1_DEFAULT_LOCATION="/usr/share/rkt/stage1.aci"
+src_unpack() {
+ local x
+ for x in ${A}; do
+ case ${x} in
+ *.img|linux-*) continue ;;
+ kvmtool-*)
+ mkdir kvmtool || die
+ pushd kvmtool >/dev/null || die
+ unpack ${x}
+ popd >/dev/null || die
+ ;;
+ *)
+ unpack ${x}
+ esac
+ done
+}
+
src_prepare() {
# disable git fetch of systemd
sed -e 's|^include makelib/git.mk$|_ := '\
@@ -48,6 +71,19 @@ src_prepare() {
'mkdir -p "$$( dirname "$(UFS_SYSTEMD_SRCDIR)")"; '\
'mv "$${WORKDIR}/systemd-'${PXE_SYSTEMD_VERSION#v}'" "$(UFS_SYSTEMD_SRCDIR)";)|' \
-i stage1/usr_from_src/usr_from_src.mk || die
+
+ # disable git fetch of kvmtool
+ sed -e 's|^include makelib/git.mk$|_ := '\
+'$(shell set -ex; [ -d "$(LKVM_SRCDIR)" ] \&\& exit 0; '\
+'[ ! -d "$${WORKDIR}/kvmtool" ] \&\& exit 0; '\
+'mkdir -p "$$( dirname "$(LKVM_SRCDIR)")"; '\
+'mv "$${WORKDIR}/kvmtool" "$(LKVM_SRCDIR)";)|' \
+ -i stage1/usr_from_kvm/lkvm.mk || die
+
+ # disable fetch of kernel sources
+ sed -e 's|wget .*|ln -s "$${DISTDIR}/linux-'${KVM_LINUX_VERSION}'.tar.xz" "$@"|' \
+ -i stage1/usr_from_kvm/kernel.mk || die
+
autotools-utils_src_prepare
}
@@ -65,6 +101,7 @@ src_configure() {
use rkt_stage1_src && flavors+=",src"
use rkt_stage1_coreos && flavors+=",coreos"
use rkt_stage1_fly && flavors+=",fly"
+ use rkt_stage1_kvm && flavors+=",kvm"
myeconfargs+=( --with-stage1-flavors="${flavors#,}" )
if use rkt_stage1_coreos; then
@@ -91,6 +128,14 @@ src_configure() {
autotools-utils_src_configure
}
+src_compile() {
+ local arch=${ARCH}
+ case ${arch} in
+ amd64) arch=x86_64;;
+ esac
+ ARCH=${arch} autotools-utils_src_compile
+}
+
src_install() {
dodoc README.md
use doc && dodoc -r Documentation
@@ -109,6 +154,8 @@ src_install() {
dosym stage1-coreos.aci "${STAGE1_DEFAULT_LOCATION}"
elif use rkt_stage1_fly; then
dosym stage1-fly.aci "${STAGE1_DEFAULT_LOCATION}"
+ elif use rkt_stage1_kvm; then
+ dosym stage1-kvm.aci "${STAGE1_DEFAULT_LOCATION}"
fi
systemd_dounit "${S}"/dist/init/systemd/${PN}-gc.service