Skip to content

chore(desktop): pin AppImage static runtime toolset - #23019

Open
addisonbeck wants to merge 1 commit into
mainfrom
pm-42189-appimage-static-runtime
Open

chore(desktop): pin AppImage static runtime toolset#23019
addisonbeck wants to merge 1 commit into
mainfrom
pm-42189-appimage-static-runtime

Conversation

@addisonbeck

@addisonbeck addisonbeck commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🎟️ Tracking

📔 Objective

The Linux AppImage has a runtime dependency on libfuse2 because electron-builder 26.x defaults to the legacy FUSE 2 AppImage runtime. Many distros no longer install libfuse2 by default, causing the AppImage to fail at launch for affected users unless they manually install libfuse2.

This opts into the static type-2 AppImage runtime, which is statically linked against musl libc and requires no libfuse2 on the host. The toolsets.appimage field was introduced in electron-builder v26.8.0 (PR #9558).

When we update to electron-builder v27, the static runtime may become the default, at which point this toolsets block can be removed.

The Linux AppImage has a runtime dependency on libfuse2 because
electron-builder 26.x defaults to the legacy FUSE 2 AppImage
runtime. Modern distros (Ubuntu 24.10+, Fedora 40+) ship without
libfuse2, breaking the AppImage for affected users.

electron-builder v26.8.0 introduced a `toolsets.appimage` opt-in
that switches to a statically-linked runtime requiring no libfuse2
on the host. Pin to 1.0.2, the version advertised at launch.
electron-builder v27 will make the static runtime the default at
which point this pin can be removed.

CODEOWNERS: apps/desktop/electron-builder.json was previously
uncovered. Adjacent Platform-owned desktop files (scripts,
resources) already point to @bitwarden/team-platform-dev, so this
rule closes the gap consistently.

Refs: PM-42189
@addisonbeck addisonbeck added t:tech-debt Change Type - Tech debt needs-qa Marks a PR as requiring QA approval labels Sep 4, 2026
@addisonbeck
addisonbeck requested a review from coroiu September 4, 2026 21:29
@addisonbeck
addisonbeck marked this pull request as ready for review September 4, 2026 21:30
@addisonbeck
addisonbeck requested a review from a team as a code owner September 4, 2026 21:30
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

This is a two-line build configuration change: it opts the Linux AppImage into electron-builder's static type-2 runtime via toolsets.appimage, and adds a CODEOWNERS rule for apps/desktop/electron-builder.json. The toolsets field requires electron-builder >= 26.8.0, and the repo pins 26.9.0 in package.json (app-builder-lib@26.9.0 in package-lock.json), so the field is supported. The new CODEOWNERS entry is not shadowed by any later rule in the file, so @bitwarden/team-platform-dev resolves as intended. No runtime application code, encryption, or vault data paths are touched.

Code Review Details
  • ❓ : AppImage CI validation installs libfuse2, so a green build does not confirm the libfuse2 dependency is actually gone
    • apps/desktop/electron-builder.json:27

Comment on lines +27 to +29
"toolsets": {
"appimage": "1.0.2"
},

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.

QUESTION: AppImage CI validation installs libfuse2, so a green build won't confirm this fix works.

Details

Both jobs that actually launch the produced AppImage install libfuse2 before running it:

  • .github/workflows/build-desktop.yml:2286 (validate-linux-x64-appimage)
  • .github/workflows/build-desktop.yml:2329 (validate-linux-wayland)

Since the host already has libfuse2, the AppImage launches whether or not the static runtime was picked up. That means CI passes identically before and after this change, and it would keep passing if the toolsets block were ever dropped, renamed, or silently ignored by a future electron-builder version.

Was dropping libfuse2 from those two apt-get install lines considered? That would turn validate-linux-x64-appimage into a real regression guard for PM-42189 rather than a launch smoke test.

@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.57%. Comparing base (10c94ad) to head (b5282b2).
⚠️ Report is 122 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #23019      +/-   ##
==========================================
+ Coverage   54.84%   55.57%   +0.73%     
==========================================
  Files        4340     4412      +72     
  Lines      138275   140969    +2694     
  Branches    21903    22392     +489     
==========================================
+ Hits        75834    78350    +2516     
+ Misses      56933    56918      -15     
- Partials     5508     5701     +193     

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-qa Marks a PR as requiring QA approval t:tech-debt Change Type - Tech debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AppImage: Remove libfuse2 dependency

1 participant