bazelbuild / bazelbuild/rules_pkg

Determine how `pkg_install` interacts with privilege escalation (e.g. via sudo)

Open
#395 0 comments 0 reactions 0 assignees View on GitHub
P3 pkg_install
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.