From a7e568aa78c6a9bbddaf5e5cd890a6877a041f74 Mon Sep 17 00:00:00 2001 From: Jeremy Soller <jeremy@system76.com> Date: Sat, 6 Jul 2019 10:45:38 -0600 Subject: [PATCH] 0.2.9 - require fusermount --- Cargo.lock | 2 +- Cargo.toml | 2 +- Dockerfile | 1 + src/exec.rs | 21 +++++++++++---------- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ec50309..d0f921c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -723,7 +723,7 @@ dependencies = [ [[package]] name = "redoxer" -version = "0.2.8" +version = "0.2.9" dependencies = [ "dirs 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "proc-mounts 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 9c0385d..e1f18df 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "redoxer" -version = "0.2.8" +version = "0.2.9" description = "Method for quickly running programs inside of Redox from a KVM capable OS." license = "MIT" authors = ["Jeremy Soller <jackpot51@gmail.com>"] diff --git a/Dockerfile b/Dockerfile index 3c0b4dd..f7329c9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,7 @@ RUN apt-get update -qq && \ apt-get install -y -qq \ build-essential \ curl \ + fuse \ libfuse-dev \ pkg-config \ qemu-system-x86 diff --git a/src/exec.rs b/src/exec.rs index f281fe5..5ce256a 100644 --- a/src/exec.rs +++ b/src/exec.rs @@ -147,25 +147,26 @@ fn archive_free_space(disk_path: &Path, folder_path: &Path, bootloader_path: &Pa fn inner(arguments: &[String], folder_opt: Option<String>, gui: bool) -> io::Result<i32> { let kvm = Path::new("/dev/kvm").exists(); - if ! installed("qemu-system-x86_64")? { eprintln!("redoxer: qemu-system-x86 not found, please install before continuing"); process::exit(1); } let fuse = Path::new("/dev/fuse").exists(); - if ! fuse && ! installed("tar")? { + if fuse { + if ! installed("fusermount")? { + eprintln!("redoxer: fuse not found, please install before continuing"); + process::exit(1); + } + + if ! installed("redoxfs")? { + eprintln!("redoxer: redoxfs not found, please install before continuing"); + process::exit(1); + } + } else if ! installed("tar")? { eprintln!("redoxer: tar not found, please install before continuing"); process::exit(1); } - if fuse && ! installed("redoxfs")? { - eprintln!("redoxer: redoxfs not found, installing with cargo"); - Command::new("cargo") - .arg("install") - .arg("redoxfs") - .status() - .and_then(status_error)?; - } let bootloader_bin = bootloader()?; let base_bin = base(&bootloader_bin, gui, fuse)?; -- GitLab