Skip to content

pkg_tar: Combining tar files where directories shadow symlinks results in duplicate tar file members with the same name #948

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

Closed
nickguletskii opened this issue Apr 6, 2025 · 0 comments · Fixed by #949
Labels
bug P2 An issue that should be worked on when time is available

Comments

@nickguletskii
Copy link
Contributor

I'm using pkg_tar to combine tars produced with rules_distroless and some other tars into an OCI image layer. However, upon loading the layer using Docker or Podman, I get the following error:

Error processing tar file(duplicates of file paths not supported).

After analyzing the resulting tar archive, I have determined that the issue was caused by the presence of a symbolic link from /lib to /usr/lib in one of the packages and a /lib directory in one of the other packages. It seems that pkg_tar incorrectly deduplicates tar file entries when one of the the member's type is a directory and the other member's type is not (e.g. it is a symlink).

The behavour I would expect in this case is that if the symlink precedes the directory, then the member should remain a symlink. If the directory precedes the symlink, the directory should remain a directory and a warning should be displayed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug P2 An issue that should be worked on when time is available
Projects
None yet
2 participants