Skip to content

fix(linux): declare ALSA and GBM runtime dependencies in deb/rpm packages - #34036

Merged
nwparker merged 1 commit into
mainfrom
bugbash/linear-STA-12022
Oct 26, 2026
Merged

nwparker merged 1 commit into
mainfrom
bugbash/linear-STA-12022

Conversation

@nwparker

@nwparker nwparker commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 0 0 0 0
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​6 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​4

ELI5

On Linux, Orca's .deb and .rpm packages tell the package manager which system libraries to install alongside them. Two libraries the app needs to start (sound and GPU buffer support) were missing from that list. On a minimal system the package installed fine, but Orca would not launch. This PR adds them to the list.

What Changed

Before: On minimal Ubuntu/Debian/Fedora/openSUSE installs, apt/dnf/zypper installed Orca without pulling in ALSA (libasound.so.2) or, on Debian/Ubuntu, GBM (libgbm.so.1). Launching /opt/Orca/orca-ide then failed immediately with error while loading shared libraries: libasound.so.2 (or libgbm.so.1).

After: The packages declare these dependencies, so the package manager installs them and Orca launches.

Mechanism (config/electron-builder.config.cjs): Orca replaces electron-builder's default Linux depends lists with its own copies, and electron-builder's defaults leave out ALSA and GBM even though the Electron binary links against both.

  • deb: add libasound2t64 | libasound2 (the t64 name is used on Ubuntu 24.04+ and Debian 13; the alternative covers older releases) and libgbm1.
  • rpm: add alsa-lib. GBM already comes in through gtk3 on Fedora and openSUSE, and openSUSE resolves alsa-lib to libasound2 through capabilities.

Why

The dynamic loader fails before any app code runs, so nothing inside Orca can catch or report this. The fix has to happen at the package level. Declaring the libraries the binary actually links is the standard approach, and it's what other Electron apps do. Using a deb alternative (a | b) means one package works on releases from before and after the 64-bit time_t transition, so we don't need separate builds per distro.

Linked Issue

Linear STA-12022: on minimal Linux installs, the deb/rpm package installed without errors, but Orca then crashed at startup because the system had no ALSA (and on some distros no GBM) shared library, and the package never asked for it.

Visual Proof

N/A. This changes package metadata only, with no UI change. The evidence is a before/after container probe, summarized under Testing.

Testing

  • Rebuilt the 1.4.241 arm64 .deb control file using the Depends lists from main and from this branch, then installed each with apt-get install (with and without recommends) in clean containers. Ran ldd on orca-ide and the bundled .so files, then ran orca-ide --version:

    • Ubuntu 20.04 / 22.04 / 24.04 and Debian 12 / 13. main: libasound.so.2 and/or libgbm.so.1 not found, and the launch fails. branch: no missing libraries, and the launch prints 1.4.241. On 24.04 and 13 libasound2t64 was selected; on older releases it was libasound2.
  • RPM, Fedora 44 and openSUSE Tumbleweed. main: libasound.so.2 not found, and the launch fails. branch (alsa-lib installed): no missing libraries, and the launch prints 1.4.241.

  • Checked that the resolved electron-builder config emits the new deb.depends / rpm.depends entries.

  • config/scripts/electron-builder-config.test.mjs and electron-builder-runtime-resources.test.mjs pass. Under heavy local load, the runtime-resources tests sometimes hit their 5s timeout; they pass on rerun.

  • oxlint (default, anti-slop, code-quality native plugins), ast-grep, oxfmt, and the changed-code quality gate are all clean on the touched file.

  • No impact on macOS, Windows, SSH/remote, or mobile: only the Linux deb/rpm package metadata changes.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below. No new test: this is a static dependency list, and a test that asserts the list contents would just repeat it.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 83a41d26-cf93-49d5-a9af-b422b6010ce2
Commits

Reviewing files that changed from the base of the PR and between bc48268 and 199968d.

Files selected for processing: 1
  • config/electron-builder.config.cjs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

Walkthrough

The Debian runtime dependency list adds libasound2t64 | libasound2 and libgbm1. The RPM runtime dependency list adds alsa-lib.

Priority: Normal

Merge Risk: Minimal · up to 19996

The Linux package metadata change adds the intended runtime libraries without identified merge-blocking risk.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: adding ALSA and GBM runtime dependencies to Linux Debian and RPM packages.
Description check Passed The description is detailed and mostly complete. It explains the user impact, implementation, rationale, linked issue identifier, testing, visual-proof exception, and platform impact. The full lint, t…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description is detailed and mostly complete. It explains the user impact, implementation, rationale, linked issue identifier, testing, visual-proof exception, and platform impact. The full lint, typecheck, test, and build checklist remains unchecked, and the issue is identified as Linear STA-12022 rather than provided as a direct link.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@nwparker
nwparker merged commit c979079 into main Oct 26, 2026
38 checks passed
@nwparker
nwparker deleted the bugbash/linear-STA-12022 branch October 26, 2026 18:47
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.

1 participant