Fix RPM spec install copy path for rpm 4.20+#345
Closed
keyboard2005 wants to merge 1 commit intoelectron-userland:mainfrom
Closed
Fix RPM spec install copy path for rpm 4.20+#345keyboard2005 wants to merge 1 commit intoelectron-userland:mainfrom
keyboard2005 wants to merge 1 commit intoelectron-userland:mainfrom
Conversation
Fix %install in spec template to copy from the actual staging build directory
Prevents cp: cannot stat 'usr/*' on rpm 4.20+ by using %{_topdir}/BUILD/usr/*
There was a problem hiding this comment.
Pull request overview
This PR fixes an installation path issue in the RPM spec template that occurs with rpm 4.20 and later versions. The change updates the source path in the %install section to use an explicit path with the %{_topdir} macro, preventing a "cannot stat 'usr/*'" error.
Changes:
- Updated the
cpcommand in the%installsection to copy from%{_topdir}/BUILD/usr/*instead of the relative pathusr/*
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| %>%install | ||
| mkdir -p %{buildroot}/usr/ | ||
| cp <%= process.platform === 'darwin' ? '-R' : '-r' %> usr/* %{buildroot}/usr/ | ||
| cp <%= process.platform === 'darwin' ? '-R' : '-r' %> %{_topdir}/BUILD/usr/* %{buildroot}/usr/ |
There was a problem hiding this comment.
The corresponding test fixture file test/fixtures/custom.spec.ejs at line 23 still uses the old path pattern usr/* instead of %{_topdir}/BUILD/usr/*. For consistency and to ensure tests validate the correct behavior with rpm 4.20+, this should be updated to match the fix in the main spec template.
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.
Fix %install in spec template to copy from the actual staging build directory Prevents cp: cannot stat 'usr/' on rpm 4.20+ by using %{_topdir}/BUILD/usr/