You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Get a better story around the build server running as root #326
Currently the build server needs to be run as root because it creates an overlay filesystem to mount in the bubblewrap sandbox. Some people are understandably unnerved by running a network daemon as root, so it would be good if we had a better story here. It may not be technically possible to do what we need to do without root, but we could at least have the daemon fork on startup and then have one process drop privileges and run the bulk of the code unprivileged (all the networking etc) with a little bit of IPC to the privileged process to do the things that need privileges.
Any output directories required by the compilation. These obviously need to be writable.
It seems like it might be feasible to just figure out the full set of directories needed and explicitly pass them all to bwrap? You'd probably wind up read-only mounting a bunch of top-level directories from the toolchain package, you could write out all the input files somewhere like the code currently does and then mount those directories (you might need to do some work to figure out common path prefixes there) and mount any output directories if they're different.
Activity
jrmuizel commentedon Nov 6, 2018
Is it necessary to use overlayfs?
jrmuizel commentedon Nov 13, 2018
@aidanhs
jrmuizel commentedon Oct 22, 2019
@chmanchester is it necessary to use overlayfs?
chmanchester commentedon Oct 22, 2019
@jrmuizel A builder that uses docker instead was also implemented but is known to be a lot slower and has seen less testing (I haven't tried it).
jrmuizel commentedon Oct 22, 2019
@chmanchester sorry, what I meant was what is being overlayed? i.e. what is overlayfs being used? Is there a something that's shared between jobs?
luser commentedon Oct 23, 2019
The build server mounts a few things in the overlay filesystem:
sccache/src/bin/sccache-dist/build.rs
Lines 173 to 289 in d309339
It seems like it might be feasible to just figure out the full set of directories needed and explicitly pass them all to
bwrap? You'd probably wind up read-only mounting a bunch of top-level directories from the toolchain package, you could write out all the input files somewhere like the code currently does and then mount those directories (you might need to do some work to figure out common path prefixes there) and mount any output directories if they're different.yuanfang-chen commentedon Aug 31, 2023
Hello @luser, thanks a lot for the suggested approach. I'm very interested in this. Was there any change in the status?
feat(transport): Add AsRef impl for Certificate (mozilla#326)
dist: use bubblewrap for overlayFS mounts, run `sccache-dist` without…
dist: use bubblewrap for overlayFS mounts, run `sccache-dist` without…
dist: use bubblewrap for overlayFS mounts, run `sccache-dist` without…
dist: use bubblewrap for overlayFS mounts, run `sccache-dist` without…
dist: use bubblewrap for overlayFS mounts, run `sccache-dist` without…
dist: use bubblewrap for overlayFS mounts, run `sccache-dist` without…
dist: use bubblewrap for overlayFS mounts, run `sccache-dist` without…