-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure %rmbuild doesn't fail due to permissions in the built content
Packages may contain files without write permissions, read-only sources and whatnot. Run %_fixperms on the whole builddir before trying to remove it to ensure we don't fail doing our household duties, both on post-cleanup but also before trying to remove an old run, as eg 'rpmbuild -bi' will not run cleanup. It's worth noting that prior to b5f6c64 the build could similarly fail while running it's default %clean. If we hadn't removeed the default %clean, we'd have to do this permission fixup first redundantly for the build root and then for the rest of the %builddir. Also worth noting is that the added test doesn't actually reproduce the issue in the test-suite because it runs as root and root is not bothered by such petty issues as missing read/write permissions to remove. But at least we have a reproducer for the case once #3005 is done. Fixes: #2519
- Loading branch information
Showing
3 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Name: noperms | ||
Version: 1.0 | ||
Release: 1 | ||
License: Public Domain | ||
Summary: Test read-only files in build | ||
|
||
%description | ||
%{summary} | ||
|
||
%prep | ||
%setup -c -T | ||
|
||
%build | ||
mkdir bad | ||
touch bad/foo | ||
chmod a-w bad | ||
|
||
%install | ||
cp -avp . ${RPM_BUILD_ROOT} | ||
|
||
%files | ||
/bad |
This file contains 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