-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Determine tree artifact semantics #440
Comments
If the TreeArtifacts are sufficiently complex, they will contain many directories with permissions that need to be set, and determining these reliably is difficult during build-time. It may be better to augment |
The collision handling problem has a solution proposed in #476 (comment). |
I'm going to start tracking tasks here; will update as more tickets are created: Collision handling
Agreed. Prioritize higher. This is seen by external users. Permissions management
This seems to be the intuitive default, but allowing for overrides for individual subset(s) of files is likely a good thing. However, nobody has specifically asked for this, so deferring until it has increased importance. It may also require some cleverness in the package builder scripts.
Directories inside tree artifacts should already be adjustable with For the named directory itself, there is currently no possible override: using Empty directory management
Intuition says keep or control with a flag, but it may not be possible to do this right now. See bazelbuild/bazel#14094 for more details. |
I think the most sustainable method is to make raw tree artifacts (that is, if encountered in build_*.py)
If users need more, they should wrap tree artifact target in a pkg_files with |
I've put together a test-case for handling of tree artifacts: https://github.com/nickbreen/rules_pkg_bug. My naive expectation would be that whatever the directory and file permissions are in the TreeArtifact's contents are preserved. This is codified in the above test case: the rule that generates a tree artifact also generates a file that lists the permissions of the directories and files in the tree artifact. In particular it's worth noting that at this point It appears that |
Interesting points.
Right. That is WAI, but the use case for changing attributes in a tree artifact is a real one.
Thanks.
umask being honored may be true, but it is not sufficient. In general in Bazel, once you add remote cross platform build and caching, you can't trust the file permissions created by the execution host. We need to have rule capability to make what you want explicit.
That sounds like a few things:
But the real thing missing is a compossible way to modify a set of files. That is, you should be able to have a rule which takes a tree artifact as input, then lets you filter out files, rebase things, reset owners and modes by regex, .... And that should take any other valid sources (filegroups, pkg_files) in addition to tree artifacts. |
I mention
|
While implementing tree artifact support for pkg_zip, I've encountered a few cases that the rules_pkg community prolly needs to sort out so that handling is consistent among the various pkg_foo rules.
A few open questions from pkg_zip to seed discussion:
The text was updated successfully, but these errors were encountered: