Skip to content

Fix electron-installer-redhat RPM spec copy path#57

Merged
pol-rivero merged 1 commit intopol-rivero:mainfrom
keyboard2005:fix/patch-electron-installer-redhat-spec
Feb 1, 2026
Merged

Fix electron-installer-redhat RPM spec copy path#57
pol-rivero merged 1 commit intopol-rivero:mainfrom
keyboard2005:fix/patch-electron-installer-redhat-spec

Conversation

@keyboard2005
Copy link
Copy Markdown

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.

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
@pol-rivero pol-rivero marked this pull request as ready for review February 1, 2026 20:46
@pol-rivero pol-rivero requested a review from Copilot February 1, 2026 20:46
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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
Copy link

Copilot AI Feb 1, 2026

Choose a reason for hiding this comment

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

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

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

False positive

@pol-rivero
Copy link
Copy Markdown
Owner

LGTM, thank you!

@pol-rivero pol-rivero merged commit 13d8b46 into pol-rivero:main Feb 1, 2026
19 checks passed
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