Skip to content
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
9 changes: 7 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ permissions:

env:
CARGO_TERM_COLOR: always
PACKAGE_VERSION: 1.2.0
PACKAGE_VERSION: 1.2.1

jobs:
debian:
Expand Down Expand Up @@ -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
Expand Down
18 changes: 9 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
11 changes: 2 additions & 9 deletions apps/rufust/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
70 changes: 70 additions & 0 deletions apps/rufust/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> {
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;
}
Expand Down Expand Up @@ -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();
Expand Down
9 changes: 5 additions & 4 deletions apps/rufust/ui/appwindow.slint
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ export component AppWindow inherits Window {
in-out property <string> device-name: "No device selected";
in-out property <string> device-path: "—";
in-out property <string> device-capacity: "—";
in-out property <bool> device-risky: false;
// Why the selected target is unusual; empty for an ordinary flash drive.
in-out property <string> device-warning: "";

in-out property <[string]> boot-choices;
in-out property <string> boot-selection: "Disk or ISO image";
Expand Down Expand Up @@ -93,7 +94,7 @@ export component AppWindow inherits Window {
in-out property <bool> show-about: false;
in-out property <bool> show-advanced: false;
in-out property <string> capability-hint: "";
in-out property <string> app-version: "1.2.0";
in-out property <string> app-version: "1.2.1";
in property <string> privilege-note: "Destructive writes use a polkit-authorized helper. The desktop process never holds ambient root for raw disks.";

// —— Callbacks ——
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions docs/BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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\`.
9 changes: 9 additions & 0 deletions docs/CAPABILITIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions docs/PROJECT_CONTEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion packaging/arch/PKGBUILD
Original file line number Diff line number Diff line change
@@ -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')
Expand Down
6 changes: 6 additions & 0 deletions packaging/debian/changelog
Original file line number Diff line number Diff line change
@@ -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 <rufust@users.noreply.github.com> 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.
Expand Down
7 changes: 7 additions & 0 deletions packaging/metainfo/io.github.nitrodiesel.rufust.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
</replaces>
<content_rating type="oars-1.1"/>
<releases>
<release version="1.2.1" date="2026-11-13">
<description>
<p>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.</p>
</description>
</release>
<release version="1.2.0" date="2026-11-11">
<description>
<p>Rufust now also runs on Windows 10 and 11, with an installer and a
Expand Down
5 changes: 4 additions & 1 deletion packaging/rpm/rufust.spec
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion packaging/windows/rufust.iss
Original file line number Diff line number Diff line change
@@ -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=<path to rufust.ico> packaging\windows\rufust.iss
; iscc /DVersion=1.2.1 /DIconFile=<path to rufust.ico> 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
Expand Down