Skip to content

Add QEMU as a Windows Fleet-maintained app - #50471

Merged
allenhouchins merged 1 commit into
mainfrom
50126-new-fma-qemu
Aug 4, 2026
Merged

Add QEMU as a Windows Fleet-maintained app#50471
allenhouchins merged 1 commit into
mainfrom
50126-new-fma-qemu

Conversation

@allenhouchins

@allenhouchins allenhouchins commented Aug 3, 2026

Copy link
Copy Markdown
Member

Related issue: Resolves #50126

Adds QEMU (SoftwareFreedomConservancy.QEMU) as a Windows Fleet-maintained app, requested by a customer in #50126. Windows-only: on macOS, Homebrew ships QEMU as a formula (CLI tools, no .app bundle), so it isn't a viable macOS FMA.

App identity (verified against the real installer)

  • Downloaded qemu-w64-setup-20260501.exe from qemu.weilnetz.de; SHA256 matches the winget manifest.
  • QEMU's NSIS definition (qemu.nsi) writes the uninstall key HKLM\...\Uninstall\QEMU (64-bit view via SetRegView 64) with DisplayName "QEMU" and DisplayVersion set to the meson project version — which equals the winget PackageVersion, so the patch policy reconciles cleanly.
  • No Publisher value is written to the registry, so the default generated exists query (... AND publisher = 'QEMU Community') would never match. The input overrides it with exists_query: SELECT 1 FROM programs WHERE name = 'QEMU'; — exact name match, so entries like "QEMU guest agent" (virtio-win) are left alone.

Install/uninstall scripts

  • NSIS installer, machine scope, x64. Install: standard silent /S (same pattern as AnyBurn).
  • Uninstall: registry lookup by exact DisplayName across both registry views, defensive UninstallString parsing, /S _?=<installdir> so the uninstaller runs in place (instead of relaunching from %TEMP% and returning immediately), verification that the ARP entry is actually gone, then sweep of the leftover uninstaller/install dir, HKLM\SOFTWARE\QEMU, and shortcuts.

Version caveat

winget's newest version dir for this package is 11.0.50 — a QEMU development snapshot (QEMU uses x.y.50 for post-release dev builds; only x64, no arm64), added upstream alongside the 11.0.0 stable release. The ingester picks the highest version, so this FMA currently ships the snapshot build; it will move to the next stable (e.g. 11.0.1/11.1.0) as soon as winget has it. The installer URL is date-pinned (.../2026/qemu-w64-setup-20260501.exe), so there's no hash-drift risk. If we'd rather not offer dev snapshots, that needs an ingester-level version filter — flagging for maintainer input rather than building it into this PR.

Icon

Official 128×128 QEMU icon from the upstream source tree (ui/icons/qemu_128x128.png), generated via tools/software/icons/generate-icons.sh.

Checklist for submitter

If some of the following don't apply, delete the relevant line.

  • Input data is properly validated, SELECT * is avoided, SQL injection is prevented (using placeholders for values in statements), JS inline code is prevented especially for url redirects, and untrusted data interpolated into shell scripts/commands is validated against shell metacharacters.
  • Timeouts are implemented and retries are limited to avoid infinite loops

Testing

  • Verified installer SHA256, registry identity (DisplayName/DisplayVersion/no Publisher), and silent switches against the real installer and upstream qemu.nsi/meson.build
  • test-fma-windows-pr-only validates QEMU install/uninstall in this PR's CI

Summary by CodeRabbit

  • New Features
    • Added QEMU to the Windows software catalog.
    • Added support for silent QEMU installation and reliable uninstallation.
    • Added QEMU version detection and upgrade validation.
    • Added a QEMU icon to the software interface.

Adds SoftwareFreedomConservancy.QEMU (NSIS installer, machine scope,
x64). Registry identity verified against the real installer and
qemu.nsi: DisplayName "QEMU", DisplayVersion = package version, no
Publisher value written — so the exists query matches on name only.

Resolves #50126
Copilot AI review requested due to automatic review settings August 3, 2026 21:08
@allenhouchins
allenhouchins requested a review from a team as a code owner August 3, 2026 21:08
@allenhouchins allenhouchins linked an issue Aug 3, 2026 that may be closed by this pull request
@fleet-release
fleet-release requested a review from eashaw August 3, 2026 21:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds QEMU as a Windows Fleet-maintained app, including the app metadata/outputs, install & uninstall PowerShell scripts, and a corresponding Software page icon mapping.

Changes:

  • Added WinGet input config and PowerShell install/uninstall scripts for QEMU.
  • Added generated maintained-app outputs (per-version installer metadata + app listing entry).
  • Added a QEMU icon component and mapped the qemu software name key to that icon in the Software page icon registry.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
frontend/pages/SoftwarePage/components/icons/Qemu.tsx Adds a QEMU icon component (base64 PNG embedded in SVG).
frontend/pages/SoftwarePage/components/icons/index.ts Registers the new QEMU icon import and maps qemuQemu.
ee/maintained-apps/outputs/qemu/windows.json Adds generated Windows maintained-app output for QEMU (version, queries, installer URL, script refs).
ee/maintained-apps/outputs/apps.json Adds QEMU to the generated maintained-app catalog list.
ee/maintained-apps/inputs/winget/scripts/qemu_uninstall.ps1 Adds QEMU Windows uninstall script (NSIS-aware, registry lookup + cleanup).
ee/maintained-apps/inputs/winget/scripts/qemu_install.ps1 Adds QEMU Windows install script (silent /S NSIS install).
ee/maintained-apps/inputs/winget/qemu.json Adds WinGet ingester input config for QEMU (package id, queries, scripts, arch/type/scope).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

if ($installDir) { $installDir = $installDir.TrimEnd('\') }

# Running emulators keep files locked, which would leave the uninstall partial.
Stop-Process -Name "qemu*" -Force -ErrorAction SilentlyContinue
@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 68.13%. Comparing base (3ea4304) to head (92b76f8).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...ntend/pages/SoftwarePage/components/icons/Qemu.tsx 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #50471      +/-   ##
==========================================
- Coverage   68.13%   68.13%   -0.01%     
==========================================
  Files        3947     3948       +1     
  Lines      251501   251503       +2     
  Branches    13465    13307     -158     
==========================================
- Hits       171353   171350       -3     
- Misses      64829    64835       +6     
+ Partials    15319    15318       -1     
Flag Coverage Δ
frontend 61.35% <50.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d22cf710-fe09-42f2-97be-8ff65cf83ada

📥 Commits

Reviewing files that changed from the base of the PR and between 74c2b79 and 92b76f8.

⛔ Files ignored due to path filters (1)
  • website/assets/images/app-icon-qemu-60x60@2x.png is excluded by !**/*.png
📒 Files selected for processing (7)
  • ee/maintained-apps/inputs/winget/qemu.json
  • ee/maintained-apps/inputs/winget/scripts/qemu_install.ps1
  • ee/maintained-apps/inputs/winget/scripts/qemu_uninstall.ps1
  • ee/maintained-apps/outputs/apps.json
  • ee/maintained-apps/outputs/qemu/windows.json
  • frontend/pages/SoftwarePage/components/icons/Qemu.tsx
  • frontend/pages/SoftwarePage/components/icons/index.ts

Walkthrough

This pull request adds QEMU as a maintained Windows application. It defines Winget metadata, version and installer settings, detection rules, and lifecycle scripts. The installation script runs the NSIS installer silently. The uninstallation script stops QEMU processes, runs the uninstaller, removes residual registry entries, shortcuts, and files, and verifies removal. The generated catalog includes QEMU metadata. The SoftwarePage includes a QEMU icon and icon mapping.

Possibly related PRs

  • fleetdm/fleet#50450: Adds another maintained Windows app with Winget metadata, lifecycle scripts, catalog entries, and SoftwarePage icon integration.
  • fleetdm/fleet#50016: Adds a maintained Windows app and updates shared catalog and icon registry files.
  • fleetdm/fleet#49478: Adds a maintained Windows app with Winget metadata, PowerShell scripts, generated catalog data, and a SoftwarePage icon.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the primary change: adding QEMU as a Windows Fleet-maintained app.
Description check ✅ Passed The description explains the implementation, validation, testing, scope, linked issue, and version caveat; the remaining unchecked CI test is clearly identified.
Linked Issues check ✅ Passed The changes satisfy issue #50126 by adding QEMU as a Windows Fleet-maintained app using the specified Winget package.
Out of Scope Changes check ✅ Passed All reviewed changes support the QEMU Windows Fleet-maintained app objective, including packaging, scripts, catalog entries, and icon support.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 50126-new-fma-qemu

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@allenhouchins
allenhouchins merged commit 2431d58 into main Aug 4, 2026
34 of 36 checks passed
@allenhouchins
allenhouchins deleted the 50126-new-fma-qemu branch August 4, 2026 02:36
@allenhouchins allenhouchins mentioned this pull request Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New FMA: QEMU

3 participants