-
Notifications
You must be signed in to change notification settings - Fork 543
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
[cleaner] Use data filter for extraction #3330
[cleaner] Use data filter for extraction #3330
Conversation
Sadly, Python 3.12 is not yet out sufficiently to let me test the data filter on it. Just backward compatibility tested on a few archives against a few Python versions. |
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. |
1 similar comment
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. |
Ubuntu, we have a problem. The failure behind ubuntu-22.04 is as follows:
While the file to extract is:
Which matches the original file:
But the problem is, Python 3.10.12 on Ubuntu 22.04 treats the destinations of extracted symlinks relative to the working directory - hence Any idea how to react on the Python(-on-Ubuntu) bug? (the best I figured out is to fallback to the "ignore the errors" |
Interesting issue, will need to double back, and check this out in an environment in collaboration with my team. Will get back to you on this |
So I have been playing around with this issue overnight, to understand it, and jammy (22.04), lunar(23.04) and mantic (23.10 -- development release) all fail once this is added as
Could it be that fedora's old image works, and the new one doesn't? Maybe worth updating the gce images for cirrus to latest ones, and see how we get on? So, how did I test this
Even the tarball that is in the test folder does have absolute links, and it would throw the Based on what I am reading, we need to have below are the versions of
|
Indeed, So really, until this works well in Python, we must fallback to |
Since Python 3.12, archive.extractall would require setting an extraction filter otherwise an exception is raised. See PEP 706 for more. Since Python 3.10 and 3.11 can raise false alarms as exceptions (see sosreport#3330 for examples), we must use the legacy fully_trusted filter. Relevant: sosreport#3319 Closes: sosreport#3330 Signed-off-by: Pavel Moravec <[email protected]>
4e42e5f
to
8db4861
Compare
Hi @TurboTurtle , we would like to get this to the next |
Since Python 3.12, archive.extractall would require setting an extraction filter otherwise an exception is raised. See PEP 706 for more.
Since sos extracts just tarballs that should be compliant with safe extraction (no extracted file outside the target directory etc.), we should stick to the data filter.
Relevant: #3319
Closes: #3330
Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines