When pkg_tar.prefix_dir == base of symlink path, don't double-dip. (#749)

* Correct for case where tar has prefix_dir and files/symlinks, but the
user has already mapped the prefix_dir into those paths. Under the old
behavior, prefix_dir was (incorrectly) not added to symlinks, so some
users made the desired prefix part of the link.  Protecting them
against the double inclusion of the prefix is probably the least
surprising behavior.

Add tests for this, which required improving verify_archive_test.

* make buildifier happy

* do not run the symlink test on windows

* huh? why are symlinks in a tree failing on CI?
7 files changed
tree: 7b10c02d1030e5a2400dbf3212ed3d88c256dd53
  1. .bazelci/
  2. .bcr/
  3. .github/
  4. deb_packages/
  5. distro/
  6. doc_build/
  7. docs/
  8. examples/
  9. pkg/
  10. tests/
  11. toolchains/
  12. .bazelignore
  13. .gitignore
  14. AUTHORS
  15. BUILD
  16. CHANGELOG.md
  17. CODEOWNERS
  18. CONTRIBUTING.md
  19. CONTRIBUTORS
  20. deps.bzl
  21. developers.md
  22. LICENSE
  23. MODULE.bazel
  24. patching.md
  25. README.md
  26. version.bzl
  27. WORKSPACE
  28. WORKSPACE.bzlmod
README.md

Bazel package building

Bazel rules for building tar, zip, deb, and rpm for packages.

For the latest version, see Releases (with WORKSPACE setup) / Documentation

Use rules-pkg-discuss@googlegroups.com for discussion.

CI: Build status

Basic rules

Package building rules

  • pkg - Rules for building packages of various types.
  • examples - Cookbook examples for using the rules.

As of Bazel 4.x, Bazel uses this rule set for packaging its distribution. Bazel still contains a limited version of pkg_tar but its feature set is frozen. Any new capabilities will be added here.

For developers

We hold an engineering status meeting on the first Monday of every month at 10am USA East coast time. Add to calendar / meeting notes