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

5110 Коммитов

Автор SHA1 Сообщение Дата
Mike Hommey a154421f99 Bug 1740042 - Use llvm-readelf instead of readelf when available. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D130949
2021-11-23 02:28:18 +00:00
Sylvestre Ledru 70be2344fc Bug 1707591 - ride along - reformat the tree with black 21.10b0 r=ahal,webdriver-reviewers,perftest-reviewers,whimboo,gerard-majax,alexandru.irimovici
This changed with this:
https://github.com/psf/black/pull/1740

Depends on D130964

Differential Revision: https://phabricator.services.mozilla.com/D130965
2021-11-22 22:10:03 +00:00
Chris H-C 8d0d430403 Bug 1741674 - Advise in each metrics.yaml that we have docs for adding metrics r=TravisLong,nalexander
Depends on D131639

Differential Revision: https://phabricator.services.mozilla.com/D131640
2021-11-22 20:07:38 +00:00
Andi-Bogdan Postelnicu 63f9f0e328 Bug 1739644 - make clang based tooling work for cross compile builds also. r=firefox-static-analysis-reviewers,sylvestre DONTBUILD
Original patch by glandium.

Differential Revision: https://phabricator.services.mozilla.com/D131139
2021-11-19 20:10:21 +00:00
Andrew Halberstadt 7856dcfe71 Bug 1632870 - [mozbuild] Allow making copies of 'mozbuild.util.ReadOnlyDict', r=firefox-build-system-reviewers,mhentges
The copy and deepcopy operations currently use 'setitem' which obviously fails
for 'ReadOnlyDict'. But copying the dict yields a new instance so there should
be no reason this is prevented.

Specifically, I'd like to make certain subsets of task configuration read-only.
But copying is needed when we split the task into multiple tasks (e.g for
chunking).

Differential Revision: https://phabricator.services.mozilla.com/D131284
2021-11-19 14:18:33 +00:00
Alexandre Lissy 60d10601bb Bug 1726804 - Refactor definition and usage of GECKO_PROCESS_TYPE() r=nika,firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D121388
2021-11-19 14:02:55 +00:00
Alexandru Michis 2cb5b32d02 Backed out 2 changesets (bug 1726804) for causing sm bustages in geckoprocesstypes.
CLOSED TREE

Backed out changeset bf7f73fd1921 (bug 1726804)
Backed out changeset c9936f7534cb (bug 1726804)
2021-11-19 11:40:59 +02:00
Alexandre Lissy b71c7b7255 Bug 1726804 - Refactor definition and usage of GECKO_PROCESS_TYPE() r=nika,firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D121388
2021-11-19 08:33:42 +00:00
june wilde 420b1ebb70 Bug 1730394 - Use vendoring url in mach vendor and update moz.yamls accordingly; r=tjr
Depends on D124799

Differential Revision: https://phabricator.services.mozilla.com/D125337
2021-11-18 16:48:51 +00:00
Mitchell Hentges 84e16b0d9c Bug 1730712: Split site manager into command and mach managers r=ahal
The command site manager needs to be able to do ad-hoc pip
installations, while the Mach site manager needs to manage
the system `sys.path` and conditionally create an on-disk
virtualenv.

By splitting the class into two, we can now give each use case the
attention it deserves.

Differential Revision: https://phabricator.services.mozilla.com/D129529
2021-11-17 20:54:27 +00:00
Mitchell Hentges 8f554a6da0 Bug 1730712: Ensure virtualenv up-to-date before activation r=ahal
Rather than requiring that consumers remember to `ensure()` before
calling `activate()`, we can do so automatically during activation.
There isn't a valid use case in which we want obsolete virtualenvs to be
activateable.

Usages of `MozSiteManager` have been updated accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D129688
2021-11-17 20:54:25 +00:00
Mitchell Hentges 725792bd05 Bug 1730712: Update "Moz site" terminology r=ahal
The existing terminology had two issues:
* `VirtualenvManager` wasn't always associated with an on-disk
  `virtualenv`: for example, when running in automation, Mach
  "activates" a `VirtualenvManager`, updating its import scope,
  but without ever creating an on-disk `virtualenv`.
* An upcoming patch splits the `VirtualenvManager` class, pulling
  "on-disk virtualenv-handling functions" from the project-wide
  interface for managing Python's import scope.

After some good discussion with Ahal, I think we've struck
the terminology that handles this distinction well: we'll call
the "import scope"-handling part the "site", and we'll continue
to call on-disk virtualenvs (and their representative classes)
as, well, virtualenvs.

Differential Revision: https://phabricator.services.mozilla.com/D130391
2021-11-17 20:54:23 +00:00
Mitchell Hentges b7b1442242 Bug 1730712: Remove external use of `_run_pip()` r=perftest-reviewers,ahal,sparky
As `_run_pip()` is being removed from `VirtualenvManager` in an upcoming
patch, its usages need to be removed. Besides, they're using an
"internal" function, which is a bit of a smell.

Note that this _could_ have been solved by exposing a public `run_pip()`
function. However, I felt like that was worse because:
* Friction here is good as we try to migrate the codebase to embrace the
  "requirements definition file" technique to install dependencies.
* There could be confusion about the relationship between
  `install_pip_package()` (only works if venv already activated)
  and `_run_pip()`, which works "in general".

Differential Revision: https://phabricator.services.mozilla.com/D130120
2021-11-16 21:14:41 +00:00
Tom Ritter 12fdd98bd0 Bug 1740781: When we cannot add files in ./mach vendor, fail with a detectable error code r=jewilde
Differential Revision: https://phabricator.services.mozilla.com/D131008
2021-11-16 02:43:05 +00:00
Marian-Vasile Laza 25a09c0d08 Backed out changeset 561c776bea20 (bug 1740042) for causing build bustages on llvm-readelf. 2021-11-16 02:51:16 +02:00
Mike Hommey 5459f879e5 Bug 1740042 - Use llvm-readelf instead of readelf when available. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D130949
2021-11-15 22:48:34 +00:00
Marian-Vasile Laza 51e3255d7c Backed out changeset bf55cb5e6b45 (bug 1740042) for causing build bustages. CLOSED TREE 2021-11-15 22:54:31 +02:00
Mike Hommey 2c9074abb8 Bug 1740042 - Use llvm-readelf instead of readelf when available. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D130949
2021-11-15 20:41:41 +00:00
Iulian Moraru 897bb9d353 Backed out 2 changesets (bug 1707591) for causing python mozlint failures on test_yaml.py. CLOSED TREE
Backed out changeset a730ab2d0dbe (bug 1707591)
Backed out changeset 0269849fd7ef (bug 1707591)
2021-11-12 18:44:36 +02:00
Sylvestre Ledru c1b5edd8be Bug 1707591 - ride along - reformat the tree with black 21.10b0 r=webdriver-reviewers,whimboo,gerard-majax
This changed with this:
https://github.com/psf/black/pull/1740

Differential Revision: https://phabricator.services.mozilla.com/D130965
2021-11-12 15:06:56 +00:00
Tom Ritter ba401f9eb6 Bug 1740106: Implement a move-dir action for moz.yaml files r=jewilde
Differential Revision: https://phabricator.services.mozilla.com/D130677
2021-11-11 19:03:59 +00:00
James Teh 14b06e0792 Bug 1736742 part 1 fix: Correct COM UUIDs used for beta channel builds. r=nalexander
Previously, we always used the last UUID in configure.sh.
This is incorrect for beta because beta and release share the same "official" branding and the beta UUIDs are specified first.
We now decide whether to use the first or last UUID based on the channel.

Differential Revision: https://phabricator.services.mozilla.com/D130833
2021-11-11 02:18:38 +00:00
Geoff Lankow c40e648417 Bug 1740381 - Port bug 1736565 (Infer artifact build candidate tree based on version) for comm- trees. r=nalexander
This is the same configuration as for mozilla- trees as added in https://hg.mozilla.org/mozilla-central/rev/93e421a84361 except Thunderbird doesn't use comm-release.

Differential Revision: https://phabricator.services.mozilla.com/D130817
2021-11-09 23:33:55 +00:00
James Teh 76ad0164ca Bug 1736742 part 1: Add missing a11y COM interfaces to Appx Manifest. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D129949
2021-11-05 06:25:44 +00:00
Mitchell Hentges 4d5f166b49 Bug 1730712: Use consistent Python version throughout configure r=andi
It's possible for the `PYTHON3` config to point to a different Python
than that that is executing the configure scripts themselves.

This flexibility was needed for the Python 2->3 migration, but now that
it's complete, we can remove the extra configuration and just lean on
the Python interpreter used to run configure.

Differential Revision: https://phabricator.services.mozilla.com/D129863
2021-11-04 21:41:33 +00:00
Agi Sferro d4e0174d2c Bug 1529082 - Use bundletool to install apps as aab packages. r=ahal,owlish
This patch adds a new command line argument --aab which allows users to install
GVE as an AAB.

This will also be used in a future patch to install the test runner as AAB.

Differential Revision: https://phabricator.services.mozilla.com/D127323
2021-11-02 18:56:28 +00:00
Agi Sferro dccddb81bc Bug 1529082 - Move TestRunnerActivity to test_runner. r=ahal,owlish
The fact that the test runner app is defined inside the geckoview test package
has always felt like a hack to me. I've mistakenly thought that
TestRunnerActivity was used in GeckoView's junit tests many times (even though
that's not the case).

From what I can see, there's no way to generate an AAB package for androidTest,
so to be able to run Gecko tests as AAB we finally need to define the
TestRunner as an ordinary package instead.

Differential Revision: https://phabricator.services.mozilla.com/D127320
2021-11-02 18:56:26 +00:00
Sebastian Hengst 22d3b81141 Merge mozilla-central to autoland. CLOSED TREE 2021-11-01 23:06:15 +01:00
Mitchell Hentges 973f0aa262 Bug 1730712: Remove customizeable log handle from VirtualenvManager r=ahal
The optional `log_handle` argument was only used by:

* Configure, but the output was always dumped to stdout and *not*
  `config.log`. The manual logging _was_ used to handle encoding issues,
  but those are likely invalidated by the Python 3 migration.
* `./mach doc`, where we were putting virtualenv setup into stderr,
  which seems incorrect. The commit adding it doesn't explain why it's
  the case, but I'm guessing it shouldn't be too risky to remove.

Additionally, `log_handle` was used very inconsistently: for example,
running `install_pip_package()` would _not_ use `log_handle`.
So, removing `log_handle` removes a bit of abstraction leakage.

Differential Revision: https://phabricator.services.mozilla.com/D129298
2021-11-01 21:34:05 +00:00
Mitchell Hentges 162c7ab422 Bug 1732946: Vendor pip/setuptools/wheel instead of installing into venv r=ahal
Now that are prioritizing system over virtualenv site-packages, the
system `pip` is sometimes being used instead.
This is causing issues when the system pip is set up in a
distro-specific way, such as when "debundled":
https://github.com/pypa/pip/blob/9.0.1/pip/_vendor/__init__.py#L53-L61

However, if we vendor `pip`, `setuptools` and `wheel`, and ensure that
they're prioritized in the `sys.path` before anything is imported from
the system, then we can ensure that we're using a modern `pip` _and_
sidestep system-specific pip weirdness.

Note that `pip-compile`'s `--allow-unsafe` flag is not as dangerous as
it sounds.
There's confusion among maintainers about its origin:
https://github.com/jazzband/pip-tools/issues/522
Additionally, it's going to be enabled by default in a future
`pip-tools` release. So, it's not scary for us to embrace here.

Also, heads up that the "pip outdated warning" no longer needs
to be manually silenced, since pip avoids that code path when
not running from an "installed" context.

Differential Revision: https://phabricator.services.mozilla.com/D127182
2021-11-01 21:34:03 +00:00
Mitchell Hentges a9f396324f Bug 1717051: Always populate Mach pths r=firefox-build-system-reviewers,glandium
The previous behaviour was to:
* Never add a `pthfile` to the Mach virtualenv, and
* Always add Mach's paths to the `sys.path` when Mach initializes

However, this meant that `pip` would needlessly install packages
that already exist in the vendored environment.

Tweak `pth` behaviour so that `pip` behaves more efficiently.

Differential Revision: https://phabricator.services.mozilla.com/D120402
2021-11-01 21:34:03 +00:00
Mitchell Hentges 537d201bcc Bug 1732948: Assert that the Mach venv isn't out-of-date during init r=ahal
As we leverage the Mach environment more, it becomes increasingly
important that it isn't out-of-date on developer machines.

Add an `up_to_date()` check during Mach initialization.
To minimize the cost to startup, I'm skipping the "pip list" check.

This change required moving `virtualenv` from `mozbuild` to `mach` to
make it available during the early stage of Mach init.

Differential Revision: https://phabricator.services.mozilla.com/D127144
2021-11-01 21:34:02 +00:00
Mitchell Hentges b650e75dd6 Bug 1730712: Mild cleanup in virtualenv `build()` r=ahal
Inline a variable used once, and ensure that `old_env_variables` is
defined consistently before the `finally` block runs to satisfy an
intellisense warning.

Also, ensure that a wide comment is shuffled underneath the line limit.

Differential Revision: https://phabricator.services.mozilla.com/D129296
2021-11-01 21:34:02 +00:00
Mitchell Hentges a891c8b05b Bug 1730712: Don't re-exec "virtualenv.py" in new process r=ahal
Now that packages are consistently installed in a dedicated
`pip install` process, we can remove our funky re-execution of
`virtualenv.py`.

Since this re-execution was the only case in which `virtualenv.py`
was directly invoked by Python, we can remove the `__main__`-handling
block.

Also, now that `virtualenv.py` always is interpreted with its needed
modules in-scope, the deferred `MachEnvRequirements` import can be
moved to the top of the file.

Differential Revision: https://phabricator.services.mozilla.com/D129295
2021-11-01 21:34:01 +00:00
Mitchell Hentges 1ae08fbcc5 Bug 1730712: Do simple "pip install" when preparing venv r=ahal
`install_pip_package()` does some logic around not running pip if a
package is already installed.

However, this is redundant, because when building a venv, no packages
are installed.

Additionally, this was the constraint forcing us to populate the
virtualenv in a separate process from the one building it.

Differential Revision: https://phabricator.services.mozilla.com/D129294
2021-11-01 21:34:01 +00:00
Andi-Bogdan Postelnicu 80fddabd67 Bug 1738598 - sunset Coverity in Firefox.
Differential Revision: https://phabricator.services.mozilla.com/D129779
2021-10-31 17:18:02 +00:00
Mike Hommey 30fe940872 Bug 1690870 - Re-sign Mach-O binaries on macOS. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D129791
2021-10-28 11:05:05 +00:00
Mike Hommey a533a4b14a Bug 1690870 - Stop getting artifacts for host binaries. r=firefox-build-system-reviewers,andi
Ever since all builds we get artifacts from have been cross-compiled, those
artifacts have been for Linux. They are not of any use on Mac or Windows hosts,
so it's unnecessary to get them. And we might as well be consistent across
platforms, and not get them on Linux either, even if they are native.

Differential Revision: https://phabricator.services.mozilla.com/D129790
2021-10-28 11:05:04 +00:00
criss 6f11994c29 Backed out 3 changesets (bug 1690870) for causing build bustages. CLOSED TREE
Backed out changeset 258ae2eb6cd4 (bug 1690870)
Backed out changeset eb0be4532ace (bug 1690870)
Backed out changeset 05556177ebe6 (bug 1690870)
2021-10-28 13:46:19 +03:00
Mike Hommey cb39a01ea7 Bug 1690870 - Re-sign Mach-O binaries on macOS. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D129791
2021-10-28 10:24:53 +00:00
Mike Hommey dfacf7c003 Bug 1690870 - Stop getting artifacts for host binaries. r=firefox-build-system-reviewers,andi
Ever since all builds we get artifacts from have been cross-compiled, those
artifacts have been for Linux. They are not of any use on Mac or Windows hosts,
so it's unnecessary to get them. And we might as well be consistent across
platforms, and not get them on Linux either, even if they are native.

Differential Revision: https://phabricator.services.mozilla.com/D129790
2021-10-28 10:24:52 +00:00
William Durand e366b0ebec Bug 1736565 - Determine candidate trees based on the version display in `./mach artifact`. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D128879
2021-10-28 09:51:39 +00:00
Andi-Bogdan Postelnicu c42d6611f2 Bug 1738015 - Remove `mach check-syntax` r=firefox-build-system-reviewers,mhentges
Since now we can build firefox outside of the unified environment
in the hybrid-build check-syntax should be put to rest.

Differential Revision: https://phabricator.services.mozilla.com/D129616
2021-10-28 07:09:52 +00:00
Mike Hommey 12af297971 Bug 1737939 - Package the header wasm2c generates. r=firefox-build-system-reviewers,andi
Bug 1729411 did something similar for the source file it generates, but
that was made redundant with changes in bug 1735455. Those changes,
however, still don't account for the header, so manually handle it.

Differential Revision: https://phabricator.services.mozilla.com/D129587
2021-10-27 07:31:20 +00:00
Tom Ritter a1e5b11fc9 Bug 1732104: Make ./mach vendor work well on Windows also r=jewilde
Differential Revision: https://phabricator.services.mozilla.com/D126387
2021-10-22 16:51:37 +00:00
Mike Hommey 23737c4854 Bug 1736950 - Fix mach show-log after bug 1696251. r=firefox-build-system-reviewers,mhentges
And disable logging on mach clobber like before.

Differential Revision: https://phabricator.services.mozilla.com/D129104
2021-10-22 04:33:04 +00:00
Nick Alexander b40e4a88af Bug 1736659 - Fix `*BetaBeta` identifiers in Firefox Beta MSIX packages. r=bhearsum
In automation, we specify `--identity-name FirefoxBeta`, which gets an
extra ` Beta` appended.

Differential Revision: https://phabricator.services.mozilla.com/D128962
2021-10-20 17:39:37 +00:00
Andi-Bogdan Postelnicu 0d12e234b2 Bug 1731582 - Move to clang-13 r=firefox-build-system-reviewers,mhentges,decoder
Join work with glandium.

Differential Revision: https://phabricator.services.mozilla.com/D126208
2021-10-20 12:03:20 +00:00
Connor Sheehan 0b22ec0196 Bug 1734075: expand `ssh` check to cover users with revoked hg access due to inactivity r=mhentges
When a user has been granted access to push to hgmo but does not make
use of their access for 6 months, their access is automatically revoked
via a cronjob in LDAP. This commit adds a check to the `ssh` mach doctor
check to find this condition and notify the user about how to proceed.

Differential Revision: https://phabricator.services.mozilla.com/D128206
2021-10-18 16:07:46 +00:00
Connor Sheehan 86a04827ee Bug 1734075: add a fallback result when `ssh hg.mozilla.org` output is unexpected r=mhentges
Before this change, if `ssh hg.mozilla.org` did not contain any of the
expected output lines, `mach doctor` would fail entirely as a check is
always assumed to return a `DoctorCheck` object. This commit adds a
fallback return as a warning, saying `ssh hg.mozilla.org` returned
something unexpected.

Differential Revision: https://phabricator.services.mozilla.com/D128205
2021-10-18 16:07:46 +00:00