Skip to content

Commit

Permalink
app-emulation/muvm: Add 0.1.2-r1
Browse files Browse the repository at this point in the history
Signed-off-by: Sasha Finkelstein <[email protected]>
  • Loading branch information
WhatAmISupposedToPutHere authored and chadmed committed Oct 16, 2024
1 parent 2b48297 commit c7b0175
Show file tree
Hide file tree
Showing 2 changed files with 162 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/crates/muvm/src/guest/mount.rs b/crates/muvm/src/guest/mount.rs
index adeb327..b4ffb58 100644
--- a/crates/muvm/src/guest/mount.rs
+++ b/crates/muvm/src/guest/mount.rs
@@ -74,6 +74,10 @@ fn mount_fex_rootfs() -> Result<()> {
} else if images.len() == 1 {
// Just expose the one mount
symlink(&images[0], &dir_rootfs)?;
+ } else if images.is_empty() {
+ // If no images were passed, FEX is either managed by the host os
+ // or is not installed at all. Avoid clobbering the config in that case.
+ return Ok(())
}

// Now we need to tell FEX about this. One of the FEX share directories has an unmounted rootfs
147 changes: 147 additions & 0 deletions app-emulation/muvm/muvm-0.1.2-r1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

CRATES="
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]+wasi-snapshot-preview1
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
"

inherit cargo

DESCRIPTION="Run programs from your system in a microVM"
HOMEPAGE="https://github.com/AsahiLinux/muvm"

SRC_URI="
${CARGO_CRATE_URIS}
https://github.com/AsahiLinux/muvm/archive/refs/tags/${P}.tar.gz -> ${P}.tar.gz
"

S="${WORKDIR}/muvm-${P}"

LICENSE="0BSD Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD Boost-1.0 MIT Unicode-DFS-2016 Unlicense ZLIB"
SLOT="0"
KEYWORDS="~arm64"

PATCHES="
${FILESDIR}/${P}-do-not-clobber-fex-config.patch
"

DEPEND="
dev-libs/libkrun
"
RDEPEND="
${DEPEND}
net-misc/passt
net-misc/socat
gui-wm/sommelier
games-util/hidpipe
|| (
net-misc/dhcpcd
net-misc/dhcp[client]
)
"

src_compile() {
cargo_src_compile --workspace
}

src_install() {
local bin
for bin in muvm{,-guest,-server}; do
dobin "$(cargo_target_dir)/$bin"
done
}

0 comments on commit c7b0175

Please sign in to comment.