diff options
author | Dudemanguy | 2024-05-15 14:56:28 -0500 |
---|---|---|
committer | Dudemanguy | 2024-05-15 14:59:01 -0500 |
commit | 24a6ea8ac216b6e63c6d8dfbfed967236bbf75a2 (patch) | |
tree | 872f1023553cde330fe9aab35ab4b99c65c9eb43 | |
parent | 2c0c95dc139bc90016d80cd6e93c0c94c0bd46c0 (diff) | |
download | aur-24a6ea8ac216b6e63c6d8dfbfed967236bbf75a2.tar.gz |
115.11.0-2
Fix build with rust and distutils.
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | 18d19413472f.patch | 135 | ||||
-rw-r--r-- | 6af7194e2778.patch | 157 | ||||
-rw-r--r-- | PKGBUILD | 19 | ||||
-rw-r--r-- | b1cc62489fae.patch | 76 |
5 files changed, 392 insertions, 5 deletions
@@ -1,7 +1,7 @@ pkgbase = firefox-esr pkgdesc = Standalone web browser from mozilla.org, Extended Support Release pkgver = 115.11.0 - pkgrel = 1 + pkgrel = 2 url = https://www.mozilla.org/en-US/firefox/enterprise/ arch = x86_64 license = MPL @@ -16,7 +16,7 @@ pkgbase = firefox-esr makedepends = inetutils makedepends = xorg-server-xvfb makedepends = autoconf2.13 - makedepends = rust + makedepends = rustup makedepends = clang makedepends = llvm makedepends = jack @@ -149,6 +149,9 @@ pkgbase = firefox-esr source = https://archive.mozilla.org/pub/firefox/releases/115.11.0esr/source/firefox-115.11.0esr.source.tar.xz.asc source = firefox-esr.desktop source = identity-icons-brand.svg + source = 18d19413472f.patch + source = 6af7194e2778.patch + source = b1cc62489fae.patch source = firefox-esr-i18n-115.11.0-ach.xpi::https://archive.mozilla.org/pub/mozilla.org/firefox/releases/115.11.0esr/linux-x86_64/xpi/ach.xpi source = firefox-esr-i18n-115.11.0-af.xpi::https://archive.mozilla.org/pub/mozilla.org/firefox/releases/115.11.0esr/linux-x86_64/xpi/af.xpi source = firefox-esr-i18n-115.11.0-an.xpi::https://archive.mozilla.org/pub/mozilla.org/firefox/releases/115.11.0esr/linux-x86_64/xpi/an.xpi @@ -250,6 +253,9 @@ pkgbase = firefox-esr sha512sums = SKIP sha512sums = 4b53ee133a4ecaf068e240f6a05a1ebf4b788d67fe9141cc5b3561e1128907c8c3edb49bf2b24ba89daf1552f94ac48adf682dbe7dd070cffe7f78d98f2b3338 sha512sums = b579b73176c72a5ecf36e3f63bba08fdb8041ae99d54e5cab906660fed6a9cf2311f7ca1ec1649e451cc6d5a4b1e6060b974b1d7befe9c8df3c5a89c50383c17 + sha512sums = 0078598c69c232ff4ea7b4d9fec8e438b5d748b8ece993894859d90d3d4c179814a4f1e6fdcd7f709ca5e2273602001b2a03cccfbb105e7c8b401e1768c9efd0 + sha512sums = 2f0871f46ec3c8e4b6aadf12c955ce85b2767f951b6a3e59ab01137ae318114d85012ed860ba3268257d9a1174ac5fa0b806d29f420ec75a7652eb3c69766b24 + sha512sums = e79af42d8118feca5b96a35b8d13aaf8fd88720fc425bc5476ee96854d420c7071949b3c752af8e30c3f154e2613aeb2785c2841ccade07b0fa2966d4b896029 sha512sums = 02bb5ff090eae756f5c6a88fa1958e278bd245e3c63cd7ca6203f1494d80d603316e45972098a19f1ae60ac5b9b609cfebbe629c9d2d7cd90739dcbe024f3178 sha512sums = 4698b724b44df392ae3318ad53e2b59dfea743db9a2e98c6c35237e2dd246bfd6275a6938edecb38b7bcae19789ddde37c4d3f2f2b2a39192b43bebd258aaf87 sha512sums = aa99343d32625e50cfb9494e494840bfc18d46391b8b43d004f2741bc9fe89dec45ea8d5d35fed4a21b6073608878a62b9fa0330418777a331922e7cb934c475 diff --git a/18d19413472f.patch b/18d19413472f.patch new file mode 100644 index 000000000000..d3537e10cdac --- /dev/null +++ b/18d19413472f.patch @@ -0,0 +1,135 @@ + +# HG changeset patch +# User James Graham <james@hoppipolla.co.uk> +# Date 1714409991 0 +# Node ID 18d19413472fa83236e4d6d0259ad3d9e7b72137 +# Parent ce0c34e548fa0a7299d1299ad04ffefda2fd908e +Bug 1893961 - Remove distutils use from mozbase, , ahal r=Sasha + +This has been removed from the stdlib in Python 3.12 + +Differential Revision: https://phabricator.services.mozilla.com/D208884 + +diff --git a/testing/mozbase/mozgeckoprofiler/mozgeckoprofiler/symbolication.py b/testing/mozbase/mozgeckoprofiler/mozgeckoprofiler/symbolication.py +--- a/testing/mozbase/mozgeckoprofiler/mozgeckoprofiler/symbolication.py ++++ b/testing/mozbase/mozgeckoprofiler/mozgeckoprofiler/symbolication.py +@@ -1,18 +1,18 @@ + # This Source Code Form is subject to the terms of the Mozilla Public + # 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 hashlib + import http.client + import os + import platform ++import shutil + import subprocess + import zipfile +-from distutils import spawn + + import six + from mozlog import get_proxy_logger + + from .symbolicationRequest import SymbolicationRequest + from .symFileManager import SymFileManager + + LOG = get_proxy_logger("profiler") +@@ -90,17 +90,17 @@ class OSXSymbolDumper: + result = process_file(arch) + if result is not None: + return result + return None + + + class LinuxSymbolDumper: + def __init__(self): +- self.nm = spawn.find_executable("nm") ++ self.nm = shutil.which("nm") + if not self.nm: + raise SymbolError("Could not find nm, necessary for symbol dumping") + + def store_symbols(self, lib_path, breakpad_id, output_filename_without_extension): + """ + Returns the filename at which the .sym file was created, or None if no + symbols were dumped. + """ +diff --git a/testing/mozbase/moznetwork/tests/test_moznetwork.py b/testing/mozbase/moznetwork/tests/test_moznetwork.py +--- a/testing/mozbase/moznetwork/tests/test_moznetwork.py ++++ b/testing/mozbase/moznetwork/tests/test_moznetwork.py +@@ -1,16 +1,16 @@ + #!/usr/bin/env python + """ + Unit-Tests for moznetwork + """ + + import re ++import shutil + import subprocess +-from distutils.spawn import find_executable + from unittest import mock + + import mozinfo + import moznetwork + import mozunit + import pytest + + +@@ -32,17 +32,17 @@ def ip_addresses(): + # Explicitly search '/sbin' because it doesn't always appear + # to be on the $PATH of all systems + ["/sbin/ip", "addr", "show"], + ["/sbin/ifconfig"], + ) + + cmd = None + for command in commands: +- if find_executable(command[0]): ++ if shutil.which(command[0]): + cmd = command + break + else: + raise OSError( + "No program for detecting ip address found! Ensure one of 'ip', " + "'ifconfig' or 'ipconfig' exists on your $PATH." + ) + +diff --git a/testing/mozbase/mozrunner/mozrunner/devices/android_device.py b/testing/mozbase/mozrunner/mozrunner/devices/android_device.py +--- a/testing/mozbase/mozrunner/mozrunner/devices/android_device.py ++++ b/testing/mozbase/mozrunner/mozrunner/devices/android_device.py +@@ -8,17 +8,16 @@ import platform + import posixpath + import re + import shutil + import signal + import subprocess + import sys + import telnetlib + import time +-from distutils.spawn import find_executable + from enum import Enum + + import six + from mozdevice import ADBDeviceFactory, ADBHost + from six.moves import input, urllib + + MOZBUILD_PATH = os.environ.get( + "MOZBUILD_STATE_PATH", os.path.expanduser(os.path.join("~", ".mozbuild")) +@@ -937,17 +936,17 @@ def _find_sdk_exe(substs, exe, tools): + if os.path.exists(exe_path): + found = True + break + else: + _log_debug("Unable to find executable at %s" % exe_path) + + if not found: + # Is exe on PATH? +- exe_path = find_executable(exe) ++ exe_path = shutil.which(exe) + if exe_path: + found = True + else: + _log_debug("Unable to find executable on PATH") + + if found: + _log_debug("%s found at %s" % (exe, exe_path)) + try: + diff --git a/6af7194e2778.patch b/6af7194e2778.patch new file mode 100644 index 000000000000..d27737804b83 --- /dev/null +++ b/6af7194e2778.patch @@ -0,0 +1,157 @@ + +# HG changeset patch +# User serge-sans-paille <sguelton@mozilla.com> +# Date 1702968636 0 +# Node ID 6af7194e2778af0e9a597dfa6fac1a3cfa505b5a +# Parent 05b607c3bbe6ca02e9133ecb969e033fd3d7959e +Bug 1866829 - Replace obsolete distutils reference by portable alternatives r=ahochheiden + +distutils.dir_util.copy_tree -> shutil.copytree +distutils.spawn.find_executable -> shutil.which + +Also fix a warning about escape sequence in the process. + +Differential Revision: https://phabricator.services.mozilla.com/D194781 + +diff --git a/testing/mozbase/mozdevice/mozdevice/adb.py b/testing/mozbase/mozdevice/mozdevice/adb.py +--- a/testing/mozbase/mozdevice/mozdevice/adb.py ++++ b/testing/mozbase/mozdevice/mozdevice/adb.py +@@ -10,17 +10,17 @@ import re + import shlex + import shutil + import signal + import subprocess + import sys + import tempfile + import time + import traceback +-from distutils import dir_util ++from shutil import copytree + from threading import Thread + + import six + from six.moves import range + + from . import version_codes + + _TEST_ROOT = None +@@ -2978,17 +2978,17 @@ class ADBDevice(ADBCommand): + if os.path.isfile(local) and self.is_dir(remote): + # force push to use the correct filename in the remote directory + remote = posixpath.join(remote, os.path.basename(local)) + elif os.path.isdir(local): + copy_required = True + temp_parent = tempfile.mkdtemp() + remote_name = os.path.basename(remote) + new_local = os.path.join(temp_parent, remote_name) +- dir_util.copy_tree(local, new_local) ++ copytree(local, new_local) + local = new_local + # See do_sync_push in + # https://android.googlesource.com/platform/system/core/+/master/adb/file_sync_client.cpp + # Work around change in behavior in adb 1.0.36 where if + # the remote destination directory exists, adb push will + # copy the source directory *into* the destination + # directory otherwise it will copy the source directory + # *onto* the destination directory. +@@ -3131,17 +3131,17 @@ class ADBDevice(ADBCommand): + self.cp(remote, intermediate, recursive=True, timeout=timeout) + self.command_output(["pull", intermediate, local], timeout=timeout) + except ADBError as e: + self._logger.error("pull %s %s: %s" % (intermediate, local, str(e))) + finally: + self.rm(intermediate, recursive=True, force=True, timeout=timeout) + finally: + if copy_required: +- dir_util.copy_tree(local, original_local) ++ copytree(local, original_local, dirs_exist_ok=True) + shutil.rmtree(temp_parent) + + def get_file(self, remote, offset=None, length=None, timeout=None): + """Pull file from device and return the file's content + + :param str remote: The path of the remote file. + :param offset: If specified, return only content beyond this offset. + :param length: If specified, limit content length accordingly. +diff --git a/testing/mozbase/mozdevice/mozdevice/remote_process_monitor.py b/testing/mozbase/mozdevice/mozdevice/remote_process_monitor.py +--- a/testing/mozbase/mozdevice/mozdevice/remote_process_monitor.py ++++ b/testing/mozbase/mozdevice/mozdevice/remote_process_monitor.py +@@ -130,17 +130,17 @@ class RemoteProcessMonitor: + if message.get("action") == "test_start": + self.last_test_seen = message["test"] + elif message.get("action") == "test_end": + self.last_test_seen = "{} (finished)".format(message["test"]) + elif message.get("action") == "suite_end": + self.last_test_seen = "Last test finished" + elif message.get("action") == "log": + line = message["message"].strip() +- m = re.match(".*:\s*(\d*)", line) ++ m = re.match(r".*:\s*(\d*)", line) + if m: + try: + val = int(m.group(1)) + if "Passed:" in line: + self.counts["pass"] += val + self.last_test_seen = "Last test finished" + elif "Failed:" in line: + self.counts["fail"] += val +diff --git a/testing/mozbase/mozrunner/mozrunner/application.py b/testing/mozbase/mozrunner/mozrunner/application.py +--- a/testing/mozbase/mozrunner/mozrunner/application.py ++++ b/testing/mozbase/mozrunner/mozrunner/application.py +@@ -1,16 +1,16 @@ + # This Source Code Form is subject to the terms of the Mozilla Public + # 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 os + import posixpath + from abc import ABCMeta, abstractmethod +-from distutils.spawn import find_executable ++from shutil import which + + import six + from mozdevice import ADBDeviceFactory + from mozprofile import ( + ChromeProfile, + ChromiumProfile, + FirefoxProfile, + Profile, +@@ -46,17 +46,17 @@ class RemoteContext(object): + profile_class = Profile + _bindir = None + remote_test_root = "" + remote_process = None + + @property + def bindir(self): + if self._bindir is None: +- paths = [find_executable("emulator")] ++ paths = [which("emulator")] + paths = [p for p in paths if p is not None if os.path.isfile(p)] + if not paths: + self._bindir = "" + else: + self._bindir = os.path.dirname(paths[0]) + return self._bindir + + @property +@@ -83,17 +83,17 @@ class RemoteContext(object): + return self._remote_profile + + def which(self, binary): + paths = os.environ.get("PATH", {}).split(os.pathsep) + if self.bindir is not None and os.path.abspath(self.bindir) not in paths: + paths.insert(0, os.path.abspath(self.bindir)) + os.environ["PATH"] = os.pathsep.join(paths) + +- return find_executable(binary) ++ return which(binary) + + @abstractmethod + def stop_application(self): + """Run (device manager) command to stop application.""" + pass + + + devices = {} + @@ -11,14 +11,14 @@ pkgbase=firefox-esr pkgname=(firefox-esr) pkgver=115.11.0 -pkgrel=1 +pkgrel=2 pkgdesc="Standalone web browser from mozilla.org, Extended Support Release" arch=(x86_64) license=(MPL GPL LGPL) url="https://www.mozilla.org/en-US/firefox/enterprise/" depends=(gtk3 libxt mime-types dbus-glib ffmpeg nss ttf-font libpulse) makedepends=(unzip zip diffutils yasm mesa imake inetutils xorg-server-xvfb - autoconf2.13 rust clang llvm jack nodejs cbindgen nasm + autoconf2.13 rustup clang llvm jack nodejs cbindgen nasm python lld dump_syms wasi-compiler-rt wasi-libc wasi-libc++ wasi-libc++abi) optdepends=('networkmanager: Location detection via available WiFi networks' @@ -29,7 +29,10 @@ optdepends=('networkmanager: Location detection via available WiFi networks' 'xdg-desktop-portal: Screensharing with Wayland') options=(!emptydirs !makeflags !strip !lto !debug) source=(https://archive.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefox-${pkgver}esr.source.tar.xz{,.asc} - $pkgname.desktop identity-icons-brand.svg) + $pkgname.desktop identity-icons-brand.svg + 18d19413472f.patch + 6af7194e2778.patch + b1cc62489fae.patch) validpgpkeys=('14F26682D0916CDD81E37B6D61B7B526D98F0353') # Mozilla Software Releases <release@mozilla.com> # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) @@ -48,6 +51,11 @@ prepare() { mkdir -p mozbuild cd firefox-$pkgver + # Unbreak distutils + patch -Np1 -i ../18d19413472f.patch + patch -Np1 -i ../6af7194e2778.patch + patch -Np1 -i ../b1cc62489fae.patch + echo "${noextract[@]}" echo -n "$_google_api_key" >google-api-key @@ -99,6 +107,8 @@ END build() { cd firefox-$pkgver + export RUSTUP_TOOLCHAIN=1.77 + export MOZ_NOSPAM=1 export MOZBUILD_STATE_PATH="$srcdir/mozbuild" export MOZ_ENABLE_FULL_SYMBOLS=1 @@ -349,6 +359,9 @@ sha512sums=('0f3a87c99fb008088afd509d9259f893fdd44ea6bf6a5e69806fefb8d355415e81b 'SKIP' '4b53ee133a4ecaf068e240f6a05a1ebf4b788d67fe9141cc5b3561e1128907c8c3edb49bf2b24ba89daf1552f94ac48adf682dbe7dd070cffe7f78d98f2b3338' 'b579b73176c72a5ecf36e3f63bba08fdb8041ae99d54e5cab906660fed6a9cf2311f7ca1ec1649e451cc6d5a4b1e6060b974b1d7befe9c8df3c5a89c50383c17' + '0078598c69c232ff4ea7b4d9fec8e438b5d748b8ece993894859d90d3d4c179814a4f1e6fdcd7f709ca5e2273602001b2a03cccfbb105e7c8b401e1768c9efd0' + '2f0871f46ec3c8e4b6aadf12c955ce85b2767f951b6a3e59ab01137ae318114d85012ed860ba3268257d9a1174ac5fa0b806d29f420ec75a7652eb3c69766b24' + 'e79af42d8118feca5b96a35b8d13aaf8fd88720fc425bc5476ee96854d420c7071949b3c752af8e30c3f154e2613aeb2785c2841ccade07b0fa2966d4b896029' '02bb5ff090eae756f5c6a88fa1958e278bd245e3c63cd7ca6203f1494d80d603316e45972098a19f1ae60ac5b9b609cfebbe629c9d2d7cd90739dcbe024f3178' '4698b724b44df392ae3318ad53e2b59dfea743db9a2e98c6c35237e2dd246bfd6275a6938edecb38b7bcae19789ddde37c4d3f2f2b2a39192b43bebd258aaf87' 'aa99343d32625e50cfb9494e494840bfc18d46391b8b43d004f2741bc9fe89dec45ea8d5d35fed4a21b6073608878a62b9fa0330418777a331922e7cb934c475' diff --git a/b1cc62489fae.patch b/b1cc62489fae.patch new file mode 100644 index 000000000000..e619b884e171 --- /dev/null +++ b/b1cc62489fae.patch @@ -0,0 +1,76 @@ + +# HG changeset patch +# User Jeff Muizelaar <jmuizelaar@mozilla.com> +# Date 1711588046 0 +# Node ID b1cc62489fae8d475f67dec2d9abdf69e2d47614 +# Parent 2ce47a20dd081e3152289d79f3cc1125e06c268c +Bug 1887281. Use shutil.which instead of find_executable. r=glandium + +Python 3.12 dropped support for distutils: +https://docs.python.org/3.12/whatsnew/3.12.html#distutils + +Differential Revision: https://phabricator.services.mozilla.com/D205839 + +diff --git a/testing/mozbase/mozdebug/mozdebug/mozdebug.py b/testing/mozbase/mozdebug/mozdebug/mozdebug.py +--- a/testing/mozbase/mozdebug/mozdebug/mozdebug.py ++++ b/testing/mozbase/mozdebug/mozdebug/mozdebug.py +@@ -1,19 +1,19 @@ + #!/usr/bin/env python + + # This Source Code Form is subject to the terms of the Mozilla Public + # 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 json + import os ++import shutil + import sys + from collections import namedtuple +-from distutils.spawn import find_executable + from subprocess import check_output + + import mozinfo + + __all__ = [ + "get_debugger_info", + "get_default_debugger_name", + "DebuggerSearch", +@@ -103,34 +103,34 @@ def get_debugger_path(debugger): + # Attempt to use the xcrun util to find the path. + try: + path = check_output( + ["xcrun", "--find", "lldb"], universal_newlines=True + ).strip() + if path: + return path + except Exception: +- # Just default to find_executable instead. ++ # Just default to shutil.which instead. + pass + + if mozinfo.os == "win" and debugger == "devenv.exe": + # Attempt to use vswhere to find the path. + try: + encoding = "mbcs" if sys.platform == "win32" else "utf-8" + vswhere = _vswhere_path() + vsinfo = check_output([vswhere, "-format", "json", "-latest"]) + vsinfo = json.loads(vsinfo.decode(encoding, "replace")) + return os.path.join( + vsinfo[0]["installationPath"], "Common7", "IDE", "devenv.exe" + ) + except Exception: +- # Just default to find_executable instead. ++ # Just default to shutil.which instead. + pass + +- return find_executable(debugger) ++ return shutil.which(debugger) + + + def get_debugger_info(debugger, debuggerArgs=None, debuggerInteractive=False): + """ + Get the information about the requested debugger. + + Returns a dictionary containing the ``path`` of the debugger executable, + if it will run in ``interactive`` mode, its arguments and whether it needs + |