Update documentation for building instrumented libraries.
- `nih-dbus-tool` no longer exists, and is no longer needed. Remove it from the list of packages that need to be installed. - Run `apt upgrade` after `apt update`, because why not. - Document several additional build dependencies: - git so the GN invocation does not fail when trying to exec scripts that use git - gyp since several instrumented libraries (e.g. NSS) use gyp - fakeroot since several instrumented libraries use fakeroot - Make the command for mounting /dev/shm more copy-pastable. - Add basic directions for removing chroots. Bug: 1369167 Change-Id: I89fd7f8bc8e5ec8d621ccdd0a74f4ae1144065be Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5404471 Reviewed-by: Thomas Anderson <thomasanderson@chromium.org> Commit-Queue: Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/main@{#1279818}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
2b3272ca9b
commit
685d73ade2
@ -64,7 +64,8 @@ Enter the chroot and install the necessary packages:
|
||||
```shell
|
||||
schroot -c focal_amd64 -u root --directory /home/dev/chromium/src
|
||||
apt update
|
||||
apt install lsb-release sudo python pkg-config libgtk2.0-bin libdrm-dev nih-dbus-tool help2man
|
||||
apt upgrade
|
||||
apt install lsb-release sudo python pkg-config libgtk2.0-bin libdrm-dev help2man git fakeroot gyp
|
||||
```
|
||||
|
||||
Install library packages:
|
||||
@ -79,9 +80,9 @@ exit
|
||||
schroot -c focal_amd64 -u `whoami` --directory /home/dev/chromium/src
|
||||
```
|
||||
|
||||
On your host, mount `/dev/shm/`. Replace `<uuid>` with the actual path.
|
||||
On your host, mount `/dev/shm/`. Replace `*` with the actual path if you have multiple chroots.
|
||||
```shell
|
||||
sudo mount --bind /dev/shm /run/schroot/mount/focal_amd64-<uuid>/dev/shm
|
||||
sudo mount --bind /dev/shm /run/schroot/mount/focal_amd64-*/dev/shm
|
||||
```
|
||||
|
||||
Add `depot_tools` to your `PATH`. For example, I have it in `~/dev/depot_tools`,
|
||||
@ -127,3 +128,27 @@ the MSAN bot will run on the CQ:
|
||||
```
|
||||
CQ_INCLUDE_TRYBOTS=luci.chromium.try:linux_chromium_msan_rel_ng
|
||||
```
|
||||
|
||||
## Cleaning up chroots
|
||||
|
||||
This can be useful for restarting from scratch with a new chroot, e.g. to
|
||||
validate the build instructions above.
|
||||
|
||||
```shell
|
||||
sudo rm /etc/schroot/chroot.d/focal_amd64.conf
|
||||
sudo rm -rf /srv/chroot/focal_amd64
|
||||
```
|
||||
|
||||
If `rm` complains about active mount points, list the active chroot session(s):
|
||||
```shell
|
||||
schroot --list --all-sessions
|
||||
```
|
||||
Which should print something like:
|
||||
```
|
||||
session:focal_amd64-714a3c01-9dbf-4c98-81c1-90ab8c4c61fe
|
||||
```
|
||||
|
||||
Then shutdown the chroot session with:
|
||||
```shell
|
||||
schroot -e -c focal_amd64-714a3c01-9dbf-4c98-81c1-90ab8c4c61fe
|
||||
```
|
||||
|
Reference in New Issue
Block a user