Commit Graph

317 Commits

Author SHA1 Message Date
Nathan Froyd
6a25f52bd6 Bug 1411680 - fix clang toolchain downloaded by mach bootstrap on Linux; r=nalexander
We renamed this toolchain a while back, but never updated bootstrap.
2017-10-25 15:10:31 -04:00
Gabriele Svelto
d2bf4663bd Bug 1411196 - Make |mach bootstrap| on Gentoo use the latest version of Oracle's JDK for Fennec builds; r=froydnj
MozReview-Commit-ID: 7bUtundkBZU

--HG--
extra : source : dc1e64ab4995a17b52181ab703d9e0f5aea71d75
2017-10-24 11:15:16 +02:00
Steve Armand
2f063d0a37 Bug 1410752 - MacPorts in bootstrap.py is out of date, and fails on Sierra and High Sierra r=gps
MozReview-Commit-ID: gNjwQ26sZh

--HG--
extra : rebase_source : e0e6ab8e2e69afeeb4483d0c84e4155db92f35a6
2017-10-22 21:40:29 -04:00
Andrew Halberstadt
6e3d5384d5 Bug 1410454 - Fix ImportError regression in mozboot, r=nalexander
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
2017-10-20 14:31:47 -04:00
Ryan VanderMeulen
cb612851ed Merge inbound to m-c. a=merge 2017-10-18 21:01:34 -04:00
Geoff Brown
4d79215673 Bug 1390606 - Include emulator in android sdk installation from 'mach bootstrap'; r=nalexander 2017-10-18 15:30:43 -06:00
Nick Alexander
ca7be79cec Bug 1406572 - Install Proguard JAR as part of |mach bootstrap|. r=rillian
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
2017-10-17 15:48:32 -07:00
Nick Alexander
af26e68984 Bug 1366644 - Part 3a: Update Android build-tools (25.0.3), Gradle (3.4.1), Android-Gradle (2.3.3). r=maliu
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
2017-10-16 15:09:15 -07:00
Steve Armand
82b69a173f Bug 1408365 - Enable flake8/py2/py3 linters on python/mozboot. r=ahal
MozReview-Commit-ID: 3koZq509bjP

--HG--
extra : rebase_source : 9accfc2b727fd7c1f4fad97d1a244d62f4fae714
2017-10-13 23:33:00 -04:00
Ralph Giles
5bbd8ade03 Bug 1408565 - mozboot: Upgrade to rust 1.21.0. r=nalexander
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
2017-10-13 14:11:01 -07:00
Nick Alexander
754043c133 Bug 1407872 - Use Python yes-like pipe for --no-interactive in |mach bootstrap|. r=gbrown
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
2017-10-13 11:48:52 -07:00
André Reinald
5516cf8a4c Bug 1405389 - Change port name from py27-readline to py27-gnureadline to enable mach bootstrap on current macports. r=nfroyd
MozReview-Commit-ID: E9AlS8RCSp9

--HG--
extra : amend_source : 1d50db24437832978a5c793978cdb8c91c5c599d
2017-10-10 11:17:24 +02:00
Jan Beich
85fcc3246e Bug 1401166 - Skip Stylo dependency with ./mach bootstrap on OpenBSD. r=rillian f=gaston
MozReview-Commit-ID: E8FTcQkAI9M

--HG--
extra : rebase_source : d50a62faf8b600bb6017a1ae1cb528f27fd76aea
2017-09-19 12:19:40 +00:00
Jan Beich
06d2f5f41f Bug 1401166 - Simplify llvm40 dependency for ./mach bootstrap on FreeBSD. r=rillian
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
2017-09-19 12:10:30 +00:00
Jan Beich
f4716e6e78 Bug 1401166 - Drop obsolete cargo dependency from ./mach bootstrap on BSDs. r=rillian
MozReview-Commit-ID: LbbhRwXSEJN

--HG--
extra : rebase_source : af123f55e5441ea37c248f638a0c29780d22b1ad
2017-09-19 12:07:53 +00:00
SingingTree
51faf6041e Bug 1385241 - Remove mozilla-build specific rust install. r=ted.mielczarek
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
2017-09-07 17:37:53 +12:00
Gabriele Svelto
80ff657d2a Bug 1398935 - Make |mach bootstrap| support 'mobile/android' builds on Gentoo; r=froydnj
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
2017-09-11 23:42:53 +02:00
Mike Conley
c2e06b25fc Bug 1397279 - Have mach bootstrap install rustup 1.6.0. r=froydnj
MozReview-Commit-ID: LeabPgl8TTZ

--HG--
extra : rebase_source : e800ea1263bf371431a64eccf1b60b90cbdfe1d8
2017-09-06 09:59:45 -04:00
Henri Kemppainen
9edda378b4 Bug 1395768 - Use absolute path to mach. r=gps 2017-09-01 03:15:45 +03:00
Sebastian Hengst
ca3d97b658 merge mozilla-central to autoland. r=merge a=merge 2017-08-29 20:31:58 +02:00
hmk
31b4badfcf Bug 1394371 - Make it clear that the script proposes to clone mozilla-unified. r=gps 2017-08-28 18:02:45 +03:00
Dustin J. Mitchell
53df6a181b Bug 1390968: python-3 compatibility for python/**/*.py; r=Alex_Gaynor,gps
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
2017-08-28 21:31:30 +00:00
Jeff Gilbert
6d60656908 Bug 1392862 - Remove duplicate browser packages from mozboot/archlinux.py. - r=gps
--HG--
extra : rebase_source : 86d470ce1368610a3334950333b79b1b0c6ebc7d
2017-08-22 18:21:59 -07:00
Jeff Gilbert
1c9d9dd2fb Bug 1392862 - Update mozboot/archlinux.py: jdk7->8. - r=gps
--HG--
extra : rebase_source : 0c48c63be6f8e507c9d402fbb3308e91826a3913
2017-08-22 18:21:19 -07:00
Rok Garbas
f3a3affcf2 Bug 1284475 - migrate ToolTool blueprint to new codebase of relengapi r=KWierso
UPGRADE_NSS_RELEASE a=kaie
MozReview-Commit-ID: 7CB1VYb8OJP

--HG--
extra : rebase_source : 04751620add813cd1780898d109d9f7fa89d7b2d
2017-08-08 10:55:52 +02:00
Tooru Fujisawa
dbfd6caeb0 Bug 1390772 - Check the emptiness of the destination directory for clone. r=gps 2017-08-19 01:11:44 +09:00
Gregory Szorc
075f82ba4d Bug 1389417 - Disable problematic extensions when running hg update; r=ted
We correctly worked around problems for `hg pull` but not for
`hg update`. Make the workaround consistent.

MozReview-Commit-ID: 7A4dgANO0ip

--HG--
extra : rebase_source : fd4b90200ab3ce07a3921a02ae28f5a7a0c3d83c
2017-08-11 09:18:04 -07:00
Bill Gianopoulos
0c72dc997b Bug 1278341 - Move choices closer to prompt in mach bootstrap. r=nalexander 2017-08-06 08:15:50 -04:00
Carsten "Tomcat" Book
546b19363f Backed out changeset 514cf1f55c6f (bug 1380639) 2017-08-07 13:23:35 +02:00
Sebastian Kaspari
b05b8a9729 Bug 1380639 - Add contraint-layout and constraint-layer-solver dependencies. r=mcomella
MozReview-Commit-ID: AbZLlwdDHRV

--HG--
extra : rebase_source : d4538afeca26349512f8453db4782be2bce28ee0
2017-07-25 10:12:38 +02:00
Nick Alexander
883d82aa7d Bug 1255227 - Pre: Use {0} for Python 2.6. r=sebastian
Per https://stackoverflow.com/a/5447119, Python 2.6 doesn't support
anonymous fields (like {}).  This patch uses {0} instead.

MozReview-Commit-ID: 1VgppEkFn0W

--HG--
extra : rebase_source : 80cc860338132c28a22ca0a6c405484feec91136
2017-07-25 14:46:53 -07:00
Mike Hommey
35154eed27 Bug 1382571 - Change install_tooltool_clang_package to use mach artifact toolchain --from-build. r=gps
--HG--
extra : rebase_source : a86c52972503ccf78ad78dec2ce341efe13e23b4
2017-07-26 14:36:07 +09:00
Nick Alexander
c519abed2e Bug 1384202 - Add --no-interactive bootstrap support for Android SDK and NDK. r=rillian
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
2017-07-19 15:29:11 -07:00
Nick Alexander
23992bf0ff Bug 1384202 - Pre: Make mozboot/android.py an executable script. r=rillian
This looks ahead to using |mach bootstrap| when building docker
images.

MozReview-Commit-ID: LoMU7ji5T0x

--HG--
extra : rebase_source : 2885195855497d69b1cbba02a943964dd3286b93
2017-07-18 15:47:04 -07:00
Nick Alexander
9d67ae5102 Bug 1384199 - Fix path issue in Android bootstrap. r=rillian
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
2017-07-19 15:24:47 -07:00
Nick Alexander
8c1bf58d5d Bug 1384199 - Pre: Remove unused messages and print statements. r=rillian
MozReview-Commit-ID: 5w7xwj7MvE4

--HG--
extra : rebase_source : 2ef57bc4067be3932051ded4de0f7308f6443b20
2017-07-19 15:21:20 -07:00
Ralph Giles
06bcb45952 Bug 1382743 - mozboot: Update rust to 1.19.0. r=mshal
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
2017-07-21 15:36:26 -07:00
Nick Alexander
a66ad814f1 Bug 1344244 - Post: Allow --application-choice to |mach bootstrap|. r=glandium
MozReview-Commit-ID: 496iK5iTEPX

--HG--
extra : rebase_source : 108fdd931b4b0d0b69e00ac9e14a1b22c4891605
2017-07-05 13:25:04 -07:00
Nick Alexander
c3efb6fe79 Bug 1344244 - Part 4: Homebrew includes |brew cask| directly now. r=glandium
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
2017-07-05 17:05:25 -07:00
Nick Alexander
0f67ddbc23 Bug 1344244 - Part 3: Use sdkmanager rather than android. r=glandium
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
2017-07-05 16:49:09 -07:00
Nick Alexander
6dfa75bd3c Bug 1344244 - Part 2: Merge similar code into android.py. r=glandium
This refactoring unifies similar code that has been copy-pasted and
subsequently diverged.

MozReview-Commit-ID: EuVQBR4gsDo

--HG--
extra : rebase_source : bda66ef9001a1cddf75417aaeebd9dcecd05a6b7
2017-07-05 14:02:58 -07:00
Nick Alexander
09453dbd32 Bug 1344244 - Pre: Support mobile/android in bootstrap on CentOS. r=glandium
This works in a centos:7 docker image.

MozReview-Commit-ID: LZEgSho7xb

--HG--
extra : rebase_source : 8ff3c464ac748e7f9615f5e7c1ede629be12fd8f
2017-07-05 15:06:46 -07:00
Nathan Froyd
b9d0fc14d2 Bug 1310852 - part 4 - always download packages for stylo during mach bootstrap; r=rillian
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.
2017-06-21 16:36:03 -04:00
Nathan Froyd
3ee2268fa7 Bug 1310852 - part 3 - don't install clang packages through tooltool for OS X mach bootstrap; r=rillian
We decided to install the necessary packages through the appropriate Mac
package manager instead.
2017-06-22 15:36:55 -04:00
Nathan Froyd
119b2cf01e Bug 1310852 - part 1 - install llvm homebrew/macports packages; r=rillian
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.
2017-06-30 15:05:52 -04:00
Nathan Froyd
eafe4905bb Bug 1376392 - do a more thorough check for git checkouts of mozilla-central in bootstrap; r=rillian
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.
2017-06-29 19:26:23 -04:00
Ralph Giles
ea1e9c1f12 Bug 1376940 - mozboot: Update rustup to 1.5.0. r=froydnj
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
2017-06-28 14:23:48 -07:00
Jan Beich
095deaf886 Bug 1375198 - FreeBSD bootstrap: drop explicit dependency on libGL. r=rillian
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
2017-06-21 18:45:14 +00:00
Ralph Giles
0608e0eb00 Bug 1371366 - mozboot: Install rust 1.18.0. r=froydnj
This version offers a 15-20% improvement to compilation
speed, so we will likely require it for developers soon.

Begin installing it now to reduce the frequence of double
migrations.

MozReview-Commit-ID: JZRssgOjkF7

--HG--
extra : rebase_source : 7d2ef10315c570e21d609f713391be3e82a88383
2017-06-07 14:57:55 -07:00
Nathan Froyd
c2cc55b60e Bug 1368655 - only download Stylo packages if the user wanted Stylo; r=rillian
DONTBUILD because NPOTB
2017-06-01 19:15:03 -04:00
Nathan Froyd
d76955c52a Bug 1368099 - part 2- quote suggested Stylo paths on Windows; r=rillian
We install the tooltool packages to ${HOME}/.mozbuild by default, and
${HOME} may have spaces on Windows.  The arguments to the command-line
options need to be quoted appropriately.

DONTBUILD because NPOTB
2017-05-26 22:36:35 -04:00
Nathan Froyd
17c85c1c0d Bug 1368099 - part 1 - provide the correct --with-libclang-path suggestions; r=rillian
libclang.dll lives in the bin/ directory, not the lib/ directory.
2017-05-26 22:36:35 -04:00
Nathan Froyd
3be5437549 Bug 1364588 - part 5 - pass the checkout_root down to stylo package installation; r=rillian
This change ensures that when we're running bootstrap in standalone
mode, we find the correct mach to invoke.

DONTBUILD because NPOTB
2017-05-26 16:07:01 -04:00
Nathan Froyd
05acc3e2cb Bug 1364588 - part 4 - compute the firefox checkout root; r=rillian
We'll need this information to be able to locate mach later, since we
can't assume that mach is just several directories above the script
we're currently running.
2017-05-26 16:07:01 -04:00
Nathan Froyd
9c82ef3194 Bug 1364588 - part 3 - check for a clone before installing Stylo packages; r=rillian
If we're running bootstrap from inside a mozilla-central checkout, we'll
have all the necessary files that we need to install tooltool packages
via `mach artifact toolchain`.  If we're running bootstrap from a
downloaded bootstrap.py, however, it's possible that we failed to clone
the repository.  We need to account for that situation and provide
instructions on how to deal with it.

A consequence of these two mechanisms for bootstrap is that we'll have
to make sure we're invoking `mach artifact toolchain` correctly in both
cases, which we'll handle in subsequent commits.
2017-05-26 16:07:01 -04:00
Nathan Froyd
698311c61c Bug 1364588 - part 2 - move Stylo package installation; r=rillian
Now that we're installing Stylo packages through `mach`, we need to have
`mach` available, which is only true after we've checked for a clone of
the tree.  We move the block performing the installation in this commit
and then fixup resulting problems in future commits.
2017-05-26 16:07:01 -04:00
Nathan Froyd
234629de6e Bug 1364588 - part 1 - use `mach artifact toolchain' to download clang Stylo packages; r=rillian
Using this command is more robust than our current method, and brings
several benefits, such as smart caching of the downloaded toolchain.  We
change the clang package downloaded for Windows with this change, but
bindgen has been updated to work well with LLVM 5.0, so there should be
no problems.
2017-05-26 16:07:01 -04:00
Xidorn Quan
0214189457 Bug 1366542 - Bump required version of Rust to 1.17.0. r=mshal
MozReview-Commit-ID: Bgz6etF2vR2

--HG--
extra : rebase_source : 5ed97670f6144181bbeaceae0cbebd64ca920212
2017-05-21 11:48:33 +10:00
Gregory Szorc
e5c00fdd77 Bug 1364511 - Upgrade Mercurial during mach bootstrap on MozillaBuild; r=RyanVM
The base bootstrap class has code to conditionally upgrade Mercurial
depending on its version. It is kinda broken. This commit overrides
that code in the MozillaBuild bootstrapper to always run `pip`, which
will ensure the latest stable Mercurial release is installed.

MozReview-Commit-ID: 2O1Ff7dAp4o

--HG--
extra : rebase_source : 98cba0abbebf13e8fe93673d5b46eb16e6a3c147
2017-05-12 15:04:28 -07:00
Gregory Szorc
997dcaa50f Bug 1364635 - Don't offer to configure Mercurial if running from a Git checkout; r=Ehsan
Previously, `mach bootstrap` would unconditionally prompt to help
configure Mercurial in most scenarios. I agree with Ehsan's observation
in a mailing list post that this behavior doesn't make sense when
running from a Git checkout, as the user probably doesn't care about
Mercurial if they are using Git.

This change doesn't completely ignore Mercurial for Git users. For
example, we still unconditionally run code that verifies that Mercurial
is installed and reasonably up to date. Changing this would be a bit
of work. But even if we wanted to change it, git-cinnabar users
would benefit from having a modern Mercurial installed. So it isn't
straightforward for Git users to ignore Mercurial completely.

MozReview-Commit-ID: 8ncHRgCsjz

--HG--
extra : rebase_source : 7945e3bf3d5283105bac517885f794fc5d7bba6d
2017-05-12 19:44:03 -07:00
Jan Beich
476caecbe9 Bug 1363686 - Pull LLVM 4.0 for ./mach bootstrap for Stylo on FreeBSD. r=rillian
MozReview-Commit-ID: 9jCdPLsRaQ4

--HG--
extra : rebase_source : e3bab6ddeccac2d1c01d2ca3dd88880684493329
2017-05-10 11:05:44 +00:00
Ralph Giles
e9fb64de96 Bug 1363110 - mozboot: update clang package hash. r=froydnj
Fixes a 403 error running `./mach bootstrap` with stylo enabled.

Bug 1359968 updated the tooltool manifests to point to a
publicly-available clang package. Update the macOS hash
used by mozboot to install the same package for local
use by developers who need rust-bindgen.

MozReview-Commit-ID: FtkATaLwc7n

--HG--
extra : rebase_source : 61390c729e694589b0351026aac0263440a9a3c5
2017-05-08 11:53:35 -07:00
Chris Peterson
44c4d43ecf Bug 1362828 - mozboot: Fix clang package download message. r=froydnj
The Python print() function's does not take a format string, so the extraneous %s here inadvertently prints "Downloading clang package from %s https://..." instead of "Downloading clang package from https://...".

MozReview-Commit-ID: 5Is5TK3X34e

--HG--
extra : rebase_source : 02e625fbdaab536d1a787c33edd6dfda9c1039c6
2017-05-07 00:54:14 -07:00
Jan Beich
6c24868ec4 Bug 1360781 - Add Stylo dependencies for ./mach bootstrap on FreeBSD. r=froydnj
MozReview-Commit-ID: 3cD8frPKXnW

--HG--
extra : rebase_source : a2172145af1aec80eb6a67a0a9bd06ab0ec22130
2017-04-29 02:04:02 +00:00
Nathan Froyd
5635c7bffe Bug 1314355 - part 2 - download LLVM packages from mach bootstrap for Stylo development; r=rillian
For Stylo development, LLVM packages are required due to Stylo's
extensive use of bindgen--generating Rust bindings to Gecko's C++ code.
While people can install LLVM via their system package manager, we've
opted to download the LLVM packages used on Mozilla infrastructure for
building Gecko.  Using Mozilla's packages for LLVM ensures that they
work, and also makes it easier/trivial to integrate support for other
things (e.g. Mozilla's static checkers) into `mach bootstrap`.
2017-05-02 11:23:40 -04:00
Nathan Froyd
be73c54413 Bug 1314355 - part 1 - add ability to use a generic digest algorithm for http_download_and_save; r=rillian
This will be useful for downloading files from tooltool, which requires
a SHA512 checksum.
2017-05-02 11:23:40 -04:00
Luis de Bethencourt
48d0873809 Bug 1140088 - Update git URL to github; r=froydnj
git.mozilla.org has been decommissioned.

DONTBUILD because comment-only fixes are safe.
2017-04-25 14:46:52 +01:00
Utkarsh Anand
ecd3979b25 Bug 1353460 Asked the user to restart the shell before building from source. r=rillian
When downloading rust manually, it's mandatory to restart the shell,
as the script does not export the PATH environment variable.
This fix also ensures that the rust version in PATH is modern enough for a successful build.

MozReview-Commit-ID: HdLpiLPBLW7

--HG--
extra : rebase_source : dc087c36e89fd6d2957fd1e03af42229de914d5a
2017-04-06 08:27:57 +05:30
Arshad Khan
47d2c3993b Bug 906177 - Added distro support for Elementary OS Luna;r=gps
MozReview-Commit-ID: FtHmXIFtzIz

--HG--
extra : rebase_source : 1d37d38f7635cbe6c1d30669240a613b52a62ed2
2017-03-23 16:39:40 +05:30
suman gupta
0539e340b8 Bug 1346284 Updated ndk r11c to be installed by mach bootstrap; r=nalexander
MozReview-Commit-ID: KgM9ecZR0fB

--HG--
extra : rebase_source : 9dd666e1fc12d455b4e0c58b5af17d5bd7f35930
2017-03-13 23:47:23 +05:30
Jan Beich
5e185e524c Bug 1320940 - rustup is N/A on Tier3 platforms, so prefer downstream Rust packages. r=rillian
MozReview-Commit-ID: NsRGdweHuF

--HG--
extra : rebase_source : 1cdc69999b5047b8e03bc12006b9fb8d09cfaa20
2016-11-29 14:27:46 +00:00
KuoE0
2fb7487fe1 Bug 1340379 - Remove hardcoded Homebrew URL of autoconf 2.13 for macOS. r=nalexander
MozReview-Commit-ID: 2QRkVCOFTUL

--HG--
extra : rebase_source : 0544def007eeb6ec1ada1cbd0a58aa297bc5b711
2017-02-17 11:14:29 +08:00
Ralph Giles
e44edf88cc Bug 1339409 - mozboot: Fix undefined FileNotFoundError. r=froydnj
The FileNotFoundError built-in exception is only present in
python 3. Emulate its behaviour in python 2 with a conditional
OSError.

MozReview-Commit-ID: 4b8THPG7jph

--HG--
extra : rebase_source : 718bf3659f14bd349d052d43bf3197dfbb4a016f
2017-02-14 11:41:04 -08:00
Ralph Giles
d9052fefa0 Bug 1337153 - Require rust 1.15.1. r=Ehsan
Bump the minimum version of the rust toolchain we require to
build. The 1.15 release includes support for custom #[derive]
directives, letting us use the serde serialization crate without
checking in a lot of generated code.

This is primarily motivated by webrender and the audio remoting
work, and lets us drop the heavy syntex dependency.

MozReview-Commit-ID: 6IObHhouPAn

--HG--
extra : rebase_source : 4be8b148fb653a48f6df4309811ab1d8755f7edf
2017-02-09 09:38:48 -08:00
Ralph Giles
5f0a2f9de1 Bug 1324435 - mozboot: ensure win32 rust support. r=ted
If we have rustup installed, use it to check the available
target platforms and install 32-bit windows support if we're
on the (default 64-bit) windows platform.

This catches systems where the mozillabuild bootstrapper was
run before it installed this, so rustup is available, but the
i686 target library isn't.

MozReview-Commit-ID: 9bE2OQnmvxs

--HG--
extra : rebase_source : 0915fef85755718c5524b13b6b7d0d8b6dbe05b4
2017-01-11 11:30:47 -08:00
Ralph Giles
d8025db2ea Bug 1324435 - mozboot: Install rust i686-msvc target. r=ted
Windows devs often want to target 32-bit windows. Make this
easier by installing the target for them at mozboot time.

MozReview-Commit-ID: 6gFbFBOqMz8

--HG--
extra : rebase_source : 12933c6cb7895cef859c9022efa87c62f321219e
2017-01-11 10:19:28 -08:00
Ralph Giles
0ef4e5a4a9 Bug 1332722 - mozboot: Use msys path for cargo_bin. r=gps
We need to mangle the path for both parts of the text printed
but rust_path_advice on windows. Otherwise the report of where
the rust binary was found ends up a mixed pathname even when
the suggested shell command is correct.

MozReview-Commit-ID: FDtP5HY8tJ1

--HG--
extra : rebase_source : ad3671be04751ece8966fa19267239b9f1614551
2017-01-20 11:55:05 -08:00
Ralph Giles
1ffc29a50a Bug 1332722 - mozboot: Improve prompt formatting. r=gps
Adjust newlines so prompt and result information is easier to read.

MozReview-Commit-ID: BbJldqZ6G4

--HG--
extra : rebase_source : 50781f672c452e97c47d4ae07aa7f8b67a96ec50
2017-01-18 09:24:52 -08:00
dinartejesus
92cca75491 Bug 1329398 - Update autoconf@2.13 repository url since homebrew-version was deprecated. r=arai, gps
--HG--
extra : amend_source : 174805e5a590d06bf7e96fb102ce66890a52e705
2017-01-07 12:11:09 +01:00
Ralph Giles
a3737f4e6a Bug 1328940 - mozboot: Install hardened cc for python. r=froydnj
Work around missing redhat-hardened-cc1 when building psutil_linux
on Fedora by installing the redhat-rpm-config package.

This fixed build warnings with several mach commands, and errors
with others like `./mach mochitest` and `./mach install` for fennec
builds.

MozReview-Commit-ID: G9jn4abUEtp

--HG--
extra : rebase_source : 98337b820fff52e2efd2368e89f7ff488b36f1ff
2017-01-05 10:47:44 -08:00
Sylvestre Ledru
c08a6438f1 Bug 1292649 - Use default-jdk instead of an explicit version of the jdk r=nalexander
Should be pretty safe as Java compa is usually very good.
This will fix the issue on Debian testing not having openjdk-7-jdk and
current Debian stable having it.
(same with Ubuntu)

MozReview-Commit-ID: Alxg4K4PwQ4

--HG--
extra : rebase_source : 920cdb1618ba587a4776e33ef7857415a59c53b9
2016-12-29 19:44:57 +01:00
Jonathan Watt
5c31ea5e34 Bug 1325787 - Fix MozillaBuild so profile-rustup.sh doesn't break Windows users who have aliased 'cd'. r=gps 2016-12-24 20:02:23 +00:00
Ralph Giles
afb3ed504c Bug 1324473 - mozboot: Normalize windows path advice. r=gps
On windows, python generally returns windows-style paths,
with drive letters and backslash for a separator. However,
when we offer advice for updating the PATH variable, we're
talking about the msys environment which uses unix-style
paths. Convert to avoid confusion.

This is intended to turn c:\Users\mozilla\ into /c/Users/mozilla/.

MozReview-Commit-ID: FdB8FvjeCV1

--HG--
extra : rebase_source : 6d9e87b460417254bbe2eb5af3813e22f2126fb1
2016-12-22 15:45:52 -08:00
Ralph Giles
a46f0d51d7 Bug 1325272 - mozboot: Install python-dbus on fedora. r=froydnj
This provides build-completion notification from mach.

We already do this on debian-based distros.

MozReview-Commit-ID: Jl3OWa9MpZ6

--HG--
extra : rebase_source : e97c02d2924f888b33593ad5209cedaccceba633
2016-12-19 16:31:46 -08:00
Ralph Giles
05bd510ee5 Bug 1325474 - mozboot: install rustup 1.0.0. r=froydnj
Update the version number and checksums of the rustup
installer we download to 1.0.0. This had a first stable
release alongside rust 1.15.

This is the result of running `python mozboot/rust.py --update`
and applying the resulting output.

MozReview-Commit-ID: 1gzMLHZuhNx

--HG--
extra : rebase_source : b9d0f95f17e76a32e17e82d05505cf07a21c5e66
2016-12-22 13:39:25 -08:00
Ralph Giles
57bf0dc91d Bug 1324040 - mozboot: Download rustup without SNI. r=froydnj
It seems older Python (e.g. 2.7 from Ubuntu 14.04) doesn't
support SNI, so we get a TLS error with the canonical
https://static.rust-lang.org/ url even when using the
`requests` module.

Fall back to the no-CNAME host instead which is ugly but works.

Thanks to Simon Sapin for the suggestion.

MozReview-Commit-ID: I6V5ASijuKi

--HG--
extra : rebase_source : 2e2a449fbb3011b51207f1c6baa3d288d0dc774c
2016-12-16 10:21:35 -08:00
Ralph Giles
fc8803bb33 Bug 1321292 - mozboot: Don't suggest non-existent .cargo.env. r=gps
On Windows, the rustup installer doesn't create ~/.cargo/env
but instead pokes .cargo/bin into the path in the Windows
registry. This doesn't necessarily propagate to the msys
evironment however, so some PATH manipulation may still
be necessary.

Split our path advice to be clear in both the new install
and unconfigured path cases, and amend our path update
advice to not mention .cargo/env if it isn't present.

MozReview-Commit-ID: 9IHhS6UYCqq

--HG--
extra : rebase_source : 898615106078882f335385ac0b50eff1612377f0
2016-12-05 20:53:00 -08:00
Ralph Giles
477a29bf9f Bug 1320596 - mozboot: Handle old rustc but not rustup. r=gps
Always report if we found an out-of-date rustc.

This is better when an older rustc is installed, but not rustup,
and it's shadowing the version we install in $CARGO_HOME.

MozReview-Commit-ID: 43io6uISMNI

--HG--
extra : rebase_source : f02e36e0c0c0e5380b3f511852b29a77622165c5
2016-11-28 16:43:22 -08:00
Ralph Giles
a394c35724 Bug 1320397 - mozboot: Install dbus-glib on Fedora. r=gps
This is needed on Fedora as well as CentOS, at least on Fedora 25
where it's evidently not part of the "GNOME Software Development"
group.

MozReview-Commit-ID: KMW8FUsvJcv

--HG--
extra : rebase_source : 07acb80148409cc1d2918900a56e5d0210c157e1
2016-11-25 15:35:12 -08:00
Ralph Giles
02c6a95b45 Bug 1319860 - mozboot: Prompt to add rust to PATH after install. r=nalexander
We were checking for success installing rust with the same code
we checked for upgrade success, but in the case of a clean install
this will likely fail because the binaries installed by rustup
won't be in path. Instead, print the help message about adding
them after installation completes.

MozReview-Commit-ID: xa5PKIDKzZ
2016-11-25 14:09:38 -08:00
Ralph Giles
5885ed4e11 Bug 1286799 - mozboot: Fix rust detection on windows. r=gps
WindowsBootstrapper overrides BaseBootstrapper.which() to append
the Windows 'exe' filename extension, so which() finds rustc.exe
and rustup.exe properly. However, our other code which constructs
the program name in _parse_version or looks for the files in
CARGO_HOME didn't take this into account, making the script think
it couldn't find rust.

Don't use os.path.join to construct urls, since on windows this
inserts the backslash '\' path separator instead of the normal
forward slash.

MozReview-Commit-ID: HWJjwCDHuNK

--HG--
extra : rebase_source : c9a295a22c06dcbfa60637ff6d56d6f1ca269e83
2016-11-21 11:18:59 -08:00
Ralph Giles
067cedbf09 Bug 1286799 - mozboot: Use requests to download rustup manifest. r=gps
Python urllib2 doesn't validate https origins in all versions.
During actual bootstrap the static hash values act as an out-of-bound
validatation channel.

However, that doesn't help when doing the initial download and hash
generation when invoked as `python rust.py [--update]`. Fortunately
we don't expect to be called this way in standalone mode, so we can
use the in-tree requests module to fetch things properly.

MozReview-Commit-ID: KZTtIXDfWTB

--HG--
extra : rebase_source : 14c505797a74de16a7e9bec1f791c0b4659d2932
2016-11-18 13:02:25 -08:00
Ralph Giles
430aad83b5 Bug 1286799 - mozboot: Unbuffer stdout. r=gps
Reopen sys.stdout in unbuffered mode so we can correctly print
'Checking foo... Result' in two parts without calling sys.stdout.flush()
everywhere.

Although we import print_function from the future, the python 2 version
does not support the python 3 flush=True argument.

MozReview-Commit-ID: SjliWeoSa3

--HG--
extra : rebase_source : e16905ac4045e80060d6f248cae0ec731dd0d1c5
2016-11-17 15:21:39 -08:00
Ralph Giles
1116fe76e9 Bug 1286799 - mozboot: Add a script to fetch rust installer hashes. r=gps
Make the mozboot.rust module invokable as a utility. E.g.

  python rust.py --update

When called with the --update option it downloads and generates
checksums for the latest version of the installer on supported
platforms, suitable for updating the values coded in the script.

When invoked without the --update option, it verifies the
current version and checksums against the server.

MozReview-Commit-ID: 2NVFf0ptvbM

--HG--
extra : rebase_source : 5e8b650a9b3c6e1d2b8bfdc90d02faa194f1aa04
2016-11-17 14:23:41 -08:00
Ralph Giles
f9bab2207d Bug 1286799 - mozboot: Install or upgrade rust. r=gps
Download and run a known-good rustup-init installer for the host
system. Once installed, use it to upgrade the latest toolchain.

NB: I expect the MozillaBuildBootstrapper to run its installer
first, but this will take care of Mac, Linux, and FreeBSD.

MozReview-Commit-ID: BKDm1UcLxQS

--HG--
extra : rebase_source : 4e4489d55ad658166a7e4b20c53185532c041204
2016-11-17 12:06:29 -08:00
Ralph Giles
c9139105f6 Bug 1286799 - mozboot: Ensure an up-to-date rust toolchain. r=gps
Add a check to `mach bootstrap` that a compatible version of
the rust toolchain is installed and in path. Note that we use
a separate minimum version from the one checked at configure
time, defined in build/moz.configure/rust.configure, because
this script may be running stand-alone.

If we don't find `rustc` in PATH, we check for it in CARGO_HOME
and suggest adding that to PATH.

If we don't find `rustc` but find a `rustup`, we call it with
the --version switch and report if that fails. This will detect
the older `rustup.rs` script.

MozReview-Commit-ID: EPfQhLz4Dvo

--HG--
extra : rebase_source : 2ea4acdfbfdc2a436f386eae7bc3cbcbc485aa1b
2016-11-16 09:27:32 -08:00
Ralph Giles
37961988e7 Bug 1286799 - mozboot: Use a helper for mercurial version detection. r=gps
Also use the abstracted helper method for reading the current
mercurial version too. This changes the regex from what was in
use before, but should work for normal version numbers.

MozReview-Commit-ID: IZfC65Jg6T8

--HG--
extra : rebase_source : d61a73b7b1b438d8c846523e5e1f639950fe5473
2016-11-15 17:18:21 -08:00
Ralph Giles
9416a38fd9 Bug 1286799 - mozboot: Abstract version checking. r=gps
Move version parsing to a helper method so it can be used
for more than one executable.

MozReview-Commit-ID: 4gOgdgYFbFx

--HG--
extra : rebase_source : 944f562c0d5a6a105a0c27af6f4d7dfc214f3c01
2016-11-15 14:31:59 -08:00
Chris Manchester
0723aadf51 Bug 1313379 - Fix mach bootstrap for Windows desktop artifact mode. r=gps
MozReview-Commit-ID: JqQ52K89q3H

--HG--
extra : rebase_source : b0580f19d8d53d4cf14f0016f7ecda8adeca2a66
2016-10-28 21:45:43 -07:00
Leo Schwarz
33768e74f6 Bug 1312290 - Force package extension when building AUR packages on Arch Linux. r=gps
Previously if an Arch Linux user had a different package extension configured
in `/etc/makepkg.conf` building AUR packages during bootstrap would fail.
Forcing the extension by providing it as an environment variable makes sure
building doesn't fail regarding of a user's configuration.

MozReview-Commit-ID: 4aryYS0XVr7

--HG--
extra : rebase_source : 4c466e49f729de625e814a92325c6d38e6d1e0b4
2016-10-25 10:28:59 +02:00