Duplicate path entries are made possible within tar archives as
discussed in feature request #849. This includes an interaction with
create parents, where the only logical scenario which would require
inference of a parent directory is when one does not already exist.
This is because allowance of duplicates is only useful when explicit
paths are declared.
RELNOTES: Duplicate path entries supported within tar archives
Add feature as described in #832.
RELNOTES: Automatic creation of parent directory specifications for
paths with depth can be prevented in `pkg_tar` archives by setting `create_parents=False`.
* Bring tar runfiles up to feature parity with pkg_files.runfiles.
The bulk of the change is to have pkg_tar use pkg_files%add_label_list to process `srcs`. That brings it in conformance with pkg_files and pkg_zip. This changes the behavior of runfiles to be useful, but it is a breaking
change.
Fixes: #153
Fixes: #579
Other bits:
- do not fail verify_archive_test without a min_size or max_size
- change `data` file in the sample executable from BUILD to foo.cc so
that it is easier to disambiguate from other files.
- fix bug in runfiles support where files were not added to file_deps list.
- fix bug in runfiles support where the runfiles base was not computed
correctly.
- some buildifier fixes to make the linters happy.
* 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?
* Document that package_dir also uses package_variables
The pkg_zip and pkg_tar rule already support variable substitution in their
package_dir parameter, it was only documented for package_variables so far.
* Make Common Attributes linkable
* docs: add a note in pkg_tar#strip_prefix about flattening
* More gramatical description
* make the message more accurate
---------
Co-authored-by: aiuto <aiuto@google.com>
This enables the user to produce identical tarballs to fix
https://github.com/bazelbuild/rules_pkg/issues/670
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
Co-authored-by: aiuto <aiuto@google.com>
When we merge generated docs into the final form, convert
@since(text) to emphasized (currently italic) text.
This is not intended to be perfect. It is just to get the concept out
there to start playing with it. Ideally, StarDoc will eventually support
@since natively and we can delete this.
* Try to make the docs a little better.
- Fix stardoc adding <p align=center> in markdown tables.
- Add rough capability to handle macros that wrap a rule.
The wrapping technique is:
- In the wrapping macro, use the docstring @wraps(some_rule)
- Then we don't emit the docs for the wrapper
- In the docs for some_rule, replace the string "some_rule" with the
name of the wrapper macro.
It is a first attempt to make things better. It is crude, but it
mostly works.It is a first attempt to make things better. It is crude, but it mostly works. If Stardoc ever adds this capability [(feature request)[https://github.com/bazelbuild/stardoc/issues/120] we can move to that.
where the rules are defined. Without that, you just have to know.
It would be nice if stardoc had support for adding the bzl path out of the box.
https://github.com/bazelbuild/stardoc/issues/120
* Move the designated place for pkg_tar to be //pkg:tar.bzl.
This does not move pkg_tar from pkg.bzl to pkg/private/tar.bzl yet.
I am waiting on that for other PRs to pkg.bzl to be merged. This PR
moves the examples and tests to the desired style now rather than later.
* update docs snapshot because //pkg/private/tar:build_tar moved
* Add 0.6.0 doc tree
* fix <li>s in stamp docs
* fix the <li> in tables with a stardoc bug workaround.
* remove obsolete reference.md that was imbedded in the wrong place
* Improved doc generation: Produce a single reference doc.
- moves doc generation out of distro into a separate doc_build tree
- creates a single reference.md from the common attributes section
plus the individual page.
Future plans
- post transform the .html to add links between sections
- post transform the .html to add external links to Bazel docs.
- add procedures to cut doc releases alongside distribution releases