Skip to content

Problems with pkg_tar file permissions #2925

@mwoehlke-kitware

Description

@mwoehlke-kitware

Description of the problem / feature request / question:

pkg_tar is unable to preserve the mode of files being packaged and makes everything executable by default. The following should be fixed:

  • The default mode should be None, not "0555". Making everything executable by default is just wrong. (Implies not passing --mode to build_tar.py in such case.)
  • When no --mode is passed to build_tar.py, the actual permissions of the original file (at least on platforms that support POSIX permissions) should be used. (Currently, there is a simple check that forces the mode to either 0644 or 0755.)
  • Ability to specify symbolic modes (e.g. 'u+w'), as supported by tar, would be nice.
  • Ability to preserve/set XATTRs and/or ACLs would be nice too.

Environment info

  • Operating System: Fedora 25
  • Bazel version (output of bazel info release): 0.4.5- (@Non-Git) compiled from bazel-0.4.5-dist.zip (sha256 2b737be42678)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3We're not considering working on this, but happy to review a PR. (No assignee)type: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions