lib32-libstdc++5 moved from multilib to AUR, but it seems like we don't
need this anymore anyway.
Differential Revision: https://phabricator.services.mozilla.com/D19276
--HG--
extra : moz-landing-system : lando
Sometimes we want to store state that only applies to a particular srcdir, but
there isn't a standard directory where this lives. Let's add an argument to
'get_state_dir()' to provide an "official" place.
The new API to get the local state dir is 'get_state_dir(srcdir=True)'. Like
the global state dir, this directory is not guaranteed to exist. A reference to
this value can also be obtained via 'self._mach_context.local_state_dir' from
within a mach command (in this case it will be created automatically if it
doesn't exist).
Note: we should probably just make sure both exist at mach startup, but it felt
outside the scope of this change.
Differential Revision: https://phabricator.services.mozilla.com/D15724
--HG--
extra : moz-landing-system : lando
mozboot.util.get_state_dir() returns a tuple of (<path>, <bool). The bool
denotes whether or not the state dir came from an environment variable.
But this value is only used in a single place, and is very easy to test for
anyway. It's not worth the added complexity it imposes on all other consumers
of this function. Let's just make this function return the path.
Differential Revision: https://phabricator.services.mozilla.com/D15723
--HG--
extra : moz-landing-system : lando
Also use armv7a as the default when no target is given at all.
Also change bootstrap to create a simpler mozconfig. The downside is
that the resulting mozconfig would not work when building older
revisions.
Add unit tests for this as well as the simplications added in bug
1523341.
Differential Revision: https://phabricator.services.mozilla.com/D17906
--HG--
extra : moz-landing-system : lando
android.test.* is no longer part of the main framework, so as per
https://developer.android.com/training/testing/set-up-project,
- we must no longer declare them as a *required* dependency in our manifests
- we must explicitly include a dependency on them in our build config
This will temporarily break running tests depending on android.test.* (i.e.
mainly Robocop) on devices using P or newer until we also start targeting P as
well.
Differential Revision: https://phabricator.services.mozilla.com/D16422
--HG--
extra : moz-landing-system : lando
We're seeing all sorts of problems with the NDK toolchain compilers
and the various versions of the NDK. In automation we build with r17b
and our own toolchain clang; let's try to standardize on that.
This patch is ugly because of the evolution of mozboot. Long ago, we
passed arguments around and interpolated strings into function names
rather than setting members with the application name and whether
we're in artifact mode. The places I needed to modify didn't have the
right data at the right time so I added it to the bootstrap instance.
I don't have the time or energy to use the instance variables
through-out: that'll have to be future follow-up.
Differential Revision: https://phabricator.services.mozilla.com/D16138
--HG--
extra : moz-landing-system : lando
What is happening is that distribution JRE and JDK packages roll
forward, installing a different version of Java than what is expected.
We don't check the version installed, so sadness ensues.
Right now, we require Java 1.8 to build, but in the near future, after
Android-Gradle plugin 3.2.1+, we'll be free to use later Java
versions.
However, Android's `sdkmanager` itself requires exactly Java 1.8. We
only require `sdkmanager` to install `emulator`, really -- everything
else will be fetched by Gradle -- but I don't want to unravel that
right now.
So let's just provide decent error messages and try to prevent the
worst of the footguns.
Differential Revision: https://phabricator.services.mozilla.com/D16137
--HG--
extra : moz-landing-system : lando
This is part of the larger shift toward GeckoView and away from
Firefox for Android. We need GV to "show up" in these kind of
onboarding tools; here's a small first step.
Differential Revision: https://phabricator.services.mozilla.com/D16136
--HG--
extra : moz-landing-system : lando
This change adds a prompt to enable build system telemetry as part of
bootstrap. The prompt will only be shown if the build.telemetry config value
is not present, so users will not be prompted again if they have already
opted-in. However, if a user answers 'no' we don't save that value to
the config file because the default is to not send telemetry, so unless
they manually add `telemetry = false` to their config file they will be
prompted again the next time they run bootstrap.
The config value is always written to `~/.mozbuild/machrc` where we store
other Firefox build-related state. A standalone function is used to write
the config file so that we can do so even when running from bootstrap.py
outside of the context of a mach command.
As part of this change a `prompt_yesno` method is added to `BaseBootstrapper`.
Differential Revision: https://phabricator.services.mozilla.com/D9781
--HG--
extra : moz-landing-system : lando
In bug 1481425 I added an argument to `configure_git` for
the root directory of the current Firefox checkout, so
we could check for and remove the MozReview commit message
hook. I overlooked one other call to that function in
`bootstrap.py`, which is now failing due to too few
arguments. This commit adds the missing parameter.
Differential Revision: https://phabricator.services.mozilla.com/D10556
--HG--
extra : moz-landing-system : lando
This change adds a prompt to enable build system telemetry as part of
bootstrap. The prompt will only be shown if the build.telemetry config value
is not present, so users will not be prompted again if they have already
opted-in. However, if a user answers 'no' we don't save that value to
the config file because the default is to not send telemetry, so unless
they manually add `telemetry = false` to their config file they will be
prompted again the next time they run bootstrap.
The config value is always written to `~/.mozbuild/machrc` where we store
other Firefox build-related state. A standalone function is used to write
the config file so that we can do so even when running from bootstrap.py
outside of the context of a mach command.
As part of this change a `prompt_yesno` method is added to `BaseBootstrapper`.
Differential Revision: https://phabricator.services.mozilla.com/D9781
--HG--
extra : moz-landing-system : lando
During the MozReview days, users of git-cinnabar would install a
commit message hook to include `MozReview-Commit-Id` in their
commit messages. MozReview has seen been retired, yet there
are still a few users with the hook in their configs who now
have both a MozReview commit ID and a Phabricator Differential
link in their commits. This commit makes `mach vcs-setup` (and
`mach bootstrap`, since the former is called during the latter)
remove the commit hook on git checkouts of a Firefox repo. We
check the `commit-msg` hook file for "mozreview" anywhere in
the hook and remove if it is found.
Differential Revision: https://phabricator.services.mozilla.com/D10229
--HG--
extra : moz-landing-system : lando
cargo build is no longer called, so bootstrap will be faster.
All dependencies (including cbindgen) are usually up-to-date on BSDs
because there's no fallback to Mozilla binaries.
This patch makes the bootstrap code "ask" Gentoo's package manager for
human-readable information on how to get the latest JDK, then parses it and
locates the tarball URL on its own. The whole procedure is now fully automatic
(until the package output or Oracle web pages change).
Differential Revision: https://phabricator.services.mozilla.com/D5544
--HG--
extra : moz-landing-system : lando
moz.configure looks for rustc/cargo on PATH and in ~/.cargo/bin.
Bootstrap only looks on PATH and not in ~/.cargo/bin, though it is smart
enough to complain if rustc/cargo can't be found on PATH and you have
them in ~/.cargo/bin. Bootstrap should look in both places by default,
and be content if it finds them wherever they are, so long as
moz.configure can find them.
The state directory is in $HOME by default, so should be fine to just create it
if we get --no-interactive I think.
Differential Revision: https://phabricator.services.mozilla.com/D3838
This excludes directories, and returns true only if it's an executable file.
Differential Revision: https://phabricator.services.mozilla.com/D3366
--HG--
extra : moz-landing-system : lando
And require it for taskcluster build already, because it doesn't harm and lets
me put all the yml changes in the same commit.
I gave up cross-compiling for OSX after a few tries and after realizing it
wasn't enough with cctools and such, but that I also needed the Mac SDK, for
which I don't have permission...
Differential Revision: https://phabricator.services.mozilla.com/D2664
--HG--
extra : moz-landing-system : lando
We're currently using NDK r15c, which is rather old, and happens to come
with a buggy gold linker. Let's use a more recent NDK, with a fixed
linker.
Unfortunately, we're currently at NDK API level 9, which the newer NDK
doesn't provide for x86 anymore. But that corresponds to Gingerbread
(2.3), which we've long stopped supporting. On the SDK side, we already
dropped support of versions before Jelly Bean, so we can do the same on
the NDK side. That corresponds to API level 16. So let's just use that
as a baseline.
Another change in the newer NDK is that the target-name changed from
i386-linux-android to i686-linux-android, so adjust for that in the
android x86 mozconfigs.
We're currently using NDK r15c, which is rather old, and happens to come
with a buggy gold linker. Let's use a more recent NDK, with a fixed
linker.
Unfortunately, we're currently at NDK API level 9, which the newer NDK
doesn't provide for x86 anymore. But that corresponds to Gingerbread
(2.3), which we've long stopped supporting. On the SDK side, we already
dropped support of versions before Jelly Bean, so we can do the same on
the NDK side. That corresponds to API level 16. So let's just use that
as a baseline.
Another change in the newer NDK is that the target-name changed from
i386-linux-android to i686-linux-android, so adjust for that in the
android x86 mozconfigs.
A frequent question when mentoring new contributors is what "your
mozconfig file" is. By suggesting to create the file if it does
not exist, we can hopefully alleviate some new contributor frustration.
This change does unfortunately not take into account that the
mozconfig file can be named .mozconfig or even be in a designated
location defined by the MOZCONFIG environment variable, but it
seems reasonable to assume that developers who already know about
those alternatives will know which file to edit, and that what we
should optimise for during the bootstrapping process is to get new
contributors up and running quickly.
The argument --package_file was removed in the latest sdkmanager by Google's Android. But the docs for it say
packages can also be sent by putting them in quotes and calling the sdk manager with them as individual args.
So now instead of sending the file directly with the --package_file argument, the package names are read from
the file and the sdk manager is called with them as individual args.
Historically this has been thought of as a bug that happens with the wrong version of the JDK, but this can be
reproduced with just java 1.8.0_181 and the most up to date version of sdkmanager currently 26.1.1
Important note, the mach bootstrap command downloads an older version of the sdk and this bug is not present in
the older version.
Since the way of updating packages I'm proposiing to use is backwards compatible, there shouldn't be any problem
in any version of the sdkamanger.
This is a simpler fix than trying the --package_file argument, particularly because it would involve capturing
output (to detect this particular bug) that's also supposed to be shown to the user because this also happens
when the user is supposed to be interacting with the install.
MozReview-Commit-ID: L7VhCVKJNIf
***
Formatting changes to satisfy the linter.
--HG--
extra : rebase_source : f67d2cb85a4136eb8ad5c3053f5436a8870ab528
We're well overdue for an upgrade of the rust compiler requirements.
Now that we're building with 1.28 (albeit a beta, due to be bumped when
it's released), we can bump the requirement away from 1.24 which is now
old. 1.27 is too new, though, so settle for the older 1.26.
--HG--
extra : rebase_source : a17aa496bf3d4af4d1349d69a637c686c6817d0f
By making the archive URL dynamic, we can fetch an old version of the
bootstrap files. This will make it easier to test the bootstrapper in
CI.
Differential Revision: https://phabricator.services.mozilla.com/D1698
--HG--
extra : rebase_source : 9ba582cf3c138dba433e2bb354650f14b3f16aa7
extra : amend_source : 8a515bb755187e7f0d87b90a25a99f3803ea9e0f
extra : source : 1dcd43dd2a7b04e2bb714349033a456ea5158f3e
The previously listed server wasn't working. This has likely been
broken for years (I initially authored this commit in November 2016).
Differential Revision: https://phabricator.services.mozilla.com/D1697
We're well overdue for an upgrade of the rust compiler requirements.
Now that we're building with 1.28 (albeit a beta, due to be bumped when
it's released), we can bump the requirement away from 1.24 which is now
old. 1.27 is too new, though, so settle for the older 1.26.
--HG--
extra : rebase_source : c788ef4f7da9949b81df2f0577af6f6039ea63d8
Reduce the amount of text so that the options are more likely to be
visible and people are more likely to read it.
--HG--
extra : rebase_source : 95eacc8b6b09a82dfb1bec0e837bc70057c5cef1
The previous version was removed from Gentoo's portage repository making it
impossible to bootstrap correctly.
MozReview-Commit-ID: HTao6D3g61L
--HG--
extra : rebase_source : 57be7946b105289e662dc2f687bb1b2b9056a3f2
We bump the Mercurial version after a new Mercurial release. 4.6 was
just released. So...
MozReview-Commit-ID: LQ49eVCDuGG
--HG--
extra : rebase_source : 6b213a62216d1b8a9ec4f303d05d01e0609734a1
Not all distros will have a "python3" package. But the modern ones
should.
Because many people install Python via other means, we only install
the system packages if a Python 3 executable can't be found.
MozReview-Commit-ID: 2ni7Ha92cRD
--HG--
extra : rebase_source : 681085855f785b4857ac1b569c2b0dc4ffb68cad
This was just an oversight when adding Stylo bindgen support to |mach
bootstrap| (I assume).
MozReview-Commit-ID: 89N6omXGUdy
--HG--
extra : rebase_source : bcc4fc72ce49390e1200eb5efbe6ee14fccd016c
This was just an oversight when adding Stylo bindgen support to |mach
bootstrap| (I assume).
MozReview-Commit-ID: 89N6omXGUdy
--HG--
extra : rebase_source : 8055d69eea317d83d64d481708f2d77e544db688
Two things have changed. One, Brew's java package became Java 9,
which doesn't work for building on Android. Two, Brew's cask system
also changed, requiring some small updates.
In order to actually use the install java toolchain, we need to use
the --with-java-bin-path configure option, which required some small
tweaks to the suggested mozconfigs.
MozReview-Commit-ID: JlZpdqaOkp0
--HG--
extra : rebase_source : c2828139843b6e0b8d2f0c3141d4d9e5b0b83b4f
New Android-Gradle plugins pin the build-tools version, and we want to
be consistent between Gradle and moz.build.
MozReview-Commit-ID: ApWS4rHzPuH
--HG--
extra : rebase_source : 22008e9333b15c594ce26c2a52f67396d6e3ab84
extra : source : f918500d9cf5112b70bc8e0a120df435b02252b7
Firefox generally supports the same range of LLVM versions as Mesa.
Instead of regularly updating it just pull Mesa drivers which will
be required by WebRender, anyway.
MozReview-Commit-ID: DiK4TD9tWe0
--HG--
extra : rebase_source : 5dd9c8c46ae79deee8f2fd887b27fddbc30fc22d
Downstream npm package already depends node package, no need to
specify it explicitly. Also, node package refers to the latest NodeJS
but npm package can be built against an older version.
MozReview-Commit-ID: KeuSFEKeStw
--HG--
extra : rebase_source : ac3ab14519f4edd8bcb5b77cad64eeaed16d2751
Have `./mach boostrap` update users to at least rust 1.23.0,
which is the current stable release.
MozReview-Commit-ID: 7ukx7shu07e
--HG--
extra : rebase_source : 82ea7fd65901f0e9e00e961d157cf113d82b1d4e
This fixes a regression in 195e88aab631 (bug 1429094).
When I reviewed that changeset, I didn't realize there were callers
of the renamed function outside the file.
The other caller (changed in this commit) needs to interact with the
repository. This may require loading extensions. So we can no longer
unconditionally disable the loading of hgrc. We add an argument to
control the loading of hgrc to support this.
MozReview-Commit-ID: 8AkPhvtC1VH
--HG--
extra : rebase_source : b2bf3dcc52ac6bdeb86ea56923b9eaea0771739e
When bootstraping the development environment on a machine without
rustup installed, download and install rustup version 1.9.0,
released 2018 January 4, instead of the older 1.5.0.
This saves a self-upgrade step in the short term and reduces the
chance of lost support failures in the long term.
MozReview-Commit-ID: H8ouRszLMsP
--HG--
extra : rebase_source : 0eacfff2fa3e21e64dbbc998aee91600f5bb5d68
By ignoring existing .hgrc we make sure we don't try to load extensions
and have a consistent output. Especially we won't have error messages
that could confuse us into extracting a wrong version number.
MozReview-Commit-ID: FwrfcbY8QpN
--HG--
extra : rebase_source : 1b8c63830eb81832c8eaad86afc8520266c3ffc8
This version needs to stay synchronized with version-control-tools.
MozReview-Commit-ID: BN4h9XOntjD
--HG--
extra : rebase_source : 24a0593742000b1d0dde7e23aa5b042fe92ba2b9
New Android-Gradle plugins pin the build-tools version, and we want to
be consistent between Gradle and moz.build.
MozReview-Commit-ID: ApWS4rHzPuH
--HG--
extra : rebase_source : 38a9781c472d858f3300cbbcbdc6d2311c465713
New Android-Gradle plugins pin the build-tools version, and we want to
be consistent between Gradle and moz.build.
MozReview-Commit-ID: ApWS4rHzPuH
--HG--
extra : rebase_source : 5a5730b4b9ce84af40a7c73c4f1abba017103f02
- Add node as a dependency on Linux and Mac
- Add python3 for Mac only (linux generally has it installed already).
MozReview-Commit-ID: EpNWFTI9UXc
--HG--
extra : rebase_source : 755e8575e6e6c261c1ccaf9e5fe08e66502a4c3c
mesa is not necessary as of bug 938489 (there was even a bootstrap patch
that never landed)
libiw is not necessary as of bug 799391.
libnotify is not necessary as of bug 783765.
--HG--
extra : rebase_source : f6ecc18e50f8f92cb02ed16c87a6192800ea250d
Since bug 1421097, rust 1.22.0 is required to build, but
mozboot was still considering 1.21.0 sufficiently new.
bumpt the version there as well so `./mach bootstap`
will update to the required version.
MozReview-Commit-ID: moYo0KSsU
--HG--
extra : rebase_source : 900a962f5742b24ccd6ce3decc0242ff4fe36456
- aarch64 has GNU-free toolchain thus /usr/bin/as is N/A by default
but GNU as is required to build bundled ICU.
- Downstream Python splits sqlite3 C module into a separate package
to reduce optional dependencies but _sqlite3 is used by mozprofile.
MozReview-Commit-ID: Lh2ktcqh16f
--HG--
extra : rebase_source : bbcbe437132ecfce0f3e6e7b2005d0e8eac65836
This fixes a regression from bug 1408365. Ideally these imports would
be defined at the top of the file, then the py2 linter would have caught
them. Even more ideally, mozboot would have some tests that hit these
code paths.
MozReview-Commit-ID: BWvIwAdUBF4
--HG--
extra : rebase_source : 6472f730a5cd12aa98af7a21f958d1ad2400f995
I think we're approaching an inflection point for the bootstrapper,
one where it no longer is possible to bootstrap without a source
checkout. For now, however, let's just do the simplest thing and
install the Proguard JAR along the happy path.
MozReview-Commit-ID: xUY37eE6oR
--HG--
extra : rebase_source : 31549ab3b6d662d84761c2a260cd236a5809c8ac
The goal is to use a newer Android-Gradle build plugin version (2.3.3
is latest stable). That requires a modern Gradle (anything 3.3+, but
3.4.1 is the default from my Android Studio), and also a newer
build-tools (25.0.3 is latest stable).
The locations of lint output changed, and we want to use the standard
output location because it's difficult to accommodate variant details
in custom names. We change the location of findbugs output to follow
suit.
This requires either:
- fixing lint errors
- adding to the lint whitelist
- using the new lint baseline
It's best to use the new lint baseline, which will happen in the next commit.
MozReview-Commit-ID: D19FzIDCJrE
--HG--
extra : rebase_source : 12d132c0c3e0dbe2b8873b31360ea96d612de44c
We expect to start requiring rust 1.21 soon, so have
./mach bootstrap upgrade users to it to consolidate
churn between now and then.
MozReview-Commit-ID: HEnXm25duUr
--HG--
extra : rebase_source : d05071ee5c2852eb69da22e80623f21ca8c6f7cb
The old system was simply in place because I couldn't figure out how
to pipe `yes | ...` in Python. This is good enough to replace it, and
much less fragile since the license hashes change frequently.
MozReview-Commit-ID: AhJJPqMKfUh
--HG--
extra : rebase_source : 86289e692d646181d545457fc953610e165ee2df
GCC isn't safe to use on architectures that switched to Clang because
libstdc++ and libc++ aren't very compatible. Newer LLVM and Clang are
often already installed as a dependency for Mesa packages. So, always
require llvm* package.
MozReview-Commit-ID: 8651mz5tiIp
--HG--
extra : rebase_source : 7713e167b34f14a18fd5bf9c5ec33e926b2b929c
The MozillaBuildBootstrapper specific rust install code in not needed as
mozbase already includes genertic code to achieve the same outcome. The
mozilla-build specific code also leads to issues where it tries to add already
existing targets and fails the bootstrap. This changeset removes the
mozilla-build specific step.
MozReview-Commit-ID: G0BqKZrF40A
--HG--
extra : rebase_source : 60e9638afff744c937a9665d6fd5830187835ea4
This also passes the '--noreplace' option to all the emerge invocations thus
preventing already installed packages from being rebuilt from scratch.
MozReview-Commit-ID: 4JBuptmgS3Y
--HG--
extra : rebase_source : e581607d4a2e997e7d79c7c4496d13b8e9b10e50
This passes `python3 -mcompileall`. Changes:
* use `0o` prefix for octal literals
* print as a function
* except .. as
* use six.reraise to replace a multi-argument raise statement
* use six.string_types and six.moves.configparser
* remove uses of `L` suffix for long integers
MozReview-Commit-ID: KLaYRNHGpay
--HG--
extra : rebase_source : 6ca1b5447cd28eff8d9f2805add6a0f07e8b4c63