summaryrefslogtreecommitdiffstats
path: root/python/mozboot
diff options
context:
space:
mode:
Diffstat (limited to 'python/mozboot')
-rwxr-xr-xpython/mozboot/bin/bootstrap.py9
-rw-r--r--python/mozboot/mozboot/android.py56
-rw-r--r--python/mozboot/mozboot/debian.py14
-rw-r--r--python/mozboot/mozboot/util.py2
4 files changed, 43 insertions, 38 deletions
diff --git a/python/mozboot/bin/bootstrap.py b/python/mozboot/bin/bootstrap.py
index 8009219c1d..9752705019 100755
--- a/python/mozboot/bin/bootstrap.py
+++ b/python/mozboot/bin/bootstrap.py
@@ -204,6 +204,8 @@ def git_clone_firefox(git: Path, dest: Path, watchman: Path, head_repo, head_rev
subprocess.check_call(
[
str(git),
+ "-c",
+ "fetch.prune=true",
"clone",
"--no-checkout",
"hg::https://hg.mozilla.org/mozilla-unified",
@@ -226,7 +228,12 @@ def git_clone_firefox(git: Path, dest: Path, watchman: Path, head_repo, head_rev
)
subprocess.check_call(
- [str(git), "checkout", "FETCH_HEAD" if head_rev else "bookmarks/central"],
+ [
+ str(git),
+ "checkout",
+ "FETCH_HEAD" if head_rev else "bookmarks/central",
+ "--",
+ ],
cwd=str(dest),
env=env,
)
diff --git a/python/mozboot/mozboot/android.py b/python/mozboot/mozboot/android.py
index 116c5ff1ba..5c71339fa3 100644
--- a/python/mozboot/mozboot/android.py
+++ b/python/mozboot/mozboot/android.py
@@ -20,11 +20,11 @@ from tqdm import tqdm
# variable.
from mozboot.bootstrap import MOZCONFIG_SUGGESTION_TEMPLATE
-NDK_VERSION = "r25c"
-CMDLINE_TOOLS_VERSION_STRING = "11.0"
-CMDLINE_TOOLS_VERSION = "9644228"
+NDK_VERSION = "r26c"
+CMDLINE_TOOLS_VERSION_STRING = "12.0"
+CMDLINE_TOOLS_VERSION = "11076708"
-BUNDLETOOL_VERSION = "1.15.2"
+BUNDLETOOL_VERSION = "1.15.6"
# We expect the emulator AVD definitions to be platform agnostic
LINUX_X86_64_ANDROID_AVD = "linux64-android-avd-x86_64-repack"
@@ -42,8 +42,8 @@ AVD_MANIFEST_ARM = Path(__file__).resolve().parent / "android-avds/arm.json"
AVD_MANIFEST_ARM64 = Path(__file__).resolve().parent / "android-avds/arm64.json"
JAVA_VERSION_MAJOR = "17"
-JAVA_VERSION_MINOR = "0.9"
-JAVA_VERSION_PATCH = "9"
+JAVA_VERSION_MINOR = "0.10"
+JAVA_VERSION_PATCH = "7"
ANDROID_NDK_EXISTS = """
Looks like you have the correct version of the Android NDK installed at:
@@ -824,41 +824,25 @@ def ensure_java(os_name, os_arch):
if not java_path.exists():
# e.g. https://github.com/adoptium/temurin17-binaries/releases/
- # download/jdk-17.0.9%2B9/OpenJDK17U-jre_x64_linux_hotspot_17.0.9_9.tar.gz
- if os_name != "windows":
- java_url = (
- "https://github.com/adoptium/temurin{major}-binaries/releases/"
- "download/jdk-{major}.{minor}%2B{patch}/"
- "OpenJDK{major}U-jdk_{arch}_{os}_hotspot_{major}.{minor}_{patch}.{ext}"
- ).format(
- major=JAVA_VERSION_MAJOR,
- minor=JAVA_VERSION_MINOR,
- patch=JAVA_VERSION_PATCH,
- os=os_tag,
- arch=arch,
- ext=ext,
- )
- # Hack the URL for Windows due missed binary uploads for the original
- # JDK 17.0.9 release. See bug 1870252.
- else:
- java_url = (
- "https://github.com/adoptium/temurin{major}-binaries/releases/"
- "download/jdk-{major}.{minor}%2B{patch}.1/"
- "OpenJDK{major}U-jdk_{arch}_{os}_hotspot_{major}.{minor}_{patch}.{ext}"
- ).format(
- major=JAVA_VERSION_MAJOR,
- minor=JAVA_VERSION_MINOR,
- patch=JAVA_VERSION_PATCH,
- os=os_tag,
- arch=arch,
- ext=ext,
- )
+ # download/jdk-17.0.10%2B7/OpenJDK17U-jre_x64_linux_hotspot_17.0.10_7.tar.gz
+ java_url = (
+ "https://github.com/adoptium/temurin{major}-binaries/releases/"
+ "download/jdk-{major}.{minor}%2B{patch}/"
+ "OpenJDK{major}U-jdk_{arch}_{os}_hotspot_{major}.{minor}_{patch}.{ext}"
+ ).format(
+ major=JAVA_VERSION_MAJOR,
+ minor=JAVA_VERSION_MINOR,
+ patch=JAVA_VERSION_PATCH,
+ os=os_tag,
+ arch=arch,
+ ext=ext,
+ )
install_mobile_android_sdk_or_ndk(java_url, mozbuild_path / "jdk")
return java_path
def java_bin_path(os_name, toolchain_path: Path):
- # Like jdk-17.0.9+9
+ # Like jdk-17.0.10+7
jdk_folder = "jdk-{major}.{minor}+{patch}".format(
major=JAVA_VERSION_MAJOR, minor=JAVA_VERSION_MINOR, patch=JAVA_VERSION_PATCH
)
diff --git a/python/mozboot/mozboot/debian.py b/python/mozboot/mozboot/debian.py
index 63b47a2f03..9553800bf7 100644
--- a/python/mozboot/mozboot/debian.py
+++ b/python/mozboot/mozboot/debian.py
@@ -2,6 +2,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+import subprocess
import sys
from mozboot.base import MERCURIAL_INSTALL_PROMPT, BaseBootstrapper
@@ -60,7 +61,20 @@ class DebianBootstrapper(LinuxBootstrapper, BaseBootstrapper):
assert res == 1
self.run_as_root(["pip3", "install", "--upgrade", "Mercurial"])
+ def _check_packages_installed(self, *packages):
+ command = ["dpkg-query", "-W"]
+ command.extend(packages)
+ return (
+ subprocess.run(
+ command, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL
+ ).returncode
+ == 0
+ )
+
def apt_install(self, *packages):
+ if self._check_packages_installed(*packages):
+ # Packages already installed
+ return
command = ["apt-get", "install"]
if self.no_interactive:
command.append("-y")
diff --git a/python/mozboot/mozboot/util.py b/python/mozboot/mozboot/util.py
index 47c35e670f..2d26ffb934 100644
--- a/python/mozboot/mozboot/util.py
+++ b/python/mozboot/mozboot/util.py
@@ -11,7 +11,7 @@ import certifi
from mach.site import PythonVirtualenv
from mach.util import get_state_dir
-MINIMUM_RUST_VERSION = "1.70.0"
+MINIMUM_RUST_VERSION = "1.74.0"
def get_tools_dir(srcdir=False):