-
Notifications
You must be signed in to change notification settings - Fork 26
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
TarArchive decompress fails when tar has broken relative symlinks #484
Comments
Hey @davellas - this sounds like a reasonable request. We'll take a look and see what the best course of action is. I see three options:
We'll do some exploring and get back to you. Out of curiosity, are you actually using |
Hi @robdimsdale, thank you for answering so quickly! To answer your question, yes, I encountered this error when I was trying to make a custom buildpack. I was using openvscode-server (https://github.com/gitpod-io/openvscode-server) and have packit download and manage the dependency for me, it worked really well. |
Oh cool, is your buildpack open-source? Do you have a link to it? It's always interesting to see what kinds of buildpacks the community is creating and what problems they solve! |
Unfortunately it is not open source, I don't exclude it to become open source in the future but it is out of my control right now. However it doesn't do much more than installing the above code-server and a bunch of extensions |
No worries! |
I downloaded a tarball release of code server e.g. this one, extracted it with
(from this Stack Overflow post) Which I then validated were broken by looking for the
And we see that the symlinks are invalid because there is no I haven't tried to reproduce this with Packit yet, but assuming that this causes Packit to break, I think that the best course of action is to warn on broken symlinks (maybe via the debug logger) but not fail. I don't think we need to introduce configuration for this, given that |
When using the TarArchive decompress function, if the input Tar file has broken symlinks inside, the decompression fails with error
failed to evaluate symlink
However sometimes these broken symlinks don't really have negative impacts.
One example of such tar archives are the releases of code-server https://github.com/coder/code-server/releases
Manually untarring these files work, but they are not possible to be untarred with packit.
Expected Behavior
It is possible to use the TarArchive packit functionality to untar files containing broken symlinks
Current Behavior
Untarring files with broken symlinks always result in error
Possible Solution
It would be good enough to have an option/flag to specify in order to ignore broken symlinks instead of just throwing an error.
Steps to Reproduce
The text was updated successfully, but these errors were encountered: