diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 949b95e..f5d4c43 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ permissions: env: CARGO_TERM_COLOR: always - PACKAGE_VERSION: 1.2.0 + PACKAGE_VERSION: 1.2.1 jobs: debian: @@ -414,7 +414,12 @@ jobs: capability set. It is an independent port and is not produced, endorsed, or supported by the upstream Rufus project. - New in 1.2.0: Rufust runs on Windows 10 and 11 (x64), with an + New in 1.2.1: an ordinary USB flash drive is no longer flagged as + unusual. The device warning appears only for unusual targets, such + as an internal disk, an external hard disk or SSD, or a read-only + drive, and names the reason. + + Since 1.2.0: Rufust runs on Windows 10 and 11 (x64), with an installer and a portable download. The window stays unprivileged; each operation runs in an elevated worker after one UAC approval. On Windows, ext2/3/4 and ReFS creation are not offered. The Windows diff --git a/Cargo.lock b/Cargo.lock index 33c9816..f89365d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3319,7 +3319,7 @@ checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" [[package]] name = "rufust" -version = "1.2.0" +version = "1.2.1" dependencies = [ "ashpd", "embed-resource", @@ -3338,7 +3338,7 @@ dependencies = [ [[package]] name = "rufust-boot" -version = "1.2.0" +version = "1.2.1" dependencies = [ "rufust-core", "thiserror 2.0.19", @@ -3346,14 +3346,14 @@ dependencies = [ [[package]] name = "rufust-core" -version = "1.2.0" +version = "1.2.1" dependencies = [ "serde", ] [[package]] name = "rufust-downloads" -version = "1.2.0" +version = "1.2.1" dependencies = [ "serde", "serde_json", @@ -3363,7 +3363,7 @@ dependencies = [ [[package]] name = "rufust-helper" -version = "1.2.0" +version = "1.2.1" dependencies = [ "bzip2", "flate2", @@ -3383,7 +3383,7 @@ dependencies = [ [[package]] name = "rufust-helper-protocol" -version = "1.2.0" +version = "1.2.1" dependencies = [ "rufust-core", "serde", @@ -3393,11 +3393,11 @@ dependencies = [ [[package]] name = "rufust-i18n" -version = "1.2.0" +version = "1.2.1" [[package]] name = "rufust-image" -version = "1.2.0" +version = "1.2.1" dependencies = [ "libc", "md-5", @@ -3409,7 +3409,7 @@ dependencies = [ [[package]] name = "rufust-platform" -version = "1.2.0" +version = "1.2.1" dependencies = [ "rufust-core", "windows-sys 0.59.0", diff --git a/Cargo.toml b/Cargo.toml index f79ba92..4fe204f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ default-members = [ resolver = "2" [workspace.package] -version = "1.2.0" +version = "1.2.1" edition = "2021" rust-version = "1.85" license = "GPL-3.0-or-later" diff --git a/apps/rufust/src/main.rs b/apps/rufust/src/main.rs index d143bc5..dd1cdb1 100644 --- a/apps/rufust/src/main.rs +++ b/apps/rufust/src/main.rs @@ -926,19 +926,12 @@ fn apply_state_to_ui(ui: &AppWindow, state: &AppState) { ui.set_device_name(dev.display_name.clone().into()); ui.set_device_path(dev.node.display().to_string().into()); ui.set_device_capacity(rufust_image::format_size(dev.fingerprint.size_bytes).into()); - ui.set_device_risky( - !dev.risks.is_empty() - || matches!( - dev.class, - rufust_core::device::DeviceClass::Internal - | rufust_core::device::DeviceClass::ExternalFixed - ), - ); + ui.set_device_warning(state::device_warning(dev).unwrap_or_default().into()); } else { ui.set_device_name("No device selected".into()); ui.set_device_path("—".into()); ui.set_device_capacity("—".into()); - ui.set_device_risky(false); + ui.set_device_warning("".into()); } ui.set_boot_selection(state.boot_selection.label().into()); diff --git a/apps/rufust/src/state.rs b/apps/rufust/src/state.rs index f85599f..40c6c71 100644 --- a/apps/rufust/src/state.rs +++ b/apps/rufust/src/state.rs @@ -1100,6 +1100,39 @@ fn stage_label(stage: ProgressStage) -> &'static str { } } +/// The warning shown under the device picker, naming why the selected target +/// is unusual, or `None` for an ordinary flash drive or card. Mounted volumes +/// are ordinary: the engine unmounts or dismounts them before writing. +pub fn device_warning(device: &BlockDevice) -> Option { + use rufust_core::device::DeviceRisk; + + let name = &device.display_name; + let has = |risk| device.risks.contains(&risk); + let reason = if has(DeviceRisk::ContainsRoot) { + "holds the running system. Rufust will not write to it." + } else if has(DeviceRisk::ContainsBoot) { + "holds this computer's boot partition. Rufust will not write to it." + } else if has(DeviceRisk::ContainsSwap) { + "holds active swap or a page file. Rufust will not write to it." + } else if has(DeviceRisk::ActiveRaidMember) + || has(DeviceRisk::ActiveVolumeMember) + || has(DeviceRisk::HasDependents) + { + "is part of a RAID, LVM, or multi-disk volume. Rufust will not write to it." + } else if has(DeviceRisk::ReadOnly) { + "is read-only. Rufust cannot write to it." + } else if has(DeviceRisk::IdentityUnstable) { + "did not report a usable size or identity. Rufust will not write to it." + } else if has(DeviceRisk::Internal) || device.class == DeviceClass::Internal { + "is an internal disk. Check that it is the drive you mean to erase." + } else if device.class == DeviceClass::ExternalFixed { + "is an external hard disk or SSD, not a flash drive. Check that it is the drive you mean to erase." + } else { + return None; + }; + Some(format!("{name} {reason}")) +} + pub trait DeviceListLabel { fn list_label(&self) -> String; } @@ -1151,6 +1184,43 @@ mod tests { } } + #[test] + fn a_mounted_flash_drive_is_not_flagged() { + let mut stick = sample_device(); + assert_eq!(device_warning(&stick), None); + stick.risks = vec![DeviceRisk::MountedChildren]; + assert_eq!(device_warning(&stick), None); + } + + #[test] + fn unusual_targets_name_their_reason() { + let mut ssd = sample_device(); + ssd.class = DeviceClass::ExternalFixed; + ssd.risks = vec![DeviceRisk::MountedChildren]; + let warning = device_warning(&ssd).expect("external disk warning"); + assert!(warning.starts_with("Test Stick is an external hard disk or SSD")); + + let mut internal = sample_device(); + internal.class = DeviceClass::Internal; + internal.risks = vec![DeviceRisk::Internal]; + assert!(device_warning(&internal) + .expect("internal warning") + .contains("internal disk")); + + let mut system = sample_device(); + system.class = DeviceClass::Internal; + system.risks = vec![DeviceRisk::Internal, DeviceRisk::ContainsRoot]; + assert!(device_warning(&system) + .expect("system warning") + .contains("running system")); + + let mut locked = sample_device(); + locked.risks = vec![DeviceRisk::ReadOnly]; + assert!(device_warning(&locked) + .expect("read-only warning") + .contains("read-only")); + } + #[test] fn format_only_plan_without_image() { let mut st = AppState::new(); diff --git a/apps/rufust/ui/appwindow.slint b/apps/rufust/ui/appwindow.slint index 5e9ef03..79a5e64 100644 --- a/apps/rufust/ui/appwindow.slint +++ b/apps/rufust/ui/appwindow.slint @@ -30,7 +30,8 @@ export component AppWindow inherits Window { in-out property device-name: "No device selected"; in-out property device-path: "—"; in-out property device-capacity: "—"; - in-out property device-risky: false; + // Why the selected target is unusual; empty for an ordinary flash drive. + in-out property device-warning: ""; in-out property <[string]> boot-choices; in-out property boot-selection: "Disk or ISO image"; @@ -93,7 +94,7 @@ export component AppWindow inherits Window { in-out property show-about: false; in-out property show-advanced: false; in-out property capability-hint: ""; - in-out property app-version: "1.2.0"; + in-out property app-version: "1.2.1"; in property privilege-note: "Destructive writes use a polkit-authorized helper. The desktop process never holds ambient root for raw disks."; // —— Callbacks —— @@ -174,8 +175,8 @@ export component AppWindow inherits Window { } } } - if root.device-risky: Callout { - message: root.device-name + " is not ordinary removable media. Check the target before writing."; + if root.device-warning != "": Callout { + message: root.device-warning; tone: "warning"; } VerticalLayout { diff --git a/docs/BUILDING.md b/docs/BUILDING.md index 35baa9e..e4ee4a0 100644 --- a/docs/BUILDING.md +++ b/docs/BUILDING.md @@ -131,7 +131,7 @@ workflow, then stage and verify it with: ```sh packaging/appimage/stage-appdir.sh target/release/rufust Rufust.AppDir appimagetool --runtime-file runtime-x86_64 Rufust.AppDir rufust.AppImage -packaging/appimage/verify-appimage.sh rufust.AppImage 1.2.0 2.28 +packaging/appimage/verify-appimage.sh rufust.AppImage 1.2.1 2.28 ``` The release workflow supplies SHA-verified appimagetool and type-2 runtime @@ -172,7 +172,7 @@ again. To build the installer yourself after the release build: ```powershell $icon = (Get-ChildItem target\release\build\rufust-*\out\rufust.ico)[0].FullName -& "${env:ProgramFiles(x86)}\Inno Setup 6\ISCC.exe" /DVersion=1.2.0 "/DIconFile=$icon" packaging\windows\rufust.iss +& "${env:ProgramFiles(x86)}\Inno Setup 6\ISCC.exe" /DVersion=1.2.1 "/DIconFile=$icon" packaging\windows\rufust.iss ``` The installer lands in `dist\`. diff --git a/docs/CAPABILITIES.md b/docs/CAPABILITIES.md index 4d2fdab..ee2fdff 100644 --- a/docs/CAPABILITIES.md +++ b/docs/CAPABILITIES.md @@ -70,6 +70,15 @@ Blocked only on Windows: ext2/3/4 creation (no Windows formatter) and ReFS creation (only Pro for Workstations, Enterprise, and Server editions allow it, through VDS). +## Changes in 1.2.1 + +The warning under the device picker appears only for unusual targets and +names the reason: an internal disk, an external hard disk or SSD, or a drive +Rufust refuses (system, boot, swap or page file, RAID/LVM/multi-disk member, +read-only, or no usable identity). Mounted volumes no longer trigger it, so an +ordinary USB flash drive with a drive letter or desktop automount shows no +warning; the engine still unmounts or dismounts them before writing. + ## Changes in 1.2.0 Rufust now runs on Windows 10 and 11 (x64), alongside the Linux build, with diff --git a/docs/PROJECT_CONTEXT.md b/docs/PROJECT_CONTEXT.md index f9f1e65..a3d991c 100644 --- a/docs/PROJECT_CONTEXT.md +++ b/docs/PROJECT_CONTEXT.md @@ -18,11 +18,12 @@ Debian/Ubuntu, Fedora, and Windows 10/11 (x64). Feature parity means implementing an upstream concept safely on each platform; it does not mean exposing a control before its full operation is implemented and verified. -## Current baseline: 1.2.0 +## Current baseline: 1.2.1 -Version 1.2.0 is the continuation baseline. Its public installers belong in the -[v1.2.0 release](https://github.com/NitroDiesel/rufust/releases/tag/v1.2.0). -1.2.0 is the first release with Windows support (below). The project was +Version 1.2.1 is the continuation baseline. Its public installers belong in the +[v1.2.1 release](https://github.com/NitroDiesel/rufust/releases/tag/v1.2.1). +1.2.0 is the first release with Windows support (below); 1.2.1 limits the +device warning to unusual targets and names the reason. The project was named Rufus Linux (`rufus-linux`) up to 1.0.1; 1.1.0 renamed it to Rufust everywhere. Its packages replace `rufus-linux`, and the desktop app still reads preferences from `~/.config/rufus-linux` until it saves its own. diff --git a/packaging/arch/PKGBUILD b/packaging/arch/PKGBUILD index d97241b..5aee7bd 100644 --- a/packaging/arch/PKGBUILD +++ b/packaging/arch/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Rufust contributors pkgname=rufust -pkgver=1.2.0 +pkgver=1.2.1 pkgrel=1 pkgdesc="Format and create bootable USB drives (Linux port inspired by Rufus)" arch=('x86_64' 'aarch64') diff --git a/packaging/debian/changelog b/packaging/debian/changelog index d90af2d..0afa493 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,3 +1,9 @@ +rufust (1.2.1-1) unstable; urgency=medium + + * Warn only about unusual targets; a mounted flash drive is no longer flagged. + + -- Rufust contributors Fri, 13 Nov 2026 00:00:00 +0800 + rufust (1.2.0-1) unstable; urgency=medium * Add Windows 10 and 11 support with an installer and a portable build. diff --git a/packaging/metainfo/io.github.nitrodiesel.rufust.metainfo.xml b/packaging/metainfo/io.github.nitrodiesel.rufust.metainfo.xml index 1237230..fa0e447 100644 --- a/packaging/metainfo/io.github.nitrodiesel.rufust.metainfo.xml +++ b/packaging/metainfo/io.github.nitrodiesel.rufust.metainfo.xml @@ -26,6 +26,13 @@ + + +

An ordinary USB flash drive is no longer flagged as unusual. The + device warning now names the actual reason, such as an external hard + disk or a read-only drive.

+
+

Rufust now also runs on Windows 10 and 11, with an installer and a diff --git a/packaging/rpm/rufust.spec b/packaging/rpm/rufust.spec index 9a8787a..bd2ea98 100644 --- a/packaging/rpm/rufust.spec +++ b/packaging/rpm/rufust.spec @@ -1,5 +1,5 @@ Name: rufust -Version: 1.2.0 +Version: 1.2.1 Release: 1%{?dist} Summary: Format and create bootable USB drives License: GPL-3.0-or-later @@ -57,6 +57,9 @@ done %{_datadir}/icons/hicolor/*/apps/io.github.nitrodiesel.rufust.png %changelog +* Fri Nov 13 2026 Rufust contributors - 1.2.1-1 +- Warn only about unusual targets; a mounted flash drive is no longer flagged + * Wed Nov 11 2026 Rufust contributors - 1.2.0-1 - Add Windows 10 and 11 support with an installer and a portable build diff --git a/packaging/windows/rufust.iss b/packaging/windows/rufust.iss index 2ee8615..df08dd4 100644 --- a/packaging/windows/rufust.iss +++ b/packaging/windows/rufust.iss @@ -1,7 +1,7 @@ ; Inno Setup script for the Rufust Windows installer. ; ; Build from the repository root after `cargo build -p rufust --release`: -; iscc /DVersion=1.2.0 /DIconFile= packaging\windows\rufust.iss +; iscc /DVersion=1.2.1 /DIconFile= packaging\windows\rufust.iss ; ; The installer writes to Program Files, so only administrators can replace ; the executable that the elevated disk worker runs. The app itself keeps its