-
Notifications
You must be signed in to change notification settings - Fork 544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[clean] Respect permissions of sanitised files #3292
[clean] Respect permissions of sanitised files #3292
Conversation
When copying files we applied a substitution in, we must replace just original file content (shutil.copyfile) and not also its stat data (shutil.copy). Resolves: sosreport#3292 Signed-off-by: Pavel Moravec <[email protected]>
Congratulations! One of the builds has completed. 🍾 You can install the built RPMs by following these steps:
Please note that the RPMs should be used only in a testing environment. |
Forgot a trivial reproducer:
See the missing |
Should we add a test to ensure the permissions match on a given file (like |
I was thinking about it, but thought "would that test be usefull / why we would cause here a regression?" - but if also you have raised the concern about adding a test, I will add one (once I find proper |
Add a test that cleaner keeps permissions of a sanitised file Relevant to: sosreport#3292 Signed-off-by: Pavel Moravec <[email protected]>
I added a test case, but it does pass even without the codechange; whenever Please decide about the test case in either way, I am off for a few weeks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test looks right, but the behavior from avocado is odd. I'm of the mind to accept this now, and investigate the test suite separately as manual inspection shows this working as intended.
When copying files we applied a substitution in, we must replace just original file content (shutil.copyfile) and not also its stat data (shutil.copy). Resolves: #3292 Signed-off-by: Pavel Moravec <[email protected]>
When copying files we applied a substitution in, we must replace just original file content (
shutil.copyfile
) and not also its stat data (shutil.copy
).Resolves: #3292
Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines