Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upUse Salt for mach bootstrap #14974
Use Salt for mach bootstrap #14974
Conversation
highfive
commented
Jan 12, 2017
|
Heads up! This PR modifies the following files:
|
1626266
to
0e0f9d7
|
This should work on Ubuntu Trusty now. @wafflespeanut @frewsxcv Python question: So far it seems necessary to use |
`mach` can't do any bootstrapping for Android, so the flag is useless.
84429a2
to
6b00847
|
I've finished the remaining items on this, including a cleanup/overhaul of the existing bootstrapping. This is ready for review. cc @UK992 since you wrote the original Windows bootstrapping, can you check that |
|
Note this is still blocked on servo/saltfs#577 landing, however. |
| proceed = raw_input( | ||
| 'Proposed changes are above, proceed with bootstrap? [y/N]: ' | ||
| ) | ||
| if proceed not in ['y', 'yes', 'Y', 'Yes', 'YES']: |
This comment has been minimized.
This comment has been minimized.
|
This is great!
This should be fine, since |
|
Also, I think this should work on macOS (using Homebrew) - if someone could check that I'll enable the Salt bootstrapper for macOS as well (instead of just Ubuntu 14.04). |
|
Since both gnu and msvc use same python, detection should be relied on |
|
Also |
0263adf
to
966a2c4
|
|
GNU/MSVC detection was broken for some time. Using if "windows-gnu" in host_triple():
bootstrapper = windows_gnu
elif "windows-msvc" in host_triple():
bootstrapper = windows_msvc |
Extracting these functions helps avoid circular dependencies, and make them easier to find/reuse.
Use the `desc` parameter instead to make the error messages customized for the actual download. Also use new-style format strings.
- Default to interactive mode and remove the `--interactive` flag - Use `--force` to skip interactivity - Change MSVC dependency storage organization on disk: put each version into its own folder and directly refer to the versioned folders, providing immutability and making the installation list redundant - Reuse `host_triple()` function to fix broken bootstrapper dispatching - Simplify code: - Remove or inline many unused and redudant functions and variables - Prefer plain functions to classes - Consolidate into fewer files, remove unnecessary bootstrapper/ dir - Improve Python style - Sort dependency list
|
@UK992 OK thanks, I updated that. Can you give it a try and also run |
|
@aneeshusa building works perfectly on MSVC. |
The Salt bootstrapper invokes Salt during `./mach bootstrap` to install Servo's build dependencies. It uses salt-call pinned to the same version of Salt as used in saltfs. Currently, the implementation uses gitfs and reads directly from the master branch of the saltfs repo; in the future this should be changed when the relevant Salt states are moved in-tree as part of Dockerization for TaskCluster. We have not Salted our Windows machines, so the existing Windows bootstrappers are retained. Currently this is only tested on Ubuntu Trusty. Salt uses various system python libraries, including `python-apt` on Debian-based OSes to interact with apt. `python-apt` does not seem to be installable via a requirements.txt file, and the versions available on PyPI are far behind the versions installed on actual Ubuntu machines. Additionally, adding `python-apt` as an unconditional python dependency would add bloat for users of other OSes, and lead to more churn as additional OSes are supported. However, as `python-apt` is already installed via apt on these machines, we can allow Salt to instead use the module by using `--system-site-packages` for the python virtualenv. We also add the `-I` flag to `pip install` to ensure we have a local, untouched copy of any other python packages used. However, because this prints system-level Python packages in scope, it slightly breaks isolation, so it is important to always pin all dependencies in the requirements files.
|
servo/saltfs#577 merged and I've updated this, so this is no longer blocked. |
|
@metajack Review ping! |
|
@bors-servo r+ Looks good to me. |
|
|
Use Salt for mach bootstrap <!-- Please describe your changes on the following line: --> This is currently WIP, but allows Salt for `mach bootstrap`. Not looking for review yet, just posting for visibility. You can run `./mach bootstrap` and Salt will run, letting you know what changes it would make for bootstrapping (doesn't actually run yet though). Currently, this reads from saltfs using gitfs, meaning it always tracks the master branch. (Note that this is blocked on servo/saltfs#577 landing; in the meantime, I've included a small workaround in this PR to pull from my updated saltfs branch, which will need to be removed.) In the future, the relevant Salt code may be merged in tree as part of Docker support for TC, and the bootstrapper should be updated to read from in tree. Also, our Windows machines have not been Salted, so the existing Windows bootstrappers are retained. TODO: - [x] Hook into existing bootstrapping code less hackily - [x] Actually bootstrap instead of always using `test=True` mode (includes sudo) - [x] Default to interactive mode (test first, then ask), with a force flag - [x] Don't require running from the repository root directory - [x] Make it easy to add support for other distros --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they should be verified manually <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14974) <!-- Reviewable:end -->
|
|
aneeshusa commentedJan 12, 2017
•
edited
This is currently WIP, but allows Salt for
mach bootstrap. Not looking for review yet, just posting for visibility. You can run./mach bootstrapand Salt will run, letting you know what changes it would make for bootstrapping (doesn't actually run yet though).Currently, this reads from saltfs using gitfs, meaning it always tracks the master branch. (Note that this is blocked on servo/saltfs#577 landing; in the meantime, I've included a small workaround in this PR to pull from my updated saltfs branch, which will need to be removed.) In the future, the relevant Salt code may be merged in tree as part of Docker support for TC, and the bootstrapper should be updated to read from in tree.
Also, our Windows machines have not been Salted, so the existing Windows bootstrappers are retained.
TODO:
test=Truemode (includes sudo)./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is