Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Salt for mach bootstrap #14974

Merged
merged 5 commits into from Jan 20, 2017
Merged

Use Salt for mach bootstrap #14974

merged 5 commits into from Jan 20, 2017

Commits on Jan 14, 2017

  1. Remove unusable --android flag for `mach bootstrap`

    `mach` can't do any bootstrapping for Android, so the flag is useless.
    aneeshusa committed Jan 14, 2017

Commits on Jan 15, 2017

  1. Create a util.py Python module for common functions

    Extracting these functions helps avoid circular dependencies,
    and make them easier to find/reuse.
    aneeshusa committed Jan 15, 2017
  2. Avoid hardcoded references to rustc in download()

    Use the `desc` parameter instead to make the error messages
    customized for the actual download.
    
    Also use new-style format strings.
    aneeshusa committed Jan 15, 2017
  3. Clean up and simplify existing `mach bootstrap`

    - 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
    aneeshusa committed Jan 15, 2017

Commits on Jan 17, 2017

  1. Add a Salt bootstrapper

    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.
    aneeshusa committed Jan 17, 2017
You can’t perform that action at this time.