Fix electron-installer-redhat RPM spec copy path#57
Merged
pol-rivero merged 1 commit intopol-rivero:mainfrom Feb 1, 2026
Merged
Conversation
Update the patch for electron-installer-redhat to copy from the actual staging build directory Prevents cp: cannot stat 'usr/*' on rpm 4.20+ during %install
There was a problem hiding this comment.
Pull request overview
This PR fixes a build issue in the electron-installer-redhat package for RPM 4.20+ by updating the patch file to use an absolute path when copying files during RPM package installation.
Changes:
- Updates the RPM spec file patch to change the copy command from using a relative path (
usr/*) to an absolute path (%{_topdir}/BUILD/usr/*)
| %if "%{_host_cpu}" != "%{_target_cpu}" | ||
| %global __strip /bin/true | ||
| @@ -26,3 +27,3 @@ | ||
| %>%install |
There was a problem hiding this comment.
The diff prefix on this line is incorrect. It should be a space character ( %install), not a greater-than sign (>%install). In unified diff format, unchanged context lines must start with a space, while added lines start with + and removed lines start with -. The > character is not a valid diff prefix and will cause patch-package to fail when applying this patch.
Suggested change
| %>%install | |
| %install |
Owner
|
LGTM, thank you! |
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.
Update the patch for electron-installer-redhat to copy from the actual staging build directory Prevents cp: cannot stat 'usr/*' on rpm 4.20+ during %install
I’m not sure whether this fix works well in other environments, but at least in my local testing on Fedora 43 with Node 24, it works fine.
I noticed that someone else has already submitted a fix to the upstream dependency repo here: electron-userland/electron-installer-redhat#344, but it hasn’t been merged—there seems to be some reason for that.