The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
fix(linux): git Vorabpruefung vor jedem Download, Paketabhaengigkeiten und Doku
purplef6b39417b884
diff --git a/docs/guide/first-start/index.html b/docs/guide/first-start/index.htmlindex 02b326ec..30ba7d0f 100644--- a/docs/guide/first-start/index.html+++ b/docs/guide/first-start/index.html@@ -172,6 +172,8 @@ In the Models tab every model tile has a small dot that compares the model's siz<p><strong>"Installing Python did not finish."</strong> (Windows) The app uses winget to fetch Python 3.12. If winget is missing or blocked on your machine, install Python 3.12 from python.org yourself, then click "Install ComfyUI (Recommended)" again.</p>+<p><strong>"Git is not installed."</strong> (Linux) ComfyUI is downloaded with git, and a fresh cloud or minimal desktop image often does not have it yet. The message names the exact command for your distribution, for example <code>sudo apt install git</code> on Debian and Ubuntu, <code>sudo dnf install git</code> on Fedora and RHEL, <code>sudo pacman -S git</code> on Arch, or <code>sudo zypper install git</code> on openSUSE. Run it, then click "Install ComfyUI (Recommended)" again.</p>+<p><strong>"Installing ComfyUI did not finish."</strong> The last installer line is shown. A red line beginning with a warning triangle during the install means the drive is short of space; the install needs several gigabytes free. Free some space and click the button again; files that finished are kept.</p><p><strong>"Install cancelled."</strong> You pressed Cancel. The install options return and you can start again or skip.</p>diff --git a/docs/guide/install/index.html b/docs/guide/install/index.htmlindex be028fb2..f04b75d1 100644--- a/docs/guide/install/index.html+++ b/docs/guide/install/index.html@@ -109,6 +109,8 @@<pre><code>chmod +x Locally.Uncensored_3.0.0_amd64.AppImage./Locally.Uncensored_3.0.0_amd64.AppImage</code></pre><p>The AppImage bundles the LU Engine and the media framework. It needs the Vulkan loader (<code>libvulkan1</code> on Debian and Ubuntu, <code>vulkan-loader</code> on Fedora) and the OpenMP runtime (<code>libgomp1</code> or <code>libgomp</code>) on the system, because the engine loads them at start. Most desktop installs have both. If one is missing, the engine tells you the package name, and chapter 9 lists the sentence.</p>+<p>The AppImage also needs FUSE to mount itself. Most desktops already have it; a fresh cloud or minimal install may not. Debian 13 and Ubuntu 24.04 and newer renamed the package from <code>libfuse2</code> to <code>libfuse2t64</code> (the time64 transition), so an older guide that says "install libfuse2" fails there with "package not found". Install the one that matches your system: <code>sudo apt install libfuse2t64</code> on Debian 13 or Ubuntu 24.04 and newer, <code>sudo apt install libfuse2</code> on older Debian and Ubuntu, <code>sudo dnf install fuse-libs</code> on Fedora. Without it the AppImage does not start at all, with no window and no error dialog, only a mount failure on the command line.</p>+<p>A fresh Fedora install (in particular the Cloud Edition image) also ships without the WebKitGTK runtime the window needs: install <code>sudo dnf install webkit2gtk4.1 gtk3 libappindicator-gtk3</code> first if the app never shows a window.</p></div></div>diff --git a/src-tauri/src/commands/install/comfy_install.rs b/src-tauri/src/commands/install/comfy_install.rsindex 465f8c60..c6e955ca 100644--- a/src-tauri/src/commands/install/comfy_install.rs+++ b/src-tauri/src/commands/install/comfy_install.rs@@ -323,6 +323,15 @@ pub fn install_comfyui(}}+ // Linux setup stolpstein (BERICHT-5-APPIMAGE.md): fresh Debian 13+ // and Fedora 43 cloud/desktop images ship no git at all. Probe+ // before spending any bytes on the clone and name the exact+ // package manager command instead of dying with a generic error.+ if let Some(hint) = super::git::git_download_preflight() {+ update("error", &hint);+ return;+ }+// Step 1: Git clone — spawn+poll instead of cmd.output() so the// Cancel button can kill an in-flight clone (Bug #1).println!("[Install] Cloning ComfyUI to {:?}", target_dir);diff --git a/src-tauri/src/commands/install/comfy_repair.rs b/src-tauri/src/commands/install/comfy_repair.rsindex 1005d8a3..1fc50810 100644--- a/src-tauri/src/commands/install/comfy_repair.rs+++ b/src-tauri/src/commands/install/comfy_repair.rs@@ -1072,6 +1072,14 @@ pub fn update_comfyui(state: State<'_, AppState>, app: tauri::AppHandle) -> Resu}}+ // Linux setup stolpstein (BERICHT-5-APPIMAGE.md): fresh Debian 13+ // and Fedora 43 cloud/desktop images ship no git at all. Probe+ // before the `git pull --ff-only` below touches anything.+ if let Some(hint) = super::git::git_download_preflight() {+ update("error", &hint);+ return;+ }+// Runde 6, F8 (review Runde 5, same objection as Runde 4 raised for// the Install path): this preflight used to sit AFTER `git pull// --ff-only`, so an update on a venv with no compatible interpreterdiff --git a/src-tauri/src/commands/install/custom_nodes.rs b/src-tauri/src/commands/install/custom_nodes.rsindex 444f845f..3685d43c 100644--- a/src-tauri/src/commands/install/custom_nodes.rs+++ b/src-tauri/src/commands/install/custom_nodes.rs@@ -149,6 +149,13 @@ fn install_custom_node_blocking(}}+ // Linux setup stolpstein (BERICHT-5-APPIMAGE.md): fresh Debian 13 and+ // Fedora 43 cloud/desktop images ship no git at all. Probe before+ // spending any bytes on the clone/pull below.+ if let Some(hint) = super::git::git_download_preflight() {+ return Err(hint);+ }+// #72 (bob, discussion 72): three silent failure modes lived here.// 1. A leftover non-repo dir (aborted clone, manual unzip) made `git pull`// fail forever, and the failure came back as Ok(status="update_failed")diff --git a/src-tauri/src/commands/install/git.rs b/src-tauri/src/commands/install/git.rsindex b619e843..f384cbe1 100644--- a/src-tauri/src/commands/install/git.rs+++ b/src-tauri/src/commands/install/git.rs@@ -102,8 +102,8 @@ pub fn windows_git_install_hint(state: &WindowsGitState) -> Option<String> {WindowsGitState::Native => None,WindowsGitState::Missing => Some("Git is not installed or not on PATH. Install Git for Windows from \- https://git-scm.com/download/win and restart LU so the new PATH \- is picked up.".to_string(),+ https://git-scm.com/download/win (or run `winget install Git.Git` in a \+ terminal) and restart LU so the new PATH is picked up.".to_string(),),WindowsGitState::NonNative => Some("A non-native `git` binary is first on PATH (likely WSL or a Linux \@@ -167,6 +167,140 @@ fn git_download_url() -> &'static str {}}+/// Linux package manager guess, read from `/etc/os-release`'s `ID` and+/// `ID_LIKE` fields. Both are documented (os-release(5)) to be+/// lowercase-ish identifiers; `ID_LIKE` is a space-separated fallback list+/// for derivatives that do not want to repeat every check their upstream+/// already covers (e.g. Linux Mint carries `ID_LIKE=ubuntu debian`).+/// Dead on every non-Linux target and deliberately so: the only production+/// caller is `git_download_preflight`, which is `cfg(target_os = "linux")`.+/// Keeping this half uncfg'd is what lets the unit tests below prove the+/// distro classification on a macOS run.+#[cfg_attr(not(target_os = "linux"), allow(dead_code))]+#[derive(Debug, Clone, Copy, PartialEq, Eq)]+pub enum LinuxPackageManager {+ Apt,+ Dnf,+ Pacman,+ Zypper,+ Unknown,+}++/// Pure: `/etc/os-release` text in, package manager guess out. Never reads+/// the filesystem itself, so this is exercised directly by unit tests on+/// any host, not only Linux.+///+/// Same token-matching shape as `python.rs`'s `linux_python_install_hint`+/// (exact family tokens out of `ID`/`ID_LIKE`, not a substring search), kept+/// as its own copy here rather than shared: the two hints classify into+/// different, unrelated result sets (a package manager command here, a+/// full install line there) and the pull would cost more than the four+/// duplicated match arms save.+#[cfg_attr(not(target_os = "linux"), allow(dead_code))]+pub fn linux_package_manager_from_os_release(os_release: &str) -> LinuxPackageManager {+ let mut families: Vec<String> = Vec::new();+ for line in os_release.lines() {+ let trimmed = line.trim();+ let Some((key, value)) = trimmed.split_once('=') else {+ continue;+ };+ let key = key.trim().to_lowercase();+ if key != "id" && key != "id_like" {+ continue;+ }+ let value = value.trim().trim_matches('"').trim_matches('\'');+ for token in value.split_whitespace() {+ families.push(token.to_lowercase());+ }+ }+ let has = |needle: &str| families.iter().any(|f| f == needle);++ if has("debian") || has("ubuntu") || has("linuxmint") || has("pop") || has("elementary") {+ LinuxPackageManager::Apt+ } else if has("fedora") || has("rhel") || has("centos") || has("rocky") || has("almalinux") {+ LinuxPackageManager::Dnf+ } else if has("arch") || has("manjaro") || has("endeavouros") || has("garuda") {+ LinuxPackageManager::Pacman+ } else if has("opensuse") || has("opensuse-tumbleweed") || has("opensuse-leap") || has("suse") || has("sles") {+ LinuxPackageManager::Zypper+ } else {+ LinuxPackageManager::Unknown+ }+}++/// Pure: `/etc/os-release` text in, the English "git is missing" message+/// out, naming the one install command that actually applies on this+/// distro (or, when the distro cannot be classified, all four so the user+/// can pick).+#[cfg_attr(not(target_os = "linux"), allow(dead_code))]+pub fn linux_git_missing_message(os_release: &str) -> String {+ match linux_package_manager_from_os_release(os_release) {+ LinuxPackageManager::Apt => {+ "Git is not installed. Install it first with `sudo apt install git`, then retry."+ .to_string()+ }+ LinuxPackageManager::Dnf => {+ "Git is not installed. Install it first with `sudo dnf install git`, then retry."+ .to_string()+ }+ LinuxPackageManager::Pacman => {+ "Git is not installed. Install it first with `sudo pacman -S git`, then retry."+ .to_string()+ }+ LinuxPackageManager::Zypper => {+ "Git is not installed. Install it first with `sudo zypper install git`, then retry."+ .to_string()+ }+ LinuxPackageManager::Unknown => {+ "Git is not installed. Install it with your distro's package manager, for example \+ `sudo apt install git` (Debian/Ubuntu), `sudo dnf install git` (Fedora/RHEL), \+ `sudo pacman -S git` (Arch), or `sudo zypper install git` (openSUSE), then retry."+ .to_string()+ }+ }+}++#[cfg_attr(not(target_os = "linux"), allow(dead_code))]+fn read_os_release() -> String {+ std::fs::read_to_string("/etc/os-release").unwrap_or_default()+}++/// Pure core of [`git_download_preflight`]: whether git is present in, the+/// hint to abort with (or `None` to proceed) out. Kept separate from the OS+/// probe so the "git missing -> block before any download" behaviour is a+/// plain unit test on every host, not only Linux.+#[cfg_attr(not(target_os = "linux"), allow(dead_code))]+fn git_download_preflight_core(is_git_present: bool, os_release: &str) -> Option<String> {+ if is_git_present {+ None+ } else {+ Some(linux_git_missing_message(os_release))+ }+}++/// Cross-platform preflight for every code path that shells out to `git`+/// for a network download (ComfyUI install/update, custom-node+/// install/update, trainer source clone). Only Linux gets a new check+/// here: fresh cloud/desktop images (measured: Debian 13 and Fedora 43+/// Cloud Edition, 2026-09, see e2e/linux/BERICHT-5-APPIMAGE.md) frequently+/// do not ship `git` at all, so a bare `git clone` used to die deep inside+/// the install worker with a generic "No such file or directory" instead+/// of a message that names the exact command to run.+///+/// Windows keeps its own `windows_git_probe`/`windows_git_install_hint`+/// pair (unchanged, called separately at each site) and macOS keeps the+/// existing spawn-error fallback (unchanged); this returns `None` on both+/// so callers see no behaviour change there.+#[cfg(target_os = "linux")]+pub fn git_download_preflight() -> Option<String> {+ git_download_preflight_core(git_version_string().is_some(), &read_os_release())+}++#[cfg(not(target_os = "linux"))]+pub fn git_download_preflight() -> Option<String> {+ None+}+/// Cross-platform git availability check for the Codex view's install banner.// ASYNC + spawn_blocking: a SYNCHRONOUS Tauri command runs on the MAIN thread,// so every millisecond spent here is a frozen window. Same treatment@@ -359,4 +493,151 @@ mod tests {assert!(lower.contains("git-scm.com/download/win"), "got: {}", hint);}+ // ── Linux distro detection: os-release text in, package manager out ───++ #[test]+ fn linux_pm_debian_is_apt() {+ let os_release = "PRETTY_NAME=\"Debian GNU/Linux 13 (trixie)\"\nID=debian\nID_LIKE=\n";+ assert_eq!(+ linux_package_manager_from_os_release(os_release),+ LinuxPackageManager::Apt+ );+ }++ #[test]+ fn linux_pm_ubuntu_is_apt() {+ let os_release = "NAME=\"Ubuntu\"\nID=ubuntu\nID_LIKE=debian\n";+ assert_eq!(+ linux_package_manager_from_os_release(os_release),+ LinuxPackageManager::Apt+ );+ }++ #[test]+ fn linux_pm_debian_derivative_via_id_like_is_apt() {+ // Linux Mint style: ID is its own name, ID_LIKE carries the upstream.+ let os_release = "NAME=\"Linux Mint\"\nID=linuxmint\nID_LIKE=\"ubuntu debian\"\n";+ assert_eq!(+ linux_package_manager_from_os_release(os_release),+ LinuxPackageManager::Apt+ );+ }++ #[test]+ fn linux_pm_fedora_is_dnf() {+ let os_release = "NAME=\"Fedora Linux\"\nID=fedora\nID_LIKE=\n";+ assert_eq!(+ linux_package_manager_from_os_release(os_release),+ LinuxPackageManager::Dnf+ );+ }++ #[test]+ fn linux_pm_rhel_derivative_via_id_like_is_dnf() {+ let os_release = "NAME=\"Rocky Linux\"\nID=rocky\nID_LIKE=\"rhel centos fedora\"\n";+ assert_eq!(+ linux_package_manager_from_os_release(os_release),+ LinuxPackageManager::Dnf+ );+ }++ #[test]+ fn linux_pm_arch_is_pacman() {+ let os_release = "NAME=\"Arch Linux\"\nID=arch\nID_LIKE=\n";+ assert_eq!(+ linux_package_manager_from_os_release(os_release),+ LinuxPackageManager::Pacman+ );+ }++ #[test]+ fn linux_pm_opensuse_is_zypper() {+ let os_release = "NAME=\"openSUSE Leap\"\nID=opensuse-leap\nID_LIKE=\"suse opensuse\"\n";+ assert_eq!(+ linux_package_manager_from_os_release(os_release),+ LinuxPackageManager::Zypper+ );+ }++ #[test]+ fn linux_pm_unknown_distro_is_unknown() {+ let os_release = "NAME=\"Some New Distro\"\nID=somenewdistro\nID_LIKE=\n";+ assert_eq!(+ linux_package_manager_from_os_release(os_release),+ LinuxPackageManager::Unknown+ );+ }++ #[test]+ fn linux_pm_missing_os_release_is_unknown() {+ assert_eq!(+ linux_package_manager_from_os_release(""),+ LinuxPackageManager::Unknown+ );+ }++ // ── Linux distro detection: os-release text in, install command out ───++ #[test]+ fn linux_git_missing_message_names_apt_on_debian() {+ let os_release = "ID=debian\n";+ let msg = linux_git_missing_message(os_release);+ assert!(msg.contains("sudo apt install git"), "got: {}", msg);+ assert!(!msg.to_lowercase().contains("dnf"), "got: {}", msg);+ }++ #[test]+ fn linux_git_missing_message_names_dnf_on_fedora() {+ let os_release = "ID=fedora\n";+ let msg = linux_git_missing_message(os_release);+ assert!(msg.contains("sudo dnf install git"), "got: {}", msg);+ assert!(!msg.to_lowercase().contains("apt"), "got: {}", msg);+ }++ #[test]+ fn linux_git_missing_message_names_pacman_on_arch() {+ let os_release = "ID=arch\n";+ let msg = linux_git_missing_message(os_release);+ assert!(msg.contains("sudo pacman -S git"), "got: {}", msg);+ }++ #[test]+ fn linux_git_missing_message_names_zypper_on_opensuse() {+ let os_release = "ID=opensuse-leap\nID_LIKE=\"suse opensuse\"\n";+ let msg = linux_git_missing_message(os_release);+ assert!(msg.contains("sudo zypper install git"), "got: {}", msg);+ }++ #[test]+ fn linux_git_missing_message_names_all_four_when_unknown() {+ let os_release = "ID=somenewdistro\n";+ let msg = linux_git_missing_message(os_release);+ assert!(msg.contains("sudo apt install git"), "got: {}", msg);+ assert!(msg.contains("sudo dnf install git"), "got: {}", msg);+ assert!(msg.contains("sudo pacman -S git"), "got: {}", msg);+ assert!(msg.contains("sudo zypper install git"), "got: {}", msg);+ }++ // ── "git fehlt ergibt die Meldung und es wird nichts geladen" ─────────+ //+ // git_download_preflight_core is the pure decision point every clone+ // site calls through git_download_preflight() before spawning `git+ // clone`/`git pull`. Missing git must produce Some(hint) so the caller+ // returns before touching the network; present git must produce None+ // so the existing flow is untouched.++ #[test]+ fn preflight_blocks_with_hint_when_git_missing() {+ let hint = git_download_preflight_core(false, "ID=debian\n");+ assert_eq!(+ hint,+ Some("Git is not installed. Install it first with `sudo apt install git`, then retry.".to_string())+ );+ }++ #[test]+ fn preflight_allows_download_when_git_present() {+ let hint = git_download_preflight_core(true, "ID=debian\n");+ assert_eq!(hint, None, "git present must not block the download");+ }}diff --git a/src-tauri/src/commands/install/mod.rs b/src-tauri/src/commands/install/mod.rsindex afd78232..02e3c6e6 100644--- a/src-tauri/src/commands/install/mod.rs+++ b/src-tauri/src/commands/install/mod.rs@@ -59,7 +59,7 @@ pub(crate) mod pip;mod torch;mod venv;mod download;-mod git;+pub(crate) mod git;mod comfy_job;mod comfy_install;mod comfy_repair;diff --git a/src-tauri/src/commands/trainer.rs b/src-tauri/src/commands/trainer.rsindex afcc3be5..b018ab65 100644--- a/src-tauri/src/commands/trainer.rs+++ b/src-tauri/src/commands/trainer.rs@@ -1900,6 +1900,12 @@ fn fetch_musubi_source(Err(e) if e == "cancelled" => return Err(e),Err(e) => e,};+ // Linux setup stolpstein (BERICHT-5-APPIMAGE.md): fresh Debian 13 and+ // Fedora 43 cloud/desktop images ship no git at all, so name the exact+ // package manager command instead of a bare "could not download".+ if let Some(hint) = crate::commands::install::git::git_download_preflight() {+ return Err(format!("Could not download the trainer source: {archive_err}\n\n{hint}"));+ }let mut git = crate::process_util::foreign_system_command("git");git.arg("--version");#[cfg(target_os = "windows")]diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.jsonindex eb342fb9..55fcdcd1 100644--- a/src-tauri/tauri.conf.json+++ b/src-tauri/tauri.conf.json@@ -88,6 +88,9 @@"libayatana-appindicator3-1","libvulkan1","libgomp1"+ ],+ "recommends": [+ "git"]},"rpm": {@@ -97,6 +100,9 @@"libappindicator-gtk3","libvulkan.so.1()(64bit)","libgomp.so.1()(64bit)"+ ],+ "recommends": [+ "git"]}}