| Leopold | 7fbf104 | 2023-01-06 19:57:37 +0100 | [diff] [blame] | 1 | # sandboxroot |
| 2 | |
| 3 | We use [bazeldnf](https://github.com/rmohr/bazeldnf) in order to reproducibly generate a sysroot |
| 4 | to use for Bazel's sandbox from Fedora packages. |
| 5 | |
| 6 | bazeldnf is self-contained and requires only a Go toolchain, requiring minimal host dependencies. |
| 7 | This allows us to bootstrap without having to ship a prebuilt sysroot. |
| 8 | |
| 9 | ## How to update repository and build rules |
| 10 | |
| 11 | Add any new packages to [regenerate.sh](./regenerate.sh) and regenerate definitions: |
| 12 | |
| 13 | third_party/sandboxroot/regenerate.sh |
| 14 | |
| 15 | This will fetch the latest version of all required packages from Fedora's repos |
| 16 | and update repositories.bzl and BUILD.bazel. |
| 17 | |
| 18 | The next time a bazel command is run, the wrapper will pick up the change |
| 19 | and rebuild the sandbox root. |