Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app-emulation/muvm: Add 0.1.2-r1 #121

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}
Loading