Skip to content

Dangling archive paths are not supported by pkg_tar #832

@eejayes

Description

@eejayes

Common tar utilities allow inclusion of file paths with some depth to them, where the resulting archive does not include records for the parent directories and their corresponding file permissions. On the other hand, when pkg_tar is presented with a path where an explicit specification of a path's parent directories is not provided, records will automatically be created with a default set of file permissions. While fine-grained control of directory permission levels is available through pkg_mkdirs, it is not possible to instruct pkg_tar to refrain from creating file permission records for parents of a dangling path.

The common use case for a tar archive with a fragmented file structure, is one where extraction is being performed on top of a pre-existing file structure where only the paths specified in the archive should be subject to change. A work around of pkg_tars behavior with limited applicability could be to ensure that declared directory permissions for parent directories match the state of the pre-existing structure on the extraction target. Some more specialized use cases are:

  1. Parent directory records that a user doesn't want to specify correspond to paths on the extraction target that are not mounted as writable file systems. In this case an error will occur during extraction.
  2. Other expected factors on the extraction target can cause it's file system state to change that is not synchronized with the subject 'pkg_tar' specification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that we are not working on but will review quarterlyfeature-request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions