Граф коммитов

566 Коммитов

Автор SHA1 Сообщение Дата
Mitchell Hentges 710be25312 Bug 1655361: Prints a warning if Windows Defender is watching the Firefox checkout directory r=firefox-build-system-reviewers,rstewart
There's a Windows Defender CLI (`Get-MpComputerStatus`) available, but MozillaBuild
can't (easily) access PowerShell. So, instead, we find Windows Defender status and path exclusions
by checking the registry at HKLM\SOFTWARE\Microsoft\Windows Defender.

Determining if Windows Defender is "on" or not is a surprisingly vague task.
Not only does it encompass a lot of components (of which Ricky and I believe "Real-time protection"
is the part slowing down the build), but there's (at least?) two different kinds of "disabled"
states that it can be in:
* If "disabled" via Settings, it will turn itself back on after a reboot
* If an antivirus is installed, it will turn itself off permanently

Unfortunately, disabling "Real-time protection" in Settings doesn't affect any registry keys, but
I'm opting to ignore this because I doubt many users are manually disabling this protection before
each build. The repercussion of this is that users may be incorrectly warned "your Firefox
directory isn't excluded from Windows Defender!".

Focusing on the antivirus use case and querying the registry I found that:
* Querying the `IsServiceRunning` value wasn't sufficient because new Windows installations didn't have that key
* Querying the `DisableRealtimeMonitoring` value was inconsistent - it can be missing, and not always because an antivirus removed it
* Querying the `DisableAntiVirus` value doesn't _sound_ accurate (we care about Real-time Protection), but it's consistently "off" for non-AV machines, and "on" for machines with an AV installed. So, this is our winner!

TL;DR: there may be some "false positive" warnings about excluding the Firefox srcdir, but they're
accurate for my test cases and workaround-able (just add the exclusion to Windows Defender).

Also, this patch updates our Windows Defender docs to make them:
* More easily link-able
* Have direct advice to resolve the issue

Differential Revision: https://phabricator.services.mozilla.com/D85952
2020-08-11 20:59:40 +00:00
Ricky Stewart 31755b431d Bug 1657650 - Require that Mach command providers subclass MachCommandBase. r=remote-protocol-reviewers,marionette-reviewers,maja_zf,mhentges,froydnj
Today we don't require that `mach` `CommandProvider`s subclass from any particular parent class and we're very lax about the requirements they must meet. While that's convenient in certain circumstances, it has some unfortunate implications for feature development.

Today the only requirements that we have for `CommandProvider`s are that they have an `__init__()` method that takes either 1 or 2 arguments, the second of which must be called `context` and is populated with the `mach` `CommandContext`. Again, while this flexibility is occasionally convenient, it is limiting. As we add features to `mach`, having a better idea what the shape of our `CommandProvider`s are and how we can instantiate them and use them is increasingly important, and this gives us additional control when having `mach` configure `CommandProvider`s based on data that is only available at the `mach` level. In particular, we plan to leverage this in bugs 985141 and 1654074.

Here we add validation to the `CommandProvider` decorator to ensure all classes inherit from `MachCommandBase`, update all `CommandProvider`s in-tree to inherit from `MachCommandBase`, and update source and test code accordingly.

Follow-up work: we now require (de facto) that the `context` be populated with a `topdir` attribute by the `populate_context_handler` function, since instantiating the `MachCommandBase` requires a `topdir` be provided. This is fine for now in the interest of keeping this patch reasonably sized, but some additional refactoring could make this cleaner.

Differential Revision: https://phabricator.services.mozilla.com/D86255
2020-08-07 18:24:59 +00:00
Ricky Stewart 3e84200ad6 Bug 1655340 - Install `self.packages` in `mozboot/debian.py` r=froydnj
This got trampled in an overzealous code deletion in bug 1647814.

Differential Revision: https://phabricator.services.mozilla.com/D85004
2020-07-27 15:57:16 +00:00
Mitchell Hentges 81ec118ee7 Bug 1654607: Upgrades glean in bootstrap r=firefox-build-system-reviewers,rstewart
A newer version of Glean is needed to take advantage of the recent "optional version" change.

Pins glean to 31.5.0 to avoid breaking changes, such as to the YAML schema.

Differential Revision: https://phabricator.services.mozilla.com/D84566
2020-07-22 19:48:23 +00:00
Nathan Froyd a8ddf893b6 Bug 1654633 - install new dump_syms during bootstrap on OS X; r=nalexander,mhentges
This change brings Mac into parity with our other development platforms.

Differential Revision: https://phabricator.services.mozilla.com/D84580
2020-07-22 19:11:45 +00:00
Ricky Stewart 31cd1c2dbc Bug 1647814 - Verify that Python is installed and up-to-date in `bootstrap`. r=mhentges,froydnj
Check whether Python 3 is up-to-date and bail out with specific installation guidance if not. Don't install or upgrade Python 2/3. Also check whether Python 2 is up-to-date, and while we don't block `bootstrap` on it (because Python 2 isn't required to build), also supplement with specific installation guidance for people who need it.

Differential Revision: https://phabricator.services.mozilla.com/D82739
2020-07-20 18:15:06 +00:00
Ricky Stewart f34f1b6153 Bug 1648555 - `mach bootstrap` installs `libdrm-dev` package on Ubuntu/Debian r=dmajor
Also delete a bunch of dead code that was apparently meant to be useful for subclassing, but there's no subclasses of `DebianBootstrapper` in tree.

Differential Revision: https://phabricator.services.mozilla.com/D82073
2020-07-16 13:49:59 +00:00
Mitchell Hentges 115500932d Bug 1651424: Install glean in bootstrap r=firefox-build-system-reviewers,rstewart
Installs glean to the currently-active python installation during bootstrap, whether
that be a virtualenv or the system instance of python.

Differential Revision: https://phabricator.services.mozilla.com/D83012
2020-07-15 22:50:11 +00:00
Ricky Stewart 9390958b5b Bug 1652736 - Remove import of `mozversioncontrol` which breaks standalone `bootstrap.py` r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D83557
2020-07-14 20:04:51 +00:00
Nathan Froyd 95cc11b5d8 Bug 1652087 - add dump_syms to bootstrap-installable things on Linux; r=nalexander
If we're going to ditch the old breakpad dump-syms from the build, people
are going to need have this locally if they ever want to build packages,
etc.

Differential Revision: https://phabricator.services.mozilla.com/D83150
2020-07-10 22:10:26 +00:00
Cosmin Sabou 72bb6a7f58 Backed out 2 changesets (bug 1652089, bug 1652087) for toolchains bustage.
Backed out changeset 617233706940 (bug 1652087)
Backed out changeset ebcebafde8e0 (bug 1652089)
2020-07-11 00:48:41 +03:00
Nathan Froyd bb86a42f77 Bug 1652087 - add dump_syms to bootstrap-installable things on Linux; r=nalexander
If we're going to ditch the old breakpad dump-syms from the build, people
are going to need have this locally if they ever want to build packages,
etc.

Differential Revision: https://phabricator.services.mozilla.com/D83150
2020-07-10 20:32:57 +00:00
Ricky Stewart 259963ca76 Bug 1651824 - Run `mozboot` and `compare-mozconfig` unit tests in `mozbuild` task and not in `make check` r=froydnj
This is where the `compare-mozconfig` test properly belongs, and `mozbuild` tests already re-run every time a `mozboot` file changes.

Differential Revision: https://phabricator.services.mozilla.com/D83130
2020-07-10 18:25:07 +00:00
Mitchell Hentges b88610e3b1 Bug 1645196: Tune git settings to improve performance r=rstewart
Also adds a warning if a user's git version is older than 2.24

Differential Revision: https://phabricator.services.mozilla.com/D82128
2020-07-10 12:54:24 +00:00
Sebastian Hengst 4804061533 Backed out changeset d72c64af2c23 (bug 1645196) for very frequently failing remote(pup) task 2020-07-10 12:13:10 +02:00
Ricky Stewart 9dec41defd Bug 1651403 - Clean up `bootstrap` code post-Python 3 migration r=nalexander
Since bug 1647865, we're no longer allowing `bootstrap` to be run with Python 2. Therefore we have leeway to make a bunch of simplifications.

Differential Revision: https://phabricator.services.mozilla.com/D82737
2020-07-09 15:48:47 +00:00
Mitchell Hentges 99012368cc Bug 1645196: Tune git settings to improve performance r=rstewart
Also adds a warning if a user's git version is older than 2.24

Differential Revision: https://phabricator.services.mozilla.com/D82128
2020-07-07 18:29:37 +00:00
Ricky Stewart 37490b6c6e Bug 1648552 - `mach bootstrap` checks if Android NDK version is the correct version r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D82084
2020-07-03 13:59:01 +00:00
Bryce 79bb99c145 Bug 1650206 - If set, check JAVA_HOME for java instead of path. r=nalexander
Prior to this patch JAVA_HOME was appended to path and then the first instance
of java on those paths was used and checked for version compatibility. This
meant that if an incompatible version on java is on the path JAVA_HOME could not
be used to point to a different, compatible version.

Following this patch, JAVA_HOME can be used as a more fine grained selector of
java. Only if JAVA_HOME is not set will we check the path. To be clear, even if
JAVA_HOME is set incorrectly, we will not fall back to path -- only if JAVA_HOME
is not set will we try and use the path.

Differential Revision: https://phabricator.services.mozilla.com/D82418
2020-07-06 19:58:01 +00:00
Kagami Sascha Rosylight 4fc3d3027e Bug 1650261 - Pass git-cinnabar path to configure_git() r=mhentges,rstewart
D79393 introduced a new parameter to `configure_git()` but there is a remaining call that does not pass it. This patch fixes it.

Differential Revision: https://phabricator.services.mozilla.com/D82129
2020-07-03 17:30:00 +00:00
Mitchell Hentges b8de2e09b5 Bug 1481425: Deletes automated removal of mozreview commit hook r=sheehan
When moving from mozreview to Phabricator, the old mozreview git hook
had to be removed. Logic to automate the removal of this hook was added
to vcs-setup.

This commit removes this automated removal since it has been 2 years
since it landed.

Differential Revision: https://phabricator.services.mozilla.com/D82125
2020-07-03 14:16:49 +00:00
Ricky Stewart 3395ee63c9 Bug 1649850 - Refactor minimum Rust version into a common place for `bootstrap` and `configure` r=nalexander
The lack of duplication should prevent bugs like bug 1649039 popping up again.

Differential Revision: https://phabricator.services.mozilla.com/D82060
2020-07-02 18:05:58 +00:00
Karl Dubost c6ae17ea64 Bug 1482675 - Adds no-system-changes option to bootstrap. r=rstewart
Differential Revision: https://phabricator.services.mozilla.com/D78855
2020-07-01 00:11:55 +00:00
Ricky Stewart 01f005d7d7 Bug 1647830 - Users trying to build Firefox for Android on Windows should get a warning in `bootstrap` and `configure` r=nalexander
We get a lot of bugs about building Firefox for Android not working, and there's been ongoing confusion about whether this is something that does work or who has ever worked. The warning should hopefully clarify the current situation for people.

Differential Revision: https://phabricator.services.mozilla.com/D81585
2020-06-29 22:36:02 +00:00
David Major b6eec29461 Bug 1649039 - Update bootstrap's rustc to match bug 1648343 r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D81565
2020-06-29 17:44:52 +00:00
Ricky Stewart d44b1b67a3 Bug 1647873 - Remove "`mach bootstrap` is not fully implemented in MozillaBuild" message r=nalexander
This message dates from bug 1177128, the commit where this bootstrapper was added. At the time of writing that was certainly true, but today it doesn't appear to be true in any meaningful way. There's certainly an expectation that installing MozillaBuild and running `mach bootstrap` will get your machine ready to build Firefox; or at least, if it doesn't, it prints out some error messages telling you to do extra stuff, like we see in bug 1644794 for example. Therefore, I don't see how this message is relevant at all any more.

Differential Revision: https://phabricator.services.mozilla.com/D80730
2020-06-24 02:47:43 +00:00
Mitchell Hentges 7914702f50 Bug 1647865: Bootstrap should stop if run with Python 2 r=rstewart
This uses sys.exit() instead of throwing an exception since:
1. It isn't an error, and bug 1646406 isn't finished yet
2. The output is more straightforward for the user

This verification happens separately from the other python-verification logic, but that's
because I wanted the validation to happen as soon as possible - before the user invests too
much time, and before too much of the script ran with the wrong interpreter.

Differential Revision: https://phabricator.services.mozilla.com/D80726
2020-06-23 21:40:55 +00:00
Mitchell Hentges 58848678dc Bug 1644794: Improve "missing JDK" error message and docs r=rstewart,geckoview-reviewers,agi
Additionally, recommends the installation of AdoptOpenJDK instead of the Oracle JDK.
This required a different "JAVA_HOME" detection mechanism, which is implemented in this revision.

Differential Revision: https://phabricator.services.mozilla.com/D79547
2020-06-17 12:17:48 +00:00
Mitchell Hentges d92816473f Bug 1645047: Recommend adding cinnabar to path if not exists r=rstewart
Differential Revision: https://phabricator.services.mozilla.com/D79393
2020-06-12 19:43:38 +00:00
Mitchell Hentges 0fcab2f5a1 Bug 1643317: |mach bootstrap --help| uses file ref to explain --app-choice r=rstewart
Previously, python import syntax was used to refer users to the definition of the --application-choice arguments.
However, it isn't straightforward to the uninitiated, especially since it doesn't work in searchfox.

Instead, by providing a file reference, it should be more accessible.

Differential Revision: https://phabricator.services.mozilla.com/D79003
2020-06-10 16:27:24 +00:00
Mitchell Hentges 0cd86be789 Bug 1643298: |mach bootstrap --no-system-changes| should still output mozconfig r=rstewart,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D78997
2020-06-09 23:19:48 +00:00
Mitchell Hentges ed90a04ad1 Bug 1632874: |mach bootstrap| should write mozconfig file if it doesn't exist r=rstewart
Rather than always printing instructions at the end of the bootstrap phase, we will now create a mozconfig
file if one doesn't exist and there's configuration to be written.

Differential Revision: https://phabricator.services.mozilla.com/D78417
2020-06-08 19:36:56 +00:00
Mitchell Hentges a8304147a8 Bug 1643158: remove mozboot/util.py dependency on six r=rstewart
bootstrap.py depends on mozboot/util.py, but bootstrap needs to run in a bare environment without `six`.

Differential Revision: https://phabricator.services.mozilla.com/D78352
2020-06-04 18:59:51 +00:00
Valentin Gosu 9e9b45920a Bug 1643370 - Add POP!_OS to supported debian distros r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78316
2020-06-04 15:45:15 +00:00
Tom Prince 9eac413f54 Bug 1642446: Add an attribute to annotate toolchain tasks used by `mach bootstrap`; r=firefox-build-system-reviewers,rstewart
Toolchains that are used for local development need to be built on a level-3
branch to installable via `mach bootstrap`. Add an attribute to track the fact
that a toolchain is used that way, and:
- ensure that everything installed via `mach boostrap` has that attribute set
- ensure that everything with that attribute set is built on trunk projects

We could additionally verify that attribute is only set on things used by
bootstrap, but bootstrap doesn't currently have an exhaustive list of things
that it might install, making that difficult.

Differential Revision: https://phabricator.services.mozilla.com/D77706
2020-06-03 15:55:26 +00:00
Emily McDonough c6e4f99f13 Bug 1642040 - Add VoidLinux support to mach bootstrap r=rstewart
Differential Revision: https://phabricator.services.mozilla.com/D77571
2020-06-01 19:37:06 +00:00
Mitchell Hentges 811fbf178f Bug 1640064: Don't attempt to install python-pip (py2) on Debian Sid r=rstewart
Differential Revision: https://phabricator.services.mozilla.com/D77517
2020-05-29 20:17:40 +00:00
Ricky Stewart 6cda2c27f5 Bug 1640261 - Expand set of possible Python 3's you can use in bootstrap/debian.py r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D76529
2020-05-22 19:34:08 +00:00
Ricky Stewart 0a8ac76fef Bug 1639986 - Add hack to bootstrap to install Python 2 on macOS r=firefox-build-system-reviewers,nalexander
This is ugly and complicates the code some but it's manageable and allows us to keep things afloat on macOS while the testing team plugs along with the `mach` migration.

Differential Revision: https://phabricator.services.mozilla.com/D76386
2020-05-21 20:25:34 +00:00
Chris AtLee ef685f3549 Bug 1637379: Optimize android toolchains r=gbrown
Create an emulator toolchain
Stop including mozboot/sdk-*.zip in our tarball

Differential Revision: https://phabricator.services.mozilla.com/D74931
2020-05-21 13:28:10 +00:00
Cameron McCormack 252e4e5c55 Bug 1639788 - Update IRC reference in mach bootstrap output. r=glob
Differential Revision: https://phabricator.services.mozilla.com/D76271
2020-05-21 05:39:24 +00:00
Alex Vincent 449dbae8b1 Bug 1588166 - Remove python-dbus build dependency. (notify-send replaced it and it's no longer needed.) r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D74798
2020-05-20 15:19:13 +00:00
Nathan Froyd 9f876bab7a Bug 1638012 - commonize taskcluster-related bootstrappers for Linux; r=nalexander
This change doesn't fix all of the boilerplate involved in declaring
that certain packages should be fetched from taskcluster, but it's a
start, at least.

Differential Revision: https://phabricator.services.mozilla.com/D75330
2020-05-18 16:27:09 +00:00
Ricky Stewart ab8348bc51 Bug 1638783 - Install Mercurial with pip3 rather than pip, which no longer exists on new Ubuntu/Debian versions r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D75816
2020-05-18 20:10:19 +00:00
Corentin Arnould e7a750541a Bug 1638799 - Added `python-pip` to archlinux's bootstrap. r=froydnj
pip3 is an optional dependency of python on archlinux. It needs to be installed explicitly.

Differential Revision: https://phabricator.services.mozilla.com/D75785
2020-05-18 12:50:54 +00:00
Nicklas Boman 7c411a044b Bug 1637721 - openSUSEs bootstrap does not download the stackwalk toolchain r=firefox-build-system-reviewers,rstewart
In Bug1127565 bootstrap was given support for the openSUSE Linux distribution
Fetching the Stackwalk toolchain was not added unfortunately

his bug1636797 was hit during testing...
(also fixed some formatting "issues")

Differential Revision: https://phabricator.services.mozilla.com/D75189
2020-05-13 21:38:07 +00:00
Tarek Ziadé 080870795e Bug 1635136 - add a --push-to-try option r=aerickson
This patch is adding an option to push a perftest run in the CI.

It's based on :
- sparse profiles
- push_to_try
- options passed through try_task_config.json

Differential Revision: https://phabricator.services.mozilla.com/D74115
2020-05-12 21:19:48 +00:00
Mitchell Hentges b8108d6064 Bug 1632429: Migrate |./mach try| to python 3; r=rstewart,ahal
|./mach try| subcommands are now compatible with both python 2 and 3.

Hand-tested with many combinations of subcommand and subcommand flags.

Updates tryselect unit tests to use Python 3.

Differential Revision: https://phabricator.services.mozilla.com/D73398
2020-05-06 22:17:14 +00:00
Nicklas Boman a9633edb83 Bug 1127565 - bootstrap.py not implemented for openSUSE r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D74544
2020-05-10 00:51:03 +00:00
Geoff Brown 1c32970a45 Bug 1635834 - Install minidump_stackwalk in 'mach bootstrap'; r=nalexander
Install minidump_stackwalk as part of 'mach bootstrap' so that it is readily available
for generating crash reports, if desired.

Differential Revision: https://phabricator.services.mozilla.com/D74442
2020-05-08 19:09:43 +00:00