Closed maleadt closed 3 years ago
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.: https://github.com/JuliaIO/Tar.jl/blob/ddca32996e7f1c8cf5a249056c2c0d83af395074/src/header.jl#L93-L94
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.
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.