Skip to content

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

@nickguletskii

Description

@nickguletskii

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2An issue that should be worked on when time is availablebug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions