Skip to content

fix(desktop): stop RPM build-id links conflicting with other Electron apps - #58093

Merged
Hona merged 1 commit into
devfrom
fix/desktop-rpm-build-id-conflicts
Oct 22, 2026
Merged

Hona merged 1 commit into
devfrom
fix/desktop-rpm-build-id-conflicts

Conversation

@opencode-agent

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #36982

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

When rpmbuild packages ELF files, it adds /usr/lib/.build-id/xx/... links for each one. Our RPM ships stock Electron binaries that are byte-identical to the ones in Slack, Unity Hub, and other Electron RPMs. Both packages then claim the same build-id paths, so rpm/zypper refuse to install or update OpenCode Desktop when one of those apps is installed. The in-app updater fails because zypper exits with code 8.

This passes --rpm-rpmbuild-define=_build_id_links none to fpm for all three RPM channels, so those links are no longer generated. They are only used for debuginfo lookup, which we don't ship. The flag has to come before the src=dest mappings: fpm rejects flags that follow them, and the first build failed on exactly that. The test asserts the flag is first.

The updater UI swallowing the install error is a separate issue and is not changed here.

How did you verify your code works?

I built the dev channel RPM with and without the change, using electron-builder in a Debian container with rpm 4.18, close to the CI packaging setup. I tested both against Slack 4.52.182 and the released 2.1.2 RPM.

  • Build-id entries: released 2.1.2 has 14, baseline dev build has 14, fixed dev build has 0.
  • Fedora 43, rpm -i --test next to Slack: the released 2.1.2 and baseline builds conflict on the same 6 build-id paths reported in the issue. The fixed build installs.
  • openSUSE Tumbleweed, running the updater's exact command (zypper --non-interactive --no-refresh install --allow-unsigned-rpm -f): the baseline exits 8 with "Detected 6 file conflicts". The fixed build exits 0.
  • Upgrade path: I installed an existing build-id-carrying package, then ran the same zypper command with the fixed RPM next to Slack. It exits 0, OpenCode no longer owns any build-id files, and rpm -V slack stays clean.
  • bun test electron-builder.config.test.ts and bun run typecheck pass in packages/desktop.

Screenshots / recordings

N/A, packaging only.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Requested by: @Hona (Hona via Slack)

… apps

rpmbuild adds /usr/lib/.build-id links for every ELF file. The bundled Electron
binaries are identical across apps on the same Electron version, so the links
collide with Slack, Unity Hub and other Electron RPMs and rpm/zypper refuse to
install or update OpenCode Desktop. Disable build-id link generation for RPMs.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The change looks sound. Turning off rpmbuild's _build_id_links stops the RPM shipping /usr/lib/.build-id links. Those links are what collide with other Electron RPMs, and their only use is debuginfo lookup, which we don't ship. The flag is first in every RPM channel's fpm list and leaves deb packaging alone. I couldn't build or install an RPM here (no fpm, rpm or Docker in the sandbox), so the end-to-end check rests on your Fedora/openSUSE testing. The config test and the packages/desktop typecheck both pass.

Public API: unchanged (packaging only).

@Hona
Hona merged commit da87177 into dev Oct 22, 2026
13 checks passed
@Hona
Hona deleted the fix/desktop-rpm-build-id-conflicts branch October 22, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Desktop RPM auto-update fails silently on openSUSE due to Electron build-ID file conflicts

1 participant