Commit Graph

7688 Commits

Author SHA1 Message Date
Tom Ritter
70219f856b Bug 1764976: Support an every N commits for updatebot task frequency r=jewilde
Additionally, support a combination of both every N weeks and M commits
requiring both to be satisfied.

Differential Revision: https://phabricator.services.mozilla.com/D143844
2022-04-21 15:11:56 +00:00
Tom Ritter
1ae362f6d2 Bug 1764813: Teach ./mach vendor yaml how to handle a rust yaml file r=jewilde
Differential Revision: https://phabricator.services.mozilla.com/D143765
2022-04-21 15:11:56 +00:00
Tom Ritter
3cc8351723 Bug 1764813: Rename a confusing variable in mach vendor r=jewilde
Differential Revision: https://phabricator.services.mozilla.com/D143764
2022-04-21 15:11:55 +00:00
Tom Ritter
580c2e33e7 Bug 1764813: Indicate if a project is a rust, python, or regular vendoring type r=jewilde
Differential Revision: https://phabricator.services.mozilla.com/D143763
2022-04-21 15:11:55 +00:00
Cristian Tuns
9f7f5dc7c8 Backed out 2 changesets (bug 1654054) for causing mochites failures on browser_nimbusMessageFirstTimePip.js CLOSED TREE
Backed out changeset 164e5a97cc41 (bug 1654054)
Backed out changeset dde97d800713 (bug 1654054)
2022-04-20 18:47:32 -04:00
Niklas Baumgardner
6bf30f3a8f Bug 1654054 - Fluent migration for videocontrols. r=fluent-reviewers,mconley,flod
Depends on D139742

Differential Revision: https://phabricator.services.mozilla.com/D143622
2022-04-20 21:22:45 +00:00
ganguin
e2f88e166b Bug 1661450 - 1/2 Make webrtc depend on MOZ_X11 r=ng
1. add the MOZ_X11 config flag in build/gn.mozbuild and set the gn_vars
accordingly.

2. create the new gn-config/mozconfig files and delete previous ones
dom/media/webrtc/third_party_build/gn-configs/**.mozconfig with
--enable-default-toolkit=cairo-gtk3-wayland-only for the non X11 version.
New toolkit nmae is required to force disable X11 detection as
cairo-gtk3-wayland will auto-detect X11 and make generate-gn-build-files.sh
fail.

3. Add the MOZ_X11 config flag in python/mozbuild/mozbuild/gn_processor.py

Then run
dom/media/webrtc/third_party_build/gn-configs/generate-gn-build-files.sh

Differential Revision: https://phabricator.services.mozilla.com/D142904
2022-04-20 09:32:10 +00:00
Mike Hommey
2e1227e46b Bug 1765276 - Disable floating-point contraction. r=firefox-build-system-reviewers,andi
Until clang 14, the default was -ffp-contract=fast, but some reason
didn't really enable FP contraction in practice. GCC has the same
default, but does, in fact enable FP contraction*. This leads to more
inconsistencies in FP results between builds than would normally be
expected, and has an effect on e.g. fingerprinting resistance in fdlibm
trigonometric functions, or some other places (e.g. bug 1765436).

As far as the Firefox versions Mozilla ships are concerned, FP
contraction only really affects aarch64, but this change should in
practice make no difference with the current version of clang used (13),
and would preserve our now new default behavior with clang 14.

(*) We never noticed because we neither build with GCC for arm64 nor run
tests with GCC builds.

Differential Revision: https://phabricator.services.mozilla.com/D144136
2022-04-20 07:17:29 +00:00
Mike Hommey
6b078d7de3 Bug 1660745 - Update encoding_rs to 0.8.31 and packed_simd to 0.3.7. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D88002
2022-04-20 06:24:28 +00:00
Mitchell Hentges
47b796cd82 Bug 1763695: Move python-test poetry to ini "requirements" r=ahal
The `test_vendor.py` test needs access to `poetry` to make its
assertions. This requirement was previously satisfied by adding `poetry`
to the `python-test` site.

Unfortunately, this caused conflicts when running the `mozlint` tests,
as they use the ini "requirements" feature to install their
dependencies. Importantly, the `mozlint` dependencies aren't compatible
with the version of `poetry` we need.

Fortunately, this was a good reminder: since `poetry` is a test-specific
dependency, leverage the existing ini "requirements" feature as it
represents exactly that: the extra package dependencies of a specific
test.

Note that I had to doctor the `dataclass` line in
`vendor_requirements.txt` to include an environment marker, otherwise it
would fail to install with Python >= 3.7.

Differential Revision: https://phabricator.services.mozilla.com/D143376
2022-04-19 19:10:38 +00:00
Mitchell Hentges
d1eb9a0470 Bug 1764836: Mercurial update is now compatible with MozillaBuild 4.0 r=ahal
MozillaBuild 4.0 now uses `hg` with Python 3, so use Python 3's `pip`
accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D143921
2022-04-19 19:10:11 +00:00
criss
8d62d22b30 Backed out 10 changesets (bug 1661450) for causing build bustages on nsWindow.cpp. CLOSED TREE
Backed out changeset 2c41d82de0c5 (bug 1661450)
Backed out changeset 5f58fcd7ac0b (bug 1661450)
Backed out changeset 62e56a6dcd22 (bug 1661450)
Backed out changeset 4b422ffa729f (bug 1661450)
Backed out changeset 6ca4705772da (bug 1661450)
Backed out changeset 031a6313459f (bug 1661450)
Backed out changeset 06ddf05e97d6 (bug 1661450)
Backed out changeset 4388b1b9aafd (bug 1661450)
Backed out changeset 600f9fd09fa6 (bug 1661450)
Backed out changeset cc5e8efe3ebf (bug 1661450)
2022-04-19 12:25:14 +03:00
ganguin
d87231be26 Bug 1661450 - 1/2 Make webrtc depend on MOZ_X11 r=ng
1. add the MOZ_X11 config flag in build/gn.mozbuild and set the gn_vars
accordingly.

2. create the new gn-config/mozconfig files and delete previous ones
dom/media/webrtc/third_party_build/gn-configs/**.mozconfig with
--enable-default-toolkit=cairo-gtk3-wayland-only for the non X11 version.
New toolkit nmae is required to force disable X11 detection as
cairo-gtk3-wayland will auto-detect X11 and make generate-gn-build-files.sh
fail.

3. Add the MOZ_X11 config flag in python/mozbuild/mozbuild/gn_processor.py

Then run
dom/media/webrtc/third_party_build/gn-configs/generate-gn-build-files.sh

Differential Revision: https://phabricator.services.mozilla.com/D142904
2022-04-19 08:35:29 +00:00
Tom Ritter
3c836a9f1c Bug 1764600: Create a script that can be used to test ./mach vendor changes r=jewilde
Differential Revision: https://phabricator.services.mozilla.com/D143633
2022-04-15 18:17:41 +00:00
Tom Ritter
5fde982e4e Bug 1763991: Allow ./mach vendor to patch libraries when the patches are in a separate directory r=jewilde
Differential Revision: https://phabricator.services.mozilla.com/D143630
2022-04-15 18:17:40 +00:00
Tom Ritter
cac3a77d97 Bug 1763991: Implement move-file update-action r=jewilde
Differential Revision: https://phabricator.services.mozilla.com/D143629
2022-04-15 18:17:40 +00:00
Tom Ritter
aae5d518f8 Bug 1762642: Add libopus to mach vendor r=kinetik,jewilde
This makes some ./mach vendor improvements needed:
 - Adds a replace-in-file-regex action
 - Allows you to skip copying the temporary extract directory
   so that a script can do it
 - Removes 'commit' from the look-in-moz.yaml-for-release match

Differential Revision: https://phabricator.services.mozilla.com/D142720
2022-04-15 18:17:39 +00:00
Tom Ritter
bac9cbf93c Bug 1762627: Condense logging statements r=jewilde
Differential Revision: https://phabricator.services.mozilla.com/D142711
2022-04-15 18:17:38 +00:00
Tom Ritter
d191cdd8bc Bug 1761335: If a version update does not modify any local files, bail r=jewilde
This change does a few things

 - Moves get_full_path from a function-local function to
   a class member
 - Makes yaml_file a class member so I don't need to pass
   it everywhere
 - Creates a new moz.yaml file directive 'generated'
 - Adds that directive to libdav1d
 - Detects if any files (other than generated ones) were
   modified by an update; and if not - do not update the
   moz.yaml. Exit with -2 so Updatebot can detect it.

Differential Revision: https://phabricator.services.mozilla.com/D141994
2022-04-15 18:17:38 +00:00
Chris H-C
9d7fd96da1 Bug 1764549 - Update Glean SDK to v44.1.1 r=TravisLong
Differential Revision: https://phabricator.services.mozilla.com/D143749
2022-04-14 20:35:08 +00:00
Mitchell Hentges
97b39cb317 Bug 1764711: Move boto3 to requirement file r=ahal
The `upload_geneated_sources.py` script needs `boto3`, but was:
* Running in CI with Mach having a site-packages-source of `None`
* Using the `common` site (which inherits Mach's site-packages-source)
* Installing `boto3` outside of the knowledge of the centralized
  dependency system.

Make a `upload-generated-sources` site, and move `boto3` to it.

Differential Revision: https://phabricator.services.mozilla.com/D143715
2022-04-14 18:00:30 +00:00
Mitchell Hentges
9cf588867c Bug 1764466: Fix perftest-test invocation of modern pytest r=perftest-reviewers,sparky
* There is no `--duration` argument, but there //is// `--durations`
* `pytest` behaves better when called via its main entry points (either
  `bin/pytest`, or `-m pytest`)

Differential Revision: https://phabricator.services.mozilla.com/D143609
2022-04-13 20:07:17 +00:00
Matthew Gaudet
f1ae8a3f13 Bug 1757241 - Remove special case handling for ReadableStream in WebIDL generator r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D143074
2022-04-13 18:57:49 +00:00
Mitchell Hentges
34599d4f60 Bug 1764534: Maintain site_packages_dir order r=emilio
De-duping with `set` causes order to no longer be maintained when the
items are distinct. Use the `OrderedDict` technique to de-dupe
consistently instead.

Differential Revision: https://phabricator.services.mozilla.com/D143604
2022-04-13 14:44:06 +00:00
Tom Ritter
41003c553b Bug 1761537: Use yaml BaseLoader instead of SafeLoader to ensure everything is a string r=jewilde
I believe this is safe because from what I've been able to find
SafeLoader is FullLoader but without the bad stuff that lets you
execute arbitrary python code.  We don't need (nor want) the more
comlpicated data types like 'dates' and 'numbers' so we can use
BaseLoader which does nothing except treat everything as a string.

Depends on D142125

Differential Revision: https://phabricator.services.mozilla.com/D142126
2022-04-13 14:03:46 +00:00
Tom Ritter
63cb2cc07b Bug 1761523: Remove empty directories before copying them in-tree r=jewilde
Depends on D142124

Differential Revision: https://phabricator.services.mozilla.com/D142125
2022-04-13 14:03:46 +00:00
Tom Ritter
438f955023 Bug 1761534: Fix prefix detection by checking if all files have the same prefix r=jewilde
Depends on D142122

Differential Revision: https://phabricator.services.mozilla.com/D142123
2022-04-13 14:03:45 +00:00
Tom Ritter
8386bf3064 Bug 1761524: Add an option to force a library to vendor r=jewilde
Depends on D142121

Differential Revision: https://phabricator.services.mozilla.com/D142122
2022-04-13 14:03:44 +00:00
Tom Ritter
ce4aff2cba Bug 1761525: Fix --patch-mode only in mach vendor r=jewilde
Differential Revision: https://phabricator.services.mozilla.com/D142121
2022-04-13 14:03:44 +00:00
Nicolas Chevobbe
5c8a5c6759 Bug 1763313 - [devtools] Migrate storage panel to Fluent. r=jdescottes,flod
Both the dtd and properties files strings are moved to the existing storage.ftl.
A migration file was added to keep the localized strings.

Some of the strings were migrated to a declarative approach, setting `data-l10n-id` and
`data-l10n-args` attributes on elements. But in other cases, this was not easily doable.
To accomodate with the asynchronicity of `formatValue`, we translate all the strings that
don't have dynamic parameters during the initialization of the panel, and store them in
a Map for easy retrieval.

We also took this opportunity to cleanup the strings key names and have them all prefixed
with `storage-*`. Some functions where refactored so it should be easier to search the
code for a specific l10n string.

Finally, the `table.headers.indexedDB.*` strings weren't migrated as they were never read
in the UI (they are referenced in `NON_L10N_STRINGS`, which bypass localization).

Differential Revision: https://phabricator.services.mozilla.com/D143012
2022-04-13 12:47:57 +00:00
Nicolas Chevobbe
abb6e53e32 Bug 1763312 - [devtools] Remove sourceeditor.dtd. r=jdescottes,flod.
It was only used in the style editor, so we migrate the existing string
to styleeditor.ftl.

Differential Revision: https://phabricator.services.mozilla.com/D143011
2022-04-13 12:47:57 +00:00
Kagami Sascha Rosylight
053dae1ade Bug 1635428 - Part 3: Remove excluded() from files.py r=firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D112287
2022-04-13 09:27:11 +00:00
Mike Hommey
8937b90c26 Bug 1289641 - Vendor the vsdownload script. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D143125
2022-04-12 22:52:53 +00:00
Mitchell Hentges
74386e9dba Bug 1763244: Write tests for site activation logic r=ahal
Verify that activating mach and command sites in various configurations
affects the `sys.path` accurately.
Also verify that the `sys.path` is correct between the "activated
process" and fresh processes spawned from created virtualenvs.

Finally, tweak existing path-management behaviour to be more consistent:
* Don't unnecessarily sort `pths` from requirement definitions - it's
  more consistent (and more dependable) to keep the provided order.
* Continue removing unwanted `venv` entries from the `sys.path`, but
  don't add them back (such as the `$prefix` entry)
* Always remove `venv` entries from the `sys.path` when the venv isn't
  being populated. Though this doesn't affect behaviour, it makes
  assertions easier and simplifies the runtime state a bit.

Differential Revision: https://phabricator.services.mozilla.com/D143201
2022-04-12 21:28:50 +00:00
Butkovits Atila
59ebe1ff72 Backed out 7 changesets (bug 1289641) for causing Python failures. CLOSED TREE
Backed out changeset 0c1cedebf915 (bug 1289641)
Backed out changeset 575732020bd2 (bug 1289641)
Backed out changeset 55b68a71e03a (bug 1289641)
Backed out changeset 0b16a05aa405 (bug 1289641)
Backed out changeset acbff13b91b3 (bug 1289641)
Backed out changeset 2645367da7cb (bug 1289641)
Backed out changeset 8b22a8ec44fe (bug 1289641)
2022-04-12 22:23:27 +03:00
Mitchell Hentges
15510f9f26 Bug 1761150: Mach should use fresh system python, don't inherit sys.path r=ahal
Previously, when using the system Python packages, Mach would reuse the
values already existing in the `sys.path`. This had two benefits:
1. We didn't have to do work to calculate which paths the "system
   Python" specifically referred to.
2. This allowed us to support nested Mach calls
   (such as `./mach --virtualenv psutil ./mach build`).

However, it came with its own headaches, specifically around "consistent
imports" and Python subprocesses, such as in the following example
1. Mach runs "using system Python"
2. The "build" site (for example) would be activated. The current
   `sys.path` is included in the virtualenv's `mach.pth` file so that
   subprocesses will have access to the same packages as the primary
   Mach process
3. //Something// adds something to the `sys.path`
4. The build virtualenv is redundantly re-activated (such as due to
   generic setup code for some module). Though we don't physically
   re-activate the virtualenv, we //do// check that it's up-to-date to
   validate assumptions - **and it's not!** It's missing the
   //something// that was added to the `sys.path`.
5. We can't re-create the build virtualenv because it's already active,
   so:
6. An error is raised so that unexpected out-of-date-ness doesn't fly
   under the radar.

-----

This patch solves this by calculating the "system Python" paths in a
deterministic way. Then, even when using the system Python, the Mach and
command sites use define themselves in a consistent way.

This means that we can't do `./mach --virtualenv <venv> ./mach ...` to
shares `venv`'s packages with the whole new Mach process. Fortunately,
this has been replaced with  moving such packages into the nested Mach
command's requirements  definition instead.

TL;DR: more consistent, less failures. 👍

-----

One more detail, this time around the `sys_path()` function:
Ideally, we could calculate the standard library paths *and* the
"system" paths with only one Python subprocess. Unfortunately,
that's not the case:
* If `-S` isn't provided, then it's tricky to separate the standard
  library paths from the system paths
* If `-S` is provided, then doing `site.getsitepackages()` in a
  virtualenv returns the *system* site packages, not the virtualenv's.

To work around this, we call the external python twice, and in
parallel. This allows resolving the information we need while avoiding
performance costs.

Differential Revision: https://phabricator.services.mozilla.com/D143200
2022-04-12 18:40:14 +00:00
Mike Hommey
bd90bf1f39 Bug 1289641 - Vendor the vsdownload script. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D143125
2022-04-11 23:00:08 +00:00
Joel Maher
11cbf894a4 Bug 1763478 - add isolated-process flag to mozinfo.json. r=whimboo,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D143091
2022-04-11 20:44:46 +00:00
Cosmin Sabou
c951f55e7b Backed out changeset cf0cdfc423d3 (bug 1763478) for causing wpt-medata failures. 2022-04-11 21:21:34 +03:00
Joel Maher
4cde22ea41 Bug 1763478 - add isolated-process flag to mozinfo.json. r=whimboo,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D143091
2022-04-11 16:36:21 +00:00
Botond Ballo
a5992fc88a Bug 1588396 - Add 'pureos' to DEBIAN_DISTROS. r=mhentges
Verified to work on Purism Librem running PureOS 10 (Byzantium).

Differential Revision: https://phabricator.services.mozilla.com/D143329
2022-04-11 15:01:30 +00:00
Jan-Erik Rediger
236b8d27b0 Bug 1763602 - Update to Glean v44.1.0. r=chutten
Differential Revision: https://phabricator.services.mozilla.com/D143162
2022-04-11 08:25:00 +00:00
Mitchell Hentges
09af1e78c9 Bug 1659593: Make ./mach vendor python cross-platform r=ahal
Use `poetry` instead of `pip-compile`, then leverage `pip` to assert
that there's no conflicts between environments.

This enables simplifying `requirements.in`, since `colorama` is now
automatically picked up, as vendoring is no longer linux-py3.6-specific.

`poetry==1.2.0a2` was chosen because it was the first version that would
include `pip`/`setuptools`/`wheel` in the `requirements.txt`, yet it was
also the last version that supports Python 3.6 (as still used in CI in
some spots).

Sorry about the `requirements.txt` noise, that's because poetry doesn't
sort hashes yet [1]. Fortunately, you can be confident in
`requirements.txt` changes by checking that this patch doesn't include
changes to vendored packages themselves (I'm including the results of a
`./mach vendor python`).

[1] https://github.com/python-poetry/poetry/issues/5408

Differential Revision: https://phabricator.services.mozilla.com/D142884
2022-04-07 18:00:28 +00:00
Jim Blandy
bc55cd9f9b Bug 1763305: Update minimum Rust version to >= 1.59.0 r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D143007
2022-04-07 00:34:01 +00:00
Mitchell Hentges
4aa5138fd9 Bug 1762050: Use original topobjdir for PGO build virtualenv r=glandium
The PGO-specific objdir is meant for the PGO build artifacts.
The python virtualenvs just exist for the host, so there's no need to
scope them. Besides, the existing virtualenv infrastructure doesn't know
how to distinguish between "main 'build' site" and "PGO 'build' site",
which is why it raised this "out-of-date" error.

Differential Revision: https://phabricator.services.mozilla.com/D142373
2022-04-06 12:33:47 +00:00
Mitchell Hentges
aa84828a6f Bug 1755515: symbols_archive.py should use zstandard directly r=ahal
It's no longer necessary to explicitly grab the system Python handle to
access its packages.

Differential Revision: https://phabricator.services.mozilla.com/D132081
2022-04-05 17:41:37 +00:00
Marian-Vasile Laza
9170f02778 Merge mozilla-central to autoland. a=merge CLOSED TREE 2022-04-04 19:08:34 -07:00
Marian-Vasile Laza
fbb1e8462a Backed out changeset aff0eb14d891 (bug 1755515) for causing symbol upload bustages. a=backout 2022-04-04 16:17:01 -07:00
Mitchell Hentges
6628cec10b Bug 1732795: Update pytest to 7.0.1 r=ahal
`4.6.6` was 3 years old. There's been many helpful features and
ergonomics improvements in the years since.

Differential Revision: https://phabricator.services.mozilla.com/D140679
2022-04-04 17:03:33 +00:00
Mitchell Hentges
c5ec5f3ef8 Bug 1755516: Simplify "site.py" handling of command site package source r=ahal
Now that we are gleaning a site packages source in a process-global way
(that is *not* conditional on the site that's being managed), we've
removed an edge case from occurring: the case where Mach would use
`SitePackagesSource.NONE`, but the command site would use
`SitePackagesSource.SYSTEM`. This would've occurred if none of Mach's
dependencies were found in the system Python, but instead once the
command site was initialized, one of *its* dependencies were located.

Since that can no longer happen:
* Command sites that don't populate their VENV will *always* use the
  same site packages source as Mach
* `pthfile` generation is simplified (the priority of the system paths
  is no longer variable)
* We no longer need to track `site_packages_source` in metadata, since
  we can use `mach_site_packages_source` instead.

While here, I moved the "`PIP_NETWORK_INSTALL_RESTRICTED_VIRTUALENVS`
sites shouldn't have `pypi_requirements`" check to a test, since there's
no need for it to happen at runtime.

Differential Revision: https://phabricator.services.mozilla.com/D140668
2022-04-04 15:27:08 +00:00