Skip to content

fix(linux): restore the ToDesktop platform-level resource fallback - #1504

Open
benceruleanlu wants to merge 1 commit into
bl/arm64-host-independent-testsfrom
bl/arm64-todesktop-linux-fallback
Open

benceruleanlu wants to merge 1 commit into
bl/arm64-host-independent-testsfrom
bl/arm64-todesktop-linux-fallback

Conversation

@benceruleanlu

@benceruleanlu benceruleanlu commented Sep 8, 2026

Copy link
Copy Markdown
Member

Part of a stack of review fixes for #1486. Based on #1503.

Summary

#1486 replaced platformOverrides.linux with per-architecture targetOverrides, leaving Linux with no platform-level fallback while Windows keeps both. A ToDesktop target list replaces the platform list rather than merging with it, and ToDesktop decides server-side which architectures a platform builds, so any Linux target outside the x64 and arm64 keys now falls through to the top-level list: ./lib alone.

Such a package ships without resources/apparmor-profile. scripts/after-install.sh then fails its apparmor_parser probe, prints the misleading "this version of AppArmor does not support the bundled profile" message and skips installation, leaving the Electron sandbox blocked on Ubuntu 24.04 and later, with nothing failing at build time.

Feature behavior

Restores platformOverrides.linux, carrying the same three resources as the x64 target and sourcing bootstrap-python from the same staged directory. This mirrors the shape Windows already has. The per-target overrides are unchanged, so the architecture split #1486 introduced still applies wherever ToDesktop honours it.

Test coverage and validation

  • A new test requires every platform with per-target overrides to have a platform-level fallback covering the same destinations. It fails with "platformOverrides.linux is missing" when the block is deleted, verified by deleting it.
  • The rule covers Windows as well, which had no such coverage.
  • Full unit suite: 274 files, 4736 passed, 2 skipped. Typecheck, lint and format pass.
  • No remote ToDesktop build was submitted.

Change breakdown

Total changed lines: 51 (45 added, 6 deleted).

Product code

  • 0 files; +0 / -0; 0 changed lines; 0%.

Test code

  • 1 files; +35 / -6; 41 changed lines; 80.4% of total.
  • src/main/sources/standalone/arm64Packaging.test.ts

Documentation

  • 0 files; +0 / -0; 0 changed lines; 0%.

Configuration and CI

  • 1 files; +10 / -0; 10 changed lines; 19.6% of total.
  • todesktop.json

Generated files

  • 0 files; +0 / -0; 0 changed lines; 0%.

Lockfiles

  • 0 files; +0 / -0; 0 changed lines; 0%.

Vendored code

  • 0 files; +0 / -0; 0 changed lines; 0%.

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 42 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

This review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 16feec21-8c83-4c92-a4fd-502a0ec25a52

📥 Commits

Reviewing files that changed from the base of the PR and between 718c06d and 47b4b43.

📒 Files selected for processing (2)
  • src/main/sources/standalone/arm64Packaging.test.ts
  • todesktop.json

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

A target list replaces the platform list rather than merging with it, and
ToDesktop decides server-side which architectures a platform builds. With
platformOverrides.linux gone, any Linux target outside the x64/arm64 keys
falls through to the top-level list — ./lib alone — so the package ships
without apparmor-profile and after-install.sh silently skips the AppArmor
profile, leaving the sandbox blocked on Ubuntu 24.04+.

Restore the fallback, mirroring the Windows shape, and add a test that
holds it for every platform carrying per-target overrides.
@benceruleanlu
benceruleanlu force-pushed the bl/arm64-todesktop-linux-fallback branch from b1cfbcc to 47b4b43 Compare September 9, 2026 01:33
@benceruleanlu
benceruleanlu removed this pull request from stack #1510 September 9, 2026 01:34
@benceruleanlu
benceruleanlu added this pull request to stack #1513 September 9, 2026 01:34

This branch has not been deployed

No deployments
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.

3 participants