bazelbuild / bazelbuild/rules_pkg
Determine how `pkg_install` interacts with privilege escalation (e.g. via sudo)
- Dominant language
- Starlark
- Stars
- 253
- Forks
- 221
- Avg merge
- 10h 33m
- Merged PRs (30d)
- 1
Description
See below:
---
Maybe, but my expectation from using something like this is that `DESTDIR` is that if you don't pass it in, it's assumed you're installing to the system root somewhere. Most of the time you're protected from shooting yourself in the foot by not being able to write to system directories in the first place. That seems to be adequate protection for right now.
One thing that didn't occur to me earlier is that the pattern for installing to the filesystem is:
```
./configure
make
sudo make install
```
I'm not sure how well this will jive with bazel's per user output/install roots Intuitively, it might be possible to try acquire root privileges as a part of running the installation script. I'd like to defer this, and will make a ticket tracking it.
_Originally posted by @nacl in https://github.com/bazelbuild/rules_pkg/pull/380#discussion_r672235039_
Contributor guide
Assessment
This issue has not been assessed yet.