robin/src-tauri/patterns/fedora-to-debian.toml
pyr0ball 19286e9860 feat(patterns): full Linux-to-Linux distro matrix + M2 LLM chat wiring
Pattern files: 12 cross-family migration pairs covering debian, fedora, arch,
opensuse — each tuned to the user's prior tooling (apt, dnf, pacman, zypper).
Includes the custom linux-to-arch file for experienced distro-hoppers and
the macos-to-arch / windows-to-debian expansions from the prior session.

Code changes:
- patterns::load() accepts source_distro_family: Option<&str> — tries
  specific debian-to-arch.toml before falling back to linux-to-arch.toml
- MigrationConfig adds source_distro_family: Option<String> with serde default
- complete_onboarding() accepts optional source_distro arg and derives family
  via distro_family() for Linux-to-Linux migrations
- llm.rs: Ollama streaming client with Vec<u8> buffer for UTF-8 safety,
  emit errors logged not silenced
- commands::chat: spawns stream task, returns immediately so frontend
  isn't blocked waiting for full LLM response
- lib.rs: registers mod llm and commands::chat in invoke_handler
2026-05-19 08:24:06 -07:00

138 lines
6.2 KiB
TOML

[meta]
source_os = "linux"
target_distro_family = "debian"
# Fedora/RHEL user moving to Debian/Ubuntu/Mint.
# Body text assumes DNF, SELinux, and systemd familiarity.
[log_paths]
steam = "~/.local/share/Steam/logs/content_log.txt"
proton = "~/.local/share/Steam/logs/proton_log.txt"
# ── apt / dpkg ────────────────────────────────────────────────────────────────
[[patterns]]
id = "apt-lock"
sources = ["journald"]
match_text = "Could not get lock /var/lib/dpkg/lock"
severity = "warn"
title = "Package manager is locked"
body = "Another apt process is running — often unattended-upgrades in the background. Wait a minute. If stuck: sudo rm /var/lib/dpkg/lock-frontend /var/lib/dpkg/lock — then: sudo dpkg --configure -a"
[[patterns]]
id = "dpkg-interrupted"
sources = ["journald"]
match_text = "dpkg was interrupted"
severity = "warn"
title = "Package install was interrupted"
body = "A previous install didn't finish cleanly. Fix: sudo dpkg --configure -a — like an interrupted dnf transaction, but requires manual recovery."
[[patterns]]
id = "apt-unmet-dependency"
sources = ["journald"]
match_text = "Unmet dependencies"
severity = "warn"
title = "Package dependency conflict"
body = "apt can't resolve a dependency. Try: sudo apt --fix-broken install — this is more automatic than dnf's conflict resolution."
# ── AppArmor (replaces SELinux) ───────────────────────────────────────────────
[[patterns]]
id = "apparmor-denial"
sources = ["journald"]
match_text = "apparmor=\"DENIED\""
severity = "info"
title = "AppArmor access denied"
body = "Debian/Ubuntu ships AppArmor instead of SELinux. The concepts are similar but the tooling differs. Check: sudo aa-status — for audit logs: sudo aa-logprof — profiles are in /etc/apparmor.d/"
# ── System ────────────────────────────────────────────────────────────────────
[[patterns]]
id = "kernel-driver-firmware"
sources = ["kmsg"]
match_text = "firmware: failed to load"
severity = "warn"
title = "Firmware file missing"
body = "sudo apt install firmware-linux firmware-linux-nonfree — unlike Fedora where firmware comes via linux-firmware, Debian splits it into free/nonfree packages. Enable non-free in /etc/apt/sources.list first."
[[patterns]]
id = "oom-killer"
sources = ["kmsg"]
match_text = "Out of memory: Kill process"
severity = "warn"
title = "OOM killer fired"
body = "A process was killed for RAM. Ubuntu enables zswap by default; Debian doesn't always. Add a swapfile or enable zswap via /sys/module/zswap/parameters/enabled"
[[patterns]]
id = "disk-io-error"
sources = ["kmsg"]
match_text = "Buffer I/O error on device"
severity = "warn"
title = "Disk I/O error"
body = "Check SMART: sudo smartctl -a /dev/sdX — install: sudo apt install smartmontools"
# ── Audio ─────────────────────────────────────────────────────────────────────
[[patterns]]
id = "pipewire-connect-fail"
sources = ["journald"]
match_text = "Failed to connect to PipeWire"
severity = "warn"
title = "PipeWire not responding"
body = "Ubuntu 22.04+ and Debian 12+ ship PipeWire. Restart: systemctl --user restart pipewire pipewire-pulse wireplumber"
[[patterns]]
id = "pulseaudio-connect-fail"
sources = ["journald"]
match_text = "Failed to connect to pulseaudio"
severity = "warn"
title = "PulseAudio not responding"
body = "Older Debian/Ubuntu systems use PulseAudio instead of PipeWire. Restart: pulseaudio --kill && pulseaudio --start"
[[patterns]]
id = "bluetooth-rfkill-blocked"
sources = ["journald"]
match_text = "Blocked through rfkill"
severity = "warn"
title = "Bluetooth rfkill blocked"
body = "rfkill unblock bluetooth — same as Fedora."
# ── GPU / display ─────────────────────────────────────────────────────────────
[[patterns]]
id = "gpu-hang"
sources = ["kmsg"]
match_text = "GPU HANG"
severity = "warn"
title = "GPU hang"
body = "GPU stopped responding. For NVIDIA on Debian/Ubuntu: sudo apt install nvidia-driver — or use ubuntu-drivers autoinstall on Ubuntu. Similar to Fedora's RPM Fusion approach."
# ── Network ───────────────────────────────────────────────────────────────────
[[patterns]]
id = "networkmanager-activation-fail"
sources = ["journald"]
match_text = "Activation failed"
severity = "info"
title = "NetworkManager: connection failed"
body = "nmcli device status — Debian may use ifupdown instead of NetworkManager on minimal installs. Check: systemctl status NetworkManager"
# ── Media ─────────────────────────────────────────────────────────────────────
[[patterns]]
id = "missing-codec"
sources = ["journald"]
match_text = "GStreamer: Failed to find plugin"
severity = "info"
title = "Missing media codec"
body = "On Ubuntu/Mint: sudo apt install ubuntu-restricted-extras — on Debian: enable non-free and install libavcodec-extra. Fedora's RPM Fusion serves the same purpose."
# ── Gaming ────────────────────────────────────────────────────────────────────
[[patterns]]
id = "proton-runtime-missing"
sources = ["applog:proton"]
match_text = "wine: cannot find"
severity = "warn"
title = "Proton runtime issue"
body = "Right-click game in Steam -> Properties -> Local Files -> Verify integrity."