Repository navigation
fix(desktop): stop RPM build-id links conflicting with other Electron apps - #58093
Merged
Merged
Conversation
… 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
Bot
requested review from
Brendonovich and
Hona
as code owners
October 22, 2026 10:50
Contributor
Author
There was a problem hiding this comment.
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #36982
Type of change
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 noneto 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 thesrc=destmappings: 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
devchannel RPM with and without the change, using electron-builder in a Debian container withrpm4.18, close to the CI packaging setup. I tested both against Slack 4.52.182 and the released 2.1.2 RPM.rpm -i --testnext 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.zypper --non-interactive --no-refresh install --allow-unsigned-rpm -f): the baseline exits 8 with "Detected 6 file conflicts". The fixed build exits 0.rpm -V slackstays clean.bun test electron-builder.config.test.tsandbun run typecheckpass inpackages/desktop.Screenshots / recordings
N/A, packaging only.
Checklist
Requested by: @Hona (Hona via Slack)