Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Side by Side Diff: docs/linux_sysroot.md

Issue 2579833004: Update linux-sysroot.md (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Linux sysroot images 1 # Linux sysroot images
2 2
3 The chromium build system for Linux will (by default) use a sysroot image 3 The chromium build system for Linux will (by default) use a sysroot image
4 rather than building against the libraries installed on the host system. 4 rather than building against the libraries installed on the host system.
5 This serves several purposes. Firstly, it ensures that binaries will run on all 5 This serves several purposes. Firstly, it ensures that binaries will run on all
6 supported linux systems independent of the packages installed on the build 6 supported linux systems independent of the packages installed on the build
7 machine. Secondly, it makes the build more hermetic, preventing issues that 7 machine. Secondly, it makes the build more hermetic, preventing issues that
8 arise for variations among developers' systems. 8 arise for variations among developers' systems.
9 9
10 The sysroot consists of a minimal installation of Debian/stable (or old-stable) 10 The sysroot consists of a minimal installation of Debian/stable (or old-stable)
11 to ensure maximum compatibility. Pre-built sysroot images are stored in 11 to ensure maximum compatibility. Pre-built sysroot images are stored in
12 Google Cloud Storage and downloaded during `gclient runhooks` 12 Google Cloud Storage and downloaded during `gclient runhooks`
13 13
14 ## Installing the sysroot images 14 ## Installing the sysroot images
15 15
16 Installation of the sysroot is performed by 16 Installation of the sysroot is performed by
17 `build/linux/sysroot_scripts/install-sysroot.py`. 17 `build/linux/sysroot_scripts/install-sysroot.py`.
18 18
19 This script can be run manually but is normally run as part of gclient 19 This script can be run manually but is normally run as part of gclient
20 hooks. When run from hooks this script in a no-op on non-linux platforms. 20 hooks. When run from hooks this script in a no-op on non-linux platforms.
21 21
22 ## Rebuilding the sysroot image 22 ## Rebuilding the sysroot image
23 23
24 The pre-built sysroot images occasionally needs to be rebuilt. For example, 24 The pre-built sysroot images occasionally needs to be rebuilt. For example,
25 when security updates to Debian are released, or when a new package is needed by 25 when security updates to Debian are released, or when a new package is needed by
26 the chromium build. 26 the chromium build. If you just want to update the sysroots without adding any
27 new packages, skip to `Using build_and_upload.py`.
28
29 ### Adding new packages
30
31 To add a new package, edit the `sysroot-creator-*.sh` scripts and modify the
32 `DEBIAN_PACKAGES` list, then run the update step (`UpdatePackageListsAll`). The
33 steps below will use `sysroot-creator-jessie.sh` as an example.
34
35 ### Updating existing package list
36
37 To update packages to the latest versions run:
38
39 $ ./sysroot-creator-jessie.sh UpdatePackageListsAll
40
41 This command will update the package lists that are stored alongside the script.
42 If no packages have changed then this script will have no effect.
27 43
28 ### Rebuilding 44 ### Rebuilding
29 45
30 To rebuild the images (without any changes) run the following commands: 46 To rebuild the images (without any changes) run the following commands:
31 47
32 $ cd build/linux/sysroot_scripts 48 $ cd build/linux/sysroot_scripts
33 $ ./sysroot-creator-wheezy.sh BuildSysrootAll 49 $ ./sysroot-creator-jessie.sh BuildSysrootAll
34 50
35 The above command will rebuild the sysroot for all architectures. To build 51 The above command will rebuild the sysroot for all architectures. To build
36 just one architecture use `BuildSysroot<arch>`. Run the script with no 52 just one architecture use `BuildSysroot<arch>`. Run the script with no
37 arguments for a list of possible architectures. For example: 53 arguments for a list of possible architectures. For example:
38 54
39 $ ./sysroot-creator-wheezy.sh BuildSysrootAmd64 55 $ ./sysroot-creator-jessie.sh BuildSysrootAmd64
40 56
41 This command on its own should be a no-op and produce an image identical to 57 This command on its own should be a no-op and produce an image identical to
42 the one on Google Cloud Storage. 58 the one on Google Cloud Storage.
43 59
44 ### Updating existing package list
45
46 To update packages to the latest versions run:
47
48 $ ./sysroot-creator-wheezy.sh UpdatePackageListsAll
49
50 This command will update the package lists that are stored alongside the script.
51 If no packages have changed then this script will have no effect.
52
53 ### Adding new packages
54
55 To add a new package, edit the `sysroot-creator-wheezy.sh` script and modify
56 the `DEBIAN_PACKAGES` list, then run the update step above
57 (`UpdatePackageListsAll`).
58
59 ### Uploading new images 60 ### Uploading new images
60 61
61 To upload images to Google Cloud Storage run the following command: 62 To upload images to Google Cloud Storage run the following command:
62 63
63 $ ./sysroot-creator-wheezy.sh UploadSysrootAll <SHA1> 64 $ ./sysroot-creator-jessie.sh UploadSysrootAll <SHA1>
64 65
65 Here you should use the SHA1 of the git revision at which the images were 66 Here you should use the SHA1 of the git revision at which the images were
66 created. 67 created.
67 68
68 Uploading new images to Google Clound Storage requires write permission on the 69 Uploading new images to Google Clound Storage requires write permission on the
69 `chrome-linux-sysroot` bucket. 70 `chrome-linux-sysroot` bucket.
70 71
71 ### Rolling the sysroot version used by chromium 72 ### Rolling the sysroot version used by chromium
72 73
73 Once new images have been uploaded the `install-sysroot.py` script needs to be 74 Once new images have been uploaded, the `sysroots.json` file needs to be updated
74 updated to reference the new versions. This process is manual and involves 75 to reference the new versions. This process is manual and involves updating the
75 updating the `REVISION` and `SHA1SUM` variables in the script. 76 `Revision` and `Sha1Sum` values in the file.
77
78 ### Using `build-and-upload.py`
79
80 The `build_and_upload.py` script automates the above four steps. It is
81 recommended to use this just before you're ready to submit your CL, after you've
82 already tested one of the updated sysroots on your local configuration. Build
83 or upload failures will not produce detailed output, but will list the script
84 and arguments that caused the failure. To debug this, you must run the failing
85 command manually. This script requires Google Cloud Storage write permission on
86 the `chrome-linux-sysroot` bucket.
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698