Chain of trust validation will require to know what the inputs for a
given build are, and mach artifact toolchain fetches such inputs.
So we make it output a manifest that the chain of trust validation
process will be able to use and correlate with other information, such
as the one from bug 1383993.
At the same time, we make the produced manifest contain information
about tooltool-downloaded packages, which will allow to track the
progress in the migration from tooltool to TC artifacts.
--HG--
extra : rebase_source : 5b3fc32a9fd641cc7edc57865d2b60aaa6ffcbed
Hacky, but it works -- until Google updates its license hashes. This
looks ahead to using |mach bootstrap| to build docker images.
MozReview-Commit-ID: DF23v8tr8SW
--HG--
extra : rebase_source : 5a80bdd5ddfb551b374464f42c3783fef5a71fc3
This looks ahead to using |mach bootstrap| when building docker
images.
MozReview-Commit-ID: LoMU7ji5T0x
--HG--
extra : rebase_source : 2885195855497d69b1cbba02a943964dd3286b93
This was a regression introduced in Bug 1344244. Google changed the
layout of their packages. It used to be that the Android SDK archive
had a top-level 'android-sdk-$OS_NAME' directory; that's no longer the
case. It would be cleaner to unpack to 'android-sdk' without the OS
name, but that complicates the logic that detects existing installs.
MozReview-Commit-ID: 4B2Rt1AM2ky
--HG--
extra : rebase_source : 3cd1fef88cbb47fc9cd4e47a2a4bc2277c576c58
Consider Rust toolchains prior to 1.19.0 old enough to update
by the `mach bootstrap` command, in preparation for requiring
that release during Firefox 57 nightly development.
MozReview-Commit-ID: JaaM3sPDmzn
--HG--
extra : rebase_source : 3835103a822cfc05bde92ee920b344fe7b68d61c
Bug 1374940 adds a MOZ_TOOLCHAINS environment variable with a list of
path@task-id strings, where task-id is corresponding to the (possibly
optimized) toolchain job, and path corresponding to the
toolchain-artifact defined for that toolchain job.
We want to use that to pull artifacts instead of tooltool packages.
--HG--
extra : rebase_source : 277daa2c83d6d197975cb4ef36ee131176afa992
For reasons I can't explain, Windows builds are failing intermittently
because they are unable to locate the `hg` binary when running
some SpiderMonkey test processes. These processes use
mozversioncontrol.get_repository_from_env() to locate the
current repository.
We now store VCS info in configure. This makes it available to anything
running in a build system context.
This commit teaches mozversioncontrol.get_repository_from_env()
to import the "buildconfig" module to locate VCS info. If the module
can be imported, it is the sole source of VCS info. Otherwise, we
fall back to the existing detection mechanisms.
This should get rid of the intermittent failure. If it doesn't,
it is still a step in the right direction because it will allow
build system processes to consistently use a well-defined VCS
binary.
MozReview-Commit-ID: DMxXheJLRqH
--HG--
extra : rebase_source : a9c599934c8c08da1fbb92a9105f5c7cba0867b3
We now store HG or GIT in substs. We don't need to search for
binary paths.
MozReview-Commit-ID: 8sSgPNLok9M
--HG--
extra : rebase_source : bc51087bcb9f2a723e27f240dd06a88540f6d8a8
We now have a variable in config.status for recording the checkout
type. These helper functions for determining if we're Mercurial or Git
can now be one-liners.
As a bonus, we no longer do I/O as part of this function.
MozReview-Commit-ID: HT9sbOhDEkf
--HG--
extra : rebase_source : 8b53b5f50d14c0bdd4ef3dc7b190314af80a76f0
For reasons I can't explain, Windows builds are failing intermittently
because they are unable to locate the `hg` binary when running
some SpiderMonkey test processes. These processes use
mozversioncontrol.get_repository_from_env() to locate the
current repository.
We now store VCS info in configure. This makes it available to anything
running in a build system context.
This commit teaches mozversioncontrol.get_repository_from_env()
to import the "buildconfig" module to locate VCS info. If the module
can be imported, it is the sole source of VCS info. Otherwise, we
fall back to the existing detection mechanisms.
This should get rid of the intermittent failure. If it doesn't,
it is still a step in the right direction because it will allow
build system processes to consistently use a well-defined VCS
binary.
MozReview-Commit-ID: DMxXheJLRqH
--HG--
extra : rebase_source : a9c599934c8c08da1fbb92a9105f5c7cba0867b3
We now store HG or GIT in substs. We don't need to search for
binary paths.
MozReview-Commit-ID: 8sSgPNLok9M
--HG--
extra : rebase_source : bc51087bcb9f2a723e27f240dd06a88540f6d8a8
We now have a variable in config.status for recording the checkout
type. These helper functions for determining if we're Mercurial or Git
can now be one-liners.
As a bonus, we no longer do I/O as part of this function.
MozReview-Commit-ID: HT9sbOhDEkf
--HG--
extra : rebase_source : 8b53b5f50d14c0bdd4ef3dc7b190314af80a76f0
Having Rust dump a stack on panic seems like a useful on-by-default
feature.
MozReview-Commit-ID: ABYTArsMTFh
--HG--
extra : rebase_source : 7d15f44a9ffd14db475db9e5c2964aca31bf0f70
This allows subcommands to use external argument parsers.
MozReview-Commit-ID: 7TkbTff0Tv8
--HG--
extra : rebase_source : a1c245efa7ac7b28b974534b4cd2727c96f9219d
After this patch, the following will all display the subcommand help where they previously displayed
the command help:
$ mach help <command> <subcommand>
$ mach <command> --help <subcommand>
$ mach <command> <subcommand> --help
The command help will still be shown for:
$ mach help <command>
$ mach <command> --help
MozReview-Commit-ID: 7EsVblnCaFM
--HG--
extra : rebase_source : 2a1d289d56164366ce140fa653adec93f56be067
There's no need to install the caskroom bits for Homebrew now,
allowing to fix Java installation on Mac OS X and simplify the code at
the same time.
MozReview-Commit-ID: 1Ssjm4YRrPQ
--HG--
extra : rebase_source : 3414d1fbe2bdb693cae1f5b1379d8d9335f1e7f4
This is the real fix. Google has replaced the |android --no-ui ...|
tool with a simpler |sdkmanager| tool, which makes it easier to
install packages with particular major versions. (Minor versions
still can't be controlled; for example, the m2repository extras are
constantly rolling forward.)
|sdkmanager| fails if the required packages aren't installed and can't
be installed, so there's no need to search for missing packages, etc,
simplifying the code considerably.
I don't see an easy way to upgrade outdated Android SDK installations
-- it's not clear that unpacking over top of an existing SDK
installation succeeds -- so I've included a message about moving or
removing outdated installations. This will punish folks who have
added additional Android platforms, or download emulator images using
the Android toolchain (but not those downloaded using |mach
emulator|). C'est la vie.
MozReview-Commit-ID: GLhKyuq701k
--HG--
extra : rebase_source : 26578c5ef4dcc6a29809630add2232a98407ec54
This refactoring unifies similar code that has been copy-pasted and
subsequently diverged.
MozReview-Commit-ID: EuVQBR4gsDo
--HG--
extra : rebase_source : bda66ef9001a1cddf75417aaeebd9dcecd05a6b7
This patch changes the name of the keys that are in the 'linked-files-map.json' that is produced in the code coverage build and are used to map symbolic links to their source files. The new key names (which are the paths to the symbolic links) are now the entire absolute path to each of the files.
MozReview-Commit-ID: 4x1dfk9h2Ov
--HG--
extra : rebase_source : 7d424bbbf1d026ea67c66b743c8c43ea75185733
This is similar to bug 1301751, where something in rust seems to trigger errors
running dsymutil to generate debug symbols in OSX. We can set debuginfo=1 for
these builds as a temporary workaround for now, while we work on a more
permanent solution in rust and/or dsymutil. debuginfo=1 still gives us enough
info for stack traces, although without line info. debuginfo=2 would be useful
for debugging, but is irrelevant to crash reports.
MozReview-Commit-ID: DdA00GzVfWg
--HG--
extra : amend_source : 47d3573042098194a07f9b473e4a02c86a1eba7c
The rigid type comparison added in 51a92a22d6d1 (bug 1375231) was
too rigid. This broke at least one consumer that was comparing an
empty PositiveOptionValue/NegativeOptionValue against a string.
Since comparisons against empty OptionValue are convenient and
don't violate the spirit of the type checking previously added,
this commit relaxes the type equivalence check in cases where the
OptionValue is empty.
MozReview-Commit-ID: UllTrzCjj
--HG--
extra : rebase_source : 2c41428d1be667edecdab0947d006a1a6a533569
OptionValue and its derived classes are exposed to moz.configure
files. As the previous bug fix showed, it is really easy to
accidentally assume the type is a simple string value and do a
string compare against it.
To prevent this class of bugs, this commit adds additional type
awareness to OptionValue.__eq__.
We first check that the argument is a tuple (including any OptionValue
types). If not, we raise a TypeError because the comparison is
invalid. This is arguably a violation of __eq__. But since OptionValue
is exposed to the moz.configure sandbox and typing '==' will invoke
__eq__, we have to do something to prevent this foot gun.
The change also changes the comparison logic.
If we compare against a non-derived tuple instance, we do a tuple
compare. Otherwise, we fall back to the previous logic of
requiring an identical type then doing a tuple compare.
MozReview-Commit-ID: 7IVSL2Asg9j
--HG--
extra : rebase_source : edab573834da240df9ad7c2fc78c85d6159a6ef9
Leaving off this argument makes `mach vendor rust` with large files fall
over with a Python error. While the user still gets a semi-useful error
message prior to this failing, it would be better to not fail here at all.
Cargo recently introduced the `cargo check` command for shortening the
edit-compile cycle when working on large programs. Since we don't
really support invoking `cargo` directly, let's wire up this command to
`mach`. Gecko developers can then `mach cargo check` to ensure their
changes typecheck.
We have a flag set on all Linkables, cxx_link, denoting whether there's
anything being linked into them that requires C++. We do this even when
we link against shared libraries that required C++. But if these
libraries don't export C++ interfaces, there's no reason that the things
linking against them should require C++. Therefore, ignore shared
libraries when making the determination of whether an object requires
C++ or not.
This patch renames the mozinfo flag 'coverage' to 'ccov' to avoid ambiguity in whether a test is being skipped for linux64-ccov or for linux64-jsdcov. It also removes the 'runtests.py' mozinfo hack and renames all occurrences of 'coverage' that are used for skipping tests in linux64-ccov.
MozReview-Commit-ID: IF2640bDQP7
--HG--
extra : rebase_source : 614020325e30d1ca9e01aaf08479b8a4ffaec888
With configure now being able to auto-detect the presence of a `mach
bootstrap`-installed clang and libclang and the upcoming
build-by-defaultness of Stylo, we can start downloading these packages
all the time.
LLVM/clang is needed for Stylo's bindgen, and Apple's clang is unusable
for such purposes. For other platforms, we have installed LLVM/clang
from our tooltool archive on the supposition that those packages are
definitely known to work, as we use said packages in automation. For
Mac, however, we haven't been able to generate packages for tooltool
that successfully build Stylo, and even if we had, those packages would
solely be used for developer builds of Stylo and would not be used in
automation. The case for downloading LLVM/clang for Mac from tooltool,
therefore, is not as strong as for other platforms.
As a result, we'll rely on the installed package manager for LLVM/clang,
which many people may have installed anyway.
In passing, also delete some old code for OS X versions < 10.7; such
platforms are no longer supported for running or building Firefox.
This patch adds a flag to the 'mozinfo.json' that can be used to disable tests when they are running on linux64-ccov. Then, this flag is used to prevent the marionnette test 'test_crash.py' from running on linux64-ccov.
MozReview-Commit-ID: 9IHMiZHxcMK
--HG--
extra : rebase_source : ec690cb3ffa27d3e88d2c0b8c5d510e72a5c5079
When determining the path of a possible mozilla-central checkout,
bootstrap currently considers the existence of a `.git` directory as
sufficient proof that the containing directory is a git checkout.
Unfortunately, if you happen to execute standalone bootstrap from a git
checkout of something else, you're gonna have a bad time.
To prevent this, check for the existence of a moz.configure file. This
is not an ideal proof, but it is better than what we currently have.
The -fsanitize=integer analysis from UBSan can be helpful to detect signed and unsigned integer overflows in the codebase. Unfortunately, those occur very frequently, making it impossible to test anything with it without the use of a huge blacklist. This patch includes a blacklist that is broad enough to silence everything that would drain performance too much. But even with this blacklist, neither tests nor fuzzing is "clean". We can however in the future combine this with static analysis to limit ourselves to interesting places to look at, or improve the dynamic analysis to omit typical benign overflows.
It also adds another attribute that can be used on functions. It is not used right now because it was initially easier to add things to the compile-time blacklist to get started.
Finally, it includes a runtime suppression list and patches various parts in the test harnesses to support that. It is currently empty and it should not be used on frequent overflows because it is expensive. However, it has the advantage that it can be used to differentiate between signed and unsigned overflows while the compile-time blacklist cannot do that. So it can be used to e.g. silence unsigned integer overflows on a file or function while still reporting signed issues. We can also use this suppression list for any other UBSan related suppressions, should we ever want to use other features from that sanitizer.
MozReview-Commit-ID: C5ofhfJdpCS
--HG--
extra : rebase_source : 952043a441b41b2f58ec4abc51ac15fa71fc142f
Support OSX Signed nightlies (in the complete.mar too)
MozReview-Commit-ID: HXiFGE14wYJ
--HG--
extra : rebase_source : 1d02b4714c8fafe6cdcd74e6d9b5612c44dcb3b4
- Set the extensions.legacy.enabled pref for mochitests etc
- Skip a plugin-inside-xpi test for now if legacy extensions
are force-disabled. That test can just be removed once we
get to 57.
MozReview-Commit-ID: As9LtkQTcTS
--HG--
extra : rebase_source : fcc84daef95c453e893cc3b98498fdb87f54b1bb
This adds a py_action invocation wrapping aapt and implements a hacky
implementation of the Gradle build system's resource merging
algorithm; once we have the moz.build and Gradle resources identical,
we'll be one big step closer to producing bit-identical builds and
flipping the switch in favour of Gradle. With this, the R.txt
produced by the aapt invocation is the same as the R.txt produced by
the py_action invocation.
Originally I wrote this to use GENERATED_FILES, but it produced a
world of pain. Since Android's aapt tool is fundamentally directory
oriented, not file oriented, it required adding support for FORCE to
GENERATED_FILES and required directory crawling and FileAvoidWrite in
the wrapper. After getting that working I was eventually stymied by
the arcane requirements of the Android re-packaging system, which
interacts with the l10n system. I would have required support for
building GENERATED_FILES in the libs tier rather than the misc tier.
After that realization I gave up and turned to py_action: the
dependencies on branding are just too entangled with l10n to use
GENERATED_FILES.
And, in the not-so-distant future, all of this moz.build and
Makefile.in chicanery will be deleted in favour of invoking Gradle at
the appropriate points!
MozReview-Commit-ID: 4ueVNa7gzgs
--HG--
extra : rebase_source : dab092a188bc735ef819a4be0ad13387e85c87e2
extra : source : a05bd87b09ee5e4cff20fe84c2e75ac3b2a494a1
Create a test for version control related functionality.
MozReview-Commit-ID: GXd27O69GNg
--HG--
extra : rebase_source : 56ce4a38b591fd62f05fbaed0ff05d56ec127422
The underlying commands to mozlint's vcs.py had a few problems. This:
1. Ensures deleted files aren't considered in both hg and git
2. Automatically determines the default remote repo and branch when using --outgoing with git
3. Excludes metadata from output of the git command used with --outgoing
4. Adds --cached to the git command for --workdir, which lints all staged files
MozReview-Commit-ID: EBtM3MCiCDs
--HG--
extra : rebase_source : 982b24acd81c86e383b28b8a71bcd51a041e60f4
The old method had a bunch of 'if vcs == git' statements and the like. This
made it hard to follow code paths for a given vcs system. I think this refactor
makes things cleaner to read. It shouldn't be changing any functionality.
MozReview-Commit-ID: EBtM3MCiCDs
--HG--
extra : rebase_source : 9c0fda3f4f824351bae852af25bcd2240b1b1024
The rev option is inherently broken. It does let you lint files touched by any
revision, but it doesn't update those files to that revision first. Instead,
they get linted at whatever the working directory is and their results are
bogus. Even if we did some magic to update the files to the proper revision
with in-memory version control magic, the config files would still be out of
date.
Plus, the new --outgoing option does pretty much the only thing --rev was good
for. Rather than cause confusion, I think it's better to just remove the
option.
MozReview-Commit-ID: 2y2UnfIkvsR
--HG--
extra : rebase_source : 9b5c142270c98905d71ebb89d1620e91914c0b47
This prevents us from redundantly installing httpd.js and httpd.manifest
from the test package during an artifact build, which interferes with
the Tup backend's handling of these files as symlinks.
MozReview-Commit-ID: LuMurUc1P36
--HG--
extra : rebase_source : 1aabd788ff71ae28434a4076d5304f611ada5d92
As mozprocess doesn't have any special handling of stderr, should cargo
operations fail their output is dropped. Switch to subprocess.check_call to
ensure cargo errors are displayed to the caller.
This was a regression from bug 1288432. The 'extensions' config in mozlint required a
leading period, but eslint requires them without the period (and this got copied over
to the linter definition). The result was mozlint filtering out any files (not dirs)
that were passed in.
This just modifies mozlint to strip out the period so both are acceptable.
MozReview-Commit-ID: CbNynYzrbGz
--HG--
extra : rebase_source : 51c740cb1d2febaee3ae46784f83381cda5e5eaa
libGL package was consolidated into mesa-libs but quarterly set still
uses the old name. Since gtk3 (via libepoxy) and gtk2 (via cairo)
already indirectly depend on mesa-libs take advantage of it to avoid
churn on updates.
MozReview-Commit-ID: F5LBOOthAMc
--HG--
extra : rebase_source : 4e3e30e817187c3ffef30e280554b12b02f44568
Bump the target version and checksums for the rustup installers
we use for the latest release so reduce the variance with manual
installs.
MozReview-Commit-ID: E5O4UOu1wLr
--HG--
extra : rebase_source : a0745515957667787929bc5df05a66adb29cbd66
If we don't do this, various bits of test infrastructure will turn on
when stylo is merely built, not enabled, which will cause no end of
orange and unhappiness.