-
Notifications
You must be signed in to change notification settings - Fork 18
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
Unsupported entry type: hardlink #101
Comments
Yup, Tar doesn't support hard links. We possibly could, but it's a bit of a significant feature. |
I decided to work around it: https://github.com/JuliaCI/PkgEval.jl/blob/0cd947e632f5986cab203b1e596de1e5d804117a/rootfs/debian.sh#L27-L36. I thought it might have been an oversight since there's some traces of it in the code base, e.g.: Lines 93 to 94 in ddca329
|
I'm digging into how hard links work in tarballs, which is not entirely obvious. If it's possible to support extracting them without too much trouble, I could add the feature, but I have to figure out how they work first. |
So it turns out that this isn't that hard to implement but it's very tricky to make sure that extracting the tarball does't do anything dangerous with some combination of symlinks and hard links. |
This adds support for hard links, including: - extracting them by copying the linked file (no hard link created) - tree hashing them as they are extracted - rewriting by duplicating the linked file This only supports hard links whose target is a plain file that has already been seen in the tarball that is being processed. You cannot have a hard link that appears before the file that is linked. If the target of a hard link is overwritten later, the link copies the current version of the file at the time of extraction. Tree hashing and rewrite are both consistent with this behavior. It is not supported to extract hard links where the link involves symlinks, even if the link refers to a path that would be a file — the target must be a plain file. Close #101.
This adds support for hard links, including: - extracting them by copying the linked file (no hard link created) - tree hashing them as they are extracted - rewriting by duplicating the linked file This only supports hard links whose target is a plain file that has already been seen in the tarball that is being processed. You cannot have a hard link that appears before the file that is linked. If the target of a hard link is overwritten later, the link copies the current version of the file at the time of extraction. Tree hashing and rewrite are both consistent with this behavior. It is not supported to extract hard links where the link involves symlinks, even if the link refers to a path that would be a file — the target must be a plain file. Close #101.
This adds support for hardlinks, including: - extracting them by copying the linked file (no hardlink created) - tree hashing them as they are extracted - rewriting by duplicating the linked file This only supports hardlinks whose target is a plain file that has already been seen in the tarball that is being processed. You cannot have a hardlink that appears before the file that is linked. If the target of a hardlink is overwritten later, the link copies the current version of the file at the time of extraction. Tree hashing and rewrite are both consistent with this behavior. It is not supported to extract hardlinks where the link involves symlinks, even if the link refers to a path that would be a file — the target must be a plain file. Close #101.
This adds support for hardlinks, including: - extracting them by copying the linked file (no hardlink created) - tree hashing them as they are extracted - rewriting by duplicating the linked file This only supports hardlinks whose target is a plain file that has already been seen in the tarball that is being processed. You cannot have a hardlink that appears before the file that is linked. If the target of a hardlink is overwritten later, the link copies the current version of the file at the time of extraction. Tree hashing and rewrite are both consistent with this behavior. It is not supported to extract hardlinks where the link involves symlinks, even if the link refers to a path that would be a file — the target must be a plain file. Close #101.
This adds support for hardlinks, including: - extracting them by copying the linked file (no hardlink created) - tree hashing them as they are extracted - rewriting by duplicating the linked file This only supports hardlinks whose target is a plain file that has already been seen in the tarball that is being processed. You cannot have a hardlink that appears before the file that is linked. If the target of a hardlink is overwritten later, the link copies the current version of the file at the time of extraction. Tree hashing and rewrite are both consistent with this behavior. It is not supported to extract hardlinks where the link involves symlinks, even if the link refers to a path that would be a file — the target must be a plain file. Close #101.
This adds support for hardlinks, including: - extracting them by copying the linked file (no hardlink created) - tree hashing them as they are extracted - rewriting by duplicating the linked file This only supports hardlinks whose target is a plain file that has already been seen in the tarball that is being processed. You cannot have a hardlink that appears before the file that is linked. If the target of a hardlink is overwritten later, the link copies the current version of the file at the time of extraction. Tree hashing and rewrite are both consistent with this behavior. It is not supported to extract hardlinks where the link involves symlinks, even if the link refers to a path that would be a file — the target must be a plain file. Close #101.
This adds support for hardlinks, including: - extracting them by copying the linked file (no hardlink created) - tree hashing them as they are extracted - rewriting by duplicating the linked file This only supports hardlinks whose target is a plain file that has already been seen in the tarball that is being processed. You cannot have a hardlink that appears before the file that is linked. If the target of a hardlink is overwritten later, the link copies the current version of the file at the time of extraction. Tree hashing and rewrite are both consistent with this behavior. It is not supported to extract hardlinks where the link involves symlinks, even if the link refers to a path that would be a file — the target must be a plain file. Close #101.
This adds support for hardlinks, including: - extracting them by copying the linked file (no hardlink created) - tree hashing them as they are extracted - rewriting by duplicating the linked file This only supports hardlinks whose target is a plain file that has already been seen in the tarball that is being processed. You cannot have a hardlink that appears before the file that is linked. If the target of a hardlink is overwritten later, the link copies the current version of the file at the time of extraction. Tree hashing and rewrite are both consistent with this behavior. It is not supported to extract hardlinks where the link involves symlinks, even if the link refers to a path that would be a file — the target must be a plain file. Close #101.
This adds support for hardlinks, including: - extracting them by copying the linked file (no hardlink created) - tree hashing them as they are extracted - rewriting by duplicating the linked file This only supports hardlinks whose target is a plain file that has already been seen in the tarball that is being processed. You cannot have a hardlink that appears before the file that is linked. If the target of a hardlink is overwritten later, the link copies the current version of the file at the time of extraction. Tree hashing and rewrite are both consistent with this behavior. It is not supported to extract hardlinks where the link involves symlinks, even if the link refers to a path that would be a file — the target must be a plain file. Close #101.
I was trying to use a rootfs tarball as an artifact, but it seems to contain a hardlink which results in Tar.jl unable to process it.
The text was updated successfully, but these errors were encountered: