Skip to content

Fix RPM spec install copy path for rpm 4.20+#345

Closed
keyboard2005 wants to merge 1 commit intoelectron-userland:mainfrom
keyboard2005:fix/rpm-spec-builddir-copy
Closed

Fix RPM spec install copy path for rpm 4.20+#345
keyboard2005 wants to merge 1 commit intoelectron-userland:mainfrom
keyboard2005:fix/rpm-spec-builddir-copy

Conversation

@keyboard2005
Copy link

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/

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/*
Copilot AI review requested due to automatic review settings February 1, 2026 09:33
Copy link

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 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 cp command in the %install section to copy from %{_topdir}/BUILD/usr/* instead of the relative path usr/*

💡 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/
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 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.

Copilot uses AI. Check for mistakes.
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.

2 participants