summaryrefslogtreecommitdiff
path: root/experimental
diff options
context:
space:
mode:
Diffstat (limited to 'experimental')
-rw-r--r--experimental/aqbanking/APKBUILD2
-rw-r--r--experimental/clisp/APKBUILD44
-rw-r--r--experimental/clisp/no-page.h.patch12
-rw-r--r--experimental/elisa/APKBUILD45
-rw-r--r--experimental/firefox-esr/5-e6b5aa19e999.patch22
-rw-r--r--experimental/firefox-esr/fix-stack-overflow.patch45
-rw-r--r--experimental/firefox-esr/python3.patch10397
-rw-r--r--experimental/firefox/fix-bug-1261392.patch25
-rw-r--r--experimental/gwenhywfar/APKBUILD2
-rw-r--r--experimental/hexchat/APKBUILD57
-rw-r--r--experimental/libffcall/APKBUILD70
-rw-r--r--experimental/libffcall/ppc64.patch371
-rw-r--r--experimental/otter-browser/APKBUILD22
-rw-r--r--experimental/qt5-qtwebkit/APKBUILD94
-rw-r--r--experimental/qt5-qtwebkit/jsc-port-to-musl.patch81
-rw-r--r--experimental/qt5-qtwebkit/musl-thread-stacksize.patch49
-rw-r--r--experimental/rust-beta/0001-Fix-LLVM-build.patch22
-rw-r--r--experimental/rust-beta/0002-Fix-linking-to-zlib-when-cross-compiling.patch34
-rw-r--r--experimental/rust-beta/0003-Fix-rustdoc-when-cross-compiling-on-musl.patch50
-rw-r--r--experimental/rust-beta/0004-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch532
-rw-r--r--experimental/rust-beta/0005-Prefer-libgcc_eh-over-libunwind-for-musl.patch25
-rw-r--r--experimental/rust-beta/0006-Link-libssp_nonshared.a-on-all-musl-targets.patch28
-rw-r--r--experimental/rust-beta/0007-test-failed-doctest-output-Fix-normalization.patch31
-rw-r--r--experimental/rust-beta/0008-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch22
-rw-r--r--experimental/rust-beta/0009-Ignore-broken-and-non-applicable-tests.patch47
-rw-r--r--experimental/rust-beta/0010-Link-stage-2-tools-dynamically-to-libstd.patch22
-rw-r--r--experimental/rust-beta/0011-Move-debugger-scripts-to-usr-share-rust.patch66
-rw-r--r--experimental/rust-beta/0012-Add-foxkit-target-specs.patch206
-rw-r--r--experimental/rust-beta/APKBUILD296
-rw-r--r--experimental/rust-beta/powerpc-atomics.patch16
-rw-r--r--experimental/rust-beta/stdarch-ppc.patch114
-rw-r--r--experimental/rust-beta/ui-test-strings.patch25
-rw-r--r--experimental/sbcl/APKBUILD35
-rw-r--r--experimental/spirv-llvm-translator/APKBUILD50
-rw-r--r--experimental/spirv-llvm-translator/endian.patch37
-rw-r--r--experimental/spirv-llvm-translator/test-triplet.patch700
-rw-r--r--experimental/thunderbird/APKBUILD120
-rw-r--r--experimental/thunderbird/bad-google-code.patch49
-rw-r--r--experimental/thunderbird/cmsghdr.patch11
-rw-r--r--experimental/thunderbird/endianness-js.patch144
-rw-r--r--experimental/thunderbird/fix-bug-1261392.patch25
-rw-r--r--experimental/thunderbird/fix-seccomp-bpf.patch14
-rw-r--r--experimental/thunderbird/mozconfig29
-rw-r--r--experimental/thunderbird/proper-system-hunspell.patch22
-rw-r--r--experimental/thunderbird/rust-config.patch20
-rw-r--r--experimental/thunderbird/skia.patch132
-rw-r--r--experimental/thunderbird/stab.h71
-rw-r--r--experimental/thunderbird/stackwalk-x86-ppc.patch16
-rw-r--r--experimental/thunderbird/thunderbird.desktop64
-rw-r--r--experimental/thunderbird/webrtc-broken.patch30
-rw-r--r--experimental/zfs-utils/APKBUILD49
-rw-r--r--experimental/zfs/APKBUILD68
-rw-r--r--experimental/zfs/Linux-5.6-compat-ktime_get_raw_ts64-ff5587d65137.patch145
-rw-r--r--experimental/zfs/Linux-5.6-compat-time_t-2c3a83701dd1.patch110
-rw-r--r--experimental/zfs/Linux-5.6-compat-timestamp_truncate-795699a6cc28.patch131
-rw-r--r--experimental/zfs/fix-autoconf-redirection-for-dash.patch11
56 files changed, 3424 insertions, 11533 deletions
diff --git a/experimental/aqbanking/APKBUILD b/experimental/aqbanking/APKBUILD
index 409bc3d42..6a66aa41a 100644
--- a/experimental/aqbanking/APKBUILD
+++ b/experimental/aqbanking/APKBUILD
@@ -11,7 +11,7 @@ depends=""
depends_dev=""
makedepends="$depends_dev gmp-dev gwenhywfar-dev xmlsec-dev"
subpackages="$pkgname-dev $pkgname-doc"
-source="aqbanking-$pkgver.tar.gz::https://www.aquamaniac.de/sites/download/download.php?package=03&release=217&file=02&dummy=aqbanking-$pkgver.tar.gz"
+source="aqbanking-$pkgver.tar.gz::https://www.aquamaniac.de/rdm/attachments/download/277/$pkgname-$pkgver.tar.gz"
build() {
cd "$builddir"
diff --git a/experimental/clisp/APKBUILD b/experimental/clisp/APKBUILD
new file mode 100644
index 000000000..fb94292a0
--- /dev/null
+++ b/experimental/clisp/APKBUILD
@@ -0,0 +1,44 @@
+# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
+# Contrubutor: Carlo Landmeter <clandmeter@gmail.com>
+# Contributor: Lee Starnes <lee@canned-death.us>
+# Maintainer: Lee Starnes <lee@canned-death.us>
+pkgname=clisp
+pkgver=2.49
+pkgrel=0
+pkgdesc="ANSI Common Lisp interpreter, compiler, and debugger"
+url="https://clisp.sourceforge.io"
+arch="all"
+license="GPL-2.0-only"
+depends=""
+depends_dev="libsigsegv-dev libffcall-dev ncurses-dev"
+makedepends="$depends_dev"
+subpackages="$pkgname-dev $pkgname-doc"
+source="https://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.bz2
+ no-page.h.patch"
+
+prepare() {
+ default_prepare
+ update_config_sub
+}
+
+build() {
+ ./configure \
+ --prefix=/usr \
+ --with-ffcall \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ "$builddir"
+ # Parallel builds fail
+ make -j1
+}
+
+check() {
+ make check
+}
+
+package() {
+ make -j1 DESTDIR="$pkgdir" install
+}
+
+sha512sums="eef66fc85199a2c283b616db61bf67ff103eeb0f19fa907da48994dc790b6f5f8d0c74fb3bd723c6b827c0ff3cfd89fa6ba67934fc669ed5d5249044b5140d81 clisp-2.49.tar.bz2
+86273c5d5d05a8d41ab6311192e0c757d3f7fe4d78546590830aa00f8c2f170fcb08f66ea739ae8834cec00cdf0f6a20824eb6a3d0f6df97be405c26b1cc5d39 no-page.h.patch"
diff --git a/experimental/clisp/no-page.h.patch b/experimental/clisp/no-page.h.patch
new file mode 100644
index 000000000..aafb98a31
--- /dev/null
+++ b/experimental/clisp/no-page.h.patch
@@ -0,0 +1,12 @@
+--- a/src/unix.d
++++ b/src/unix.d
+@@ -135,9 +135,6 @@
+ #ifdef UNIX_AUX
+ #include <sys/mmu.h> /* for SHMLBA */
+ #endif
+- #if defined(UNIX_LINUX) && !defined(UNIX_GNU)
+- #include <asm/page.h> /* for SHMLBA on Linux 2.0 */
+- #endif
+ /* <sys/shm.h> declares shmget(), shmat(), shmdt(), shmctl() */
+ #endif
+ /* used by SPVW, STREAM */
diff --git a/experimental/elisa/APKBUILD b/experimental/elisa/APKBUILD
new file mode 100644
index 000000000..f2d80d02f
--- /dev/null
+++ b/experimental/elisa/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: A. Wilcox <awilfox@adelielinux.org>
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=elisa
+pkgver=20.04.3
+pkgrel=0
+pkgdesc="KDE music player"
+url="https://kde.org/applications/multimedia/org.kde.elisa"
+arch="all"
+license="LGPL-3.0-only"
+depends="qt5-qtquickcontrols2"
+makedepends="qt5-qtbase-dev qt5-qtdeclarative-dev qt5-qtmultimedia-dev vlc-dev
+ qt5-qtquickcontrols2-dev qt5-qtsvg-dev cmake extra-cmake-modules
+ baloo-dev kconfig-dev kconfigwidgets-dev kcoreaddons-dev kcrash-dev
+ kdbusaddons-dev kdeclarative-dev kdoctools-dev kfilemetadata-dev
+ ki18n-dev kio-dev kirigami2-dev kpackage-dev kxmlgui-dev"
+subpackages="$pkgname-doc $pkgname-lang"
+source="https://download.kde.org/stable/release-service/$pkgver/src/elisa-$pkgver.tar.xz"
+
+build() {
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_SHARED_LIBS=True \
+ -DCMAKE_BUILD_TYPE=RelWithDebugInfo \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
+ -DCMAKE_C_FLAGS="$CFLAGS" \
+ ${CMAKE_CROSSOPTS} \
+ .
+ make
+}
+
+check() {
+ # QML tests require OpenGL.
+ # databaseInterfaceTest known failure: https://phabricator.kde.org/D24563#563126
+ CTEST_OUTPUT_ON_FAILURE=TRUE ctest -E '(elisaqmltests|databaseInterfaceTest)'
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="00afa92eaab736f5f38759a3076b9f579ee3f5fce84404042a73e11cdfe0e004b32a83f9e542ca6d0a962d66bcb3fcce9d12fc5dbdd8f937d9d4cea9321687b4 elisa-20.04.3.tar.xz"
diff --git a/experimental/firefox-esr/5-e6b5aa19e999.patch b/experimental/firefox-esr/5-e6b5aa19e999.patch
deleted file mode 100644
index d33914b78..000000000
--- a/experimental/firefox-esr/5-e6b5aa19e999.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-# HG changeset patch
-# User A. Wilcox <AWilcox@Wilcox-Tech.com>
-# Date 1539810007 0
-# Wed Oct 17 21:00:07 2018 +0000
-# Node ID e6b5aa19e9990adaddb2b80061620f3ceb7335e0
-# Parent 34f9863ef26ae1f8e494b3fc8e87fb7e26a480b3
-NOT FOR INBOUND: fix u2fhid on ppc64/musl
-
-diff -r 34f9863ef26a -r e6b5aa19e999 dom/webauthn/u2f-hid-rs/src/linux/hidraw.rs
---- a/dom/webauthn/u2f-hid-rs/src/linux/hidraw.rs Wed Oct 17 20:59:47 2018 +0000
-+++ b/dom/webauthn/u2f-hid-rs/src/linux/hidraw.rs Wed Oct 17 21:00:07 2018 +0000
-@@ -41,10 +41,7 @@
- | (($nr as u32) << NRSHIFT)
- | ((size as u32) << SIZESHIFT);
-
-- #[cfg(not(target_env = "musl"))]
- type IocType = libc::c_ulong;
-- #[cfg(target_env = "musl")]
-- type IocType = libc::c_int;
-
- from_unix_result(libc::ioctl(fd, ioc as IocType, val))
- }
diff --git a/experimental/firefox-esr/fix-stack-overflow.patch b/experimental/firefox-esr/fix-stack-overflow.patch
deleted file mode 100644
index e164fc69b..000000000
--- a/experimental/firefox-esr/fix-stack-overflow.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-https://bugs.alpinelinux.org/issues/5559
-https://bugzilla.mozilla.org/show_bug.cgi?id=1274732
-
-diff --git a/netwerk/streamconv/converters/nsHTTPCompressConv.cpp b/netwerk/streamconv/converters/nsHTTPCompressConv.cpp
-index 1193529..aeb96b5 100644
---- a/netwerk/streamconv/converters/nsHTTPCompressConv.cpp
-+++ b/netwerk/streamconv/converters/nsHTTPCompressConv.cpp
-@@ -165,9 +165,8 @@ nsHTTPCompressConv::BrotliHandler(nsIInputStream *stream, void *closure, const c
- nsHTTPCompressConv *self = static_cast<nsHTTPCompressConv *>(closure);
- *countRead = 0;
-
-- const uint32_t kOutSize = 128 * 1024; // just a chunk size, we call in a loop
-- unsigned char outBuffer[kOutSize];
-- unsigned char *outPtr;
-+ const size_t kOutSize = 128 * 1024; // just a chunk size, we call in a loop
-+ uint8_t *outPtr;
- size_t outSize;
- size_t avail = aAvail;
- BrotliResult res;
-@@ -177,9 +176,15 @@ nsHTTPCompressConv::BrotliHandler(nsIInputStream *stream, void *closure, const c
- return NS_OK;
- }
-
-+ auto outBuffer = MakeUniqueFallible<uint8_t[]>(kOutSize);
-+ if (outBuffer == nullptr) {
-+ self->mBrotli->mStatus = NS_ERROR_OUT_OF_MEMORY;
-+ return self->mBrotli->mStatus;
-+ }
-+
- do {
- outSize = kOutSize;
-- outPtr = outBuffer;
-+ outPtr = outBuffer.get();
-
- // brotli api is documented in brotli/dec/decode.h and brotli/dec/decode.c
- LOG(("nsHttpCompresssConv %p brotlihandler decompress %d\n", self, avail));
-@@ -210,7 +215,7 @@ nsHTTPCompressConv::BrotliHandler(nsIInputStream *stream, void *closure, const c
- nsresult rv = self->do_OnDataAvailable(self->mBrotli->mRequest,
- self->mBrotli->mContext,
- self->mBrotli->mSourceOffset,
-- reinterpret_cast<const char *>(outBuffer),
-+ reinterpret_cast<const char *>(outBuffer.get()),
- outSize);
- LOG(("nsHttpCompressConv %p BrotliHandler ODA rv=%x", self, rv));
- if (NS_FAILED(rv)) {
diff --git a/experimental/firefox-esr/python3.patch b/experimental/firefox-esr/python3.patch
deleted file mode 100644
index b13be2229..000000000
--- a/experimental/firefox-esr/python3.patch
+++ /dev/null
@@ -1,10397 +0,0 @@
---- firefox-52.9.0esr/python/mozbuild/dumbmake/dumbmake.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/dumbmake/dumbmake.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, unicode_literals
-+
-
- from collections import OrderedDict
- from itertools import groupby
-@@ -36,7 +36,7 @@
- deps = {}
-
- for i, (indent, target) in enumerate(pairs):
-- if not deps.has_key(target):
-+ if target not in deps:
- deps[target] = []
-
- for j in range(i+1, len(pairs)):
-@@ -68,7 +68,7 @@
- del all_targets[dependency]
- all_targets[dependency] = True
-
-- return all_targets.keys()
-+ return list(all_targets.keys())
-
- def get_components(path):
- """Take a path and return all the components of the path."""
-@@ -114,7 +114,7 @@
- make_dirs[make_dir] = True
-
- all_components = []
-- for make_dir in make_dirs.iterkeys():
-+ for make_dir in make_dirs.keys():
- all_components.extend(get_components(make_dir))
-
- for i in all_dependencies(*all_components, dependency_map=dependency_map):
---- firefox-52.9.0esr/python/mozbuild/dumbmake/test/test_dumbmake.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/dumbmake/test/test_dumbmake.py (refactored)
-@@ -1,7 +1,7 @@
- # 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/.
--from __future__ import unicode_literals
-+
-
- import unittest
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/android_version_code.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/android_version_code.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, print_function
-+
-
- import argparse
- import math
---- firefox-52.9.0esr/python/mozbuild/mozbuild/artifacts.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/artifacts.py (refactored)
-@@ -40,7 +40,7 @@
- '''
-
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import collections
- import functools
-@@ -57,7 +57,7 @@
- import subprocess
- import tarfile
- import tempfile
--import urlparse
-+import urllib.parse
- import zipfile
-
- import pylru
-@@ -183,7 +183,7 @@
-
- with JarWriter(file=processed_filename, optimize=False, compress_level=5) as writer:
- reader = JarReader(filename)
-- for filename, entry in reader.entries.iteritems():
-+ for filename, entry in reader.entries.items():
- for pattern, (src_prefix, dest_prefix) in self.test_artifact_patterns:
- if not mozpath.match(filename, pattern):
- continue
-@@ -552,7 +552,7 @@
-
- def print_cache(self):
- with self:
-- for item in self._cache.items():
-+ for item in list(self._cache.items()):
- self.log(logging.INFO, 'artifact',
- {'item': item},
- '{item}')
-@@ -565,7 +565,7 @@
- # We use the persisted LRU caches to our advantage. The first item is
- # most recent.
- with self:
-- item = next(self._cache.items(), None)
-+ item = next(list(self._cache.items()), None)
- if item is not None:
- (name, args, sorted_kwargs), result = item
- self.print_last_item(args, sorted_kwargs, result)
-@@ -593,10 +593,10 @@
- 'changeset={changeset}&version=2&tipsonly=1')
- req = requests.get(cset_url_tmpl.format(tree=tree, changeset=revision),
- headers={'Accept': 'application/json'})
-- if req.status_code not in range(200, 300):
-+ if req.status_code not in list(range(200, 300)):
- raise ValueError
- result = req.json()
-- [found_pushid] = result['pushes'].keys()
-+ [found_pushid] = list(result['pushes'].keys())
- return int(found_pushid)
-
- @cachedmethod(operator.attrgetter('_cache'))
-@@ -609,7 +609,7 @@
- headers={'Accept': 'application/json'})
- result = req.json()
- return [
-- p['changesets'][-1] for p in result['pushes'].values()
-+ p['changesets'][-1] for p in list(result['pushes'].values())
- ]
-
- class TaskCache(CacheManager):
-@@ -847,7 +847,7 @@
-
- candidate_pushheads = collections.defaultdict(list)
-
-- for tree, pushid in found_pushids.iteritems():
-+ for tree, pushid in found_pushids.items():
- end = pushid
- start = pushid - NUM_PUSHHEADS_TO_QUERY_PER_PARENT
-
-@@ -1052,7 +1052,7 @@
- """
- if source and os.path.isfile(source):
- return self.install_from_file(source, distdir)
-- elif source and urlparse.urlparse(source).scheme:
-+ elif source and urllib.parse.urlparse(source).scheme:
- return self.install_from_url(source, distdir)
- else:
- if source is None and 'MOZ_ARTIFACT_REVISION' in os.environ:
---- firefox-52.9.0esr/python/mozbuild/mozbuild/base.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/base.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import json
- import logging
-@@ -482,7 +482,7 @@
- for flag in flags:
- if flag == '-j':
- try:
-- flag = flags.next()
-+ flag = next(flags)
- except StopIteration:
- break
- try:
---- firefox-52.9.0esr/python/mozbuild/mozbuild/config_status.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/config_status.py (refactored)
-@@ -6,7 +6,7 @@
- # drop-in replacement for autoconf 2.13's config.status, with features
- # borrowed from autoconf > 2.5, and additional features.
-
--from __future__ import absolute_import, print_function
-+
-
- import logging
- import os
---- firefox-52.9.0esr/python/mozbuild/mozbuild/doctor.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/doctor.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import
-+
-
- import os
- import subprocess
-@@ -83,7 +83,7 @@
- valid = False
- while not valid and limit > 0:
- try:
-- choice = strtobool(raw_input(prompt + '[Y/N]\n'))
-+ choice = strtobool(input(prompt + '[Y/N]\n'))
- valid = True
- except ValueError:
- print("ERROR! Please enter a valid option!")
-@@ -103,11 +103,11 @@
- if status == 'SKIPPED':
- continue
- self.results.append(result)
-- print('%s...\t%s\n' % (
-+ print(('%s...\t%s\n' % (
- result.get('desc', ''),
- status
- )
-- ).expandtabs(40)
-+ ).expandtabs(40))
-
- @property
- def platform(self):
-@@ -212,7 +212,7 @@
- fsutil_output = subprocess.check_output(command)
- status = 'GOOD, FIXED'
- desc = 'lastaccess disabled systemwide'
-- except subprocess.CalledProcessError, e:
-+ except subprocess.CalledProcessError as e:
- desc = 'lastaccess enabled systemwide'
- if e.output.find('denied') != -1:
- status = 'BAD, FIX DENIED'
---- firefox-52.9.0esr/python/mozbuild/mozbuild/dotproperties.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/dotproperties.py (refactored)
-@@ -5,7 +5,7 @@
- # This file contains utility functions for reading .properties files, like
- # region.properties.
-
--from __future__ import absolute_import, unicode_literals
-+
-
- import codecs
- import re
-@@ -14,7 +14,7 @@
- if sys.version_info[0] == 3:
- str_type = str
- else:
-- str_type = basestring
-+ str_type = str
-
- class DotProperties:
- r'''A thin representation of a key=value .properties file.'''
-@@ -52,7 +52,7 @@
- if not prefix.endswith('.'):
- prefix = prefix + '.'
- indexes = []
-- for k, v in self._properties.iteritems():
-+ for k, v in self._properties.items():
- if not k.startswith(prefix):
- continue
- key = k[len(prefix):]
-@@ -73,7 +73,7 @@
- if not prefix.endswith('.'):
- prefix = prefix + '.'
-
-- D = dict((k[len(prefix):], v) for k, v in self._properties.iteritems()
-+ D = dict((k[len(prefix):], v) for k, v in self._properties.items()
- if k.startswith(prefix) and '.' not in k[len(prefix):])
-
- for required_key in required_keys:
---- firefox-52.9.0esr/python/mozbuild/mozbuild/html_build_viewer.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/html_build_viewer.py (refactored)
-@@ -4,16 +4,16 @@
-
- # This module contains code for running an HTTP server to view build info.
-
--from __future__ import absolute_import, unicode_literals
-
--import BaseHTTPServer
-+
-+import http.server
- import json
- import os
-
- import requests
-
-
--class HTTPHandler(BaseHTTPServer.BaseHTTPRequestHandler):
-+class HTTPHandler(http.server.BaseHTTPRequestHandler):
- def do_GET(self):
- s = self.server.wrapper
- p = self.path
-@@ -92,7 +92,7 @@
- self.doc_root = doc_root
- self.json_files = {}
-
-- self.server = BaseHTTPServer.HTTPServer((address, port), HTTPHandler)
-+ self.server = http.server.HTTPServer((address, port), HTTPHandler)
- self.server.wrapper = self
- self.do_shutdown = False
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/jar.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/jar.py (refactored)
-@@ -8,7 +8,7 @@
- See the documentation for jar.mn on MDC for further details on the format.
- '''
-
--from __future__ import absolute_import
-+
-
- import sys
- import os
-@@ -17,7 +17,7 @@
- import logging
- from time import localtime
- from MozZipFile import ZipFile
--from cStringIO import StringIO
-+from io import StringIO
- from collections import defaultdict
-
- from mozbuild.preprocessor import Preprocessor
-@@ -302,9 +302,9 @@
- '''updateManifest replaces the % in the chrome registration entries
- with the given chrome base path, and updates the given manifest file.
- '''
-- myregister = dict.fromkeys(map(lambda s: s.replace('%',
-- chromebasepath), register))
-- addEntriesToListFile(manifestPath, myregister.iterkeys())
-+ myregister = dict.fromkeys([s.replace('%',
-+ chromebasepath) for s in register])
-+ addEntriesToListFile(manifestPath, iter(myregister.keys()))
-
- def makeJar(self, infile, jardir):
- '''makeJar is the main entry point to JarMaker.
-@@ -322,7 +322,7 @@
- elif self.relativesrcdir:
- self.localedirs = \
- self.generateLocaleDirs(self.relativesrcdir)
-- if isinstance(infile, basestring):
-+ if isinstance(infile, str):
- logging.info('processing ' + infile)
- self.sourcedirs.append(_normpath(os.path.dirname(infile)))
- pp = self.pp.clone()
-@@ -372,7 +372,7 @@
- jarfilepath = jarfile + '.jar'
- try:
- os.makedirs(os.path.dirname(jarfilepath))
-- except OSError, error:
-+ except OSError as error:
- if error.errno != errno.EEXIST:
- raise
- jf = ZipFile(jarfilepath, 'a', lock=True)
-@@ -514,7 +514,7 @@
- # remove previous link or file
- try:
- os.remove(out)
-- except OSError, e:
-+ except OSError as e:
- if e.errno != errno.ENOENT:
- raise
- return open(out, 'wb')
-@@ -525,7 +525,7 @@
- if not os.path.isdir(outdir):
- try:
- os.makedirs(outdir)
-- except OSError, error:
-+ except OSError as error:
- if error.errno != errno.EEXIST:
- raise
- return out
-@@ -541,7 +541,7 @@
- # remove previous link or file
- try:
- os.remove(out)
-- except OSError, e:
-+ except OSError as e:
- if e.errno != errno.ENOENT:
- raise
- if sys.platform != 'win32':
---- firefox-52.9.0esr/python/mozbuild/mozbuild/mach_commands.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/mach_commands.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import argparse
- import errno
-@@ -136,7 +136,7 @@
- # terminal is a blessings.Terminal.
- self._t = terminal
- self._fh = sys.stdout
-- self.tiers = monitor.tiers.tier_status.viewitems()
-+ self.tiers = monitor.tiers.tier_status.items()
-
- def clear(self):
- """Removes the footer from the current terminal."""
-@@ -802,7 +802,7 @@
- dirpath = None
-
- type_counts = database.type_counts(dirpath)
-- sorted_counts = sorted(type_counts.iteritems(),
-+ sorted_counts = sorted(iter(type_counts.items()),
- key=operator.itemgetter(1))
-
- total = 0
-@@ -957,7 +957,7 @@
- processes[i].run()
-
- exit_code = 0
-- for process in processes.values():
-+ for process in list(processes.values()):
- status = process.wait()
- if status:
- exit_code = status
---- firefox-52.9.0esr/python/mozbuild/mozbuild/makeutil.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/makeutil.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import
-+
-
- import os
- import re
-@@ -66,7 +66,7 @@
- self._list = []
- self._set = set()
-
-- def __nonzero__(self):
-+ def __bool__(self):
- return bool(self._set)
-
- def __iter__(self):
---- firefox-52.9.0esr/python/mozbuild/mozbuild/milestone.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/milestone.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import argparse
- import os
---- firefox-52.9.0esr/python/mozbuild/mozbuild/mozconfig.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/mozconfig.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, unicode_literals
-+
-
- import filecmp
- import os
-@@ -306,7 +306,7 @@
-
- # Environment variables also appear as shell variables, but that's
- # uninteresting duplication of information. Filter them out.
-- filt = lambda x, y: {k: v for k, v in x.items() if k not in y}
-+ filt = lambda x, y: {k: v for k, v in list(x.items()) if k not in y}
- result['vars'] = diff_vars(
- filt(parsed['vars_before'], parsed['env_before']),
- filt(parsed['vars_after'], parsed['env_after'])
---- firefox-52.9.0esr/python/mozbuild/mozbuild/mozinfo.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/mozinfo.py (refactored)
-@@ -5,7 +5,7 @@
- # This module produces a JSON file that provides basic build info and
- # configuration metadata.
-
--from __future__ import absolute_import
-+
-
- import os
- import re
-@@ -154,7 +154,7 @@
- and what keys are produced.
- """
- build_conf = build_dict(config, env)
-- if isinstance(file, basestring):
-+ if isinstance(file, str):
- file = open(file, 'wb')
-
- json.dump(build_conf, file, sort_keys=True, indent=4)
---- firefox-52.9.0esr/python/mozbuild/mozbuild/preprocessor.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/preprocessor.py (refactored)
-@@ -27,7 +27,8 @@
- import re
- from optparse import OptionParser
- import errno
--from makeutil import Makefile
-+from .makeutil import Makefile
-+from functools import reduce
-
- # hack around win32 mangling our line endings
- # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65443
-@@ -56,7 +57,7 @@
- self.__ignore_whitespace()
- self.e = self.__get_logical_or()
- if self.content:
-- raise Expression.ParseError, self
-+ raise Expression.ParseError(self)
-
- def __get_logical_or(self):
- """
-@@ -157,7 +158,7 @@
- if word_len:
- rv = Expression.__ASTLeaf('string', self.content[:word_len])
- else:
-- raise Expression.ParseError, self
-+ raise Expression.ParseError(self)
- self.__strip(word_len)
- self.__ignore_whitespace()
- return rv
-@@ -196,7 +197,7 @@
- return left and right
- elif tok[1].value == '||':
- return left or right
-- raise Expression.ParseError, self
-+ raise Expression.ParseError(self)
-
- # Mapping from token types to evaluator functions
- # Apart from (non-)equality, all these can be simple lambda forms.
-@@ -230,7 +231,7 @@
- def __repr__(self):
- return self.value.__repr__()
-
-- class ParseError(StandardError):
-+ class ParseError(Exception):
- """
- Error raised when parsing fails.
- It has two members, offset and content, which give the offset of the
-@@ -278,7 +279,7 @@
- self.context = Context()
- for k,v in {'FILE': '',
- 'LINE': 0,
-- 'DIRECTORY': os.path.abspath('.')}.iteritems():
-+ 'DIRECTORY': os.path.abspath('.')}.items():
- self.context[k] = v
- self.actionLevel = 0
- self.disableLevel = 0
-@@ -292,21 +293,21 @@
- self.cmds = {}
- for cmd, level in {'define': 0,
- 'undef': 0,
-- 'if': sys.maxint,
-- 'ifdef': sys.maxint,
-- 'ifndef': sys.maxint,
-+ 'if': sys.maxsize,
-+ 'ifdef': sys.maxsize,
-+ 'ifndef': sys.maxsize,
- 'else': 1,
- 'elif': 1,
- 'elifdef': 1,
- 'elifndef': 1,
-- 'endif': sys.maxint,
-+ 'endif': sys.maxsize,
- 'expand': 0,
- 'literal': 0,
- 'filter': 0,
- 'unfilter': 0,
- 'include': 0,
- 'includesubst': 0,
-- 'error': 0}.iteritems():
-+ 'error': 0}.items():
- self.cmds[cmd] = (level, getattr(self, 'do_' + cmd))
- self.out = sys.stdout
- self.setMarker(marker)
-@@ -469,7 +470,7 @@
- raise Preprocessor.Error(self, "--depend doesn't work with stdout",
- None)
- try:
-- from makeutil import Makefile
-+ from .makeutil import Makefile
- except:
- raise Preprocessor.Error(self, "--depend requires the "
- "mozbuild.makeutil module", None)
-@@ -684,7 +685,7 @@
- current = dict(self.filters)
- for f in filters:
- current[f] = getattr(self, 'filter_' + f)
-- filterNames = current.keys()
-+ filterNames = list(current.keys())
- filterNames.sort()
- self.filters = [(fn, current[fn]) for fn in filterNames]
- return
-@@ -694,7 +695,7 @@
- for f in filters:
- if f in current:
- del current[f]
-- filterNames = current.keys()
-+ filterNames = list(current.keys())
- filterNames.sort()
- self.filters = [(fn, current[fn]) for fn in filterNames]
- return
-@@ -739,7 +740,7 @@
- args can either be a file name, or a file-like object.
- Files should be opened, and will be closed after processing.
- """
-- isName = type(args) == str or type(args) == unicode
-+ isName = type(args) == str or type(args) == str
- oldCheckLineNumbers = self.checkLineNumbers
- self.checkLineNumbers = False
- if isName:
---- firefox-52.9.0esr/python/mozbuild/mozbuild/pythonutil.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/pythonutil.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import
-+
-
- import os
- import sys
-@@ -11,7 +11,7 @@
- def iter_modules_in_path(*paths):
- paths = [os.path.abspath(os.path.normcase(p)) + os.sep
- for p in paths]
-- for name, module in sys.modules.items():
-+ for name, module in list(sys.modules.items()):
- if not hasattr(module, '__file__'):
- continue
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/shellutil.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/shellutil.py (refactored)
-@@ -15,7 +15,7 @@
- # which matches the pattern and captures it in a named match group.
- # The group names and patterns are given as arguments.
- all_tokens = '|'.join('(?P<%s>%s)' % (name, value)
-- for name, value in tokens.iteritems())
-+ for name, value in tokens.items())
- nonescaped = r'(?<!\\)(?:%s)' % all_tokens
-
- # The final pattern matches either the above pattern, or an escaped
-@@ -96,7 +96,7 @@
- self.cline = self.cline[m.end():]
-
- match = {name: value
-- for name, value in m.groupdict().items() if value}
-+ for name, value in list(m.groupdict().items()) if value}
- if 'quote' in match:
- # " or ' start a quoted string
- if match['quote'] == '"':
-@@ -144,7 +144,7 @@
- self._push(self.cline[:m.start()])
- self.cline = self.cline[m.end():]
- match = {name: value
-- for name, value in m.groupdict().items() if value}
-+ for name, value in list(m.groupdict().items()) if value}
- if 'quote' in match:
- # a double quote ends the quoted string, so go back to
- # unquoted parsing
---- firefox-52.9.0esr/python/mozbuild/mozbuild/sphinx.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/sphinx.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import
-+
-
- import importlib
- import os
---- firefox-52.9.0esr/python/mozbuild/mozbuild/testing.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/testing.py (refactored)
-@@ -2,9 +2,9 @@
- # 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/.
-
--from __future__ import absolute_import, unicode_literals
--
--import cPickle as pickle
-+
-+
-+import pickle as pickle
- import os
- import sys
-
-@@ -62,7 +62,7 @@
- if test_defaults:
- with open(test_defaults, 'rb') as fh:
- defaults = pickle.load(fh)
-- for path, tests in test_data.items():
-+ for path, tests in list(test_data.items()):
- for metadata in tests:
- if defaults:
- manifest = metadata['manifest']
-@@ -303,7 +303,7 @@
- WEB_PLATFORM_TESTS_FLAVORS = ('web-platform-tests',)
-
- def all_test_flavors():
-- return ([v[0] for v in TEST_MANIFESTS.values()] +
-+ return ([v[0] for v in list(TEST_MANIFESTS.values())] +
- list(REFTEST_FLAVORS) +
- list(WEB_PLATFORM_TESTS_FLAVORS) +
- ['python'])
-@@ -445,7 +445,7 @@
- only a few tests need to be run.
- """
- flavor_info = {flavor: (root, prefix, install)
-- for (flavor, root, prefix, install) in TEST_MANIFESTS.values()}
-+ for (flavor, root, prefix, install) in list(TEST_MANIFESTS.values())}
- objdir_dest = mozpath.join(topobjdir, tests_root)
-
- converter = SupportFilesConverter()
-@@ -527,7 +527,7 @@
- paths_file = os.path.join(context.config.topsrcdir, "testing",
- "web-platform", "tests", "tools", "localpaths.py")
- _globals = {"__file__": paths_file}
-- execfile(paths_file, _globals)
-+ exec(compile(open(paths_file).read(), paths_file, 'exec'), _globals)
- import manifest as wptmanifest
- finally:
- sys.path = old_path
---- firefox-52.9.0esr/python/mozbuild/mozbuild/util.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/util.py (refactored)
-@@ -5,7 +5,7 @@
- # This file contains miscellaneous utility functions that don't belong anywhere
- # in particular.
-
--from __future__ import absolute_import, unicode_literals, print_function
-+
-
- import argparse
- import collections
-@@ -36,7 +36,7 @@
- if sys.version_info[0] == 3:
- str_type = str
- else:
-- str_type = basestring
-+ str_type = str
-
- if sys.platform == 'win32':
- _kernel32 = ctypes.windll.kernel32
-@@ -78,7 +78,7 @@
- return h.hexdigest()
-
-
--class EmptyValue(unicode):
-+class EmptyValue(str):
- """A dummy type that behaves like an empty string and sequence.
-
- This type exists in order to support
-@@ -92,7 +92,7 @@
- class ReadOnlyNamespace(object):
- """A class for objects with immutable attributes set at initialization."""
- def __init__(self, **kwargs):
-- for k, v in kwargs.iteritems():
-+ for k, v in kwargs.items():
- super(ReadOnlyNamespace, self).__setattr__(k, v)
-
- def __delattr__(self, key):
-@@ -152,7 +152,7 @@
- if d and not os.path.exists(path):
- try:
- os.makedirs(d)
-- except OSError, error:
-+ except OSError as error:
- if error.errno != errno.EEXIST:
- raise
-
-@@ -224,7 +224,7 @@
- self.mode = mode
-
- def write(self, buf):
-- if isinstance(buf, unicode):
-+ if isinstance(buf, str):
- buf = buf.encode('utf-8')
- BytesIO.write(self, buf)
-
-@@ -381,7 +381,7 @@
- def __add__(self, other):
- # Allow None and EmptyValue is a special case because it makes undefined
- # variable references in moz.build behave better.
-- other = [] if isinstance(other, (types.NoneType, EmptyValue)) else other
-+ other = [] if isinstance(other, (type(None), EmptyValue)) else other
- if not isinstance(other, list):
- raise ValueError('Only lists can be appended to lists.')
-
-@@ -390,7 +390,7 @@
- return new_list
-
- def __iadd__(self, other):
-- other = [] if isinstance(other, (types.NoneType, EmptyValue)) else other
-+ other = [] if isinstance(other, (type(None), EmptyValue)) else other
- if not isinstance(other, list):
- raise ValueError('Only lists can be appended to lists.')
-
-@@ -542,14 +542,14 @@
- functions below.
- """
- assert isinstance(flags, dict)
-- assert all(isinstance(v, type) for v in flags.values())
-+ assert all(isinstance(v, type) for v in list(flags.values()))
-
- class Flags(object):
-- __slots__ = flags.keys()
-+ __slots__ = list(flags.keys())
- _flags = flags
-
- def update(self, **kwargs):
-- for k, v in kwargs.iteritems():
-+ for k, v in kwargs.items():
- setattr(self, k, v)
-
- def __getattr__(self, name):
-@@ -1080,14 +1080,14 @@
- # issue. So we do a little dance to filter it out ourselves.
- dummy_fill_value = ("dummy",)
- def filter_out_dummy(iterable):
-- return itertools.ifilter(lambda x: x != dummy_fill_value,
-+ return filter(lambda x: x != dummy_fill_value,
- iterable)
-
- # From the itertools documentation, slightly modified:
- def grouper(n, iterable):
- "grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx"
- args = [iter(iterable)] * n
-- return itertools.izip_longest(fillvalue=dummy_fill_value, *args)
-+ return itertools.zip_longest(fillvalue=dummy_fill_value, *args)
-
- for i, unified_group in enumerate(grouper(files_per_unified_file,
- files)):
-@@ -1104,7 +1104,7 @@
- [(1,2), (3,4), (5,6)]
- '''
- i = iter(iterable)
-- return itertools.izip_longest(i, i)
-+ return itertools.zip_longest(i, i)
-
-
- VARIABLES_RE = re.compile('\$\((\w+)\)')
-@@ -1122,7 +1122,7 @@
- value = variables.get(name)
- if not value:
- continue
-- if not isinstance(value, types.StringTypes):
-+ if not isinstance(value, (str,)):
- value = ' '.join(value)
- result += value
- return result
-@@ -1149,7 +1149,7 @@
- pass
-
-
--class EnumString(unicode):
-+class EnumString(str):
- '''A string type that only can have a limited set of values, similarly to
- an Enum, and can only be compared against that set of values.
-
-@@ -1185,19 +1185,18 @@
- # quoting could be done with either ' or ".
- if c == "'":
- return "\\'"
-- return unicode(c.encode('unicode_escape'))
-+ return str(c.encode('unicode_escape'))
-
- # Mapping table between raw characters below \x80 and their escaped
- # counterpart, when they differ
- _INDENTED_REPR_TABLE = {
- c: e
-- for c, e in map(lambda x: (x, _escape_char(x)),
-- map(unichr, range(128)))
-+ for c, e in [(x, _escape_char(x)) for x in list(map(chr, list(range(128))))]
- if c != e
- }
- # Regexp matching all characters to escape.
- _INDENTED_REPR_RE = re.compile(
-- '([' + ''.join(_INDENTED_REPR_TABLE.values()) + ']+)')
-+ '([' + ''.join(list(_INDENTED_REPR_TABLE.values())) + ']+)')
-
-
- def indented_repr(o, indent=4):
-@@ -1223,7 +1222,7 @@
- elif isinstance(o, bytes):
- yield 'b'
- yield repr(o)
-- elif isinstance(o, unicode):
-+ elif isinstance(o, str):
- yield "'"
- # We want a readable string (non escaped unicode), but some
- # special characters need escaping (e.g. \n, \t, etc.)
-@@ -1253,11 +1252,11 @@
- if isinstance(obj, dict):
- return {
- encode(k, encoding): encode(v, encoding)
-- for k, v in obj.iteritems()
-+ for k, v in obj.items()
- }
- if isinstance(obj, bytes):
- return obj
-- if isinstance(obj, unicode):
-+ if isinstance(obj, str):
- return obj.encode(encoding)
- if isinstance(obj, Iterable):
- return [encode(i, encoding) for i in obj]
---- firefox-52.9.0esr/python/mozbuild/mozbuild/vendor_rust.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/vendor_rust.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- from distutils.version import LooseVersion
- import logging
---- firefox-52.9.0esr/python/mozbuild/mozbuild/virtualenv.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/virtualenv.py (refactored)
-@@ -5,7 +5,7 @@
- # This file contains code for populating the virtualenv environment for
- # Mozilla's build system. It is typically called as part of configure.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import distutils.sysconfig
- import os
-@@ -461,8 +461,8 @@
- and call .ensure() and .activate() to make the virtualenv active.
- """
-
-- execfile(self.activate_path, dict(__file__=self.activate_path))
-- if isinstance(os.environ['PATH'], unicode):
-+ exec(compile(open(self.activate_path).read(), self.activate_path, 'exec'), dict(__file__=self.activate_path))
-+ if isinstance(os.environ['PATH'], str):
- os.environ['PATH'] = os.environ['PATH'].encode('utf-8')
-
- def install_pip_package(self, package):
---- firefox-52.9.0esr/python/mozbuild/mozbuild/action/buildlist.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/action/buildlist.py (refactored)
-@@ -7,7 +7,7 @@
-
- Usage: buildlist.py <filename> <entry> [<entry> ...]
- '''
--from __future__ import absolute_import, print_function
-+
-
- import sys
- import os
---- firefox-52.9.0esr/python/mozbuild/mozbuild/action/cl.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/action/cl.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import
-+
-
- import ctypes
- import os
-@@ -55,7 +55,7 @@
- break
-
- if target is None:
-- print >>sys.stderr, "No target set"
-+ print("No target set", file=sys.stderr)
- return 1
-
- # Assume the source file is the last argument
---- firefox-52.9.0esr/python/mozbuild/mozbuild/action/dump_env.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/action/dump_env.py (refactored)
-@@ -6,5 +6,5 @@
- # native paths printed on Windows so that these paths can be incorporated
- # into Python configure's environment.
- import os
--for key, value in os.environ.items():
-- print('%s=%s' % (key, value))
-+for key, value in list(os.environ.items()):
-+ print(('%s=%s' % (key, value)))
---- firefox-52.9.0esr/python/mozbuild/mozbuild/action/explode_aar.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/action/explode_aar.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import argparse
- import errno
-@@ -44,7 +44,7 @@
- assets = mozpath.join(destdir, 'assets')
- try:
- os.rmdir(assets)
-- except OSError, e:
-+ except OSError as e:
- if e.errno in (errno.ENOTEMPTY, errno.ENOENT):
- pass
- else:
---- firefox-52.9.0esr/python/mozbuild/mozbuild/action/file_generate.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/action/file_generate.py (refactored)
-@@ -6,7 +6,7 @@
- # the arguments that can be used to generate the output file, call the
- # script's |main| method with appropriate arguments.
-
--from __future__ import absolute_import, print_function
-+
-
- import argparse
- import imp
---- firefox-52.9.0esr/python/mozbuild/mozbuild/action/generate_suggestedsites.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/action/generate_suggestedsites.py (refactored)
-@@ -26,7 +26,7 @@
- directory e.g. raw/suggestedsites.json, raw-pt-rBR/suggestedsites.json.
- '''
-
--from __future__ import absolute_import, print_function
-+
-
- import argparse
- import copy
---- firefox-52.9.0esr/python/mozbuild/mozbuild/action/generate_symbols_file.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/action/generate_symbols_file.py (refactored)
-@@ -2,12 +2,12 @@
- # 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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import argparse
- import buildconfig
- import os
--from StringIO import StringIO
-+from io import StringIO
- from mozbuild.preprocessor import Preprocessor
- from mozbuild.util import DefinesAction
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/action/jar_maker.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/action/jar_maker.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import
-+
-
- import sys
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/action/make_dmg.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/action/make_dmg.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import print_function
-+
-
- from mozbuild.base import MozbuildObject
- from mozpack import dmg
---- firefox-52.9.0esr/python/mozbuild/mozbuild/action/output_searchplugins_list.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/action/output_searchplugins_list.py (refactored)
-@@ -18,4 +18,4 @@
- else:
- engines = searchinfo["default"]["visibleDefaultEngines"]
-
--print '\n'.join(engines)
-+print('\n'.join(engines))
---- firefox-52.9.0esr/python/mozbuild/mozbuild/action/package_fennec_apk.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/action/package_fennec_apk.py (refactored)
-@@ -6,7 +6,7 @@
- Script to produce an Android package (.apk) for Fennec.
- '''
-
--from __future__ import absolute_import, print_function
-+
-
- import argparse
- import buildconfig
---- firefox-52.9.0esr/python/mozbuild/mozbuild/action/preprocessor.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/action/preprocessor.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import
-+
-
- import sys
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/action/process_define_files.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/action/process_define_files.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import argparse
- import os
-@@ -55,7 +55,7 @@
- 'CONFIGURE_DEFINE_FILE')
- defines = '\n'.join(sorted(
- '#define %s %s' % (name, val)
-- for name, val in config.defines.iteritems()
-+ for name, val in config.defines.items()
- if name not in config.non_global_defines))
- l = l[:m.start('cmd') - 1] \
- + defines + l[m.end('name'):]
---- firefox-52.9.0esr/python/mozbuild/mozbuild/action/process_install_manifest.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/action/process_install_manifest.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import argparse
- import os
---- firefox-52.9.0esr/python/mozbuild/mozbuild/action/test_archive.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/action/test_archive.py (refactored)
-@@ -8,7 +8,7 @@
- # It is defined inline because this was easiest to make test archive
- # generation faster.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import argparse
- import itertools
-@@ -433,7 +433,7 @@
- # "common" is our catch all archive and it ignores things from other archives.
- # Verify nothing sneaks into ARCHIVE_FILES without a corresponding exclusion
- # rule in the "common" archive.
--for k, v in ARCHIVE_FILES.items():
-+for k, v in list(ARCHIVE_FILES.items()):
- # Skip mozharness because it isn't staged.
- if k in ('common', 'mozharness'):
- continue
---- firefox-52.9.0esr/python/mozbuild/mozbuild/action/webidl.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/action/webidl.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import
-+
-
- import sys
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/action/xpccheck.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/action/xpccheck.py (refactored)
-@@ -8,7 +8,7 @@
- Usage: xpccheck.py <directory> [<directory> ...]
- '''
-
--from __future__ import absolute_import
-+
-
- import sys
- import os
-@@ -40,7 +40,7 @@
- break
-
- if not found:
-- print >>sys.stderr, "TEST-UNEXPECTED-FAIL | xpccheck | test %s is missing from test manifest %s!" % (name, os.path.join(directory, 'xpcshell.ini'))
-+ print("TEST-UNEXPECTED-FAIL | xpccheck | test %s is missing from test manifest %s!" % (name, os.path.join(directory, 'xpcshell.ini')), file=sys.stderr)
- sys.exit(1)
-
- def verifyIniFile(initests, directory):
-@@ -60,12 +60,12 @@
- break
-
- if not found:
-- print >>sys.stderr, "TEST-UNEXPECTED-FAIL | xpccheck | found %s in xpcshell.ini and not in directory '%s'" % (name, directory)
-+ print("TEST-UNEXPECTED-FAIL | xpccheck | found %s in xpcshell.ini and not in directory '%s'" % (name, directory), file=sys.stderr)
- sys.exit(1)
-
- def main(argv):
- if len(argv) < 2:
-- print >>sys.stderr, "Usage: xpccheck.py <topsrcdir> <directory> [<directory> ...]"
-+ print("Usage: xpccheck.py <topsrcdir> <directory> [<directory> ...]", file=sys.stderr)
- sys.exit(1)
-
- topsrcdir = argv[0]
---- firefox-52.9.0esr/python/mozbuild/mozbuild/action/xpidl-process.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/action/xpidl-process.py (refactored)
-@@ -7,7 +7,7 @@
- # input IDL file(s). It's purpose is to directly support the build
- # system. The API will change to meet the needs of the build system.
-
--from __future__ import absolute_import
-+
-
- import argparse
- import os
-@@ -58,7 +58,7 @@
-
- # TODO use FileAvoidWrite once it supports binary mode.
- xpt_path = os.path.join(xpt_dir, '%s.xpt' % module)
-- xpt_link(xpts.values()).write(xpt_path)
-+ xpt_link(list(xpts.values())).write(xpt_path)
-
- rule.add_targets([xpt_path])
- if deps_dir:
---- firefox-52.9.0esr/python/mozbuild/mozbuild/action/zip.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/action/zip.py (refactored)
-@@ -5,7 +5,7 @@
- # This script creates a zip file, but will also strip any binaries
- # it finds before adding them to the zip.
-
--from __future__ import absolute_import
-+
-
- from mozpack.files import FileFinder
- from mozpack.copier import Jarrer
---- firefox-52.9.0esr/python/mozbuild/mozbuild/backend/android_eclipse.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/backend/android_eclipse.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, unicode_literals
-+
-
- import itertools
- import os
---- firefox-52.9.0esr/python/mozbuild/mozbuild/backend/base.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/backend/base.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, unicode_literals
-+
-
- from abc import (
- ABCMeta,
-@@ -30,15 +30,13 @@
- from mozbuild.base import ExecutionSummary
-
-
--class BuildBackend(LoggingMixin):
-+class BuildBackend(LoggingMixin, metaclass=ABCMeta):
- """Abstract base class for build backends.
-
- A build backend is merely a consumer of the build configuration (the output
- of the frontend processing). It does something with said data. What exactly
- is the discretion of the specific implementation.
- """
--
-- __metaclass__ = ABCMeta
-
- def __init__(self, environment):
- assert isinstance(environment, ConfigEnvironment)
-@@ -252,7 +250,7 @@
- srcdir = mozpath.dirname(obj.input_path)
- pp.context.update({
- k: ' '.join(v) if isinstance(v, list) else v
-- for k, v in obj.config.substs.iteritems()
-+ for k, v in obj.config.substs.items()
- })
- pp.context.update(
- top_srcdir=obj.topsrcdir,
---- firefox-52.9.0esr/python/mozbuild/mozbuild/backend/common.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/backend/common.py (refactored)
-@@ -2,9 +2,9 @@
- # 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/.
-
--from __future__ import absolute_import, unicode_literals
--
--import cPickle as pickle
-+
-+
-+import pickle as pickle
- import itertools
- import json
- import os
-@@ -194,11 +194,11 @@
- def add_defaults(self, manifest):
- if not hasattr(manifest, 'manifest_defaults'):
- return
-- for sub_manifest, defaults in manifest.manifest_defaults.items():
-+ for sub_manifest, defaults in list(manifest.manifest_defaults.items()):
- self.manifest_defaults[sub_manifest] = defaults
-
- def add_installs(self, obj, topsrcdir):
-- for src, (dest, _) in obj.installs.iteritems():
-+ for src, (dest, _) in obj.installs.items():
- key = src[len(topsrcdir)+1:]
- self.installs_by_path[key].append((src, dest))
- for src, pat, dest in obj.pattern_installs:
-@@ -379,7 +379,7 @@
-
- path = mozpath.join(self.environment.topobjdir, 'test-installs.pkl')
- with self._write_file(path, mode='rb') as fh:
-- pickle.dump({k: v for k, v in self._test_manager.installs_by_path.items()
-+ pickle.dump({k: v for k, v in list(self._test_manager.installs_by_path.items())
- if k in self._test_manager.deferred_installs},
- fh,
- protocol=2)
---- firefox-52.9.0esr/python/mozbuild/mozbuild/backend/configenvironment.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/backend/configenvironment.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import
-+
-
- import os
- import sys
-@@ -17,7 +17,7 @@
-
-
- if sys.version_info.major == 2:
-- text_type = unicode
-+ text_type = str
- else:
- text_type = str
-
-@@ -176,7 +176,7 @@
- except UnicodeDecodeError:
- return v.decode('utf-8', 'replace')
-
-- for k, v in self.substs.items():
-+ for k, v in list(self.substs.items()):
- if not isinstance(v, StringTypes):
- if isinstance(v, Iterable):
- type(v)(decode(i) for i in v)
---- firefox-52.9.0esr/python/mozbuild/mozbuild/backend/cpp_eclipse.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/backend/cpp_eclipse.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import
-+
-
- import errno
- import random
-@@ -218,12 +218,12 @@
- cproject_header = cproject_header.replace('@MACH_COMMAND@', os.path.join(self.environment.topsrcdir, 'mach'))
- fh.write(cproject_header)
-
-- for path, defines in self._paths_to_defines.items():
-+ for path, defines in list(self._paths_to_defines.items()):
- folderinfo = CPROJECT_TEMPLATE_FOLDER_INFO_HEADER
- folderinfo = folderinfo.replace('@FOLDER_ID@', str(random.randint(1000000, 99999999999)))
- folderinfo = folderinfo.replace('@FOLDER_NAME@', 'tree/' + path)
- fh.write(folderinfo)
-- for k, v in defines.items():
-+ for k, v in list(defines.items()):
- define = ET.Element('listOptionValue')
- define.set('builtIn', 'false')
- define.set('value', str(k) + "=" + str(v))
---- firefox-52.9.0esr/python/mozbuild/mozbuild/backend/fastermake.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/backend/fastermake.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, unicode_literals, print_function
-+
-
- from mozbuild.backend.base import PartialBackend
- from mozbuild.backend.common import CommonBackend
-@@ -130,12 +130,12 @@
- if value is not None:
- mk.add_statement('%s = %s' % (var, value))
-
-- install_manifests_bases = self._install_manifests.keys()
-+ install_manifests_bases = list(self._install_manifests.keys())
-
- # Add information for chrome manifest generation
- manifest_targets = []
-
-- for target, entries in self._manifest_entries.iteritems():
-+ for target, entries in self._manifest_entries.items():
- manifest_targets.append(target)
- install_target = mozpath.basedir(target, install_manifests_bases)
- self._install_manifests[install_target].add_content(
-@@ -144,16 +144,16 @@
-
- # Add information for install manifests.
- mk.add_statement('INSTALL_MANIFESTS = %s'
-- % ' '.join(self._install_manifests.keys()))
-+ % ' '.join(list(self._install_manifests.keys())))
-
- # Add dependencies we infered:
-- for target, deps in self._dependencies.iteritems():
-+ for target, deps in self._dependencies.items():
- mk.create_rule([target]).add_dependencies(
- '$(TOPOBJDIR)/%s' % d for d in deps)
-
- mk.add_statement('include $(TOPSRCDIR)/config/faster/rules.mk')
-
-- for base, install_manifest in self._install_manifests.iteritems():
-+ for base, install_manifest in self._install_manifests.items():
- with self._write_file(
- mozpath.join(self.environment.topobjdir, 'faster',
- 'install_%s' % base.replace('/', '_'))) as fh:
---- firefox-52.9.0esr/python/mozbuild/mozbuild/backend/mach_commands.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/backend/mach_commands.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import argparse
- import os
---- firefox-52.9.0esr/python/mozbuild/mozbuild/backend/recursivemake.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/backend/recursivemake.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, unicode_literals
-+
-
- import logging
- import os
-@@ -12,7 +12,7 @@
- defaultdict,
- namedtuple,
- )
--from StringIO import StringIO
-+from io import StringIO
- from itertools import chain
-
- from mozpack.manifests import (
-@@ -74,6 +74,7 @@
- )
- from ..makeutil import Makefile
- from mozbuild.shellutil import quote as shell_quote
-+from functools import reduce
-
- MOZBUILD_VARIABLES = [
- b'ANDROID_APK_NAME',
-@@ -214,7 +215,7 @@
- self.fh.write(buf)
-
- def write_once(self, buf):
-- if isinstance(buf, unicode):
-+ if isinstance(buf, str):
- buf = buf.encode('utf-8')
- if b'\n' + buf not in self.fh.getvalue():
- self.write(buf)
-@@ -283,8 +284,8 @@
- Helper function to call a filter from compute_dependencies and
- traverse.
- """
-- return filter(current, self._traversal.get(current,
-- self.SubDirectories()))
-+ return list(filter(current, self._traversal.get(current,
-+ self.SubDirectories())))
-
- def compute_dependencies(self, filter=None):
- """
-@@ -638,7 +639,7 @@
- convenience variables, and the other dependency definitions for a
- hopefully proper directory traversal.
- """
-- for tier, no_skip in self._no_skip.items():
-+ for tier, no_skip in list(self._no_skip.items()):
- self.log(logging.DEBUG, 'fill_root_mk', {
- 'number': len(no_skip), 'tier': tier
- }, 'Using {number} directories during {tier}')
-@@ -684,7 +685,7 @@
- for tier, filter in filters:
- main, all_deps = \
- self._traversal.compute_dependencies(filter)
-- for dir, deps in all_deps.items():
-+ for dir, deps in list(all_deps.items()):
- if deps is not None or (dir in self._idl_dirs \
- and tier == 'export'):
- rule = root_deps_mk.create_rule(['%s/%s' % (dir, tier)])
-@@ -697,7 +698,7 @@
- rule.add_dependencies('%s/%s' % (d, tier) for d in main)
-
- all_compile_deps = reduce(lambda x,y: x|y,
-- self._compile_graph.values()) if self._compile_graph else set()
-+ list(self._compile_graph.values())) if self._compile_graph else set()
- compile_roots = set(self._compile_graph.keys()) - all_compile_deps
-
- rule = root_deps_mk.create_rule(['recurse_compile'])
-@@ -839,7 +840,7 @@
- self._fill_root_mk()
-
- # Make the master test manifest files.
-- for flavor, t in self._test_manifests.items():
-+ for flavor, t in list(self._test_manifests.items()):
- install_prefix, manifests = t
- manifest_stem = mozpath.join(install_prefix, '%s.ini' % flavor)
- self._write_master_test_manifest(mozpath.join(
-@@ -945,7 +946,7 @@
- for p in ('Makefile', 'backend.mk', '.deps/.mkdir.done'):
- build_files.add_optional_exists(p)
-
-- for idl in manager.idls.values():
-+ for idl in list(manager.idls.values()):
- self._install_manifests['dist_idl'].add_symlink(idl['source'],
- idl['basename'])
- self._install_manifests['dist_include'].add_optional_exists('%s.h'
-@@ -992,7 +993,7 @@
-
- interfaces_manifests = []
- dist_dir = mozpath.join(self.environment.topobjdir, 'dist')
-- for manifest, entries in manager.interface_manifests.items():
-+ for manifest, entries in list(manager.interface_manifests.items()):
- interfaces_manifests.append(mozpath.join('$(DEPTH)', manifest))
- for xpt in sorted(entries):
- registered_xpt_files.add(mozpath.join(
-@@ -1052,7 +1053,7 @@
- # Don't allow files to be defined multiple times unless it is allowed.
- # We currently allow duplicates for non-test files or test files if
- # the manifest is listed as a duplicate.
-- for source, (dest, is_test) in obj.installs.items():
-+ for source, (dest, is_test) in list(obj.installs.items()):
- try:
- self._install_manifests['_test_files'].add_symlink(source, dest)
- except ValueError:
-@@ -1386,7 +1387,7 @@
- man_dir = mozpath.join(self.environment.topobjdir, '_build_manifests',
- dest)
-
-- for k, manifest in manifests.items():
-+ for k, manifest in list(manifests.items()):
- with self._write_file(mozpath.join(man_dir, k)) as fh:
- manifest.write(fileobj=fh)
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/backend/tup.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/backend/tup.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, unicode_literals
-+
-
- import os
-
-@@ -253,7 +253,7 @@
- backend_file = self._get_backend_file('xpcom/xpidl')
- backend_file.export_shell()
-
-- for module, data in sorted(manager.modules.iteritems()):
-+ for module, data in sorted(manager.modules.items()):
- dest, idls = data
- cmd = [
- '$(PYTHON_PATH)',
---- firefox-52.9.0esr/python/mozbuild/mozbuild/backend/visualstudio.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/backend/visualstudio.py (refactored)
-@@ -5,7 +5,7 @@
- # This file contains a build backend for generating Visual Studio project
- # files.
-
--from __future__ import absolute_import, unicode_literals
-+
-
- import errno
- import os
-@@ -218,7 +218,7 @@
- includes = [os.path.normpath(i) for i in includes]
-
- defines = []
-- for k, v in self._paths_to_defines.get(path, {}).items():
-+ for k, v in list(self._paths_to_defines.get(path, {}).items()):
- if v is True:
- defines.append(k)
- else:
---- firefox-52.9.0esr/python/mozbuild/mozbuild/codecoverage/chrome_map.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/codecoverage/chrome_map.py (refactored)
-@@ -5,7 +5,7 @@
- from collections import defaultdict
- import json
- import os
--import urlparse
-+import urllib.parse
-
- from mach.config import ConfigSettings
- from mach.logging import LoggingManager
-@@ -42,7 +42,7 @@
- if isinstance(entry, (ManifestChrome, ManifestResource)):
- if isinstance(entry, ManifestResource):
- dest = entry.target
-- url = urlparse.urlparse(dest)
-+ url = urllib.parse.urlparse(dest)
- if not url.scheme:
- dest = mozpath.normpath(mozpath.join(entry.base, dest))
- if url.scheme == 'file':
-@@ -99,7 +99,7 @@
- chrome_mapping = self.manifest_handler.chrome_mapping
- overrides = self.manifest_handler.overrides
- json.dump([
-- {k: list(v) for k, v in chrome_mapping.iteritems()},
-+ {k: list(v) for k, v in chrome_mapping.items()},
- overrides,
- self._install_mapping,
- ], fh, sort_keys=True, indent=2)
---- firefox-52.9.0esr/python/mozbuild/mozbuild/codecoverage/packager.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/codecoverage/packager.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, print_function
-+
-
- import argparse
- import sys
-@@ -12,7 +12,7 @@
-
- def package_gcno_tree(root, output_file):
- # XXX JarWriter doesn't support unicode strings, see bug 1056859
-- if isinstance(root, unicode):
-+ if isinstance(root, str):
- root = root.encode('utf-8')
-
- finder = FileFinder(root)
---- firefox-52.9.0esr/python/mozbuild/mozbuild/compilation/codecomplete.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/compilation/codecomplete.py (refactored)
-@@ -4,7 +4,7 @@
-
- # This modules provides functionality for dealing with code completion.
-
--from __future__ import absolute_import
-+
-
- import os
-
-@@ -59,5 +59,5 @@
- # Drop the first flag since that is the pathname of the compiler.
- flags = (shell_split(build_vars[cc]) + shell_split(build_vars[name]))[1:]
-
-- print(' '.join(shell_quote(arg)
-- for arg in util.sanitize_cflags(flags)))
-+ print((' '.join(shell_quote(arg)
-+ for arg in util.sanitize_cflags(flags))))
---- firefox-52.9.0esr/python/mozbuild/mozbuild/compilation/database.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/compilation/database.py (refactored)
-@@ -118,7 +118,7 @@
-
- db = []
-
-- for (directory, filename), cmd in self._db.iteritems():
-+ for (directory, filename), cmd in self._db.items():
- env = self._envs[directory]
- cmd = list(cmd)
- cmd.append(filename)
-@@ -151,7 +151,7 @@
- a = expand_variables(a, variables).split()
- if not a:
- continue
-- if isinstance(a, types.StringTypes):
-+ if isinstance(a, (str,)):
- c.append(a)
- else:
- c.extend(a)
-@@ -216,7 +216,7 @@
- value = cenv.substs.get(name)
- if not value:
- return
-- if isinstance(value, types.StringTypes):
-+ if isinstance(value, (str,)):
- value = value.split()
- db.extend(value)
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/compilation/warnings.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/compilation/warnings.py (refactored)
-@@ -4,7 +4,7 @@
-
- # This modules provides functionality for dealing with compiler warnings.
-
--from __future__ import absolute_import, unicode_literals
-+
-
- import errno
- import json
-@@ -123,18 +123,18 @@
-
- def __len__(self):
- i = 0
-- for value in self._files.values():
-+ for value in list(self._files.values()):
- i += len(value['warnings'])
-
- return i
-
- def __iter__(self):
-- for value in self._files.values():
-+ for value in list(self._files.values()):
- for warning in value['warnings']:
- yield warning
-
- def __contains__(self, item):
-- for value in self._files.values():
-+ for value in list(self._files.values()):
- for warning in value['warnings']:
- if warning == item:
- return True
-@@ -144,7 +144,7 @@
- @property
- def warnings(self):
- """All the CompilerWarning instances in this database."""
-- for value in self._files.values():
-+ for value in list(self._files.values()):
- for w in value['warnings']:
- yield w
-
-@@ -152,7 +152,7 @@
- """Returns a mapping of warning types to their counts."""
-
- types = {}
-- for value in self._files.values():
-+ for value in list(self._files.values()):
- for warning in value['warnings']:
- if dirpath and not mozpath.normsep(warning['filename']).startswith(dirpath):
- continue
-@@ -210,7 +210,7 @@
- """
-
- # Need to calculate up front since we are mutating original object.
-- filenames = self._files.keys()
-+ filenames = list(self._files.keys())
- for filename in filenames:
- if not os.path.exists(filename):
- del self._files[filename]
-@@ -229,10 +229,10 @@
- obj = {'files': {}}
-
- # All this hackery because JSON can't handle sets.
-- for k, v in self._files.iteritems():
-+ for k, v in self._files.items():
- obj['files'][k] = {}
-
-- for k2, v2 in v.iteritems():
-+ for k2, v2 in v.items():
- normalized = v2
-
- if k2 == 'warnings':
-@@ -249,8 +249,8 @@
- self._files = obj['files']
-
- # Normalize data types.
-- for filename, value in self._files.iteritems():
-- for k, v in value.iteritems():
-+ for filename, value in self._files.items():
-+ for k, v in value.items():
- if k != 'warnings':
- continue
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/configure/__init__.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/configure/__init__.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import inspect
- import logging
-@@ -193,7 +193,7 @@
- for b in ('None', 'False', 'True', 'int', 'bool', 'any', 'all', 'len',
- 'list', 'tuple', 'set', 'dict', 'isinstance', 'getattr',
- 'hasattr', 'enumerate', 'range', 'zip')
-- }, __import__=forbidden_import, str=unicode)
-+ }, __import__=forbidden_import, str=str)
-
- # Expose a limited set of functions from os.path
- OS = ReadOnlyNamespace(path=ReadOnlyNamespace(**{
-@@ -333,7 +333,7 @@
- if path:
- self.include_file(path)
-
-- for option in self._options.itervalues():
-+ for option in self._options.values():
- # All options must be referenced by some @depends function
- if option not in self._seen:
- raise ConfigureError(
-@@ -437,7 +437,7 @@
- value = PositiveOptionValue()
- elif value is False or value == ():
- value = NegativeOptionValue()
-- elif isinstance(value, types.StringTypes):
-+ elif isinstance(value, (str,)):
- value = PositiveOptionValue((value,))
- elif isinstance(value, tuple):
- value = PositiveOptionValue(value)
-@@ -477,7 +477,7 @@
- return value
-
- def _dependency(self, arg, callee_name, arg_name=None):
-- if isinstance(arg, types.StringTypes):
-+ if isinstance(arg, (str,)):
- prefix, name, values = Option.split_option(arg)
- if values != ():
- raise ConfigureError("Option must not contain an '='")
-@@ -541,7 +541,7 @@
- '''
- when = self._normalize_when(kwargs.get('when'), 'option')
- args = [self._resolve(arg) for arg in args]
-- kwargs = {k: self._resolve(v) for k, v in kwargs.iteritems()
-+ kwargs = {k: self._resolve(v) for k, v in kwargs.items()
- if k != 'when'}
- option = Option(*args, **kwargs)
- if when:
-@@ -622,7 +622,7 @@
- with self.only_when_impl(when):
- what = self._resolve(what)
- if what:
-- if not isinstance(what, types.StringTypes):
-+ if not isinstance(what, (str,)):
- raise TypeError("Unexpected type: '%s'" % type(what).__name__)
- self.include_file(what)
-
-@@ -640,7 +640,7 @@
- (k[:-len('_impl')], getattr(self, k))
- for k in dir(self) if k.endswith('_impl') and k != 'template_impl'
- )
-- glob.update((k, v) for k, v in self.iteritems() if k not in glob)
-+ glob.update((k, v) for k, v in self.items() if k not in glob)
-
- # Any function argument to the template must be prepared to be sandboxed.
- # If the template itself returns a function (in which case, it's very
-@@ -664,7 +664,7 @@
- def wrapper(*args, **kwargs):
- args = [maybe_prepare_function(arg) for arg in args]
- kwargs = {k: maybe_prepare_function(v)
-- for k, v in kwargs.iteritems()}
-+ for k, v in kwargs.items()}
- ret = template(*args, **kwargs)
- if isfunction(ret):
- # We can't expect the sandboxed code to think about all the
-@@ -696,7 +696,7 @@
- for value, required in (
- (_import, True), (_from, False), (_as, False)):
-
-- if not isinstance(value, types.StringTypes) and (
-+ if not isinstance(value, (str,)) and (
- required or value is not None):
- raise TypeError("Unexpected type: '%s'" % type(value).__name__)
- if value is not None and not self.RE_MODULE.match(value):
-@@ -759,7 +759,7 @@
- name = self._resolve(name, need_help_dependency=False)
- if name is None:
- return
-- if not isinstance(name, types.StringTypes):
-+ if not isinstance(name, (str,)):
- raise TypeError("Unexpected type: '%s'" % type(name).__name__)
- if name in data:
- raise ConfigureError(
-@@ -849,7 +849,7 @@
- if isinstance(possible_reasons[0], Option):
- reason = possible_reasons[0]
- if not reason and (isinstance(value, (bool, tuple)) or
-- isinstance(value, types.StringTypes)):
-+ isinstance(value, (str,))):
- # A reason can be provided automatically when imply_option
- # is called with an immediate value.
- _, filename, line, _, _, _ = inspect.stack()[1]
-@@ -884,10 +884,10 @@
- if not inspect.isfunction(func):
- raise TypeError("Unexpected type: '%s'" % type(func).__name__)
- if func in self._prepared_functions:
-- return func, func.func_globals
-+ return func, func.__globals__
-
- glob = SandboxedGlobal(
-- (k, v) for k, v in func.func_globals.iteritems()
-+ (k, v) for k, v in func.__globals__.items()
- if (inspect.isfunction(v) and v not in self._templates) or (
- inspect.isclass(v) and issubclass(v, Exception))
- )
-@@ -908,20 +908,20 @@
- # Note this is not entirely bullet proof (if the value is e.g. a list,
- # the list contents could have changed), but covers the bases.
- closure = None
-- if func.func_closure:
-+ if func.__closure__:
- def makecell(content):
- def f():
- content
-- return f.func_closure[0]
-+ return f.__closure__[0]
-
- closure = tuple(makecell(cell.cell_contents)
-- for cell in func.func_closure)
-+ for cell in func.__closure__)
-
- new_func = wraps(func)(types.FunctionType(
-- func.func_code,
-+ func.__code__,
- glob,
- func.__name__,
-- func.func_defaults,
-+ func.__defaults__,
- closure
- ))
- @wraps(new_func)
---- firefox-52.9.0esr/python/mozbuild/mozbuild/configure/check_debug_ranges.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/configure/check_debug_ranges.py (refactored)
-@@ -6,7 +6,7 @@
- # to a given compilation unit. This is used as a helper to find a bug in some
- # versions of GNU ld.
-
--from __future__ import absolute_import
-+
-
- import subprocess
- import sys
-@@ -59,4 +59,4 @@
-
-
- if __name__ == '__main__':
-- print main(*sys.argv[1:])
-+ print(main(*sys.argv[1:]))
---- firefox-52.9.0esr/python/mozbuild/mozbuild/configure/constants.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/configure/constants.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- from mozbuild.util import EnumString
- from collections import OrderedDict
-@@ -56,7 +56,7 @@
- 'x86_64': 64,
- }
-
--CPU = EnumString.subclass(*CPU_bitness.keys())
-+CPU = EnumString.subclass(*list(CPU_bitness.keys()))
-
- Endianness = EnumString.subclass(
- 'big',
---- firefox-52.9.0esr/python/mozbuild/mozbuild/configure/help.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/configure/help.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import os
- from mozbuild.configure.options import Option
---- firefox-52.9.0esr/python/mozbuild/mozbuild/configure/libstdcxx.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/configure/libstdcxx.py (refactored)
-@@ -13,7 +13,7 @@
- # will be used from shell, we just print the two assignments and evaluate
- # them from shell.
-
--from __future__ import absolute_import
-+
-
- import os
- import subprocess
-@@ -76,6 +76,6 @@
-
- if __name__ == '__main__':
- cxx_env = os.environ['CXX']
-- print 'MOZ_LIBSTDCXX_TARGET_VERSION=%s' % find_version(cxx_env)
-+ print('MOZ_LIBSTDCXX_TARGET_VERSION=%s' % find_version(cxx_env))
- host_cxx_env = os.environ.get('HOST_CXX', cxx_env)
-- print 'MOZ_LIBSTDCXX_HOST_VERSION=%s' % find_version(host_cxx_env)
-+ print('MOZ_LIBSTDCXX_HOST_VERSION=%s' % find_version(host_cxx_env))
---- firefox-52.9.0esr/python/mozbuild/mozbuild/configure/lint.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/configure/lint.py (refactored)
-@@ -2,9 +2,9 @@
- # 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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-
--from StringIO import StringIO
-+
-+from io import StringIO
- from . import (
- CombinedDependsFunction,
- ConfigureError,
-@@ -42,7 +42,7 @@
- # - don't use @imports
- # - don't have a closure
- # - don't use global variables
-- if func in self._imports or func.func_closure:
-+ if func in self._imports or func.__closure__:
- return True
- for op, arg in disassemble_as_iter(func):
- if op in ('LOAD_GLOBAL', 'STORE_GLOBAL'):
---- firefox-52.9.0esr/python/mozbuild/mozbuild/configure/lint_util.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/configure/lint_util.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import dis
- import inspect
-@@ -12,9 +12,9 @@
- # returns an iterator.
- def disassemble_as_iter(co):
- if inspect.ismethod(co):
-- co = co.im_func
-+ co = co.__func__
- if inspect.isfunction(co):
-- co = co.func_code
-+ co = co.__code__
- code = co.co_code
- n = len(code)
- i = 0
-@@ -30,7 +30,7 @@
- extended_arg = 0
- i += 2
- if op == dis.EXTENDED_ARG:
-- extended_arg = arg * 65536L
-+ extended_arg = arg * 65536
- continue
- if op in dis.hasconst:
- yield opname, co.co_consts[arg]
---- firefox-52.9.0esr/python/mozbuild/mozbuild/configure/options.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/configure/options.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import os
- import sys
-@@ -12,7 +12,7 @@
-
- def istupleofstrings(obj):
- return isinstance(obj, tuple) and len(obj) and all(
-- isinstance(o, types.StringTypes) for o in obj)
-+ isinstance(o, (str,)) for o in obj)
-
-
- class OptionValue(tuple):
-@@ -71,7 +71,7 @@
- in the form of a tuple for when values are given to the option (in the form
- --option=value[,value2...].
- '''
-- def __nonzero__(self):
-+ def __bool__(self):
- return True
-
-
-@@ -96,7 +96,7 @@
- if format_data:
- message = message.format(**format_data)
- super(ConflictingOptionError, self).__init__(message)
-- for k, v in format_data.iteritems():
-+ for k, v in format_data.items():
- setattr(self, k, v)
-
-
-@@ -132,7 +132,7 @@
- 'At least an option name or an environment variable name must '
- 'be given')
- if name:
-- if not isinstance(name, types.StringTypes):
-+ if not isinstance(name, (str,)):
- raise InvalidOptionError('Option must be a string')
- if not name.startswith('--'):
- raise InvalidOptionError('Option must start with `--`')
-@@ -141,7 +141,7 @@
- if not name.islower():
- raise InvalidOptionError('Option must be all lowercase')
- if env:
-- if not isinstance(env, types.StringTypes):
-+ if not isinstance(env, (str,)):
- raise InvalidOptionError(
- 'Environment variable name must be a string')
- if not env.isupper():
-@@ -151,8 +151,8 @@
- isinstance(nargs, int) and nargs >= 0):
- raise InvalidOptionError(
- "nargs must be a positive integer, '?', '*' or '+'")
-- if (not isinstance(default, types.StringTypes) and
-- not isinstance(default, (bool, types.NoneType)) and
-+ if (not isinstance(default, (str,)) and
-+ not isinstance(default, (bool, type(None))) and
- not istupleofstrings(default)):
- raise InvalidOptionError(
- 'default must be a bool, a string or a tuple of strings')
-@@ -224,7 +224,7 @@
- ', '.join("'%s'" % c for c in choices))
- elif has_choices:
- maxargs = self.maxargs
-- if len(choices) < maxargs and maxargs != sys.maxint:
-+ if len(choices) < maxargs and maxargs != sys.maxsize:
- raise InvalidOptionError('Not enough `choices` for `nargs`')
- self.choices = choices
- self.help = help
-@@ -238,7 +238,7 @@
- where prefix is one of 'with', 'without', 'enable' or 'disable'.
- The '=values' part is optional. Values are separated with commas.
- '''
-- if not isinstance(option, types.StringTypes):
-+ if not isinstance(option, (str,)):
- raise InvalidOptionError('Option must be a string')
-
- elements = option.split('=', 1)
-@@ -291,7 +291,7 @@
- def maxargs(self):
- if isinstance(self.nargs, int):
- return self.nargs
-- return 1 if self.nargs == '?' else sys.maxint
-+ return 1 if self.nargs == '?' else sys.maxsize
-
- def _validate_nargs(self, num):
- minargs, maxargs = self.minargs, self.maxargs
-@@ -485,5 +485,5 @@
-
- def __iter__(self):
- for d in (self._args, self._extra_args):
-- for arg, pos in d.itervalues():
-+ for arg, pos in d.values():
- yield arg
---- firefox-52.9.0esr/python/mozbuild/mozbuild/configure/util.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/configure/util.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import codecs
- import itertools
-@@ -52,7 +52,7 @@
-
- def __cmp__(self, other):
- # LooseVersion checks isinstance(StringType), so work around it.
-- if isinstance(other, unicode):
-+ if isinstance(other, str):
- other = other.encode('ascii')
- return LooseVersion.__cmp__(self, other)
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/controller/building.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/controller/building.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, unicode_literals
-+
-
- import getpass
- import json
-@@ -108,7 +108,7 @@
- """
- o = []
-
-- for tier, state in self.tiers.items():
-+ for tier, state in list(self.tiers.items()):
- t_entry = dict(
- name=tier,
- start=state['begin_time'],
-@@ -643,8 +643,8 @@
-
- return '\n'.join(lines)
-
-- def __nonzero__(self):
-- relative_values = [v for k, v in self._values.items()
-+ def __bool__(self):
-+ relative_values = [v for k, v in list(self._values.items())
- if k not in self.ABSOLUTE_KEYS]
- return (all(v >= 0 for v in relative_values) and
- any(v > 0 for v in relative_values))
-@@ -666,8 +666,8 @@
- """Install test files."""
-
- if self.is_clobber_needed():
-- print(INSTALL_TESTS_CLOBBER.format(
-- clobber_file=os.path.join(self.topobjdir, 'CLOBBER')))
-+ print((INSTALL_TESTS_CLOBBER.format(
-+ clobber_file=os.path.join(self.topobjdir, 'CLOBBER'))))
- sys.exit(1)
-
- if not test_objs:
---- firefox-52.9.0esr/python/mozbuild/mozbuild/controller/clobber.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/controller/clobber.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, print_function
-+
-
- r'''This module contains code for managing clobbering of the tree.'''
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/frontend/context.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/frontend/context.py (refactored)
-@@ -14,7 +14,7 @@
- contain, you've come to the right place.
- """
-
--from __future__ import absolute_import, unicode_literals
-+
-
- import os
-
-@@ -234,15 +234,15 @@
- This function is transactional: if setitem fails for one of the values,
- the context is not updated at all."""
- if isinstance(iterable, dict):
-- iterable = iterable.items()
-+ iterable = list(iterable.items())
-
- update = {}
-- for key, value in itertools.chain(iterable, kwargs.items()):
-+ for key, value in itertools.chain(iterable, list(kwargs.items())):
- stored_type = self._validate(key, value)
- # Don't create an instance of stored_type if coercion is needed,
- # until all values are validated.
- update[key] = (value, stored_type)
-- for key, (value, stored_type) in update.items():
-+ for key, (value, stored_type) in list(update.items()):
- if not isinstance(value, stored_type):
- update[key] = stored_type(value)
- else:
-@@ -297,7 +297,7 @@
- self.update(value)
-
-
--class FinalTargetValue(ContextDerivedValue, unicode):
-+class FinalTargetValue(ContextDerivedValue, str):
- def __new__(cls, context, value=""):
- if not value:
- value = 'dist/'
-@@ -307,7 +307,7 @@
- value += 'bin'
- if context['DIST_SUBDIR']:
- value += '/' + context['DIST_SUBDIR']
-- return unicode.__new__(cls, value)
-+ return str.__new__(cls, value)
-
-
- def Enum(*values):
-@@ -355,7 +355,7 @@
- cls = SourcePath
- return super(PathMeta, cls).__call__(context, value)
-
--class Path(ContextDerivedValue, unicode):
-+class Path(ContextDerivedValue, str, metaclass=PathMeta):
- """Stores and resolves a source path relative to a given context
-
- This class is used as a backing type for some of the sandbox variables.
-@@ -366,7 +366,6 @@
- - '!objdir/relative/paths'
- - '%/filesystem/absolute/paths'
- """
-- __metaclass__ = PathMeta
-
- def __new__(cls, context, value=None):
- return super(Path, cls).__new__(cls, value)
-@@ -386,7 +385,7 @@
- def __cmp__(self, other):
- if isinstance(other, Path) and self.srcdir != other.srcdir:
- return cmp(self.full_path, other.full_path)
-- return cmp(unicode(self), other)
-+ return cmp(str(self), other)
-
- # __cmp__ is not enough because unicode has __eq__, __ne__, etc. defined
- # and __cmp__ is only used for those when they don't exist.
-@@ -544,7 +543,7 @@
- __slots__ = tuple([name for name, _ in fields])
-
- def __init__(self, context):
-- for fname, ftype in self._fields.items():
-+ for fname, ftype in list(self._fields.items()):
- if issubclass(ftype, ContextDerivedValue):
- setattr(self, fname, self._fields[fname](context))
- else:
-@@ -614,8 +613,8 @@
- return _TypedListWithAction
-
- WebPlatformTestManifest = TypedNamedTuple("WebPlatformTestManifest",
-- [("manifest_path", unicode),
-- ("test_root", unicode)])
-+ [("manifest_path", str),
-+ ("test_root", str)])
- ManifestparserManifestList = OrderedListWithAction(read_manifestparser_manifest)
- ReftestManifestList = OrderedListWithAction(read_reftest_manifest)
- WptManifestList = TypedListWithAction(WebPlatformTestManifest, read_wpt_manifest)
-@@ -623,12 +622,12 @@
- OrderedSourceList = ContextDerivedTypedList(SourcePath, StrictOrderingOnAppendList)
- OrderedTestFlavorList = TypedList(Enum(*all_test_flavors()),
- StrictOrderingOnAppendList)
--OrderedStringList = TypedList(unicode, StrictOrderingOnAppendList)
-+OrderedStringList = TypedList(str, StrictOrderingOnAppendList)
- DependentTestsEntry = ContextDerivedTypedRecord(('files', OrderedSourceList),
- ('tags', OrderedStringList),
- ('flavors', OrderedTestFlavorList))
- BugzillaComponent = TypedNamedTuple('BugzillaComponent',
-- [('product', unicode), ('component', unicode)])
-+ [('product', str), ('component', str)])
-
-
- class Files(SubContext):
-@@ -764,7 +763,7 @@
- self.test_tags |= other.test_tags
- self.test_flavors |= other.test_flavors
-
-- for k, v in other.items():
-+ for k, v in list(other.items()):
- if k == 'IMPACTED_TESTS':
- self.test_files |= set(mozpath.relpath(e.full_path, e.context.config.topsrcdir)
- for e in v.files)
-@@ -818,7 +817,7 @@
-
- bug_components = Counter()
-
-- for f in files.values():
-+ for f in list(files.values()):
- bug_component = f.get('BUG_COMPONENT')
- if bug_component:
- bug_components[bug_component] += 1
-@@ -889,11 +888,11 @@
- file.
- """),
-
-- 'ANDROID_APK_NAME': (unicode, unicode,
-+ 'ANDROID_APK_NAME': (str, str,
- """The name of an Android APK file to generate.
- """),
-
-- 'ANDROID_APK_PACKAGE': (unicode, unicode,
-+ 'ANDROID_APK_PACKAGE': (str, str,
- """The name of the Android package to generate R.java for, like org.mozilla.gecko.
- """),
-
-@@ -962,7 +961,7 @@
- """),
-
- 'GENERATED_FILES': (StrictOrderingOnAppendListWithFlagsFactory({
-- 'script': unicode,
-+ 'script': str,
- 'inputs': list }), list,
- """Generic generated files.
-
-@@ -1107,7 +1106,7 @@
- """Like ``OBJDIR_FILES``, with preprocessing. Use sparingly.
- """),
-
-- 'FINAL_LIBRARY': (unicode, unicode,
-+ 'FINAL_LIBRARY': (str, str,
- """Library in which the objects of the current directory will be linked.
-
- This variable contains the name of a library, defined elsewhere with
-@@ -1158,7 +1157,7 @@
- """A list of python unit tests.
- """),
-
-- 'HOST_LIBRARY_NAME': (unicode, unicode,
-+ 'HOST_LIBRARY_NAME': (str, str,
- """Name of target library generated when cross compiling.
- """),
-
-@@ -1176,7 +1175,7 @@
- libraries that link into this library via FINAL_LIBRARY.
- """),
-
-- 'LIBRARY_NAME': (unicode, unicode,
-+ 'LIBRARY_NAME': (str, str,
- """The code name of the library generated for a directory.
-
- By default STATIC_LIBRARY_NAME and SHARED_LIBRARY_NAME take this name.
-@@ -1188,7 +1187,7 @@
- ``example/components/xpcomsample.lib`` on Windows.
- """),
-
-- 'SHARED_LIBRARY_NAME': (unicode, unicode,
-+ 'SHARED_LIBRARY_NAME': (str, str,
- """The name of the static library generated for a directory, if it needs to
- differ from the library code name.
-
-@@ -1202,7 +1201,7 @@
- Implies FORCE_SHARED_LIB.
- """),
-
-- 'STATIC_LIBRARY_NAME': (unicode, unicode,
-+ 'STATIC_LIBRARY_NAME': (str, str,
- """The name of the static library generated for a directory, if it needs to
- differ from the library code name.
-
-@@ -1238,37 +1237,37 @@
-
- This variable contains a list of system libaries to link against.
- """),
-- 'RCFILE': (unicode, unicode,
-+ 'RCFILE': (str, str,
- """The program .rc file.
-
- This variable can only be used on Windows.
- """),
-
-- 'RESFILE': (unicode, unicode,
-+ 'RESFILE': (str, str,
- """The program .res file.
-
- This variable can only be used on Windows.
- """),
-
-- 'RCINCLUDE': (unicode, unicode,
-+ 'RCINCLUDE': (str, str,
- """The resource script file to be included in the default .res file.
-
- This variable can only be used on Windows.
- """),
-
-- 'DEFFILE': (unicode, unicode,
-+ 'DEFFILE': (str, str,
- """The program .def (module definition) file.
-
- This variable can only be used on Windows.
- """),
-
-- 'LD_VERSION_SCRIPT': (unicode, unicode,
-+ 'LD_VERSION_SCRIPT': (str, str,
- """The linker version script for shared libraries.
-
- This variable can only be used on Linux.
- """),
-
-- 'SYMBOLS_FILE': (Path, unicode,
-+ 'SYMBOLS_FILE': (Path, str,
- """A file containing a list of symbols to export from a shared library.
-
- The given file contains a list of symbols to be exported, and is
-@@ -1323,7 +1322,7 @@
- ``BIN_SUFFIX``, the name will remain unchanged.
- """),
-
-- 'SONAME': (unicode, unicode,
-+ 'SONAME': (str, str,
- """The soname of the shared object currently being linked
-
- soname is the "logical name" of a shared object, often used to provide
-@@ -1379,7 +1378,7 @@
- ``GENERATED_FILES``.
- """),
-
-- 'PROGRAM' : (unicode, unicode,
-+ 'PROGRAM' : (str, str,
- """Compiled executable name.
-
- If the configuration token ``BIN_SUFFIX`` is set, its value will be
-@@ -1387,7 +1386,7 @@
- ``BIN_SUFFIX``, ``PROGRAM`` will remain unchanged.
- """),
-
-- 'HOST_PROGRAM' : (unicode, unicode,
-+ 'HOST_PROGRAM' : (str, str,
- """Compiled host executable name.
-
- If the configuration token ``HOST_BIN_SUFFIX`` is set, its value will be
-@@ -1425,7 +1424,7 @@
- files.
- """),
-
-- 'XPIDL_MODULE': (unicode, unicode,
-+ 'XPIDL_MODULE': (str, str,
- """XPCOM Interface Definition Module Name.
-
- This is the name of the ``.xpt`` file that is created by linking
-@@ -1576,14 +1575,14 @@
- """),
-
- # The following variables are used to control the target of installed files.
-- 'XPI_NAME': (unicode, unicode,
-+ 'XPI_NAME': (str, str,
- """The name of an extension XPI to generate.
-
- When this variable is present, the results of this directory will end up
- being packaged into an extension instead of the main dist/bin results.
- """),
-
-- 'DIST_SUBDIR': (unicode, unicode,
-+ 'DIST_SUBDIR': (str, str,
- """The name of an alternate directory to install files to.
-
- When this variable is present, the results of this directory will end up
-@@ -1591,7 +1590,7 @@
- otherwise be placed.
- """),
-
-- 'FINAL_TARGET': (FinalTargetValue, unicode,
-+ 'FINAL_TARGET': (FinalTargetValue, str,
- """The name of the directory to install targets to.
-
- The directory is relative to the top of the object directory. The
-@@ -1622,7 +1621,7 @@
-
- 'GYP_DIRS': (StrictOrderingOnAppendListWithFlagsFactory({
- 'variables': dict,
-- 'input': unicode,
-+ 'input': str,
- 'sandbox_vars': dict,
- 'non_unified_sources': StrictOrderingOnAppendList,
- }), list,
-@@ -1799,7 +1798,7 @@
- }
-
- # Sanity check: we don't want any variable above to have a list as storage type.
--for name, (storage_type, input_types, docs) in VARIABLES.items():
-+for name, (storage_type, input_types, docs) in list(VARIABLES.items()):
- if storage_type == list:
- raise RuntimeError('%s has a "list" storage type. Use "List" instead.'
- % name)
---- firefox-52.9.0esr/python/mozbuild/mozbuild/frontend/data.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/frontend/data.py (refactored)
-@@ -15,7 +15,7 @@
- structures.
- """
-
--from __future__ import absolute_import, unicode_literals
-+
-
- from mozbuild.util import StrictOrderingOnAppendList
- from mozpack.chrome.manifest import ManifestEntry
-@@ -186,7 +186,7 @@
- self.defines = defines
-
- def get_defines(self):
-- for define, value in self.defines.iteritems():
-+ for define, value in self.defines.items():
- if value is True:
- yield('-D%s' % define)
- elif value is False:
---- firefox-52.9.0esr/python/mozbuild/mozbuild/frontend/emitter.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/frontend/emitter.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, unicode_literals
-+
-
- import itertools
- import logging
-@@ -120,8 +120,8 @@
- # arguments. This gross hack works around the problem until we
- # rid ourselves of 2.6.
- self.info = {}
-- for k, v in mozinfo.info.items():
-- if isinstance(k, unicode):
-+ for k, v in list(mozinfo.info.items()):
-+ if isinstance(k, str):
- k = k.encode('ascii')
- self.info[k] = v
-
-@@ -197,7 +197,7 @@
-
- def _emit_libs_derived(self, contexts):
- # First do FINAL_LIBRARY linkage.
-- for lib in (l for libs in self._libs.values() for l in libs):
-+ for lib in (l for libs in list(self._libs.values()) for l in libs):
- if not isinstance(lib, (StaticLibrary, RustLibrary)) or not lib.link_into:
- continue
- if lib.link_into not in self._libs:
-@@ -257,12 +257,12 @@
- lib.link_into == outerlib.basename):
- propagate_defines(lib, defines)
-
-- for lib in (l for libs in self._libs.values() for l in libs):
-+ for lib in (l for libs in list(self._libs.values()) for l in libs):
- if isinstance(lib, Library):
- propagate_defines(lib, lib.lib_defines)
- yield lib
-
-- for obj in self._binaries.values():
-+ for obj in list(self._binaries.values()):
- yield obj
-
- LIBRARY_NAME_VAR = {
-@@ -321,7 +321,7 @@
- libs[key] = l
- if key not in libs:
- libs[key] = l
-- candidates = libs.values()
-+ candidates = list(libs.values())
- if force_static and not candidates:
- if dir:
- raise SandboxValidationError(
-@@ -383,9 +383,9 @@
-
- def _verify_deps(self, context, crate_dir, crate_name, dependencies, description='Dependency'):
- """Verify that a crate's dependencies all specify local paths."""
-- for dep_crate_name, values in dependencies.iteritems():
-+ for dep_crate_name, values in dependencies.items():
- # A simple version number.
-- if isinstance(values, (str, unicode)):
-+ if isinstance(values, str):
- raise SandboxValidationError(
- '%s %s of crate %s does not list a path' % (description, dep_crate_name, crate_name),
- context)
-@@ -463,7 +463,7 @@
- ' in [profile.%s] section') % (libname, profile_name),
- context)
-
-- dependencies = set(config.get('dependencies', {}).iterkeys())
-+ dependencies = set(config.get('dependencies', {}).keys())
-
- return RustLibrary(context, libname, cargo_file, crate_type,
- dependencies, **static_args)
-@@ -738,7 +738,7 @@
- assert not gen_sources['UNIFIED_SOURCES']
-
- no_pgo = context.get('NO_PGO')
-- no_pgo_sources = [f for f, flags in all_flags.iteritems()
-+ no_pgo_sources = [f for f, flags in all_flags.items()
- if flags.no_pgo]
- if no_pgo:
- if no_pgo_sources:
-@@ -765,7 +765,7 @@
-
- # The inverse of the above, mapping suffixes to their canonical suffix.
- canonicalized_suffix_map = {}
-- for suffix, alternatives in suffix_map.iteritems():
-+ for suffix, alternatives in suffix_map.items():
- alternatives.add(suffix)
- for a in alternatives:
- canonicalized_suffix_map[a] = suffix
-@@ -786,7 +786,7 @@
- # a directory with mixed C and C++ source, but it's not that important.
- cxx_sources = defaultdict(bool)
-
-- for variable, (klass, gen_klass, suffixes) in varmap.items():
-+ for variable, (klass, gen_klass, suffixes) in list(varmap.items()):
- allowed_suffixes = set().union(*[suffix_map[s] for s in suffixes])
-
- # First ensure that we haven't been given filetypes that we don't
-@@ -812,7 +812,7 @@
- obj = cls(*arglist)
- yield obj
-
-- for f, flags in all_flags.iteritems():
-+ for f, flags in all_flags.items():
- if flags.flags:
- ext = mozpath.splitext(f)[1]
- yield PerSourceFlag(context, f, flags.flags)
-@@ -958,7 +958,7 @@
- for obj in self._handle_linkables(context, passthru, generated_files):
- yield obj
-
-- generated_files.update(['%s%s' % (k, self.config.substs.get('BIN_SUFFIX', '')) for k in self._binaries.keys()])
-+ generated_files.update(['%s%s' % (k, self.config.substs.get('BIN_SUFFIX', '')) for k in list(self._binaries.keys())])
-
- components = []
- for var, cls in (
-@@ -1055,10 +1055,10 @@
- for obj in self._process_jar_manifests(context):
- yield obj
-
-- for name, jar in context.get('JAVA_JAR_TARGETS', {}).items():
-+ for name, jar in list(context.get('JAVA_JAR_TARGETS', {}).items()):
- yield ContextWrapped(context, jar)
-
-- for name, data in context.get('ANDROID_ECLIPSE_PROJECT_TARGETS', {}).items():
-+ for name, data in list(context.get('ANDROID_ECLIPSE_PROJECT_TARGETS', {}).items()):
- yield ContextWrapped(context, data)
-
- if context.get('USE_YASM') is True:
-@@ -1127,7 +1127,7 @@
- script = mozpath.join(mozpath.dirname(mozpath.dirname(__file__)),
- 'action', 'process_define_files.py')
- yield GeneratedFile(context, script, 'process_define_file',
-- unicode(path),
-+ str(path),
- [Path(context, path + '.in')])
-
- generated_files = context.get('GENERATED_FILES')
-@@ -1170,7 +1170,7 @@
- yield GeneratedFile(context, script, method, outputs, inputs)
-
- def _process_test_manifests(self, context):
-- for prefix, info in TEST_MANIFESTS.items():
-+ for prefix, info in list(TEST_MANIFESTS.items()):
- for path, manifest in context.get('%s_MANIFESTS' % prefix, []):
- for obj in self._process_test_manifest(context, info, path, manifest):
- yield obj
-@@ -1261,7 +1261,7 @@
-
- process_support_files(test)
-
-- for path, m_defaults in mpmanifest.manifest_defaults.items():
-+ for path, m_defaults in list(mpmanifest.manifest_defaults.items()):
- process_support_files(m_defaults)
-
- # We also copy manifests into the output directory,
---- firefox-52.9.0esr/python/mozbuild/mozbuild/frontend/gyp_reader.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/frontend/gyp_reader.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, unicode_literals
-+
-
- import gyp
- import sys
-@@ -69,7 +69,7 @@
-
-
- def encode(value):
-- if isinstance(value, unicode):
-+ if isinstance(value, str):
- return value.encode('utf-8')
- return value
-
-@@ -87,7 +87,7 @@
- # gyp expects plain str instead of unicode. The frontend code gives us
- # unicode strings, so convert them.
- path = encode(path)
-- str_vars = dict((name, encode(value)) for name, value in vars.items())
-+ str_vars = dict((name, encode(value)) for name, value in list(vars.items()))
-
- params = {
- b'parallel': False,
-@@ -222,7 +222,7 @@
- if not f:
- continue
- # the result may be a string or a list.
-- if isinstance(f, types.StringTypes):
-+ if isinstance(f, (str,)):
- context[var].append(f)
- else:
- context[var].extend(f)
---- firefox-52.9.0esr/python/mozbuild/mozbuild/frontend/mach_commands.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/frontend/mach_commands.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- from collections import defaultdict
- import os
-@@ -105,13 +105,13 @@
- """
- components = defaultdict(set)
- try:
-- for p, m in self._get_files_info(paths, rev=rev).items():
-+ for p, m in list(self._get_files_info(paths, rev=rev).items()):
- components[m.get('BUG_COMPONENT')].add(p)
- except InvalidPathException as e:
- print(e.message)
- return 1
-
-- for component, files in sorted(components.items(), key=lambda x: (x is None, x)):
-+ for component, files in sorted(list(components.items()), key=lambda x: (x is None, x)):
- print('%s :: %s' % (component.product, component.component) if component else 'UNKNOWN')
- for f in sorted(files):
- print(' %s' % f)
-@@ -139,7 +139,7 @@
- help='Paths whose data to query')
- def file_info_test_deps(self, paths, rev=None):
- try:
-- for p, m in self._get_files_info(paths, rev=rev).items():
-+ for p, m in list(self._get_files_info(paths, rev=rev).items()):
- print('%s:' % mozpath.relpath(p, self.topsrcdir))
- if m.test_files:
- print('\tTest file patterns:')
---- firefox-52.9.0esr/python/mozbuild/mozbuild/frontend/reader.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/frontend/reader.py (refactored)
-@@ -16,7 +16,7 @@
- It does this by examining specific variables populated during execution.
- """
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import ast
- import inspect
-@@ -80,11 +80,12 @@
- )
-
- from mozbuild.base import ExecutionSummary
-+from functools import reduce
-
-
- if sys.version_info.major == 2:
-- text_type = unicode
-- type_type = types.TypeType
-+ text_type = str
-+ type_type = type
- else:
- text_type = str
- type_type = type
-@@ -126,7 +127,7 @@
- b'JS_STANDALONE': b'1',
- })
- udict = {}
-- for k, v in self.substs.items():
-+ for k, v in list(self.substs.items()):
- if isinstance(v, str):
- udict[k.decode('utf-8')] = v.decode('utf-8')
- else:
-@@ -338,7 +339,7 @@
- raise Exception('`template` is a function decorator. You must '
- 'use it as `@template` preceding a function declaration.')
-
-- name = func.func_name
-+ name = func.__name__
-
- if name in self.templates:
- raise KeyError(
-@@ -417,7 +418,7 @@
- klass = self._context.__class__
- self._context.__class__ = TemplateContext
- # The sandbox will do all the necessary checks for these merges.
-- for key, value in context.items():
-+ for key, value in list(context.items()):
- if isinstance(value, dict):
- self[key].update(value)
- elif isinstance(value, (list, HierarchicalStringList)):
-@@ -434,10 +435,10 @@
-
- class TemplateFunction(object):
- def __init__(self, func, sandbox):
-- self.path = func.func_code.co_filename
-- self.name = func.func_name
--
-- code = func.func_code
-+ self.path = func.__code__.co_filename
-+ self.name = func.__name__
-+
-+ code = func.__code__
- firstlineno = code.co_firstlineno
- lines = sandbox._current_source.splitlines(True)
- lines = inspect.getblock(lines[firstlineno - 1:])
-@@ -476,8 +477,8 @@
- compile(func_ast, self.path, 'exec'),
- glob,
- self.name,
-- func.func_defaults,
-- func.func_closure,
-+ func.__defaults__,
-+ func.__closure__,
- )
- func()
-
-@@ -491,11 +492,11 @@
- '__builtins__': sandbox._builtins
- }
- func = types.FunctionType(
-- self._func.func_code,
-+ self._func.__code__,
- glob,
- self.name,
-- self._func.func_defaults,
-- self._func.func_closure
-+ self._func.__defaults__,
-+ self._func.__closure__
- )
- sandbox.exec_function(func, args, kwargs, self.path,
- becomes_current_path=False)
-@@ -511,7 +512,7 @@
- def visit_Str(self, node):
- # String nodes we got from the AST parser are str, but we want
- # unicode literals everywhere, so transform them.
-- node.s = unicode(node.s)
-+ node.s = str(node.s)
- return node
-
- def visit_Name(self, node):
-@@ -644,7 +645,7 @@
-
- for l in traceback.format_exception(type(self.other), self.other,
- self.trace):
-- s.write(unicode(l))
-+ s.write(str(l))
-
- return s.getvalue()
-
-@@ -794,7 +795,7 @@
- s.write(' %s\n' % inner.args[2])
- s.write('\n')
- close_matches = difflib.get_close_matches(inner.args[2],
-- VARIABLES.keys(), 2)
-+ list(VARIABLES.keys()), 2)
- if close_matches:
- s.write('Maybe you meant %s?\n' % ' or '.join(close_matches))
- s.write('\n')
-@@ -1196,7 +1197,7 @@
-
- recurse_info[d][key] = dict(sandbox.metadata[key])
-
-- for path, child_metadata in recurse_info.items():
-+ for path, child_metadata in list(recurse_info.items()):
- child_path = path.join('moz.build').full_path
-
- # Ensure we don't break out of the topsrcdir. We don't do realpath
-@@ -1288,7 +1289,7 @@
- # There is room to improve this code (and the code in
- # _find_relevant_mozbuilds) to better handle multiple files in the same
- # directory. Bug 1136966 tracks.
-- for path, mbpaths in relevants.items():
-+ for path, mbpaths in list(relevants.items()):
- path_mozbuilds[path] = [mozpath.join(topsrcdir, p) for p in mbpaths]
-
- for i, mbpath in enumerate(mbpaths[0:-1]):
-@@ -1325,7 +1326,7 @@
- all_contexts.append(context)
-
- result = {}
-- for path, paths in path_mozbuilds.items():
-+ for path, paths in list(path_mozbuilds.items()):
- result[path] = reduce(lambda x, y: x + y, (contexts[p] for p in paths), [])
-
- return result, all_contexts
-@@ -1352,7 +1353,7 @@
-
- r = {}
-
-- for path, ctxs in paths.items():
-+ for path, ctxs in list(paths.items()):
- flags = Files(Context())
-
- for ctx in ctxs:
---- firefox-52.9.0esr/python/mozbuild/mozbuild/frontend/sandbox.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/frontend/sandbox.py (refactored)
-@@ -17,7 +17,7 @@
- user-friendly error messages in the case of errors.
- """
-
--from __future__ import absolute_import, unicode_literals
-+
-
- import os
- import sys
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/common.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/common.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import unicode_literals
-+
-
- from mach.logging import LoggingManager
-
-@@ -36,7 +36,7 @@
- }, **extra_substs)
-
- self.substs_unicode = ReadOnlyDict({k.decode('utf-8'): v.decode('utf-8',
-- 'replace') for k, v in self.substs.items()})
-+ 'replace') for k, v in list(self.substs.items())})
-
- self.defines = self.substs
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_base.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_base.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import unicode_literals
-+
-
- import json
- import os
-@@ -12,7 +12,7 @@
- import tempfile
- import unittest
-
--from cStringIO import StringIO
-+from io import StringIO
- from mozfile.mozfile import NamedTemporaryFile
-
- from mozunit import main
-@@ -93,7 +93,7 @@
- mozconfig = os.path.join(d, 'mozconfig')
- with open(mozconfig, 'wt') as fh:
- fh.write('mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/foo/@CONFIG_GUESS@')
-- print('Wrote mozconfig %s' % mozconfig)
-+ print(('Wrote mozconfig %s' % mozconfig))
-
- topobjdir = os.path.join(d, 'foo', guess)
- os.makedirs(topobjdir)
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_containers.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_containers.py (refactored)
-@@ -152,7 +152,7 @@
-
- self.assertEqual(test['foo'], 1)
-
-- self.assertEqual(test.keys(), ['foo', 'bar' ])
-+ self.assertEqual(list(test.keys()), ['foo', 'bar' ])
-
- def test_defaults(self):
- test = OrderedDefaultDict(bool, {'foo': 1 })
-@@ -161,7 +161,7 @@
-
- self.assertEqual(test['qux'], False)
-
-- self.assertEqual(test.keys(), ['foo', 'qux' ])
-+ self.assertEqual(list(test.keys()), ['foo', 'qux' ])
-
-
- class TestKeyedDefaultDict(unittest.TestCase):
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_dotproperties.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_dotproperties.py (refactored)
-@@ -1,11 +1,11 @@
- # -*- coding: utf-8 -*-
-
--from __future__ import unicode_literals
-+
-
- import os
- import unittest
-
--from StringIO import StringIO
-+from io import StringIO
-
- import mozpack.path as mozpath
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_expression.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_expression.py (refactored)
-@@ -25,8 +25,8 @@
-
- def test_in(self):
- """test 'var in context' to not fall for fallback"""
-- self.assert_('FAIL' in self.c)
-- self.assert_('PASS' not in self.c)
-+ self.assertTrue('FAIL' in self.c)
-+ self.assertTrue('PASS' not in self.c)
-
- class TestExpression(unittest.TestCase):
- """
-@@ -48,16 +48,16 @@
-
- def test_not(self):
- """Test for the ! operator"""
-- self.assert_(Expression('!0').evaluate(self.c))
-- self.assert_(not Expression('!1').evaluate(self.c))
-+ self.assertTrue(Expression('!0').evaluate(self.c))
-+ self.assertTrue(not Expression('!1').evaluate(self.c))
-
- def test_equals(self):
- """ Test for the == operator"""
-- self.assert_(Expression('FAIL == PASS').evaluate(self.c))
-+ self.assertTrue(Expression('FAIL == PASS').evaluate(self.c))
-
- def test_notequals(self):
- """ Test for the != operator"""
-- self.assert_(Expression('FAIL != 1').evaluate(self.c))
-+ self.assertTrue(Expression('FAIL != 1').evaluate(self.c))
-
- def test_logical_and(self):
- """ Test for the && operator"""
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_jarmaker.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_jarmaker.py (refactored)
-@@ -2,14 +2,14 @@
- # 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/.
-
--from __future__ import print_function
-+
- import unittest
-
- import os, sys, os.path, time, inspect
- from filecmp import dircmp
- from tempfile import mkdtemp
- from shutil import rmtree, copy2
--from StringIO import StringIO
-+from io import StringIO
- from zipfile import ZipFile
- import mozunit
-
-@@ -117,12 +117,12 @@
- """Helper to report rich results on difference between two directories.
- """
- def _fillDiff(self, dc, rv, basepath="{0}"):
-- rv['right_only'] += map(lambda l: basepath.format(l), dc.right_only)
-- rv['left_only'] += map(lambda l: basepath.format(l), dc.left_only)
-- rv['diff_files'] += map(lambda l: basepath.format(l), dc.diff_files)
-- rv['funny'] += map(lambda l: basepath.format(l), dc.common_funny)
-- rv['funny'] += map(lambda l: basepath.format(l), dc.funny_files)
-- for subdir, _dc in dc.subdirs.iteritems():
-+ rv['right_only'] += [basepath.format(l) for l in dc.right_only]
-+ rv['left_only'] += [basepath.format(l) for l in dc.left_only]
-+ rv['diff_files'] += [basepath.format(l) for l in dc.diff_files]
-+ rv['funny'] += [basepath.format(l) for l in dc.common_funny]
-+ rv['funny'] += [basepath.format(l) for l in dc.funny_files]
-+ for subdir, _dc in dc.subdirs.items():
- self._fillDiff(_dc, rv, basepath.format(subdir + "/{0}"))
- def allResults(self, left, right):
- rv = {'right_only':[], 'left_only':[],
-@@ -295,7 +295,7 @@
- ('hoge', 'foo', '2'): ('qux', 'foo', '2'),
- ('hoge', 'baz'): ('qux', 'baz'),
- }
-- for dest, src in expected_symlinks.iteritems():
-+ for dest, src in expected_symlinks.items():
- srcpath = os.path.join(self.srcdir, *src)
- destpath = os.path.join(self.builddir, 'chrome', 'test', 'dir',
- *dest)
-@@ -317,7 +317,7 @@
- def test_en_US(self):
- jm = self.jm
- jm.makeJar(self.fake_empty_file, '/NO_OUTPUT_REQUIRED')
-- self.assertEquals(jm.localedirs,
-+ self.assertEqual(jm.localedirs,
- [
- os.path.join(os.path.abspath('/TOPSOURCEDIR'),
- 'browser/locales', 'en-US')
-@@ -326,13 +326,13 @@
- jm = self.jm
- jm.l10nbase = '/L10N_BASE'
- jm.makeJar(self.fake_empty_file, '/NO_OUTPUT_REQUIRED')
-- self.assertEquals(jm.localedirs, [os.path.join('/L10N_BASE', 'browser')])
-+ self.assertEqual(jm.localedirs, [os.path.join('/L10N_BASE', 'browser')])
- def test_l10n_merge(self):
- jm = self.jm
- jm.l10nbase = '/L10N_BASE'
- jm.l10nmerge = '/L10N_MERGE'
- jm.makeJar(self.fake_empty_file, '/NO_OUTPUT_REQUIRED')
-- self.assertEquals(jm.localedirs,
-+ self.assertEqual(jm.localedirs,
- [os.path.join('/L10N_MERGE', 'browser'),
- os.path.join('/L10N_BASE', 'browser'),
- os.path.join(os.path.abspath('/TOPSOURCEDIR'),
-@@ -346,7 +346,7 @@
- ''')
- jarcontents.name = 'override.mn'
- jm.makeJar(jarcontents, '/NO_OUTPUT_REQUIRED')
-- self.assertEquals(jm.localedirs,
-+ self.assertEqual(jm.localedirs,
- [
- os.path.join(os.path.abspath('/TOPSOURCEDIR'),
- 'dom/locales', 'en-US')
-@@ -360,7 +360,7 @@
- ''')
- jarcontents.name = 'override.mn'
- jm.makeJar(jarcontents, '/NO_OUTPUT_REQUIRED')
-- self.assertEquals(jm.localedirs, [os.path.join('/L10N_BASE', 'dom')])
-+ self.assertEqual(jm.localedirs, [os.path.join('/L10N_BASE', 'dom')])
-
-
- if __name__ == '__main__':
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_line_endings.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_line_endings.py (refactored)
-@@ -1,6 +1,6 @@
- import unittest
-
--from StringIO import StringIO
-+from io import StringIO
- import os
- import sys
- import os.path
-@@ -30,17 +30,17 @@
- def testMac(self):
- self.createFile(['\x0D']*3)
- self.pp.do_include(self.tempnam)
-- self.assertEquals(self.pp.out.getvalue(), 'a\nb\nc\n')
-+ self.assertEqual(self.pp.out.getvalue(), 'a\nb\nc\n')
-
- def testUnix(self):
- self.createFile(['\x0A']*3)
- self.pp.do_include(self.tempnam)
-- self.assertEquals(self.pp.out.getvalue(), 'a\nb\nc\n')
-+ self.assertEqual(self.pp.out.getvalue(), 'a\nb\nc\n')
-
- def testWindows(self):
- self.createFile(['\x0D\x0A']*3)
- self.pp.do_include(self.tempnam)
-- self.assertEquals(self.pp.out.getvalue(), 'a\nb\nc\n')
-+ self.assertEqual(self.pp.out.getvalue(), 'a\nb\nc\n')
-
- if __name__ == '__main__':
- mozunit.main()
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_makeutil.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_makeutil.py (refactored)
-@@ -11,7 +11,7 @@
- from mozunit import main
- import os
- import unittest
--from StringIO import StringIO
-+from io import StringIO
-
-
- class TestMakefile(unittest.TestCase):
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_mozconfig.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_mozconfig.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import unicode_literals
-+
-
- import os
- import unittest
-@@ -480,9 +480,9 @@
-
- self.assertTrue(e.exception.message.startswith(
- 'Evaluation of your mozconfig exited with an error'))
-- self.assertEquals(e.exception.path,
-+ self.assertEqual(e.exception.path,
- mozconfig.name.replace(os.sep, '/'))
-- self.assertEquals(e.exception.output, ['hello world'])
-+ self.assertEqual(e.exception.output, ['hello world'])
-
-
- if __name__ == '__main__':
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_mozinfo.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_mozinfo.py (refactored)
-@@ -8,7 +8,7 @@
- import tempfile
- import unittest
-
--from StringIO import StringIO
-+from io import StringIO
-
- import mozunit
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_preprocessor.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_preprocessor.py (refactored)
-@@ -4,7 +4,7 @@
-
- import unittest
-
--from StringIO import StringIO
-+from io import StringIO
- import os
- import shutil
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_pythonutil.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_pythonutil.py (refactored)
-@@ -12,7 +12,7 @@
- def test_iter_modules_in_path(self):
- mozbuild_path = os.path.normcase(os.path.dirname(os.path.dirname(__file__)))
- paths = list(iter_modules_in_path(mozbuild_path))
-- self.assertEquals(sorted(paths), [
-+ self.assertEqual(sorted(paths), [
- os.path.join(os.path.abspath(mozbuild_path), '__init__.py'),
- os.path.join(os.path.abspath(mozbuild_path), 'pythonutil.py'),
- os.path.join(os.path.abspath(mozbuild_path), 'test', 'test_pythonutil.py'),
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_testing.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_testing.py (refactored)
-@@ -2,9 +2,9 @@
- # 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/.
-
--from __future__ import unicode_literals
--
--import cPickle as pickle
-+
-+
-+import pickle as pickle
- import os
- import shutil
- import tempfile
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_util.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/test_util.py (refactored)
-@@ -3,7 +3,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/.
-
--from __future__ import unicode_literals
-+
-
- import itertools
- import hashlib
-@@ -110,7 +110,7 @@
- '''
- def __call__(self, name, mode):
- if 'w' in mode:
-- raise Exception, 'Unexpected open with write mode'
-+ raise Exception('Unexpected open with write mode')
- return MockedOpen.__call__(self, name, mode)
-
- with MyMockedOpen({'file': 'content'}):
-@@ -432,7 +432,7 @@
- self.assertEqual(len(l), 0)
- original = ['a', 'b', 'c']
- l = ListWithAction(['a', 'b', 'c'], action=self.action)
-- expected = map(self.action, original)
-+ expected = list(map(self.action, original))
- self.assertSameList(expected, l)
-
- with self.assertRaises(ValueError):
-@@ -445,7 +445,7 @@
- l = ListWithAction(action=self.action)
- original = ['a', 'b']
- l.extend(original)
-- expected = map(self.action, original)
-+ expected = list(map(self.action, original))
- self.assertSameList(expected, l)
-
- with self.assertRaises(ValueError):
-@@ -455,7 +455,7 @@
- l = ListWithAction(action=self.action)
- original = ['a', 'b']
- l[:] = original
-- expected = map(self.action, original)
-+ expected = list(map(self.action, original))
- self.assertSameList(expected, l)
-
- with self.assertRaises(ValueError):
-@@ -465,7 +465,7 @@
- l = ListWithAction(action=self.action)
- original = ['a', 'b']
- l2 = l + original
-- expected = map(self.action, original)
-+ expected = list(map(self.action, original))
- self.assertSameList(expected, l2)
-
- with self.assertRaises(ValueError):
-@@ -475,7 +475,7 @@
- l = ListWithAction(action=self.action)
- original = ['a', 'b']
- l += original
-- expected = map(self.action, original)
-+ expected = list(map(self.action, original))
- self.assertSameList(expected, l)
-
- with self.assertRaises(ValueError):
-@@ -524,7 +524,7 @@
-
- def test_strict_ordering_on_append_list_with_flags_factory_extend(self):
- FooList = StrictOrderingOnAppendListWithFlagsFactory({
-- 'foo': bool, 'bar': unicode
-+ 'foo': bool, 'bar': str
- })
- foo = FooList(['a', 'b', 'c'])
- foo['a'].foo = True
-@@ -532,7 +532,7 @@
-
- # Don't allow extending lists with different flag definitions.
- BarList = StrictOrderingOnAppendListWithFlagsFactory({
-- 'foo': unicode, 'baz': bool
-+ 'foo': str, 'baz': bool
- })
- bar = BarList(['d', 'e', 'f'])
- bar['d'].foo = 'foo'
-@@ -752,9 +752,9 @@
-
- class TypedTestStrictOrderingOnAppendList(unittest.TestCase):
- def test_init(self):
-- class Unicode(unicode):
-+ class Unicode(str):
- def __init__(self, other):
-- if not isinstance(other, unicode):
-+ if not isinstance(other, str):
- raise ValueError()
- super(Unicode, self).__init__(other)
-
-@@ -776,14 +776,14 @@
-
- class TestTypedNamedTuple(unittest.TestCase):
- def test_simple(self):
-- FooBar = TypedNamedTuple('FooBar', [('foo', unicode), ('bar', int)])
-+ FooBar = TypedNamedTuple('FooBar', [('foo', str), ('bar', int)])
-
- t = FooBar(foo='foo', bar=2)
-- self.assertEquals(type(t), FooBar)
-- self.assertEquals(t.foo, 'foo')
-- self.assertEquals(t.bar, 2)
-- self.assertEquals(t[0], 'foo')
-- self.assertEquals(t[1], 2)
-+ self.assertEqual(type(t), FooBar)
-+ self.assertEqual(t.foo, 'foo')
-+ self.assertEqual(t.bar, 2)
-+ self.assertEqual(t[0], 'foo')
-+ self.assertEqual(t[1], 2)
-
- FooBar('foo', 2)
-
-@@ -796,7 +796,7 @@
- # arguments.
- t1 = ('foo', 3)
- t2 = FooBar(t1)
-- self.assertEquals(type(t2), FooBar)
-+ self.assertEqual(type(t2), FooBar)
- self.assertEqual(FooBar(t1), FooBar('foo', 3))
-
-
-@@ -871,18 +871,18 @@
- CompilerType = EnumString.subclass('msvc', 'gcc', 'clang', 'clang-cl')
-
- type = CompilerType('msvc')
-- self.assertEquals(type, 'msvc')
-- self.assertNotEquals(type, 'gcc')
-- self.assertNotEquals(type, 'clang')
-- self.assertNotEquals(type, 'clang-cl')
-+ self.assertEqual(type, 'msvc')
-+ self.assertNotEqual(type, 'gcc')
-+ self.assertNotEqual(type, 'clang')
-+ self.assertNotEqual(type, 'clang-cl')
- self.assertIn(type, ('msvc', 'clang-cl'))
- self.assertNotIn(type, ('gcc', 'clang'))
-
- with self.assertRaises(EnumStringComparisonError):
-- self.assertEquals(type, 'foo')
-+ self.assertEqual(type, 'foo')
-
- with self.assertRaises(EnumStringComparisonError):
-- self.assertNotEquals(type, 'foo')
-+ self.assertNotEqual(type, 'foo')
-
- with self.assertRaises(EnumStringComparisonError):
- self.assertIn(type, ('foo', 'gcc'))
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/action/test_buildlist.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/action/test_buildlist.py (refactored)
-@@ -38,11 +38,11 @@
- lines = [line.rstrip() for line in f.readlines()]
- f.close()
- for line in lines:
-- self.assert_(len(l) > 0,
-+ self.assertTrue(len(l) > 0,
- "ran out of expected lines! (expected '{0}', got '{1}')"
- .format(l, lines))
- self.assertEqual(line, l.pop(0))
-- self.assert_(len(l) == 0,
-+ self.assertTrue(len(l) == 0,
- "not enough lines in file! (expected '{0}',"
- " got '{1}'".format(l, lines))
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/action/test_generate_browsersearch.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/action/test_generate_browsersearch.py (refactored)
-@@ -3,7 +3,7 @@
- # Any copyright is dedicated to the Public Domain.
- # http://creativecommons.org/publicdomain/zero/1.0/
-
--from __future__ import unicode_literals
-+
-
- import json
- import os
-@@ -43,8 +43,8 @@
-
- def test_valid_unicode(self):
- o = self._test_one('valid-zh-CN')
-- self.assertEquals(o['default'], '百度')
-- self.assertEquals(o['engines'], ['百度', 'Google'])
-+ self.assertEqual(o['default'], '百度')
-+ self.assertEqual(o['engines'], ['百度', 'Google'])
-
- def test_invalid_unicode(self):
- with self.assertRaises(UnicodeDecodeError):
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/action/test_package_fennec_apk.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/action/test_package_fennec_apk.py (refactored)
-@@ -3,7 +3,7 @@
- # Any copyright is dedicated to the Public Domain.
- # http://creativecommons.org/publicdomain/zero/1.0/
-
--from __future__ import unicode_literals
-+
-
- import os
- import unittest
-@@ -41,14 +41,14 @@
- root_files=[data('root_file.txt')])
-
- # omni.ja ends up in assets/omni.ja.
-- self.assertEquals(jarrer['assets/omni.ja'].open().read().strip(), 'omni.ja')
-+ self.assertEqual(jarrer['assets/omni.ja'].open().read().strip(), 'omni.ja')
-
- # Everything else is in place.
- for name in ('classes.dex',
- 'assets/asset.txt',
- 'lib/lib.txt',
- 'root_file.txt'):
-- self.assertEquals(jarrer[name].open().read().strip(), name)
-+ self.assertEqual(jarrer[name].open().read().strip(), name)
-
- def test_inputs(self):
- # Language repacks take updated resources from an ap_ and pack them
-@@ -57,8 +57,8 @@
- # overrides the first.
- jarrer = package(inputs=[data('input2.apk'), data('input1.ap_')])
-
-- files1 = JarReader(data('input1.ap_')).entries.keys()
-- files2 = JarReader(data('input2.apk')).entries.keys()
-+ files1 = list(JarReader(data('input1.ap_')).entries.keys())
-+ files2 = list(JarReader(data('input2.apk')).entries.keys())
- for name in files2:
- self.assertTrue(name in files1 or
- jarrer[name].open().read().startswith('input2/'))
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/backend/common.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/backend/common.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import unicode_literals
-+
-
- import os
- import unittest
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/backend/test_android_eclipse.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/backend/test_android_eclipse.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import unicode_literals
-+
-
- import json
- import os
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/backend/test_build.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/backend/test_build.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import unicode_literals, print_function
-+
-
- import buildconfig
- import os
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/backend/test_configenvironment.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/backend/test_configenvironment.py (refactored)
-@@ -3,7 +3,7 @@
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- import os, posixpath
--from StringIO import StringIO
-+from io import StringIO
- import unittest
- from mozunit import main, MockedOpen
-
-@@ -29,7 +29,7 @@
- self.substs = ReadOnlyDict(d)
-
- d = dict(self.substs_unicode)
-- d[u'top_srcdir'] = top_srcdir.decode('utf-8')
-+ d['top_srcdir'] = top_srcdir.decode('utf-8')
- self.substs_unicode = ReadOnlyDict(d)
-
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/backend/test_recursivemake.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/backend/test_recursivemake.py (refactored)
-@@ -2,9 +2,9 @@
- # 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/.
-
--from __future__ import unicode_literals
--
--import cPickle as pickle
-+
-+
-+import pickle as pickle
- import json
- import os
- import unittest
-@@ -331,7 +331,7 @@
- ],
- }
-
-- for var, val in expected.items():
-+ for var, val in list(expected.items()):
- # print("test_variable_passthru[%s]" % (var))
- found = [str for str in lines if str.startswith(var)]
- self.assertEqual(found, val)
-@@ -370,7 +370,7 @@
- ],
- }
-
-- for var, val in expected.items():
-+ for var, val in list(expected.items()):
- found = [str for str in lines if str.startswith(var)]
- self.assertEqual(found, val)
-
-@@ -544,7 +544,7 @@
-
- # This is not the most robust test in the world, but it gets the job
- # done.
-- entries = [e for e in m._dests.keys() if '**' in e]
-+ entries = [e for e in list(m._dests.keys()) if '**' in e]
- self.assertEqual(len(entries), 1)
- self.assertIn('support/**', entries[0])
-
-@@ -562,7 +562,7 @@
- set(['child/test_sub.js',
- 'child/data/**',
- 'child/another-file.sjs']))
-- for key in test_installs.keys():
-+ for key in list(test_installs.keys()):
- self.assertIn(key, test_installs)
-
- test_files_manifest = mozpath.join(env.topobjdir,
-@@ -576,7 +576,7 @@
- # Then, synthesize one from the test-installs.pkl file. This should
- # allow us to re-create a subset of the above.
- synthesized_manifest = InstallManifest()
-- for item, installs in test_installs.items():
-+ for item, installs in list(test_installs.items()):
- for install_info in installs:
- if len(install_info) == 3:
- synthesized_manifest.add_pattern_symlink(*install_info)
-@@ -584,7 +584,7 @@
- synthesized_manifest.add_symlink(*install_info)
-
- self.assertEqual(len(synthesized_manifest), 3)
-- for item, info in synthesized_manifest._dests.items():
-+ for item, info in list(synthesized_manifest._dests.items()):
- self.assertIn(item, m)
- self.assertEqual(info, m._dests[item])
-
-@@ -758,7 +758,7 @@
- expected[mozpath.join(env.topobjdir, 'final-target')] = [
- 'FINAL_TARGET = $(DEPTH)/random-final-target'
- ]
-- for key, expected_rules in expected.iteritems():
-+ for key, expected_rules in expected.items():
- backend_path = mozpath.join(key, 'backend.mk')
- lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
- found = [str for str in lines if
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/backend/test_visualstudio.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/backend/test_visualstudio.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import unicode_literals
-+
-
- from xml.dom.minidom import parse
- import os
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/configure/common.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/configure/common.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import copy
- import errno
-@@ -16,7 +16,7 @@
- from mozbuild.util import ReadOnlyNamespace
- from mozpack import path as mozpath
-
--from StringIO import StringIO
-+from io import StringIO
- from which import WhichError
-
- from buildconfig import (
-@@ -78,10 +78,10 @@
- self._search_path = environ.get('PATH', '').split(os.pathsep)
-
- self._subprocess_paths = {
-- mozpath.abspath(k): v for k, v in paths.iteritems() if v
-+ mozpath.abspath(k): v for k, v in paths.items() if v
- }
-
-- paths = paths.keys()
-+ paths = list(paths.keys())
-
- environ = dict(environ)
- if 'CONFIG_SHELL' not in environ:
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/configure/lint.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/configure/lint.py (refactored)
-@@ -2,11 +2,11 @@
- # 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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import os
- import unittest
--from StringIO import StringIO
-+from io import StringIO
- from mozunit import main
- from buildconfig import (
- topobjdir,
-@@ -42,9 +42,7 @@
- return type.__new__(mcs, name, bases, attrs)
-
-
--class Lint(unittest.TestCase):
-- __metaclass__ = LintMeta
--
-+class Lint(unittest.TestCase, metaclass=LintMeta):
- def setUp(self):
- self._curdir = os.getcwd()
- os.chdir(topobjdir)
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/configure/test_checks_configure.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/configure/test_checks_configure.py (refactored)
-@@ -2,9 +2,9 @@
- # 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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
--
--from StringIO import StringIO
-+
-+
-+from io import StringIO
- import os
- import sys
- import textwrap
-@@ -447,7 +447,7 @@
- checking for a... %s
- ''' % self.OTHER_A))
-
-- dirs = map(mozpath.dirname, (self.OTHER_A, self.KNOWN_A))
-+ dirs = list(map(mozpath.dirname, (self.OTHER_A, self.KNOWN_A)))
- config, out, status = self.get_result(textwrap.dedent('''\
- check_prog("A", ("known-a",), paths=["%s"])
- ''' % os.pathsep.join(dirs)))
-@@ -457,7 +457,7 @@
- checking for a... %s
- ''' % self.OTHER_A))
-
-- dirs = map(mozpath.dirname, (self.KNOWN_A, self.KNOWN_B))
-+ dirs = list(map(mozpath.dirname, (self.KNOWN_A, self.KNOWN_B)))
- config, out, status = self.get_result(textwrap.dedent('''\
- check_prog("A", ("known-a",), paths=["%s", "%s"])
- ''' % (os.pathsep.join(dirs), self.OTHER_A)))
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/configure/test_compile_checks.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/configure/test_compile_checks.py (refactored)
-@@ -2,14 +2,14 @@
- # 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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import os
- import textwrap
- import unittest
- import mozpack.path as mozpath
-
--from StringIO import StringIO
-+from io import StringIO
-
- from buildconfig import topsrcdir
- from common import ConfigureTestSandbox
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/configure/test_configure.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/configure/test_configure.py (refactored)
-@@ -2,9 +2,9 @@
- # 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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
--
--from StringIO import StringIO
-+
-+
-+from io import StringIO
- import os
- import sys
- import textwrap
-@@ -43,7 +43,7 @@
-
- if '--help' in options:
- return out.getvalue(), config
-- self.assertEquals('', out.getvalue())
-+ self.assertEqual('', out.getvalue())
- return config
-
- def moz_configure(self, source):
-@@ -55,7 +55,7 @@
- def test_defaults(self):
- config = self.get_config()
- self.maxDiff = None
-- self.assertEquals({
-+ self.assertEqual({
- 'CHOICES': NegativeOptionValue(),
- 'DEFAULTED': PositiveOptionValue(('not-simple',)),
- 'IS_GCC': NegativeOptionValue(),
-@@ -71,9 +71,9 @@
- def test_help(self):
- help, config = self.get_config(['--help'], prog='configure')
-
-- self.assertEquals({}, config)
-+ self.assertEqual({}, config)
- self.maxDiff = None
-- self.assertEquals(
-+ self.assertEqual(
- 'Usage: configure [options]\n'
- '\n'
- 'Options: [defaults in brackets after descriptions]\n'
-@@ -109,7 +109,7 @@
- ):
- self.assertNotIn('ENABLED_SIMPLE', config)
- self.assertIn('SIMPLE', config)
-- self.assertEquals(NegativeOptionValue(), config['SIMPLE'])
-+ self.assertEqual(NegativeOptionValue(), config['SIMPLE'])
-
- for config in (
- self.get_config(['--enable-simple']),
-@@ -117,7 +117,7 @@
- ):
- self.assertIn('ENABLED_SIMPLE', config)
- self.assertIn('SIMPLE', config)
-- self.assertEquals(PositiveOptionValue(), config['SIMPLE'])
-+ self.assertEqual(PositiveOptionValue(), config['SIMPLE'])
- self.assertIs(config['SIMPLE'], config['ENABLED_SIMPLE'])
-
- # --enable-simple doesn't take values.
-@@ -135,7 +135,7 @@
- env={'MOZ_WITH_ENV': '1'}),
- ):
- self.assertIn('WITH_ENV', config)
-- self.assertEquals(NegativeOptionValue(), config['WITH_ENV'])
-+ self.assertEqual(NegativeOptionValue(), config['WITH_ENV'])
-
- for config in (
- self.get_config(['--enable-with-env']),
-@@ -145,7 +145,7 @@
- env={'MOZ_WITH_ENV': ''}),
- ):
- self.assertIn('WITH_ENV', config)
-- self.assertEquals(PositiveOptionValue(), config['WITH_ENV'])
-+ self.assertEqual(PositiveOptionValue(), config['WITH_ENV'])
-
- with self.assertRaises(InvalidOptionError):
- self.get_config(['--enable-with-env=value'])
-@@ -160,23 +160,23 @@
- self.get_config(['--enable-values', '--disable-values']),
- ):
- self.assertIn(name, config)
-- self.assertEquals(NegativeOptionValue(), config[name])
-+ self.assertEqual(NegativeOptionValue(), config[name])
-
- for config in (
- self.get_config(['--enable-values']),
- self.get_config(['--disable-values', '--enable-values']),
- ):
- self.assertIn(name, config)
-- self.assertEquals(PositiveOptionValue(), config[name])
-+ self.assertEqual(PositiveOptionValue(), config[name])
-
- config = self.get_config(['--enable-values=foo'])
- self.assertIn(name, config)
-- self.assertEquals(PositiveOptionValue(('foo',)), config[name])
-+ self.assertEqual(PositiveOptionValue(('foo',)), config[name])
-
- config = self.get_config(['--enable-values=foo,bar'])
- self.assertIn(name, config)
- self.assertTrue(config[name])
-- self.assertEquals(PositiveOptionValue(('foo', 'bar')), config[name])
-+ self.assertEqual(PositiveOptionValue(('foo', 'bar')), config[name])
-
- def test_values2(self):
- self.test_values('VALUES2')
-@@ -187,12 +187,12 @@
- def test_returned_default(self):
- config = self.get_config(['--enable-simple'])
- self.assertIn('DEFAULTED', config)
-- self.assertEquals(
-+ self.assertEqual(
- PositiveOptionValue(('simple',)), config['DEFAULTED'])
-
- config = self.get_config(['--disable-simple'])
- self.assertIn('DEFAULTED', config)
-- self.assertEquals(
-+ self.assertEqual(
- PositiveOptionValue(('not-simple',)), config['DEFAULTED'])
-
- def test_returned_choices(self):
-@@ -200,13 +200,13 @@
- config = self.get_config(
- ['--enable-values=alpha', '--returned-choices=%s' % val])
- self.assertIn('CHOICES', config)
-- self.assertEquals(PositiveOptionValue((val,)), config['CHOICES'])
-+ self.assertEqual(PositiveOptionValue((val,)), config['CHOICES'])
-
- for val in ('0', '1', '2'):
- config = self.get_config(
- ['--enable-values=numeric', '--returned-choices=%s' % val])
- self.assertIn('CHOICES', config)
-- self.assertEquals(PositiveOptionValue((val,)), config['CHOICES'])
-+ self.assertEqual(PositiveOptionValue((val,)), config['CHOICES'])
-
- with self.assertRaises(InvalidOptionError):
- self.get_config(['--enable-values=numeric',
-@@ -218,12 +218,12 @@
- def test_included(self):
- config = self.get_config(env={'CC': 'gcc'})
- self.assertIn('IS_GCC', config)
-- self.assertEquals(config['IS_GCC'], True)
-+ self.assertEqual(config['IS_GCC'], True)
-
- config = self.get_config(
- ['--enable-include=extra.configure', '--extra'])
- self.assertIn('EXTRA', config)
-- self.assertEquals(PositiveOptionValue(), config['EXTRA'])
-+ self.assertEqual(PositiveOptionValue(), config['EXTRA'])
-
- with self.assertRaises(InvalidOptionError):
- self.get_config(['--extra'])
-@@ -231,7 +231,7 @@
- def test_template(self):
- config = self.get_config(env={'CC': 'gcc'})
- self.assertIn('CFLAGS', config)
-- self.assertEquals(config['CFLAGS'], ['-Werror=foobar'])
-+ self.assertEqual(config['CFLAGS'], ['-Werror=foobar'])
-
- config = self.get_config(env={'CC': 'clang'})
- self.assertNotIn('CFLAGS', config)
-@@ -288,7 +288,7 @@
- sandbox
- )
-
-- import __builtin__
-+ import builtins
- self.assertIs(sandbox['foo'](), __builtin__)
-
- exec_(textwrap.dedent('''
-@@ -300,7 +300,7 @@
- )
-
- f = sandbox['foo']()
-- self.assertEquals(f.name, os.devnull)
-+ self.assertEqual(f.name, os.devnull)
- f.close()
-
- # This unlocks the sandbox
-@@ -336,8 +336,8 @@
- self.assertIs(sandbox['foo'](), sandbox)
-
- # Nothing leaked from the function being executed
-- self.assertEquals(sandbox.keys(), ['__builtins__', 'foo'])
-- self.assertEquals(sandbox['__builtins__'], ConfigureSandbox.BUILTINS)
-+ self.assertEqual(list(sandbox.keys()), ['__builtins__', 'foo'])
-+ self.assertEqual(sandbox['__builtins__'], ConfigureSandbox.BUILTINS)
-
- exec_(textwrap.dedent('''
- @template
-@@ -354,7 +354,7 @@
- with self.assertRaises(NameError) as e:
- sandbox._depends[sandbox['bar']].result
-
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "global name 'sys' is not defined")
-
- def test_apply_imports(self):
-@@ -380,28 +380,28 @@
- sandbox
- )
-
-- self.assertEquals(len(imports), 1)
-+ self.assertEqual(len(imports), 1)
-
- def test_os_path(self):
- config = self.get_config(['--with-imports=%s' % __file__])
- self.assertIn('HAS_ABSPATH', config)
-- self.assertEquals(config['HAS_ABSPATH'], True)
-+ self.assertEqual(config['HAS_ABSPATH'], True)
- self.assertIn('HAS_GETATIME', config)
-- self.assertEquals(config['HAS_GETATIME'], True)
-+ self.assertEqual(config['HAS_GETATIME'], True)
- self.assertIn('HAS_GETATIME2', config)
-- self.assertEquals(config['HAS_GETATIME2'], False)
-+ self.assertEqual(config['HAS_GETATIME2'], False)
-
- def test_template_call(self):
- config = self.get_config(env={'CC': 'gcc'})
- self.assertIn('TEMPLATE_VALUE', config)
-- self.assertEquals(config['TEMPLATE_VALUE'], 42)
-+ self.assertEqual(config['TEMPLATE_VALUE'], 42)
- self.assertIn('TEMPLATE_VALUE_2', config)
-- self.assertEquals(config['TEMPLATE_VALUE_2'], 21)
-+ self.assertEqual(config['TEMPLATE_VALUE_2'], 21)
-
- def test_template_imports(self):
- config = self.get_config(['--enable-imports-in-template'])
- self.assertIn('PLATFORM', config)
-- self.assertEquals(config['PLATFORM'], sys.platform)
-+ self.assertEqual(config['PLATFORM'], sys.platform)
-
- def test_decorators(self):
- config = {}
-@@ -419,27 +419,27 @@
- return self.get_config(*args, configure='set_config.configure')
-
- help, config = get_config(['--help'])
-- self.assertEquals(config, {})
-+ self.assertEqual(config, {})
-
- config = get_config(['--set-foo'])
- self.assertIn('FOO', config)
-- self.assertEquals(config['FOO'], True)
-+ self.assertEqual(config['FOO'], True)
-
- config = get_config(['--set-bar'])
- self.assertNotIn('FOO', config)
- self.assertIn('BAR', config)
-- self.assertEquals(config['BAR'], True)
-+ self.assertEqual(config['BAR'], True)
-
- config = get_config(['--set-value=qux'])
- self.assertIn('VALUE', config)
-- self.assertEquals(config['VALUE'], 'qux')
-+ self.assertEqual(config['VALUE'], 'qux')
-
- config = get_config(['--set-name=hoge'])
- self.assertIn('hoge', config)
-- self.assertEquals(config['hoge'], True)
-+ self.assertEqual(config['hoge'], True)
-
- config = get_config([])
-- self.assertEquals(config, {'BAR': False})
-+ self.assertEqual(config, {'BAR': False})
-
- with self.assertRaises(ConfigureError):
- # Both --set-foo and --set-name=FOO are going to try to
-@@ -454,11 +454,11 @@
- set_config('QUX', 'qux', when='--with-qux')
- '''):
- config = self.get_config()
-- self.assertEquals(config, {
-+ self.assertEqual(config, {
- 'FOO': 'foo',
- })
- config = self.get_config(['--with-qux'])
-- self.assertEquals(config, {
-+ self.assertEqual(config, {
- 'FOO': 'foo',
- 'QUX': 'qux',
- })
-@@ -468,27 +468,27 @@
- return self.get_config(*args, configure='set_define.configure')
-
- help, config = get_config(['--help'])
-- self.assertEquals(config, {'DEFINES': {}})
-+ self.assertEqual(config, {'DEFINES': {}})
-
- config = get_config(['--set-foo'])
- self.assertIn('FOO', config['DEFINES'])
-- self.assertEquals(config['DEFINES']['FOO'], True)
-+ self.assertEqual(config['DEFINES']['FOO'], True)
-
- config = get_config(['--set-bar'])
- self.assertNotIn('FOO', config['DEFINES'])
- self.assertIn('BAR', config['DEFINES'])
-- self.assertEquals(config['DEFINES']['BAR'], True)
-+ self.assertEqual(config['DEFINES']['BAR'], True)
-
- config = get_config(['--set-value=qux'])
- self.assertIn('VALUE', config['DEFINES'])
-- self.assertEquals(config['DEFINES']['VALUE'], 'qux')
-+ self.assertEqual(config['DEFINES']['VALUE'], 'qux')
-
- config = get_config(['--set-name=hoge'])
- self.assertIn('hoge', config['DEFINES'])
-- self.assertEquals(config['DEFINES']['hoge'], True)
-+ self.assertEqual(config['DEFINES']['hoge'], True)
-
- config = get_config([])
-- self.assertEquals(config['DEFINES'], {'BAR': False})
-+ self.assertEqual(config['DEFINES'], {'BAR': False})
-
- with self.assertRaises(ConfigureError):
- # Both --set-foo and --set-name=FOO are going to try to
-@@ -503,11 +503,11 @@
- set_define('QUX', 'qux', when='--with-qux')
- '''):
- config = self.get_config()
-- self.assertEquals(config['DEFINES'], {
-+ self.assertEqual(config['DEFINES'], {
- 'FOO': 'foo',
- })
- config = self.get_config(['--with-qux'])
-- self.assertEquals(config['DEFINES'], {
-+ self.assertEqual(config['DEFINES'], {
- 'FOO': 'foo',
- 'QUX': 'qux',
- })
-@@ -518,19 +518,19 @@
- *args, configure='imply_option/simple.configure')
-
- help, config = get_config(['--help'])
-- self.assertEquals(config, {})
-+ self.assertEqual(config, {})
-
- config = get_config([])
-- self.assertEquals(config, {})
-+ self.assertEqual(config, {})
-
- config = get_config(['--enable-foo'])
- self.assertIn('BAR', config)
-- self.assertEquals(config['BAR'], PositiveOptionValue())
-+ self.assertEqual(config['BAR'], PositiveOptionValue())
-
- with self.assertRaises(InvalidOptionError) as e:
- get_config(['--enable-foo', '--disable-bar'])
-
-- self.assertEquals(
-+ self.assertEqual(
- e.exception.message,
- "'--enable-bar' implied by '--enable-foo' conflicts with "
- "'--disable-bar' from the command-line")
-@@ -541,31 +541,31 @@
- *args, configure='imply_option/negative.configure')
-
- help, config = get_config(['--help'])
-- self.assertEquals(config, {})
-+ self.assertEqual(config, {})
-
- config = get_config([])
-- self.assertEquals(config, {})
-+ self.assertEqual(config, {})
-
- config = get_config(['--enable-foo'])
- self.assertIn('BAR', config)
-- self.assertEquals(config['BAR'], NegativeOptionValue())
-+ self.assertEqual(config['BAR'], NegativeOptionValue())
-
- with self.assertRaises(InvalidOptionError) as e:
- get_config(['--enable-foo', '--enable-bar'])
-
-- self.assertEquals(
-+ self.assertEqual(
- e.exception.message,
- "'--disable-bar' implied by '--enable-foo' conflicts with "
- "'--enable-bar' from the command-line")
-
- config = get_config(['--disable-hoge'])
- self.assertIn('BAR', config)
-- self.assertEquals(config['BAR'], NegativeOptionValue())
-+ self.assertEqual(config['BAR'], NegativeOptionValue())
-
- with self.assertRaises(InvalidOptionError) as e:
- get_config(['--disable-hoge', '--enable-bar'])
-
-- self.assertEquals(
-+ self.assertEqual(
- e.exception.message,
- "'--disable-bar' implied by '--disable-hoge' conflicts with "
- "'--enable-bar' from the command-line")
-@@ -576,23 +576,23 @@
- *args, configure='imply_option/values.configure')
-
- help, config = get_config(['--help'])
-- self.assertEquals(config, {})
-+ self.assertEqual(config, {})
-
- config = get_config([])
-- self.assertEquals(config, {})
-+ self.assertEqual(config, {})
-
- config = get_config(['--enable-foo=a'])
- self.assertIn('BAR', config)
-- self.assertEquals(config['BAR'], PositiveOptionValue(('a',)))
-+ self.assertEqual(config['BAR'], PositiveOptionValue(('a',)))
-
- config = get_config(['--enable-foo=a,b'])
- self.assertIn('BAR', config)
-- self.assertEquals(config['BAR'], PositiveOptionValue(('a','b')))
-+ self.assertEqual(config['BAR'], PositiveOptionValue(('a','b')))
-
- with self.assertRaises(InvalidOptionError) as e:
- get_config(['--enable-foo=a,b', '--disable-bar'])
-
-- self.assertEquals(
-+ self.assertEqual(
- e.exception.message,
- "'--enable-bar=a,b' implied by '--enable-foo' conflicts with "
- "'--disable-bar' from the command-line")
-@@ -603,15 +603,15 @@
- *args, configure='imply_option/infer.configure')
-
- help, config = get_config(['--help'])
-- self.assertEquals(config, {})
-+ self.assertEqual(config, {})
-
- config = get_config([])
-- self.assertEquals(config, {})
-+ self.assertEqual(config, {})
-
- with self.assertRaises(InvalidOptionError) as e:
- get_config(['--enable-foo', '--disable-bar'])
-
-- self.assertEquals(
-+ self.assertEqual(
- e.exception.message,
- "'--enable-bar' implied by '--enable-foo' conflicts with "
- "'--disable-bar' from the command-line")
-@@ -619,7 +619,7 @@
- with self.assertRaises(ConfigureError) as e:
- self.get_config([], configure='imply_option/infer_ko.configure')
-
-- self.assertEquals(
-+ self.assertEqual(
- e.exception.message,
- "Cannot infer what implies '--enable-bar'. Please add a `reason` "
- "to the `imply_option` call.")
-@@ -630,25 +630,25 @@
- *args, configure='imply_option/imm.configure')
-
- help, config = get_config(['--help'])
-- self.assertEquals(config, {})
-+ self.assertEqual(config, {})
-
- config = get_config([])
-- self.assertEquals(config, {})
-+ self.assertEqual(config, {})
-
- config_path = mozpath.abspath(
- mozpath.join(test_data_path, 'imply_option', 'imm.configure'))
-
-- with self.assertRaisesRegexp(InvalidOptionError,
-+ with self.assertRaisesRegex(InvalidOptionError,
- "--enable-foo' implied by 'imply_option at %s:7' conflicts with "
- "'--disable-foo' from the command-line" % config_path):
- get_config(['--disable-foo'])
-
-- with self.assertRaisesRegexp(InvalidOptionError,
-+ with self.assertRaisesRegex(InvalidOptionError,
- "--enable-bar=foo,bar' implied by 'imply_option at %s:16' conflicts"
- " with '--enable-bar=a,b,c' from the command-line" % config_path):
- get_config(['--enable-bar=a,b,c'])
-
-- with self.assertRaisesRegexp(InvalidOptionError,
-+ with self.assertRaisesRegex(InvalidOptionError,
- "--enable-baz=BAZ' implied by 'imply_option at %s:25' conflicts"
- " with '--enable-baz=QUUX' from the command-line" % config_path):
- get_config(['--enable-baz=QUUX'])
-@@ -660,7 +660,7 @@
- '''):
- self.get_config()
-
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "`--with-foo`, emitted from `%s` line 2, is unknown."
- % mozpath.join(test_data_path, 'moz.configure'))
-
-@@ -675,7 +675,7 @@
- '''):
- self.get_config()
-
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "Unexpected type: 'int'")
-
- def test_imply_option_when(self):
-@@ -686,12 +686,12 @@
- set_config('QUX', depends('--with-qux')(lambda x: x))
- '''):
- config = self.get_config()
-- self.assertEquals(config, {
-+ self.assertEqual(config, {
- 'QUX': NegativeOptionValue(),
- })
-
- config = self.get_config(['--with-foo'])
-- self.assertEquals(config, {
-+ self.assertEqual(config, {
- 'QUX': PositiveOptionValue(),
- })
-
-@@ -700,7 +700,7 @@
- with self.moz_configure('option("--with-foo", help="foo")'):
- self.get_config()
-
-- self.assertEquals(
-+ self.assertEqual(
- e.exception.message,
- 'Option `--with-foo` is not handled ; reference it with a @depends'
- )
-@@ -712,7 +712,7 @@
- '''):
- self.get_config()
-
-- self.assertEquals(
-+ self.assertEqual(
- e.exception.message,
- 'Option `--with-foo` already defined'
- )
-@@ -724,7 +724,7 @@
- '''):
- self.get_config()
-
-- self.assertEquals(
-+ self.assertEqual(
- e.exception.message,
- 'Option `MOZ_FOO` already defined'
- )
-@@ -736,7 +736,7 @@
- '''):
- self.get_config()
-
-- self.assertEquals(
-+ self.assertEqual(
- e.exception.message,
- 'Option `MOZ_FOO` already defined'
- )
-@@ -748,7 +748,7 @@
- '''):
- self.get_config()
-
-- self.assertEquals(
-+ self.assertEqual(
- e.exception.message,
- 'Option `MOZ_FOO` already defined'
- )
-@@ -760,7 +760,7 @@
- '''):
- self.get_config()
-
-- self.assertEquals(
-+ self.assertEqual(
- e.exception.message,
- 'Option `--with-foo` already defined'
- )
-@@ -776,18 +776,18 @@
- set_config('QUX', depends('--with-qux', when='--with-foo')(lambda x: x))
- '''):
- config = self.get_config()
-- self.assertEquals(config, {
-+ self.assertEqual(config, {
- 'FOO': NegativeOptionValue(),
- })
-
- config = self.get_config(['--with-foo'])
-- self.assertEquals(config, {
-+ self.assertEqual(config, {
- 'FOO': PositiveOptionValue(),
- 'QUX': NegativeOptionValue(),
- })
-
- config = self.get_config(['--with-foo', '--with-qux'])
-- self.assertEquals(config, {
-+ self.assertEqual(config, {
- 'FOO': PositiveOptionValue(),
- 'QUX': PositiveOptionValue(),
- })
-@@ -795,7 +795,7 @@
- with self.assertRaises(InvalidOptionError) as e:
- self.get_config(['--with-bar'])
-
-- self.assertEquals(
-+ self.assertEqual(
- e.exception.message,
- '--with-bar is not available in this configuration'
- )
-@@ -803,7 +803,7 @@
- with self.assertRaises(InvalidOptionError) as e:
- self.get_config(['--with-qux'])
-
-- self.assertEquals(
-+ self.assertEqual(
- e.exception.message,
- '--with-qux is not available in this configuration'
- )
-@@ -811,18 +811,18 @@
- with self.assertRaises(InvalidOptionError) as e:
- self.get_config(['QUX=1'])
-
-- self.assertEquals(
-+ self.assertEqual(
- e.exception.message,
- 'QUX is not available in this configuration'
- )
-
- config = self.get_config(env={'QUX': '1'})
-- self.assertEquals(config, {
-+ self.assertEqual(config, {
- 'FOO': NegativeOptionValue(),
- })
-
- help, config = self.get_config(['--help'])
-- self.assertEquals(help, textwrap.dedent('''\
-+ self.assertEqual(help, textwrap.dedent('''\
- Usage: configure [options]
-
- Options: [defaults in brackets after descriptions]
-@@ -833,7 +833,7 @@
- '''))
-
- help, config = self.get_config(['--help', '--with-foo'])
-- self.assertEquals(help, textwrap.dedent('''\
-+ self.assertEqual(help, textwrap.dedent('''\
- Usage: configure [options]
-
- Options: [defaults in brackets after descriptions]
-@@ -851,7 +851,7 @@
- with self.assertRaises(ConfigureError) as e:
- self.get_config()
-
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- '@depends function needs the same `when` as '
- 'options it depends on')
-
-@@ -868,7 +868,7 @@
- with self.assertRaises(ConfigureError) as e:
- self.get_config()
-
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- '@depends function needs the same `when` as '
- 'options it depends on')
-
-@@ -877,7 +877,7 @@
- with self.moz_configure('include("../foo.configure")'):
- self.get_config()
-
-- self.assertEquals(
-+ self.assertEqual(
- e.exception.message,
- 'Cannot include `%s` because it is not in a subdirectory of `%s`'
- % (mozpath.normpath(mozpath.join(test_data_path, '..',
-@@ -892,7 +892,7 @@
- '''):
- self.get_config()
-
-- self.assertEquals(
-+ self.assertEqual(
- e.exception.message,
- 'Cannot include `%s` because it was included already.'
- % mozpath.normpath(mozpath.join(test_data_path,
-@@ -905,7 +905,7 @@
- '''):
- self.get_config()
-
-- self.assertEquals(e.exception.message, "Unexpected type: 'int'")
-+ self.assertEqual(e.exception.message, "Unexpected type: 'int'")
-
- def test_include_when(self):
- with MockedOpen({
-@@ -948,26 +948,26 @@
- '''),
- }):
- config = self.get_config()
-- self.assertEquals(config, {})
-+ self.assertEqual(config, {})
-
- config = self.get_config(['--with-foo'])
-- self.assertEquals(config, {})
-+ self.assertEqual(config, {})
-
- config = self.get_config(['--with-bar'])
-- self.assertEquals(config, {
-+ self.assertEqual(config, {
- 'BAR': 'bar',
- })
-
- with self.assertRaises(InvalidOptionError) as e:
- self.get_config(['--with-qux'])
-
-- self.assertEquals(
-+ self.assertEqual(
- e.exception.message,
- '--with-qux is not available in this configuration'
- )
-
- config = self.get_config(['--with-foo', '--with-foo-really'])
-- self.assertEquals(config, {
-+ self.assertEqual(config, {
- 'FOO': 'foo',
- 'FOO2': True,
- })
-@@ -979,7 +979,7 @@
- '''):
- self.get_config()
-
-- self.assertEquals(e.exception.message, 'Cannot reassign builtins')
-+ self.assertEqual(e.exception.message, 'Cannot reassign builtins')
-
- with self.assertRaises(KeyError) as e:
- with self.moz_configure('''
-@@ -987,7 +987,7 @@
- '''):
- self.get_config()
-
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- 'Cannot assign `foo` because it is neither a '
- '@depends nor a @template')
-
-@@ -1000,7 +1000,7 @@
- '''):
- self.get_config()
-
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "@depends needs at least one argument")
-
- with self.assertRaises(ConfigureError) as e:
-@@ -1011,7 +1011,7 @@
- '''):
- self.get_config()
-
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "'--with-foo' is not a known option. Maybe it's "
- "declared too late?")
-
-@@ -1023,7 +1023,7 @@
- '''):
- self.get_config()
-
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "Option must not contain an '='")
-
- with self.assertRaises(TypeError) as e:
-@@ -1034,7 +1034,7 @@
- '''):
- self.get_config()
-
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "Cannot use object of type 'int' as argument "
- "to @depends")
-
-@@ -1046,7 +1046,7 @@
- '''):
- self.get_config()
-
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "Cannot decorate generator functions with @depends")
-
- with self.assertRaises(TypeError) as e:
-@@ -1055,7 +1055,7 @@
- '''):
- self.get_config()
-
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "Unexpected type: 'int'")
-
- with self.assertRaises(ConfigureError) as e:
-@@ -1069,7 +1069,7 @@
- '''):
- self.get_config()
-
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "The `foo` function may not be called")
-
- with self.assertRaises(TypeError) as e:
-@@ -1080,7 +1080,7 @@
- '''):
- self.get_config()
-
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "depends_impl() got an unexpected keyword argument 'foo'")
-
- def test_depends_when(self):
-@@ -1105,12 +1105,12 @@
- set_config('QUX', qux)
- '''):
- config = self.get_config()
-- self.assertEquals(config, {
-+ self.assertEqual(config, {
- 'FOO': 'foo',
- })
-
- config = self.get_config(['--with-qux'])
-- self.assertEquals(config, {
-+ self.assertEqual(config, {
- 'FOO': 'foo',
- 'QUX': 'qux',
- })
-@@ -1125,7 +1125,7 @@
- '''):
- self.get_config()
-
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- '@imports must appear after @template')
-
- with self.assertRaises(ConfigureError) as e:
-@@ -1138,7 +1138,7 @@
- '''):
- self.get_config()
-
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- '@imports must appear after @depends')
-
- for import_ in (
-@@ -1155,7 +1155,7 @@
- ''' % import_):
- self.get_config()
-
-- self.assertEquals(e.exception.message, "Unexpected type: 'int'")
-+ self.assertEqual(e.exception.message, "Unexpected type: 'int'")
-
- with self.assertRaises(TypeError) as e:
- with self.moz_configure('''
-@@ -1166,7 +1166,7 @@
- '''):
- self.get_config()
-
-- self.assertEquals(e.exception.message, "Unexpected type: 'int'")
-+ self.assertEqual(e.exception.message, "Unexpected type: 'int'")
-
- with self.assertRaises(ValueError) as e:
- with self.moz_configure('''
-@@ -1176,7 +1176,7 @@
- '''):
- self.get_config()
-
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "Invalid argument to @imports: 'os*'")
-
- def test_only_when(self):
-@@ -1231,7 +1231,7 @@
- with self.assertRaises(InvalidOptionError) as e:
- self.get_config(['--foo'])
-
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- '--foo is not available in this configuration')
-
- # Cannot depend on an option defined in a only_when block, because we
-@@ -1242,7 +1242,7 @@
- with self.assertRaises(ConfigureError) as e:
- self.get_config()
-
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- '@depends function needs the same `when` as '
- 'options it depends on')
-
-@@ -1259,7 +1259,7 @@
- with self.assertRaises(InvalidOptionError) as e:
- self.get_config()
-
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- '--foo is not available in this configuration')
-
- # And similarly doesn't fail when the condition is true.
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/configure/test_lint.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/configure/test_lint.py (refactored)
-@@ -2,9 +2,9 @@
- # 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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-
--from StringIO import StringIO
-+
-+from io import StringIO
- import os
- import textwrap
- import unittest
-@@ -62,7 +62,7 @@
- '''):
- self.lint_test()
-
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "`bar` depends on '--help' and `foo`. "
- "`foo` must depend on '--help'")
-
-@@ -85,7 +85,7 @@
- '''):
- self.lint_test()
-
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "`bar` depends on '--help' and `foo`. "
- "`foo` must depend on '--help'")
-
-@@ -111,7 +111,7 @@
- '''):
- self.lint_test()
-
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "Missing @depends for `foo`: '--help'")
-
- # There is a default restricted `os` module when there is no explicit
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/configure/test_moz_configure.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/configure/test_moz_configure.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- from mozunit import main
- from mozpack import path as mozpath
-@@ -23,10 +23,10 @@
- shell = mozpath.abspath('/bin/sh')
- return result.replace('CONFIG_SHELL=%s ' % shell, '')
-
-- self.assertEquals('--enable-application=browser',
-+ self.assertEqual('--enable-application=browser',
- get_value_for(['--enable-application=browser']))
-
-- self.assertEquals('--enable-application=browser '
-+ self.assertEqual('--enable-application=browser '
- 'MOZ_PROFILING=1',
- get_value_for(['--enable-application=browser',
- 'MOZ_PROFILING=1']))
-@@ -35,25 +35,25 @@
- environ={'MOZ_PROFILING': '1'},
- mozconfig='ac_add_options --enable-project=js')
-
-- self.assertEquals('--enable-project=js MOZ_PROFILING=1',
-+ self.assertEqual('--enable-project=js MOZ_PROFILING=1',
- value)
-
- # --disable-js-shell is the default, so it's filtered out.
-- self.assertEquals('--enable-application=browser',
-+ self.assertEqual('--enable-application=browser',
- get_value_for(['--enable-application=browser',
- '--disable-js-shell']))
-
- # Normally, --without-foo would be filtered out because that's the
- # default, but since it is a (fake) old-configure option, it always
- # appears.
-- self.assertEquals('--enable-application=browser --without-foo',
-+ self.assertEqual('--enable-application=browser --without-foo',
- get_value_for(['--enable-application=browser',
- '--without-foo']))
-- self.assertEquals('--enable-application=browser --with-foo',
-+ self.assertEqual('--enable-application=browser --with-foo',
- get_value_for(['--enable-application=browser',
- '--with-foo']))
-
-- self.assertEquals("--enable-application=browser '--with-foo=foo bar'",
-+ self.assertEqual("--enable-application=browser '--with-foo=foo bar'",
- get_value_for(['--enable-application=browser',
- '--with-foo=foo bar']))
-
-@@ -65,7 +65,7 @@
- self.version = version
-
- def __call__(self, stdin, args):
-- this.assertEquals(args, ('-version',))
-+ this.assertEqual(args, ('-version',))
- return 0, self.version, ''
-
- def check_nsis_version(version):
-@@ -80,13 +80,13 @@
- with self.assertRaises(SystemExit) as e:
- check_nsis_version('v3.0a2')
-
-- self.assertEquals(check_nsis_version('v3.0b1'), '3.0b1')
-- self.assertEquals(check_nsis_version('v3.0b2'), '3.0b2')
-- self.assertEquals(check_nsis_version('v3.0rc1'), '3.0rc1')
-- self.assertEquals(check_nsis_version('v3.0'), '3.0')
-- self.assertEquals(check_nsis_version('v3.0-2'), '3.0')
-- self.assertEquals(check_nsis_version('v3.0.1'), '3.0')
-- self.assertEquals(check_nsis_version('v3.1'), '3.1')
-+ self.assertEqual(check_nsis_version('v3.0b1'), '3.0b1')
-+ self.assertEqual(check_nsis_version('v3.0b2'), '3.0b2')
-+ self.assertEqual(check_nsis_version('v3.0rc1'), '3.0rc1')
-+ self.assertEqual(check_nsis_version('v3.0'), '3.0')
-+ self.assertEqual(check_nsis_version('v3.0-2'), '3.0')
-+ self.assertEqual(check_nsis_version('v3.0.1'), '3.0')
-+ self.assertEqual(check_nsis_version('v3.1'), '3.1')
-
-
- if __name__ == '__main__':
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/configure/test_options.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/configure/test_options.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import unittest
-
-@@ -27,139 +27,139 @@
- class TestOption(unittest.TestCase):
- def test_option(self):
- option = Option('--option')
-- self.assertEquals(option.prefix, '')
-- self.assertEquals(option.name, 'option')
-- self.assertEquals(option.env, None)
-+ self.assertEqual(option.prefix, '')
-+ self.assertEqual(option.name, 'option')
-+ self.assertEqual(option.env, None)
- self.assertFalse(option.default)
-
- option = Option('--enable-option')
-- self.assertEquals(option.prefix, 'enable')
-- self.assertEquals(option.name, 'option')
-- self.assertEquals(option.env, None)
-+ self.assertEqual(option.prefix, 'enable')
-+ self.assertEqual(option.name, 'option')
-+ self.assertEqual(option.env, None)
- self.assertFalse(option.default)
-
- option = Option('--disable-option')
-- self.assertEquals(option.prefix, 'disable')
-- self.assertEquals(option.name, 'option')
-- self.assertEquals(option.env, None)
-+ self.assertEqual(option.prefix, 'disable')
-+ self.assertEqual(option.name, 'option')
-+ self.assertEqual(option.env, None)
- self.assertTrue(option.default)
-
- option = Option('--with-option')
-- self.assertEquals(option.prefix, 'with')
-- self.assertEquals(option.name, 'option')
-- self.assertEquals(option.env, None)
-+ self.assertEqual(option.prefix, 'with')
-+ self.assertEqual(option.name, 'option')
-+ self.assertEqual(option.env, None)
- self.assertFalse(option.default)
-
- option = Option('--without-option')
-- self.assertEquals(option.prefix, 'without')
-- self.assertEquals(option.name, 'option')
-- self.assertEquals(option.env, None)
-+ self.assertEqual(option.prefix, 'without')
-+ self.assertEqual(option.name, 'option')
-+ self.assertEqual(option.env, None)
- self.assertTrue(option.default)
-
- option = Option('--without-option-foo', env='MOZ_OPTION')
-- self.assertEquals(option.env, 'MOZ_OPTION')
-+ self.assertEqual(option.env, 'MOZ_OPTION')
-
- option = Option(env='MOZ_OPTION')
-- self.assertEquals(option.prefix, '')
-- self.assertEquals(option.name, None)
-- self.assertEquals(option.env, 'MOZ_OPTION')
-+ self.assertEqual(option.prefix, '')
-+ self.assertEqual(option.name, None)
-+ self.assertEqual(option.env, 'MOZ_OPTION')
- self.assertFalse(option.default)
-
- with self.assertRaises(InvalidOptionError) as e:
- Option('--option', nargs=0, default=('a',))
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "The given `default` doesn't satisfy `nargs`")
-
- with self.assertRaises(InvalidOptionError) as e:
- Option('--option', nargs=1, default=())
-- self.assertEquals(
-+ self.assertEqual(
- e.exception.message,
- 'default must be a bool, a string or a tuple of strings')
-
- with self.assertRaises(InvalidOptionError) as e:
- Option('--option', nargs=1, default=True)
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "The given `default` doesn't satisfy `nargs`")
-
- with self.assertRaises(InvalidOptionError) as e:
- Option('--option', nargs=1, default=('a', 'b'))
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "The given `default` doesn't satisfy `nargs`")
-
- with self.assertRaises(InvalidOptionError) as e:
- Option('--option', nargs=2, default=())
-- self.assertEquals(
-+ self.assertEqual(
- e.exception.message,
- 'default must be a bool, a string or a tuple of strings')
-
- with self.assertRaises(InvalidOptionError) as e:
- Option('--option', nargs=2, default=True)
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "The given `default` doesn't satisfy `nargs`")
-
- with self.assertRaises(InvalidOptionError) as e:
- Option('--option', nargs=2, default=('a',))
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "The given `default` doesn't satisfy `nargs`")
-
- with self.assertRaises(InvalidOptionError) as e:
- Option('--option', nargs='?', default=('a', 'b'))
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "The given `default` doesn't satisfy `nargs`")
-
- with self.assertRaises(InvalidOptionError) as e:
- Option('--option', nargs='+', default=())
-- self.assertEquals(
-+ self.assertEqual(
- e.exception.message,
- 'default must be a bool, a string or a tuple of strings')
-
- with self.assertRaises(InvalidOptionError) as e:
- Option('--option', nargs='+', default=True)
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "The given `default` doesn't satisfy `nargs`")
-
- # --disable options with a nargs value that requires at least one
- # argument need to be given a default.
- with self.assertRaises(InvalidOptionError) as e:
- Option('--disable-option', nargs=1)
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "The given `default` doesn't satisfy `nargs`")
-
- with self.assertRaises(InvalidOptionError) as e:
- Option('--disable-option', nargs='+')
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "The given `default` doesn't satisfy `nargs`")
-
- # Test nargs inference from default value
- option = Option('--with-foo', default=True)
-- self.assertEquals(option.nargs, 0)
-+ self.assertEqual(option.nargs, 0)
-
- option = Option('--with-foo', default=False)
-- self.assertEquals(option.nargs, 0)
-+ self.assertEqual(option.nargs, 0)
-
- option = Option('--with-foo', default='a')
-- self.assertEquals(option.nargs, '?')
-+ self.assertEqual(option.nargs, '?')
-
- option = Option('--with-foo', default=('a',))
-- self.assertEquals(option.nargs, '?')
-+ self.assertEqual(option.nargs, '?')
-
- option = Option('--with-foo', default=('a', 'b'))
-- self.assertEquals(option.nargs, '*')
-+ self.assertEqual(option.nargs, '*')
-
- option = Option(env='FOO', default=True)
-- self.assertEquals(option.nargs, 0)
-+ self.assertEqual(option.nargs, 0)
-
- option = Option(env='FOO', default=False)
-- self.assertEquals(option.nargs, 0)
-+ self.assertEqual(option.nargs, 0)
-
- option = Option(env='FOO', default='a')
-- self.assertEquals(option.nargs, '?')
-+ self.assertEqual(option.nargs, '?')
-
- option = Option(env='FOO', default=('a',))
-- self.assertEquals(option.nargs, '?')
-+ self.assertEqual(option.nargs, '?')
-
- option = Option(env='FOO', default=('a', 'b'))
-- self.assertEquals(option.nargs, '*')
-+ self.assertEqual(option.nargs, '*')
-
- def test_option_option(self):
- for option in (
-@@ -169,70 +169,70 @@
- '--with-option',
- '--without-option',
- ):
-- self.assertEquals(Option(option).option, option)
-- self.assertEquals(Option(option, env='FOO').option, option)
-+ self.assertEqual(Option(option).option, option)
-+ self.assertEqual(Option(option, env='FOO').option, option)
-
- opt = Option(option, default=False)
-- self.assertEquals(opt.option,
-+ self.assertEqual(opt.option,
- option.replace('-disable-', '-enable-')
- .replace('-without-', '-with-'))
-
- opt = Option(option, default=True)
-- self.assertEquals(opt.option,
-+ self.assertEqual(opt.option,
- option.replace('-enable-', '-disable-')
- .replace('-with-', '-without-'))
-
-- self.assertEquals(Option(env='FOO').option, 'FOO')
-+ self.assertEqual(Option(env='FOO').option, 'FOO')
-
- def test_option_choices(self):
- with self.assertRaises(InvalidOptionError) as e:
- Option('--option', nargs=3, choices=('a', 'b'))
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- 'Not enough `choices` for `nargs`')
-
- with self.assertRaises(InvalidOptionError) as e:
- Option('--without-option', nargs=1, choices=('a', 'b'))
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- 'A `default` must be given along with `choices`')
-
- with self.assertRaises(InvalidOptionError) as e:
- Option('--without-option', nargs='+', choices=('a', 'b'))
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- 'A `default` must be given along with `choices`')
-
- with self.assertRaises(InvalidOptionError) as e:
- Option('--without-option', default='c', choices=('a', 'b'))
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "The `default` value must be one of 'a', 'b'")
-
- with self.assertRaises(InvalidOptionError) as e:
- Option('--without-option', default=('a', 'c',), choices=('a', 'b'))
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "The `default` value must be one of 'a', 'b'")
-
- with self.assertRaises(InvalidOptionError) as e:
- Option('--without-option', default=('c',), choices=('a', 'b'))
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "The `default` value must be one of 'a', 'b'")
-
- option = Option('--with-option', nargs='+', choices=('a', 'b'))
- with self.assertRaises(InvalidOptionError) as e:
- option.get_value('--with-option=c')
-- self.assertEquals(e.exception.message, "'c' is not one of 'a', 'b'")
-+ self.assertEqual(e.exception.message, "'c' is not one of 'a', 'b'")
-
- value = option.get_value('--with-option=b,a')
- self.assertTrue(value)
-- self.assertEquals(PositiveOptionValue(('b', 'a')), value)
-+ self.assertEqual(PositiveOptionValue(('b', 'a')), value)
-
- option = Option('--without-option', nargs='*', default='a',
- choices=('a', 'b'))
- with self.assertRaises(InvalidOptionError) as e:
- option.get_value('--with-option=c')
-- self.assertEquals(e.exception.message, "'c' is not one of 'a', 'b'")
-+ self.assertEqual(e.exception.message, "'c' is not one of 'a', 'b'")
-
- value = option.get_value('--with-option=b,a')
- self.assertTrue(value)
-- self.assertEquals(PositiveOptionValue(('b', 'a')), value)
-+ self.assertEqual(PositiveOptionValue(('b', 'a')), value)
-
- # Test nargs inference from choices
- option = Option('--with-option', choices=('a', 'b'))
-@@ -243,71 +243,71 @@
- choices=('a', 'b', 'c', 'd'))
-
- value = option.get_value('--with-option=+d')
-- self.assertEquals(PositiveOptionValue(('b', 'c', 'd')), value)
-+ self.assertEqual(PositiveOptionValue(('b', 'c', 'd')), value)
-
- value = option.get_value('--with-option=-b')
-- self.assertEquals(PositiveOptionValue(('c',)), value)
-+ self.assertEqual(PositiveOptionValue(('c',)), value)
-
- value = option.get_value('--with-option=-b,+d')
-- self.assertEquals(PositiveOptionValue(('c','d')), value)
-+ self.assertEqual(PositiveOptionValue(('c','d')), value)
-
- # Adding something that is in the default is fine
- value = option.get_value('--with-option=+b')
-- self.assertEquals(PositiveOptionValue(('b', 'c')), value)
-+ self.assertEqual(PositiveOptionValue(('b', 'c')), value)
-
- # Removing something that is not in the default is fine, as long as it
- # is one of the choices
- value = option.get_value('--with-option=-a')
-- self.assertEquals(PositiveOptionValue(('b', 'c')), value)
-+ self.assertEqual(PositiveOptionValue(('b', 'c')), value)
-
- with self.assertRaises(InvalidOptionError) as e:
- option.get_value('--with-option=-e')
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "'e' is not one of 'a', 'b', 'c', 'd'")
-
- # Other "not a choice" errors.
- with self.assertRaises(InvalidOptionError) as e:
- option.get_value('--with-option=+e')
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "'e' is not one of 'a', 'b', 'c', 'd'")
-
- with self.assertRaises(InvalidOptionError) as e:
- option.get_value('--with-option=e')
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "'e' is not one of 'a', 'b', 'c', 'd'")
-
- def test_option_value_format(self):
- val = PositiveOptionValue()
-- self.assertEquals('--with-value', val.format('--with-value'))
-- self.assertEquals('--with-value', val.format('--without-value'))
-- self.assertEquals('--enable-value', val.format('--enable-value'))
-- self.assertEquals('--enable-value', val.format('--disable-value'))
-- self.assertEquals('--value', val.format('--value'))
-- self.assertEquals('VALUE=1', val.format('VALUE'))
-+ self.assertEqual('--with-value', val.format('--with-value'))
-+ self.assertEqual('--with-value', val.format('--without-value'))
-+ self.assertEqual('--enable-value', val.format('--enable-value'))
-+ self.assertEqual('--enable-value', val.format('--disable-value'))
-+ self.assertEqual('--value', val.format('--value'))
-+ self.assertEqual('VALUE=1', val.format('VALUE'))
-
- val = PositiveOptionValue(('a',))
-- self.assertEquals('--with-value=a', val.format('--with-value'))
-- self.assertEquals('--with-value=a', val.format('--without-value'))
-- self.assertEquals('--enable-value=a', val.format('--enable-value'))
-- self.assertEquals('--enable-value=a', val.format('--disable-value'))
-- self.assertEquals('--value=a', val.format('--value'))
-- self.assertEquals('VALUE=a', val.format('VALUE'))
-+ self.assertEqual('--with-value=a', val.format('--with-value'))
-+ self.assertEqual('--with-value=a', val.format('--without-value'))
-+ self.assertEqual('--enable-value=a', val.format('--enable-value'))
-+ self.assertEqual('--enable-value=a', val.format('--disable-value'))
-+ self.assertEqual('--value=a', val.format('--value'))
-+ self.assertEqual('VALUE=a', val.format('VALUE'))
-
- val = PositiveOptionValue(('a', 'b'))
-- self.assertEquals('--with-value=a,b', val.format('--with-value'))
-- self.assertEquals('--with-value=a,b', val.format('--without-value'))
-- self.assertEquals('--enable-value=a,b', val.format('--enable-value'))
-- self.assertEquals('--enable-value=a,b', val.format('--disable-value'))
-- self.assertEquals('--value=a,b', val.format('--value'))
-- self.assertEquals('VALUE=a,b', val.format('VALUE'))
-+ self.assertEqual('--with-value=a,b', val.format('--with-value'))
-+ self.assertEqual('--with-value=a,b', val.format('--without-value'))
-+ self.assertEqual('--enable-value=a,b', val.format('--enable-value'))
-+ self.assertEqual('--enable-value=a,b', val.format('--disable-value'))
-+ self.assertEqual('--value=a,b', val.format('--value'))
-+ self.assertEqual('VALUE=a,b', val.format('VALUE'))
-
- val = NegativeOptionValue()
-- self.assertEquals('--without-value', val.format('--with-value'))
-- self.assertEquals('--without-value', val.format('--without-value'))
-- self.assertEquals('--disable-value', val.format('--enable-value'))
-- self.assertEquals('--disable-value', val.format('--disable-value'))
-- self.assertEquals('', val.format('--value'))
-- self.assertEquals('VALUE=', val.format('VALUE'))
-+ self.assertEqual('--without-value', val.format('--with-value'))
-+ self.assertEqual('--without-value', val.format('--without-value'))
-+ self.assertEqual('--disable-value', val.format('--enable-value'))
-+ self.assertEqual('--disable-value', val.format('--disable-value'))
-+ self.assertEqual('', val.format('--value'))
-+ self.assertEqual('VALUE=', val.format('VALUE'))
-
- def test_option_value(self, name='option', nargs=0, default=None):
- disabled = name.startswith(('disable-', 'without-'))
-@@ -324,28 +324,28 @@
-
- if nargs in (0, '?', '*') or disabled:
- value = option.get_value('--%s' % name, 'option')
-- self.assertEquals(value, posOptionValue())
-- self.assertEquals(value.origin, 'option')
-+ self.assertEqual(value, posOptionValue())
-+ self.assertEqual(value.origin, 'option')
- else:
- with self.assertRaises(InvalidOptionError) as e:
- option.get_value('--%s' % name)
- if nargs == 1:
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- '--%s takes 1 value' % name)
- elif nargs == '+':
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- '--%s takes 1 or more values' % name)
- else:
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- '--%s takes 2 values' % name)
-
- value = option.get_value('')
-- self.assertEquals(value, defaultValue)
-- self.assertEquals(value.origin, 'default')
-+ self.assertEqual(value, defaultValue)
-+ self.assertEqual(value.origin, 'default')
-
- value = option.get_value(None)
-- self.assertEquals(value, defaultValue)
-- self.assertEquals(value.origin, 'default')
-+ self.assertEqual(value, defaultValue)
-+ self.assertEqual(value.origin, 'default')
-
- with self.assertRaises(AssertionError):
- value = option.get_value('MOZ_OPTION=', 'environment')
-@@ -358,47 +358,47 @@
-
- if nargs in (1, '?', '*', '+') and not disabled:
- value = option.get_value('--%s=' % name, 'option')
-- self.assertEquals(value, PositiveOptionValue(('',)))
-- self.assertEquals(value.origin, 'option')
-+ self.assertEqual(value, PositiveOptionValue(('',)))
-+ self.assertEqual(value.origin, 'option')
- else:
- with self.assertRaises(InvalidOptionError) as e:
- option.get_value('--%s=' % name)
- if disabled:
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- 'Cannot pass a value to --%s' % name)
- else:
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- '--%s takes %d values' % (name, nargs))
-
- if nargs in (1, '?', '*', '+') and not disabled:
- value = option.get_value('--%s=foo' % name, 'option')
-- self.assertEquals(value, PositiveOptionValue(('foo',)))
-- self.assertEquals(value.origin, 'option')
-+ self.assertEqual(value, PositiveOptionValue(('foo',)))
-+ self.assertEqual(value.origin, 'option')
- else:
- with self.assertRaises(InvalidOptionError) as e:
- option.get_value('--%s=foo' % name)
- if disabled:
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- 'Cannot pass a value to --%s' % name)
- else:
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- '--%s takes %d values' % (name, nargs))
-
- if nargs in (2, '*', '+') and not disabled:
- value = option.get_value('--%s=foo,bar' % name, 'option')
-- self.assertEquals(value, PositiveOptionValue(('foo', 'bar')))
-- self.assertEquals(value.origin, 'option')
-+ self.assertEqual(value, PositiveOptionValue(('foo', 'bar')))
-+ self.assertEqual(value.origin, 'option')
- else:
- with self.assertRaises(InvalidOptionError) as e:
- option.get_value('--%s=foo,bar' % name, 'option')
- if disabled:
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- 'Cannot pass a value to --%s' % name)
- elif nargs == '?':
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- '--%s takes 0 or 1 values' % name)
- else:
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- '--%s takes %d value%s'
- % (name, nargs, 's' if nargs != 1 else ''))
-
-@@ -406,59 +406,59 @@
- default=default)
- if nargs in (0, '?', '*') or disabled:
- value = option.get_value('--%s' % name, 'option')
-- self.assertEquals(value, posOptionValue())
-- self.assertEquals(value.origin, 'option')
-+ self.assertEqual(value, posOptionValue())
-+ self.assertEqual(value.origin, 'option')
- else:
- with self.assertRaises(InvalidOptionError) as e:
- option.get_value('--%s' % name)
- if disabled:
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- 'Cannot pass a value to --%s' % name)
- elif nargs == '+':
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- '--%s takes 1 or more values' % name)
- else:
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- '--%s takes %d value%s'
- % (name, nargs, 's' if nargs != 1 else ''))
-
- value = option.get_value('')
-- self.assertEquals(value, defaultValue)
-- self.assertEquals(value.origin, 'default')
-+ self.assertEqual(value, defaultValue)
-+ self.assertEqual(value.origin, 'default')
-
- value = option.get_value(None)
-- self.assertEquals(value, defaultValue)
-- self.assertEquals(value.origin, 'default')
-+ self.assertEqual(value, defaultValue)
-+ self.assertEqual(value.origin, 'default')
-
- value = option.get_value('MOZ_OPTION=', 'environment')
-- self.assertEquals(value, NegativeOptionValue())
-- self.assertEquals(value.origin, 'environment')
-+ self.assertEqual(value, NegativeOptionValue())
-+ self.assertEqual(value.origin, 'environment')
-
- if nargs in (0, '?', '*'):
- value = option.get_value('MOZ_OPTION=1', 'environment')
-- self.assertEquals(value, PositiveOptionValue())
-- self.assertEquals(value.origin, 'environment')
-+ self.assertEqual(value, PositiveOptionValue())
-+ self.assertEqual(value.origin, 'environment')
- elif nargs in (1, '+'):
- value = option.get_value('MOZ_OPTION=1', 'environment')
-- self.assertEquals(value, PositiveOptionValue(('1',)))
-- self.assertEquals(value.origin, 'environment')
-+ self.assertEqual(value, PositiveOptionValue(('1',)))
-+ self.assertEqual(value.origin, 'environment')
- else:
- with self.assertRaises(InvalidOptionError) as e:
- option.get_value('MOZ_OPTION=1', 'environment')
-- self.assertEquals(e.exception.message, 'MOZ_OPTION takes 2 values')
-+ self.assertEqual(e.exception.message, 'MOZ_OPTION takes 2 values')
-
- if nargs in (1, '?', '*', '+') and not disabled:
- value = option.get_value('--%s=' % name, 'option')
-- self.assertEquals(value, PositiveOptionValue(('',)))
-- self.assertEquals(value.origin, 'option')
-+ self.assertEqual(value, PositiveOptionValue(('',)))
-+ self.assertEqual(value.origin, 'option')
- else:
- with self.assertRaises(InvalidOptionError) as e:
- option.get_value('--%s=' % name, 'option')
- if disabled:
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- 'Cannot pass a value to --%s' % name)
- else:
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- '--%s takes %d values' % (name, nargs))
-
- with self.assertRaises(AssertionError):
-@@ -466,26 +466,26 @@
-
- if nargs in (1, '?', '*', '+'):
- value = option.get_value('MOZ_OPTION=foo', 'environment')
-- self.assertEquals(value, PositiveOptionValue(('foo',)))
-- self.assertEquals(value.origin, 'environment')
-+ self.assertEqual(value, PositiveOptionValue(('foo',)))
-+ self.assertEqual(value.origin, 'environment')
- else:
- with self.assertRaises(InvalidOptionError) as e:
- option.get_value('MOZ_OPTION=foo', 'environment')
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- 'MOZ_OPTION takes %d values' % nargs)
-
- if nargs in (2, '*', '+'):
- value = option.get_value('MOZ_OPTION=foo,bar', 'environment')
-- self.assertEquals(value, PositiveOptionValue(('foo', 'bar')))
-- self.assertEquals(value.origin, 'environment')
-+ self.assertEqual(value, PositiveOptionValue(('foo', 'bar')))
-+ self.assertEqual(value.origin, 'environment')
- else:
- with self.assertRaises(InvalidOptionError) as e:
- option.get_value('MOZ_OPTION=foo,bar', 'environment')
- if nargs == '?':
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- 'MOZ_OPTION takes 0 or 1 values')
- else:
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- 'MOZ_OPTION takes %d value%s'
- % (nargs, 's' if nargs != 1 else ''))
-
-@@ -497,26 +497,26 @@
- env_option.get_value('--%s' % name)
-
- value = env_option.get_value('')
-- self.assertEquals(value, defaultValue)
-- self.assertEquals(value.origin, 'default')
-+ self.assertEqual(value, defaultValue)
-+ self.assertEqual(value.origin, 'default')
-
- value = env_option.get_value('MOZ_OPTION=', 'environment')
-- self.assertEquals(value, negOptionValue())
-- self.assertEquals(value.origin, 'environment')
-+ self.assertEqual(value, negOptionValue())
-+ self.assertEqual(value.origin, 'environment')
-
- if nargs in (0, '?', '*'):
- value = env_option.get_value('MOZ_OPTION=1', 'environment')
-- self.assertEquals(value, posOptionValue())
-+ self.assertEqual(value, posOptionValue())
- self.assertTrue(value)
-- self.assertEquals(value.origin, 'environment')
-+ self.assertEqual(value.origin, 'environment')
- elif nargs in (1, '+'):
- value = env_option.get_value('MOZ_OPTION=1', 'environment')
-- self.assertEquals(value, PositiveOptionValue(('1',)))
-- self.assertEquals(value.origin, 'environment')
-+ self.assertEqual(value, PositiveOptionValue(('1',)))
-+ self.assertEqual(value.origin, 'environment')
- else:
- with self.assertRaises(InvalidOptionError) as e:
- env_option.get_value('MOZ_OPTION=1', 'environment')
-- self.assertEquals(e.exception.message, 'MOZ_OPTION takes 2 values')
-+ self.assertEqual(e.exception.message, 'MOZ_OPTION takes 2 values')
-
- with self.assertRaises(AssertionError) as e:
- env_option.get_value('--%s' % name)
-@@ -526,26 +526,26 @@
-
- if nargs in (1, '?', '*', '+'):
- value = env_option.get_value('MOZ_OPTION=foo', 'environment')
-- self.assertEquals(value, PositiveOptionValue(('foo',)))
-- self.assertEquals(value.origin, 'environment')
-+ self.assertEqual(value, PositiveOptionValue(('foo',)))
-+ self.assertEqual(value.origin, 'environment')
- else:
- with self.assertRaises(InvalidOptionError) as e:
- env_option.get_value('MOZ_OPTION=foo', 'environment')
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- 'MOZ_OPTION takes %d values' % nargs)
-
- if nargs in (2, '*', '+'):
- value = env_option.get_value('MOZ_OPTION=foo,bar', 'environment')
-- self.assertEquals(value, PositiveOptionValue(('foo', 'bar')))
-- self.assertEquals(value.origin, 'environment')
-+ self.assertEqual(value, PositiveOptionValue(('foo', 'bar')))
-+ self.assertEqual(value.origin, 'environment')
- else:
- with self.assertRaises(InvalidOptionError) as e:
- env_option.get_value('MOZ_OPTION=foo,bar', 'environment')
- if nargs == '?':
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- 'MOZ_OPTION takes 0 or 1 values')
- else:
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- 'MOZ_OPTION takes %d value%s'
- % (nargs, 's' if nargs != 1 else ''))
-
-@@ -557,28 +557,28 @@
- default=default)
-
- value = option.get_value('--%s-option' % disable, 'option')
-- self.assertEquals(value, NegativeOptionValue())
-- self.assertEquals(value.origin, 'option')
-+ self.assertEqual(value, NegativeOptionValue())
-+ self.assertEqual(value.origin, 'option')
-
- option = self.test_option_value('%s-option' % disable, nargs=nargs,
- default=default)
-
- if nargs in (0, '?', '*'):
- value = option.get_value('--%s-option' % enable, 'option')
-- self.assertEquals(value, PositiveOptionValue())
-- self.assertEquals(value.origin, 'option')
-+ self.assertEqual(value, PositiveOptionValue())
-+ self.assertEqual(value.origin, 'option')
- else:
- with self.assertRaises(InvalidOptionError) as e:
- option.get_value('--%s-option' % enable, 'option')
- if nargs == 1:
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- '--%s-option takes 1 value' % enable)
- elif nargs == '+':
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- '--%s-option takes 1 or more values'
- % enable)
- else:
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- '--%s-option takes 2 values' % enable)
-
- def test_option_value_with(self):
-@@ -587,12 +587,12 @@
- def test_option_value_invalid_nargs(self):
- with self.assertRaises(InvalidOptionError) as e:
- Option('--option', nargs='foo')
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "nargs must be a positive integer, '?', '*' or '+'")
-
- with self.assertRaises(InvalidOptionError) as e:
- Option('--option', nargs=-2)
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "nargs must be a positive integer, '?', '*' or '+'")
-
- def test_option_value_nargs_1(self):
-@@ -603,7 +603,7 @@
- # A default is required
- with self.assertRaises(InvalidOptionError) as e:
- Option('--disable-option', nargs=1)
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "The given `default` doesn't satisfy `nargs`")
-
- def test_option_value_nargs_2(self):
-@@ -614,7 +614,7 @@
- # A default is required
- with self.assertRaises(InvalidOptionError) as e:
- Option('--disable-option', nargs=2)
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "The given `default` doesn't satisfy `nargs`")
-
- def test_option_value_nargs_0_or_1(self):
-@@ -641,7 +641,7 @@
- # A default is required
- with self.assertRaises(InvalidOptionError) as e:
- Option('--disable-option', nargs='+')
-- self.assertEquals(e.exception.message,
-+ self.assertEqual(e.exception.message,
- "The given `default` doesn't satisfy `nargs`")
-
-
-@@ -649,109 +649,109 @@
- def test_basic(self):
- helper = CommandLineHelper({}, ['cmd', '--foo', '--bar'])
-
-- self.assertEquals(['--foo', '--bar'], list(helper))
-+ self.assertEqual(['--foo', '--bar'], list(helper))
-
- helper.add('--enable-qux')
-
-- self.assertEquals(['--foo', '--bar', '--enable-qux'], list(helper))
-+ self.assertEqual(['--foo', '--bar', '--enable-qux'], list(helper))
-
- value, option = helper.handle(Option('--bar'))
-- self.assertEquals(['--foo', '--enable-qux'], list(helper))
-- self.assertEquals(PositiveOptionValue(), value)
-- self.assertEquals('--bar', option)
-+ self.assertEqual(['--foo', '--enable-qux'], list(helper))
-+ self.assertEqual(PositiveOptionValue(), value)
-+ self.assertEqual('--bar', option)
-
- value, option = helper.handle(Option('--baz'))
-- self.assertEquals(['--foo', '--enable-qux'], list(helper))
-- self.assertEquals(NegativeOptionValue(), value)
-- self.assertEquals(None, option)
-+ self.assertEqual(['--foo', '--enable-qux'], list(helper))
-+ self.assertEqual(NegativeOptionValue(), value)
-+ self.assertEqual(None, option)
-
- def test_precedence(self):
- foo = Option('--with-foo', nargs='*')
- helper = CommandLineHelper({}, ['cmd', '--with-foo=a,b'])
- value, option = helper.handle(foo)
-- self.assertEquals(PositiveOptionValue(('a', 'b')), value)
-- self.assertEquals('command-line', value.origin)
-- self.assertEquals('--with-foo=a,b', option)
-+ self.assertEqual(PositiveOptionValue(('a', 'b')), value)
-+ self.assertEqual('command-line', value.origin)
-+ self.assertEqual('--with-foo=a,b', option)
-
- helper = CommandLineHelper({}, ['cmd', '--with-foo=a,b',
- '--without-foo'])
- value, option = helper.handle(foo)
-- self.assertEquals(NegativeOptionValue(), value)
-- self.assertEquals('command-line', value.origin)
-- self.assertEquals('--without-foo', option)
-+ self.assertEqual(NegativeOptionValue(), value)
-+ self.assertEqual('command-line', value.origin)
-+ self.assertEqual('--without-foo', option)
-
- helper = CommandLineHelper({}, ['cmd', '--without-foo',
- '--with-foo=a,b'])
- value, option = helper.handle(foo)
-- self.assertEquals(PositiveOptionValue(('a', 'b')), value)
-- self.assertEquals('command-line', value.origin)
-- self.assertEquals('--with-foo=a,b', option)
-+ self.assertEqual(PositiveOptionValue(('a', 'b')), value)
-+ self.assertEqual('command-line', value.origin)
-+ self.assertEqual('--with-foo=a,b', option)
-
- foo = Option('--with-foo', env='FOO', nargs='*')
- helper = CommandLineHelper({'FOO': ''}, ['cmd', '--with-foo=a,b'])
- value, option = helper.handle(foo)
-- self.assertEquals(PositiveOptionValue(('a', 'b')), value)
-- self.assertEquals('command-line', value.origin)
-- self.assertEquals('--with-foo=a,b', option)
-+ self.assertEqual(PositiveOptionValue(('a', 'b')), value)
-+ self.assertEqual('command-line', value.origin)
-+ self.assertEqual('--with-foo=a,b', option)
-
- helper = CommandLineHelper({'FOO': 'a,b'}, ['cmd', '--without-foo'])
- value, option = helper.handle(foo)
-- self.assertEquals(NegativeOptionValue(), value)
-- self.assertEquals('command-line', value.origin)
-- self.assertEquals('--without-foo', option)
-+ self.assertEqual(NegativeOptionValue(), value)
-+ self.assertEqual('command-line', value.origin)
-+ self.assertEqual('--without-foo', option)
-
- helper = CommandLineHelper({'FOO': ''}, ['cmd', '--with-bar=a,b'])
- value, option = helper.handle(foo)
-- self.assertEquals(NegativeOptionValue(), value)
-- self.assertEquals('environment', value.origin)
-- self.assertEquals('FOO=', option)
-+ self.assertEqual(NegativeOptionValue(), value)
-+ self.assertEqual('environment', value.origin)
-+ self.assertEqual('FOO=', option)
-
- helper = CommandLineHelper({'FOO': 'a,b'}, ['cmd', '--without-bar'])
- value, option = helper.handle(foo)
-- self.assertEquals(PositiveOptionValue(('a', 'b')), value)
-- self.assertEquals('environment', value.origin)
-- self.assertEquals('FOO=a,b', option)
-+ self.assertEqual(PositiveOptionValue(('a', 'b')), value)
-+ self.assertEqual('environment', value.origin)
-+ self.assertEqual('FOO=a,b', option)
-
- helper = CommandLineHelper({}, ['cmd', '--with-foo=a,b', 'FOO='])
- value, option = helper.handle(foo)
-- self.assertEquals(NegativeOptionValue(), value)
-- self.assertEquals('command-line', value.origin)
-- self.assertEquals('FOO=', option)
-+ self.assertEqual(NegativeOptionValue(), value)
-+ self.assertEqual('command-line', value.origin)
-+ self.assertEqual('FOO=', option)
-
- helper = CommandLineHelper({}, ['cmd', '--without-foo', 'FOO=a,b'])
- value, option = helper.handle(foo)
-- self.assertEquals(PositiveOptionValue(('a', 'b')), value)
-- self.assertEquals('command-line', value.origin)
-- self.assertEquals('FOO=a,b', option)
-+ self.assertEqual(PositiveOptionValue(('a', 'b')), value)
-+ self.assertEqual('command-line', value.origin)
-+ self.assertEqual('FOO=a,b', option)
-
- helper = CommandLineHelper({}, ['cmd', 'FOO=', '--with-foo=a,b'])
- value, option = helper.handle(foo)
-- self.assertEquals(PositiveOptionValue(('a', 'b')), value)
-- self.assertEquals('command-line', value.origin)
-- self.assertEquals('--with-foo=a,b', option)
-+ self.assertEqual(PositiveOptionValue(('a', 'b')), value)
-+ self.assertEqual('command-line', value.origin)
-+ self.assertEqual('--with-foo=a,b', option)
-
- helper = CommandLineHelper({}, ['cmd', 'FOO=a,b', '--without-foo'])
- value, option = helper.handle(foo)
-- self.assertEquals(NegativeOptionValue(), value)
-- self.assertEquals('command-line', value.origin)
-- self.assertEquals('--without-foo', option)
-+ self.assertEqual(NegativeOptionValue(), value)
-+ self.assertEqual('command-line', value.origin)
-+ self.assertEqual('--without-foo', option)
-
- def test_extra_args(self):
- foo = Option('--with-foo', env='FOO', nargs='*')
- helper = CommandLineHelper({}, ['cmd'])
- helper.add('FOO=a,b,c', 'other-origin')
- value, option = helper.handle(foo)
-- self.assertEquals(PositiveOptionValue(('a', 'b', 'c')), value)
-- self.assertEquals('other-origin', value.origin)
-- self.assertEquals('FOO=a,b,c', option)
-+ self.assertEqual(PositiveOptionValue(('a', 'b', 'c')), value)
-+ self.assertEqual('other-origin', value.origin)
-+ self.assertEqual('FOO=a,b,c', option)
-
- helper = CommandLineHelper({}, ['cmd'])
- helper.add('FOO=a,b,c', 'other-origin')
- helper.add('--with-foo=a,b,c', 'other-origin')
- value, option = helper.handle(foo)
-- self.assertEquals(PositiveOptionValue(('a', 'b', 'c')), value)
-- self.assertEquals('other-origin', value.origin)
-- self.assertEquals('--with-foo=a,b,c', option)
-+ self.assertEqual(PositiveOptionValue(('a', 'b', 'c')), value)
-+ self.assertEqual('other-origin', value.origin)
-+ self.assertEqual('--with-foo=a,b,c', option)
-
- # Adding conflicting options is not allowed.
- helper = CommandLineHelper({}, ['cmd'])
-@@ -771,9 +771,9 @@
- # But adding the same is allowed.
- helper.add('FOO=a,b,c', 'other-origin')
- value, option = helper.handle(foo)
-- self.assertEquals(PositiveOptionValue(('a', 'b', 'c')), value)
-- self.assertEquals('other-origin', value.origin)
-- self.assertEquals('FOO=a,b,c', option)
-+ self.assertEqual(PositiveOptionValue(('a', 'b', 'c')), value)
-+ self.assertEqual('other-origin', value.origin)
-+ self.assertEqual('FOO=a,b,c', option)
-
- # The same rule as above applies when using the option form vs. the
- # variable form. But we can't detect it when .add is called.
-@@ -799,9 +799,9 @@
- helper.add('FOO=a,b,c', 'other-origin')
- helper.add('--with-foo=a,b,c', 'other-origin')
- value, option = helper.handle(foo)
-- self.assertEquals(PositiveOptionValue(('a', 'b', 'c')), value)
-- self.assertEquals('other-origin', value.origin)
-- self.assertEquals('--with-foo=a,b,c', option)
-+ self.assertEqual(PositiveOptionValue(('a', 'b', 'c')), value)
-+ self.assertEqual('other-origin', value.origin)
-+ self.assertEqual('--with-foo=a,b,c', option)
-
- # Conflicts are also not allowed against what is in the
- # environment/on the command line.
-@@ -831,19 +831,19 @@
- foo = Option('--foo',
- possible_origins=('command-line',))
- value, option = helper.handle(foo)
-- self.assertEquals(PositiveOptionValue(), value)
-- self.assertEquals('command-line', value.origin)
-- self.assertEquals('--foo', option)
-+ self.assertEqual(PositiveOptionValue(), value)
-+ self.assertEqual('command-line', value.origin)
-+ self.assertEqual('--foo', option)
-
- bar = Option('--bar',
- possible_origins=('mozconfig',))
-- with self.assertRaisesRegexp(InvalidOptionError,
-+ with self.assertRaisesRegex(InvalidOptionError,
- "--bar can not be set by command-line. Values are accepted from: mozconfig"):
- helper.handle(bar)
-
- baz = Option(env='BAZ',
- possible_origins=('implied',))
-- with self.assertRaisesRegexp(InvalidOptionError,
-+ with self.assertRaisesRegex(InvalidOptionError,
- "BAZ=1 can not be set by environment. Values are accepted from: implied"):
- helper.handle(baz)
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py (refactored)
-@@ -2,12 +2,12 @@
- # 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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import logging
- import os
-
--from StringIO import StringIO
-+from io import StringIO
-
- from mozunit import main
-
-@@ -291,9 +291,9 @@
- compiler = sandbox._value_for(sandbox[var])
- # Add var on both ends to make it clear which of the
- # variables is failing the test when that happens.
-- self.assertEquals((var, compiler), (var, result))
-+ self.assertEqual((var, compiler), (var, result))
- except SystemExit:
-- self.assertEquals((var, result),
-+ self.assertEqual((var, result),
- (var, self.out.getvalue().strip()))
- return
-
-@@ -471,7 +471,7 @@
- # We'll try gcc and clang, but since there is no gcc (gcc-x.y doesn't
- # count), find clang.
- paths = {
-- k: v for k, v in self.PATHS.iteritems()
-+ k: v for k, v in self.PATHS.items()
- if os.path.basename(k) not in ('gcc', 'g++')
- }
- self.do_toolchain_test(paths, {
-@@ -506,7 +506,7 @@
- # Even if there are gcc-x.y or clang-x.y compilers available, we
- # don't try them. This could be considered something to improve.
- paths = {
-- k: v for k, v in self.PATHS.iteritems()
-+ k: v for k, v in self.PATHS.items()
- if os.path.basename(k) not in ('gcc', 'g++', 'clang', 'clang++')
- }
- self.do_toolchain_test(paths, {
-@@ -687,7 +687,7 @@
- def test_not_gcc(self):
- # We won't pick GCC if it's the only thing available.
- paths = {
-- k: v for k, v in self.PATHS.iteritems()
-+ k: v for k, v in self.PATHS.items()
- if os.path.basename(k) not in ('clang', 'clang++')
- }
- self.do_toolchain_test(paths, {
-@@ -851,7 +851,7 @@
- def test_clang_cl(self):
- # We'll pick clang-cl if msvc can't be found.
- paths = {
-- k: v for k, v in self.PATHS.iteritems()
-+ k: v for k, v in self.PATHS.items()
- if os.path.basename(k) != 'cl'
- }
- self.do_toolchain_test(paths, {
-@@ -862,7 +862,7 @@
- def test_gcc(self):
- # We'll pick GCC if msvc and clang-cl can't be found.
- paths = {
-- k: v for k, v in self.PATHS.iteritems()
-+ k: v for k, v in self.PATHS.items()
- if os.path.basename(k) not in ('cl', 'clang-cl')
- }
- self.do_toolchain_test(paths, {
-@@ -881,7 +881,7 @@
- def test_clang(self):
- # We'll pick clang if nothing else is found.
- paths = {
-- k: v for k, v in self.PATHS.iteritems()
-+ k: v for k, v in self.PATHS.items()
- if os.path.basename(k) not in ('cl', 'clang-cl', 'gcc')
- }
- self.do_toolchain_test(paths, {
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/configure/test_toolchain_helpers.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/configure/test_toolchain_helpers.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import copy
- import re
-@@ -10,7 +10,7 @@
- import unittest
-
- from fnmatch import fnmatch
--from StringIO import StringIO
-+from io import StringIO
- from textwrap import dedent
-
- from mozunit import (
-@@ -43,7 +43,7 @@
- # Hack around it enough that the configure tests work properly.
- context = self.context
- def normalize_numbers(value):
-- if isinstance(value, types.StringTypes):
-+ if isinstance(value, (str,)):
- if value[-1:] == 'L' and value[:-1].isdigit():
- value = int(value[:-1])
- return value
-@@ -53,7 +53,7 @@
- return self.HAS_FEATURE.sub(r'\1\2', expr)
- self.context = self.Context(
- (normalize_has_feature(k), normalize_numbers(v))
-- for k, v in context.iteritems()
-+ for k, v in context.items()
- )
- try:
- return Preprocessor.do_if(self, normalize_has_feature(expression),
-@@ -95,7 +95,7 @@
- input.name = 'foo'
- pp.do_include(input)
-
-- self.assertEquals(pp.out.getvalue(), '1 . 2 . c "D"')
-+ self.assertEqual(pp.out.getvalue(), '1 . 2 . c "D"')
-
- def test_condition(self):
- pp = CompilerPreprocessor({
-@@ -125,7 +125,7 @@
- input.name = 'foo'
- pp.do_include(input)
-
-- self.assertEquals('IFDEF_A\nIF_A\nIF_B\nIF_NOT_C\n', pp.out.getvalue())
-+ self.assertEqual('IFDEF_A\nIF_A\nIF_B\nIF_NOT_C\n', pp.out.getvalue())
-
-
- class FakeCompiler(dict):
-@@ -164,9 +164,9 @@
- '''
- def __init__(self, *definitions):
- for definition in definitions:
-- if all(not isinstance(d, dict) for d in definition.itervalues()):
-+ if all(not isinstance(d, dict) for d in definition.values()):
- definition = {None: definition}
-- for key, value in definition.iteritems():
-+ for key, value in definition.items():
- self.setdefault(key, {}).update(value)
-
- def __call__(self, stdin, args):
-@@ -178,14 +178,14 @@
- pp = CompilerPreprocessor(self[None])
-
- def apply_defn(defn):
-- for k, v in defn.iteritems():
-+ for k, v in defn.items():
- if v is False:
- if k in pp.context:
- del pp.context[k]
- else:
- pp.context[k] = v
-
-- for glob, defn in self.iteritems():
-+ for glob, defn in self.items():
- if glob and not glob.startswith('-') and fnmatch(file, glob):
- apply_defn(defn)
-
-@@ -216,7 +216,7 @@
- 'A': '1',
- 'B': '2',
- })
-- self.assertEquals(compiler(None, ['-E', 'file']),
-+ self.assertEqual(compiler(None, ['-E', 'file']),
- (0, '1 2 C', ''))
-
- compiler = FakeCompiler({
-@@ -238,25 +238,25 @@
- 'B': '42',
- },
- })
-- self.assertEquals(compiler(None, ['-E', 'file']),
-+ self.assertEqual(compiler(None, ['-E', 'file']),
- (0, '1 2 C', ''))
-- self.assertEquals(compiler(None, ['-E', '-foo', 'file']),
-+ self.assertEqual(compiler(None, ['-E', '-foo', 'file']),
- (0, '1 2 foo', ''))
-- self.assertEquals(compiler(None, ['-E', '-bar', 'file']),
-+ self.assertEqual(compiler(None, ['-E', '-bar', 'file']),
- (0, '1 bar bar', ''))
-- self.assertEquals(compiler(None, ['-E', '-qux', 'file']),
-+ self.assertEqual(compiler(None, ['-E', '-qux', 'file']),
- (0, '1 B C', ''))
-- self.assertEquals(compiler(None, ['-E', '-foo', '-bar', 'file']),
-+ self.assertEqual(compiler(None, ['-E', '-foo', '-bar', 'file']),
- (0, '1 bar bar', ''))
-- self.assertEquals(compiler(None, ['-E', '-bar', '-foo', 'file']),
-+ self.assertEqual(compiler(None, ['-E', '-bar', '-foo', 'file']),
- (0, '1 bar foo', ''))
-- self.assertEquals(compiler(None, ['-E', '-bar', '-qux', 'file']),
-+ self.assertEqual(compiler(None, ['-E', '-bar', '-qux', 'file']),
- (0, '1 B bar', ''))
-- self.assertEquals(compiler(None, ['-E', '-qux', '-bar', 'file']),
-+ self.assertEqual(compiler(None, ['-E', '-qux', '-bar', 'file']),
- (0, '1 bar bar', ''))
-- self.assertEquals(compiler(None, ['-E', 'file.c']),
-+ self.assertEqual(compiler(None, ['-E', 'file.c']),
- (0, '1 42 C', ''))
-- self.assertEquals(compiler(None, ['-E', '-bar', 'file.c']),
-+ self.assertEqual(compiler(None, ['-E', '-bar', 'file.c']),
- (0, '1 bar bar', ''))
-
- def test_multiple_definitions(self):
-@@ -267,7 +267,7 @@
- 'C': 3,
- })
-
-- self.assertEquals(compiler, {
-+ self.assertEqual(compiler, {
- None: {
- 'A': 1,
- 'B': 2,
-@@ -282,7 +282,7 @@
- 'C': 3,
- })
-
-- self.assertEquals(compiler, {
-+ self.assertEqual(compiler, {
- None: {
- 'A': 1,
- 'B': 4,
-@@ -302,7 +302,7 @@
- },
- })
-
-- self.assertEquals(compiler, {
-+ self.assertEqual(compiler, {
- None: {
- 'A': 1,
- 'B': 4,
-@@ -330,7 +330,7 @@
- },
- })
-
-- self.assertEquals(compiler, {
-+ self.assertEqual(compiler, {
- None: {
- 'A': 1,
- 'B': 2,
-@@ -370,7 +370,7 @@
- def __add__(self, other):
- assert isinstance(other, dict)
- result = copy.deepcopy(self.__dict__)
-- for k, v in other.iteritems():
-+ for k, v in other.items():
- if k == 'flags':
- result.setdefault(k, []).extend(v)
- else:
-@@ -381,7 +381,7 @@
- class TestCompilerResult(unittest.TestCase):
- def test_compiler_result(self):
- result = CompilerResult()
-- self.assertEquals(result.__dict__, {
-+ self.assertEqual(result.__dict__, {
- 'wrapper': [],
- 'compiler': mozpath.abspath(''),
- 'version': '',
-@@ -397,7 +397,7 @@
- language='C',
- flags=['-std=gnu99'],
- )
-- self.assertEquals(result.__dict__, {
-+ self.assertEqual(result.__dict__, {
- 'wrapper': [],
- 'compiler': mozpath.abspath('/usr/bin/gcc'),
- 'version': '4.2.1',
-@@ -407,7 +407,7 @@
- })
-
- result2 = result + {'flags': ['-m32']}
-- self.assertEquals(result2.__dict__, {
-+ self.assertEqual(result2.__dict__, {
- 'wrapper': [],
- 'compiler': mozpath.abspath('/usr/bin/gcc'),
- 'version': '4.2.1',
-@@ -416,14 +416,14 @@
- 'flags': ['-std=gnu99', '-m32'],
- })
- # Original flags are untouched.
-- self.assertEquals(result.flags, ['-std=gnu99'])
-+ self.assertEqual(result.flags, ['-std=gnu99'])
-
- result3 = result + {
- 'compiler': '/usr/bin/gcc-4.7',
- 'version': '4.7.3',
- 'flags': ['-m32'],
- }
-- self.assertEquals(result3.__dict__, {
-+ self.assertEqual(result3.__dict__, {
- 'wrapper': [],
- 'compiler': mozpath.abspath('/usr/bin/gcc-4.7'),
- 'version': '4.7.3',
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/configure/test_toolkit_moz_configure.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/configure/test_toolkit_moz_configure.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import os
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/configure/test_util.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/configure/test_util.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, print_function, unicode_literals
-+
-
- import logging
- import os
-@@ -11,7 +11,7 @@
- import unittest
- import sys
-
--from StringIO import StringIO
-+from io import StringIO
-
- from mozunit import main
- from mozpack import path as mozpath
-@@ -434,11 +434,11 @@
- except SystemExit as e:
- status = e.code
-
-- self.assertEquals(status, 0)
-+ self.assertEqual(status, 0)
- quote_char = "'"
- if getpreferredencoding().lower() == 'utf-8':
- quote_char = '\u00B4'.encode('utf-8')
-- self.assertEquals(out.getvalue().strip(), quote_char)
-+ self.assertEqual(out.getvalue().strip(), quote_char)
-
-
- class TestVersion(unittest.TestCase):
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/controller/test_ccachestats.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/controller/test_ccachestats.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import unicode_literals
-+
-
- import unittest
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/controller/test_clobber.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/controller/test_clobber.py (refactored)
-@@ -2,14 +2,14 @@
- # 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/.
-
--from __future__ import unicode_literals
-+
-
- import os
- import shutil
- import tempfile
- import unittest
-
--from StringIO import StringIO
-+from io import StringIO
-
- from mozunit import main
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/frontend/test_context.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/frontend/test_context.py (refactored)
-@@ -36,7 +36,7 @@
- 'baz': (dict, dict, ''),
- })
-
-- self.assertEqual(test.keys(), [])
-+ self.assertEqual(list(test.keys()), [])
-
- self.assertEqual(test['foo'], 0)
-
-@@ -84,12 +84,12 @@
- 'baz': (dict, list, ''),
- })
-
-- self.assertEqual(test.keys(), [])
-+ self.assertEqual(list(test.keys()), [])
-
- with self.assertRaises(ValueError):
- test.update(bar=True, foo={})
-
-- self.assertEqual(test.keys(), [])
-+ self.assertEqual(list(test.keys()), [])
-
- test.update(bar=True, foo=1)
-
-@@ -258,19 +258,19 @@
- self.assertEqual(lines[-1].strip(), '')
-
- def test_documentation_formatting(self):
-- for typ, inp, doc in VARIABLES.values():
-+ for typ, inp, doc in list(VARIABLES.values()):
- self._verify_doc(doc)
-
-- for attr, args, doc in FUNCTIONS.values():
-+ for attr, args, doc in list(FUNCTIONS.values()):
- self._verify_doc(doc)
-
-- for func, typ, doc in SPECIAL_VARIABLES.values():
-+ for func, typ, doc in list(SPECIAL_VARIABLES.values()):
- self._verify_doc(doc)
-
-- for name, cls in SUBCONTEXTS.items():
-+ for name, cls in list(SUBCONTEXTS.items()):
- self._verify_doc(cls.__doc__)
-
-- for name, v in cls.VARIABLES.items():
-+ for name, v in list(cls.VARIABLES.items()):
- self._verify_doc(v[2])
-
-
-@@ -631,7 +631,7 @@
- class TestTypedRecord(unittest.TestCase):
-
- def test_fields(self):
-- T = ContextDerivedTypedRecord(('field1', unicode),
-+ T = ContextDerivedTypedRecord(('field1', str),
- ('field2', list))
- inst = T(None)
- self.assertEqual(inst.field1, '')
-@@ -647,7 +647,7 @@
- inst.field3 = []
-
- def test_coercion(self):
-- T = ContextDerivedTypedRecord(('field1', unicode),
-+ T = ContextDerivedTypedRecord(('field1', str),
- ('field2', list))
- inst = T(None)
- inst.field1 = 3
-@@ -673,45 +673,45 @@
- def test_single_bug_component(self):
- c = Context({})
- f = Files(c, pattern='**')
-- f['BUG_COMPONENT'] = (u'Product1', u'Component1')
-+ f['BUG_COMPONENT'] = ('Product1', 'Component1')
-
- files = {'moz.build': f}
- self.assertEqual(Files.aggregate(files), {
-- 'bug_component_counts': [((u'Product1', u'Component1'), 1)],
-- 'recommended_bug_component': (u'Product1', u'Component1'),
-+ 'bug_component_counts': [(('Product1', 'Component1'), 1)],
-+ 'recommended_bug_component': ('Product1', 'Component1'),
- })
-
- def test_multiple_bug_components(self):
- c = Context({})
- f1 = Files(c, pattern='**')
-- f1['BUG_COMPONENT'] = (u'Product1', u'Component1')
-+ f1['BUG_COMPONENT'] = ('Product1', 'Component1')
-
- f2 = Files(c, pattern='**')
-- f2['BUG_COMPONENT'] = (u'Product2', u'Component2')
-+ f2['BUG_COMPONENT'] = ('Product2', 'Component2')
-
- files = {'a': f1, 'b': f2, 'c': f1}
- self.assertEqual(Files.aggregate(files), {
- 'bug_component_counts': [
-- ((u'Product1', u'Component1'), 2),
-- ((u'Product2', u'Component2'), 1),
-+ (('Product1', 'Component1'), 2),
-+ (('Product2', 'Component2'), 1),
- ],
-- 'recommended_bug_component': (u'Product1', u'Component1'),
-+ 'recommended_bug_component': ('Product1', 'Component1'),
- })
-
- def test_no_recommended_bug_component(self):
- """If there is no clear count winner, we don't recommend a bug component."""
- c = Context({})
- f1 = Files(c, pattern='**')
-- f1['BUG_COMPONENT'] = (u'Product1', u'Component1')
-+ f1['BUG_COMPONENT'] = ('Product1', 'Component1')
-
- f2 = Files(c, pattern='**')
-- f2['BUG_COMPONENT'] = (u'Product2', u'Component2')
-+ f2['BUG_COMPONENT'] = ('Product2', 'Component2')
-
- files = {'a': f1, 'b': f2}
- self.assertEqual(Files.aggregate(files), {
- 'bug_component_counts': [
-- ((u'Product1', u'Component1'), 1),
-- ((u'Product2', u'Component2'), 1),
-+ (('Product1', 'Component1'), 1),
-+ (('Product2', 'Component2'), 1),
- ],
- 'recommended_bug_component': None,
- })
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/frontend/test_emitter.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/frontend/test_emitter.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import unicode_literals
-+
-
- import os
- import unittest
-@@ -204,7 +204,7 @@
- def test_use_yasm(self):
- # When yasm is not available, this should raise.
- reader = self.reader('use-yasm')
-- with self.assertRaisesRegexp(SandboxValidationError,
-+ with self.assertRaisesRegex(SandboxValidationError,
- 'yasm is not available'):
- self.read_topsrcdir(reader)
-
-@@ -267,25 +267,25 @@
- o = objs[0]
- self.assertIsInstance(o, GeneratedFile)
- self.assertEqual(o.outputs, ('bar.c',))
-- self.assertRegexpMatches(o.script, 'script.py$')
-+ self.assertRegex(o.script, 'script.py$')
- self.assertEqual(o.method, 'make_bar')
- self.assertEqual(o.inputs, [])
-
- def test_generated_files_no_script(self):
- reader = self.reader('generated-files-no-script')
-- with self.assertRaisesRegexp(SandboxValidationError,
-+ with self.assertRaisesRegex(SandboxValidationError,
- 'Script for generating bar.c does not exist'):
- self.read_topsrcdir(reader)
-
- def test_generated_files_no_inputs(self):
- reader = self.reader('generated-files-no-inputs')
-- with self.assertRaisesRegexp(SandboxValidationError,
-+ with self.assertRaisesRegex(SandboxValidationError,
- 'Input for generating foo.c does not exist'):
- self.read_topsrcdir(reader)
-
- def test_generated_files_no_python_script(self):
- reader = self.reader('generated-files-no-python-script')
-- with self.assertRaisesRegexp(SandboxValidationError,
-+ with self.assertRaisesRegex(SandboxValidationError,
- 'Script for generating bar.c does not end in .py'):
- self.read_topsrcdir(reader)
-
-@@ -314,7 +314,7 @@
- Missing files in EXPORTS is an error.
- '''
- reader = self.reader('exports-missing')
-- with self.assertRaisesRegexp(SandboxValidationError,
-+ with self.assertRaisesRegex(SandboxValidationError,
- 'File listed in EXPORTS does not exist:'):
- self.read_topsrcdir(reader)
-
-@@ -323,7 +323,7 @@
- An objdir file in EXPORTS that is not in GENERATED_FILES is an error.
- '''
- reader = self.reader('exports-missing-generated')
-- with self.assertRaisesRegexp(SandboxValidationError,
-+ with self.assertRaisesRegex(SandboxValidationError,
- 'Objdir file listed in EXPORTS not in GENERATED_FILES:'):
- self.read_topsrcdir(reader)
-
-@@ -360,7 +360,7 @@
-
- def test_test_harness_files_root(self):
- reader = self.reader('test-harness-files-root')
-- with self.assertRaisesRegexp(SandboxValidationError,
-+ with self.assertRaisesRegex(SandboxValidationError,
- 'Cannot install files to the root of TEST_HARNESS_FILES'):
- self.read_topsrcdir(reader)
-
-@@ -413,14 +413,14 @@
- """A missing manifest file should result in an error."""
- reader = self.reader('test-manifest-missing-manifest')
-
-- with self.assertRaisesRegexp(BuildReaderError, 'IOError: Missing files'):
-+ with self.assertRaisesRegex(BuildReaderError, 'IOError: Missing files'):
- self.read_topsrcdir(reader)
-
- def test_empty_test_manifest_rejected(self):
- """A test manifest without any entries is rejected."""
- reader = self.reader('test-manifest-empty')
-
-- with self.assertRaisesRegexp(SandboxValidationError, 'Empty test manifest'):
-+ with self.assertRaisesRegex(SandboxValidationError, 'Empty test manifest'):
- self.read_topsrcdir(reader)
-
-
-@@ -428,7 +428,7 @@
- """A test manifest with no tests but support-files is not supported."""
- reader = self.reader('test-manifest-just-support')
-
-- with self.assertRaisesRegexp(SandboxValidationError, 'Empty test manifest'):
-+ with self.assertRaisesRegex(SandboxValidationError, 'Empty test manifest'):
- self.read_topsrcdir(reader)
-
- def test_test_manifest_dupe_support_files(self):
-@@ -437,7 +437,7 @@
- """
- reader = self.reader('test-manifest-dupes')
-
-- with self.assertRaisesRegexp(SandboxValidationError, 'bar.js appears multiple times '
-+ with self.assertRaisesRegex(SandboxValidationError, 'bar.js appears multiple times '
- 'in a test manifest under a support-files field, please omit the duplicate entry.'):
- self.read_topsrcdir(reader)
-
-@@ -454,7 +454,7 @@
- mozpath.join(o.install_prefix, "absolute-support.ini"),
- mozpath.join(o.install_prefix, "test_file.js"),
- ]
-- paths = sorted([v[0] for v in o.installs.values()])
-+ paths = sorted([v[0] for v in list(o.installs.values())])
- self.assertEqual(paths, expected)
-
- @unittest.skip('Bug 1304316 - Items in the second set but not the first')
-@@ -481,7 +481,7 @@
- """A non-existent shared support file reference produces an error."""
- reader = self.reader('test-manifest-shared-missing')
-
-- with self.assertRaisesRegexp(SandboxValidationError,
-+ with self.assertRaisesRegex(SandboxValidationError,
- 'entry in support-files not present in the srcdir'):
- self.read_topsrcdir(reader)
-
-@@ -500,7 +500,7 @@
- mozpath.normpath(mozpath.join(o.install_prefix, "subdir/support.txt")),
- mozpath.normpath(mozpath.join(o.install_prefix, "subdir/test_foo.html")),
- ]
-- paths = sorted([v[0] for v in o.installs.values()])
-+ paths = sorted([v[0] for v in list(o.installs.values())])
- self.assertEqual(paths, expected)
-
- def test_test_manifest_install_includes(self):
-@@ -518,7 +518,7 @@
- mozpath.normpath(mozpath.join(o.install_prefix, "subdir/mochitest.ini")),
- mozpath.normpath(mozpath.join(o.install_prefix, "subdir/test_foo.html")),
- ]
-- paths = sorted([v[0] for v in o.installs.values()])
-+ paths = sorted([v[0] for v in list(o.installs.values())])
- self.assertEqual(paths, expected)
-
- def test_test_manifest_includes(self):
-@@ -541,7 +541,7 @@
- def test_python_unit_test_missing(self):
- """Missing files in PYTHON_UNIT_TESTS should raise."""
- reader = self.reader('test-python-unit-test-missing')
-- with self.assertRaisesRegexp(SandboxValidationError,
-+ with self.assertRaisesRegex(SandboxValidationError,
- 'Path specified in PYTHON_UNIT_TESTS does not exist:'):
- self.read_topsrcdir(reader)
-
-@@ -635,7 +635,7 @@
- self.assertEqual(external_normalized, m.get('external', set()))
-
- self.assertEqual(len(o.installs), len(m['installs']))
-- for path in o.installs.keys():
-+ for path in list(o.installs.keys()):
- self.assertTrue(path.startswith(o.directory))
- relpath = path[len(o.directory)+1:]
-
-@@ -648,7 +648,7 @@
- def test_test_manifest_unmatched_generated(self):
- reader = self.reader('test-manifest-unmatched-generated')
-
-- with self.assertRaisesRegexp(SandboxValidationError,
-+ with self.assertRaisesRegex(SandboxValidationError,
- 'entry in generated-files not present elsewhere'):
- self.read_topsrcdir(reader),
-
-@@ -672,7 +672,7 @@
- """Missing test files should result in error."""
- reader = self.reader('test-manifest-missing-test-file')
-
-- with self.assertRaisesRegexp(SandboxValidationError,
-+ with self.assertRaisesRegex(SandboxValidationError,
- 'lists test that does not exist: test_missing.html'):
- self.read_topsrcdir(reader)
-
-@@ -680,7 +680,7 @@
- """Missing test files should result in error, even when the test list is not filtered."""
- reader = self.reader('test-manifest-missing-test-file-unfiltered')
-
-- with self.assertRaisesRegexp(SandboxValidationError,
-+ with self.assertRaisesRegex(SandboxValidationError,
- 'lists test that does not exist: missing.js'):
- self.read_topsrcdir(reader)
-
-@@ -794,20 +794,20 @@
- self.assertIsInstance(obj.path, Path)
-
- def test_jar_manifests_multiple_files(self):
-- with self.assertRaisesRegexp(SandboxValidationError, 'limited to one value'):
-+ with self.assertRaisesRegex(SandboxValidationError, 'limited to one value'):
- reader = self.reader('jar-manifests-multiple-files')
- self.read_topsrcdir(reader)
-
- def test_xpidl_module_no_sources(self):
- """XPIDL_MODULE without XPIDL_SOURCES should be rejected."""
-- with self.assertRaisesRegexp(SandboxValidationError, 'XPIDL_MODULE '
-+ with self.assertRaisesRegex(SandboxValidationError, 'XPIDL_MODULE '
- 'cannot be defined'):
- reader = self.reader('xpidl-module-no-sources')
- self.read_topsrcdir(reader)
-
- def test_missing_local_includes(self):
- """LOCAL_INCLUDES containing non-existent directories should be rejected."""
-- with self.assertRaisesRegexp(SandboxValidationError, 'Path specified in '
-+ with self.assertRaisesRegex(SandboxValidationError, 'Path specified in '
- 'LOCAL_INCLUDES does not exist'):
- reader = self.reader('missing-local-includes')
- self.read_topsrcdir(reader)
-@@ -852,7 +852,7 @@
- '.S': ['g.S'],
- '.s': ['h.s', 'i.asm'],
- }
-- for suffix, files in expected.items():
-+ for suffix, files in list(expected.items()):
- sources = suffix_map[suffix]
- self.assertEqual(
- sources.files,
-@@ -905,7 +905,7 @@
- '.S': ['g.S'],
- '.s': ['h.s', 'i.asm'],
- }
-- for suffix, files in expected.items():
-+ for suffix, files in list(expected.items()):
- sources = suffix_map[suffix]
- self.assertEqual(
- sources.files,
-@@ -931,7 +931,7 @@
- '.c': ['d.c'],
- '.mm': ['e.mm', 'f.mm'],
- }
-- for suffix, files in expected.items():
-+ for suffix, files in list(expected.items()):
- sources = suffix_map[suffix]
- self.assertEqual(
- sources.files,
-@@ -956,7 +956,7 @@
- '.mm': ['objc1.mm', 'objc2.mm'],
- '.c': ['c1.c', 'c2.c'],
- }
-- for suffix, files in expected.items():
-+ for suffix, files in list(expected.items()):
- sources = suffix_map[suffix]
- self.assertEqual(
- sources.files,
-@@ -982,7 +982,7 @@
- '.mm': ['objc1.mm', 'objc2.mm'],
- '.c': ['c1.c', 'c2.c'],
- }
-- for suffix, files in expected.items():
-+ for suffix, files in list(expected.items()):
- sources = suffix_map[suffix]
- self.assertEqual(
- sources.files,
-@@ -1005,11 +1005,11 @@
-
- expected = {'install.rdf', 'main.js'}
- for f in files:
-- self.assertTrue(unicode(f) in expected)
-+ self.assertTrue(str(f) in expected)
-
- def test_missing_final_target_pp_files(self):
- """Test that FINAL_TARGET_PP_FILES with missing files throws errors."""
-- with self.assertRaisesRegexp(SandboxValidationError, 'File listed in '
-+ with self.assertRaisesRegex(SandboxValidationError, 'File listed in '
- 'FINAL_TARGET_PP_FILES does not exist'):
- reader = self.reader('dist-files-missing')
- self.read_topsrcdir(reader)
-@@ -1017,49 +1017,49 @@
- def test_final_target_pp_files_non_srcdir(self):
- '''Test that non-srcdir paths in FINAL_TARGET_PP_FILES throws errors.'''
- reader = self.reader('final-target-pp-files-non-srcdir')
-- with self.assertRaisesRegexp(SandboxValidationError,
-+ with self.assertRaisesRegex(SandboxValidationError,
- 'Only source directory paths allowed in FINAL_TARGET_PP_FILES:'):
- self.read_topsrcdir(reader)
-
- def test_rust_library_no_cargo_toml(self):
- '''Test that defining a RustLibrary without a Cargo.toml fails.'''
- reader = self.reader('rust-library-no-cargo-toml')
-- with self.assertRaisesRegexp(SandboxValidationError,
-+ with self.assertRaisesRegex(SandboxValidationError,
- 'No Cargo.toml file found'):
- self.read_topsrcdir(reader)
-
- def test_rust_library_name_mismatch(self):
- '''Test that defining a RustLibrary that doesn't match Cargo.toml fails.'''
- reader = self.reader('rust-library-name-mismatch')
-- with self.assertRaisesRegexp(SandboxValidationError,
-+ with self.assertRaisesRegex(SandboxValidationError,
- 'library.*does not match Cargo.toml-defined package'):
- self.read_topsrcdir(reader)
-
- def test_rust_library_no_lib_section(self):
- '''Test that a RustLibrary Cargo.toml with no [lib] section fails.'''
- reader = self.reader('rust-library-no-lib-section')
-- with self.assertRaisesRegexp(SandboxValidationError,
-+ with self.assertRaisesRegex(SandboxValidationError,
- 'Cargo.toml for.* has no \\[lib\\] section'):
- self.read_topsrcdir(reader)
-
- def test_rust_library_no_profile_section(self):
- '''Test that a RustLibrary Cargo.toml with no [profile] section fails.'''
- reader = self.reader('rust-library-no-profile-section')
-- with self.assertRaisesRegexp(SandboxValidationError,
-+ with self.assertRaisesRegex(SandboxValidationError,
- 'Cargo.toml for.* has no \\[profile\\.dev\\] section'):
- self.read_topsrcdir(reader)
-
- def test_rust_library_invalid_crate_type(self):
- '''Test that a RustLibrary Cargo.toml has a permitted crate-type.'''
- reader = self.reader('rust-library-invalid-crate-type')
-- with self.assertRaisesRegexp(SandboxValidationError,
-+ with self.assertRaisesRegex(SandboxValidationError,
- 'crate-type.* is not permitted'):
- self.read_topsrcdir(reader)
-
- def test_rust_library_non_abort_panic(self):
- '''Test that a RustLibrary Cargo.toml has `panic = "abort" set'''
- reader = self.reader('rust-library-non-abort-panic')
-- with self.assertRaisesRegexp(SandboxValidationError,
-+ with self.assertRaisesRegex(SandboxValidationError,
- 'does not specify `panic = "abort"`'):
- self.read_topsrcdir(reader)
-
-@@ -1072,15 +1072,15 @@
- self.assertEqual(len(objs), 1)
- lib = objs[0]
- self.assertIsInstance(lib, RustLibrary)
-- self.assertRegexpMatches(lib.lib_name, "random_crate")
-- self.assertRegexpMatches(lib.import_name, "random_crate")
-- self.assertRegexpMatches(lib.basename, "random-crate")
-+ self.assertRegex(lib.lib_name, "random_crate")
-+ self.assertRegex(lib.import_name, "random_crate")
-+ self.assertRegex(lib.basename, "random-crate")
-
- def test_multiple_rust_libraries(self):
- '''Test that linking multiple Rust libraries throws an error'''
- reader = self.reader('multiple-rust-libraries',
- extra_substs=dict(RUST_TARGET='i686-pc-windows-msvc'))
-- with self.assertRaisesRegexp(LinkageMultipleRustLibrariesError,
-+ with self.assertRaisesRegex(LinkageMultipleRustLibrariesError,
- 'Cannot link multiple Rust libraries'):
- self.read_topsrcdir(reader)
-
-@@ -1107,7 +1107,7 @@
- mozpath.join(reader.config.topobjdir, 'dir2'),
- '/dir3',
- ]
-- self.assertEquals([p.full_path for p in objs[0].paths], expected)
-+ self.assertEqual([p.full_path for p in objs[0].paths], expected)
-
- def test_binary_components(self):
- """Test that IS_COMPONENT/NO_COMPONENTS_MANIFEST work properly."""
-@@ -1163,7 +1163,7 @@
- from GENERATED_FILES is an error.
- """
- reader = self.reader('test-symbols-file-objdir-missing-generated')
-- with self.assertRaisesRegexp(SandboxValidationError,
-+ with self.assertRaisesRegex(SandboxValidationError,
- 'Objdir file specified in SYMBOLS_FILE not in GENERATED_FILES:'):
- self.read_topsrcdir(reader)
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/frontend/test_namespaces.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/frontend/test_namespaces.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import unicode_literals
-+
-
- import unittest
-
-@@ -29,7 +29,7 @@
-
- class Piyo(ContextDerivedValue):
- def __init__(self, context, value):
-- if not isinstance(value, unicode):
-+ if not isinstance(value, str):
- raise ValueError
- self.context = context
- self.value = value
-@@ -48,9 +48,9 @@
-
-
- VARIABLES = {
-- 'HOGE': (unicode, unicode, None),
-- 'FUGA': (Fuga, unicode, None),
-- 'PIYO': (Piyo, unicode, None),
-+ 'HOGE': (str, str, None),
-+ 'FUGA': (Fuga, str, None),
-+ 'PIYO': (Piyo, str, None),
- 'HOGERA': (ContextDerivedTypedList(Piyo, StrictOrderingOnAppendList),
- list, None),
- 'HOGEHOGE': (ContextDerivedTypedListWithItems(
-@@ -104,7 +104,7 @@
- self.assertEqual(e[1], 'set_type')
- self.assertEqual(e[2], 'HOGE')
- self.assertEqual(e[3], True)
-- self.assertEqual(e[4], unicode)
-+ self.assertEqual(e[4], str)
-
- def test_key_checking(self):
- # Checking for existence of a key should not populate the key if it
-@@ -127,7 +127,7 @@
- self.assertEqual(e[1], 'set_type')
- self.assertEqual(e[2], 'FUGA')
- self.assertEqual(e[3], False)
-- self.assertEqual(e[4], unicode)
-+ self.assertEqual(e[4], str)
-
- ns['FUGA'] = 'fuga'
- self.assertIsInstance(ns['FUGA'], Fuga)
-@@ -150,7 +150,7 @@
- self.assertEqual(e[1], 'set_type')
- self.assertEqual(e[2], 'PIYO')
- self.assertEqual(e[3], False)
-- self.assertEqual(e[4], unicode)
-+ self.assertEqual(e[4], str)
-
- ns['PIYO'] = 'piyo'
- self.assertIsInstance(ns['PIYO'], Piyo)
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/frontend/test_reader.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/frontend/test_reader.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import unicode_literals
-+
-
- import os
- import sys
-@@ -423,7 +423,7 @@
- 'simple/base.cpp',
- ])
-
-- for path, pattern_set in expected.items():
-+ for path, pattern_set in list(expected.items()):
- self.assertEqual(v[path].test_files,
- expected[path])
-
-@@ -438,7 +438,7 @@
- 'default/tests/reftests/**']),
- }
-
-- for path, pattern_set in expected.items():
-+ for path, pattern_set in list(expected.items()):
- self.assertEqual(v[path].test_files,
- expected[path])
-
-@@ -454,7 +454,7 @@
- 'tagged/src/bar.jsm': set(['tagged/**.js']),
- }
-
-- for path, pattern_set in expected_patterns.items():
-+ for path, pattern_set in list(expected_patterns.items()):
- self.assertEqual(v[path].test_files,
- expected_patterns[path])
-
-@@ -462,7 +462,7 @@
- 'tagged/src/submodule/foo.js': set(['submodule']),
- 'tagged/src/bar.jsm': set([]),
- }
-- for path, pattern_set in expected_tags.items():
-+ for path, pattern_set in list(expected_tags.items()):
- self.assertEqual(v[path].test_tags,
- expected_tags[path])
-
-@@ -470,7 +470,7 @@
- 'tagged/src/bar.jsm': set(['browser-chrome']),
- 'tagged/src/submodule/foo.js': set([]),
- }
-- for path, pattern_set in expected_flavors.items():
-+ for path, pattern_set in list(expected_flavors.items()):
- self.assertEqual(v[path].test_flavors,
- expected_flavors[path])
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/test/frontend/test_sandbox.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/test/frontend/test_sandbox.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import unicode_literals
-+
-
- import os
- import shutil
-@@ -345,7 +345,7 @@
- sandbox = MozbuildSandbox(Context(VARIABLES, config))
-
- self.assertEqual(sandbox['CONFIG']['BAD_UTF8'],
-- u'\ufffd\ufffd\ufffd\ufffd:')
-+ '\ufffd\ufffd\ufffd\ufffd:')
-
- def test_invalid_exports_set_base(self):
- sandbox = self.sandbox()
-@@ -525,7 +525,7 @@
- source = 'a = foo(1, 2)'
- sandbox.exec_source(source, 'foo.mozbuild')
-
-- self.assertEquals(sandbox['a'], (Foo, int))
-+ self.assertEqual(sandbox['a'], (Foo, int))
- finally:
- del FUNCTIONS['foo']
-
---- firefox-52.9.0esr/python/mozbuild/mozpack/archive.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/archive.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import
-+
-
- import bz2
- import gzip
---- firefox-52.9.0esr/python/mozbuild/mozpack/copier.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/copier.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import
-+
-
- import os
- import stat
-@@ -109,7 +109,7 @@
- '''
- Return all paths stored in the container, in the order they were added.
- '''
-- return self._files.keys()
-+ return list(self._files.keys())
-
- def __len__(self):
- '''
-@@ -142,7 +142,7 @@
- for path, file in registry:
- (...)
- '''
-- return self._files.iteritems()
-+ return iter(self._files.items())
-
- def required_directories(self):
- '''
-@@ -151,7 +151,7 @@
- unspecified (virtual) root directory (and do not include said root
- directory).
- '''
-- return set(k for k, v in self._required_directories.items() if v > 0)
-+ return set(k for k, v in list(self._required_directories.items()) if v > 0)
-
-
- class FileRegistrySubtree(object):
-@@ -263,7 +263,7 @@
-
- Returns a FileCopyResult that details what changed.
- '''
-- assert isinstance(destination, basestring)
-+ assert isinstance(destination, str)
- assert not os.path.exists(destination) or os.path.isdir(destination)
-
- result = FileCopyResult()
-@@ -531,7 +531,7 @@
- def exists(self):
- return self.deflater is not None
-
-- if isinstance(dest, basestring):
-+ if isinstance(dest, str):
- dest = Dest(dest)
- assert isinstance(dest, Dest)
-
---- firefox-52.9.0esr/python/mozbuild/mozpack/errors.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/errors.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import
-+
-
- import sys
- from contextlib import contextmanager
-@@ -97,7 +97,7 @@
- if self._count is None:
- raise ErrorMessage(msg)
- self._count += 1
-- print >>self.out, msg
-+ print(msg, file=self.out)
-
- def fatal(self, msg):
- self._handle(self.FATAL, msg)
---- firefox-52.9.0esr/python/mozbuild/mozpack/executables.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/executables.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import
-+
-
- import os
- import struct
---- firefox-52.9.0esr/python/mozbuild/mozpack/files.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/files.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import
-+
-
- import errno
- import os
-@@ -57,7 +57,7 @@
-
- def _copyfile(src, dest):
- # False indicates `dest` should be overwritten if it exists already.
-- if isinstance(src, unicode) and isinstance(dest, unicode):
-+ if isinstance(src, str) and isinstance(dest, str):
- _CopyFileW(src, dest, False)
- elif isinstance(src, str) and isinstance(dest, str):
- _CopyFileA(src, dest, False)
-@@ -145,13 +145,13 @@
- # - keep file type (e.g. S_IFREG)
- ret = stat.S_IFMT(mode)
- # - expand user read and execute permissions to everyone
-- if mode & 0400:
-- ret |= 0444
-- if mode & 0100:
-- ret |= 0111
-+ if mode & 0o400:
-+ ret |= 0o444
-+ if mode & 0o100:
-+ ret |= 0o111
- # - keep user write permissions
-- if mode & 0200:
-- ret |= 0200
-+ if mode & 0o200:
-+ ret |= 0o200
- # - leave away sticky bit, setuid, setgid
- return ret
-
-@@ -164,7 +164,7 @@
- disabled when skip_if_older is False.
- Returns whether a copy was actually performed (True) or not (False).
- '''
-- if isinstance(dest, basestring):
-+ if isinstance(dest, str):
- dest = Dest(dest)
- else:
- assert isinstance(dest, Dest)
-@@ -258,11 +258,11 @@
- '''
- def copy(self, dest, skip_if_older=True):
- real_dest = dest
-- if not isinstance(dest, basestring):
-+ if not isinstance(dest, str):
- fd, dest = mkstemp()
- os.close(fd)
- os.remove(dest)
-- assert isinstance(dest, basestring)
-+ assert isinstance(dest, str)
- # If File.copy didn't actually copy because dest is newer, check the
- # file sizes. If dest is smaller, it means it is already stripped and
- # elfhacked, so we can skip.
-@@ -299,7 +299,7 @@
- File.__init__(self, path)
-
- def copy(self, dest, skip_if_older=True):
-- assert isinstance(dest, basestring)
-+ assert isinstance(dest, str)
-
- # The logic in this function is complicated by the fact that symlinks
- # aren't universally supported. So, where symlinks aren't supported, we
-@@ -400,7 +400,7 @@
- self.required = required
-
- def copy(self, dest, skip_if_older=True):
-- if isinstance(dest, basestring):
-+ if isinstance(dest, str):
- dest = Dest(dest)
- else:
- assert isinstance(dest, Dest)
-@@ -432,7 +432,7 @@
- '''
- Invokes the preprocessor to create the destination file.
- '''
-- if isinstance(dest, basestring):
-+ if isinstance(dest, str):
- dest = Dest(dest)
- else:
- assert isinstance(dest, Dest)
-@@ -563,7 +563,7 @@
- the individual XPTs to link.
- skip_if_older is ignored.
- '''
-- if isinstance(dest, basestring):
-+ if isinstance(dest, str):
- dest = Dest(dest)
- assert isinstance(dest, Dest)
-
-@@ -1014,7 +1014,7 @@
- from mozpack.copier import FileRegistry
- self.files = FileRegistry()
-
-- for base, finder in sorted(finders.iteritems()):
-+ for base, finder in sorted(finders.items()):
- if self.files.contains(base):
- self.files.remove(base)
- for p, f in finder.find(''):
---- firefox-52.9.0esr/python/mozbuild/mozpack/hg.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/hg.py (refactored)
-@@ -27,7 +27,7 @@
- # do not wish to do so, delete this exception statement from your
- # version.
-
--from __future__ import absolute_import
-+
-
- import mercurial.error as error
- import mercurial.hg as hg
-@@ -56,7 +56,7 @@
-
- Accepts a Mercurial localrepo and changectx instance.
- """
-- if isinstance(repo, (str, unicode)):
-+ if isinstance(repo, str):
- path = repo
- repo = hg.repository(hgui.ui(), repo)
- else:
-@@ -85,7 +85,7 @@
- return self._get(path)
-
- def _get(self, path):
-- if isinstance(path, unicode):
-+ if isinstance(path, str):
- path = path.encode('utf-8', 'replace')
-
- try:
---- firefox-52.9.0esr/python/mozbuild/mozpack/manifests.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/manifests.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import, unicode_literals
-+
-
- from contextlib import contextmanager
- import json
---- firefox-52.9.0esr/python/mozbuild/mozpack/mozjar.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/mozjar.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import
-+
-
- from io import BytesIO
- import struct
-@@ -13,8 +13,9 @@
- ZIP_DEFLATED,
- )
- from collections import OrderedDict
--from urlparse import urlparse, ParseResult
-+from urllib.parse import urlparse, ParseResult
- import mozpack.path as mozpath
-+from functools import reduce
-
- JAR_STORED = ZIP_STORED
- JAR_DEFLATED = ZIP_DEFLATED
-@@ -68,7 +69,7 @@
- an instance with empty fields.
- '''
- assert self.MAGIC and isinstance(self.STRUCT, OrderedDict)
-- self.size_fields = set(t for t in self.STRUCT.itervalues()
-+ self.size_fields = set(t for t in self.STRUCT.values()
- if not t in JarStruct.TYPE_MAPPING)
- self._values = {}
- if data:
-@@ -90,7 +91,7 @@
- # For all fields used as other fields sizes, keep track of their value
- # separately.
- sizes = dict((t, 0) for t in self.size_fields)
-- for name, t in self.STRUCT.iteritems():
-+ for name, t in self.STRUCT.items():
- if t in JarStruct.TYPE_MAPPING:
- value, size = JarStruct.get_data(t, data[offset:])
- else:
-@@ -109,7 +110,7 @@
- Initialize an instance with empty fields.
- '''
- self.signature = self.MAGIC
-- for name, t in self.STRUCT.iteritems():
-+ for name, t in self.STRUCT.items():
- if name in self.size_fields:
- continue
- self._values[name] = 0 if t in JarStruct.TYPE_MAPPING else ''
-@@ -134,9 +135,9 @@
- from self.STRUCT.
- '''
- serialized = struct.pack('<I', self.signature)
-- sizes = dict((t, name) for name, t in self.STRUCT.iteritems()
-+ sizes = dict((t, name) for name, t in self.STRUCT.items()
- if not t in JarStruct.TYPE_MAPPING)
-- for name, t in self.STRUCT.iteritems():
-+ for name, t in self.STRUCT.items():
- if t in JarStruct.TYPE_MAPPING:
- format, size = JarStruct.TYPE_MAPPING[t]
- if name in sizes:
-@@ -155,7 +156,7 @@
- variable length fields.
- '''
- size = JarStruct.TYPE_MAPPING['uint32'][1]
-- for name, type in self.STRUCT.iteritems():
-+ for name, type in self.STRUCT.items():
- if type in JarStruct.TYPE_MAPPING:
- size += JarStruct.TYPE_MAPPING[type][1]
- else:
-@@ -176,7 +177,7 @@
- return key in self._values
-
- def __iter__(self):
-- return self._values.iteritems()
-+ return iter(self._values.items())
-
- def __repr__(self):
- return "<%s %s>" % (self.__class__.__name__,
-@@ -374,7 +375,7 @@
- preload = JarStruct.get_data('uint32', self._data)[0]
- entries = OrderedDict()
- offset = self._cdir_end['cdir_offset']
-- for e in xrange(self._cdir_end['cdir_entries']):
-+ for e in range(self._cdir_end['cdir_entries']):
- entry = JarCdirEntry(self._data[offset:])
- offset += entry.size
- # Creator host system. 0 is MSDOS, 3 is Unix
-@@ -385,7 +386,7 @@
- xattr = entry['external_attr']
- # Skip directories
- if (host == 0 and xattr & 0x10) or (host == 3 and
-- xattr & (040000 << 16)):
-+ xattr & (0o40000 << 16)):
- continue
- entries[entry['filename']] = entry
- if entry['offset'] < preload:
-@@ -436,7 +437,7 @@
- for file in jarReader:
- ...
- '''
-- for entry in self.entries.itervalues():
-+ for entry in self.entries.values():
- yield self._getreader(entry)
-
- def __getitem__(self, name):
-@@ -529,7 +530,7 @@
- headers = {}
- preload_size = 0
- # Prepare central directory entries
-- for entry, content in self._contents.itervalues():
-+ for entry, content in self._contents.values():
- header = JarLocalFileHeader()
- for name in entry.STRUCT:
- if name in header:
-@@ -544,7 +545,7 @@
- end['disk_entries'] = len(self._contents)
- end['cdir_entries'] = end['disk_entries']
- end['cdir_size'] = reduce(lambda x, y: x + y[0].size,
-- self._contents.values(), 0)
-+ list(self._contents.values()), 0)
- # On optimized archives, store the preloaded size and the central
- # directory entries, followed by the first end of central directory.
- if self._optimize:
-@@ -553,18 +554,18 @@
- if preload_size:
- preload_size += offset
- self._data.write(struct.pack('<I', preload_size))
-- for entry, _ in self._contents.itervalues():
-+ for entry, _ in self._contents.values():
- entry['offset'] += offset
- self._data.write(entry.serialize())
- self._data.write(end.serialize())
- # Store local file entries followed by compressed data
-- for entry, content in self._contents.itervalues():
-+ for entry, content in self._contents.values():
- self._data.write(headers[entry].serialize())
- self._data.write(content)
- # On non optimized archives, store the central directory entries.
- if not self._optimize:
- end['cdir_offset'] = offset
-- for entry, _ in self._contents.itervalues():
-+ for entry, _ in self._contents.values():
- self._data.write(entry.serialize())
- # Store the end of central directory.
- self._data.write(end.serialize())
-@@ -599,7 +600,7 @@
- deflater = data
- else:
- deflater = Deflater(compress, compress_level=self._compress_level)
-- if isinstance(data, basestring):
-+ if isinstance(data, str):
- deflater.write(data)
- elif hasattr(data, 'read'):
- if hasattr(data, 'seek'):
-@@ -615,7 +616,7 @@
- # Set creator host system (upper byte of creator_version)
- # to 3 (Unix) so mode is honored when there is one.
- entry['creator_version'] |= 3 << 8
-- entry['external_attr'] = (mode & 0xFFFF) << 16L
-+ entry['external_attr'] = (mode & 0xFFFF) << 16
- if deflater.compressed:
- entry['min_version'] = 20 # Version 2.0 supports deflated streams
- entry['general_flag'] = 2 # Max compression
---- firefox-52.9.0esr/python/mozbuild/mozpack/path.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/path.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import
-+
-
- import posixpath
- import os
---- firefox-52.9.0esr/python/mozbuild/mozpack/unify.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/unify.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import
-+
-
- from mozpack.files import (
- BaseFinder,
-@@ -73,7 +73,7 @@
- creating the instance.
- skip_if_older is ignored.
- '''
-- assert isinstance(dest, basestring)
-+ assert isinstance(dest, str)
- tmpfiles = []
- try:
- for e in self._executables:
---- firefox-52.9.0esr/python/mozbuild/mozpack/chrome/flags.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/chrome/flags.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import
-+
-
- import re
- from distutils.version import LooseVersion
-@@ -250,7 +250,7 @@
- flags.match(application='foo', appversion='3.5') returns True
- flags.match(application='foo', appversion='3.0') returns False
- '''
-- for name, value in filter.iteritems():
-+ for name, value in filter.items():
- if not name in self:
- continue
- if not self[name].matches(value):
---- firefox-52.9.0esr/python/mozbuild/mozpack/chrome/manifest.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/chrome/manifest.py (refactored)
-@@ -2,11 +2,11 @@
- # 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/.
-
--from __future__ import absolute_import
-+
-
- import re
- import os
--from urlparse import urlparse
-+from urllib.parse import urlparse
- import mozpack.path as mozpath
- from mozpack.chrome.flags import Flags
- from mozpack.errors import errors
-@@ -321,7 +321,7 @@
- return self.serialize(self.contractID, self.cid)
-
- # All manifest classes by their type name.
--MANIFESTS_TYPES = dict([(c.type, c) for c in globals().values()
-+MANIFESTS_TYPES = dict([(c.type, c) for c in list(globals().values())
- if type(c) == type and issubclass(c, ManifestEntry)
- and hasattr(c, 'type') and c.type])
-
---- firefox-52.9.0esr/python/mozbuild/mozpack/packager/__init__.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/packager/__init__.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import
-+
-
- from mozbuild.preprocessor import Preprocessor
- import re
-@@ -50,7 +50,7 @@
- '''
- Split [1, 2, 3, 4, 5, 6, 7] into [(1, 2, 3), (4, 5, 6)].
- '''
-- return zip(*[iter(lst)] * 3)
-+ return list(zip(*[iter(lst)] * 3))
-
- KEY_VALUE_RE = re.compile(r'''
- \s* # optional whitespace.
-@@ -118,7 +118,7 @@
- destdir = options.pop('destdir', '')
- if options:
- errors.fatal('Malformed manifest: options %s not recognized'
-- % options.keys())
-+ % list(options.keys()))
- return Component(name, destdir=destdir)
-
-
-@@ -328,7 +328,7 @@
-
- bases = self.get_bases()
- broken_bases = sorted(
-- m for m, includer in self._included_manifests.iteritems()
-+ m for m, includer in self._included_manifests.items()
- if mozpath.basedir(m, bases) != mozpath.basedir(includer, bases))
- for m in broken_bases:
- errors.fatal('"%s" is included from "%s", which is outside "%s"' %
---- firefox-52.9.0esr/python/mozbuild/mozpack/packager/formats.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/packager/formats.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import
-+
-
- from mozpack.chrome.manifest import (
- Manifest,
-@@ -11,7 +11,7 @@
- ManifestBinaryComponent,
- ManifestResource,
- )
--from urlparse import urlparse
-+from urllib.parse import urlparse
- import mozpack.path as mozpath
- from mozpack.files import (
- ManifestFile,
-@@ -89,7 +89,7 @@
- Return the deepest base directory containing the given path.
- '''
- self._frozen_bases = True
-- base = mozpath.basedir(path, self._sub_formatter.keys())
-+ base = mozpath.basedir(path, list(self._sub_formatter.keys()))
- relpath = mozpath.relpath(path, base) if base else path
- return base, relpath
-
---- firefox-52.9.0esr/python/mozbuild/mozpack/packager/l10n.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/packager/l10n.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import
-+
-
- '''
- Replace localized parts of a packaged directory with data from a langpack
-@@ -162,7 +162,7 @@
- if not path:
- continue
- else:
-- base = mozpath.basedir(p, paths.keys())
-+ base = mozpath.basedir(p, list(paths.keys()))
- if base:
- subpath = mozpath.relpath(p, base)
- path = mozpath.normpath(mozpath.join(paths[base],
-@@ -206,7 +206,7 @@
- formatter.add(p, f)
-
- # Transplant jar preloading information.
-- for path, log in app_finder.jarlogs.iteritems():
-+ for path, log in app_finder.jarlogs.items():
- assert isinstance(copier[path], Jarrer)
- copier[path].preload([l.replace(locale, l10n_locale) for l in log])
-
-@@ -237,7 +237,7 @@
- finders = {
- '': l10n_finder,
- }
-- for base, path in extra_l10n.iteritems():
-+ for base, path in extra_l10n.items():
- finders[base] = UnpackFinder(path)
- l10n_finder = ComposedFinder(finders)
- copier = FileCopier()
---- firefox-52.9.0esr/python/mozbuild/mozpack/packager/unpack.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/packager/unpack.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import
-+
-
- import mozpack.path as mozpath
- from mozpack.files import (
-@@ -27,7 +27,7 @@
- FlatFormatter,
- STARTUP_CACHE_PATHS,
- )
--from urlparse import urlparse
-+from urllib.parse import urlparse
-
-
- class UnpackFinder(BaseFinder):
-@@ -149,7 +149,7 @@
- if not any(f.compressed for f in jar):
- self.compressed = False
- if jar.last_preloaded:
-- jarlog = jar.entries.keys()
-+ jarlog = list(jar.entries.keys())
- self.jarlogs[path] = jarlog[:jarlog.index(jar.last_preloaded) + 1]
- return jar
-
---- firefox-52.9.0esr/python/mozbuild/mozpack/test/test_archive.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/test/test_archive.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import absolute_import
-+
-
- import hashlib
- import os
-@@ -69,7 +69,7 @@
- try:
- tp = os.path.join(d, 'test.tar')
- with open(tp, 'wb') as fh:
-- with self.assertRaisesRegexp(ValueError, 'not a regular'):
-+ with self.assertRaisesRegex(ValueError, 'not a regular'):
- create_tar_from_files(fh, {'test': d})
- finally:
- shutil.rmtree(d)
-@@ -89,9 +89,9 @@
-
- tp = os.path.join(d, 'test.tar')
- with open(tp, 'wb') as fh:
-- with self.assertRaisesRegexp(ValueError, 'cannot add file with setuid'):
-+ with self.assertRaisesRegex(ValueError, 'cannot add file with setuid'):
- create_tar_from_files(fh, {'test': uid})
-- with self.assertRaisesRegexp(ValueError, 'cannot add file with setuid'):
-+ with self.assertRaisesRegex(ValueError, 'cannot add file with setuid'):
- create_tar_from_files(fh, {'test': gid})
- finally:
- shutil.rmtree(d)
---- firefox-52.9.0esr/python/mozbuild/mozpack/test/test_chrome_manifest.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/test/test_chrome_manifest.py (refactored)
-@@ -24,7 +24,7 @@
- parse_manifest_line,
- )
- from mozpack.errors import errors, AccumulatedErrors
--from test_errors import TestErrors
-+from .test_errors import TestErrors
-
-
- class TestManifest(unittest.TestCase):
---- firefox-52.9.0esr/python/mozbuild/mozpack/test/test_copier.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/test/test_copier.py (refactored)
-@@ -127,7 +127,7 @@
- 'bar': [],
- }
- reg = FileRegistry()
-- for path, parts in cases.iteritems():
-+ for path, parts in cases.items():
- self.assertEqual(reg._partial_paths(path), parts)
-
- def test_file_registry(self):
-@@ -414,7 +414,7 @@
- self.assertTrue(stat.S_ISDIR(st.st_mode))
-
- # What's worse, we have no record that dest was created.
-- self.assertEquals(len(result.updated_files), 0)
-+ self.assertEqual(len(result.updated_files), 0)
-
- # But we do have an erroneous record of an optional file
- # existing when it does not.
---- firefox-52.9.0esr/python/mozbuild/mozpack/test/test_errors.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/test/test_errors.py (refactored)
-@@ -10,7 +10,7 @@
- import unittest
- import mozunit
- import sys
--from cStringIO import StringIO
-+from io import StringIO
-
-
- class TestErrors(object):
-@@ -30,14 +30,14 @@
- errors.warn('foo')
- self.assertRaises(ErrorMessage, errors.error, 'foo')
- self.assertRaises(ErrorMessage, errors.fatal, 'foo')
-- self.assertEquals(self.get_output(), ['Warning: foo'])
-+ self.assertEqual(self.get_output(), ['Warning: foo'])
-
- def test_ignore_errors(self):
- errors.ignore_errors()
- errors.warn('foo')
- errors.error('bar')
- self.assertRaises(ErrorMessage, errors.fatal, 'foo')
-- self.assertEquals(self.get_output(), ['Warning: foo', 'Warning: bar'])
-+ self.assertEqual(self.get_output(), ['Warning: foo', 'Warning: bar'])
-
- def test_no_error(self):
- with errors.accumulate():
-@@ -47,14 +47,14 @@
- with self.assertRaises(AccumulatedErrors):
- with errors.accumulate():
- errors.error('1')
-- self.assertEquals(self.get_output(), ['Error: 1'])
-+ self.assertEqual(self.get_output(), ['Error: 1'])
-
- def test_error_loop(self):
- with self.assertRaises(AccumulatedErrors):
- with errors.accumulate():
- for i in range(3):
- errors.error('%d' % i)
-- self.assertEquals(self.get_output(),
-+ self.assertEqual(self.get_output(),
- ['Error: 0', 'Error: 1', 'Error: 2'])
-
- def test_multiple_errors(self):
-@@ -67,7 +67,7 @@
- else:
- errors.error('%d' % i)
- errors.error('bar')
-- self.assertEquals(self.get_output(),
-+ self.assertEqual(self.get_output(),
- ['Error: foo', 'Error: 0', 'Error: 1',
- 'Warning: 2', 'Error: bar'])
-
---- firefox-52.9.0esr/python/mozbuild/mozpack/test/test_files.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/test/test_files.py (refactored)
-@@ -61,7 +61,7 @@
- import mozpack.path as mozpath
- from tempfile import mkdtemp
- from io import BytesIO
--from StringIO import StringIO
-+from io import StringIO
- from xpt import Typelib
-
-
-@@ -146,7 +146,7 @@
- dest.write('qux')
- self.assertEqual(dest.read(), 'qux')
-
--rand = ''.join(random.choice(string.letters) for i in xrange(131597))
-+rand = ''.join(random.choice(string.letters) for i in range(131597))
- samples = [
- '',
- 'test',
-@@ -268,7 +268,7 @@
- def test_absolute_relative(self):
- AbsoluteSymlinkFile('/foo')
-
-- with self.assertRaisesRegexp(ValueError, 'Symlink target not absolute'):
-+ with self.assertRaisesRegex(ValueError, 'Symlink target not absolute'):
- AbsoluteSymlinkFile('./foo')
-
- def test_symlink_file(self):
-@@ -477,7 +477,7 @@
-
- class TestExistingFile(TestWithTmpDir):
- def test_required_missing_dest(self):
-- with self.assertRaisesRegexp(ErrorMessage, 'Required existing file'):
-+ with self.assertRaisesRegex(ErrorMessage, 'Required existing file'):
- f = ExistingFile(required=True)
- f.copy(self.tmppath('dest'))
-
-@@ -566,7 +566,7 @@
- with JarWriter(src) as jar:
- for content in samples:
- name = ''.join(random.choice(string.letters)
-- for i in xrange(8))
-+ for i in range(8))
- jar.add(name, content, compress=True)
- contents[name] = content
-
---- firefox-52.9.0esr/python/mozbuild/mozpack/test/test_manifests.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/test/test_manifests.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import unicode_literals
-+
-
- import os
-
---- firefox-52.9.0esr/python/mozbuild/mozpack/test/test_mozjar.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/test/test_mozjar.py (refactored)
-@@ -16,8 +16,8 @@
- from mozpack.test.test_files import MockDest
- import unittest
- import mozunit
--from cStringIO import StringIO
--from urllib import pathname2url
-+from io import StringIO
-+from urllib.request import pathname2url
- import mozpack.path as mozpath
- import os
-
---- firefox-52.9.0esr/python/mozbuild/mozpack/test/test_packager_formats.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/test/test_packager_formats.py (refactored)
-@@ -128,7 +128,7 @@
- 'foo': read_interfaces(foo2_xpt.open())['foo'],
- 'bar': read_interfaces(bar_xpt.open())['bar'],
- },
-- }.iteritems()
-+ }.items()
- })
-
- RESULT_JAR = {
-@@ -174,7 +174,7 @@
- },
- 'addon1.xpi': {
- mozpath.relpath(p, 'addon1'): f
-- for p, f in RESULT_FLAT.iteritems()
-+ for p, f in RESULT_FLAT.items()
- if p.startswith('addon1/')
- },
- })
-@@ -234,7 +234,7 @@
- CONTENTS_WITH_BASE = {
- 'bases': {
- mozpath.join('base/root', b) if b else 'base/root': a
-- for b, a in CONTENTS['bases'].iteritems()
-+ for b, a in CONTENTS['bases'].items()
- },
- 'manifests': [
- m.move(mozpath.join('base/root', m.base))
-@@ -242,7 +242,7 @@
- ],
- 'files': {
- mozpath.join('base/root', p): f
-- for p, f in CONTENTS['files'].iteritems()
-+ for p, f in CONTENTS['files'].items()
- },
- }
-
-@@ -255,7 +255,7 @@
- def result_with_base(results):
- result = {
- mozpath.join('base/root', p): v
-- for p, v in results.iteritems()
-+ for p, v in results.items()
- }
- result.update(EXTRA_CONTENTS)
- return result
-@@ -271,13 +271,13 @@
-
-
- def fill_formatter(formatter, contents):
-- for base, is_addon in contents['bases'].items():
-+ for base, is_addon in list(contents['bases'].items()):
- formatter.add_base(base, is_addon)
-
- for manifest in contents['manifests']:
- formatter.add_manifest(manifest)
-
-- for k, v in contents['files'].iteritems():
-+ for k, v in contents['files'].items():
- if k.endswith('.xpt'):
- formatter.add_interfaces(k, v)
- else:
---- firefox-52.9.0esr/python/mozbuild/mozpack/test/test_packager_l10n.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/test/test_packager_l10n.py (refactored)
-@@ -4,7 +4,7 @@
-
- import unittest
- import mozunit
--from test_packager import MockFinder
-+from .test_packager import MockFinder
- from mozpack.packager import l10n
- from mozpack.files import (
- GeneratedFile,
-@@ -118,7 +118,7 @@
-
- self.assertEqual(
- dict((p, f.open().read()) for p, f in copier),
-- dict((p, f.open().read()) for p, f in repacked.iteritems())
-+ dict((p, f.open().read()) for p, f in repacked.items())
- )
-
-
---- firefox-52.9.0esr/python/mozbuild/mozpack/test/test_unify.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/test/test_unify.py (refactored)
-@@ -13,7 +13,7 @@
- from mozpack.files import FileFinder
- from mozpack.mozjar import JarWriter
- from mozpack.test.test_files import MockDest
--from cStringIO import StringIO
-+from io import StringIO
- import os
- import sys
- from mozpack.errors import (
---- firefox-52.9.0esr/python/mozbuild/mozpack/test/support/minify_js_verify.py (original)
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/test/support/minify_js_verify.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import print_function
-+
- import sys
-
-
---- firefox-52.9.0esr/build/moz.configure/keyfiles.configure.old 2017-04-11 02:13:08.000000000 +0000
-+++ firefox-52.9.0esr/build/moz.configure/keyfiles.configure 2018-07-10 07:57:16.030000000 +0000
-@@ -16,8 +16,8 @@
-
- @depends('--with-%s-keyfile' % name)
- @checking('for the %s key' % desc, lambda x: x and x is not no_key)
-- @imports(_from='__builtin__', _import='open')
-- @imports(_from='__builtin__', _import='IOError')
-+ @imports(_from='builtins', _import='open')
-+ @imports(_from='builtins', _import='IOError')
- def keyfile(value):
- if value:
- try:
---- firefox-52.9.0esr/build/moz.configure/windows.configure.old 2017-04-11 02:13:08.000000000 +0000
-+++ firefox-52.9.0esr/build/moz.configure/windows.configure 2018-07-10 07:57:25.210000000 +0000
-@@ -19,7 +19,7 @@
-
-
- @depends_win('--with-windows-version')
--@imports(_from='__builtin__', _import='ValueError')
-+@imports(_from='builtins', _import='ValueError')
- def valid_windows_version(value):
- if not value:
- die('Cannot build with --without-windows-version')
-@@ -56,8 +56,8 @@
- # 8.1.
- @imports('os')
- @imports('re')
--@imports(_from='__builtin__', _import='sorted')
--@imports(_from='__builtin__', _import='WindowsError')
-+@imports(_from='builtins', _import='sorted')
-+@imports(_from='builtins', _import='WindowsError')
- def get_sdk_dirs(sdk, subdir):
- def get_dirs_containing(sdk, stem, subdir):
- base = os.path.join(sdk, stem)
-@@ -102,7 +102,7 @@
- @depends_win(c_compiler, windows_sdk_dir, valid_windows_version,
- 'WINDOWSSDKDIR')
- @checking('for Windows SDK', valid_windows_sdk_dir_result)
--@imports(_from='__builtin__', _import='sorted')
-+@imports(_from='builtins', _import='sorted')
- @imports(_from='textwrap', _import='dedent')
- def valid_windows_sdk_dir(compiler, windows_sdk_dir, target_version,
- windows_sdk_dir_env):
-@@ -179,7 +179,7 @@
- @depends_win(windows_sdk_dir, 'WINDOWSSDKDIR')
- @checking('for Universal CRT SDK', valid_ucrt_sdk_dir_result)
- @imports('os')
--@imports(_from='__builtin__', _import='sorted')
-+@imports(_from='builtins', _import='sorted')
- @imports(_import='mozpack.path', _as='mozpath')
- def valid_ucrt_sdk_dir(windows_sdk_dir, windows_sdk_dir_env):
- if windows_sdk_dir_env:
---- firefox-52.9.0esr/build/moz.configure/toolchain.configure.old 2017-04-11 02:13:08.000000000 +0000
-+++ firefox-52.9.0esr/build/moz.configure/toolchain.configure 2018-07-10 07:57:28.830000000 +0000
-@@ -395,7 +395,7 @@
-
-
- @imports(_from='collections', _import='defaultdict')
--@imports(_from='__builtin__', _import='sorted')
-+@imports(_from='builtins', _import='sorted')
- def get_vc_paths(base):
- vc = defaultdict(lambda: defaultdict(dict))
- subkey = r'Microsoft\VisualStudio\VC\*\*\*\Compiler'
---- firefox-52.9.0esr/build/moz.configure/util.configure.old 2017-04-11 02:13:08.000000000 +0000
-+++ firefox-52.9.0esr/build/moz.configure/util.configure 2018-07-10 07:57:31.540000000 +0000
-@@ -234,7 +234,7 @@
- # ('19.0', 'x64', r'C:\...\amd64\cl.exe')
- # ('19.0', 'x86', r'C:\...\amd64_x86\cl.exe')
- @imports(_import='_winreg', _as='winreg')
--@imports(_from='__builtin__', _import='WindowsError')
-+@imports(_from='builtins', _import='WindowsError')
- @imports(_from='fnmatch', _import='fnmatch')
- def get_registry_values(pattern):
- def enum_helper(func, key):
---- firefox-52.9.0esr/build/moz.configure/checks.configure.old 2017-04-11 02:13:08.000000000 +0000
-+++ firefox-52.9.0esr/build/moz.configure/checks.configure 2018-07-10 07:57:35.630000000 +0000
-@@ -12,7 +12,7 @@
- # _declare_exceptions template, and add it to the return statement. Then
- # destructure in the assignment below the function declaration.
- @template
--@imports(_from='__builtin__', _import='Exception')
-+@imports(_from='builtins', _import='Exception')
- def _declare_exceptions():
- class FatalCheckError(Exception):
- '''An exception to throw from a function decorated with @checking.
---- firefox-52.9.0esr/build/moz.configure/old.configure.old 2017-04-11 02:13:08.000000000 +0000
-+++ firefox-52.9.0esr/build/moz.configure/old.configure 2018-07-10 07:57:38.970000000 +0000
-@@ -61,8 +61,8 @@
-
- @depends('OLD_CONFIGURE', mozconfig, autoconf, check_build_environment, shell,
- old_configure_assignments, build_project)
--@imports(_from='__builtin__', _import='open')
--@imports(_from='__builtin__', _import='print')
-+@imports(_from='builtins', _import='open')
-+@imports(_from='builtins', _import='print')
- @imports('glob')
- @imports('itertools')
- @imports('subprocess')
-@@ -302,8 +302,8 @@
- '--enable-calendar',
- '--enable-incomplete-external-linkage',
- )
--@imports(_from='__builtin__', _import='compile')
--@imports(_from='__builtin__', _import='open')
-+@imports(_from='builtins', _import='compile')
-+@imports(_from='builtins', _import='open')
- @imports('logging')
- @imports('os')
- @imports('subprocess')
---- firefox-52.9.0esr/build/moz.configure/android-ndk.configure.old 2017-04-11 02:13:08.000000000 +0000
-+++ firefox-52.9.0esr/build/moz.configure/android-ndk.configure 2018-07-10 07:57:41.120000000 +0000
-@@ -22,7 +22,7 @@
- default=min_android_version)
-
- @depends('--with-android-version', min_android_version)
--@imports(_from='__builtin__', _import='ValueError')
-+@imports(_from='builtins', _import='ValueError')
- def android_version(value, min_version):
- if not value:
- # Someone has passed --without-android-version.
---- firefox-52.9.0esr/build/moz.configure/init.configure.old 2017-04-11 02:13:08.000000000 +0000
-+++ firefox-52.9.0esr/build/moz.configure/init.configure 2018-07-10 07:57:44.330000000 +0000
-@@ -636,7 +636,7 @@
- # - otherwise, if we have "a" in GRE_MILESTONE, we're building Nightly or Aurora
- # - otherwise, we're building Release/Beta (define RELEASE_OR_BETA)
- @depends(check_build_environment, '--help')
--@imports(_from='__builtin__', _import='open')
-+@imports(_from='builtins', _import='open')
- def milestone(build_env, _):
- milestone_path = os.path.join(build_env.topsrcdir,
- 'config',
-diff -aur firefox-52.9.0esr/config/mozunit.py mozjs-fixed/config/mozunit.py
---- firefox-52.9.0esr/config/mozunit.py 2017-04-11 02:13:09.000000000 +0000
-+++ mozjs-fixed/config/mozunit.py 2018-07-10 08:19:37.770000000 +0000
-@@ -5,7 +5,7 @@
- from unittest import TextTestRunner as _TestRunner, TestResult as _TestResult
- import unittest
- import inspect
--from StringIO import StringIO
-+from io import StringIO
- import os
- import sys
-
-@@ -74,7 +74,7 @@
-
- def printFail(self, test, err):
- exctype, value, tb = err
-- message = value.message.splitlines()[0] if value.message else 'NO MESSAGE'
-+ message = str(value).splitlines()[0] if str(value) else 'NO MESSAGE'
- # Skip test runner traceback levels
- while tb and self._is_relevant_tb_level(tb):
- tb = tb.tb_next
-diff -aur firefox-52.9.0esr/python/mozbuild/mozbuild/backend/configenvironment.py mozjs-fixed/python/mozbuild/mozbuild/backend/configenvironment.py
---- firefox-52.9.0esr/python/mozbuild/mozbuild/backend/configenvironment.py 2018-07-10 08:24:43.150000000 +0000
-+++ mozjs-fixed/python/mozbuild/mozbuild/backend/configenvironment.py 2018-07-10 08:15:12.650000000 +0000
-@@ -8,7 +8,8 @@
- import sys
-
- from collections import Iterable
--from types import StringTypes, ModuleType
-+from types import ModuleType
-+StringTypes = (str,)
-
- import mozpack.path as mozpath
-
-diff -aur firefox-52.9.0esr/python/mozbuild/mozbuild/makeutil.py mozjs-fixed/python/mozbuild/mozbuild/makeutil.py
---- firefox-52.9.0esr/python/mozbuild/mozbuild/makeutil.py 2018-07-10 08:24:43.150000000 +0000
-+++ mozjs-fixed/python/mozbuild/mozbuild/makeutil.py 2018-07-10 08:20:05.230000000 +0000
-@@ -6,7 +6,6 @@
-
- import os
- import re
--from types import StringTypes
- from collections import Iterable
-
-
-@@ -103,19 +102,19 @@
-
- def add_targets(self, targets):
- '''Add additional targets to the rule.'''
-- assert isinstance(targets, Iterable) and not isinstance(targets, StringTypes)
-+ assert isinstance(targets, Iterable) and not isinstance(targets, str)
- self._targets.update(targets)
- return self
-
- def add_dependencies(self, deps):
- '''Add dependencies to the rule.'''
-- assert isinstance(deps, Iterable) and not isinstance(deps, StringTypes)
-+ assert isinstance(deps, Iterable) and not isinstance(deps, str)
- self._dependencies.update(deps)
- return self
-
- def add_commands(self, commands):
- '''Add commands to the rule.'''
-- assert isinstance(commands, Iterable) and not isinstance(commands, StringTypes)
-+ assert isinstance(commands, Iterable) and not isinstance(commands, str)
- self._commands.extend(commands)
- return self
-
-diff -aur firefox-52.9.0esr/python/which/which.py mozjs-fixed/python/which/which.py
---- firefox-52.9.0esr/python/which/which.py 2017-04-11 02:13:24.000000000 +0000
-+++ mozjs-fixed/python/which/which.py 2018-07-10 08:11:01.570000000 +0000
-@@ -280,17 +280,17 @@
- try:
- optlist, args = getopt.getopt(argv[1:], 'haVvqp:e:',
- ['help', 'all', 'version', 'verbose', 'quiet', 'path=', 'exts='])
-- except getopt.GetoptError, msg:
-+ except getopt.GetoptError as msg:
- sys.stderr.write("which: error: %s. Your invocation was: %s\n"\
- % (msg, argv))
- sys.stderr.write("Try 'which --help'.\n")
- return 1
- for opt, optarg in optlist:
- if opt in ('-h', '--help'):
-- print _cmdlnUsage
-+ print(_cmdlnUsage)
- return 0
- elif opt in ('-V', '--version'):
-- print "which %s" % __version__
-+ print("which %s" % __version__)
- return 0
- elif opt in ('-a', '--all'):
- all = 1
-@@ -318,9 +318,9 @@
- nmatches = 0
- for match in whichgen(arg, path=altpath, verbose=verbose, exts=exts):
- if verbose:
-- print "%s (%s)" % match
-+ print("%s (%s)" % match)
- else:
-- print match
-+ print(match)
- nmatches += 1
- if not all:
- break
-diff -aur firefox-52.9.0esr/testing/mozbase/mozprocess/mozprocess/processhandler.py mozjs-fixed/testing/mozbase/mozprocess/mozprocess/processhandler.py
---- firefox-52.9.0esr/testing/mozbase/mozprocess/mozprocess/processhandler.py 2017-04-11 02:13:06.000000000 +0000
-+++ mozjs-fixed/testing/mozbase/mozprocess/mozprocess/processhandler.py 2018-07-10 08:13:15.440000000 +0000
-@@ -11,7 +11,7 @@
- import threading
- import time
- import traceback
--from Queue import Queue, Empty
-+from queue import Queue, Empty
- from datetime import datetime
-
- __all__ = ['ProcessHandlerMixin', 'ProcessHandler', 'LogOutput',
-@@ -121,14 +121,14 @@
- thread = threading.current_thread().name
- print("DBG::MOZPROC PID:{} ({}) | {}".format(self.pid, thread, msg))
-
-- def __del__(self, _maxint=sys.maxint):
-+ def __del__(self, _maxint=sys.maxsize):
- if isWin:
- handle = getattr(self, '_handle', None)
- if handle:
- if hasattr(self, '_internal_poll'):
- self._internal_poll(_deadstate=_maxint)
- else:
-- self.poll(_deadstate=sys.maxint)
-+ self.poll(_deadstate=sys.maxsize)
- if handle or self._job or self._io_port:
- self._cleanup()
- else:
-@@ -267,7 +267,7 @@
- if not (can_create_job or can_nest_jobs):
- # Since we've warned, we just log info here to inform you
- # of the consequence of setting ignore_children = True
-- print "ProcessManager NOT managing child processes"
-+ print("ProcessManager NOT managing child processes")
-
- # create the process
- hp, ht, pid, tid = winprocess.CreateProcess(
-@@ -534,11 +534,11 @@
-
- if rc == winprocess.WAIT_TIMEOUT:
- # The process isn't dead, so kill it
-- print "Timed out waiting for process to close, attempting TerminateProcess"
-+ print("Timed out waiting for process to close, attempting TerminateProcess")
- self.kill()
- elif rc == winprocess.WAIT_OBJECT_0:
- # We caught WAIT_OBJECT_0, which indicates all is well
-- print "Single process terminated successfully"
-+ print("Single process terminated successfully")
- self.returncode = winprocess.GetExitCodeProcess(self._handle)
- else:
- # An error occured we should probably throw
-diff -aur firefox-52.9.0esr/build/moz.configure/checks.configure mozjs-fixed/build/moz.configure/checks.configure
---- firefox-52.9.0esr/build/moz.configure/checks.configure 2018-07-10 10:29:50.380000000 +0000
-+++ mozjs-fixed/build/moz.configure/checks.configure 2018-07-10 10:27:45.350000000 +0000
-@@ -52,7 +52,7 @@
- try:
- ret = func(*args, **kwargs)
- except FatalCheckError as e:
-- error = e.message
-+ error = str(e)
- display_ret = callback(ret) if callback else ret
- if display_ret is True:
- log.info('yes')
-diff -aur firefox-52.9.0esr/build/moz.configure/init.configure mozjs-fixed/build/moz.configure/init.configure
---- firefox-52.9.0esr/build/moz.configure/init.configure 2018-07-10 10:29:50.380000000 +0000
-+++ mozjs-fixed/build/moz.configure/init.configure 2018-07-10 10:23:19.960000000 +0000
-@@ -213,7 +213,7 @@
- def early_options():
- return set(
- option.env
-- for option in __sandbox__._options.itervalues()
-+ for option in list(__sandbox__._options.values())
- if option.env
- )
- return early_options
-@@ -297,7 +297,7 @@
- # There is also a quartet form:
- # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
- # But we can consider the "KERNEL-OPERATING_SYSTEM" as one.
-- cpu, manufacturer, os = triplet.split('-', 2)
-+ cpu, manufacturer, os = triplet.decode('utf-8').split('-', 2)
-
- # Autoconf uses config.sub to validate and canonicalize those triplets,
- # but the granularity of its results has never been satisfying to our
-@@ -727,7 +727,7 @@
- def all_configure_options(_):
- result = []
- previous = None
-- for option in __sandbox__._options.itervalues():
-+ for option in list(__sandbox__._options.values()):
- # __sandbox__._options contains items for both option.name and
- # option.env. But it's also an OrderedDict, meaning both are
- # consecutive.
-diff -aur firefox-52.9.0esr/build/moz.configure/old.configure mozjs-fixed/build/moz.configure/old.configure
---- firefox-52.9.0esr/build/moz.configure/old.configure 2018-07-10 10:29:50.380000000 +0000
-+++ mozjs-fixed/build/moz.configure/old.configure 2018-07-10 10:19:19.880000000 +0000
-@@ -360,7 +360,7 @@
- # Every variation of the exec() function I tried led to:
- # SyntaxError: unqualified exec is not allowed in function 'main' it
- # contains a nested function with free variables
-- exec code in raw_config
-+ exec(code, raw_config)
-
- # Ensure all the flags known to old-configure appear in the
- # @old_configure_options above.
-diff -aur firefox-52.9.0esr/build/moz.configure/toolchain.configure mozjs-fixed/build/moz.configure/toolchain.configure
---- firefox-52.9.0esr/build/moz.configure/toolchain.configure 2018-07-10 10:29:50.380000000 +0000
-+++ mozjs-fixed/build/moz.configure/toolchain.configure 2018-07-10 10:28:13.020000000 +0000
-@@ -244,7 +244,7 @@
- ('CPU', CPU_preprocessor_checks),
- ('KERNEL', kernel_preprocessor_checks),
- ):
-- for n, (value, condition) in enumerate(preprocessor_checks.iteritems()):
-+ for n, (value, condition) in enumerate(preprocessor_checks.items()):
- check += dedent('''\
- #%(if)s %(condition)s
- %%%(name)s "%(value)s"
-@@ -278,9 +278,9 @@
- data = {}
- for line in result.splitlines():
- if line.startswith(b'%'):
-- k, _, v = line.partition(' ')
-- k = k.lstrip('%')
-- data[k] = v.replace(' ', '').lstrip('"').rstrip('"')
-+ k, _, v = line.partition(b' ')
-+ k = k.lstrip(b'%').decode('utf-8')
-+ data[k] = v.replace(b' ', b'').lstrip(b'"').rstrip(b'"').decode('utf-8')
- log.debug('%s = %s', k, data[k])
-
- try:
-diff -aur firefox-52.9.0esr/build/moz.configure/util.configure mozjs-fixed/build/moz.configure/util.configure
---- firefox-52.9.0esr/build/moz.configure/util.configure 2018-07-10 10:29:50.380000000 +0000
-+++ mozjs-fixed/build/moz.configure/util.configure 2018-07-10 10:23:54.980000000 +0000
-@@ -299,6 +299,8 @@
- @imports(_from='mozbuild.configure.util', _import='Version', _as='_Version')
- def Version(v):
- 'A version number that can be compared usefully.'
-+ if isinstance(v, bytes):
-+ v = v.decode('utf-8')
- return _Version(v)
-
- # Denotes a deprecated option. Combines option() and @depends:
-diff -aur firefox-52.9.0esr/python/mozbuild/mozbuild/configure/__init__.py mozjs-fixed/python/mozbuild/mozbuild/configure/__init__.py
---- firefox-52.9.0esr/python/mozbuild/mozbuild/configure/__init__.py 2018-07-10 10:29:50.350000000 +0000
-+++ mozjs-fixed/python/mozbuild/mozbuild/configure/__init__.py 2018-07-10 10:24:33.200000000 +0000
-@@ -97,6 +97,9 @@
- ', '.join(repr(d) for d in self.dependencies),
- )
-
-+ def __hash__(self):
-+ return hash((str(self.func), tuple(self.dependencies), self.when))
-+
-
- class CombinedDependsFunction(DependsFunction):
- def __init__(self, sandbox, func, dependencies):
-@@ -142,6 +145,9 @@
- def __ne__(self, other):
- return not self == other
-
-+ def __hash__(self):
-+ return hash((str(self.func), tuple(self.dependencies)))
-+
- class SandboxedGlobal(dict):
- '''Identifiable dict type for use as function global'''
-
-@@ -192,7 +198,8 @@
- b: __builtins__[b]
- for b in ('None', 'False', 'True', 'int', 'bool', 'any', 'all', 'len',
- 'list', 'tuple', 'set', 'dict', 'isinstance', 'getattr',
-- 'hasattr', 'enumerate', 'range', 'zip')
-+ 'hasattr', 'enumerate', 'range', 'zip', '__build_class__',
-+ 'bytes', 'exec')
- }, __import__=forbidden_import, str=str)
-
- # Expose a limited set of functions from os.path
-@@ -267,7 +274,7 @@
- return method
- def wrapped(*args, **kwargs):
- out_args = [
-- arg.decode(encoding) if isinstance(arg, str) else arg
-+ arg.decode(encoding) if isinstance(arg, bytes) else arg
- for arg in args
- ]
- return method(*out_args, **kwargs)
-diff -aur firefox-52.9.0esr/python/mozbuild/mozbuild/configure/options.py mozjs-fixed/python/mozbuild/mozbuild/configure/options.py
---- firefox-52.9.0esr/python/mozbuild/mozbuild/configure/options.py 2018-07-10 10:29:50.350000000 +0000
-+++ mozjs-fixed/python/mozbuild/mozbuild/configure/options.py 2018-07-10 10:15:41.760000000 +0000
-@@ -65,6 +65,9 @@
- return '%s%s' % (self.__class__.__name__,
- super(OptionValue, self).__repr__())
-
-+ def __hash__(self):
-+ return hash(str(self))
-+
-
- class PositiveOptionValue(OptionValue):
- '''Represents the value for a positive option (--enable/--with/--foo)
-diff -aur firefox-52.9.0esr/python/mozbuild/mozbuild/configure/util.py mozjs-fixed/python/mozbuild/mozbuild/configure/util.py
---- firefox-52.9.0esr/python/mozbuild/mozbuild/configure/util.py 2018-07-10 10:29:50.350000000 +0000
-+++ mozjs-fixed/python/mozbuild/mozbuild/configure/util.py 2018-07-10 09:04:28.150000000 +0000
-@@ -200,7 +200,7 @@
- self._encoding = getpreferredencoding()
-
- def write(self, buf):
-- if self._encoding and isinstance(buf, str):
-+ if self._encoding and isinstance(buf, bytes):
- buf = buf.decode(self._encoding)
- lines = buf.splitlines()
- if not lines:
-diff -aur firefox-52.9.0esr/python/mozbuild/mozbuild/virtualenv.py mozjs-fixed/python/mozbuild/mozbuild/virtualenv.py
---- firefox-52.9.0esr/python/mozbuild/mozbuild/virtualenv.py 2018-07-10 10:29:50.350000000 +0000
-+++ mozjs-fixed/python/mozbuild/mozbuild/virtualenv.py 2018-07-10 10:11:47.710000000 +0000
-@@ -108,7 +108,7 @@
- """
- ver = subprocess.check_output([python, '-c', 'import sys; print(sys.hexversion)']).rstrip()
- with open(self.exe_info_path, 'w') as fh:
-- fh.write("%s\n" % ver)
-+ fh.write("%s\n" % ver.decode('utf-8'))
- fh.write("%s\n" % os.path.getsize(python))
-
- def up_to_date(self, python=sys.executable):
-@@ -207,7 +207,7 @@
- return self.virtualenv_root
-
- def packages(self):
-- with file(self.manifest_path, 'rU') as fh:
-+ with open(self.manifest_path, 'rU') as fh:
- packages = [line.rstrip().split(':')
- for line in fh]
- return packages
-@@ -530,9 +530,9 @@
-
- our = LooseVersion('%d.%d.%d' % (major, minor, micro))
-
-- if major != MINIMUM_PYTHON_MAJOR or our < MINIMUM_PYTHON_VERSION:
-- log_handle.write('Python %s or greater (but not Python 3) is '
-- 'required to build. ' % MINIMUM_PYTHON_VERSION)
-+ if our < MINIMUM_PYTHON_VERSION:
-+ log_handle.write('Python %s or greater is required to build. '
-+ % MINIMUM_PYTHON_VERSION)
- log_handle.write('You are running Python %s.\n' % our)
-
- if os.name in ('nt', 'ce'):
-diff -aur firefox-52.9.0esr/python/which/which.py mozjs-fixed/python/which/which.py
---- firefox-52.9.0esr/python/which/which.py 2018-07-10 10:29:50.380000000 +0000
-+++ mozjs-fixed/python/which/which.py 2018-07-10 10:20:16.770000000 +0000
-@@ -243,7 +243,7 @@
- If no match is found for the command, a WhichError is raised.
- """
- try:
-- match = whichgen(command, path, verbose, exts).next()
-+ match = next(whichgen(command, path, verbose, exts))
- except StopIteration:
- raise WhichError("Could not find '%s' on the path." % command)
- return match
---- firefox-52.9.0esr/build/moz.configure/old.configure.old 2018-07-10 10:32:48.550000000 +0000
-+++ firefox-52.9.0esr/build/moz.configure/old.configure 2018-07-10 10:35:32.440000000 +0000
-@@ -107,7 +107,7 @@
-
- # Make old-configure append to config.log, where we put our own log.
- # This could be done with a m4 macro, but it's way easier this way
-- script = script.replace('>./config.log', '>>./config.log')
-+ script = script.replace(b'>./config.log', b'>>./config.log')
-
- with open(old_configure, 'wb') as fh:
- fh.write(script)
---- firefox-52.9.0esr/build/subconfigure.py.old 2017-04-11 02:13:09.000000000 +0000
-+++ firefox-52.9.0esr/build/subconfigure.py 2018-07-10 10:38:08.910000000 +0000
-@@ -27,7 +27,7 @@
- return super(Pool, cls).__new__(cls)
-
- def imap_unordered(self, fn, iterable):
-- return itertools.imap(fn, iterable)
-+ return map(fn, iterable)
-
- def close(self):
- pass
-@@ -131,11 +131,11 @@
- is_set = cache.get('ac_cv_env_%s_set' % precious) == 'set'
- value = cache.get('ac_cv_env_%s_value' % precious) if is_set else None
- if value != env.get(precious):
-- print 'Removing %s because of %s value change from:' \
-- % (data['cache-file'], precious)
-- print ' %s' % (value if value is not None else 'undefined')
-- print 'to:'
-- print ' %s' % env.get(precious, 'undefined')
-+ print('Removing %s because of %s value change from:' \
-+ % (data['cache-file'], precious))
-+ print(' %s' % (value if value is not None else 'undefined'))
-+ print('to:')
-+ print(' %s' % env.get(precious, 'undefined'))
- os.remove(data['cache-file'])
- return True
- return False
-@@ -333,8 +333,8 @@
- # We're going to run it ourselves.
- command += ['--no-create']
-
-- print prefix_lines('configuring', relobjdir)
-- print prefix_lines('running %s' % ' '.join(command[:-1]), relobjdir)
-+ print(prefix_lines('configuring', relobjdir))
-+ print(prefix_lines('running %s' % ' '.join(command[:-1]), relobjdir))
- sys.stdout.flush()
- try:
- output += subprocess.check_output(command,
-@@ -368,7 +368,7 @@
-
- if not skip_config_status:
- if skip_configure:
-- print prefix_lines('running config.status', relobjdir)
-+ print(prefix_lines('running config.status', relobjdir))
- sys.stdout.flush()
- try:
- output += subprocess.check_output([data['shell'], '-c',
-@@ -410,7 +410,7 @@
- pool = Pool(len(subconfigures))
- for relobjdir, returncode, output in \
- pool.imap_unordered(run, subconfigures):
-- print prefix_lines(output, relobjdir)
-+ print(prefix_lines(output, relobjdir))
- sys.stdout.flush()
- ret = max(returncode, ret)
- if ret:
---- firefox-52.9.0esr/build/moz.configure/old.configure.old 2018-07-10 10:38:53.530000000 +0000
-+++ firefox-52.9.0esr/build/moz.configure/old.configure 2018-07-10 10:41:32.560000000 +0000
-@@ -394,7 +394,7 @@
- def post_old_configure(raw_config):
- for k, v in raw_config['substs']:
- set_old_configure_config(
-- k[1:-1], v[1:-1] if isinstance(v, types.StringTypes) else v)
-+ k[1:-1], v[1:-1] if isinstance(v, str) else v)
-
-- for k, v in dict(raw_config['defines']).iteritems():
-+ for k, v in dict(raw_config['defines']).items():
- set_old_configure_define(k[1:-1], v[1:-1])
---- firefox-52.9.0esr/configure.py (original)
-+++ firefox-52.9.0esr/configure.py (refactored)
-@@ -2,7 +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/.
-
--from __future__ import print_function, unicode_literals
-+
-
- import codecs
- import os
-@@ -45,11 +45,11 @@
-
- sanitized_config = {}
- sanitized_config['substs'] = {
-- k: sanitized_bools(v) for k, v in config.iteritems()
-+ k: sanitized_bools(v) for k, v in config.items()
- if k not in ('DEFINES', 'non_global_defines', 'TOPSRCDIR', 'TOPOBJDIR')
- }
- sanitized_config['defines'] = {
-- k: sanitized_bools(v) for k, v in config['DEFINES'].iteritems()
-+ k: sanitized_bools(v) for k, v in config['DEFINES'].items()
- }
- sanitized_config['non_global_defines'] = config['non_global_defines']
- sanitized_config['topsrcdir'] = config['TOPSRCDIR']
-@@ -71,7 +71,7 @@
- ''') % {'python': config['PYTHON'], 'encoding': encoding})
- # A lot of the build backend code is currently expecting byte
- # strings and breaks in subtle ways with unicode strings. (bug 1296508)
-- for k, v in sanitized_config.iteritems():
-+ for k, v in sanitized_config.items():
- fh.write('%s = encode(%s, encoding)\n' % (k, indented_repr(v)))
- fh.write("__all__ = ['topobjdir', 'topsrcdir', 'defines', "
- "'non_global_defines', 'substs', 'mozconfig']")
-@@ -88,7 +88,7 @@
- # executable permissions.
- os.chmod('config.status', 0o755)
- if config.get('MOZ_BUILD_APP') != 'js' or config.get('JS_STANDALONE'):
-- os.environ[b'WRITE_MOZINFO'] = b'1'
-+ os.environ['WRITE_MOZINFO'] = '1'
- from mozbuild.config_status import config_status
-
- # Some values in sanitized_config also have more complex types, such as
---- firefox-52.9.0esr/python/blessings/blessings/__init__.py.old 2017-04-11 02:13:23.000000000 +0000
-+++ firefox-52.9.0esr/python/blessings/blessings/__init__.py 2018-07-10 10:56:52.820000000 +0000
-@@ -333,7 +333,7 @@
- 'shadow', 'standout', 'subscript', 'superscript']))
-
-
--class ParametrizingString(unicode):
-+class ParametrizingString(str):
- """A Unicode string which can be called to parametrize it as a terminal capability"""
- def __new__(cls, formatting, normal=None):
- """Instantiate.
-@@ -343,7 +343,7 @@
- "normal" capability.
-
- """
-- new = unicode.__new__(cls, formatting)
-+ new = str.__new__(cls, formatting)
- new._normal = normal
- return new
-
-@@ -375,10 +375,10 @@
- raise
-
-
--class FormattingString(unicode):
-+class FormattingString(str):
- """A Unicode string which can be called upon a piece of text to wrap it in formatting"""
- def __new__(cls, formatting, normal):
-- new = unicode.__new__(cls, formatting)
-+ new = str.__new__(cls, formatting)
- new._normal = normal
- return new
-
-@@ -393,7 +393,7 @@
- return self + text + self._normal
-
-
--class NullCallableString(unicode):
-+class NullCallableString(str):
- """A dummy class to stand in for ``FormattingString`` and ``ParametrizingString``
-
- A callable bytestring that returns an empty Unicode when called with an int
-@@ -402,7 +402,7 @@
-
- """
- def __new__(cls):
-- new = unicode.__new__(cls, u'')
-+ new = str.__new__(cls, u'')
- return new
-
- def __call__(self, arg):
---- firefox-52.9.0esr/testing/mozbase/mozfile/mozfile/mozfile.py (original)
-+++ firefox-52.9.0esr/testing/mozbase/mozfile/mozfile/mozfile.py (refactored)
-@@ -6,7 +6,7 @@
-
- # We don't import all modules at the top for performance reasons. See Bug 1008943
-
--from __future__ import absolute_import
-+
-
- from contextlib import contextmanager
- import errno
-@@ -55,7 +55,7 @@
- try:
- bundle = zipfile.ZipFile(src)
- except Exception:
-- print "src: %s" % src
-+ print("src: %s" % src)
- raise
-
- namelist = bundle.namelist()
-@@ -161,8 +161,8 @@
-
- retry_count += 1
-
-- print '%s() failed for "%s". Reason: %s (%s). Retrying...' % \
-- (func.__name__, args, e.strerror, e.errno)
-+ print('%s() failed for "%s". Reason: %s (%s). Retrying...' % \
-+ (func.__name__, args, e.strerror, e.errno))
- time.sleep(retry_count * retry_delay)
- else:
- # If no exception has been thrown it should be done
-@@ -420,9 +420,9 @@
- Return True if thing looks like a URL.
- """
-
-- import urlparse
--
-- parsed = urlparse.urlparse(thing)
-+ import urllib.parse
-+
-+ parsed = urllib.parse.urlparse(thing)
- if 'scheme' in parsed:
- return len(parsed.scheme) >= 2
- else:
-@@ -436,7 +436,7 @@
- result of urllib2.urlopen()
- """
-
-- import urllib2
-+ import urllib.request, urllib.error, urllib.parse
-
- # handle file URLs separately due to python stdlib limitations
- if resource.startswith('file://'):
-@@ -446,4 +446,4 @@
- # if no scheme is given, it is a file path
-- return file(resource)
-+ return open(resource)
-
-- return urllib2.urlopen(resource)
-+ return urllib.request.urlopen(resource)
---- firefox-52.9.0esr/testing/mozbase/mozinfo/mozinfo/mozinfo.py (original)
-+++ firefox-52.9.0esr/testing/mozbase/mozinfo/mozinfo/mozinfo.py (refactored)
-@@ -8,7 +8,7 @@
- # linux) to the information; I certainly wouldn't want anyone parsing this
- # information and having behaviour depend on it
-
--from __future__ import absolute_import
-+
-
- import os
- import platform
-@@ -24,7 +24,7 @@
- class unknown(object):
- """marker class for unknown information"""
-
-- def __nonzero__(self):
-+ def __bool__(self):
- return False
-
- def __str__(self):
-@@ -184,7 +184,7 @@
- to a json file containing the new info.
- """
-
-- if isinstance(new_info, basestring):
-+ if isinstance(new_info, str):
- # lazy import
- import mozfile
- import json
-@@ -246,7 +246,7 @@
- update({})
-
- # exports
--__all__ = info.keys()
-+__all__ = list(info.keys())
- __all__ += ['is' + os_name.title() for os_name in choices['os']]
- __all__ += [
- 'info',
-@@ -284,17 +284,17 @@
-
- # print out choices if requested
- flag = False
-- for key, value in options.__dict__.items():
-+ for key, value in list(options.__dict__.items()):
- if value is True:
-- print '%s choices: %s' % (key, ' '.join([str(choice)
-- for choice in choices[key]]))
-+ print('%s choices: %s' % (key, ' '.join([str(choice)
-+ for choice in choices[key]])))
- flag = True
- if flag:
- return
-
- # otherwise, print out all info
-- for key, value in info.items():
-- print '%s: %s' % (key, value)
-+ for key, value in list(info.items()):
-+ print('%s: %s' % (key, value))
-
- if __name__ == '__main__':
- main()
---- firefox-52.9.0esr/testing/mozbase/mozinfo/mozinfo/string_version.py.old 2017-04-11 02:13:06.000000000 +0000
-+++ firefox-52.9.0esr/testing/mozbase/mozinfo/mozinfo/string_version.py 2018-07-10 11:10:56.140000000 +0000
-@@ -10,8 +10,10 @@
- A string version that can be compared with comparison operators.
- """
-
-+ def __new__(cls, value):
-+ return str.__new__(cls, value)
-+
- def __init__(self, vstring):
-- str.__init__(self, vstring)
- self.version = LooseVersion(vstring)
-
- def __repr__(self):
---- firefox-52.9.0esr/testing/mozbase/manifestparser/manifestparser/manifestparser.py (original)
-+++ firefox-52.9.0esr/testing/mozbase/manifestparser/manifestparser/manifestparser.py (refactored)
-@@ -2,7 +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/.
-
--from StringIO import StringIO
-+from io import StringIO
- import json
- import fnmatch
- import os
-@@ -21,7 +21,7 @@
- __all__ = ['ManifestParser', 'TestManifest', 'convert']
-
- relpath = os.path.relpath
--string = (basestring,)
-+string = (str,)
-
-
- # path normalization
-@@ -178,7 +178,7 @@
-
- # otherwise an item
- # apply ancestor defaults, while maintaining current file priority
-- data = dict(self._ancestor_defaults.items() + data.items())
-+ data = dict(list(self._ancestor_defaults.items()) + list(data.items()))
-
- test = data
- test['name'] = section
-@@ -306,19 +306,19 @@
- # make some check functions
- if inverse:
- def has_tags(test):
-- return not tags.intersection(test.keys())
-+ return not tags.intersection(list(test.keys()))
-
- def dict_query(test):
-- for key, value in kwargs.items():
-+ for key, value in list(kwargs.items()):
- if test.get(key) == value:
- return False
- return True
- else:
- def has_tags(test):
-- return tags.issubset(test.keys())
-+ return tags.issubset(list(test.keys()))
-
- def dict_query(test):
-- for key, value in kwargs.items():
-+ for key, value in list(kwargs.items()):
- if test.get(key) != value:
- return False
- return True
-@@ -340,7 +340,7 @@
- """
- if tests is None:
- # Make sure to return all the manifests, even ones without tests.
-- return self.manifest_defaults.keys()
-+ return list(self.manifest_defaults.keys())
-
- manifests = []
- for test in tests:
-@@ -373,8 +373,8 @@
- raise IOError("Strict mode enabled, test paths must exist. "
- "The following test(s) are missing: %s" %
- json.dumps(missing_paths, indent=2))
-- print >> sys.stderr, "Warning: The following test(s) are missing: %s" % \
-- json.dumps(missing_paths, indent=2)
-+ print("Warning: The following test(s) are missing: %s" % \
-+ json.dumps(missing_paths, indent=2), file=sys.stderr)
- return missing
-
- def verifyDirectory(self, directories, pattern=None, extensions=None):
-@@ -385,7 +385,7 @@
- """
-
- files = set([])
-- if isinstance(directories, basestring):
-+ if isinstance(directories, str):
- directories = [directories]
-
- # get files in directories
-@@ -449,12 +449,12 @@
-
- # print the .ini manifest
- if global_tags or global_kwargs:
-- print >> fp, '[DEFAULT]'
-+ print('[DEFAULT]', file=fp)
- for tag in global_tags:
-- print >> fp, '%s =' % tag
-- for key, value in global_kwargs.items():
-- print >> fp, '%s = %s' % (key, value)
-- print >> fp
-+ print('%s =' % tag, file=fp)
-+ for key, value in list(global_kwargs.items()):
-+ print('%s = %s' % (key, value), file=fp)
-+ print(file=fp)
-
- for test in tests:
- test = test.copy() # don't overwrite
-@@ -465,7 +465,7 @@
- if self.rootdir:
- path = relpath(test['path'], self.rootdir)
- path = denormalize_path(path)
-- print >> fp, '[%s]' % path
-+ print('[%s]' % path, file=fp)
-
- # reserved keywords:
- reserved = ['path', 'name', 'here', 'manifest', 'relpath', 'ancestor-manifest']
-@@ -476,8 +476,8 @@
- continue
- if key in global_tags and not test[key]:
- continue
-- print >> fp, '%s = %s' % (key, test[key])
-- print >> fp
-+ print('%s = %s' % (key, test[key]), file=fp)
-+ print(file=fp)
-
- if close:
- # close the created file
-@@ -565,7 +565,7 @@
- message = "Missing test: '%s' does not exist!"
- if self.strict:
- raise IOError(message)
-- print >> sys.stderr, message + " Skipping."
-+ print(message + " Skipping.", file=sys.stderr)
- continue
- destination = os.path.join(rootdir, _relpath)
- shutil.copy(source, destination)
-@@ -578,7 +578,7 @@
- internal function to import directories
- """
-
-- if isinstance(pattern, basestring):
-+ if isinstance(pattern, str):
- patterns = [pattern]
- else:
- patterns = pattern
-@@ -670,9 +670,9 @@
- if (dirnames or filenames) and not (os.path.exists(manifest_path) and overwrite):
- with file(manifest_path, 'w') as manifest:
- for dirname in dirnames:
-- print >> manifest, '[include:%s]' % os.path.join(dirname, filename)
-+ print('[include:%s]' % os.path.join(dirname, filename), file=manifest)
- for _filename in filenames:
-- print >> manifest, '[%s]' % _filename
-+ print('[%s]' % _filename, file=manifest)
-
- # add to list of manifests
- manifest_dict.setdefault(directory, manifest_path)
-@@ -722,8 +722,8 @@
- for filename in filenames]
-
- # write to manifest
-- print >> write, '\n'.join(['[%s]' % denormalize_path(filename)
-- for filename in filenames])
-+ print('\n'.join(['[%s]' % denormalize_path(filename)
-+ for filename in filenames]), file=write)
-
- cls._walk_directories(directories, callback, pattern=pattern, ignore=ignore)
-
---- firefox-52.9.0esr/testing/mozbase/manifestparser/manifestparser/cli.py (original)
-+++ firefox-52.9.0esr/testing/mozbase/manifestparser/manifestparser/cli.py (refactored)
-@@ -81,7 +81,7 @@
- # parse the arguments
- try:
- kwargs, tags, args = parse_args(args)
-- except ParserError, e:
-+ except ParserError as e:
- self._parser.error(e.message)
-
- # make sure we have some manifests, otherwise it will
-@@ -132,7 +132,7 @@
- manifest = convert(args, pattern=options.pattern, ignore=options.ignore,
- write=options.in_place)
- if manifest:
-- print manifest
-+ print(manifest)
-
-
- class WriteCLI(CLICommand):
-@@ -146,7 +146,7 @@
- # parse the arguments
- try:
- kwargs, tags, args = parse_args(args)
-- except ParserError, e:
-+ except ParserError as e:
- self._parser.error(e.message)
-
- # make sure we have some manifests, otherwise it will
-@@ -175,9 +175,9 @@
- commands[args[0]](self._parser).parser().print_help()
- else:
- self._parser.print_help()
-- print '\nCommands:'
-+ print('\nCommands:')
- for command in sorted(commands):
-- print ' %s : %s' % (command, commands[command].__doc__.strip())
-+ print(' %s : %s' % (command, commands[command].__doc__.strip()))
-
-
- class UpdateCLI(CLICommand):
-@@ -190,7 +190,7 @@
- # parse the arguments
- try:
- kwargs, tags, args = parse_args(args)
-- except ParserError, e:
-+ except ParserError as e:
- self._parser.error(e.message)
-
- # make sure we have some manifests, otherwise it will
---- firefox-52.9.0esr/testing/mozbase/manifestparser/manifestparser/expression.py (original)
-+++ firefox-52.9.0esr/testing/mozbase/manifestparser/manifestparser/expression.py (refactored)
-@@ -275,7 +275,7 @@
- """
- if not isinstance(self.token, expected):
- raise Exception("Unexpected token!")
-- self.token = self.iter.next()
-+ self.token = next(self.iter)
-
- def expression(self, rbp=0):
- """
-@@ -283,11 +283,11 @@
- right binding power greater than rbp is encountered.
- """
- t = self.token
-- self.token = self.iter.next()
-+ self.token = next(self.iter)
- left = t.nud(self)
- while rbp < self.token.lbp:
- t = self.token
-- self.token = self.iter.next()
-+ self.token = next(self.iter)
- left = t.led(self, left)
- return left
-
-@@ -299,7 +299,7 @@
- """
- try:
- self.iter = self._tokenize()
-- self.token = self.iter.next()
-+ self.token = next(self.iter)
- return self.expression()
- except:
- extype, ex, tb = sys.exc_info()
-@@ -307,7 +307,7 @@
- raise ParseError("could not parse: "
- "%s\nexception: %svariables: %s" % (self.text,
- formatted,
-- self.valuemapping)), None, tb
-+ self.valuemapping)).with_traceback(tb)
-
- __call__ = parse
-
---- firefox-52.9.0esr/testing/mozbase/manifestparser/manifestparser/filters.py (original)
-+++ firefox-52.9.0esr/testing/mozbase/manifestparser/manifestparser/filters.py (refactored)
-@@ -92,7 +92,7 @@
- def __init__(self, *args, **kwargs):
- self.fmt_args = ', '.join(itertools.chain(
- [str(a) for a in args],
-- ['{}={}'.format(k, v) for k, v in kwargs.iteritems()]))
-+ ['{}={}'.format(k, v) for k, v in kwargs.items()]))
-
- def __eq__(self, other):
- if self.unique:
-@@ -249,7 +249,7 @@
- # be yielded for reporting purposes. Put them all in chunk 1 for
- # simplicity.
- if self.this_chunk == 1:
-- disabled_dirs = [v for k, v in tests_by_dir.iteritems()
-+ disabled_dirs = [v for k, v in tests_by_dir.items()
- if k not in ordered_dirs]
- for disabled_test in itertools.chain(*disabled_dirs):
- yield disabled_test
-@@ -326,7 +326,7 @@
-
- def __init__(self, tags):
- InstanceFilter.__init__(self, tags)
-- if isinstance(tags, basestring):
-+ if isinstance(tags, str):
- tags = [tags]
- self.tags = tags
-
-@@ -349,7 +349,7 @@
-
- def __init__(self, paths):
- InstanceFilter.__init__(self, paths)
-- if isinstance(paths, basestring):
-+ if isinstance(paths, str):
- paths = [paths]
- self.paths = paths
-
---- firefox-52.9.0esr/testing/mozbase/manifestparser/manifestparser/ini.py (original)
-+++ firefox-52.9.0esr/testing/mozbase/manifestparser/manifestparser/ini.py (refactored)
-@@ -27,7 +27,7 @@
- sections = []
- key = value = None
- section_names = set()
-- if isinstance(fp, basestring):
-- fp = file(fp)
-+ if isinstance(fp, str):
-+ fp = open(fp)
-
- # read the lines
-@@ -131,7 +131,7 @@
- 'support-files': '%s %s',
- }
- final_mapping = global_vars.copy()
-- for field_name, value in local_vars.items():
-+ for field_name, value in list(local_vars.items()):
- if field_name not in field_patterns or field_name not in global_vars:
- final_mapping[field_name] = value
- continue
---- firefox-52.9.0esr/python/mozbuild/mozbuild/util.py.old 2018-07-10 11:16:10.690000000 +0000
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/util.py 2018-07-10 23:36:02.250000000 +0000
-@@ -1254,10 +1254,10 @@
- encode(k, encoding): encode(v, encoding)
- for k, v in obj.items()
- }
-- if isinstance(obj, bytes):
-- return obj
- if isinstance(obj, str):
-- return obj.encode(encoding)
-+ return obj
-+ if isinstance(obj, bytes):
-+ return obj.decode(encoding)
- if isinstance(obj, Iterable):
- return [encode(i, encoding) for i in obj]
- return obj
---- firefox-52.9.0esr/python/mozbuild/mozbuild/util.py.old 2018-07-10 23:36:33.980000000 +0000
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/util.py 2018-07-10 23:41:51.900000000 +0000
-@@ -1179,6 +1179,9 @@
- POSSIBLE_VALUES = possible_values
- return EnumStringSubclass
-
-+ def __hash__(self):
-+ return hash(str(self))
-+
-
- def _escape_char(c):
- # str.encode('unicode_espace') doesn't escape quotes, presumably because
---- firefox-52.9.0esr/python/mozbuild/mozbuild/mozinfo.py.old 2018-07-10 23:42:19.390000000 +0000
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/mozinfo.py 2018-07-11 01:45:57.930000000 +0000
-@@ -155,6 +155,6 @@
- """
- build_conf = build_dict(config, env)
- if isinstance(file, str):
-- file = open(file, 'wb')
-+ file = open(file, 'w')
-
- json.dump(build_conf, file, sort_keys=True, indent=4)
---- firefox-52.9.0esr/python/mozbuild/mozbuild/jar.py.old 2018-07-11 01:46:26.540000000 +0000
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/jar.py 2018-07-11 02:02:36.010000000 +0000
-@@ -16,7 +16,7 @@
- import re
- import logging
- from time import localtime
--from MozZipFile import ZipFile
-+from zipfile import ZipFile
- from io import StringIO
- from collections import defaultdict
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/util.py.old 2018-07-11 02:05:38.530000000 +0000
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/util.py 2018-07-11 02:08:21.020000000 +0000
-@@ -987,8 +987,6 @@
- 'got %s, expected %s' % (fname,
- type(value), ftype))
-
-- super(TypedTuple, self).__init__(*args, **kwargs)
--
- TypedTuple._fields = fields
-
- return TypedTuple
---- firefox-52.9.0esr/build/moz.configure/init.configure.old 2018-07-11 02:08:50.000000000 +0000
-+++ firefox-52.9.0esr/build/moz.configure/init.configure 2018-07-11 04:04:26.600000000 +0000
-@@ -297,7 +297,9 @@
- # There is also a quartet form:
- # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
- # But we can consider the "KERNEL-OPERATING_SYSTEM" as one.
-- cpu, manufacturer, os = triplet.decode('utf-8').split('-', 2)
-+ if isinstance(triplet, bytes):
-+ triplet = triplet.decode('utf-8')
-+ cpu, manufacturer, os = triplet.split('-', 2)
-
- # Autoconf uses config.sub to validate and canonicalize those triplets,
- # but the granularity of its results has never been satisfying to our
---- firefox-52.9.0esr/python/mozbuild/mozbuild/frontend/reader.py.old 2018-07-11 04:25:33.980000000 +0000
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/frontend/reader.py 2018-07-11 04:24:50.630000000 +0000
-@@ -441,6 +441,8 @@
- code = func.__code__
- firstlineno = code.co_firstlineno
- lines = sandbox._current_source.splitlines(True)
-+ if len(lines) and isinstance(lines[0], bytes):
-+ lines = [l.decode('utf-8') for l in lines]
- lines = inspect.getblock(lines[firstlineno - 1:])
-
- # The code lines we get out of inspect.getsourcelines look like
---- firefox-52.9.0esr/python/mozbuild/mozbuild/frontend/reader.py.old 2018-07-11 04:25:57.090000000 +0000
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/frontend/reader.py 2018-07-11 04:29:46.140000000 +0000
-@@ -460,7 +460,7 @@
- # actually never calls __getitem__ and __setitem__, so we need to
- # modify the AST so that accesses to globals are properly directed
- # to a dict.
-- self._global_name = b'_data' # AST wants str for this, not unicode
-+ self._global_name = '_data' # AST wants str for this, not unicode
- # In case '_data' is a name used for a variable in the function code,
- # prepend more underscores until we find an unused name.
- while (self._global_name in code.co_names or
---- firefox-52.9.0esr/python/mozbuild/mozbuild/frontend/context.py.old 2018-07-11 04:30:06.590000000 +0000
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/frontend/context.py 2018-07-11 04:35:38.670000000 +0000
-@@ -384,8 +384,8 @@
-
- def __cmp__(self, other):
- if isinstance(other, Path) and self.srcdir != other.srcdir:
-- return cmp(self.full_path, other.full_path)
-- return cmp(str(self), other)
-+ return self.full_path == other.full_path
-+ return str(self) == other
-
- # __cmp__ is not enough because unicode has __eq__, __ne__, etc. defined
- # and __cmp__ is only used for those when they don't exist.
---- firefox-52.9.0esr/mozglue/build/moz.build.old 2018-07-11 04:40:17.930000000 +0000
-+++ firefox-52.9.0esr/mozglue/build/moz.build 2018-07-11 04:42:00.830000000 +0000
-@@ -4,20 +4,15 @@
- # 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/.
-
--# Build mozglue as a shared lib on Windows, OSX and Android.
-+# Build mozglue as a shared lib on Windows and OSX.
- # If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in
--if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android'):
-+if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin'):
- SharedLibrary('mozglue')
- else:
- Library('mozglue')
-
- SDK_LIBRARY = True
-
--if CONFIG['OS_TARGET'] == 'Android':
-- SOURCES += [
-- 'BionicGlue.cpp',
-- ]
--
- if CONFIG['MOZ_ASAN']:
- SOURCES += [
- 'AsanOptions.cpp',
---- firefox-52.9.0esr/js/src/moz.build.old 2017-04-11 02:13:16.000000000 +0000
-+++ firefox-52.9.0esr/js/src/moz.build 2018-07-11 04:43:59.920000000 +0000
-@@ -707,7 +707,7 @@
- CXXFLAGS += ['-wd4577']
- CXXFLAGS += ['-wd4312']
-
--if CONFIG['OS_ARCH'] not in ('WINNT', 'HP-UX'):
-+if CONFIG['OS_ARCH'] != 'WINNT':
- OS_LIBS += [
- 'm',
- ]
-@@ -722,13 +722,13 @@
- 'dl',
- ]
-
--if CONFIG['OS_ARCH'] == 'SunOS':
-- OS_LIBS += [
-- 'posix4',
-- 'dl',
-- 'nsl',
-- 'socket',
-- ]
-+#if CONFIG['OS_ARCH'] == 'SunOS':
-+# OS_LIBS += [
-+# 'posix4',
-+# 'dl',
-+# 'nsl',
-+# 'socket',
-+# ]
-
- OS_LIBS += CONFIG['REALTIME_LIBS']
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/util.py.old 2018-07-11 04:44:24.900000000 +0000
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/util.py 2018-07-11 04:46:47.310000000 +0000
-@@ -267,6 +267,10 @@
- if 'b' in self.mode:
- writemode += 'b'
- with open(self.name, writemode) as file:
-+ if 'b' in self.mode and isinstance(buf, str):
-+ buf = buf.encode('utf-8')
-+ elif 'b' not in self.mode and isinstance(buf, bytes):
-+ buf = buf.decode('utf-8')
- file.write(buf)
-
- if self._capture_diff:
---- firefox-52.9.0esr/python/mozbuild/mozbuild/backend/recursivemake.py.old 2018-07-11 04:47:15.020000000 +0000
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/backend/recursivemake.py 2018-07-11 04:53:51.750000000 +0000
-@@ -77,86 +77,86 @@
- from functools import reduce
-
- MOZBUILD_VARIABLES = [
-- b'ANDROID_APK_NAME',
-- b'ANDROID_APK_PACKAGE',
-- b'ANDROID_ASSETS_DIRS',
-- b'ANDROID_EXTRA_PACKAGES',
-- b'ANDROID_EXTRA_RES_DIRS',
-- b'ANDROID_GENERATED_RESFILES',
-- b'ANDROID_RES_DIRS',
-- b'ASFLAGS',
-- b'CMSRCS',
-- b'CMMSRCS',
-- b'CPP_UNIT_TESTS',
-- b'DIRS',
-- b'DIST_INSTALL',
-- b'EXTRA_DSO_LDOPTS',
-- b'EXTRA_JS_MODULES',
-- b'EXTRA_PP_COMPONENTS',
-- b'EXTRA_PP_JS_MODULES',
-- b'FORCE_SHARED_LIB',
-- b'FORCE_STATIC_LIB',
-- b'FINAL_LIBRARY',
-- b'HOST_CFLAGS',
-- b'HOST_CSRCS',
-- b'HOST_CMMSRCS',
-- b'HOST_CXXFLAGS',
-- b'HOST_EXTRA_LIBS',
-- b'HOST_LIBRARY_NAME',
-- b'HOST_PROGRAM',
-- b'HOST_SIMPLE_PROGRAMS',
-- b'IS_COMPONENT',
-- b'JAR_MANIFEST',
-- b'JAVA_JAR_TARGETS',
-- b'LD_VERSION_SCRIPT',
-- b'LIBRARY_NAME',
-- b'LIBS',
-- b'MAKE_FRAMEWORK',
-- b'MODULE',
-- b'NO_DIST_INSTALL',
-- b'NO_EXPAND_LIBS',
-- b'NO_INTERFACES_MANIFEST',
-- b'NO_JS_MANIFEST',
-- b'OS_LIBS',
-- b'PARALLEL_DIRS',
-- b'PREF_JS_EXPORTS',
-- b'PROGRAM',
-- b'PYTHON_UNIT_TESTS',
-- b'RESOURCE_FILES',
-- b'SDK_HEADERS',
-- b'SDK_LIBRARY',
-- b'SHARED_LIBRARY_LIBS',
-- b'SHARED_LIBRARY_NAME',
-- b'SIMPLE_PROGRAMS',
-- b'SONAME',
-- b'STATIC_LIBRARY_NAME',
-- b'TEST_DIRS',
-- b'TOOL_DIRS',
-+ 'ANDROID_APK_NAME',
-+ 'ANDROID_APK_PACKAGE',
-+ 'ANDROID_ASSETS_DIRS',
-+ 'ANDROID_EXTRA_PACKAGES',
-+ 'ANDROID_EXTRA_RES_DIRS',
-+ 'ANDROID_GENERATED_RESFILES',
-+ 'ANDROID_RES_DIRS',
-+ 'ASFLAGS',
-+ 'CMSRCS',
-+ 'CMMSRCS',
-+ 'CPP_UNIT_TESTS',
-+ 'DIRS',
-+ 'DIST_INSTALL',
-+ 'EXTRA_DSO_LDOPTS',
-+ 'EXTRA_JS_MODULES',
-+ 'EXTRA_PP_COMPONENTS',
-+ 'EXTRA_PP_JS_MODULES',
-+ 'FORCE_SHARED_LIB',
-+ 'FORCE_STATIC_LIB',
-+ 'FINAL_LIBRARY',
-+ 'HOST_CFLAGS',
-+ 'HOST_CSRCS',
-+ 'HOST_CMMSRCS',
-+ 'HOST_CXXFLAGS',
-+ 'HOST_EXTRA_LIBS',
-+ 'HOST_LIBRARY_NAME',
-+ 'HOST_PROGRAM',
-+ 'HOST_SIMPLE_PROGRAMS',
-+ 'IS_COMPONENT',
-+ 'JAR_MANIFEST',
-+ 'JAVA_JAR_TARGETS',
-+ 'LD_VERSION_SCRIPT',
-+ 'LIBRARY_NAME',
-+ 'LIBS',
-+ 'MAKE_FRAMEWORK',
-+ 'MODULE',
-+ 'NO_DIST_INSTALL',
-+ 'NO_EXPAND_LIBS',
-+ 'NO_INTERFACES_MANIFEST',
-+ 'NO_JS_MANIFEST',
-+ 'OS_LIBS',
-+ 'PARALLEL_DIRS',
-+ 'PREF_JS_EXPORTS',
-+ 'PROGRAM',
-+ 'PYTHON_UNIT_TESTS',
-+ 'RESOURCE_FILES',
-+ 'SDK_HEADERS',
-+ 'SDK_LIBRARY',
-+ 'SHARED_LIBRARY_LIBS',
-+ 'SHARED_LIBRARY_NAME',
-+ 'SIMPLE_PROGRAMS',
-+ 'SONAME',
-+ 'STATIC_LIBRARY_NAME',
-+ 'TEST_DIRS',
-+ 'TOOL_DIRS',
- # XXX config/Makefile.in specifies this in a make invocation
- #'USE_EXTENSION_MANIFEST',
-- b'XPCSHELL_TESTS',
-- b'XPIDL_MODULE',
-+ 'XPCSHELL_TESTS',
-+ 'XPIDL_MODULE',
- ]
-
- DEPRECATED_VARIABLES = [
-- b'ANDROID_RESFILES',
-- b'EXPORT_LIBRARY',
-- b'EXTRA_LIBS',
-- b'HOST_LIBS',
-- b'LIBXUL_LIBRARY',
-- b'MOCHITEST_A11Y_FILES',
-- b'MOCHITEST_BROWSER_FILES',
-- b'MOCHITEST_BROWSER_FILES_PARTS',
-- b'MOCHITEST_CHROME_FILES',
-- b'MOCHITEST_FILES',
-- b'MOCHITEST_FILES_PARTS',
-- b'MOCHITEST_METRO_FILES',
-- b'MOCHITEST_ROBOCOP_FILES',
-- b'MODULE_OPTIMIZE_FLAGS',
-- b'MOZ_CHROME_FILE_FORMAT',
-- b'SHORT_LIBNAME',
-- b'TESTING_JS_MODULES',
-- b'TESTING_JS_MODULE_DIR',
-+ 'ANDROID_RESFILES',
-+ 'EXPORT_LIBRARY',
-+ 'EXTRA_LIBS',
-+ 'HOST_LIBS',
-+ 'LIBXUL_LIBRARY',
-+ 'MOCHITEST_A11Y_FILES',
-+ 'MOCHITEST_BROWSER_FILES',
-+ 'MOCHITEST_BROWSER_FILES_PARTS',
-+ 'MOCHITEST_CHROME_FILES',
-+ 'MOCHITEST_FILES',
-+ 'MOCHITEST_FILES_PARTS',
-+ 'MOCHITEST_METRO_FILES',
-+ 'MOCHITEST_ROBOCOP_FILES',
-+ 'MODULE_OPTIMIZE_FLAGS',
-+ 'MOZ_CHROME_FILE_FORMAT',
-+ 'SHORT_LIBNAME',
-+ 'TESTING_JS_MODULES',
-+ 'TESTING_JS_MODULE_DIR',
- ]
-
- MOZBUILD_VARIABLES_MESSAGE = 'It should only be defined in moz.build files.'
-@@ -758,7 +758,7 @@
- rule.add_dependencies(['$(CURDIR)/%: %'])
-
- def _check_blacklisted_variables(self, makefile_in, makefile_content):
-- if b'EXTERNALLY_MANAGED_MAKE_FILE' in makefile_content:
-+ if 'EXTERNALLY_MANAGED_MAKE_FILE' in makefile_content:
- # Bypass the variable restrictions for externally managed makefiles.
- return
-
-@@ -765,7 +765,7 @@
- for l in makefile_content.splitlines():
- l = l.strip()
- # Don't check comments
-- if l.startswith(b'#'):
-+ if l.startswith('#'):
- continue
- for x in chain(MOZBUILD_VARIABLES, DEPRECATED_VARIABLES):
- if x not in l:
-@@ -822,11 +822,11 @@
- # Skip every directory but those with a Makefile
- # containing a tools target, or XPI_PKGNAME or
- # INSTALL_EXTENSION_ID.
-- for t in (b'XPI_PKGNAME', b'INSTALL_EXTENSION_ID',
-- b'tools'):
-+ for t in ('XPI_PKGNAME', 'INSTALL_EXTENSION_ID',
-+ 'tools'):
- if t not in content:
- continue
-- if t == b'tools' and not re.search('(?:^|\s)tools.*::', content, re.M):
-+ if t == 'tools' and not re.search('(?:^|\s)tools.*::', content, re.M):
- continue
- if objdir == self.environment.topobjdir:
- continue
-@@ -1422,20 +1422,20 @@
- pp.context.update(extra)
- if not pp.context.get('autoconfmk', ''):
- pp.context['autoconfmk'] = 'autoconf.mk'
-- pp.handleLine(b'# THIS FILE WAS AUTOMATICALLY GENERATED. DO NOT MODIFY BY HAND.\n');
-- pp.handleLine(b'DEPTH := @DEPTH@\n')
-- pp.handleLine(b'topobjdir := @topobjdir@\n')
-- pp.handleLine(b'topsrcdir := @top_srcdir@\n')
-- pp.handleLine(b'srcdir := @srcdir@\n')
-- pp.handleLine(b'VPATH := @srcdir@\n')
-- pp.handleLine(b'relativesrcdir := @relativesrcdir@\n')
-- pp.handleLine(b'include $(DEPTH)/config/@autoconfmk@\n')
-+ pp.handleLine('# THIS FILE WAS AUTOMATICALLY GENERATED. DO NOT MODIFY BY HAND.\n');
-+ pp.handleLine('DEPTH := @DEPTH@\n')
-+ pp.handleLine('topobjdir := @topobjdir@\n')
-+ pp.handleLine('topsrcdir := @top_srcdir@\n')
-+ pp.handleLine('srcdir := @srcdir@\n')
-+ pp.handleLine('VPATH := @srcdir@\n')
-+ pp.handleLine('relativesrcdir := @relativesrcdir@\n')
-+ pp.handleLine('include $(DEPTH)/config/@autoconfmk@\n')
- if not stub:
- pp.do_include(obj.input_path)
- # Empty line to avoid failures when last line in Makefile.in ends
- # with a backslash.
-- pp.handleLine(b'\n')
-- pp.handleLine(b'include $(topsrcdir)/config/recurse.mk\n')
-+ pp.handleLine('\n')
-+ pp.handleLine('include $(topsrcdir)/config/recurse.mk\n')
- if not stub:
- # Adding the Makefile.in here has the desired side-effect
- # that if the Makefile.in disappears, this will force
---- firefox-52.9.0esr/python/mozbuild/mozpack/manifests.py.old 2018-07-11 04:54:39.260000000 +0000
-+++ firefox-52.9.0esr/python/mozbuild/mozpack/manifests.py 2018-07-11 04:57:31.710000000 +0000
-@@ -115,7 +115,7 @@
- self._source_files = set()
-
- if path or fileobj:
-- with _auto_fileobj(path, fileobj, 'rb') as fh:
-+ with _auto_fileobj(path, fileobj, 'r') as fh:
- self._source_files.add(fh.name)
- self._load_from_fileobj(fh)
-
-@@ -174,7 +174,7 @@
- dest, content = fields[1:]
-
- self.add_content(
-- self._decode_field_entry(content).encode('utf-8'), dest)
-+ self._decode_field_entry(content), dest)
- continue
-
- # Don't fail for non-actionable items, allowing
-@@ -236,7 +236,7 @@
-
- It is an error if both are specified.
- """
-- with _auto_fileobj(path, fileobj, 'wb') as fh:
-+ with _auto_fileobj(path, fileobj, 'w') as fh:
- fh.write('%d\n' % self.CURRENT_VERSION)
-
- for dest in sorted(self._dests):
-@@ -244,8 +244,7 @@
-
- parts = ['%d' % entry[0], dest]
- parts.extend(entry[1:])
-- fh.write('%s\n' % self.FIELD_SEPARATOR.join(
-- p.encode('utf-8') for p in parts))
-+ fh.write('%s\n' % self.FIELD_SEPARATOR.join(parts))
-
- def add_symlink(self, source, dest):
- """Add a symlink to this manifest.
-@@ -391,7 +390,7 @@
- if install_type == self.CONTENT:
- # GeneratedFile expect the buffer interface, which the unicode
- # type doesn't have, so encode to a str.
-- content = self._decode_field_entry(entry[1]).encode('utf-8')
-+ content = self._decode_field_entry(entry[1])
- registry.add(dest, GeneratedFile(content))
- continue
-
---- firefox-52.9.0esr/config/MozZipFile.py (original)
-+++ firefox-52.9.0esr/config/MozZipFile.py (refactored)
-@@ -18,7 +18,7 @@
- def __init__(self, file, mode="r", compression=zipfile.ZIP_STORED,
- lock = False):
- if lock:
-- assert isinstance(file, basestring)
-+ assert isinstance(file, str)
- self.lockfile = lock_file(file + '.lck')
- else:
- self.lockfile = None
-@@ -46,7 +46,7 @@
- date_time=time.localtime(time.time()))
- zinfo.compress_type = self.compression
- # Add some standard UNIX file access permissions (-rw-r--r--).
-- zinfo.external_attr = (0x81a4 & 0xFFFF) << 16L
-+ zinfo.external_attr = (0x81a4 & 0xFFFF) << 16
- else:
- zinfo = zinfo_or_arcname
-
-@@ -58,7 +58,7 @@
- # as the old, reuse the existing entry.
-
- doSeek = False # store if we need to seek to the eof after overwriting
-- if self.NameToInfo.has_key(zinfo.filename):
-+ if zinfo.filename in self.NameToInfo:
- # Find the last ZipInfo with our name.
- # Last, because that's catching multiple overwrites
- i = len(self.filelist)
-@@ -109,14 +109,14 @@
- # adjust file mode if we originally just wrote, now we rewrite
- self.fp.close()
- self.fp = open(self.filename, 'r+b')
-- all = map(lambda zi: (zi, True), self.filelist) + \
-- map(lambda zi: (zi, False), self._remove)
-+ all = [(zi, True) for zi in self.filelist] + \
-+ [(zi, False) for zi in self._remove]
- all.sort(lambda l, r: cmp(l[0].header_offset, r[0].header_offset))
- # empty _remove for multiple closes
- self._remove = []
-
- lengths = [all[i+1][0].header_offset - all[i][0].header_offset
-- for i in xrange(len(all)-1)]
-+ for i in range(len(all)-1)]
- lengths.append(self.end - all[-1][0].header_offset)
- to_pos = 0
- for (zi, keep), length in zip(all, lengths):
---- firefox-52.9.0esr/config/check_spidermonkey_style.py (original)
-+++ firefox-52.9.0esr/config/check_spidermonkey_style.py (refactored)
-@@ -35,7 +35,7 @@
- # isolation, but don't try to do any order checking between such blocks.
- #----------------------------------------------------------------------------
-
--from __future__ import print_function
-+
-
- import difflib
- import os
-@@ -270,7 +270,7 @@
- edges[inclname] = set()
-
- # Process all the JS files.
-- for filename in js_names.keys():
-+ for filename in list(js_names.keys()):
- inclname = js_names[filename]
- file_kind = FileKind.get(filename)
- if file_kind == FileKind.C or file_kind == FileKind.CPP or \
---- firefox-52.9.0esr/config/expandlibs.py (original)
-+++ firefox-52.9.0esr/config/expandlibs.py (refactored)
-@@ -26,7 +26,7 @@
- descriptor contains. And for each of these LIBS, also apply the same
- rules.
- '''
--from __future__ import with_statement
-+
- import sys, os, errno
- import expandlibs_config as conf
-
-@@ -36,7 +36,7 @@
- if dir and not os.path.exists(dir):
- try:
- os.makedirs(dir)
-- except OSError, error:
-+ except OSError as error:
- if error.errno != errno.EEXIST:
- raise
-
-@@ -140,4 +140,4 @@
- return [relativize(arg)]
-
- if __name__ == '__main__':
-- print " ".join(ExpandArgs(sys.argv[1:]))
-+ print(" ".join(ExpandArgs(sys.argv[1:])))
---- firefox-52.9.0esr/config/expandlibs_exec.py (original)
-+++ firefox-52.9.0esr/config/expandlibs_exec.py (refactored)
-@@ -20,7 +20,7 @@
- relevant linker options to change the order in which the linker puts the
- symbols appear in the resulting binary. Only works for ELF targets.
- '''
--from __future__ import with_statement
-+
- import sys
- import os
- from expandlibs import (
-@@ -304,11 +304,11 @@
- return syms
-
- def print_command(out, args):
-- print >>out, "Executing: " + " ".join(args)
-+ print("Executing: " + " ".join(args), file=out)
- for tmp in [f for f in args.tmp if os.path.isfile(f)]:
-- print >>out, tmp + ":"
-+ print(tmp + ":", file=out)
- with open(tmp) as file:
-- print >>out, "".join([" " + l for l in file.readlines()])
-+ print("".join([" " + l for l in file.readlines()]), file=out)
- out.flush()
-
- def main(args, proc_callback=None):
-@@ -338,8 +338,8 @@
- proc = subprocess.Popen(args, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
- if proc_callback:
- proc_callback(proc)
-- except Exception, e:
-- print >>sys.stderr, 'error: Launching', args, ':', e
-+ except Exception as e:
-+ print('error: Launching', args, ':', e, file=sys.stderr)
- raise e
- (stdout, stderr) = proc.communicate()
- if proc.returncode and not options.verbose:
---- firefox-52.9.0esr/config/expandlibs_gen.py (original)
-+++ firefox-52.9.0esr/config/expandlibs_gen.py (refactored)
-@@ -5,7 +5,7 @@
- '''Given a list of object files and library names, prints a library
- descriptor to standard output'''
-
--from __future__ import with_statement
-+
- import sys
- import os
- import expandlibs_config as conf
-@@ -38,4 +38,4 @@
-
- ensureParentDir(options.output)
- with open(options.output, 'w') as outfile:
-- print >>outfile, generate(args)
-+ print(generate(args), file=outfile)
---- firefox-52.9.0esr/config/find_OOM_errors.py (original)
-+++ firefox-52.9.0esr/config/find_OOM_errors.py (refactored)
-@@ -2,7 +2,7 @@
- # 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/.
--from __future__ import print_function
-+
-
- usage = """%prog: A test for OOM conditions in the shell.
-
-@@ -95,12 +95,12 @@
- """Keep track of the amount of times individual lines occur, in order to
- prioritize the errors which occur most frequently."""
- counts = {}
-- for string,count in blacklist.items():
-+ for string,count in list(blacklist.items()):
- for line in string.split("\n"):
- counts[line] = counts.get(line, 0) + count
-
- lines = []
-- for k,v in counts.items():
-+ for k,v in list(counts.items()):
- lines.append("{0:6}: {1}".format(v, k))
-
- lines.sort()
---- firefox-52.9.0esr/config/link.py (original)
-+++ firefox-52.9.0esr/config/link.py (refactored)
-@@ -18,7 +18,7 @@
- time.sleep(0.5)
- idleTime += 0.5
- if idleTime > 20 * 60:
-- print "Still linking, 20 minutes passed..."
-+ print("Still linking, 20 minutes passed...")
- sys.stdout.flush()
- idleTime = 0
-
-@@ -42,6 +42,6 @@
-
- if __name__ == "__main__":
- if len(sys.argv) < 2:
-- print >>sys.stderr, "Usage: link.py <commandline>"
-+ print("Usage: link.py <commandline>", file=sys.stderr)
- sys.exit(1)
- sys.exit(wrap_linker(sys.argv[1:]))
---- firefox-52.9.0esr/config/mozunit.py (original)
-+++ firefox-52.9.0esr/config/mozunit.py (refactored)
-@@ -140,7 +140,7 @@
- '''
- def __init__(self, files = {}):
- self.files = {}
-- for name, content in files.iteritems():
-+ for name, content in files.items():
- self.files[normcase(os.path.abspath(name))] = content
-
- def __call__(self, name, mode = 'r'):
-@@ -158,19 +158,19 @@
- return file
-
- def __enter__(self):
-- import __builtin__
-- self.open = __builtin__.open
-+ import builtins
-+ self.open = builtins.open
- self._orig_path_exists = os.path.exists
- self._orig_path_isdir = os.path.isdir
- self._orig_path_isfile = os.path.isfile
-- __builtin__.open = self
-+ builtins.open = self
- os.path.exists = self._wrapped_exists
- os.path.isdir = self._wrapped_isdir
- os.path.isfile = self._wrapped_isfile
-
- def __exit__(self, type, value, traceback):
-- import __builtin__
-- __builtin__.open = self.open
-+ import builtins
-+ builtins.open = self.open
- os.path.exists = self._orig_path_exists
- os.path.isdir = self._orig_path_isdir
- os.path.isfile = self._orig_path_isfile
---- firefox-52.9.0esr/config/nsinstall.py (original)
-+++ firefox-52.9.0esr/config/nsinstall.py (refactored)
-@@ -9,7 +9,7 @@
- # a full build environment set up.
- # The basic limitation is, it doesn't even try to link and ignores
- # all related options.
--from __future__ import print_function
-+
- from optparse import OptionParser
- import mozfile
- import os
-@@ -149,7 +149,7 @@
-
- # nsinstall as a native command is always UTF-8
- def nsinstall(argv):
-- return _nsinstall_internal([unicode(arg, "utf-8") for arg in argv])
-+ return _nsinstall_internal([str(arg, "utf-8") for arg in argv])
-
- if __name__ == '__main__':
- # sys.argv corrupts characters outside the system code page on Windows
-@@ -175,8 +175,8 @@
- else:
- # For consistency, do it on Unix as well
- if sys.stdin.encoding is not None:
-- argv = [unicode(arg, sys.stdin.encoding) for arg in sys.argv]
-+ argv = [str(arg, sys.stdin.encoding) for arg in sys.argv]
- else:
-- argv = [unicode(arg) for arg in sys.argv]
-+ argv = [str(arg) for arg in sys.argv]
-
- sys.exit(_nsinstall_internal(argv[1:]))
---- firefox-52.9.0esr/config/printconfigsetting.py (original)
-+++ firefox-52.9.0esr/config/printconfigsetting.py (refactored)
-@@ -5,12 +5,12 @@
- import configobj
- import sys
- import re
--from StringIO import StringIO
-+from io import StringIO
-
- try:
- (file, section, key) = sys.argv[1:]
- except ValueError:
-- print "Usage: printconfigsetting.py <file> <section> <setting>"
-+ print("Usage: printconfigsetting.py <file> <section> <setting>")
- sys.exit(1)
-
- with open(file) as fh:
-@@ -21,11 +21,11 @@
- try:
- s = c[section]
- except KeyError:
-- print >>sys.stderr, "Section [%s] not found." % section
-+ print("Section [%s] not found." % section, file=sys.stderr)
- sys.exit(1)
-
- try:
-- print s[key]
-+ print(s[key])
- except KeyError:
-- print >>sys.stderr, "Key %s not found." % key
-+ print("Key %s not found." % key, file=sys.stderr)
- sys.exit(1)
---- firefox-52.9.0esr/config/pythonpath.py (original)
-+++ firefox-52.9.0esr/config/pythonpath.py (refactored)
-@@ -9,7 +9,7 @@
-
- def main(args):
- def usage():
-- print >>sys.stderr, "pythonpath.py -I directory script.py [args...]"
-+ print("pythonpath.py -I directory script.py [args...]", file=sys.stderr)
- sys.exit(150)
-
- paths = []
-@@ -45,7 +45,7 @@
- frozenglobals['__name__'] = '__main__'
- frozenglobals['__file__'] = script
-
-- execfile(script, frozenglobals)
-+ exec(compile(open(script).read(), script, 'exec'), frozenglobals)
-
- # Freeze scope here ... why this makes things work I have no idea ...
- frozenglobals = globals()
---- firefox-52.9.0esr/config/rebuild_check.py (original)
-+++ firefox-52.9.0esr/config/rebuild_check.py (refactored)
-@@ -18,7 +18,7 @@
- deps = args[1:]
- t = mtime(target)
- if t < 0:
-- print target
-+ print(target)
- return
-
- newer = []
-@@ -31,13 +31,13 @@
- newer.append(dep)
-
- if newer and removed:
-- print 'Rebuilding %s because %s changed and %s was removed' % (target, ', '.join(newer), ', '.join(removed))
-+ print('Rebuilding %s because %s changed and %s was removed' % (target, ', '.join(newer), ', '.join(removed)))
- elif newer:
-- print 'Rebuilding %s because %s changed' % (target, ', '.join(newer))
-+ print('Rebuilding %s because %s changed' % (target, ', '.join(newer)))
- elif removed:
-- print 'Rebuilding %s because %s was removed' % (target, ', '.join(removed))
-+ print('Rebuilding %s because %s was removed' % (target, ', '.join(removed)))
- else:
-- print 'Rebuilding %s for an unknown reason' % target
-+ print('Rebuilding %s for an unknown reason' % target)
-
- if __name__ == '__main__':
- import sys
---- firefox-52.9.0esr/config/tests/unit-expandlibs.py (original)
-+++ firefox-52.9.0esr/config/tests/unit-expandlibs.py (refactored)
-@@ -7,7 +7,7 @@
- from shutil import rmtree
- import mozunit
-
--from UserString import UserString
-+from collections import UserString
- # Create a controlled configuration for use by expandlibs
- config_win = {
- 'AR': 'lib',
-@@ -120,8 +120,7 @@
- del dict[name]
- return type.__new__(cls, clsName, bases, dict)
-
--class TestCaseWithTmpDir(unittest.TestCase):
-- __metaclass__ = ReplicateTests
-+class TestCaseWithTmpDir(unittest.TestCase, metaclass=ReplicateTests):
- def init(self):
- self.tmpdir = os.path.abspath(mkdtemp(dir=os.curdir))
-
---- firefox-52.9.0esr/config/tests/unit-nsinstall.py (original)
-+++ firefox-52.9.0esr/config/tests/unit-nsinstall.py (refactored)
-@@ -28,9 +28,9 @@
- # Unicode strings means non-ASCII children can be deleted properly on
- # Windows
- if sys.stdin.encoding is None:
-- tmpdir = unicode(self.tmpdir)
-+ tmpdir = str(self.tmpdir)
- else:
-- tmpdir = unicode(self.tmpdir, sys.stdin.encoding)
-+ tmpdir = str(self.tmpdir, sys.stdin.encoding)
- rmtree(tmpdir)
-
- # utility methods for tests
-@@ -50,14 +50,14 @@
- "Test nsinstall -D <dir>"
- testdir = os.path.join(self.tmpdir, "test")
- self.assertEqual(nsinstall(["-D", testdir]), 0)
-- self.assert_(os.path.isdir(testdir))
-+ self.assertTrue(os.path.isdir(testdir))
-
- def test_nsinstall_basic(self):
- "Test nsinstall <file> <dir>"
- testfile = self.touch("testfile")
- testdir = self.mkdirs("testdir")
- self.assertEqual(nsinstall([testfile, testdir]), 0)
-- self.assert_(os.path.isfile(os.path.join(testdir, "testfile")))
-+ self.assertTrue(os.path.isfile(os.path.join(testdir, "testfile")))
-
- def test_nsinstall_basic_recursive(self):
- "Test nsinstall <dir> <dest dir>"
-@@ -76,12 +76,12 @@
- '-X', Xdir]), 0)
-
- testdir = os.path.join(destdir, "sourcedir")
-- self.assert_(os.path.isdir(testdir))
-- self.assert_(os.path.isfile(os.path.join(testdir, "testfile")))
-- self.assert_(not os.path.exists(os.path.join(testdir, "Xfile")))
-- self.assert_(os.path.isdir(os.path.join(testdir, "copieddir")))
-- self.assert_(os.path.isfile(os.path.join(testdir, "copieddir", "testfile2")))
-- self.assert_(not os.path.exists(os.path.join(testdir, "Xdir")))
-+ self.assertTrue(os.path.isdir(testdir))
-+ self.assertTrue(os.path.isfile(os.path.join(testdir, "testfile")))
-+ self.assertTrue(not os.path.exists(os.path.join(testdir, "Xfile")))
-+ self.assertTrue(os.path.isdir(os.path.join(testdir, "copieddir")))
-+ self.assertTrue(os.path.isfile(os.path.join(testdir, "copieddir", "testfile2")))
-+ self.assertTrue(not os.path.exists(os.path.join(testdir, "Xdir")))
-
- def test_nsinstall_multiple(self):
- "Test nsinstall <three files> <dest dir>"
-@@ -91,7 +91,7 @@
- testdir = self.mkdirs("testdir")
- self.assertEqual(nsinstall(testfiles + [testdir]), 0)
- for f in testfiles:
-- self.assert_(os.path.isfile(os.path.join(testdir,
-+ self.assertTrue(os.path.isfile(os.path.join(testdir,
- os.path.basename(f))))
-
- def test_nsinstall_dir_exists(self):
-@@ -99,7 +99,7 @@
- srcdir = self.mkdirs("test")
- destdir = self.mkdirs("testdir/test")
- self.assertEqual(nsinstall([srcdir, os.path.dirname(destdir)]), 0)
-- self.assert_(os.path.isdir(destdir))
-+ self.assertTrue(os.path.isdir(destdir))
-
- def test_nsinstall_t(self):
- "Test that nsinstall -t works (preserve timestamp)"
-@@ -110,7 +110,7 @@
- os.utime(testfile, (t, t))
- self.assertEqual(nsinstall(["-t", testfile, testdir]), 0)
- destfile = os.path.join(testdir, "testfile")
-- self.assert_(os.path.isfile(destfile))
-+ self.assertTrue(os.path.isfile(destfile))
- self.assertEqual(os.stat(testfile).st_mtime,
- os.stat(destfile).st_mtime)
-
-@@ -125,7 +125,7 @@
- self.assertEqual(nsinstall(["-m", "{0:04o}"
- .format(mode), testfile, testdir]), 0)
- destfile = os.path.join(testdir, "testfile")
-- self.assert_(os.path.isfile(destfile))
-+ self.assertTrue(os.path.isfile(destfile))
- self.assertEqual(os.stat(testfile).st_mode,
- os.stat(destfile).st_mode)
-
-@@ -136,25 +136,25 @@
- testdir = self.mkdirs("testdir")
- destdir = os.path.join(testdir, "subdir")
- self.assertEqual(nsinstall(["-d", testfile, destdir]), 0)
-- self.assert_(os.path.isdir(os.path.join(destdir, "testfile")))
-+ self.assertTrue(os.path.isdir(os.path.join(destdir, "testfile")))
-
- if RUN_NON_ASCII_TESTS:
- def test_nsinstall_non_ascii(self):
- "Test that nsinstall handles non-ASCII files"
-- filename = u"\u2325\u3452\u2415\u5081"
-+ filename = "\u2325\u3452\u2415\u5081"
- testfile = self.touch(filename)
-- testdir = self.mkdirs(u"\u4241\u1D04\u1414")
-+ testdir = self.mkdirs("\u4241\u1D04\u1414")
- self.assertEqual(nsinstall([testfile.encode("utf-8"),
- testdir.encode("utf-8")]), 0)
-
- destfile = os.path.join(testdir, filename)
-- self.assert_(os.path.isfile(destfile))
-+ self.assertTrue(os.path.isfile(destfile))
-
- def test_nsinstall_non_ascii_subprocess(self):
- "Test that nsinstall as a subprocess handles non-ASCII files"
-- filename = u"\u2325\u3452\u2415\u5081"
-+ filename = "\u2325\u3452\u2415\u5081"
- testfile = self.touch(filename)
-- testdir = self.mkdirs(u"\u4241\u1D04\u1414")
-+ testdir = self.mkdirs("\u4241\u1D04\u1414")
- # We don't use subprocess because it can't handle Unicode on
- # Windows <http://bugs.python.org/issue1759845>. mozprocess calls
- # CreateProcessW directly so it's perfect.
-@@ -166,7 +166,7 @@
-
- self.assertEqual(rv, 0)
- destfile = os.path.join(testdir, filename)
-- self.assert_(os.path.isfile(destfile))
-+ self.assertTrue(os.path.isfile(destfile))
-
- #TODO: implement -R, -l, -L and test them!
-
---- firefox-52.9.0esr/config/tests/unitMozZipFile.py (original)
-+++ firefox-52.9.0esr/config/tests/unitMozZipFile.py (refactored)
-@@ -11,6 +11,7 @@
- import random
- import copy
- from string import letters
-+from functools import reduce
-
- '''
- Test case infrastructure for MozZipFile.
-@@ -38,7 +39,7 @@
- 'firstdir/oneleaf',
- 'seconddir/twoleaf',
- 'thirddir/with/sub/threeleaf')
--_lengths = map(lambda n: n * 64, [16, 64, 80])
-+_lengths = [n * 64 for n in [16, 64, 80]]
- lengths = 3
- writes = 5
-
-@@ -71,7 +72,7 @@
- def getContent(length):
- 'Get pseudo random content of given length.'
- rv = [None] * length
-- for i in xrange(length):
-+ for i in range(length):
- rv[i] = random.choice(letters)
- return ''.join(rv)
-
-@@ -133,13 +134,13 @@
- def _verifyZip(self):
- zf = zipfile.ZipFile(self.f)
- badEntry = zf.testzip()
-- self.failIf(badEntry, badEntry)
-+ self.assertFalse(badEntry, badEntry)
- zlist = zf.namelist()
- zlist.sort()
-- vlist = self.ref.keys()
-+ vlist = list(self.ref.keys())
- vlist.sort()
- self.assertEqual(zlist, vlist)
-- for leaf, content in self.ref.iteritems():
-+ for leaf, content in self.ref.items():
- zcontent = zf.read(leaf)
- self.assertEqual(content, zcontent)
-
-@@ -158,16 +159,16 @@
- open(self.leaf('stage', leaf), 'w').write(content)
-
- # all leafs in all lengths
--atomics = list(prod(xrange(len(leafs)), xrange(lengths)))
-+atomics = list(prod(range(len(leafs)), range(lengths)))
-
- # populate TestExtensiveStore with testcases
--for w in xrange(writes):
-+for w in range(writes):
- # Don't iterate over all files for the the first n passes,
- # those are redundant as long as w < lengths.
- # There are symmetries in the trailing end, too, but I don't know
- # how to reduce those out right now.
-- nonatomics = [list(prod(range(min(i,len(leafs))), xrange(lengths)))
-- for i in xrange(1, w+1)] + [atomics]
-+ nonatomics = [list(prod(list(range(min(i,len(leafs)))), range(lengths)))
-+ for i in range(1, w+1)] + [atomics]
- for descs in prod(*nonatomics):
- suffix = getid(descs)
- dicts = [dict(leaf=leaf, length=length) for leaf, length in descs]
-@@ -181,9 +182,9 @@
- # and then write all atomics again.
- # This should catch more or less all artifacts generated
- # by the final ordering step when closing the jar.
--files = [list(prod([i], xrange(lengths))) for i in xrange(len(leafs))]
-+files = [list(prod([i], range(lengths))) for i in range(len(leafs))]
- allfiles = reduce(lambda l,r:l+r,
-- [list(prod(*files[:(i+1)])) for i in xrange(len(leafs))])
-+ [list(prod(*files[:(i+1)])) for i in range(len(leafs))])
-
- for first in allfiles:
- testbasename = 'test{0}_'.format(getid(first))
---- firefox-52.9.0esr/config/expandlibs_exec.py.old 2018-07-11 05:07:18.280000000 +0000
-+++ firefox-52.9.0esr/config/expandlibs_exec.py 2018-07-11 05:08:45.670000000 +0000
-@@ -344,7 +344,7 @@
- (stdout, stderr) = proc.communicate()
- if proc.returncode and not options.verbose:
- print_command(sys.stderr, args)
-- sys.stderr.write(stdout)
-+ sys.stderr.write(stdout.decode('utf-8'))
- sys.stderr.flush()
- if proc.returncode:
- return proc.returncode
---- firefox-52.9.0esr/js/src/jsautokw.py.old 2017-04-11 02:13:16.000000000 +0000
-+++ firefox-52.9.0esr/js/src/jsautokw.py 2018-07-11 05:11:27.080000000 +0000
-@@ -80,14 +80,14 @@
- per_column = column_dict.setdefault(keyword[column], [])
- per_column.append(item)
-
-- return sorted(column_dict.items(), key=lambda (char, keyword): ord(char))
-+ return sorted(list(column_dict.items()), key=lambda char_keyword: ord(char_keyword[0]))
-
- def generate_letter_switch(opt, unprocessed_columns, keyword_list,
- columns=None):
- assert(len(keyword_list) != 0);
-
- if not columns:
-- columns = range(0, unprocessed_columns)
-+ columns = list(range(0, unprocessed_columns))
-
- if len(keyword_list) == 1:
- index, keyword = keyword_list[0]
-@@ -161,7 +161,7 @@
- per_length = length_dict.setdefault(len(keyword), [])
- per_length.append(item)
-
-- return sorted(length_dict.items(), key=lambda (length, keyword): length)
-+ return sorted(list(length_dict.items()), key=lambda length_keyword: length_keyword[0])
-
- def generate_switch(opt, keyword_list):
- assert(len(keyword_list) != 0);
---- firefox-52.9.0esr/js/src/builtin/embedjs.py (original)
-+++ firefox-52.9.0esr/js/src/builtin/embedjs.py (refactored)
-@@ -36,7 +36,7 @@
- #
- # It uses the C preprocessor to process its inputs.
-
--from __future__ import with_statement
-+
- import re, sys, os, subprocess
- import shlex
- import which
-@@ -109,7 +109,7 @@
-
- with open(tmpIn, 'wb') as input:
- input.write(source)
-- print(' '.join(cxx + outputArg + args + [tmpIn]))
-+ print((' '.join(cxx + outputArg + args + [tmpIn])))
- result = subprocess.Popen(cxx + outputArg + args + [tmpIn]).wait()
- if (result != 0):
- sys.exit(result);
-@@ -132,7 +132,7 @@
-
- def get_config_defines(buildconfig):
- # Collect defines equivalent to ACDEFINES and add MOZ_DEBUG_DEFINES.
-- env = {key: value for key, value in buildconfig.defines.iteritems()
-+ env = {key: value for key, value in buildconfig.defines.items()
- if key not in buildconfig.non_global_defines}
- for define in buildconfig.substs['MOZ_DEBUG_DEFINES']:
- env[define] = 1
---- firefox-52.9.0esr/js/src/builtin/embedjs.py.old 2018-07-11 05:13:28.920000000 +0000
-+++ firefox-52.9.0esr/js/src/builtin/embedjs.py 2018-07-11 05:15:15.390000000 +0000
-@@ -107,7 +107,7 @@
- tmpOut = 'self-hosting-preprocessed.pp';
- outputArg = shlex.split(preprocessorOption + tmpOut)
-
-- with open(tmpIn, 'wb') as input:
-+ with open(tmpIn, 'w') as input:
- input.write(source)
- print((' '.join(cxx + outputArg + args + [tmpIn])))
- result = subprocess.Popen(cxx + outputArg + args + [tmpIn]).wait()
---- firefox-52.9.0esr/python/mozbuild/mozbuild/preprocessor.py.old 2018-07-11 05:15:42.900000000 +0000
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/preprocessor.py 2018-07-11 05:23:10.870000000 +0000
-@@ -451,7 +451,7 @@
- except OSError as error:
- if error.errno != errno.EEXIST:
- raise
-- return open(path, 'wb')
-+ return open(path, 'w')
-
- p = self.getCommandLineParser()
- options, args = p.parse_args(args=args)
---- firefox-52.9.0esr/js/src/builtin/embedjs.py.old 2018-07-11 05:15:42.950000000 +0000
-+++ firefox-52.9.0esr/js/src/builtin/embedjs.py 2018-07-11 05:20:14.280000000 +0000
-@@ -53,7 +53,7 @@
- def ToCArray(lines):
- result = []
- for chr in lines:
-- result.append(str(ord(chr)))
-+ result.append(str(chr))
- return ", ".join(result)
-
- HEADER_TEMPLATE = """\
-@@ -87,7 +87,7 @@
-
- js_out.write(processed)
- import zlib
-- compressed = zlib.compress(processed)
-+ compressed = zlib.compress(processed.encode('utf-8'))
- data = ToCArray(compressed)
- c_out.write(HEADER_TEMPLATE % {
- 'sources_type': 'unsigned char',
---- firefox-52.9.0esr/build/mach_bootstrap.py.old 2018-06-29 23:00:39.000000000 +0000
-+++ firefox-52.9.0esr/build/mach_bootstrap.py 2018-07-26 00:41:17.740000000 +0000
-@@ -12,7 +12,7 @@
- import subprocess
- import sys
- import uuid
--import __builtin__
-+import builtins
-
- from types import ModuleType
-
-@@ -187,10 +187,10 @@
- # Ensure we are running Python 2.7+. We put this check here so we generate a
- # user-friendly error message rather than a cryptic stack trace on module
- # import.
-- if sys.version_info[0] != 2 or sys.version_info[1] < 7:
-- print('Python 2.7 or above (but not Python 3) is required to run mach.')
-- print('You are running Python', platform.python_version())
-- sys.exit(1)
-+ #if sys.version_info[0] != 2 or sys.version_info[1] < 7:
-+ # print('Python 2.7 or above (but not Python 3) is required to run mach.')
-+ # print('You are running Python', platform.python_version())
-+ # sys.exit(1)
-
- # Global build system and mach state is stored in a central directory. By
- # default, this is ~/.mozbuild. However, it can be defined via an
-@@ -410,4 +410,4 @@
-
-
- # Install our hook
--__builtin__.__import__ = ImportHook(__builtin__.__import__)
-+builtins.__import__ = ImportHook(builtins.__import__)
---- firefox-52.9.0esr/python/mach/mach/config.py (original)
-+++ firefox-52.9.0esr/python/mach/mach/config.py (refactored)
-@@ -163,7 +163,7 @@
- return func(*args, **kwargs)
- except KeyError:
- exc_class, exc, tb = sys.exc_info()
-- raise AttributeError().__class__, exc, tb
-+ raise AttributeError().__class__(exc).with_traceback(tb)
- return _
-
-
-@@ -357,7 +357,7 @@
- extra -- A dict of additional key/value pairs to add to the
- setting metadata.
- """
-- if isinstance(type_cls, basestring):
-+ if isinstance(type_cls, str_type):
- type_cls = TYPE_CLASSES[type_cls]
-
- meta = {
-@@ -397,10 +397,10 @@
- meta = self._format_metadata(provider, section, option, *setting[1:])
- config_settings[section][option] = meta
-
-- for section_name, settings in config_settings.items():
-+ for section_name, settings in list(config_settings.items()):
- section = self._settings.get(section_name, {})
-
-- for k, v in settings.items():
-+ for k, v in list(settings.items()):
- if k in section:
- raise ConfigException('Setting already registered: %s.%s' %
- section_name, k)
-@@ -432,7 +432,7 @@
- if self._finalized:
- return
-
-- for section, settings in self._settings.items():
-+ for section, settings in list(self._settings.items()):
- s = ConfigSettings.ConfigSection(self._config, section, settings)
- self._sections[section] = s
-
-@@ -445,7 +445,7 @@
- def __iter__(self):
- self._finalize()
-
-- return iter(self._sections.keys())
-+ return iter(list(self._sections.keys()))
-
- def __contains__(self, k):
- return k in self._settings
---- firefox-52.9.0esr/python/mach/mach/dispatcher.py (original)
-+++ firefox-52.9.0esr/python/mach/mach/dispatcher.py (refactored)
-@@ -243,7 +243,7 @@
- r = self._mach_registrar
- disabled_commands = []
-
-- cats = [(k, v[2]) for k, v in r.categories.items()]
-+ cats = [(k, v[2]) for k, v in list(r.categories.items())]
- sorted_cats = sorted(cats, key=itemgetter(1), reverse=True)
- for category, priority in sorted_cats:
- group = None
-@@ -375,7 +375,7 @@
- ' subcommand [subcommand arguments]'
- group = parser.add_argument_group('Sub Commands')
-
-- for subcommand, subhandler in sorted(handler.subcommand_handlers.iteritems()):
-+ for subcommand, subhandler in sorted(handler.subcommand_handlers.items()):
- group.add_argument(subcommand, help=subhandler.description,
- action='store_true')
-
-@@ -406,7 +406,7 @@
-
- def _suggest_command(self, command):
- # Make sure we don't suggest any deprecated commands.
-- names = [h.name for h in self._mach_registrar.command_handlers.values()
-+ names = [h.name for h in list(self._mach_registrar.command_handlers.values())
- if h.cls.__name__ != 'DeprecatedCommands']
- # We first try to look for a valid command that is very similar to the given command.
- suggested_commands = difflib.get_close_matches(command, names, cutoff=0.8)
-@@ -437,13 +437,13 @@
- if not docstring:
- return ''
- lines = docstring.expandtabs().splitlines()
-- indent = sys.maxint
-+ indent = sys.maxsize
- for line in lines[1:]:
- stripped = line.lstrip()
- if stripped:
- indent = min(indent, len(line) - len(stripped))
- trimmed = [lines[0].strip()]
-- if indent < sys.maxint:
-+ if indent < sys.maxsize:
- for line in lines[1:]:
- trimmed.append(line[indent:].rstrip())
- while trimmed and not trimmed[-1]:
---- firefox-52.9.0esr/python/mach/mach/main.py (original)
-+++ firefox-52.9.0esr/python/mach/mach/main.py (refactored)
-@@ -528,7 +528,7 @@
-
- machrc, .machrc
- """
-- if isinstance(paths, basestring):
-+ if isinstance(paths, str):
- paths = [paths]
-
- valid_names = ('machrc', '.machrc')
-@@ -541,8 +541,8 @@
- if os.path.isfile(path):
- return path
-
-- files = map(find_in_dir, self.settings_paths)
-- files = filter(bool, files)
-+ files = list(map(find_in_dir, self.settings_paths))
-+ files = list(filter(bool, files))
-
- self.settings.load_files(files)
-
---- firefox-52.9.0esr/python/mach/mach/registrar.py (original)
-+++ firefox-52.9.0esr/python/mach/mach/registrar.py (refactored)
-@@ -90,7 +90,7 @@
- result = fn(**kwargs)
-
- result = result or 0
-- assert isinstance(result, (int, long))
-+ assert isinstance(result, int)
-
- if context:
- postrun = getattr(context, 'post_dispatch_handler', None)
---- firefox-52.9.0esr/python/mach/mach/terminal.py (original)
-+++ firefox-52.9.0esr/python/mach/mach/terminal.py (refactored)
-@@ -59,7 +59,7 @@
- self.fh = sys.stdout
-
- def _clear_lines(self, n):
-- for i in xrange(n):
-+ for i in range(n):
- self.fh.write(self.t.move_x(0))
- self.fh.write(self.t.clear_eol())
- self.fh.write(self.t.move_up())
---- firefox-52.9.0esr/python/mach/mach/main.py.old 2018-07-26 00:55:29.330000000 +0000
-+++ firefox-52.9.0esr/python/mach/mach/main.py 2018-07-26 00:57:01.260000000 +0000
-@@ -256,9 +256,9 @@
- if module_name is None:
- # Ensure parent module is present otherwise we'll (likely) get
- # an error due to unknown parent.
-- if b'mach.commands' not in sys.modules:
-- mod = imp.new_module(b'mach.commands')
-- sys.modules[b'mach.commands'] = mod
-+ if 'mach.commands' not in sys.modules:
-+ mod = imp.new_module('mach.commands')
-+ sys.modules['mach.commands'] = mod
-
- module_name = 'mach.commands.%s' % uuid.uuid1().get_hex()
-
-@@ -347,7 +347,7 @@
- # is a TTY. This provides a mechanism to allow said processes to
- # enable emitting code codes, for example.
- if os.isatty(orig_stdout.fileno()):
-- os.environ[b'MACH_STDOUT_ISATTY'] = b'1'
-+ os.environ['MACH_STDOUT_ISATTY'] = '1'
-
- return self._run(argv)
- except KeyboardInterrupt:
---- firefox-52.9.0esr/toolkit/moz.configure.old 2017-04-11 02:13:23.000000000 +0000
-+++ firefox-52.9.0esr/toolkit/moz.configure 2018-07-26 05:32:08.590000000 +0000
-@@ -690,7 +690,7 @@
- # ==============================================================
- @depends(check_build_environment, '--help')
- @imports('os')
--@imports(_from='__builtin__', _import='sorted')
-+@imports(_from='builtins', _import='sorted')
- def all_necko_protocols(build_env, _):
- basedir = os.path.join(build_env.topsrcdir, 'netwerk', 'protocol')
- return tuple(sorted(p for p in os.listdir(basedir)
-@@ -744,7 +744,7 @@
- __sandbox__.set_define_impl(p, True)
-
- @depends('--enable-network-protocols')
--@imports(_from='__builtin__', _import='sorted')
-+@imports(_from='builtins', _import='sorted')
- def necko_protocols(protocols):
- return tuple(sorted(protocols))
-
---- firefox-52.9.0esr/build/moz.configure/pkg.configure.old 2017-04-11 02:13:08.000000000 +0000
-+++ firefox-52.9.0esr/build/moz.configure/pkg.configure 2018-07-26 05:36:10.990000000 +0000
-@@ -84,6 +84,8 @@
- @checking('%s_LIBS' % var, callback=lambda t: ' '.join(t))
- def pkg_libs(pkg_config, package_desc):
- libs = check_cmd_output(pkg_config, '--libs', package_desc)
-+ if isinstance(libs, bytes):
-+ libs = libs.decode('utf-8')
- # Remove evil flags like -Wl,--export-dynamic
- return tuple(libs.replace('-Wl,--export-dynamic', '').split())
-
---- firefox-52.9.0esr/build/moz.configure/pkg.configure.old 2018-07-26 05:37:14.580000000 +0000
-+++ firefox-52.9.0esr/build/moz.configure/pkg.configure 2018-07-26 05:38:48.750000000 +0000
-@@ -78,6 +78,8 @@
- @checking('%s_CFLAGS' % var, callback=lambda t: ' '.join(t))
- def pkg_cflags(pkg_config, package_desc):
- flags = check_cmd_output(pkg_config, '--cflags', package_desc)
-+ if isinstance(flags, bytes):
-+ flags = flags.decode('utf-8')
- return tuple(flags.split())
-
- @depends_when(pkg_config, package_desc, when=package)
---- firefox-52.9.0esr/build/subconfigure.py.old 2018-07-26 05:39:27.360000000 +0000
-+++ firefox-52.9.0esr/build/subconfigure.py 2018-07-26 09:58:41.110000000 +0000
-@@ -39,7 +39,7 @@
- class File(object):
- def __init__(self, path):
- self._path = path
-- self._content = open(path, 'rb').read()
-+ self._content = open(path, 'r').read()
- stat = os.stat(path)
- self._times = (stat.st_atime, stat.st_mtime)
-
-@@ -60,7 +60,7 @@
-
- modified = True
- if os.path.exists(self._path):
-- if open(self._path, 'rb').read() == self._content:
-+ if open(self._path, 'r').read() == self._content:
- modified = False
- self._modified = modified
- return modified
-@@ -221,7 +221,7 @@
- environ[var] = os.environ[var]
- args = data['args']
- else:
-- environ = os.environ
-+ environ = dict(os.environ)
-
- args, others = parser.parse_known_args(args)
-
-@@ -260,7 +260,7 @@
-
- def run(objdir):
- ret = 0
-- output = ''
-+ output = b''
-
- with open(os.path.join(objdir, CONFIGURE_DATA), 'rb') as f:
- data = pickle.load(f)
-@@ -381,7 +381,7 @@
- for f in contents:
- f.update_time()
-
-- return relobjdir, ret, output
-+ return relobjdir, ret, output.decode('utf-8')
-
-
- def subconfigure(args):
-@@ -395,9 +395,9 @@
- args, others = parser.parse_known_args(args)
- subconfigures = args.subconfigures
- if args.list:
-- subconfigures.extend(open(args.list, 'rb').read().splitlines())
-+ subconfigures.extend(open(args.list, 'r').read().splitlines())
- if args.skip:
-- skips = set(open(args.skip, 'rb').read().splitlines())
-+ skips = set(open(args.skip, 'r').read().splitlines())
- subconfigures = [s for s in subconfigures if s not in skips]
-
- if not subconfigures:
---- firefox-52.9.0esr/python/mozbuild/mozbuild/util.py.old 2018-07-26 10:43:58.540000000 +0000
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/util.py 2018-07-26 10:57:09.100000000 +0000
-@@ -1228,7 +1228,7 @@
- yield 'b'
- yield repr(o)
- elif isinstance(o, str):
-- yield "'"
-+ yield "'''"
- # We want a readable string (non escaped unicode), but some
- # special characters need escaping (e.g. \n, \t, etc.)
- for i, s in enumerate(_INDENTED_REPR_RE.split(o)):
-@@ -1237,7 +1237,7 @@
- yield _INDENTED_REPR_TABLE[c]
- else:
- yield s
-- yield "'"
-+ yield "'''"
- elif hasattr(o, '__iter__'):
- yield '[\n'
- for i in o:
---- firefox-52.9.0esr/python/mozbuild/mozbuild/configure/util.py.old 2018-07-26 10:43:58.540000000 +0000
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/configure/util.py 2018-07-26 10:49:10.780000000 +0000
-@@ -148,6 +148,8 @@
- self._stdout.flush()
- stream = self._stderr
- msg = '%s\n' % self.format(record)
-+ if isinstance(msg, bytes):
-+ msg = msg.decode('utf-8')
- stream.write(msg)
- stream.flush()
- except (KeyboardInterrupt, SystemExit):
---- firefox-52.9.0esr/python/mozbuild/mozbuild/configure/util.py.old 2018-07-26 10:58:24.910000000 +0000
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/configure/util.py 2018-07-26 11:08:15.430000000 +0000
-@@ -89,8 +89,8 @@
- return codecs.getwriter(encoding)(fh)
- return fh
-
-- self._stdout = fix_encoding(stdout)
-- self._stderr = fix_encoding(stderr) if stdout != stderr else self._stdout
-+ self._stdout = stdout
-+ self._stderr = stderr if stdout != stderr else self._stdout
- try:
- fd1 = self._stdout.fileno()
- fd2 = self._stderr.fileno()
-@@ -148,8 +148,6 @@
- self._stdout.flush()
- stream = self._stderr
- msg = '%s\n' % self.format(record)
-- if isinstance(msg, bytes):
-- msg = msg.decode('utf-8')
- stream.write(msg)
- stream.flush()
- except (KeyboardInterrupt, SystemExit):
---- firefox-52.9.0esr/build/mach_bootstrap.py.old 2018-07-26 10:58:24.910000000 +0000
-+++ firefox-52.9.0esr/build/mach_bootstrap.py 2018-07-26 11:09:30.620000000 +0000
-@@ -361,7 +361,7 @@
- self._modules = set()
-
- def __call__(self, name, globals=None, locals=None, fromlist=None,
-- level=-1):
-+ level=0):
- # name might be a relative import. Instead of figuring out what that
- # resolves to, which is complex, just rely on the real import.
- # Since we don't know the full module name, we can't check sys.modules,
---- firefox-52.9.0esr/python/mozbuild/mozbuild/configure/check_debug_ranges.py.old 2018-07-26 11:10:15.820000000 +0000
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/configure/check_debug_ranges.py 2018-07-26 11:14:51.180000000 +0000
-@@ -45,6 +45,7 @@
- def main(bin, compilation_unit):
- p = subprocess.Popen(['objdump', '-W', bin], stdout = subprocess.PIPE, stderr = subprocess.PIPE)
- (out, err) = p.communicate()
-+ out = out.decode('utf-8')
- sections = re.split('\n(Contents of the|The section) ', out)
- debug_info = [s for s in sections if s.startswith('.debug_info')]
- debug_ranges = [s for s in sections if s.startswith('.debug_ranges')]
---- firefox-52.9.0esr/python/mozbuild/mozbuild/configure/constants.py.old 2018-07-26 11:10:15.820000000 +0000
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/configure/constants.py 2018-07-26 11:18:03.750000000 +0000
-@@ -28,6 +28,7 @@
- )
-
- Kernel = EnumString.subclass(
-+ 'Android',
- 'Darwin',
- 'DragonFly',
- 'FreeBSD',
-@@ -90,6 +91,7 @@
- assert sorted(CPU_preprocessor_checks.keys()) == sorted(CPU.POSSIBLE_VALUES)
-
- kernel_preprocessor_checks = {
-+ 'Android': '__BIONIC__',
- 'Darwin': '__APPLE__',
- 'DragonFly': '__DragonFly__',
- 'FreeBSD': '__FreeBSD__',
---- firefox-52.9.0esr/python/mozbuild/mozbuild/configure/constants.py.old 2018-07-26 11:18:54.630000000 +0000
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/configure/constants.py 2018-07-26 23:46:48.880000000 +0000
-@@ -28,6 +28,7 @@
- )
-
- Kernel = EnumString.subclass(
-+ 'AIX',
- 'Android',
- 'Darwin',
- 'DragonFly',
-@@ -91,6 +92,7 @@
- assert sorted(CPU_preprocessor_checks.keys()) == sorted(CPU.POSSIBLE_VALUES)
-
- kernel_preprocessor_checks = {
-+ 'AIX': '_AIX',
- 'Android': '__BIONIC__',
- 'Darwin': '__APPLE__',
- 'DragonFly': '__DragonFly__',
---- firefox-52.9.0esr/python/mozbuild/mozbuild/configure/constants.py.old 2018-07-26 23:47:39.060000000 +0000
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/configure/constants.py 2018-07-26 23:53:25.260000000 +0000
-@@ -37,6 +37,8 @@
- 'Linux',
- 'NetBSD',
- 'OpenBSD',
-+ 'SunOS',
-+ 'HP-UX',
- 'WINNT',
- )
-
-@@ -93,14 +94,16 @@
-
- kernel_preprocessor_checks = {
- 'AIX': '_AIX',
-- 'Android': '__BIONIC__',
-+ 'Android': '__ANDROID__',
- 'Darwin': '__APPLE__',
- 'DragonFly': '__DragonFly__',
- 'FreeBSD': '__FreeBSD__',
-+ 'HP-UX': '_hpux',
- 'kFreeBSD': '__FreeBSD_kernel__',
- 'Linux': '__linux__',
- 'NetBSD': '__NetBSD__',
- 'OpenBSD': '__OpenBSD__',
-+ 'SunOS': '__sun || sun',
- 'WINNT': '_WIN32 || __CYGWIN__',
- }
-
---- firefox-52.9.0esr/python/mozbuild/mozbuild/configure/constants.py.old 2018-07-26 23:55:19.000000000 +0000
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/configure/constants.py 2018-07-26 23:58:36.750000000 +0000
-@@ -33,12 +33,15 @@
- 'Darwin',
- 'DragonFly',
- 'FreeBSD',
-+ 'GNU',
-+ 'GNU/kFreeBSD',
-+ 'GNU_kFreeBSD',
-+ 'HP-UX',
- 'kFreeBSD',
- 'Linux',
- 'NetBSD',
- 'OpenBSD',
- 'SunOS',
-- 'HP-UX',
- 'WINNT',
- )
-
-@@ -99,6 +102,9 @@
- 'Darwin': '__APPLE__',
- 'DragonFly': '__DragonFly__',
- 'FreeBSD': '__FreeBSD__',
-+ 'GNU': '__gnu_hurd__',
-+ 'GNU/kFreeBSD': '__FreeBSD_kernel_ && __GLIBC__',
-+ 'GNU_kFreeBSD': '__FreeBSD_kernel_ && __GLIBC__',
- 'HP-UX': '_hpux',
- 'kFreeBSD': '__FreeBSD_kernel__',
- 'Linux': '__linux__',
---- firefox-52.9.0esr/testing/mozbase/manifestparser/manifestparser/ini.py.old 2018-07-26 23:55:18.990000000 +0000
-+++ firefox-52.9.0esr/testing/mozbase/manifestparser/manifestparser/ini.py 2018-07-27 00:04:47.460000000 +0000
-@@ -33,7 +33,7 @@
- # read the lines
- for (linenum, line) in enumerate(fp.read().splitlines(), start=1):
-
-- stripped = line.strip()
-+ stripped = line.strip().decode('utf-8')
-
- # ignore blank lines
- if not stripped:
---- firefox-52.9.0esr/testing/mozbase/manifestparser/manifestparser/ini.py.old 2018-07-27 00:09:00.850000000 +0000
-+++ firefox-52.9.0esr/testing/mozbase/manifestparser/manifestparser/ini.py 2018-07-27 00:12:03.920000000 +0000
-@@ -31,9 +31,9 @@
- fp = open(fp)
-
- # read the lines
-- for (linenum, line) in enumerate(fp.read().splitlines(), start=1):
-+ for (linenum, line) in enumerate(fp.read().decode('utf-8').splitlines(), start=1):
-
-- stripped = line.strip().decode('utf-8')
-+ stripped = line.strip()
-
- # ignore blank lines
- if not stripped:
---- firefox-52.9.0esr/python/mozbuild/mozbuild/frontend/sandbox.py.old 2018-07-27 00:12:52.240000000 +0000
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/frontend/sandbox.py 2018-07-27 00:18:00.010000000 +0000
-@@ -39,7 +39,8 @@
- """sorted() replacement for the sandbox, ordering alphabetically by
- default.
- """
-- return sorted(iterable, cmp, key, reverse)
-+ ### XXX what do we do with cmp?
-+ return sorted(iterable, key=key, reverse=reverse)
-
-
- class SandboxError(Exception):
---- firefox-52.9.0esr/python/mozbuild/mozbuild/frontend/emitter.py.old 2018-07-27 00:32:50.870000000 +0000
-+++ firefox-52.9.0esr/python/mozbuild/mozbuild/frontend/emitter.py 2018-07-27 00:32:28.770000000 +0000
-@@ -1399,7 +1399,8 @@
- # declared anywhere (they were discovered). This will detect people
- # relying on the old behavior.
- if os.path.exists(os.path.join(context.srcdir, 'jar.mn')):
-- if 'jar.mn' not in jar_manifests:
-+ if 'jar.mn' not in jar_manifests and \
-+ SourcePath(context, 'jar.mn') not in jar_manifests:
- raise SandboxValidationError('A jar.mn exists but it '
- 'is not referenced in the moz.build file. '
- 'Please define JAR_MANIFESTS.', context)
diff --git a/experimental/firefox/fix-bug-1261392.patch b/experimental/firefox/fix-bug-1261392.patch
deleted file mode 100644
index fa40914d6..000000000
--- a/experimental/firefox/fix-bug-1261392.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- a/tools/profiler/core/platform.h 2017-05-27 11:44:06.733119794 +0000
-+++ b/tools/profiler/core/platform.h 2017-05-27 11:46:16.004253520 +0000
-@@ -54,10 +54,11 @@
- #include <vector>
- #include "StackTop.h"
-
--// We need a definition of gettid(), but old glibc versions don't provide a
--// wrapper for it.
--#if defined(__GLIBC__)
-+// We need a definition of gettid(), but Linux libc implementations don't
-+// provide a wrapper for it (except for Bionic)
-+#if defined(__linux__)
- # include <unistd.h>
-+#if !defined(__BIONIC__)
- # include <sys/syscall.h>
- # define gettid() static_cast<pid_t>(syscall(SYS_gettid))
-+#endif
-@@ -71,6 +72,7 @@
- return (pid_t) syscall(SYS_thread_selfid);
- }
- #endif
-+#endif
-
- #ifdef XP_WIN
- #include <windows.h>
diff --git a/experimental/gwenhywfar/APKBUILD b/experimental/gwenhywfar/APKBUILD
index 3ec3fee13..2b56970e9 100644
--- a/experimental/gwenhywfar/APKBUILD
+++ b/experimental/gwenhywfar/APKBUILD
@@ -12,7 +12,7 @@ depends_dev="qt5-qtbase-dev"
makedepends="$depends_dev gnutls-dev libgcrypt-dev libgpg-error-dev
cmd:which gtk+2.0-dev"
subpackages="$pkgname-dev $pkgname-gtk2 $pkgname-qt5"
-source="gwenhywfar-$pkgver.tar.gz::https://www.aquamaniac.de/sites/download/download.php?package=01&release=208&file=02&dummy=gwenhywfar-$pkgver.tar.gz"
+source="gwenhywfar-$pkgver.tar.gz::https://www.aquamaniac.de/rdm/attachments/download/304/$pkgname-$pkgver.tar.gz"
build() {
cd "$builddir"
diff --git a/experimental/hexchat/APKBUILD b/experimental/hexchat/APKBUILD
deleted file mode 100644
index 29119ddfb..000000000
--- a/experimental/hexchat/APKBUILD
+++ /dev/null
@@ -1,57 +0,0 @@
-# Maintainer:
-pkgname=hexchat
-pkgver=2.14.1
-pkgrel=0
-pkgdesc="Popular and easy to use graphical IRC (chat) client"
-url="https://hexchat.github.io"
-arch="all"
-license="GPL-2.0+"
-depends=""
-makedepends="dbus-glib-dev glib-dev gtk+2.0-dev iso-codes-dev libcanberra-dev
- libnotify-dev libproxy-dev libsexy-dev meson ninja openssl-dev
- perl-dev pciutils-dev python3-dev"
-subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-perl:_perl
- $pkgname-py:_python"
-source="https://dl.hexchat.net/hexchat/hexchat-$pkgver.tar.xz"
-
-prepare() {
- cd "$builddir"
- default_prepare
- mkdir -p _build
-}
-
-build() {
- cd "$builddir"/_build
- meson -Dprefix=/usr -Dwith-lua=false
- ninja
-}
-
-check() {
- cd "$builddir"/_build
- ninja test
-}
-
-package() {
- cd "$builddir"/_build
- DESTDIR="$pkgdir" ninja install
-}
-
-_perl() {
- pkgdesc="Perl plugin for HexChat"
- depends="$pkgname=$pkgver-r$pkgrel"
- install_if="$pkgname=$pkgver-r$pkgrel perl"
- mkdir -p "$subpkgdir"/usr/lib/hexchat/plugins
- mv "$pkgdir"/usr/lib/hexchat/plugins/perl.so \
- "$subpkgdir"/usr/lib/hexchat/plugins
-}
-
-_python() {
- pkgdesc="Python plugin for HexChat"
- depends="$pkgname=$pkgver-r$pkgrel"
- install_if="$pkgname=$pkgver-r$pkgrel perl3"
- mkdir -p "$subpkgdir"/usr/lib/hexchat/plugins
- mv "$pkgdir"/usr/lib/hexchat/plugins/python.so \
- "$subpkgdir"/usr/lib/hexchat/plugins
-}
-
-sha512sums="2728d6f084530c1a65ddb7960db6574fef2bca77e726a2155c8b5724256f37b47421e990b1bf7c9fad7987027b2f6de4534a8df28a98cb3d28da726e16ac32dd hexchat-2.14.1.tar.xz"
diff --git a/experimental/libffcall/APKBUILD b/experimental/libffcall/APKBUILD
new file mode 100644
index 000000000..f3bc87e30
--- /dev/null
+++ b/experimental/libffcall/APKBUILD
@@ -0,0 +1,70 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Contributor: Will Sinatra <wpsinatra@gmail.com>
+# Maintainer: Lee Starnes <lee@canned-death.us>
+pkgname=libffcall
+pkgver=2.4
+pkgrel=0
+pkgdesc="C library for implementing foreign function calls in embedded interpreters"
+url="https://www.gnu.org/software/libffcall"
+arch="all"
+license="GPL-2.0+"
+depends=""
+makedepends=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="https://ftp.gnu.org/gnu/libffcall/libffcall-$pkgver.tar.gz
+ ppc64.patch
+ "
+
+prepare() {
+ default_prepare
+ case "${CARCH}" in
+ ppc64)
+ # C sources are patched, bundled .S need to be regenerated;
+ # recipes for *-powerpc64-elfv2-linux.S from Makefile.devel
+ temp=$(mktemp)
+ comm="-D__powerpc64__ -D__powerpc64_elfv2__ -O2 -fno-omit-frame-pointer -o ${temp}"
+ nxst="../common/noexecstack.h"
+
+ flag="${comm} -I.. -I../dummy"
+ for k in avcall vacall; do
+ cd ${k}
+ gcc ${flag} -S ${k}-powerpc64.c
+ cat ${temp} ${nxst} > ${k}-powerpc64-elfv2-linux.S
+ cd -
+ done
+
+ flag="${comm} -I. -I../.. -I../../dummy -fPIC -DREENTRANT"
+ cd callback/vacall_r
+ gcc ${flag} -S ../../vacall/vacall-powerpc64.c
+ cat ${temp} ../${nxst} > vacall-powerpc64-elfv2-linux.S
+ cd -
+
+ rm ${temp}
+ ;;
+ esac
+}
+
+build() {
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var
+ # Fails to build if building in parallel
+ make -j1
+}
+
+check() {
+ make check
+}
+
+package() {
+ make DESTDIR="$pkgdir" htmldir=/usr/share/doc/ffcall install
+
+}
+
+sha512sums="c9451662764a888e3be21499c29673bfb0e1df4915814da3506db5d395a2b00ea2f0c08d1c9dffebf030179f9347794876ec6ec9e6710b4fc70fd760960335e6 libffcall-2.4.tar.gz
+7360a5bdea23dec4a84f9653e96540dcccfcce1214899c421ad66760aeffa6223eb1a2d9011a1e0cddb1027b90242518e37c45b12625f8ff9a276e181db278d3 ppc64.patch"
diff --git a/experimental/libffcall/ppc64.patch b/experimental/libffcall/ppc64.patch
new file mode 100644
index 000000000..e7da43899
--- /dev/null
+++ b/experimental/libffcall/ppc64.patch
@@ -0,0 +1,371 @@
+Changed from 2.2/2.3 --> 2.4:
+
+ * sed -i ppc64.patch -e 's/vaword/varword/g'
+ * remove all assembly
+
+--- libffcall-2.2/avcall/avcall-powerpc64.c.old 2018-09-17 16:47:43.000000000 +0000
++++ libffcall-2.2/avcall/avcall-powerpc64.c 2020-05-11 23:06:57.534813743 +0000
+@@ -181,111 +181,111 @@
+ /* In the ELFv2 ABI, gcc returns structs of size <= 16 in registers. */
+ if (l->rsize > 0 && l->rsize <= 16) {
+ void* raddr = l->raddr;
+- #if 0 /* Unoptimized */
++ #if 1 /* Unoptimized */
+ if (l->rsize == 1) {
+ ((unsigned char *)raddr)[0] = (unsigned char)(iret);
+ } else
+ if (l->rsize == 2) {
+- ((unsigned char *)raddr)[0] = (unsigned char)(iret);
+- ((unsigned char *)raddr)[1] = (unsigned char)(iret>>8);
++ ((unsigned char *)raddr)[1] = (unsigned char)(iret);
++ ((unsigned char *)raddr)[0] = (unsigned char)(iret>>8);
+ } else
+ if (l->rsize == 3) {
+- ((unsigned char *)raddr)[0] = (unsigned char)(iret);
++ ((unsigned char *)raddr)[2] = (unsigned char)(iret);
+ ((unsigned char *)raddr)[1] = (unsigned char)(iret>>8);
+- ((unsigned char *)raddr)[2] = (unsigned char)(iret>>16);
++ ((unsigned char *)raddr)[0] = (unsigned char)(iret>>16);
+ } else
+ if (l->rsize == 4) {
+- ((unsigned char *)raddr)[0] = (unsigned char)(iret);
+- ((unsigned char *)raddr)[1] = (unsigned char)(iret>>8);
+- ((unsigned char *)raddr)[2] = (unsigned char)(iret>>16);
+- ((unsigned char *)raddr)[3] = (unsigned char)(iret>>24);
++ ((unsigned char *)raddr)[3] = (unsigned char)(iret);
++ ((unsigned char *)raddr)[2] = (unsigned char)(iret>>8);
++ ((unsigned char *)raddr)[1] = (unsigned char)(iret>>16);
++ ((unsigned char *)raddr)[0] = (unsigned char)(iret>>24);
+ } else
+ if (l->rsize == 5) {
+- ((unsigned char *)raddr)[0] = (unsigned char)(iret);
+- ((unsigned char *)raddr)[1] = (unsigned char)(iret>>8);
++ ((unsigned char *)raddr)[4] = (unsigned char)(iret);
++ ((unsigned char *)raddr)[3] = (unsigned char)(iret>>8);
+ ((unsigned char *)raddr)[2] = (unsigned char)(iret>>16);
+- ((unsigned char *)raddr)[3] = (unsigned char)(iret>>24);
+- ((unsigned char *)raddr)[4] = (unsigned char)(iret>>32);
++ ((unsigned char *)raddr)[1] = (unsigned char)(iret>>24);
++ ((unsigned char *)raddr)[0] = (unsigned char)(iret>>32);
+ } else
+ if (l->rsize == 6) {
+- ((unsigned char *)raddr)[0] = (unsigned char)(iret);
+- ((unsigned char *)raddr)[1] = (unsigned char)(iret>>8);
+- ((unsigned char *)raddr)[2] = (unsigned char)(iret>>16);
+- ((unsigned char *)raddr)[3] = (unsigned char)(iret>>24);
+- ((unsigned char *)raddr)[4] = (unsigned char)(iret>>32);
+- ((unsigned char *)raddr)[5] = (unsigned char)(iret>>40);
++ ((unsigned char *)raddr)[5] = (unsigned char)(iret);
++ ((unsigned char *)raddr)[4] = (unsigned char)(iret>>8);
++ ((unsigned char *)raddr)[3] = (unsigned char)(iret>>16);
++ ((unsigned char *)raddr)[2] = (unsigned char)(iret>>24);
++ ((unsigned char *)raddr)[1] = (unsigned char)(iret>>32);
++ ((unsigned char *)raddr)[0] = (unsigned char)(iret>>40);
+ } else
+ if (l->rsize == 7) {
+- ((unsigned char *)raddr)[0] = (unsigned char)(iret);
+- ((unsigned char *)raddr)[1] = (unsigned char)(iret>>8);
+- ((unsigned char *)raddr)[2] = (unsigned char)(iret>>16);
++ ((unsigned char *)raddr)[6] = (unsigned char)(iret);
++ ((unsigned char *)raddr)[5] = (unsigned char)(iret>>8);
++ ((unsigned char *)raddr)[4] = (unsigned char)(iret>>16);
+ ((unsigned char *)raddr)[3] = (unsigned char)(iret>>24);
+- ((unsigned char *)raddr)[4] = (unsigned char)(iret>>32);
+- ((unsigned char *)raddr)[5] = (unsigned char)(iret>>40);
+- ((unsigned char *)raddr)[6] = (unsigned char)(iret>>48);
++ ((unsigned char *)raddr)[2] = (unsigned char)(iret>>32);
++ ((unsigned char *)raddr)[1] = (unsigned char)(iret>>40);
++ ((unsigned char *)raddr)[0] = (unsigned char)(iret>>48);
+ } else
+ if (l->rsize >= 8 && l->rsize <= 16) {
+- ((unsigned char *)raddr)[0] = (unsigned char)(iret);
+- ((unsigned char *)raddr)[1] = (unsigned char)(iret>>8);
+- ((unsigned char *)raddr)[2] = (unsigned char)(iret>>16);
+- ((unsigned char *)raddr)[3] = (unsigned char)(iret>>24);
+- ((unsigned char *)raddr)[4] = (unsigned char)(iret>>32);
+- ((unsigned char *)raddr)[5] = (unsigned char)(iret>>40);
+- ((unsigned char *)raddr)[6] = (unsigned char)(iret>>48);
+- ((unsigned char *)raddr)[7] = (unsigned char)(iret>>56);
++ ((unsigned char *)raddr)[7] = (unsigned char)(iret);
++ ((unsigned char *)raddr)[6] = (unsigned char)(iret>>8);
++ ((unsigned char *)raddr)[5] = (unsigned char)(iret>>16);
++ ((unsigned char *)raddr)[4] = (unsigned char)(iret>>24);
++ ((unsigned char *)raddr)[3] = (unsigned char)(iret>>32);
++ ((unsigned char *)raddr)[2] = (unsigned char)(iret>>40);
++ ((unsigned char *)raddr)[1] = (unsigned char)(iret>>48);
++ ((unsigned char *)raddr)[0] = (unsigned char)(iret>>56);
+ if (l->rsize == 8) {
+ } else
+ if (l->rsize == 9) {
+- ((unsigned char *)raddr)[8+0] = (unsigned char)(iret2);
++ ((unsigned char *)raddr)[8+0] = (unsigned char)(iret2>>56);
+ } else
+ if (l->rsize == 10) {
+- ((unsigned char *)raddr)[8+0] = (unsigned char)(iret2);
+- ((unsigned char *)raddr)[8+1] = (unsigned char)(iret2>>8);
++ ((unsigned char *)raddr)[8+0] = (unsigned char)(iret2>>56);
++ ((unsigned char *)raddr)[8+1] = (unsigned char)(iret2>>48);
+ } else
+ if (l->rsize == 11) {
+- ((unsigned char *)raddr)[8+0] = (unsigned char)(iret2);
+- ((unsigned char *)raddr)[8+1] = (unsigned char)(iret2>>8);
+- ((unsigned char *)raddr)[8+2] = (unsigned char)(iret2>>16);
++ ((unsigned char *)raddr)[8+0] = (unsigned char)(iret2>>56);
++ ((unsigned char *)raddr)[8+1] = (unsigned char)(iret2>>48);
++ ((unsigned char *)raddr)[8+2] = (unsigned char)(iret2>>40);
+ } else
+ if (l->rsize == 12) {
+- ((unsigned char *)raddr)[8+0] = (unsigned char)(iret2);
+- ((unsigned char *)raddr)[8+1] = (unsigned char)(iret2>>8);
+- ((unsigned char *)raddr)[8+2] = (unsigned char)(iret2>>16);
+- ((unsigned char *)raddr)[8+3] = (unsigned char)(iret2>>24);
++ ((unsigned char *)raddr)[8+0] = (unsigned char)(iret2>>56);
++ ((unsigned char *)raddr)[8+1] = (unsigned char)(iret2>>48);
++ ((unsigned char *)raddr)[8+2] = (unsigned char)(iret2>>40);
++ ((unsigned char *)raddr)[8+3] = (unsigned char)(iret2>>32);
+ } else
+ if (l->rsize == 13) {
+- ((unsigned char *)raddr)[8+0] = (unsigned char)(iret2);
+- ((unsigned char *)raddr)[8+1] = (unsigned char)(iret2>>8);
+- ((unsigned char *)raddr)[8+2] = (unsigned char)(iret2>>16);
+- ((unsigned char *)raddr)[8+3] = (unsigned char)(iret2>>24);
+- ((unsigned char *)raddr)[8+4] = (unsigned char)(iret2>>32);
++ ((unsigned char *)raddr)[8+0] = (unsigned char)(iret2>>56);
++ ((unsigned char *)raddr)[8+1] = (unsigned char)(iret2>>48);
++ ((unsigned char *)raddr)[8+2] = (unsigned char)(iret2>>40);
++ ((unsigned char *)raddr)[8+3] = (unsigned char)(iret2>>32);
++ ((unsigned char *)raddr)[8+4] = (unsigned char)(iret2>>24);
+ } else
+ if (l->rsize == 14) {
+- ((unsigned char *)raddr)[8+0] = (unsigned char)(iret2);
+- ((unsigned char *)raddr)[8+1] = (unsigned char)(iret2>>8);
+- ((unsigned char *)raddr)[8+2] = (unsigned char)(iret2>>16);
+- ((unsigned char *)raddr)[8+3] = (unsigned char)(iret2>>24);
+- ((unsigned char *)raddr)[8+4] = (unsigned char)(iret2>>32);
+- ((unsigned char *)raddr)[8+5] = (unsigned char)(iret2>>40);
++ ((unsigned char *)raddr)[8+0] = (unsigned char)(iret2>>56);
++ ((unsigned char *)raddr)[8+1] = (unsigned char)(iret2>>48);
++ ((unsigned char *)raddr)[8+2] = (unsigned char)(iret2>>40);
++ ((unsigned char *)raddr)[8+3] = (unsigned char)(iret2>>32);
++ ((unsigned char *)raddr)[8+4] = (unsigned char)(iret2>>24);
++ ((unsigned char *)raddr)[8+5] = (unsigned char)(iret2>>16);
+ } else
+ if (l->rsize == 15) {
+- ((unsigned char *)raddr)[8+0] = (unsigned char)(iret2);
+- ((unsigned char *)raddr)[8+1] = (unsigned char)(iret2>>8);
+- ((unsigned char *)raddr)[8+2] = (unsigned char)(iret2>>16);
+- ((unsigned char *)raddr)[8+3] = (unsigned char)(iret2>>24);
+- ((unsigned char *)raddr)[8+4] = (unsigned char)(iret2>>32);
+- ((unsigned char *)raddr)[8+5] = (unsigned char)(iret2>>40);
+- ((unsigned char *)raddr)[8+6] = (unsigned char)(iret2>>48);
++ ((unsigned char *)raddr)[8+0] = (unsigned char)(iret2>>56);
++ ((unsigned char *)raddr)[8+1] = (unsigned char)(iret2>>48);
++ ((unsigned char *)raddr)[8+2] = (unsigned char)(iret2>>40);
++ ((unsigned char *)raddr)[8+3] = (unsigned char)(iret2>>32);
++ ((unsigned char *)raddr)[8+4] = (unsigned char)(iret2>>24);
++ ((unsigned char *)raddr)[8+5] = (unsigned char)(iret2>>16);
++ ((unsigned char *)raddr)[8+6] = (unsigned char)(iret2>>8);
+ } else
+ if (l->rsize == 16) {
+- ((unsigned char *)raddr)[8+0] = (unsigned char)(iret2);
+- ((unsigned char *)raddr)[8+1] = (unsigned char)(iret2>>8);
+- ((unsigned char *)raddr)[8+2] = (unsigned char)(iret2>>16);
+- ((unsigned char *)raddr)[8+3] = (unsigned char)(iret2>>24);
+- ((unsigned char *)raddr)[8+4] = (unsigned char)(iret2>>32);
+- ((unsigned char *)raddr)[8+5] = (unsigned char)(iret2>>40);
+- ((unsigned char *)raddr)[8+6] = (unsigned char)(iret2>>48);
+- ((unsigned char *)raddr)[8+7] = (unsigned char)(iret2>>56);
++ ((unsigned char *)raddr)[8+0] = (unsigned char)(iret2>>56);
++ ((unsigned char *)raddr)[8+1] = (unsigned char)(iret2>>48);
++ ((unsigned char *)raddr)[8+2] = (unsigned char)(iret2>>40);
++ ((unsigned char *)raddr)[8+3] = (unsigned char)(iret2>>32);
++ ((unsigned char *)raddr)[8+4] = (unsigned char)(iret2>>24);
++ ((unsigned char *)raddr)[8+5] = (unsigned char)(iret2>>16);
++ ((unsigned char *)raddr)[8+6] = (unsigned char)(iret2>>8);
++ ((unsigned char *)raddr)[8+7] = (unsigned char)(iret2);
+ }
+ }
+ #else /* Optimized: fewer conditional jumps, fewer memory accesses */
+--- libffcall-2.2/vacall/vacall-powerpc64.c.old 2020-05-11 23:11:15.566571148 +0000
++++ libffcall-2.2/vacall/vacall-powerpc64.c 2020-05-11 23:16:52.489693582 +0000
+@@ -140,111 +140,111 @@
+ if (list.flags & __VA_REGISTER_STRUCT_RETURN) {
+ /* In the ELFv2 ABI, gcc returns structs of size <= 16 in registers. */
+ if (list.rsize > 0 && list.rsize <= 16) {
+- #if 0 /* Unoptimized */
++ #if 1 /* Unoptimized */
+ if (list.rsize == 1) {
+ iret = (__varword)((unsigned char *) list.raddr)[0];
+ } else
+ if (list.rsize == 2) {
+- iret = ((__varword)((unsigned char *) list.raddr)[0])
+- | ((__varword)((unsigned char *) list.raddr)[1] << 8);
++ iret = ((__varword)((unsigned char *) list.raddr)[1])
++ | ((__varword)((unsigned char *) list.raddr)[0] << 8);
+ } else
+ if (list.rsize == 3) {
+- iret = ((__varword)((unsigned char *) list.raddr)[0])
++ iret = ((__varword)((unsigned char *) list.raddr)[2])
+ | ((__varword)((unsigned char *) list.raddr)[1] << 8)
+- | ((__varword)((unsigned char *) list.raddr)[2] << 16);
++ | ((__varword)((unsigned char *) list.raddr)[0] << 16);
+ } else
+ if (list.rsize == 4) {
+- iret = ((__varword)((unsigned char *) list.raddr)[0])
+- | ((__varword)((unsigned char *) list.raddr)[1] << 8)
+- | ((__varword)((unsigned char *) list.raddr)[2] << 16)
+- | ((__varword)((unsigned char *) list.raddr)[3] << 24);
++ iret = ((__varword)((unsigned char *) list.raddr)[3])
++ | ((__varword)((unsigned char *) list.raddr)[2] << 8)
++ | ((__varword)((unsigned char *) list.raddr)[1] << 16)
++ | ((__varword)((unsigned char *) list.raddr)[0] << 24);
+ } else
+ if (list.rsize == 5) {
+- iret = ((__varword)((unsigned char *) list.raddr)[0])
+- | ((__varword)((unsigned char *) list.raddr)[1] << 8)
++ iret = ((__varword)((unsigned char *) list.raddr)[4])
++ | ((__varword)((unsigned char *) list.raddr)[3] << 8)
+ | ((__varword)((unsigned char *) list.raddr)[2] << 16)
+- | ((__varword)((unsigned char *) list.raddr)[3] << 24)
+- | ((__varword)((unsigned char *) list.raddr)[4] << 32);
++ | ((__varword)((unsigned char *) list.raddr)[1] << 24)
++ | ((__varword)((unsigned char *) list.raddr)[0] << 32);
+ } else
+ if (list.rsize == 6) {
+- iret = ((__varword)((unsigned char *) list.raddr)[0])
+- | ((__varword)((unsigned char *) list.raddr)[1] << 8)
+- | ((__varword)((unsigned char *) list.raddr)[2] << 16)
+- | ((__varword)((unsigned char *) list.raddr)[3] << 24)
+- | ((__varword)((unsigned char *) list.raddr)[4] << 32)
+- | ((__varword)((unsigned char *) list.raddr)[5] << 40);
++ iret = ((__varword)((unsigned char *) list.raddr)[5])
++ | ((__varword)((unsigned char *) list.raddr)[4] << 8)
++ | ((__varword)((unsigned char *) list.raddr)[3] << 16)
++ | ((__varword)((unsigned char *) list.raddr)[2] << 24)
++ | ((__varword)((unsigned char *) list.raddr)[1] << 32)
++ | ((__varword)((unsigned char *) list.raddr)[0] << 40);
+ } else
+ if (list.rsize == 7) {
+- iret = ((__varword)((unsigned char *) list.raddr)[0])
+- | ((__varword)((unsigned char *) list.raddr)[1] << 8)
+- | ((__varword)((unsigned char *) list.raddr)[2] << 16)
++ iret = ((__varword)((unsigned char *) list.raddr)[6])
++ | ((__varword)((unsigned char *) list.raddr)[5] << 8)
++ | ((__varword)((unsigned char *) list.raddr)[4] << 16)
+ | ((__varword)((unsigned char *) list.raddr)[3] << 24)
+- | ((__varword)((unsigned char *) list.raddr)[4] << 32)
+- | ((__varword)((unsigned char *) list.raddr)[5] << 40)
+- | ((__varword)((unsigned char *) list.raddr)[6] << 48);
++ | ((__varword)((unsigned char *) list.raddr)[2] << 32)
++ | ((__varword)((unsigned char *) list.raddr)[1] << 40)
++ | ((__varword)((unsigned char *) list.raddr)[0] << 48);
+ } else
+ if (list.rsize >= 8 && list.rsize <= 16) {
+- iret = ((__varword)((unsigned char *) list.raddr)[0])
+- | ((__varword)((unsigned char *) list.raddr)[1] << 8)
+- | ((__varword)((unsigned char *) list.raddr)[2] << 16)
+- | ((__varword)((unsigned char *) list.raddr)[3] << 24)
+- | ((__varword)((unsigned char *) list.raddr)[4] << 32)
+- | ((__varword)((unsigned char *) list.raddr)[5] << 40)
+- | ((__varword)((unsigned char *) list.raddr)[6] << 48)
+- | ((__varword)((unsigned char *) list.raddr)[7] << 56);
++ iret = ((__varword)((unsigned char *) list.raddr)[7])
++ | ((__varword)((unsigned char *) list.raddr)[6] << 8)
++ | ((__varword)((unsigned char *) list.raddr)[5] << 16)
++ | ((__varword)((unsigned char *) list.raddr)[4] << 24)
++ | ((__varword)((unsigned char *) list.raddr)[3] << 32)
++ | ((__varword)((unsigned char *) list.raddr)[2] << 40)
++ | ((__varword)((unsigned char *) list.raddr)[1] << 48)
++ | ((__varword)((unsigned char *) list.raddr)[0] << 56);
+ if (list.rsize == 8) {
+ } else
+ if (list.rsize == 9) {
+- iret2 = (__varword)((unsigned char *) list.raddr)[8];
++ iret2 = (__varword)((unsigned char *) list.raddr)[8] << 56;
+ } else
+ if (list.rsize == 10) {
+- iret2 = ((__varword)((unsigned char *) list.raddr)[8])
+- | ((__varword)((unsigned char *) list.raddr)[9] << 8);
++ iret2 = ((__varword)((unsigned char *) list.raddr)[8] << 56)
++ | ((__varword)((unsigned char *) list.raddr)[9] << 48);
+ } else
+ if (list.rsize == 11) {
+- iret2 = ((__varword)((unsigned char *) list.raddr)[8])
+- | ((__varword)((unsigned char *) list.raddr)[9] << 8)
+- | ((__varword)((unsigned char *) list.raddr)[10] << 16);
++ iret2 = ((__varword)((unsigned char *) list.raddr)[8] << 56)
++ | ((__varword)((unsigned char *) list.raddr)[9] << 48)
++ | ((__varword)((unsigned char *) list.raddr)[10] << 40);
+ } else
+ if (list.rsize == 12) {
+- iret2 = ((__varword)((unsigned char *) list.raddr)[8])
+- | ((__varword)((unsigned char *) list.raddr)[9] << 8)
+- | ((__varword)((unsigned char *) list.raddr)[10] << 16)
+- | ((__varword)((unsigned char *) list.raddr)[11] << 24);
++ iret2 = ((__varword)((unsigned char *) list.raddr)[8] << 56)
++ | ((__varword)((unsigned char *) list.raddr)[9] << 48)
++ | ((__varword)((unsigned char *) list.raddr)[10] << 40)
++ | ((__varword)((unsigned char *) list.raddr)[11] << 32);
+ } else
+ if (list.rsize == 13) {
+- iret2 = ((__varword)((unsigned char *) list.raddr)[8])
+- | ((__varword)((unsigned char *) list.raddr)[9] << 8)
+- | ((__varword)((unsigned char *) list.raddr)[10] << 16)
+- | ((__varword)((unsigned char *) list.raddr)[11] << 24)
+- | ((__varword)((unsigned char *) list.raddr)[12] << 32);
++ iret2 = ((__varword)((unsigned char *) list.raddr)[8] << 56)
++ | ((__varword)((unsigned char *) list.raddr)[9] << 48)
++ | ((__varword)((unsigned char *) list.raddr)[10] << 40)
++ | ((__varword)((unsigned char *) list.raddr)[11] << 32)
++ | ((__varword)((unsigned char *) list.raddr)[12] << 24);
+ } else
+ if (list.rsize == 14) {
+- iret2 = ((__varword)((unsigned char *) list.raddr)[8])
+- | ((__varword)((unsigned char *) list.raddr)[9] << 8)
+- | ((__varword)((unsigned char *) list.raddr)[10] << 16)
+- | ((__varword)((unsigned char *) list.raddr)[11] << 24)
+- | ((__varword)((unsigned char *) list.raddr)[12] << 32)
+- | ((__varword)((unsigned char *) list.raddr)[13] << 40);
++ iret2 = ((__varword)((unsigned char *) list.raddr)[8] << 56)
++ | ((__varword)((unsigned char *) list.raddr)[9] << 48)
++ | ((__varword)((unsigned char *) list.raddr)[10] << 40)
++ | ((__varword)((unsigned char *) list.raddr)[11] << 32)
++ | ((__varword)((unsigned char *) list.raddr)[12] << 24)
++ | ((__varword)((unsigned char *) list.raddr)[13] << 16);
+ } else
+ if (list.rsize == 15) {
+- iret2 = ((__varword)((unsigned char *) list.raddr)[8])
+- | ((__varword)((unsigned char *) list.raddr)[9] << 8)
+- | ((__varword)((unsigned char *) list.raddr)[10] << 16)
+- | ((__varword)((unsigned char *) list.raddr)[11] << 24)
+- | ((__varword)((unsigned char *) list.raddr)[12] << 32)
+- | ((__varword)((unsigned char *) list.raddr)[13] << 40)
+- | ((__varword)((unsigned char *) list.raddr)[14] << 48);
++ iret2 = ((__varword)((unsigned char *) list.raddr)[8] << 56)
++ | ((__varword)((unsigned char *) list.raddr)[9] << 48)
++ | ((__varword)((unsigned char *) list.raddr)[10] << 40)
++ | ((__varword)((unsigned char *) list.raddr)[11] << 32)
++ | ((__varword)((unsigned char *) list.raddr)[12] << 24)
++ | ((__varword)((unsigned char *) list.raddr)[13] << 16)
++ | ((__varword)((unsigned char *) list.raddr)[14] << 8);
+ } else
+ if (list.rsize == 16) {
+- iret2 = ((__varword)((unsigned char *) list.raddr)[8])
+- | ((__varword)((unsigned char *) list.raddr)[9] << 8)
+- | ((__varword)((unsigned char *) list.raddr)[10] << 16)
+- | ((__varword)((unsigned char *) list.raddr)[11] << 24)
+- | ((__varword)((unsigned char *) list.raddr)[12] << 32)
+- | ((__varword)((unsigned char *) list.raddr)[13] << 40)
+- | ((__varword)((unsigned char *) list.raddr)[14] << 48)
+- | ((__varword)((unsigned char *) list.raddr)[15] << 56);
++ iret2 = ((__varword)((unsigned char *) list.raddr)[8] << 56)
++ | ((__varword)((unsigned char *) list.raddr)[9] << 48)
++ | ((__varword)((unsigned char *) list.raddr)[10] << 40)
++ | ((__varword)((unsigned char *) list.raddr)[11] << 32)
++ | ((__varword)((unsigned char *) list.raddr)[12] << 24)
++ | ((__varword)((unsigned char *) list.raddr)[13] << 16)
++ | ((__varword)((unsigned char *) list.raddr)[14] << 8)
++ | ((__varword)((unsigned char *) list.raddr)[15]);
+ }
+ }
+ #else /* Optimized: fewer conditional jumps, fewer memory accesses */
diff --git a/experimental/otter-browser/APKBUILD b/experimental/otter-browser/APKBUILD
index ec0d59264..d7056cba7 100644
--- a/experimental/otter-browser/APKBUILD
+++ b/experimental/otter-browser/APKBUILD
@@ -1,23 +1,22 @@
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=otter-browser
-pkgver=0.9.96
+pkgver=1.0.03
pkgrel=0
pkgdesc="A free, open browser focused on user privacy"
url="https://otter-browser.org/"
arch="all"
+options="!check" # No test suite
license="GPL-3.0+"
depends=""
makedepends="cmake qt5-qtbase-dev qt5-qttools-dev openssl-dev gstreamer-dev
qt5-qtmultimedia-dev qt5-qtdeclarative-dev qt5-qtsvg-dev hunspell-dev
qt5-qtxmlpatterns-dev qt5-qtwebkit-dev"
-install=""
langdir="/usr/share/otter-browser/locale"
subpackages="$pkgname-doc $pkgname-lang"
-source="https://sourceforge.net/projects/$pkgname/files/$pkgname-rc6/$pkgname-$pkgver.tar.bz2"
+source="https://sourceforge.net/projects/$pkgname/files/$pkgname-$pkgver/$pkgname-$pkgver.tar.bz2"
build() {
- cd "$builddir"
if [ "$CBUILD" != "$CHOST" ]; then
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
fi
@@ -28,18 +27,13 @@ build() {
-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-DCMAKE_C_FLAGS="$CFLAGS" \
- ${CMAKE_CROSSOPTS}
- make
-}
-
-check() {
- cd "$builddir"
- CTEST_OUTPUT_ON_FAILURE=TRUE ctest
+ ${CMAKE_CROSSOPTS} \
+ -Bbuild
+ make -C build
}
package() {
- cd "$builddir"
- make DESTDIR="$pkgdir" install
+ make DESTDIR="$pkgdir" -C build install
}
-sha512sums="4ba915226360ae1d6f5fd9bf5ea502ea9f2104594536eff0cfe57f162fb769158b03da2da9e5c0ce757af8fafa6f379ce81391b648bf4253c2bb35f12c3620b3 otter-browser-0.9.96.tar.bz2"
+sha512sums="7d78b6927d9eb0503ca9a16cf5435505d941e615a9b77f2707b40f14a8a0c84250e88a33b2cc6ab3b1cce5b46930d23814135932ae38cbd0a8100452a5b2daf6 otter-browser-1.0.03.tar.bz2"
diff --git a/experimental/qt5-qtwebkit/APKBUILD b/experimental/qt5-qtwebkit/APKBUILD
deleted file mode 100644
index c7e0834e5..000000000
--- a/experimental/qt5-qtwebkit/APKBUILD
+++ /dev/null
@@ -1,94 +0,0 @@
-# Contributor: A. Wilcox <awilfox@adelielinux.org>
-# Maintainer: A. Wilcox <awilfox@adelielinux.org>
-pkgname=qt5-qtwebkit
-_realname=qtwebkit
-pkgver=5.212.0_alpha2
-_realver=$(printf '%s' "$pkgver" | sed 's/_/-/')
-pkgrel=0
-pkgdesc="Open source Web browser engine"
-url="https://github.com/annulen/webkit"
-arch="all"
-license="LGPL-2.1+ AND BSD-3-Clause AND Others"
-depends="gst-plugins-base"
-depends_dev="qt5-qtbase-dev"
-makedepends="$depends_dev ninja sqlite-dev icu-dev ruby perl bison flex gperf
- libxml2-dev libxslt-dev libjpeg-turbo-dev libpng-dev zlib-dev glib-dev
- gstreamer-dev fontconfig-dev qt5-qtsensors-dev qt5-qtpositioning-dev
- qt5-qtdeclarative-dev qt5-qtwebchannel-dev libxcomposite-dev
- libxrender-dev gst-plugins-base-dev hyphen-dev libexecinfo-dev"
-subpackages="$pkgname-dev $pkgname-doc"
-source="https://github.com/annulen/webkit/releases/download/$_realname-$_realver/$_realname-$_realver.tar.xz
- jsc-port-to-musl.patch
- musl-thread-stacksize.patch
- "
-builddir="$srcdir"/$_realname-$_realver
-
-unpack() {
- default_unpack
- # just ripped from Firefox's APKBUILD...
- [ -z $SKIP_PYTHON ] || return 0
- msg "Killing all remaining hope for humanity and building Python 2..."
- cd "$srcdir"
- [ -d python ] && rm -r python
- mkdir python
- cd python
- # 19:39 <+solar> just make the firefox build process build its own py2 copy
- curl -O https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tar.xz
- tar xJf Python-2.7.15.tar.xz
- cd Python-2.7.15
- # 20:03 <calvin> TheWilfox: there's always violence
- ./configure --prefix="$srcdir/python"
- make -j $JOBS
- # 6 tests failed:
- # test__locale test_os test_posix test_re test_strptime test_time
- # make test
- make -j $JOBS install
-}
-
-build() {
- cd "$builddir"
- if [ "$CBUILD" != "$CHOST" ]; then
- CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
- fi
- export PATH="$srcdir/python/bin:$PATH"
- # We can enable the JIT when it is stable on all Tier 1 platforms:
- # pmmx (ensure no SSE)
- # ppc
- # ppc64
- #
- # DONE:
- # aarch64
- # armv7
- # x86_64
- cmake \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_INSTALL_LIBDIR=lib \
- -DBUILD_SHARED_LIBS=True \
- -DCMAKE_BUILD_TYPE=RelWithDebugInfo \
- -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
- -DCMAKE_C_FLAGS="$CFLAGS" \
- -DENABLE_JIT=OFF \
- -DPORT=Qt \
- -DUSE_SYSTEM_MALLOC=ON \
- ${CMAKE_CROSSOPTS}
- # too memory hungry
- if [ -z "$JOBS" ] || [ $JOBS -gt 32 ]; then
- make -j32
- else
- make
- fi
-}
-
-check() {
- cd "$builddir"
- CTEST_OUTPUT_ON_FAILURE=TRUE ctest
-}
-
-package() {
- cd "$builddir"
- make DESTDIR="$pkgdir" install
-}
-
-sha512sums="b15985aab20c5618dc1f71a0d91f02dbed993516272090a4a12990714bf4c9554ccbdcf9d6a143bf46fcc2c170f691e571114d61686fe49791f8d5c540785758 qtwebkit-5.212.0-alpha2.tar.xz
-19efd97c5f628108d30cc0e5e53f689725cc480ffe1ea90577e5f961d7f35a6a434dda5a03c73c0fb74a30c46ced32bcf580340a2eaf4e72960e61c28ed34dba jsc-port-to-musl.patch
-a8df6d20346882e49745dbdf9bdf2eddf2f3e1ac3301e9fd826397fa746d1d9228deaf2eab0316fa977a85032d6c091559cd5404b7a576e3adc0bec64a5a4ad9 musl-thread-stacksize.patch"
diff --git a/experimental/qt5-qtwebkit/jsc-port-to-musl.patch b/experimental/qt5-qtwebkit/jsc-port-to-musl.patch
deleted file mode 100644
index 0b2d7dfce..000000000
--- a/experimental/qt5-qtwebkit/jsc-port-to-musl.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-diff -Naur qtwebkit-5.212.0-alpha2-original/Source/JavaScriptCore/heap/MachineStackMarker.cpp qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/heap/MachineStackMarker.cpp
---- qtwebkit-5.212.0-alpha2-original/Source/JavaScriptCore/heap/MachineStackMarker.cpp 2017-06-04 20:16:05.000000000 +0000
-+++ qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/heap/MachineStackMarker.cpp 2018-09-26 02:13:44.660000000 +0000
-@@ -566,7 +566,7 @@
- #error Unknown Architecture
- #endif
-
--#elif defined(__GLIBC__) && ENABLE(JIT)
-+#elif defined(__linux__) && ENABLE(JIT)
-
- #if CPU(X86)
- return reinterpret_cast<void*>((uintptr_t) regs.machineContext.gregs[REG_ESP]);
-@@ -665,7 +665,7 @@
- #error Unknown Architecture
- #endif
-
--#elif defined(__GLIBC__)
-+#elif defined(__linux__)
-
- // The following sequence depends on glibc's sys/ucontext.h.
- #if CPU(X86)
-@@ -747,7 +747,7 @@
- #error Unknown Architecture
- #endif
-
--#elif defined(__GLIBC__)
-+#elif defined(__linux__)
-
- // The following sequence depends on glibc's sys/ucontext.h.
- #if CPU(X86)
-@@ -838,7 +838,7 @@
- #error Unknown Architecture
- #endif
-
--#elif defined(__GLIBC__)
-+#elif defined(__linux__)
-
- // The following sequence depends on glibc's sys/ucontext.h.
- #if CPU(X86)
-diff -Naur qtwebkit-5.212.0-alpha2-original/Source/ThirdParty/ANGLE/src/compiler/preprocessor/ExpressionParser.cpp qtwebkit-5.212.0-alpha2/Source/ThirdParty/ANGLE/src/compiler/preprocessor/ExpressionParser.cpp
---- qtwebkit-5.212.0-alpha2-original/Source/ThirdParty/ANGLE/src/compiler/preprocessor/ExpressionParser.cpp 2017-06-04 20:16:06.000000000 +0000
-+++ qtwebkit-5.212.0-alpha2/Source/ThirdParty/ANGLE/src/compiler/preprocessor/ExpressionParser.cpp 2018-09-26 02:12:36.770000000 +0000
-@@ -828,7 +828,7 @@
- #if YYERROR_VERBOSE
-
- # ifndef yystrlen
--# if defined __GLIBC__ && defined _STRING_H
-+# if defined __linux__ && defined _STRING_H
- # define yystrlen strlen
- # else
- /* Return the length of YYSTR. */
-@@ -844,7 +844,7 @@
- # endif
-
- # ifndef yystpcpy
--# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-+# if defined __linux__ && defined _STRING_H && defined _GNU_SOURCE
- # define yystpcpy stpcpy
- # else
- /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
-diff -Naur qtwebkit-5.212.0-alpha2-original/Source/ThirdParty/ANGLE/src/compiler/translator/glslang_tab.cpp qtwebkit-5.212.0-alpha2/Source/ThirdParty/ANGLE/src/compiler/translator/glslang_tab.cpp
---- qtwebkit-5.212.0-alpha2-original/Source/ThirdParty/ANGLE/src/compiler/translator/glslang_tab.cpp 2017-06-04 20:16:06.000000000 +0000
-+++ qtwebkit-5.212.0-alpha2/Source/ThirdParty/ANGLE/src/compiler/translator/glslang_tab.cpp 2018-09-26 02:12:54.740000000 +0000
-@@ -1835,7 +1835,7 @@
- #if YYERROR_VERBOSE
-
- # ifndef yystrlen
--# if defined __GLIBC__ && defined _STRING_H
-+# if defined __linux__ && defined _STRING_H
- # define yystrlen strlen
- # else
- /* Return the length of YYSTR. */
-@@ -1851,7 +1851,7 @@
- # endif
-
- # ifndef yystpcpy
--# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-+# if defined __linux__ && defined _STRING_H && defined _GNU_SOURCE
- # define yystpcpy stpcpy
- # else
- /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
diff --git a/experimental/qt5-qtwebkit/musl-thread-stacksize.patch b/experimental/qt5-qtwebkit/musl-thread-stacksize.patch
deleted file mode 100644
index e790222dc..000000000
--- a/experimental/qt5-qtwebkit/musl-thread-stacksize.patch
+++ /dev/null
@@ -1,49 +0,0 @@
---- qtwebkit-5.212.0-alpha2/Source/WTF/wtf/ThreadingPthreads.cpp.old 2017-06-04 15:16:06.000000000 -0500
-+++ qtwebkit-5.212.0-alpha2/Source/WTF/wtf/ThreadingPthreads.cpp 2018-09-05 02:29:45.980000000 +0000
-@@ -107,10 +107,11 @@
- void initializeThreading()
- {
- static bool isInitialized;
-+ pthread_attr_t attr;
-
- if (isInitialized)
- return;
-
- isInitialized = true;
-
- WTF::double_conversion::initialize();
-@@ -122,6 +122,11 @@
- ThreadIdentifierData::initializeOnce();
- wtfThreadData();
- initializeDates();
-+
-+ pthread_attr_init(&attr);
-+ pthread_attr_setstacksize(&attr, 2097152);
-+ pthread_setattr_default_np(&attr);
-+ pthread_attr_destroy(&attr);
- }
-
- static ThreadMap& threadMap()
-@@ -171,6 +171,7 @@
- pthread_t threadHandle;
- pthread_attr_t attr;
- pthread_attr_init(&attr);
-+ pthread_attr_setstacksize(&attr, 2097152);
- #if HAVE(QOS_CLASSES)
- pthread_attr_set_qos_class_np(&attr, QOS_CLASS_USER_INITIATED, 0);
- #endif
---- qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/runtime/Options.h.old 2017-06-04 20:16:05.000000000 +0000
-+++ qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/runtime/Options.h 2018-09-26 03:02:39.700000000 +0000
-@@ -112,9 +112,9 @@
- \
- v(bool, reportMustSucceedExecutableAllocations, false, nullptr) \
- \
-- v(unsigned, maxPerThreadStackUsage, 4 * MB, nullptr) \
-- v(unsigned, reservedZoneSize, 128 * KB, nullptr) \
-- v(unsigned, errorModeReservedZoneSize, 64 * KB, nullptr) \
-+ v(unsigned, maxPerThreadStackUsage, 512 * KB, nullptr) \
-+ v(unsigned, reservedZoneSize, 32 * KB, nullptr) \
-+ v(unsigned, errorModeReservedZoneSize, 16 * KB, nullptr) \
- \
- v(bool, crashIfCantAllocateJITMemory, false, nullptr) \
- v(unsigned, jitMemoryReservationSize, 0, "Set this number to change the executable allocation size in ExecutableAllocatorFixedVMPool. (In bytes.)") \
diff --git a/experimental/rust-beta/0001-Fix-LLVM-build.patch b/experimental/rust-beta/0001-Fix-LLVM-build.patch
new file mode 100644
index 000000000..d49c17640
--- /dev/null
+++ b/experimental/rust-beta/0001-Fix-LLVM-build.patch
@@ -0,0 +1,22 @@
+From 855b7d97e96e67bd5db5c0016c3b9965a5c1843f Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Fri, 8 Sep 2017 00:04:29 -0500
+Subject: [PATCH 01/12] Fix LLVM build
+
+---
+ src/bootstrap/src/lib.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs
+index 33b8f1a7ce720..d933a8bc37f88 100644
+--- a/src/bootstrap/src/lib.rs
++++ b/src/bootstrap/src/lib.rs
+@@ -1214,7 +1214,7 @@ impl Build {
+ .args()
+ .iter()
+ .map(|s| s.to_string_lossy().into_owned())
+- .filter(|s| !s.starts_with("-O") && !s.starts_with("/O"))
++ .filter(|s| !s.starts_with("-O") && !s.starts_with("/O") && !s.starts_with("-static"))
+ .collect::<Vec<String>>();
+
+ // If we're compiling C++ on macOS then we add a flag indicating that
diff --git a/experimental/rust-beta/0002-Fix-linking-to-zlib-when-cross-compiling.patch b/experimental/rust-beta/0002-Fix-linking-to-zlib-when-cross-compiling.patch
new file mode 100644
index 000000000..11e87ae93
--- /dev/null
+++ b/experimental/rust-beta/0002-Fix-linking-to-zlib-when-cross-compiling.patch
@@ -0,0 +1,34 @@
+From 9357baa3eede8062b7c17407d23c3d2102af8435 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Wed, 10 Jan 2018 13:36:41 -0600
+Subject: [PATCH 02/12] Fix linking to zlib when cross-compiling
+
+---
+ compiler/rustc_llvm/build.rs | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs
+index 4b0c1229da134..2d61b834c784b 100644
+--- a/compiler/rustc_llvm/build.rs
++++ b/compiler/rustc_llvm/build.rs
+@@ -219,10 +219,8 @@ fn main() {
+ // of llvm-config, not the target that we're attempting to link.
+ let mut cmd = Command::new(&llvm_config);
+ cmd.arg(llvm_link_arg).arg("--libs");
+-
+- if !is_crossed {
+- cmd.arg("--system-libs");
+- }
++ cmd.arg("--system-libs");
++ cmd.args(&components);
+
+ // We need libkstat for getHostCPUName on SPARC builds.
+ // See also: https://github.com/llvm/llvm-project/issues/64186
+@@ -256,7 +254,6 @@ fn main() {
+ println!("cargo:rustc-link-lib=z");
+ println!("cargo:rustc-link-lib=execinfo");
+ }
+- cmd.args(&components);
+
+ for lib in output(&mut cmd).split_whitespace() {
+ let name = if let Some(stripped) = lib.strip_prefix("-l") {
diff --git a/experimental/rust-beta/0003-Fix-rustdoc-when-cross-compiling-on-musl.patch b/experimental/rust-beta/0003-Fix-rustdoc-when-cross-compiling-on-musl.patch
new file mode 100644
index 000000000..e1546dfc6
--- /dev/null
+++ b/experimental/rust-beta/0003-Fix-rustdoc-when-cross-compiling-on-musl.patch
@@ -0,0 +1,50 @@
+From cb97ef40ec507c7ff20f7c0857b1892a1946a0f3 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sat, 2 Dec 2017 17:25:44 -0600
+Subject: [PATCH 03/12] Fix rustdoc when cross-compiling on musl
+
+musl can't handle foreign-architecture libraries in LD_LIBRARY_PATH.
+---
+ src/bootstrap/src/bin/rustdoc.rs | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/src/bootstrap/src/bin/rustdoc.rs b/src/bootstrap/src/bin/rustdoc.rs
+index dbbce6fe22047..3d3cb241eaab6 100644
+--- a/src/bootstrap/src/bin/rustdoc.rs
++++ b/src/bootstrap/src/bin/rustdoc.rs
+@@ -7,6 +7,6 @@ use std::ffi::OsString;
+ use std::process::Command;
+
+ use shared_helpers::{
+- dylib_path, dylib_path_var, maybe_dump, parse_rustc_stage, parse_rustc_verbose,
++ dylib_path_var, maybe_dump, parse_rustc_stage, parse_rustc_verbose,
+ parse_value_from_args,
+ };
+@@ -28,9 +29,6 @@ fn main() {
+ // is passed (a bit janky...)
+ let target = args.windows(2).find(|w| &*w[0] == "--target").and_then(|w| w[1].to_str());
+
+- let mut dylib_path = dylib_path();
+- dylib_path.insert(0, PathBuf::from(libdir.clone()));
+-
+ let mut cmd = Command::new(rustdoc);
+
+ if target.is_some() {
+@@ -43,7 +41,7 @@ fn main() {
+ }
+
+ cmd.args(&args);
+- cmd.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
++ cmd.env(dylib_path_var(), PathBuf::from(libdir.clone()));
+
+ // Force all crates compiled by this compiler to (a) be unstable and (b)
+ // allow the `rustc_private` feature to link to other unstable crates
+@@ -68,7 +66,7 @@ fn main() {
+ eprintln!(
+ "rustdoc command: {:?}={:?} {:?}",
+ dylib_path_var(),
+- env::join_paths(&dylib_path).unwrap(),
++ PathBuf::from(libdir.clone()),
+ cmd,
+ );
+ eprintln!("sysroot: {sysroot:?}");
diff --git a/experimental/rust-beta/0004-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch b/experimental/rust-beta/0004-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch
new file mode 100644
index 000000000..7bcd9a532
--- /dev/null
+++ b/experimental/rust-beta/0004-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch
@@ -0,0 +1,532 @@
+From 7e2507b33ffb027a331f7cbd3477043288f49797 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Fri, 8 Sep 2017 22:11:14 -0500
+Subject: [PATCH 04/12] Remove musl_root and CRT fallback from musl targets
+
+---
+ compiler/rustc_codegen_ssa/src/back/link.rs | 6 +--
+ .../rustc_target/src/spec/base/linux_musl.rs | 6 +--
+ compiler/rustc_target/src/spec/crt_objects.rs | 22 ----------
+ compiler/rustc_target/src/spec/mod.rs | 5 ---
+ config.example.toml | 17 --------
+ src/bootstrap/configure.py | 34 ---------------
+ src/bootstrap/src/core/build_steps/compile.rs | 42 +------------------
+ src/bootstrap/src/core/config/config.rs | 11 -----
+ src/bootstrap/src/core/sanity.rs | 23 ----------
+ src/bootstrap/src/lib.rs | 19 ---------
+ src/bootstrap/src/utils/cc_detect.rs | 26 ------------
+ .../host-x86_64/dist-arm-linux/Dockerfile | 1 -
+ .../dist-i586-gnu-i586-i686-musl/Dockerfile | 2 -
+ .../host-x86_64/dist-various-1/Dockerfile | 4 --
+ .../host-x86_64/dist-various-2/Dockerfile | 3 +-
+ .../host-x86_64/dist-x86_64-musl/Dockerfile | 1 -
+ .../host-x86_64/test-various/Dockerfile | 1 -
+ 17 files changed, 4 insertions(+), 219 deletions(-)
+
+diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
+index f5e8d5fc92a91..b65999ec7230f 100644
+--- a/compiler/rustc_codegen_ssa/src/back/link.rs
++++ b/compiler/rustc_codegen_ssa/src/back/link.rs
+@@ -1806,7 +1806,7 @@ fn detect_self_contained_mingw(sess: &Session) -> bool {
+ /// Various toolchain components used during linking are used from rustc distribution
+ /// instead of being found somewhere on the host system.
+ /// We only provide such support for a very limited number of targets.
+-fn self_contained_components(sess: &Session, crate_type: CrateType) -> LinkSelfContainedComponents {
++fn self_contained_components(sess: &Session, _crate_type: CrateType) -> LinkSelfContainedComponents {
+ // Turn the backwards compatible bool values for `self_contained` into fully inferred
+ // `LinkSelfContainedComponents`.
+ let self_contained =
+@@ -1828,10 +1828,6 @@ fn self_contained_components(sess: &Session, crate_type: CrateType) -> LinkSelfC
+ return components;
+ }
+
+- // FIXME: Find a better heuristic for "native musl toolchain is available",
+- // based on host and linker path, for example.
+- // (https://github.com/rust-lang/rust/pull/71769#issuecomment-626330237).
+- LinkSelfContainedDefault::InferredForMusl => sess.crt_static(Some(crate_type)),
+ LinkSelfContainedDefault::InferredForMingw => {
+ sess.host == sess.target
+ && sess.target.vendor != "uwp"
+diff --git a/compiler/rustc_target/src/spec/base/linux_musl.rs b/compiler/rustc_target/src/spec/base/linux_musl.rs
+index 5117cadbee0e6..36d64059d59ad 100644
+--- a/compiler/rustc_target/src/spec/base/linux_musl.rs
++++ b/compiler/rustc_target/src/spec/base/linux_musl.rs
+@@ -1,13 +1,9 @@
+-use crate::spec::crt_objects;
+-use crate::spec::{base, LinkSelfContainedDefault, TargetOptions};
++use crate::spec::{base, TargetOptions};
+
+ pub fn opts() -> TargetOptions {
+ let mut base = base::linux::opts();
+
+ base.env = "musl".into();
+- base.pre_link_objects_self_contained = crt_objects::pre_musl_self_contained();
+- base.post_link_objects_self_contained = crt_objects::post_musl_self_contained();
+- base.link_self_contained = LinkSelfContainedDefault::InferredForMusl;
+
+ // These targets statically link libc by default
+ base.crt_static_default = true;
+diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
+index 53f710b8f9e14..2a4eec15f2027 100644
+--- a/compiler/rustc_target/src/spec/crt_objects.rs
++++ b/compiler/rustc_target/src/spec/crt_objects.rs
+@@ -61,28 +61,6 @@ pub(super) fn all(obj: &'static str) -> CrtObjects {
+ ])
+ }
+
+-pub(super) fn pre_musl_self_contained() -> CrtObjects {
+- new(&[
+- (LinkOutputKind::DynamicNoPicExe, &["crt1.o", "crti.o", "crtbegin.o"]),
+- (LinkOutputKind::DynamicPicExe, &["Scrt1.o", "crti.o", "crtbeginS.o"]),
+- (LinkOutputKind::StaticNoPicExe, &["crt1.o", "crti.o", "crtbegin.o"]),
+- (LinkOutputKind::StaticPicExe, &["rcrt1.o", "crti.o", "crtbeginS.o"]),
+- (LinkOutputKind::DynamicDylib, &["crti.o", "crtbeginS.o"]),
+- (LinkOutputKind::StaticDylib, &["crti.o", "crtbeginS.o"]),
+- ])
+-}
+-
+-pub(super) fn post_musl_self_contained() -> CrtObjects {
+- new(&[
+- (LinkOutputKind::DynamicNoPicExe, &["crtend.o", "crtn.o"]),
+- (LinkOutputKind::DynamicPicExe, &["crtendS.o", "crtn.o"]),
+- (LinkOutputKind::StaticNoPicExe, &["crtend.o", "crtn.o"]),
+- (LinkOutputKind::StaticPicExe, &["crtendS.o", "crtn.o"]),
+- (LinkOutputKind::DynamicDylib, &["crtendS.o", "crtn.o"]),
+- (LinkOutputKind::StaticDylib, &["crtendS.o", "crtn.o"]),
+- ])
+-}
+-
+ pub(super) fn pre_mingw_self_contained() -> CrtObjects {
+ new(&[
+ (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
+diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
+index 941d767b850dc..1ce8e0e64e4c7 100644
+--- a/compiler/rustc_target/src/spec/mod.rs
++++ b/compiler/rustc_target/src/spec/mod.rs
+@@ -549,9 +549,6 @@ pub enum LinkSelfContainedDefault {
+ /// The target spec explicitly disables self-contained linking.
+ False,
+
+- /// The target spec requests that the self-contained mode is inferred, in the context of musl.
+- InferredForMusl,
+-
+ /// The target spec requests that the self-contained mode is inferred, in the context of mingw.
+ InferredForMingw,
+
+@@ -568,7 +565,6 @@ impl FromStr for LinkSelfContainedDefault {
+ Ok(match s {
+ "false" => LinkSelfContainedDefault::False,
+ "true" | "wasm" => LinkSelfContainedDefault::True,
+- "musl" => LinkSelfContainedDefault::InferredForMusl,
+ "mingw" => LinkSelfContainedDefault::InferredForMingw,
+ _ => return Err(()),
+ })
+@@ -590,7 +586,6 @@ impl ToJson for LinkSelfContainedDefault {
+ // Stable backwards-compatible values
+ LinkSelfContainedDefault::True => "true".to_json(),
+ LinkSelfContainedDefault::False => "false".to_json(),
+- LinkSelfContainedDefault::InferredForMusl => "musl".to_json(),
+ LinkSelfContainedDefault::InferredForMingw => "mingw".to_json(),
+ }
+ }
+diff --git a/config.example.toml b/config.example.toml
+index f94553dd63f72..687a79bdd3ccc 100644
+--- a/config.example.toml
++++ b/config.example.toml
+@@ -592,14 +592,6 @@
+ # behavior -- this may lead to miscompilations or other bugs.
+ #description = ""
+
+-# The root location of the musl installation directory. The library directory
+-# will also need to contain libunwind.a for an unwinding implementation. Note
+-# that this option only makes sense for musl targets that produce statically
+-# linked binaries.
+-#
+-# Defaults to /usr on musl hosts. Has no default otherwise.
+-#musl-root = <platform specific> (path)
+-
+ # By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix
+ # platforms to ensure that the compiler is usable by default from the build
+ # directory (as it links to a number of dynamic libraries). This may not be
+@@ -835,15 +827,6 @@
+ # only use static libraries. If unset, the target's default linkage is used.
+ #crt-static = <platform-specific> (bool)
+
+-# The root location of the musl installation directory. The library directory
+-# will also need to contain libunwind.a for an unwinding implementation. Note
+-# that this option only makes sense for musl targets that produce statically
+-# linked binaries.
+-#musl-root = build.musl-root (path)
+-
+-# The full path to the musl libdir.
+-#musl-libdir = musl-root/lib
+-
+ # The root location of the `wasm32-wasip1` sysroot. Only used for WASI
+ # related targets. Make sure to create a `[target.wasm32-wasip1]`
+ # section and move this field there (or equivalent for the target being built).
+diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
+index 818a7daadcab8..a7331009faf82 100755
+--- a/src/bootstrap/configure.py
++++ b/src/bootstrap/configure.py
+@@ -99,40 +99,6 @@ def v(*args):
+ v("llvm-filecheck", None, "set path to LLVM's FileCheck utility")
+ v("python", "build.python", "set path to python")
+ v("android-ndk", "build.android-ndk", "set path to Android NDK")
+-v("musl-root", "target.x86_64-unknown-linux-musl.musl-root",
+- "MUSL root installation directory (deprecated)")
+-v("musl-root-x86_64", "target.x86_64-unknown-linux-musl.musl-root",
+- "x86_64-unknown-linux-musl install directory")
+-v("musl-root-i586", "target.i586-unknown-linux-musl.musl-root",
+- "i586-unknown-linux-musl install directory")
+-v("musl-root-i686", "target.i686-unknown-linux-musl.musl-root",
+- "i686-unknown-linux-musl install directory")
+-v("musl-root-arm", "target.arm-unknown-linux-musleabi.musl-root",
+- "arm-unknown-linux-musleabi install directory")
+-v("musl-root-armhf", "target.arm-unknown-linux-musleabihf.musl-root",
+- "arm-unknown-linux-musleabihf install directory")
+-v("musl-root-armv5te", "target.armv5te-unknown-linux-musleabi.musl-root",
+- "armv5te-unknown-linux-musleabi install directory")
+-v("musl-root-armv7", "target.armv7-unknown-linux-musleabi.musl-root",
+- "armv7-unknown-linux-musleabi install directory")
+-v("musl-root-armv7hf", "target.armv7-unknown-linux-musleabihf.musl-root",
+- "armv7-unknown-linux-musleabihf install directory")
+-v("musl-root-aarch64", "target.aarch64-unknown-linux-musl.musl-root",
+- "aarch64-unknown-linux-musl install directory")
+-v("musl-root-mips", "target.mips-unknown-linux-musl.musl-root",
+- "mips-unknown-linux-musl install directory")
+-v("musl-root-mipsel", "target.mipsel-unknown-linux-musl.musl-root",
+- "mipsel-unknown-linux-musl install directory")
+-v("musl-root-mips64", "target.mips64-unknown-linux-muslabi64.musl-root",
+- "mips64-unknown-linux-muslabi64 install directory")
+-v("musl-root-mips64el", "target.mips64el-unknown-linux-muslabi64.musl-root",
+- "mips64el-unknown-linux-muslabi64 install directory")
+-v("musl-root-riscv32gc", "target.riscv32gc-unknown-linux-musl.musl-root",
+- "riscv32gc-unknown-linux-musl install directory")
+-v("musl-root-riscv64gc", "target.riscv64gc-unknown-linux-musl.musl-root",
+- "riscv64gc-unknown-linux-musl install directory")
+-v("musl-root-loongarch64", "target.loongarch64-unknown-linux-musl.musl-root",
+- "loongarch64-unknown-linux-musl install directory")
+ v("qemu-armhf-rootfs", "target.arm-unknown-linux-gnueabihf.qemu-rootfs",
+ "rootfs in qemu testing, you probably don't want to use this")
+ v("qemu-aarch64-rootfs", "target.aarch64-unknown-linux-gnu.qemu-rootfs",
+diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
+index e927b491c71ea..b77e1a1598f12 100644
+--- a/src/bootstrap/src/core/build_steps/compile.rs
++++ b/src/bootstrap/src/core/build_steps/compile.rs
+@@ -362,38 +362,7 @@ fn copy_self_contained_objects(
+
+ // Copies the libc and CRT objects.
+ //
+- // rustc historically provides a more self-contained installation for musl targets
+- // not requiring the presence of a native musl toolchain. For example, it can fall back
+- // to using gcc from a glibc-targeting toolchain for linking.
+- // To do that we have to distribute musl startup objects as a part of Rust toolchain
+- // and link with them manually in the self-contained mode.
+- if target.contains("musl") && !target.contains("unikraft") {
+- let srcdir = builder.musl_libdir(target).unwrap_or_else(|| {
+- panic!("Target {:?} does not have a \"musl-libdir\" key", target.triple)
+- });
+- for &obj in &["libc.a", "crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
+- copy_and_stamp(
+- builder,
+- &libdir_self_contained,
+- &srcdir,
+- obj,
+- &mut target_deps,
+- DependencyType::TargetSelfContained,
+- );
+- }
+- let crt_path = builder.ensure(llvm::CrtBeginEnd { target });
+- for &obj in &["crtbegin.o", "crtbeginS.o", "crtend.o", "crtendS.o"] {
+- let src = crt_path.join(obj);
+- let target = libdir_self_contained.join(obj);
+- builder.copy_link(&src, &target);
+- target_deps.push((target, DependencyType::TargetSelfContained));
+- }
+-
+- if !target.starts_with("s390x") {
+- let libunwind_path = copy_llvm_libunwind(builder, target, &libdir_self_contained);
+- target_deps.push((libunwind_path, DependencyType::TargetSelfContained));
+- }
+- } else if target.contains("-wasi") {
++ if target.contains("-wasi") {
+ let srcdir = builder.wasi_libdir(target).unwrap_or_else(|| {
+ panic!(
+ "Target {:?} does not have a \"wasi-root\" key in Config.toml \
+@@ -501,15 +470,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
+ .arg("--manifest-path")
+ .arg(builder.src.join("library/sysroot/Cargo.toml"));
+
+- // Help the libc crate compile by assisting it in finding various
+- // sysroot native libraries.
+- if target.contains("musl") {
+- if let Some(p) = builder.musl_libdir(target) {
+- let root = format!("native={}", p.to_str().unwrap());
+- cargo.rustflag("-L").rustflag(&root);
+- }
+- }
+-
+ if target.contains("-wasi") {
+ if let Some(dir) = builder.wasi_libdir(target) {
+ let root = format!("native={}", dir.to_str().unwrap());
+--- rustc-beta-src/src/bootstrap/src/core/config/config.rs.old 2024-07-24 20:53:57.000000000 -0500
++++ rustc-beta-src/src/bootstrap/src/core/config/config.rs 2024-07-30 13:14:50.152439530 -0500
+@@ -313,8 +313,6 @@
+ pub print_step_timings: bool,
+ pub print_step_rusage: bool,
+
+- // Fallback musl-root for all targets
+- pub musl_root: Option<PathBuf>,
+ pub prefix: Option<PathBuf>,
+ pub sysconfdir: Option<PathBuf>,
+ pub datadir: Option<PathBuf>,
+@@ -558,8 +556,6 @@
+ pub profiler: Option<StringOrBool>,
+ pub rpath: Option<bool>,
+ pub crt_static: Option<bool>,
+- pub musl_root: Option<PathBuf>,
+- pub musl_libdir: Option<PathBuf>,
+ pub wasi_root: Option<PathBuf>,
+ pub qemu_rootfs: Option<PathBuf>,
+ pub runner: Option<String>,
+@@ -1079,7 +1075,6 @@
+ default_linker: Option<String> = "default-linker",
+ channel: Option<String> = "channel",
+ description: Option<String> = "description",
+- musl_root: Option<String> = "musl-root",
+ rpath: Option<bool> = "rpath",
+ strip: Option<bool> = "strip",
+ frame_pointers: Option<bool> = "frame-pointers",
+@@ -1133,8 +1128,6 @@
+ profiler: Option<StringOrBool> = "profiler",
+ rpath: Option<bool> = "rpath",
+ crt_static: Option<bool> = "crt-static",
+- musl_root: Option<String> = "musl-root",
+- musl_libdir: Option<String> = "musl-libdir",
+ wasi_root: Option<String> = "wasi-root",
+ qemu_rootfs: Option<String> = "qemu-rootfs",
+ no_std: Option<bool> = "no-std",
+@@ -1599,7 +1592,6 @@
+ default_linker,
+ channel,
+ description,
+- musl_root,
+ rpath,
+ verbose_tests,
+ optimize_tests,
+@@ -1687,7 +1679,6 @@
+ config.rustc_parallel =
+ parallel_compiler.unwrap_or(config.channel == "dev" || config.channel == "nightly");
+ config.rustc_default_linker = default_linker;
+- config.musl_root = musl_root.map(PathBuf::from);
+ config.save_toolstates = save_toolstates.map(PathBuf::from);
+ set(
+ &mut config.deny_warnings,
+@@ -1906,8 +1897,6 @@
+ target.ranlib = cfg.ranlib.map(PathBuf::from);
+ target.linker = cfg.linker.map(PathBuf::from);
+ target.crt_static = cfg.crt_static;
+- target.musl_root = cfg.musl_root.map(PathBuf::from);
+- target.musl_libdir = cfg.musl_libdir.map(PathBuf::from);
+ target.wasi_root = cfg.wasi_root.map(PathBuf::from);
+ target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
+ target.runner = cfg.runner;
+@@ -2667,7 +2656,6 @@
+ split_debuginfo: _,
+ backtrace: _,
+ parallel_compiler: _,
+- musl_root: _,
+ verbose_tests: _,
+ optimize_tests: _,
+ codegen_tests: _,
+diff --git a/src/bootstrap/src/core/sanity.rs b/src/bootstrap/src/core/sanity.rs
+index e03b1e179084e..e61335d9b46c1 100644
+--- a/src/bootstrap/src/core/sanity.rs
++++ b/src/bootstrap/src/core/sanity.rs
+@@ -11,7 +11,6 @@
+ use std::collections::HashMap;
+ use std::env;
+ use std::ffi::{OsStr, OsString};
+-use std::fs;
+ use std::path::PathBuf;
+ use std::process::Command;
+
+@@ -323,28 +322,6 @@ than building it.
+ continue;
+ }
+
+- // Make sure musl-root is valid.
+- if target.contains("musl") && !target.contains("unikraft") {
+- // If this is a native target (host is also musl) and no musl-root is given,
+- // fall back to the system toolchain in /usr before giving up
+- if build.musl_root(*target).is_none() && build.config.build == *target {
+- let target = build.config.target_config.entry(*target).or_default();
+- target.musl_root = Some("/usr".into());
+- }
+- match build.musl_libdir(*target) {
+- Some(libdir) => {
+- if fs::metadata(libdir.join("libc.a")).is_err() {
+- panic!("couldn't find libc.a in musl libdir: {}", libdir.display());
+- }
+- }
+- None => panic!(
+- "when targeting MUSL either the rust.musl-root \
+- option or the target.$TARGET.musl-root option must \
+- be specified in config.toml"
+- ),
+- }
+- }
+-
+ if need_cmake && target.is_msvc() {
+ // There are three builds of cmake on windows: MSVC, MinGW, and
+ // Cygwin. The Cygwin build does not have generators for Visual
+diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs
+index 30d775f774ce7..23145199b4bbb 100644
+--- a/src/bootstrap/src/lib.rs
++++ b/src/bootstrap/src/lib.rs
+@@ -1365,25 +1365,6 @@ impl Build {
+ }
+ }
+
+- /// Returns the "musl root" for this `target`, if defined
+- fn musl_root(&self, target: TargetSelection) -> Option<&Path> {
+- self.config
+- .target_config
+- .get(&target)
+- .and_then(|t| t.musl_root.as_ref())
+- .or(self.config.musl_root.as_ref())
+- .map(|p| &**p)
+- }
+-
+- /// Returns the "musl libdir" for this `target`.
+- fn musl_libdir(&self, target: TargetSelection) -> Option<PathBuf> {
+- let t = self.config.target_config.get(&target)?;
+- if let libdir @ Some(_) = &t.musl_libdir {
+- return libdir.clone();
+- }
+- self.musl_root(target).map(|root| root.join("lib"))
+- }
+-
+ /// Returns the `lib` directory for the WASI target specified, if
+ /// configured.
+ ///
+diff --git a/src/bootstrap/src/utils/cc_detect.rs b/src/bootstrap/src/utils/cc_detect.rs
+index 3ba4e0cb686e6..33dba449dee2a 100644
+--- a/src/bootstrap/src/utils/cc_detect.rs
++++ b/src/bootstrap/src/utils/cc_detect.rs
+@@ -41,7 +41,7 @@ fn cc2ar(cc: &Path, target: TargetSelection) -> Option<PathBuf> {
+ Some(PathBuf::from(ar))
+ } else if target.is_msvc() {
+ None
+- } else if target.contains("musl") || target.contains("openbsd") {
++ } else if target.contains("openbsd") {
+ Some(PathBuf::from("ar"))
+ } else if target.contains("vxworks") {
+ Some(PathBuf::from("wr-ar"))
+@@ -197,30 +197,6 @@ fn default_compiler(
+ }
+ }
+
+- "mips-unknown-linux-musl" if compiler == Language::C => {
+- if cfg.get_compiler().path().to_str() == Some("gcc") {
+- Some(PathBuf::from("mips-linux-musl-gcc"))
+- } else {
+- None
+- }
+- }
+- "mipsel-unknown-linux-musl" if compiler == Language::C => {
+- if cfg.get_compiler().path().to_str() == Some("gcc") {
+- Some(PathBuf::from("mipsel-linux-musl-gcc"))
+- } else {
+- None
+- }
+- }
+-
+- t if t.contains("musl") && compiler == Language::C => {
+- if let Some(root) = build.musl_root(target) {
+- let guess = root.join("bin/musl-gcc");
+- if guess.exists() { Some(guess) } else { None }
+- } else {
+- None
+- }
+- }
+-
+ t if t.contains("-wasi") => {
+ let root = PathBuf::from(std::env::var_os("WASI_SDK_PATH")?);
+ let compiler = match compiler {
+diff --git a/src/ci/docker/host-x86_64/dist-arm-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-arm-linux/Dockerfile
+index 420c42bc9d807..83ff773c08e1a 100644
+--- a/src/ci/docker/host-x86_64/dist-arm-linux/Dockerfile
++++ b/src/ci/docker/host-x86_64/dist-arm-linux/Dockerfile
+@@ -36,7 +36,6 @@ ENV HOSTS=arm-unknown-linux-gnueabi,aarch64-unknown-linux-musl
+ ENV RUST_CONFIGURE_ARGS \
+ --enable-full-tools \
+ --disable-docs \
+- --musl-root-aarch64=/usr/local/aarch64-linux-musl \
+ --enable-sanitizers \
+ --enable-profiler \
+ --set target.aarch64-unknown-linux-musl.crt-static=false
+diff --git a/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile b/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile
+index a62f98b21d225..f949736e866c4 100644
+--- a/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile
++++ b/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile
+@@ -58,8 +58,6 @@ COPY scripts/sccache.sh /scripts/
+ RUN sh /scripts/sccache.sh
+
+ ENV RUST_CONFIGURE_ARGS \
+- --musl-root-i586=/musl-i586 \
+- --musl-root-i686=/musl-i686 \
+ --disable-docs
+
+ # Newer binutils broke things on some vms/distros (i.e., linking against
+diff --git a/src/ci/docker/host-x86_64/dist-various-1/Dockerfile b/src/ci/docker/host-x86_64/dist-various-1/Dockerfile
+index 09fbbac466c72..1ab841763db19 100644
+--- a/src/ci/docker/host-x86_64/dist-various-1/Dockerfile
++++ b/src/ci/docker/host-x86_64/dist-various-1/Dockerfile
+@@ -154,10 +154,6 @@ ENV CFLAGS_armv5te_unknown_linux_musleabi="-march=armv5te -marm -mfloat-abi=soft
+ CC_x86_64_pc_windows_gnullvm=x86_64-w64-mingw32-clang
+
+ ENV RUST_CONFIGURE_ARGS \
+- --musl-root-armv5te=/musl-armv5te \
+- --musl-root-arm=/musl-arm \
+- --musl-root-armhf=/musl-armhf \
+- --musl-root-armv7hf=/musl-armv7hf \
+ --disable-docs
+
+ ENV SCRIPT \
+diff --git a/src/ci/docker/host-x86_64/dist-various-2/Dockerfile b/src/ci/docker/host-x86_64/dist-various-2/Dockerfile
+index 9b15bb3530b61..d15d69e4fee47 100644
+--- a/src/ci/docker/host-x86_64/dist-various-2/Dockerfile
++++ b/src/ci/docker/host-x86_64/dist-various-2/Dockerfile
+@@ -134,6 +134,5 @@ RUN ln -s /usr/include/x86_64-linux-gnu/asm /usr/local/include/asm
+ RUN ln -s /usr/include/x86_64-linux-gnu/asm /usr/local/include/asm
+
+-ENV RUST_CONFIGURE_ARGS --enable-extended --enable-lld --enable-llvm-bitcode-linker --disable-docs \
++ENV RUST_CONFIGURE_ARGS --enable-extended --enable-lld --enable-llvm-bitcode-linker --disable-docs
+- --musl-root-armv7=/musl-armv7
+
+ ENV SCRIPT python3 ../x.py dist --host='' --target $TARGETS
+diff --git a/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile
+index c9a6a2dd069e2..30eda009dee30 100644
+--- a/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile
++++ b/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile
+@@ -35,7 +35,6 @@ RUN sh /scripts/sccache.sh
+ ENV HOSTS=x86_64-unknown-linux-musl
+
+ ENV RUST_CONFIGURE_ARGS \
+- --musl-root-x86_64=/usr/local/x86_64-linux-musl \
+ --enable-extended \
+ --enable-sanitizers \
+ --enable-profiler \
+diff --git a/src/ci/docker/host-x86_64/test-various/Dockerfile b/src/ci/docker/host-x86_64/test-various/Dockerfile
+index 944d9aed3190b..b0ffa7c0e316e 100644
+--- a/src/ci/docker/host-x86_64/test-various/Dockerfile
++++ b/src/ci/docker/host-x86_64/test-various/Dockerfile
+@@ -45,7 +45,6 @@ COPY host-x86_64/dist-various-2/build-wasi-toolchain.sh /tmp/
+ ENV WASI_SDK_PATH=/wasi-sdk-22.0
+
+ ENV RUST_CONFIGURE_ARGS \
+- --musl-root-x86_64=/usr/local/x86_64-linux-musl \
+ --set rust.lld
+
+ # Some run-make tests have assertions about code size, and enabling debug
diff --git a/experimental/rust-beta/0005-Prefer-libgcc_eh-over-libunwind-for-musl.patch b/experimental/rust-beta/0005-Prefer-libgcc_eh-over-libunwind-for-musl.patch
new file mode 100644
index 000000000..cbb22cd45
--- /dev/null
+++ b/experimental/rust-beta/0005-Prefer-libgcc_eh-over-libunwind-for-musl.patch
@@ -0,0 +1,25 @@
+From 78ae73f09d07c847ede1dc683b8907f5bd5bd17f Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sat, 9 Sep 2017 00:14:16 -0500
+Subject: [PATCH 05/12] Prefer libgcc_eh over libunwind for musl
+
+---
+ library/unwind/src/lib.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/library/unwind/src/lib.rs b/library/unwind/src/lib.rs
+index 079626f0fea..590fca0acfa 100644
+--- a/library/unwind/src/lib.rs
++++ b/library/unwind/src/lib.rs
+@@ -63,7 +63,7 @@
+ #[link(name = "unwind", cfg(not(target_feature = "crt-static")))]
+ extern "C" {}
+ } else {
+- #[link(name = "unwind", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))]
++ #[link(name = "gcc_eh", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))]
+ #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
+ extern "C" {}
+ }
+--
+2.35.1
+
diff --git a/experimental/rust-beta/0006-Link-libssp_nonshared.a-on-all-musl-targets.patch b/experimental/rust-beta/0006-Link-libssp_nonshared.a-on-all-musl-targets.patch
new file mode 100644
index 000000000..d34bb560d
--- /dev/null
+++ b/experimental/rust-beta/0006-Link-libssp_nonshared.a-on-all-musl-targets.patch
@@ -0,0 +1,28 @@
+From f516ef748075ddfbcbaec493e1a7ee1e59538bd0 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 3 Nov 2019 17:01:32 -0600
+Subject: [PATCH 06/12] Link libssp_nonshared.a on all musl targets
+
+---
+ compiler/rustc_target/src/spec/base/linux_musl.rs | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/compiler/rustc_target/src/spec/base/linux_musl.rs b/compiler/rustc_target/src/spec/base/linux_musl.rs
+index 36d64059d59ad..c113af2464423 100644
+--- a/compiler/rustc_target/src/spec/base/linux_musl.rs
++++ b/compiler/rustc_target/src/spec/base/linux_musl.rs
+@@ -1,10 +1,13 @@
+-use crate::spec::{base, TargetOptions};
++use crate::spec::{add_link_args, base, Cc, LinkerFlavor, Lld, TargetOptions};
+
+ pub fn opts() -> TargetOptions {
+ let mut base = base::linux::opts();
+
+ base.env = "musl".into();
+
++ // libssp_nonshared.a is needed for __stack_chk_fail_local when using libc.so
++ add_link_args(&mut base.post_link_args, LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-lssp_nonshared"]);
++
+ // These targets statically link libc by default
+ base.crt_static_default = true;
+
diff --git a/experimental/rust-beta/0007-test-failed-doctest-output-Fix-normalization.patch b/experimental/rust-beta/0007-test-failed-doctest-output-Fix-normalization.patch
new file mode 100644
index 000000000..9dfada04f
--- /dev/null
+++ b/experimental/rust-beta/0007-test-failed-doctest-output-Fix-normalization.patch
@@ -0,0 +1,31 @@
+From 5ecc3bac493f2df5b76f42cff6ea602d1624d323 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Mon, 7 Oct 2019 18:36:28 -0500
+Subject: [PATCH 07/12] test/failed-doctest-output: Fix normalization
+
+Otherwise we get:
+
+1
+2 running 2 tests
+- test $DIR/failed-doctest-output.rs - OtherStruct (line 20) ... FAILED
+- test $DIR/failed-doctest-output.rs - SomeStruct (line 10) ... FAILED
++ test src/rustc-1.38.0-src/$DIR/failed-doctest-output.rs - OtherStruct (line 20) ... FAILED
++ test src/rustc-1.38.0-src/$DIR/failed-doctest-output.rs - SomeStruct (line 10) ... FAILED
+5
+6 failures:
+7
+---
+ tests/rustdoc-ui/doctest/failed-doctest-output.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/rustdoc-ui/doctest/failed-doctest-output.rs b/tests/rustdoc-ui/doctest/failed-doctest-output.rs
+index d4d49b73793e6..9c44f7ce23281 100644
+--- a/tests/rustdoc-ui/doctest/failed-doctest-output.rs
++++ b/tests/rustdoc-ui/doctest/failed-doctest-output.rs
+@@ -8,5 +8,5 @@
+ //@ compile-flags:--test --test-args --test-threads=1
+ //@ rustc-env:RUST_BACKTRACE=0
+-//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
++//@ normalize-stdout-test: "[[:graph:]]*tests/rustdoc-ui/doctest" -> "$$DIR"
+ //@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
+ //@ failure-status: 101
diff --git a/experimental/rust-beta/0008-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch b/experimental/rust-beta/0008-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch
new file mode 100644
index 000000000..43f0f37f2
--- /dev/null
+++ b/experimental/rust-beta/0008-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch
@@ -0,0 +1,22 @@
+From cf671a6f53fe74b02aa48c0206d48506d6cdd7cd Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Mon, 17 Sep 2018 01:32:20 +0000
+Subject: [PATCH 08/12] test/sysroot-crates-are-unstable: Fix test when rpath is
+ disabled
+
+Without this environment var, the test can't run rustc to find
+the sysroot path.
+---
+ tests/run-make/sysroot-crates-are-unstable/Makefile | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/tests/run-make/sysroot-crates-are-unstable/Makefile b/tests/run-make/sysroot-crates-are-unstable/Makefile
+index 1e267fb9576ba..30c33c5c13d20 100644
+--- a/tests/run-make/sysroot-crates-are-unstable/Makefile
++++ b/tests/run-make/sysroot-crates-are-unstable/Makefile
+@@ -1,2 +1,4 @@
++-include ../tools.mk
++
+ all:
+- '$(PYTHON)' test.py
++ env '$(HOST_RPATH_ENV)' '$(PYTHON)' test.py
diff --git a/experimental/rust-beta/0009-Ignore-broken-and-non-applicable-tests.patch b/experimental/rust-beta/0009-Ignore-broken-and-non-applicable-tests.patch
new file mode 100644
index 000000000..b8b1b8932
--- /dev/null
+++ b/experimental/rust-beta/0009-Ignore-broken-and-non-applicable-tests.patch
@@ -0,0 +1,47 @@
+From cc6d3d3ab26517d5f8f09536b016154944bdceff Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 16 Sep 2018 16:38:48 +0000
+Subject: [PATCH 09/12] Ignore broken and non-applicable tests
+
+env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
+long-linker-command-lines: takes >10 minutes to run (but still passes)
+sysroot-crates-are-unstable: can't run rustc without RPATH
+---
+ tests/run-make/long-linker-command-lines/Makefile | 2 ++
+ tests/run-make/sysroot-crates-are-unstable/Makefile | 2 ++
+ tests/ui/process/env-funky-keys.rs | 1 +
+ 3 files changed, 7 insertions(+)
+
+diff --git a/tests/run-make/long-linker-command-lines/Makefile b/tests/run-make/long-linker-command-lines/Makefile
+index f864ea74f4a95..f16eaf544cc3f 100644
+--- a/tests/run-make/long-linker-command-lines/Makefile
++++ b/tests/run-make/long-linker-command-lines/Makefile
+@@ -1,4 +1,6 @@
+ # ignore-cross-compile
++# ignore-test
++
+ include ../tools.mk
+
+ export LD_LIBRARY_PATH := $(HOST_RPATH_DIR)
+diff --git a/tests/run-make/sysroot-crates-are-unstable/Makefile b/tests/run-make/sysroot-crates-are-unstable/Makefile
+index 30c33c5c13d20..d733bb1c557f5 100644
+--- a/tests/run-make/sysroot-crates-are-unstable/Makefile
++++ b/tests/run-make/sysroot-crates-are-unstable/Makefile
+@@ -1,3 +1,5 @@
++# ignore-test
++
+ -include ../tools.mk
+
+ all:
+diff --git a/tests/ui/env-funky-keys.rs b/tests/ui/env-funky-keys.rs
+index 314ccaea01525..7f5b9efaa10b1 100644
+--- a/tests/ui/process/env-funky-keys.rs
++++ b/tests/ui/process/env-funky-keys.rs
+@@ -1,6 +1,7 @@
+ //@ run-pass
+ // Ignore this test on Android, because it segfaults there.
+
++//@ ignore-test
+ //@ ignore-android
+ //@ ignore-windows
+ //@ ignore-wasm32 no execve
diff --git a/experimental/rust-beta/0010-Link-stage-2-tools-dynamically-to-libstd.patch b/experimental/rust-beta/0010-Link-stage-2-tools-dynamically-to-libstd.patch
new file mode 100644
index 000000000..372948d85
--- /dev/null
+++ b/experimental/rust-beta/0010-Link-stage-2-tools-dynamically-to-libstd.patch
@@ -0,0 +1,22 @@
+From 4443dc788cea90bdb1f9e5f3d9b702a3be46d4ed Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Mon, 24 Sep 2018 23:42:23 +0000
+Subject: [PATCH 10/12] Link stage 2 tools dynamically to libstd
+
+---
+ src/bootstrap/src/core/builder.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs
+index cd276674dee6b..a16297b4fe6cc 100644
+--- a/src/bootstrap/src/core/builder.rs
++++ b/src/bootstrap/src/core/builder.rs
+@@ -2146,7 +2146,7 @@ impl<'a> Builder<'a> {
+ // When we build Rust dylibs they're all intended for intermediate
+ // usage, so make sure we pass the -Cprefer-dynamic flag instead of
+ // linking all deps statically into the dylib.
+- if matches!(mode, Mode::Std | Mode::Rustc) {
++ if matches!(mode, Mode::Std | Mode::Rustc | Mode::ToolRustc) {
+ rustflags.arg("-Cprefer-dynamic");
+ }
+
diff --git a/experimental/rust-beta/0011-Move-debugger-scripts-to-usr-share-rust.patch b/experimental/rust-beta/0011-Move-debugger-scripts-to-usr-share-rust.patch
new file mode 100644
index 000000000..604e223e8
--- /dev/null
+++ b/experimental/rust-beta/0011-Move-debugger-scripts-to-usr-share-rust.patch
@@ -0,0 +1,66 @@
+From 762d3cd3f87b7fdbb885e1bcd4d1314437dd9377 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Mon, 17 Sep 2018 02:09:10 +0000
+Subject: [PATCH 11/12] Move debugger scripts to /usr/share/rust
+
+---
+ src/bootstrap/dist.rs | 2 +-
+ src/etc/rust-gdb | 2 +-
+ src/etc/rust-gdbgui | 2 +-
+ src/etc/rust-lldb | 4 ++--
+ 4 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
+index 76aad16c1fc26..db53459e8cae4 100644
+--- a/src/bootstrap/src/core/build_steps/dist.rs
++++ b/src/bootstrap/src/core/build_steps/dist.rs
+@@ -521,7 +521,7 @@ impl Step for DebuggerScripts {
+ fn run(self, builder: &Builder<'_>) {
+ let host = self.host;
+ let sysroot = self.sysroot;
+- let dst = sysroot.join("lib/rustlib/etc");
++ let dst = sysroot.join("share/rust");
+ t!(fs::create_dir_all(&dst));
+ let cp_debugger_script = |file: &str| {
+ builder.install(&builder.src.join("src/etc/").join(file), &dst, 0o644);
+diff --git a/src/etc/rust-gdb b/src/etc/rust-gdb
+index 9abed30ea6f73..4c7f953edfa46 100755
+--- a/src/etc/rust-gdb
++++ b/src/etc/rust-gdb
+@@ -12,7 +12,7 @@ fi
+
+ # Find out where the pretty printer Python module is
+ RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)"
+-GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
++GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/share/rust"
+ # Get the commit hash for path remapping
+ RUSTC_COMMIT_HASH="$("$RUSTC" -vV | sed -n 's/commit-hash: \([a-zA-Z0-9_]*\)/\1/p')"
+
+diff --git a/src/etc/rust-gdbgui b/src/etc/rust-gdbgui
+index 913269316bd4c..f444fbc4b104e 100755
+--- a/src/etc/rust-gdbgui
++++ b/src/etc/rust-gdbgui
+@@ -41,7 +41,7 @@ fi
+
+ # Find out where the pretty printer Python module is
+ RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)"
+-GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
++GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/share/rust"
+ # Get the commit hash for path remapping
+ RUSTC_COMMIT_HASH="$("$RUSTC" -vV | sed -n 's/commit-hash: \([a-zA-Z0-9_]*\)/\1/p')"
+
+diff --git a/src/etc/rust-lldb b/src/etc/rust-lldb
+index bce72f1bad698..8abb012452787 100755
+--- a/src/etc/rust-lldb
++++ b/src/etc/rust-lldb
+@@ -30,8 +30,8 @@ EOF
+ fi
+ fi
+
+-script_import="command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_lookup.py\""
+-commands_file="$RUSTC_SYSROOT/lib/rustlib/etc/lldb_commands"
++script_import="command script import \"$RUSTC_SYSROOT/share/rust/lldb_lookup.py\""
++commands_file="$RUSTC_SYSROOT/share/rust/lldb_commands"
+
+ # Call LLDB with the commands added to the argument list
+ exec "$lldb" --one-line-before-file "$script_import" --source-before-file "$commands_file" "$@"
diff --git a/experimental/rust-beta/0012-Add-foxkit-target-specs.patch b/experimental/rust-beta/0012-Add-foxkit-target-specs.patch
new file mode 100644
index 000000000..0303369ed
--- /dev/null
+++ b/experimental/rust-beta/0012-Add-foxkit-target-specs.patch
@@ -0,0 +1,206 @@
+From 7e50215a21b198c73fe575d28c847fd645c4ee40 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Mon, 17 Sep 2018 02:29:06 +0000
+Subject: [PATCH 12/12] Add foxkit target specs
+
+---
+ .../src/spec/targets/aarch64_foxkit_linux_musl.rs | 11 +++++++++++
+ .../src/spec/targets/armv7_foxkit_linux_musleabihf.rs | 11 +++++++++++
+ .../rustc_target/src/spec/targets/i586_foxkit_linux_musl.rs | 11 +++++++++++
+ compiler/rustc_target/src/spec/mod.rs | 7 +++++++
+ .../src/spec/targets/powerpc64_foxkit_linux_musl.rs | 11 +++++++++++
+ .../src/spec/targets/powerpc_foxkit_linux_musl.rs | 11 +++++++++++
+ .../rustc_target/src/spec/targets/x86_64_foxkit_linux_musl.rs | 11 +++++++++++
+ 7 files changed, 73 insertions(+)
+ create mode 100644 compiler/rustc_target/src/spec/targets/aarch64_foxkit_linux_musl.rs
+ create mode 100644 compiler/rustc_target/src/spec/targets/armv7_foxkit_linux_musleabihf.rs
+ create mode 100644 compiler/rustc_target/src/spec/targets/i586_foxkit_linux_musl.rs
+ create mode 100644 compiler/rustc_target/src/spec/targets/powerpc64_foxkit_linux_musl.rs
+ create mode 100644 compiler/rustc_target/src/spec/targets/powerpc_foxkit_linux_musl.rs
+ create mode 100644 compiler/rustc_target/src/spec/targets/x86_64_foxkit_linux_musl.rs
+
+diff --git a/compiler/rustc_target/src/spec/targets/aarch64_foxkit_linux_musl.rs b/compiler/rustc_target/src/spec/targets/aarch64_foxkit_linux_musl.rs
+new file mode 100644
+index 00000000000..4bdd51af4fe
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/targets/aarch64_foxkit_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::aarch64_unknown_linux_musl::target();
++
++ base.llvm_target = "aarch64-foxkit-linux-musl".into();
++ base.vendor = "foxkit".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+diff --git a/compiler/rustc_target/src/spec/targets/armv7_foxkit_linux_musleabihf.rs b/compiler/rustc_target/src/spec/targets/armv7_foxkit_linux_musleabihf.rs
+new file mode 100644
+index 00000000000..994f3c39e7c
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/targets/armv7_foxkit_linux_musleabihf.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::armv7_unknown_linux_musleabihf::target();
++
++ base.llvm_target = "armv7-foxkit-linux-musleabihf".into();
++ base.vendor = "foxkit".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+diff --git a/compiler/rustc_target/src/spec/targets/i586_foxkit_linux_musl.rs b/compiler/rustc_target/src/spec/targets/i586_foxkit_linux_musl.rs
+new file mode 100644
+index 00000000000..028e4b5e930
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/targets/i586_foxkit_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::i586_unknown_linux_musl::target();
++
++ base.llvm_target = "i586-foxkit-linux-musl".into();
++ base.vendor = "foxkit".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
+index 92678aed5b1..66a408d0b36 100644
+--- a/compiler/rustc_target/src/spec/mod.rs
++++ b/compiler/rustc_target/src/spec/mod.rs
+@@ -1533,6 +1533,13 @@ fn $module() {
+ }
+
+ supported_targets! {
++ ("aarch64-foxkit-linux-musl", aarch64_foxkit_linux_musl),
++ ("armv7-foxkit-linux-musleabihf", armv7_foxkit_linux_musleabihf),
++ ("i586-foxkit-linux-musl", i586_foxkit_linux_musl),
++ ("powerpc-foxkit-linux-musl", powerpc_foxkit_linux_musl),
++ ("powerpc64-foxkit-linux-musl", powerpc64_foxkit_linux_musl),
++ ("x86_64-foxkit-linux-musl", x86_64_foxkit_linux_musl),
++
+ ("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu),
+ ("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32),
+ ("i686-unknown-linux-gnu", i686_unknown_linux_gnu),
+diff --git a/compiler/rustc_target/src/spec/targets/powerpc64_foxkit_linux_musl.rs b/compiler/rustc_target/src/spec/targets/powerpc64_foxkit_linux_musl.rs
+new file mode 100644
+index 00000000000..04a50f84b60
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/targets/powerpc64_foxkit_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::powerpc64_unknown_linux_musl::target();
++
++ base.llvm_target = "powerpc64-foxkit-linux-musl".into();
++ base.vendor = "foxkit".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+diff --git a/compiler/rustc_target/src/spec/targets/powerpc_foxkit_linux_musl.rs b/compiler/rustc_target/src/spec/targets/powerpc_foxkit_linux_musl.rs
+new file mode 100644
+index 00000000000..7bca52c4299
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/targets/powerpc_foxkit_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::powerpc_unknown_linux_musl::target();
++
++ base.llvm_target = "powerpc-foxkit-linux-musl".into();
++ base.vendor = "foxkit".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+diff --git a/compiler/rustc_target/src/spec/targets/x86_64_foxkit_linux_musl.rs b/compiler/rustc_target/src/spec/targets/x86_64_foxkit_linux_musl.rs
+new file mode 100644
+index 00000000000..1ff73687c00
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/targets/x86_64_foxkit_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::x86_64_unknown_linux_musl::target();
++
++ base.llvm_target = "x86_64-foxkit-linux-musl".into();
++ base.vendor = "foxkit".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+--
+2.35.1
+
+--- rustc-1.80.0-src/tests/assembly/targets/targets-elf.rs.old 2006-07-23 20:21:28.000000000 -0500
++++ rustc-1.80.0-src/tests/assembly/targets/targets-elf.rs 2024-07-30 09:49:06.031041198 -0500
+@@ -9,6 +9,9 @@
+ //@ revisions: aarch64_be_unknown_netbsd
+ //@ [aarch64_be_unknown_netbsd] compile-flags: --target aarch64_be-unknown-netbsd
+ //@ [aarch64_be_unknown_netbsd] needs-llvm-components: aarch64
++//@ revisions: aarch64_foxkit_linux_musl
++//@ [aarch64_foxkit_linux_musl] compile-flags: --target aarch64-foxkit-linux-musl
++//@ [aarch64_foxkit_linux_musl] needs-llvm-components: aarch64
+ //@ revisions: aarch64_fuchsia
+ //@ [aarch64_fuchsia] compile-flags: --target aarch64-fuchsia
+ //@ [aarch64_fuchsia] needs-llvm-components: aarch64
+@@ -120,6 +123,9 @@
+ //@ revisions: armv6k_nintendo_3ds
+ //@ [armv6k_nintendo_3ds] compile-flags: --target armv6k-nintendo-3ds
+ //@ [armv6k_nintendo_3ds] needs-llvm-components: arm
++//@ revisions: armv7_foxkit_linux_musleabihf
++//@ [armv7_foxkit_linux_musleabihf] compile-flags: --target armv7-foxkit-linux-musleabihf
++//@ [armv7_foxkit_linux_musleabihf] needs-llvm-components: arm
+ //@ revisions: armv7_linux_androideabi
+ //@ [armv7_linux_androideabi] compile-flags: --target armv7-linux-androideabi
+ //@ [armv7_linux_androideabi] needs-llvm-components: arm
+@@ -192,6 +198,9 @@
+ //@ revisions: hexagon_unknown_none_elf
+ //@ [hexagon_unknown_none_elf] compile-flags: --target hexagon-unknown-none-elf
+ //@ [hexagon_unknown_none_elf] needs-llvm-components: hexagon
++//@ revisions: i586_foxkit_linux_musl
++//@ [i586_foxkit_linux_musl] compile-flags: --target i586-foxkit-linux-musl
++//@ [i586_foxkit_linux_musl] needs-llvm-components: x86
+ //@ revisions: i586_pc_nto_qnx700
+ //@ [i586_pc_nto_qnx700] compile-flags: --target i586-pc-nto-qnx700
+ //@ [i586_pc_nto_qnx700] needs-llvm-components: x86
+@@ -309,6 +318,9 @@
+ //@ revisions: msp430_none_elf
+ //@ [msp430_none_elf] compile-flags: --target msp430-none-elf
+ //@ [msp430_none_elf] needs-llvm-components: msp430
++//@ revisions: powerpc64_foxkit_linux_musl
++//@ [powerpc64_foxkit_linux_musl] compile-flags: --target powerpc64-foxkit-linux-musl
++//@ [powerpc64_foxkit_linux_musl] needs-llvm-components: powerpc
+ //@ revisions: powerpc64_unknown_freebsd
+ //@ [powerpc64_unknown_freebsd] compile-flags: --target powerpc64-unknown-freebsd
+ //@ [powerpc64_unknown_freebsd] needs-llvm-components: powerpc
+@@ -333,6 +345,9 @@
+ //@ revisions: powerpc64le_unknown_linux_musl
+ //@ [powerpc64le_unknown_linux_musl] compile-flags: --target powerpc64le-unknown-linux-musl
+ //@ [powerpc64le_unknown_linux_musl] needs-llvm-components: powerpc
++//@ revisions: powerpc_foxkit_linux_musl
++//@ [powerpc_foxkit_linux_musl] compile-flags: --target powerpc-foxkit-linux-musl
++//@ [powerpc_foxkit_linux_musl] needs-llvm-components: powerpc
+ //@ revisions: powerpc_unknown_freebsd
+ //@ [powerpc_unknown_freebsd] compile-flags: --target powerpc-unknown-freebsd
+ //@ [powerpc_unknown_freebsd] needs-llvm-components: powerpc
+@@ -510,6 +525,9 @@
+ //@ revisions: x86_64_fortanix_unknown_sgx
+ //@ [x86_64_fortanix_unknown_sgx] compile-flags: --target x86_64-fortanix-unknown-sgx
+ //@ [x86_64_fortanix_unknown_sgx] needs-llvm-components: x86
++//@ revisions: x86_64_foxkit_linux_musl
++//@ [x86_64_foxkit_linux_musl] compile-flags: --target x86_64-foxkit-linux-musl
++//@ [x86_64_foxkit_linux_musl] needs-llvm-components: x86
+ //@ revisions: x86_64_fuchsia
+ //@ [x86_64_fuchsia] compile-flags: --target x86_64-fuchsia
+ //@ [x86_64_fuchsia] needs-llvm-components: x86
diff --git a/experimental/rust-beta/APKBUILD b/experimental/rust-beta/APKBUILD
new file mode 100644
index 000000000..9cc11d211
--- /dev/null
+++ b/experimental/rust-beta/APKBUILD
@@ -0,0 +1,296 @@
+# Maintainer: Samuel Holland <samuel@sholland.org>
+pkgname=rust
+pkgver=1.81.0_beta20240730
+_bootver=1.80.0-r0
+_llvmver=18
+pkgrel=0
+pkgdesc="The Rust Programming Language"
+url="https://www.rust-lang.org"
+arch="all"
+options="!check" # Failures on aarch64 and ppc64.
+license="(Apache-2.0 OR MIT) AND (NCSA OR MIT) AND BSD-2-Clause AND BSD-3-Clause"
+depends="$pkgname-std=$pkgver-r$pkgrel gcc musl-dev"
+makedepends="
+ curl-dev
+ llvm$_llvmver-dev
+ llvm$_llvmver-test-utils
+ openssl-dev
+ python3
+ cargo-bootstrap=$_bootver
+ rust-bootstrap=$_bootver
+ rustfmt-bootstrap=$_bootver
+ zlib-dev
+ "
+provides="$pkgname-bootstrap=$pkgver-r$pkgrel"
+subpackages="
+ $pkgname-dbg
+ $pkgname-std
+ $pkgname-analysis
+ $pkgname-doc
+ $pkgname-gdb::noarch
+ $pkgname-lldb::noarch
+ $pkgname-src::noarch
+ cargo
+ cargo-clippy:_cargo_clippy
+ cargo-fmt:_cargo_fmt
+ cargo-doc:_cargo_doc:noarch
+ cargo-bash-completion:_cargo_bashcomp:noarch
+ cargo-zsh-completion:_cargo_zshcomp:noarch
+ rustfmt
+ "
+source="https://static.rust-lang.org/dist/rustc-beta-src.tar.xz
+ 0001-Fix-LLVM-build.patch
+ 0002-Fix-linking-to-zlib-when-cross-compiling.patch
+ 0003-Fix-rustdoc-when-cross-compiling-on-musl.patch
+ 0004-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch
+ 0005-Prefer-libgcc_eh-over-libunwind-for-musl.patch
+ 0006-Link-libssp_nonshared.a-on-all-musl-targets.patch
+ 0007-test-failed-doctest-output-Fix-normalization.patch
+ 0008-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch
+ 0009-Ignore-broken-and-non-applicable-tests.patch
+ 0010-Link-stage-2-tools-dynamically-to-libstd.patch
+ 0011-Move-debugger-scripts-to-usr-share-rust.patch
+ 0012-Add-foxkit-target-specs.patch
+ powerpc-atomics.patch
+ stdarch-ppc.patch
+ ui-test-strings.patch
+ "
+builddir="$srcdir/rustc-beta-src"
+_rlibdir="/usr/lib/rustlib/$CTARGET/lib"
+
+build() {
+ cat > config.toml <<- EOF
+ [build]
+ doc-stage = 2
+ build-stage = 2
+ test-stage = 2
+ build = "$CBUILD"
+ host = [ "$CHOST" ]
+ target = [ "$CTARGET" ]
+ cargo = "/usr/bin/cargo"
+ rustc = "/usr/bin/rustc"
+ rustfmt = "/usr/bin/rustfmt"
+ docs = true
+ compiler-docs = false
+ submodules = false
+ python = "python3"
+ locked-deps = true
+ vendor = true
+ extended = true
+ tools = [ "analysis", "cargo", "clippy", "rustfmt", "src" ]
+ verbose = 1
+ sanitizers = false
+ profiler = false
+ cargo-native-static = false
+ [install]
+ prefix = "/usr"
+ [rust]
+ optimize = true
+ debug = false
+ codegen-units = 1
+ debuginfo-level = 2
+ debuginfo-level-rustc = 0
+ debuginfo-level-tests = 0
+ backtrace = true
+ incremental = false
+ parallel-compiler = false
+ channel = "beta"
+ description = "Adelie ${pkgver}-r${pkgrel} [BETA]"
+ rpath = false
+ verbose-tests = true
+ optimize-tests = true
+ codegen-tests = true
+ dist-src = false
+ lld = false
+ use-lld = false
+ llvm-tools = false
+ backtrace-on-ice = true
+ remap-debuginfo = false
+ jemalloc = false
+ llvm-libunwind = "no"
+ new-symbol-mangling = true
+ [target.$CTARGET]
+ cc = "$CTARGET-gcc"
+ cxx = "$CTARGET-g++"
+ ar = "ar"
+ ranlib = "ranlib"
+ linker = "$CTARGET-gcc"
+ llvm-config = "/usr/lib/llvm$_llvmver/bin/llvm-config"
+ crt-static = false
+ [dist]
+ src-tarball = false
+ compression-formats = [ "xz" ]
+ EOF
+
+ LLVM_LINK_SHARED=1 \
+ RUST_BACKTRACE=1 \
+ python3 x.py dist -j ${JOBS:-2}
+}
+
+check() {
+ LLVM_LINK_SHARED=1 \
+ python3 x.py test -j ${JOBS:-2} --no-doc tests/
+}
+
+package() {
+ cd "$builddir"/build/dist
+
+ old_pkgver=$pkgver
+ pkgver=beta
+ tar xf rust-$pkgver-$CTARGET.tar.xz
+ rust-$pkgver-$CTARGET/install.sh \
+ --destdir="$pkgdir" \
+ --prefix=/usr \
+ --sysconfdir="$pkgdir"/etc \
+ --disable-ldconfig
+ tar xf rust-src-$pkgver.tar.xz
+ rust-src-$pkgver/install.sh \
+ --destdir="$pkgdir" \
+ --prefix=/usr \
+ --disable-ldconfig
+ pkgver=$old_pkgver
+
+ rm "$pkgdir"/usr/lib/rustlib/components \
+ "$pkgdir"/usr/lib/rustlib/install.log \
+ "$pkgdir"/usr/lib/rustlib/manifest-* \
+ "$pkgdir"/usr/lib/rustlib/rust-installer-version \
+ "$pkgdir"/usr/lib/rustlib/uninstall.sh
+}
+
+std() {
+ pkgdesc="Standard library for Rust"
+ depends="musl-utils"
+
+ _mv "$pkgdir"$_rlibdir/*.so "$subpkgdir"$_rlibdir
+
+ mkdir -p "$subpkgdir"/etc/ld.so.conf.d
+ echo "$_rlibdir" > "$subpkgdir"/etc/ld.so.conf.d/$pkgname.conf
+}
+
+analysis() {
+ pkgdesc="Compiler analysis data for the Rust standard library"
+ depends="$pkgname=$pkgver-r$pkgrel $pkgname-std=$pkgver-r$pkgrel"
+
+ _mv "$pkgdir"${_rlibdir%/*}/analysis "$subpkgdir"${_rlibdir%/*}
+}
+
+gdb() {
+ pkgdesc="GDB pretty printers for Rust"
+ license="Apache-2.0 OR MIT"
+ depends="$pkgname gdb"
+ install_if="$pkgname=$pkgver-r$pkgrel gdb"
+
+ _mv "$pkgdir"/usr/bin/rust-gdb "$subpkgdir"/usr/bin
+ _mv "$pkgdir"/usr/bin/rust-gdbgui "$subpkgdir"/usr/bin
+ _mv "$pkgdir"/usr/share/rust/gdb_*.py "$subpkgdir"/usr/share/rust
+}
+
+lldb() {
+ pkgdesc="LLDB pretty printers for Rust"
+ license="Apache-2.0 OR MIT"
+ depends="$pkgname lldb py3-lldb"
+ install_if="$pkgname=$pkgver-r$pkgrel lldb"
+
+ _mv "$pkgdir"/usr/bin/rust-lldb "$subpkgdir"/usr/bin
+ _mv "$pkgdir"/usr/share/rust/lldb_*.py "$subpkgdir"/usr/share/rust
+}
+
+src() {
+ pkgdesc="$pkgdesc (source code)"
+ depends=""
+
+ _mv "$pkgdir"/usr/lib/rustlib/src/rust "$subpkgdir"/usr/src
+ rmdir -p "$pkgdir"/usr/lib/rustlib/src 2>/dev/null || true
+
+ mkdir -p "$subpkgdir"/usr/lib/rustlib/src
+ ln -s ../../../src/rust "$subpkgdir"/usr/lib/rustlib/src/rust
+}
+
+cargo() {
+ pkgdesc="The Rust package manager"
+ provides="cargo-bootstrap=$pkgver-r$pkgrel"
+ depends="$pkgname-std=$pkgver-r$pkgrel $pkgname"
+
+ _mv "$pkgdir"/usr/bin/cargo "$subpkgdir"/usr/bin
+}
+
+_cargo_clippy() {
+ pkgdesc="A collection of Rust lints (cargo plugin)"
+ depends="$pkgname-std=$pkgver-r$pkgrel cargo"
+
+ _mv "$pkgdir"/usr/bin/cargo-clippy \
+ "$pkgdir"/usr/bin/clippy-driver \
+ "$subpkgdir"/usr/bin
+}
+
+_cargo_fmt() {
+ pkgdesc="Format Rust code (cargo plugin)"
+ depends="$pkgname-std=$pkgver-r$pkgrel cargo rustfmt"
+ install_if="cargo=$pkgver-r$pkgrel rustfmt=$pkgver-r$pkgrel"
+
+ _mv "$pkgdir"/usr/bin/cargo-fmt "$subpkgdir"/usr/bin
+}
+
+_cargo_bashcomp() {
+ pkgdesc="Bash completion for cargo"
+ license="Apache-2.0 OR MIT"
+ depends=""
+ install_if="cargo=$pkgver-r$pkgrel bash-completion"
+
+ _mv "$pkgdir"/etc/bash_completion.d/cargo \
+ "$subpkgdir"/usr/share/bash-completion/completions
+ rmdir -p "$pkgdir"/etc/bash_completion.d 2>/dev/null || true
+}
+
+_cargo_zshcomp() {
+ pkgdesc="ZSH completion for cargo"
+ license="Apache-2.0 OR MIT"
+ depends=""
+ install_if="cargo=$pkgver-r$pkgrel zsh"
+
+ _mv "$pkgdir"/usr/share/zsh/site-functions/_cargo \
+ "$subpkgdir"/usr/share/zsh/site-functions/_cargo
+ rmdir -p "$pkgdir"/usr/share/zsh/site-functions 2>/dev/null || true
+}
+
+_cargo_doc() {
+ pkgdesc="The Rust package manager (documentation)"
+ license="Apache-2.0 OR MIT"
+ depends=""
+ install_if="cargo=$pkgver-r$pkgrel docs"
+
+ # XXX: This is hackish!
+ _mv "$pkgdir"/../$pkgname-doc/usr/share/man/man1/cargo* \
+ "$subpkgdir"/usr/share/man/man1
+}
+
+rustfmt() {
+ pkgdesc="Format Rust code"
+ provides="rustfmt-bootstrap=$pkgver-r$pkgrel"
+ depends="$pkgname-std=$pkgver-r$pkgrel"
+
+ _mv "$pkgdir"/usr/bin/rustfmt "$subpkgdir"/usr/bin
+}
+
+_mv() {
+ local dest; for dest; do true; done # get last argument
+ mkdir -p "$dest"
+ mv "$@"
+}
+
+sha512sums="4afb071d6980be244a38f82be37dcbccb8c1571d48fbacacaeeea5735a70205b1425e63c6c983bdfa5acda9cb83dcdaff6c9d366af9c5cfde2fb732a06d5072f rustc-beta-src.tar.xz
+59e69884ae98eb90c2ef481d191cca0fb58d904f2a87ccbd5bfa42a8ddeaee3e86aeb8cd99afa8e5b19adf6f229112bd00f8fec3487bd12165362750da07bf35 0001-Fix-LLVM-build.patch
+4408bbf1816194920ffa0770b78f0e25d1ff7487ead061e89a9f11a7d50e7b66d798661cf09eed1b1c186d3550b5de721dd82c9e9d5dabc4ce1edcfbbc84ae88 0002-Fix-linking-to-zlib-when-cross-compiling.patch
+7555557449704b96c922ed353fa770b7c22fd58ef401a4b4d206baacae960217a5cbca79fe0bbf1a2e6705ac3e20c98a042fe4ed111c0780ad83cef5ad73a2da 0003-Fix-rustdoc-when-cross-compiling-on-musl.patch
+f20b8b468687e74e7c9e859973ee2b7d15b277eabeeb1fffe84a129f733375fb347e70151f634c0c45ed3d7b5271e564d57a834a88360b209f02f2f31ee7b717 0004-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch
+6868fe48b7424d39c94ea560037ab4154a0b8f20a027617433d912a5ec60cf0bf1a49da165009345b75f8aedf7d0f81dd23135f9bb28d3f5cd081b56aa74a986 0005-Prefer-libgcc_eh-over-libunwind-for-musl.patch
+b34187a82cd3db02b8aac8f18147d653a7191b841e145460dfbff518a7747a6aa1c08721703929bfc7e446c9ed9512383a5eefaad2cb5c02d16e8f00d12627db 0006-Link-libssp_nonshared.a-on-all-musl-targets.patch
+3b452e5ad7e210e2cb208e0817538a353275143f2b8f4557b7945a51890caa3a32d4b82ccd7278eb0522c1ef8b8b5e6b2d93c08b785284e529373122b8c268b3 0007-test-failed-doctest-output-Fix-normalization.patch
+6850174cebb3dfb2f41e277b0b46db9cabe18c904f39a6775f8cd12dc6c237a7de820a5dc8c538f9b965c069b4197141f0613add096574a7df4ca2d1ae01ab4d 0008-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch
+f98ae741a9f33a0e3541c6c43a3eb86b653b202d70783435ea2cc1b35c1da8b6db796e9217e243050de05b9ea2520600c5e890481d2366a1da742aad3482fab2 0009-Ignore-broken-and-non-applicable-tests.patch
+19eb11ee4d4ce84edf20b7b0a575704ca26ef8a92cbbd6a0ee06bc1a9cbc287833e953f9fb9412366cdd698174b3001f022bb6fc2f33067dbe2960233698e721 0010-Link-stage-2-tools-dynamically-to-libstd.patch
+c6d94cbb80394d270302a2389c22b528583c4ad7298c7b3f657175912e0abd075b45ec847daa2c8e6e4eb38536a8a37461cd15d78c0f83771d816f11e1cf2e01 0011-Move-debugger-scripts-to-usr-share-rust.patch
+b8bafeae989b853b7003de1bf6bfb7ec64f66c55a7f56989250a500d793875b0b798e073dbff1bb75d0fc885977e70e6b1b2d4ce98ebca657a561f7920de19e1 0012-Add-foxkit-target-specs.patch
+5d57a7a18e0a7f8b7755de89255f97642e4fe585a02465de70227867ac99db84766cd25e702ae13c3a4488504bd4c84eb7e9ceb3a83fdf8f2df0eacf64cc16c1 powerpc-atomics.patch
+705409ef0bf6c690f47f4825a679252e5c446987703d6ba86bc1e80f81e047e7a5559a24924a166222e3f0d0b48f97e902e1ee82f3a977aa7f15fd2ef44f8f01 stdarch-ppc.patch
+c1cdcff68504e5b7b9d5f3081c83c8d8855d9523cc3539bd727f3dc78b7db70b4ce40c76852dd62fc50423128faf86ed8af1c65f7955134af85bc494dd376001 ui-test-strings.patch"
diff --git a/experimental/rust-beta/powerpc-atomics.patch b/experimental/rust-beta/powerpc-atomics.patch
new file mode 100644
index 000000000..1a7d4dbea
--- /dev/null
+++ b/experimental/rust-beta/powerpc-atomics.patch
@@ -0,0 +1,16 @@
+--- rustc-1.60.0-src/vendor/valuable-0.1.0/no_atomic.rs.old 2022-04-04 11:10:57.000000000 +0000
++++ rustc-1.60.0-src/vendor/valuable-0.1.0/no_atomic.rs 2022-11-23 07:36:37.687029241 +0000
+@@ -32,6 +32,7 @@
+ "mipsel-unknown-none",
+ "mipsisa32r6-unknown-linux-gnu",
+ "mipsisa32r6el-unknown-linux-gnu",
++ "powerpc-foxkit-linux-musl",
+ "powerpc-unknown-freebsd",
+ "powerpc-unknown-linux-gnu",
+ "powerpc-unknown-linux-gnuspe",
+--- rustc-1.60.0-src/vendor/valuable-0.1.0/.cargo-checksum.json.old 2022-04-04 11:10:57.000000000 +0000
++++ rustc-1.60.0-src/vendor/valuable-0.1.0/.cargo-checksum.json 2022-11-23 07:38:07.397357603 +0000
+@@ -1 +1 @@
+-{"files":{"Cargo.lock":"fea5e41d2befef0b42734010a85f95548b5255ff1e4ee2dd2e6827adb8fe5f3e","Cargo.toml":"995a2454b4e3e583124d60b694e106ebd193b9742df3e050a6f49e5801b3597b","benches/structable.rs":"1baad763d1b0900004682b139efd58b17c974dc2068ede2229f8786e4a21372e","build.rs":"4ad508d818c27ee58bf7da2b9b4b425dae3e2656850327b3080fe2ad38767928","examples/derive.rs":"238473e63c0647cdb6652f1613575e24b323d40db5c8f3e5c32d64a3ea6b4048","examples/hello_world.rs":"75e48360e53b37e077e574d9c1aa2754b197f551ac5d604b03ebec9d31bab5cf","examples/print.rs":"924c55402b18e518317acc013a6cf407fcc13532c1eca8d9cd5f5631e79df960","no_atomic.rs":"b1c5cb0bd10733eb20516d10edc047b45aa67943f3347ae44fb779ed7fc7aff2","src/enumerable.rs":"008fe833c558f7e956ba0238a9d66947a671f66c5762905ed79d48a428c0ad44","src/field.rs":"c3d96f215c4bfc2a3910d0616fb335332d17f7dcf93ca739c933d88e1f98d229","src/lib.rs":"6954630c4c7c389192f3f8b5097076bbba6e43b5c4cd4ec68b4ffc18bff0a5b4","src/listable.rs":"f1a0743ed650604634972c19b66505a5727a6a6e2d7b54861e65cdcf10949432","src/mappable.rs":"ef7d334ef00d6b34cbff45b73b13935de6659933abafff9ad3d5d2a16d7ccac1","src/named_values.rs":"df5009074379ea59b02ebaf730890d0a4b6fa5c67c4057cc60f84d3652ca2bc5","src/slice.rs":"e382f56eb14ea7848276a4c8bda537f5207a4a6ed7a4b2ee4d2dde7feebce3b4","src/structable.rs":"369b17701d59bab138eac22ec043d434a052f49976236cc5ee680e72ca23ed6e","src/tuplable.rs":"e8b64a0761263666d984257109b5d54337cd97be59f08b08ec153e68ec1636c5","src/valuable.rs":"f8fdef201d3181935330fb86b27c455a5c86079f9f2cad363cda765801d7dd50","src/value.rs":"479d2c5b9d84c930e3abfe0032734ad92b243cf095f5fea6226a9da5eec81484","src/visit.rs":"060bacd3e1c0b333692f96c3ca970ca47a859cc28700713630996d9f0dc1668e"},"package":"830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"}
+\ No newline at end of file
++{"files":{"Cargo.lock":"fea5e41d2befef0b42734010a85f95548b5255ff1e4ee2dd2e6827adb8fe5f3e","Cargo.toml":"995a2454b4e3e583124d60b694e106ebd193b9742df3e050a6f49e5801b3597b","benches/structable.rs":"1baad763d1b0900004682b139efd58b17c974dc2068ede2229f8786e4a21372e","build.rs":"4ad508d818c27ee58bf7da2b9b4b425dae3e2656850327b3080fe2ad38767928","examples/derive.rs":"238473e63c0647cdb6652f1613575e24b323d40db5c8f3e5c32d64a3ea6b4048","examples/hello_world.rs":"75e48360e53b37e077e574d9c1aa2754b197f551ac5d604b03ebec9d31bab5cf","examples/print.rs":"924c55402b18e518317acc013a6cf407fcc13532c1eca8d9cd5f5631e79df960","no_atomic.rs":"66d1146a63de2d24058f657aa14570038b96795a7facbab11402a96b6008f01a","src/enumerable.rs":"008fe833c558f7e956ba0238a9d66947a671f66c5762905ed79d48a428c0ad44","src/field.rs":"c3d96f215c4bfc2a3910d0616fb335332d17f7dcf93ca739c933d88e1f98d229","src/lib.rs":"6954630c4c7c389192f3f8b5097076bbba6e43b5c4cd4ec68b4ffc18bff0a5b4","src/listable.rs":"f1a0743ed650604634972c19b66505a5727a6a6e2d7b54861e65cdcf10949432","src/mappable.rs":"ef7d334ef00d6b34cbff45b73b13935de6659933abafff9ad3d5d2a16d7ccac1","src/named_values.rs":"df5009074379ea59b02ebaf730890d0a4b6fa5c67c4057cc60f84d3652ca2bc5","src/slice.rs":"e382f56eb14ea7848276a4c8bda537f5207a4a6ed7a4b2ee4d2dde7feebce3b4","src/structable.rs":"369b17701d59bab138eac22ec043d434a052f49976236cc5ee680e72ca23ed6e","src/tuplable.rs":"e8b64a0761263666d984257109b5d54337cd97be59f08b08ec153e68ec1636c5","src/valuable.rs":"f8fdef201d3181935330fb86b27c455a5c86079f9f2cad363cda765801d7dd50","src/value.rs":"479d2c5b9d84c930e3abfe0032734ad92b243cf095f5fea6226a9da5eec81484","src/visit.rs":"060bacd3e1c0b333692f96c3ca970ca47a859cc28700713630996d9f0dc1668e"},"package":"830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"}
diff --git a/experimental/rust-beta/stdarch-ppc.patch b/experimental/rust-beta/stdarch-ppc.patch
new file mode 100644
index 000000000..5b6b9cc5c
--- /dev/null
+++ b/experimental/rust-beta/stdarch-ppc.patch
@@ -0,0 +1,114 @@
+From 7ac103f60d54362a752361dee3e63e23b98a342a Mon Sep 17 00:00:00 2001
+From: Luca Barbato <lu_zero@gentoo.org>
+Date: Tue, 11 Jun 2024 09:49:16 +0000
+Subject: [PATCH] Use longer associated types in the Altivec traits
+
+---
+ crates/core_arch/src/powerpc/altivec.rs | 34 ++++++++++++-------------
+ 1 file changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/library/stdarch/crates/core_arch/src/powerpc/altivec.rs b/library/stdarch/crates/core_arch/src/powerpc/altivec.rs
+index 627809c6bc..29cdc41017 100644
+--- a/library/stdarch/crates/core_arch/src/powerpc/altivec.rs
++++ b/library/stdarch/crates/core_arch/src/powerpc/altivec.rs
+@@ -410,8 +410,8 @@ mod sealed {
+
+ #[unstable(feature = "stdarch_powerpc", issue = "111145")]
+ pub trait VectorInsert {
+- type S;
+- unsafe fn vec_insert<const IDX: u32>(self, s: Self::S) -> Self;
++ type Scalar;
++ unsafe fn vec_insert<const IDX: u32>(self, s: Self::Scalar) -> Self;
+ }
+
+ const fn idx_in_vec<T, const IDX: u32>() -> u32 {
+@@ -422,11 +422,11 @@ mod sealed {
+ ($ty:ident) => {
+ #[unstable(feature = "stdarch_powerpc", issue = "111145")]
+ impl VectorInsert for t_t_l!($ty) {
+- type S = $ty;
++ type Scalar = $ty;
+ #[inline]
+ #[target_feature(enable = "altivec")]
+- unsafe fn vec_insert<const IDX: u32>(self, s: Self::S) -> Self {
+- simd_insert(self, const { idx_in_vec::<Self::S, IDX>() }, s)
++ unsafe fn vec_insert<const IDX: u32>(self, s: Self::Scalar) -> Self {
++ simd_insert(self, const { idx_in_vec::<Self::Scalar, IDX>() }, s)
+ }
+ }
+ };
+@@ -442,19 +442,19 @@ mod sealed {
+
+ #[unstable(feature = "stdarch_powerpc", issue = "111145")]
+ pub trait VectorExtract {
+- type S;
+- unsafe fn vec_extract<const IDX: u32>(self) -> Self::S;
++ type Scalar;
++ unsafe fn vec_extract<const IDX: u32>(self) -> Self::Scalar;
+ }
+
+ macro_rules! impl_vec_extract {
+ ($ty:ident) => {
+ #[unstable(feature = "stdarch_powerpc", issue = "111145")]
+ impl VectorExtract for t_t_l!($ty) {
+- type S = $ty;
++ type Scalar = $ty;
+ #[inline]
+ #[target_feature(enable = "altivec")]
+- unsafe fn vec_extract<const IDX: u32>(self) -> Self::S {
+- simd_extract(self, const { idx_in_vec::<Self::S, IDX>() })
++ unsafe fn vec_extract<const IDX: u32>(self) -> Self::Scalar {
++ simd_extract(self, const { idx_in_vec::<Self::Scalar, IDX>() })
+ }
+ }
+ };
+@@ -3233,18 +3233,18 @@ mod sealed {
+
+ #[unstable(feature = "stdarch_powerpc", issue = "111145")]
+ pub trait VectorRl {
+- type B;
+- unsafe fn vec_rl(self, b: Self::B) -> Self;
++ type Shift;
++ unsafe fn vec_rl(self, b: Self::Shift) -> Self;
+ }
+
+ macro_rules! impl_vec_rl {
+ ($fun:ident ($a:ident)) => {
+ #[unstable(feature = "stdarch_powerpc", issue = "111145")]
+ impl VectorRl for $a {
+- type B = t_u!($a);
++ type Shift = t_u!($a);
+ #[inline]
+ #[target_feature(enable = "altivec")]
+- unsafe fn vec_rl(self, b: Self::B) -> Self {
++ unsafe fn vec_rl(self, b: Self::Shift) -> Self {
+ transmute($fun(transmute(self), b))
+ }
+ }
+@@ -3292,7 +3292,7 @@ mod sealed {
+ #[inline]
+ #[target_feature(enable = "altivec")]
+ #[unstable(feature = "stdarch_powerpc", issue = "111145")]
+-pub unsafe fn vec_insert<T, const IDX: u32>(a: T, b: <T as sealed::VectorInsert>::S) -> T
++pub unsafe fn vec_insert<T, const IDX: u32>(a: T, b: <T as sealed::VectorInsert>::Scalar) -> T
+ where
+ T: sealed::VectorInsert,
+ {
+@@ -3310,7 +3310,7 @@ where
+ #[inline]
+ #[target_feature(enable = "altivec")]
+ #[unstable(feature = "stdarch_powerpc", issue = "111145")]
+-pub unsafe fn vec_extract<T, const IDX: u32>(a: T) -> <T as sealed::VectorExtract>::S
++pub unsafe fn vec_extract<T, const IDX: u32>(a: T) -> <T as sealed::VectorExtract>::Scalar
+ where
+ T: sealed::VectorExtract,
+ {
+@@ -3949,7 +3949,7 @@ where
+ #[inline]
+ #[target_feature(enable = "altivec")]
+ #[unstable(feature = "stdarch_powerpc", issue = "111145")]
+-pub unsafe fn vec_rl<T>(a: T, b: <T as sealed::VectorRl>::B) -> T
++pub unsafe fn vec_rl<T>(a: T, b: <T as sealed::VectorRl>::Shift) -> T
+ where
+ T: sealed::VectorRl,
+ {
diff --git a/experimental/rust-beta/ui-test-strings.patch b/experimental/rust-beta/ui-test-strings.patch
new file mode 100644
index 000000000..182a233b0
--- /dev/null
+++ b/experimental/rust-beta/ui-test-strings.patch
@@ -0,0 +1,25 @@
+check-cfg/well-known-values: We add our own vendor, so we need to include it.
+
+codegen/duplicated-path-in-error: musl's ldso error doesn't match glibc's.
+
+diff --git a/tests/ui/check-cfg/well-known-values.stderr b/tests/ui/check-cfg/well-known-values.stderr
+index 00abb5f5e5c..84648541fb7 100644
+--- a/tests/ui/check-cfg/well-known-values.stderr
++++ b/tests/ui/check-cfg/well-known-values.stderr
+@@ -230,7 +230,7 @@ warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ LL | target_vendor = "_UNEXPECTED_VALUE",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+- = note: expected values for `target_vendor` are: `apple`, `espressif`, `fortanix`, `ibm`, `kmc`, `nintendo`, `nvidia`, `pc`, `risc0`, `sony`, `sun`, `unikraft`, `unknown`, `uwp`, `win7`, and `wrs`
++ = note: expected values for `target_vendor` are: `apple`, `espressif`, `fortanix`, `foxkit`, `ibm`, `kmc`, `nintendo`, `nvidia`, `pc`, `risc0`, `sony`, `sun`, `unikraft`, `unknown`, `uwp`, `win7`, and `wrs`
+ = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
+
+ warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+diff --git a/tests/ui/codegen/duplicated-path-in-error.stderr b/tests/ui/codegen/duplicated-path-in-error.stderr
+index d0d34e2f934..2892ebffdde 100644
+--- a/tests/ui/codegen/duplicated-path-in-error.stderr
++++ b/tests/ui/codegen/duplicated-path-in-error.stderr
+@@ -1,2 +1,2 @@
+-error: couldn't load codegen backend /non-existing-one.so: cannot open shared object file: No such file or directory
++error: couldn't load codegen backend /non-existing-one.so: Error loading shared library /non-existing-one.so: No such file or directory
+
diff --git a/experimental/sbcl/APKBUILD b/experimental/sbcl/APKBUILD
new file mode 100644
index 000000000..c7217542d
--- /dev/null
+++ b/experimental/sbcl/APKBUILD
@@ -0,0 +1,35 @@
+# Contributor: Lee Starnes <lee@canned-death.us>
+# Maintainer: Lee Starnes <lee@canned-death.us>
+pkgname=sbcl
+pkgver=2.0.5
+pkgrel=0
+pkgdesc="Steel Bank Common Lisp"
+url="http://www.sbcl.org"
+arch="all !armv7"
+license="BSD-2-Clause AND BSD-2-Clause-FreeBSD AND BSD-3-Clause AND MIT"
+depends=""
+makedepends="clisp clisp-dev"
+checkdepends="ed"
+subpackages="$pkgname-doc"
+source="https://sourceforge.net/projects/$pkgname/files/$pkgname/$pkgver/$pkgname-$pkgver-source.tar.bz2"
+
+prepare() {
+ default_prepare
+
+ # run-program test is hard-coded to use /bin/ed but it should be /usr/bin/ed
+ sed -i 's,/bin/ed,/usr/bin/ed,g' tests/run-program.impure.lisp
+}
+
+build() {
+ ./make.sh --prefix=/usr --with-dlclose-is-noop --xc-host=clisp
+}
+
+check() {
+ cd tests && sh run-tests.sh
+}
+
+package() {
+ INSTALL_ROOT="$pkgdir"/usr sh install.sh
+}
+
+sha512sums="0c27e22dd76d157a74ef7e97dcd03030096dde0eb46901ea27acb60faa0ab34881d76a9c6708d963b0e6f62da6331b85b8d3de76fd1fc9163c159e631759f808 sbcl-2.0.5-source.tar.bz2"
diff --git a/experimental/spirv-llvm-translator/APKBUILD b/experimental/spirv-llvm-translator/APKBUILD
new file mode 100644
index 000000000..f6dd0ff2e
--- /dev/null
+++ b/experimental/spirv-llvm-translator/APKBUILD
@@ -0,0 +1,50 @@
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=spirv-llvm-translator
+pkgver=18.1.6
+_llvmver=$(echo $pkgver | cut -f1 -d.)
+pkgrel=0
+pkgdesc="A tool and a library for bi-directional translation between SPIR-V and LLVM IR"
+url=" "
+arch="all"
+license="NCSA"
+depends=""
+makedepends="cmake llvm${_llvmver}-dev spirv-headers spirv-tools-dev"
+subpackages="$pkgname-dev"
+source="SPIRV-LLVM-Translator-$pkgver.tar.gz::https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/refs/tags/v$pkgver.tar.gz
+ endian.patch
+ test-triplet.patch
+ "
+builddir="$srcdir/SPIRV-LLVM-Translator-$pkgver"
+
+build() {
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_SHARED_LIBS=True \
+ -DCCACHE_ALLOWED=OFF \
+ -DCMAKE_BUILD_TYPE=RelWithDebugInfo \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
+ -DCMAKE_C_FLAGS="$CFLAGS" \
+ -DLLVM_DIR=$(/usr/lib/llvm${_llvmver}/bin/llvm-config --cmakedir) \
+ -DLLVM_EXTERNAL_LIT=/usr/bin/lit \
+ -DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=/usr/include/spirv \
+ -DLLVM_SPIRV_INCLUDE_TESTS=ON \
+ ${CMAKE_CROSSOPTS} \
+ -Bbuild .
+ make -C build
+}
+
+check() {
+ make -C build test
+}
+
+package() {
+ make DESTDIR="$pkgdir" -C build install
+}
+
+sha512sums="30d85fcd767cdae8b29f65dff50f2449e3421477634edcec67e88e92eeb77ec724c46eed4e90274d8697955c79fc26650c268839ed4612aee096b2d4707af728 SPIRV-LLVM-Translator-18.1.6.tar.gz
+fd261c9bb17c1f322191375ebbbbf14ebb8c6ec36d777470e48a5856d936c63f7a3306784460ee903b18f97b34f5157a2590bcfd3c891ebe03ce865f7d5ee9f7 endian.patch
+45d38dcf180113e2790b9a1fa3d1f7b24975b67e6976af71688bd6cbbd23e8e1cc792593f4612277bf6fee45e41a3047c62e3a69a218ee246f1494c9e1783665 test-triplet.patch"
diff --git a/experimental/spirv-llvm-translator/endian.patch b/experimental/spirv-llvm-translator/endian.patch
new file mode 100644
index 000000000..66a4e88bd
--- /dev/null
+++ b/experimental/spirv-llvm-translator/endian.patch
@@ -0,0 +1,37 @@
+--- SPIRV-LLVM-Translator-18.1.6/lib/SPIRV/libSPIRV/SPIRVStream.h.old 2024-10-30 05:39:48.000000000 -0500
++++ SPIRV-LLVM-Translator-18.1.6/lib/SPIRV/libSPIRV/SPIRVStream.h 2024-11-22 20:17:06.139226884 -0600
+@@ -43,6 +43,16 @@
+ #include "SPIRVDebug.h"
+ #include "SPIRVExtInst.h"
+ #include "SPIRVModule.h"
++#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
++#include <byteswap.h>
++#define cpu_to_le32(x) __bswap32(x)
++#define le32_to_cpu(x) __bswap32(x)
++#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
++#define cpu_to_le32(x) x
++#define le32_to_cpu(x) x
++#else
++#error Endianness unknown (neither big nor little)
++#endif
+ #include <cctype>
+ #include <cstdint>
+ #include <iostream>
+@@ -102,7 +112,7 @@
+ const SPIRVDecoder &decodeBinary(const SPIRVDecoder &I, T &V) {
+ uint32_t W;
+ I.IS.read(reinterpret_cast<char *>(&W), sizeof(W));
+- V = static_cast<T>(W);
++ V = static_cast<T>(le32_to_cpu(W));
+ SPIRVDBG(spvdbgs() << "Read word: W = " << W << " V = " << V << '\n');
+ return I;
+ }
+@@ -185,7 +195,7 @@
+ return O;
+ }
+ #endif
+- uint32_t W = static_cast<uint32_t>(V);
++ uint32_t W = cpu_to_le32(static_cast<uint32_t>(V));
+ O.OS.write(reinterpret_cast<char *>(&W), sizeof(W));
+ return O;
+ }
diff --git a/experimental/spirv-llvm-translator/test-triplet.patch b/experimental/spirv-llvm-translator/test-triplet.patch
new file mode 100644
index 000000000..e46ded389
--- /dev/null
+++ b/experimental/spirv-llvm-translator/test-triplet.patch
@@ -0,0 +1,700 @@
+Upstream-URL: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/pull/2555
+
+From 96a37c6090a8eda825f6870364a7feae858f7c39 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Fri, 7 Jun 2024 17:33:18 -0400
+Subject: [PATCH] test: Fix x86 tests to use -mtriple=x86_64-unknown-linux-gnu
+
+... when test expects x86_64-specific results.
+---
+ test/DebugInfo/X86/abstract_origin.ll | 6 +++---
+ test/DebugInfo/X86/constant-aggregate.ll | 6 +++---
+ test/DebugInfo/X86/constant-loclist.ll | 6 +++---
+ test/DebugInfo/X86/convert-debugloc.ll | 12 ++++++------
+ test/DebugInfo/X86/dbg-byval-parameter.ll | 6 +++---
+ test/DebugInfo/X86/dbg-declare-alloca.ll | 12 ++++++------
+ test/DebugInfo/X86/dbg-declare-arg.ll | 6 +++---
+ test/DebugInfo/X86/dbg-prolog-end.ll | 6 +++---
+ test/DebugInfo/X86/dbg-value-const-byref.ll | 6 +++---
+ test/DebugInfo/X86/dbg-value-isel.ll | 6 +++---
+ test/DebugInfo/X86/dw_op_minus_direct.ll | 18 +++++++++---------
+ .../X86/dwarf-aranges-no-dwarf-labels.ll | 6 +++---
+ test/DebugInfo/X86/float_const.ll | 6 +++---
+ test/DebugInfo/X86/frame-register.ll | 6 +++---
+ test/DebugInfo/X86/inlined-formal-parameter.ll | 6 +++---
+ test/DebugInfo/X86/isel-cse-line.ll | 6 +++---
+ test/DebugInfo/X86/mixed-nodebug-cu.ll | 6 +++---
+ test/DebugInfo/X86/nophysreg.ll | 6 +++---
+ test/DebugInfo/X86/partial-constant.ll | 6 +++---
+ test/DebugInfo/X86/single-dbg_value.ll | 12 ++++++------
+ .../X86/split-dwarf-multiple-cu-hash.ll | 12 ++++++------
+ test/DebugInfo/X86/split-dwarf-omit-empty.ll | 6 +++---
+ test/DebugInfo/X86/static_member_array.ll | 6 +++---
+ test/DebugInfo/X86/this-stack_value.ll | 12 ++++++------
+ test/DebugInfo/X86/unattached-global.ll | 6 +++---
+ test/DebugInfo/X86/union-const.ll | 6 +++---
+ 26 files changed, 99 insertions(+), 99 deletions(-)
+
+diff --git a/test/DebugInfo/X86/abstract_origin.ll b/test/DebugInfo/X86/abstract_origin.ll
+index 711a15efb5..48e08bf471 100644
+--- a/test/DebugInfo/X86/abstract_origin.ll
++++ b/test/DebugInfo/X86/abstract_origin.ll
+@@ -1,15 +1,15 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=obj %t.ll -o - | llvm-dwarfdump -debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj %t.ll -o - | llvm-dwarfdump -debug-info - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=obj %t.ll -o - | llvm-dwarfdump -debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj %t.ll -o - | llvm-dwarfdump -debug-info - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=obj %t.ll -o - | llvm-dwarfdump -debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj %t.ll -o - | llvm-dwarfdump -debug-info - | FileCheck %s
+
+ ; Generated at -O2 from:
+ ; void f();
+diff --git a/test/DebugInfo/X86/constant-aggregate.ll b/test/DebugInfo/X86/constant-aggregate.ll
+index 353b282913..739ac8cf85 100644
+--- a/test/DebugInfo/X86/constant-aggregate.ll
++++ b/test/DebugInfo/X86/constant-aggregate.ll
+@@ -1,17 +1,17 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple %t.ll -filetype=obj -o %t.o
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu %t.ll -filetype=obj -o %t.o
+ ; RUN: llvm-dwarfdump -v -debug-info %t.o | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple %t.ll -filetype=obj -o %t.o
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu %t.ll -filetype=obj -o %t.o
+ ; RUN: llvm-dwarfdump -v -debug-info %t.o | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple %t.ll -filetype=obj -o %t.o
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu %t.ll -filetype=obj -o %t.o
+ ; RUN: llvm-dwarfdump -v -debug-info %t.o | FileCheck %s
+
+ ; Test emitting a constant for an aggregate type.
+diff --git a/test/DebugInfo/X86/constant-loclist.ll b/test/DebugInfo/X86/constant-loclist.ll
+index 6f7d5c9e49..ba82efc8d3 100644
+--- a/test/DebugInfo/X86/constant-loclist.ll
++++ b/test/DebugInfo/X86/constant-loclist.ll
+@@ -1,15 +1,15 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=obj %t.ll -o - -experimental-debug-variable-locations=false | llvm-dwarfdump -v -debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj %t.ll -o - -experimental-debug-variable-locations=false | llvm-dwarfdump -v -debug-info - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=obj %t.ll -o - -experimental-debug-variable-locations=false | llvm-dwarfdump -v -debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj %t.ll -o - -experimental-debug-variable-locations=false | llvm-dwarfdump -v -debug-info - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=obj %t.ll -o - -experimental-debug-variable-locations=false | llvm-dwarfdump -v -debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj %t.ll -o - -experimental-debug-variable-locations=false | llvm-dwarfdump -v -debug-info - | FileCheck %s
+
+ ; A hand-written testcase to check 64-bit constant handling in location lists.
+
+diff --git a/test/DebugInfo/X86/convert-debugloc.ll b/test/DebugInfo/X86/convert-debugloc.ll
+index a63db6e944..3c5c9614b2 100644
+--- a/test/DebugInfo/X86/convert-debugloc.ll
++++ b/test/DebugInfo/X86/convert-debugloc.ll
+@@ -1,23 +1,23 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-allow-extra-diexpressions
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -dwarf-version=5 -filetype=obj -O0 < %t.ll | llvm-dwarfdump - \
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -dwarf-version=5 -filetype=obj -O0 < %t.ll | llvm-dwarfdump - \
+ ; RUN: | FileCheck %s --check-prefix=DW5 "--implicit-check-not={{DW_TAG|NULL}}"
+-; RUN: llc -mtriple=%triple -dwarf-version=4 -filetype=obj -O0 < %t.ll | llvm-dwarfdump - \
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -dwarf-version=4 -filetype=obj -O0 < %t.ll | llvm-dwarfdump - \
+ ; RUN: | FileCheck %s --check-prefix=DW4 "--implicit-check-not={{DW_TAG|NULL}}"
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-allow-extra-diexpressions --spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -dwarf-version=5 -filetype=obj -O0 < %t.ll | llvm-dwarfdump - \
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -dwarf-version=5 -filetype=obj -O0 < %t.ll | llvm-dwarfdump - \
+ ; RUN: | FileCheck %s --check-prefix=DW5 "--implicit-check-not={{DW_TAG|NULL}}"
+-; RUN: llc -mtriple=%triple -dwarf-version=4 -filetype=obj -O0 < %t.ll | llvm-dwarfdump - \
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -dwarf-version=4 -filetype=obj -O0 < %t.ll | llvm-dwarfdump - \
+ ; RUN: | FileCheck %s --check-prefix=DW4 "--implicit-check-not={{DW_TAG|NULL}}"
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -dwarf-version=5 -filetype=obj -O0 < %t.ll | llvm-dwarfdump - \
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -dwarf-version=5 -filetype=obj -O0 < %t.ll | llvm-dwarfdump - \
+ ; RUN: | FileCheck %s --check-prefix=DW5 "--implicit-check-not={{DW_TAG|NULL}}"
+-; RUN: llc -mtriple=%triple -dwarf-version=4 -filetype=obj -O0 < %t.ll | llvm-dwarfdump - \
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -dwarf-version=4 -filetype=obj -O0 < %t.ll | llvm-dwarfdump - \
+ ; RUN: | FileCheck %s --check-prefix=DW4 "--implicit-check-not={{DW_TAG|NULL}}"
+
+ ; DW5: .debug_info contents:
+diff --git a/test/DebugInfo/X86/dbg-byval-parameter.ll b/test/DebugInfo/X86/dbg-byval-parameter.ll
+index 78909f0553..b51c60b58f 100644
+--- a/test/DebugInfo/X86/dbg-byval-parameter.ll
++++ b/test/DebugInfo/X86/dbg-byval-parameter.ll
+@@ -1,15 +1,15 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -march=x86 -asm-verbose < %t.ll | grep DW_TAG_formal_parameter
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -march=x86 -asm-verbose < %t.ll | grep DW_TAG_formal_parameter
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -march=x86 -asm-verbose < %t.ll | grep DW_TAG_formal_parameter
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -march=x86 -asm-verbose < %t.ll | grep DW_TAG_formal_parameter
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -march=x86 -asm-verbose < %t.ll | grep DW_TAG_formal_parameter
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -march=x86 -asm-verbose < %t.ll | grep DW_TAG_formal_parameter
+
+ target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64"
+ target triple = "spir64-unknown-unknown"
+diff --git a/test/DebugInfo/X86/dbg-declare-alloca.ll b/test/DebugInfo/X86/dbg-declare-alloca.ll
+index 39840fb963..831cd023dc 100644
+--- a/test/DebugInfo/X86/dbg-declare-alloca.ll
++++ b/test/DebugInfo/X86/dbg-declare-alloca.ll
+@@ -1,18 +1,18 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple < %t.ll | FileCheck %s
+-; RUN: llc -mtriple=%triple < %t.ll -filetype=obj | llvm-dwarfdump -v - --debug-info | FileCheck %s --check-prefix=DWARF
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %t.ll | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %t.ll -filetype=obj | llvm-dwarfdump -v - --debug-info | FileCheck %s --check-prefix=DWARF
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple < %t.ll | FileCheck %s
+-; RUN: llc -mtriple=%triple < %t.ll -filetype=obj | llvm-dwarfdump -v - --debug-info | FileCheck %s --check-prefix=DWARF
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %t.ll | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %t.ll -filetype=obj | llvm-dwarfdump -v - --debug-info | FileCheck %s --check-prefix=DWARF
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple < %t.ll | FileCheck %s
+-; RUN: llc -mtriple=%triple < %t.ll -filetype=obj | llvm-dwarfdump -v - --debug-info | FileCheck %s --check-prefix=DWARF
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %t.ll | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %t.ll -filetype=obj | llvm-dwarfdump -v - --debug-info | FileCheck %s --check-prefix=DWARF
+
+ ; This should use the frame index side table for allocas, not DBG_VALUE
+ ; instructions. For SDAG ISel, this test would see an SDNode materializing the
+diff --git a/test/DebugInfo/X86/dbg-declare-arg.ll b/test/DebugInfo/X86/dbg-declare-arg.ll
+index 11ca766374..137f9e59be 100644
+--- a/test/DebugInfo/X86/dbg-declare-arg.ll
++++ b/test/DebugInfo/X86/dbg-declare-arg.ll
+@@ -1,15 +1,15 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -O0 -fast-isel=true -filetype=obj -o - %t.ll | llvm-dwarfdump -v - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -O0 -fast-isel=true -filetype=obj -o - %t.ll | llvm-dwarfdump -v - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -O0 -fast-isel=true -filetype=obj -o - %t.ll | llvm-dwarfdump -v - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -O0 -fast-isel=true -filetype=obj -o - %t.ll | llvm-dwarfdump -v - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -O0 -fast-isel=true -filetype=obj -o - %t.ll | llvm-dwarfdump -v - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -O0 -fast-isel=true -filetype=obj -o - %t.ll | llvm-dwarfdump -v - | FileCheck %s
+
+ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
+ target triple = "spir64-unknown-unknown"
+diff --git a/test/DebugInfo/X86/dbg-prolog-end.ll b/test/DebugInfo/X86/dbg-prolog-end.ll
+index d9c7257aa4..755b4b980e 100644
+--- a/test/DebugInfo/X86/dbg-prolog-end.ll
++++ b/test/DebugInfo/X86/dbg-prolog-end.ll
+@@ -1,15 +1,15 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -O0 < %t.ll | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -O0 < %t.ll | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -O0 < %t.ll | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -O0 < %t.ll | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -O0 < %t.ll | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -O0 < %t.ll | FileCheck %s
+
+ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
+ target triple = "spir64-unknown-unknown"
+diff --git a/test/DebugInfo/X86/dbg-value-const-byref.ll b/test/DebugInfo/X86/dbg-value-const-byref.ll
+index 4770371f10..be0efb138c 100644
+--- a/test/DebugInfo/X86/dbg-value-const-byref.ll
++++ b/test/DebugInfo/X86/dbg-value-const-byref.ll
+@@ -1,15 +1,15 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -O1 -filetype=obj -o - %t.ll | llvm-dwarfdump -all - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -O1 -filetype=obj -o - %t.ll | llvm-dwarfdump -all - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -O1 -filetype=obj -o - %t.ll | llvm-dwarfdump -all - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -O1 -filetype=obj -o - %t.ll | llvm-dwarfdump -all - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -O1 -filetype=obj -o - %t.ll | llvm-dwarfdump -all - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -O1 -filetype=obj -o - %t.ll | llvm-dwarfdump -all - | FileCheck %s
+
+ ; Generated with -O1 from:
+ ; int f1();
+diff --git a/test/DebugInfo/X86/dbg-value-isel.ll b/test/DebugInfo/X86/dbg-value-isel.ll
+index 3e341ab43a..a92d3dbeb2 100644
+--- a/test/DebugInfo/X86/dbg-value-isel.ll
++++ b/test/DebugInfo/X86/dbg-value-isel.ll
+@@ -1,15 +1,15 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple < %t.ll | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %t.ll | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple < %t.ll | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %t.ll | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple < %t.ll | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %t.ll | FileCheck %s
+
+ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
+ target triple = "spir64-unknown-unknown"
+diff --git a/test/DebugInfo/X86/dw_op_minus_direct.ll b/test/DebugInfo/X86/dw_op_minus_direct.ll
+index 64ee6149fb..eb93b83952 100644
+--- a/test/DebugInfo/X86/dw_op_minus_direct.ll
++++ b/test/DebugInfo/X86/dw_op_minus_direct.ll
+@@ -2,26 +2,26 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=obj < %t.ll | llvm-dwarfdump -v - | FileCheck %s
+-; RUN: llc -mtriple=%triple -dwarf-version=2 -filetype=obj < %t.ll | llvm-dwarfdump -v - \
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %t.ll | llvm-dwarfdump -v - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -dwarf-version=2 -filetype=obj < %t.ll | llvm-dwarfdump -v - \
+ ; RUN: | FileCheck %s --check-prefix=DWARF2
+-; RUN: llc -mtriple=%triple -dwarf-version=3 -filetype=obj < %t.ll | llvm-dwarfdump -v - \
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -dwarf-version=3 -filetype=obj < %t.ll | llvm-dwarfdump -v - \
+ ; RUN: | FileCheck %s --check-prefix=DWARF2
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=obj < %t.ll | llvm-dwarfdump -v - | FileCheck %s
+-; RUN: llc -mtriple=%triple -dwarf-version=2 -filetype=obj < %t.ll | llvm-dwarfdump -v - \
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %t.ll | llvm-dwarfdump -v - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -dwarf-version=2 -filetype=obj < %t.ll | llvm-dwarfdump -v - \
+ ; RUN: | FileCheck %s --check-prefix=DWARF2
+-; RUN: llc -mtriple=%triple -dwarf-version=3 -filetype=obj < %t.ll | llvm-dwarfdump -v - \
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -dwarf-version=3 -filetype=obj < %t.ll | llvm-dwarfdump -v - \
+ ; RUN: | FileCheck %s --check-prefix=DWARF2
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=obj < %t.ll | llvm-dwarfdump -v - | FileCheck %s
+-; RUN: llc -mtriple=%triple -dwarf-version=2 -filetype=obj < %t.ll | llvm-dwarfdump -v - \
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %t.ll | llvm-dwarfdump -v - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -dwarf-version=2 -filetype=obj < %t.ll | llvm-dwarfdump -v - \
+ ; RUN: | FileCheck %s --check-prefix=DWARF2
+-; RUN: llc -mtriple=%triple -dwarf-version=3 -filetype=obj < %t.ll | llvm-dwarfdump -v - \
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -dwarf-version=3 -filetype=obj < %t.ll | llvm-dwarfdump -v - \
+ ; RUN: | FileCheck %s --check-prefix=DWARF2
+
+ ; This was derived manually from:
+diff --git a/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll b/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll
+index 5a07194875..f1bc6b9033 100644
+--- a/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll
++++ b/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll
+@@ -1,15 +1,15 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -generate-arange-section < %t.ll | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -generate-arange-section < %t.ll | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -generate-arange-section < %t.ll | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -generate-arange-section < %t.ll | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -generate-arange-section < %t.ll | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -generate-arange-section < %t.ll | FileCheck %s
+
+ ; CHECK: .short 2 # DWARF Arange version number
+ ; CHECK: # Segment Size
+diff --git a/test/DebugInfo/X86/float_const.ll b/test/DebugInfo/X86/float_const.ll
+index 5f57fb72bb..abf68ad35f 100644
+--- a/test/DebugInfo/X86/float_const.ll
++++ b/test/DebugInfo/X86/float_const.ll
+@@ -1,15 +1,15 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple < %t.ll -filetype=obj | llvm-dwarfdump -v -debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %t.ll -filetype=obj | llvm-dwarfdump -v -debug-info - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple < %t.ll -filetype=obj | llvm-dwarfdump -v -debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %t.ll -filetype=obj | llvm-dwarfdump -v -debug-info - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple < %t.ll -filetype=obj | llvm-dwarfdump -v -debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %t.ll -filetype=obj | llvm-dwarfdump -v -debug-info - | FileCheck %s
+
+ ; from (at -Os):
+ ; void foo() {
+diff --git a/test/DebugInfo/X86/frame-register.ll b/test/DebugInfo/X86/frame-register.ll
+index 1f911eef5f..284b532bf9 100644
+--- a/test/DebugInfo/X86/frame-register.ll
++++ b/test/DebugInfo/X86/frame-register.ll
+@@ -1,15 +1,15 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple %t.ll -filetype=obj -o - | llvm-dwarfdump -v --debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu %t.ll -filetype=obj -o - | llvm-dwarfdump -v --debug-info - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple %t.ll -filetype=obj -o - | llvm-dwarfdump -v --debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu %t.ll -filetype=obj -o - | llvm-dwarfdump -v --debug-info - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple %t.ll -filetype=obj -o - | llvm-dwarfdump -v --debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu %t.ll -filetype=obj -o - | llvm-dwarfdump -v --debug-info - | FileCheck %s
+
+ ; CHECK: DW_TAG_variable
+ ; CHECK-NEXT: DW_AT_location [DW_FORM_exprloc] (DW_OP_fbreg +0)
+diff --git a/test/DebugInfo/X86/inlined-formal-parameter.ll b/test/DebugInfo/X86/inlined-formal-parameter.ll
+index 657effe483..cbd0d9d7d7 100644
+--- a/test/DebugInfo/X86/inlined-formal-parameter.ll
++++ b/test/DebugInfo/X86/inlined-formal-parameter.ll
+@@ -1,17 +1,17 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=obj -o %t.o %t.ll
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t.o %t.ll
+ ; RUN: llvm-dwarfdump -v %t.o | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=obj -o %t.o %t.ll
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t.o %t.ll
+ ; RUN: llvm-dwarfdump -v %t.o | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=obj -o %t.o %t.ll
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t.o %t.ll
+ ; RUN: llvm-dwarfdump -v %t.o | FileCheck %s
+
+ ; Testcase generated using 'clang -g -O2 -S -emit-llvm' from the following:
+diff --git a/test/DebugInfo/X86/isel-cse-line.ll b/test/DebugInfo/X86/isel-cse-line.ll
+index f48e1782d4..8abc1f5dbe 100644
+--- a/test/DebugInfo/X86/isel-cse-line.ll
++++ b/test/DebugInfo/X86/isel-cse-line.ll
+@@ -1,15 +1,15 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=asm -fast-isel=false -O0 < %t.ll | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=asm -fast-isel=false -O0 < %t.ll | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=asm -fast-isel=false -O0 < %t.ll | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=asm -fast-isel=false -O0 < %t.ll | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=asm -fast-isel=false -O0 < %t.ll | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=asm -fast-isel=false -O0 < %t.ll | FileCheck %s
+ ;
+ ; Generated by:
+ ; clang -emit-llvm -S -g test.cpp
+diff --git a/test/DebugInfo/X86/mixed-nodebug-cu.ll b/test/DebugInfo/X86/mixed-nodebug-cu.ll
+index 1a862e4477..23511235c5 100644
+--- a/test/DebugInfo/X86/mixed-nodebug-cu.ll
++++ b/test/DebugInfo/X86/mixed-nodebug-cu.ll
+@@ -1,17 +1,17 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple %t.ll -o %t -filetype=obj
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu %t.ll -o %t -filetype=obj
+ ; RUN: llvm-dwarfdump -debug-info %t | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple %t.ll -o %t -filetype=obj
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu %t.ll -o %t -filetype=obj
+ ; RUN: llvm-dwarfdump -debug-info %t | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple %t.ll -o %t -filetype=obj
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu %t.ll -o %t -filetype=obj
+ ; RUN: llvm-dwarfdump -debug-info %t | FileCheck %s
+
+ ; CHECK: DW_TAG_compile_unit
+diff --git a/test/DebugInfo/X86/nophysreg.ll b/test/DebugInfo/X86/nophysreg.ll
+index b2dc00b0f0..3caf40e14d 100644
+--- a/test/DebugInfo/X86/nophysreg.ll
++++ b/test/DebugInfo/X86/nophysreg.ll
+@@ -1,15 +1,15 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=obj < %t.ll | llvm-dwarfdump -debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %t.ll | llvm-dwarfdump -debug-info - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=obj < %t.ll | llvm-dwarfdump -debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %t.ll | llvm-dwarfdump -debug-info - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=obj < %t.ll | llvm-dwarfdump -debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %t.ll | llvm-dwarfdump -debug-info - | FileCheck %s
+ ;
+ ; PR22296: In this testcase the DBG_VALUE describing "p5" becomes unavailable
+ ; because the register its address is in is clobbered and we (currently) aren't
+diff --git a/test/DebugInfo/X86/partial-constant.ll b/test/DebugInfo/X86/partial-constant.ll
+index fb1856449b..1eb8b1669c 100644
+--- a/test/DebugInfo/X86/partial-constant.ll
++++ b/test/DebugInfo/X86/partial-constant.ll
+@@ -1,15 +1,15 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=obj < %t.ll | llvm-dwarfdump -v - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %t.ll | llvm-dwarfdump -v - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=obj < %t.ll | llvm-dwarfdump -v - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %t.ll | llvm-dwarfdump -v - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=obj < %t.ll | llvm-dwarfdump -v - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %t.ll | llvm-dwarfdump -v - | FileCheck %s
+
+ ; Generated at -O2 from:
+ ; bool c();
+diff --git a/test/DebugInfo/X86/single-dbg_value.ll b/test/DebugInfo/X86/single-dbg_value.ll
+index d50ad74731..2f96f5a5b6 100644
+--- a/test/DebugInfo/X86/single-dbg_value.ll
++++ b/test/DebugInfo/X86/single-dbg_value.ll
+@@ -1,23 +1,23 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -stop-after=livedebugvalues -o - %t.ll \
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -stop-after=livedebugvalues -o - %t.ll \
+ ; RUN: | FileCheck %s --check-prefix=SANITY
+-; RUN: llc -mtriple=%triple -march=x86-64 -o - %t.ll -filetype=obj \
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -march=x86-64 -o - %t.ll -filetype=obj \
+ ; RUN: | llvm-dwarfdump -v -all - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -stop-after=livedebugvalues -o - %t.ll \
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -stop-after=livedebugvalues -o - %t.ll \
+ ; RUN: | FileCheck %s --check-prefix=SANITY
+-; RUN: llc -mtriple=%triple -march=x86-64 -o - %t.ll -filetype=obj \
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -march=x86-64 -o - %t.ll -filetype=obj \
+ ; RUN: | llvm-dwarfdump -v -all - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -stop-after=livedebugvalues -o - %t.ll \
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -stop-after=livedebugvalues -o - %t.ll \
+ ; RUN: | FileCheck %s --check-prefix=SANITY
+-; RUN: llc -mtriple=%triple -march=x86-64 -o - %t.ll -filetype=obj \
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -march=x86-64 -o - %t.ll -filetype=obj \
+ ; RUN: | llvm-dwarfdump -v -all - | FileCheck %s
+ ;
+ ; CHECK: .debug_info contents:
+diff --git a/test/DebugInfo/X86/split-dwarf-multiple-cu-hash.ll b/test/DebugInfo/X86/split-dwarf-multiple-cu-hash.ll
+index 1476a48b31..a405ab0f45 100644
+--- a/test/DebugInfo/X86/split-dwarf-multiple-cu-hash.ll
++++ b/test/DebugInfo/X86/split-dwarf-multiple-cu-hash.ll
+@@ -2,20 +2,20 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -split-dwarf-file=foo.dwo %t.ll -filetype=obj -o %t/a.o
+-; RUN: llc -mtriple=%triple -split-dwarf-file=bar.dwo %t.ll -filetype=obj -o %t/b.o
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -split-dwarf-file=foo.dwo %t.ll -filetype=obj -o %t/a.o
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -split-dwarf-file=bar.dwo %t.ll -filetype=obj -o %t/b.o
+ ; RUN: llvm-dwarfdump -debug-info %t/a.o %t/b.o | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -split-dwarf-file=foo.dwo %t.ll -filetype=obj -o %t/a.o
+-; RUN: llc -mtriple=%triple -split-dwarf-file=bar.dwo %t.ll -filetype=obj -o %t/b.o
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -split-dwarf-file=foo.dwo %t.ll -filetype=obj -o %t/a.o
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -split-dwarf-file=bar.dwo %t.ll -filetype=obj -o %t/b.o
+ ; RUN: llvm-dwarfdump -debug-info %t/a.o %t/b.o | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -split-dwarf-file=foo.dwo %t.ll -filetype=obj -o %t/a.o
+-; RUN: llc -mtriple=%triple -split-dwarf-file=bar.dwo %t.ll -filetype=obj -o %t/b.o
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -split-dwarf-file=foo.dwo %t.ll -filetype=obj -o %t/a.o
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -split-dwarf-file=bar.dwo %t.ll -filetype=obj -o %t/b.o
+ ; RUN: llvm-dwarfdump -debug-info %t/a.o %t/b.o | FileCheck %s
+
+ target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64"
+diff --git a/test/DebugInfo/X86/split-dwarf-omit-empty.ll b/test/DebugInfo/X86/split-dwarf-omit-empty.ll
+index 74ed65dd0d..f725770991 100644
+--- a/test/DebugInfo/X86/split-dwarf-omit-empty.ll
++++ b/test/DebugInfo/X86/split-dwarf-omit-empty.ll
+@@ -1,15 +1,15 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -split-dwarf-file=foo.dwo %t.ll -filetype=obj -o - | llvm-dwarfdump -debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -split-dwarf-file=foo.dwo %t.ll -filetype=obj -o - | llvm-dwarfdump -debug-info - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv -spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -split-dwarf-file=foo.dwo %t.ll -filetype=obj -o - | llvm-dwarfdump -debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -split-dwarf-file=foo.dwo %t.ll -filetype=obj -o - | llvm-dwarfdump -debug-info - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv -spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -split-dwarf-file=foo.dwo %t.ll -filetype=obj -o - | llvm-dwarfdump -debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -split-dwarf-file=foo.dwo %t.ll -filetype=obj -o - | llvm-dwarfdump -debug-info - | FileCheck %s
+
+ target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64"
+ target triple = "spir64-unknown-unknown"
+diff --git a/test/DebugInfo/X86/static_member_array.ll b/test/DebugInfo/X86/static_member_array.ll
+index 1ed03c3825..3a0d8a426e 100644
+--- a/test/DebugInfo/X86/static_member_array.ll
++++ b/test/DebugInfo/X86/static_member_array.ll
+@@ -1,15 +1,15 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple %t.ll -filetype=obj -o - | llvm-dwarfdump -v -debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu %t.ll -filetype=obj -o - | llvm-dwarfdump -v -debug-info - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv -spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple %t.ll -filetype=obj -o - | llvm-dwarfdump -v -debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu %t.ll -filetype=obj -o - | llvm-dwarfdump -v -debug-info - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv -spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple %t.ll -filetype=obj -o - | llvm-dwarfdump -v -debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu %t.ll -filetype=obj -o - | llvm-dwarfdump -v -debug-info - | FileCheck %s
+
+ ; Generated from:
+ ;
+diff --git a/test/DebugInfo/X86/this-stack_value.ll b/test/DebugInfo/X86/this-stack_value.ll
+index e721a965a1..1b9e9dd399 100644
+--- a/test/DebugInfo/X86/this-stack_value.ll
++++ b/test/DebugInfo/X86/this-stack_value.ll
+@@ -1,18 +1,18 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=asm -o - %t.ll | FileCheck %s --check-prefix=ASM
+-; RUN: llc -mtriple=%triple -filetype=obj -o - %t.ll | llvm-dwarfdump -v --debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=asm -o - %t.ll | FileCheck %s --check-prefix=ASM
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o - %t.ll | llvm-dwarfdump -v --debug-info - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv -spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=asm -o - %t.ll | FileCheck %s --check-prefix=ASM
+-; RUN: llc -mtriple=%triple -filetype=obj -o - %t.ll | llvm-dwarfdump -v --debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=asm -o - %t.ll | FileCheck %s --check-prefix=ASM
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o - %t.ll | llvm-dwarfdump -v --debug-info - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv -spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=asm -o - %t.ll | FileCheck %s --check-prefix=ASM
+-; RUN: llc -mtriple=%triple -filetype=obj -o - %t.ll | llvm-dwarfdump -v --debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=asm -o - %t.ll | FileCheck %s --check-prefix=ASM
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o - %t.ll | llvm-dwarfdump -v --debug-info - | FileCheck %s
+ ;
+ ; Generated at -O2 from:
+ ; struct B;
+diff --git a/test/DebugInfo/X86/unattached-global.ll b/test/DebugInfo/X86/unattached-global.ll
+index ab42af7b8e..3e9b85c3a8 100644
+--- a/test/DebugInfo/X86/unattached-global.ll
++++ b/test/DebugInfo/X86/unattached-global.ll
+@@ -1,15 +1,15 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=obj -o - %t.ll | llvm-dwarfdump - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o - %t.ll | llvm-dwarfdump - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv -spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=obj -o - %t.ll | llvm-dwarfdump - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o - %t.ll | llvm-dwarfdump - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv -spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=obj -o - %t.ll | llvm-dwarfdump - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o - %t.ll | llvm-dwarfdump - | FileCheck %s
+
+ target datalayout = "e-p:64:64"
+ target triple = "spir64-unknown-unknown"
+diff --git a/test/DebugInfo/X86/union-const.ll b/test/DebugInfo/X86/union-const.ll
+index 403934796c..429555a556 100644
+--- a/test/DebugInfo/X86/union-const.ll
++++ b/test/DebugInfo/X86/union-const.ll
+@@ -1,15 +1,15 @@
+ ; RUN: llvm-as < %s -o %t.bc
+ ; RUN: llvm-spirv %t.bc -o %t.spv
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=obj < %t.ll | llvm-dwarfdump -v -debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %t.ll | llvm-dwarfdump -v -debug-info - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv -spirv-debug-info-version=nonsemantic-shader-100
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=obj < %t.ll | llvm-dwarfdump -v -debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %t.ll | llvm-dwarfdump -v -debug-info - | FileCheck %s
+
+ ; RUN: llvm-spirv %t.bc -o %t.spv -spirv-debug-info-version=nonsemantic-shader-200
+ ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+-; RUN: llc -mtriple=%triple -filetype=obj < %t.ll | llvm-dwarfdump -v -debug-info - | FileCheck %s
++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %t.ll | llvm-dwarfdump -v -debug-info - | FileCheck %s
+
+ ; CHECK: DW_TAG_variable
+ ; CHECK-NEXT: DW_AT_const_value [DW_FORM_udata] (0)
diff --git a/experimental/thunderbird/APKBUILD b/experimental/thunderbird/APKBUILD
deleted file mode 100644
index 92dffeb6b..000000000
--- a/experimental/thunderbird/APKBUILD
+++ /dev/null
@@ -1,120 +0,0 @@
-# Contributor: A. Wilcox <awilfox@adelielinux.org>
-# Maintainer: A. Wilcox <awilfox@adelielinux.org>
-pkgname=thunderbird
-pkgver=60.2.1
-pkgrel=0
-pkgdesc="Email client from Mozilla"
-url="https://www.mozilla.org/thunderbird/"
-arch="all"
-options="!check" # X11 required
-license="MPL"
-depends=""
-# moz build system stuff
-# python deps
-# system-libs
-# actual deps
-makedepends="
- autoconf2.13 ncurses-dev perl cmd:which
-
- ncurses-dev openssl-dev
-
- alsa-lib-dev bzip2-dev icu-dev libevent-dev libffi-dev libpng-dev
- libjpeg-turbo-dev nspr-dev nss-dev pulseaudio-dev zlib-dev
-
- cargo clang fts-dev llvm6-dev rust
- dbus-glib-dev gconf-dev gtk+2.0-dev gtk+3.0-dev hunspell-dev libsm-dev
- libnotify-dev libxcomposite-dev libxdamage-dev libxrender-dev libxt-dev
- nss-static sqlite-dev startup-notification-dev unzip yasm zip
- "
-subpackages=""
-source="https://archive.mozilla.org/pub/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.xz
- mozconfig
- bad-google-code.patch
- cmsghdr.patch
- endianness-js.patch
- fix-bug-1261392.patch
- fix-seccomp-bpf.patch
- proper-system-hunspell.patch
- rust-config.patch
- skia.patch
- stab.h
- stackwalk-x86-ppc.patch
- thunderbird.desktop
- webrtc-broken.patch
- "
-somask="liblgpllibs.so
- libmozgtk.so
- libmozsandbox.so
- libxul.so"
-_tbirddir=/usr/lib/${pkgname}
-
-unpack() {
- default_unpack
- # just ripped from Firefox's APKBUILD...
- [ -z $SKIP_PYTHON ] || return 0
- msg "Killing all remaining hope for humanity and building Python 2..."
- cd "$srcdir"
- [ -d python ] && rm -r python
- mkdir python
- cd python
- # 19:39 <+solar> just make the firefox build process build its own py2 copy
- curl -O https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tar.xz
- tar xJf Python-2.7.15.tar.xz
- cd Python-2.7.15
- # 20:03 <calvin> TheWilfox: there's always violence
- ./configure --prefix="$srcdir/python"
- make -j $JOBS
- # 6 tests failed:
- # test__locale test_os test_posix test_re test_strptime test_time
- # make test
- make -j $JOBS install
-}
-
-prepare() {
- default_prepare
- cp "$srcdir"/stab.h "$builddir"/toolkit/crashreporter/google-breakpad/src/
- cp "$srcdir"/mozconfig "$builddir"/mozconfig
- echo "ac_add_options --enable-optimize=\"$CFLAGS\"" >> "$builddir"/mozconfig
- echo "ac_add_options --host=\"$CHOST\"" >> "$builddir"/mozconfig
- echo "ac_add_options --target=\"$CTARGET\"" >> "$builddir"/mozconfig
- # too much memory
- if [ -z "$JOBS" ] || [ $JOBS -gt 32 ]; then
- echo "mk_add_options MOZ_MAKE_FLAGS=\"-j32\"" >> "$builddir"/mozconfig
- fi
-}
-
-build() {
- cd "$builddir"
-
- # reportedly needed for gcc6; confirm this?
- export CXXFLAGS="$CXXFLAGS -fno-delete-null-pointer-checks -fno-schedule-insns2"
-
- export LDFLAGS="$LDFLAGS -Wl,-rpath,${_tbirddir}"
- export USE_SHORT_LIBNAME=1
-
- export PATH="$srcdir/python/bin:$PATH"
- ./mach build
-}
-
-package() {
- cd "$builddir"
- export PATH="$srcdir/python/bin:$PATH"
- DESTDIR="$pkgdir" ./mach install
- install -D -m644 "$srcdir"/thunderbird.desktop \
- "$pkgdir"/usr/share/applications/thunderbird.desktop
-}
-
-sha512sums="d74da3c90658c5baf09c22760cad31594524c09f2cd5aba81c5b15bb6db64d78f613562cb015d8a725b4902caa4a57a2d1dafce28284533747faed00f8268a02 thunderbird-60.2.1.source.tar.xz
-beda68f67171d18291c0671a5c7944382c217f47a1abceeb9e776fe7cf2d5baf861616bc1450032964ce78f910765c8c6b497eb1b050c85ac65a560bae5c9c87 mozconfig
-dce2523e9dc10719eae77cc1607de094e34526b3ff8694fb51a5116c118c89bb1c1b8b192c03b976663b3afab8e9fdbff79007b3ba0344186a7783b3dc597ebc bad-google-code.patch
-61c7117345b4bcb045ce0287aa368d90dffd7331347021ff345d5a7c46097ffd2575f38711309ce7bdbbbec15561e03fdabcb16235ed8a325ccc8c9d5bba35a6 cmsghdr.patch
-31f0cf9663443410a996002ed0357c2ea21692ce965a30d8bfb65d0f1827173da8d8b5c831ccbc199ecbe7a577613be0dd54a09db08e620fe37e1ce977a7afb0 endianness-js.patch
-a50b412edf9573a0bd04a43578b1c927967a616b73a5995eefb15bfa78fd2bd14e36ec05315a0703f6370ecd524e6bcb012e7285beb1245e9add9b8553acb79e fix-bug-1261392.patch
-70863b985427b9653ce5e28d6064f078fb6d4ccf43dd1b68e72f97f44868fc0ce063161c39a4e77a0a1a207b7365d5dc7a7ca5e68c726825eba814f2b93e2f5d fix-seccomp-bpf.patch
-1a88c21c39d5878e2018463fe08dd3a960cdf10e650e06ef3e4f089a431800b50267d8749a7acde196bb47c45aa66058a6ed4fb4d60de2ab69e8a48cd5a109bc proper-system-hunspell.patch
-fd3b165e26ab931dd7eaf220d578c30b8772eab0a870710d59403c9823c2233ef941cd7eb25d1625d705de9e8a7138d0e8c4e227a185e9b687553132da96d81a rust-config.patch
-8ef2bc4404601f66c7505f3e0a2f6d1d11e8f11e5a888dce4942cf27c86fbdbcdd66cb3d98738b7d9e25538793986140e75d51a893d22c70714ed98ef50a9894 skia.patch
-0b3f1e4b9fdc868e4738b5c81fd6c6128ce8885b260affcb9a65ff9d164d7232626ce1291aaea70132b3e3124f5e13fef4d39326b8e7173e362a823722a85127 stab.h
-d12ce112b97cbdba0748c5734a024b13032c5e0696efbd499764246e031d477b0f0a966aedc7b3bedd166bcdc2cc24d45bb9da5f678de9cff547bc6aa231cd16 stackwalk-x86-ppc.patch
-95a2b1deb4f6c90750fdd2bfe8ca0a7879a5b267965091705a6beb0a0a4b1ccad75d11df7b9885543ca4232ff704e975c6946f4c11804cb71c471e06f9576001 thunderbird.desktop
-76409619464259e3ba52e38d640c5b6210a7fecdc75cf124c185ef356507d4d266a845e9fcdeb7766dcd547f70748123c4fa1670f6e52aadd001a3c866dc2d51 webrtc-broken.patch"
diff --git a/experimental/thunderbird/bad-google-code.patch b/experimental/thunderbird/bad-google-code.patch
deleted file mode 100644
index 7c77a5edc..000000000
--- a/experimental/thunderbird/bad-google-code.patch
+++ /dev/null
@@ -1,49 +0,0 @@
---- thunderbird-60.2.1/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc
-+++ thunderbird-60.2.1/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc
-@@ -45,6 +45,7 @@
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <unistd.h>
-+#include <libgen.h>
-
- #include <iostream>
- #include <set>
---- thunderbird-60.2.1/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc
-+++ thunderbird-60.2.1/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc
-@@ -41,6 +41,10 @@
-
- #include "common/using_std_string.h"
-
-+#ifndef N_UNDF
-+#define N_UNDF 0
-+#endif
-+
- using std::vector;
-
- namespace google_breakpad {
---- thunderbird-60.2.1/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h
-+++ thunderbird-60.2.1/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h
-@@ -55,7 +55,7 @@
-
- #ifdef HAVE_MACH_O_NLIST_H
- #include <mach-o/nlist.h>
--#elif defined(HAVE_A_OUT_H)
-+#elif 0
- #include <a.out.h>
- #endif
-
---- thunderbird-60.2.1/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h
-+++ thunderbird-60.2.1/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h
-@@ -1134,6 +1134,12 @@ struct kernel_statfs {
- #ifndef __NR_fallocate
- #define __NR_fallocate 285
- #endif
-+
-+#undef __NR_pread
-+#define __NR_pread __NR_pread64
-+#undef __NR_pwrite
-+#define __NR_pwrite __NR_pwrite64
-+
- /* End of x86-64 definitions */
- #elif defined(__mips__)
- #if _MIPS_SIM == _MIPS_SIM_ABI32
diff --git a/experimental/thunderbird/cmsghdr.patch b/experimental/thunderbird/cmsghdr.patch
deleted file mode 100644
index 5fdc38353..000000000
--- a/experimental/thunderbird/cmsghdr.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -Naur firefox-60.0.orig/media/audioipc/audioipc/src/cmsg.rs firefox-60.0/media/audioipc/audioipc/src/cmsg.rs
---- firefox-60.0.orig/media/audioipc/audioipc/src/cmsg.rs 2018-05-13 18:05:51.713781232 -0700
-+++ firefox-60.0/media/audioipc/audioipc/src/cmsg.rs 2018-05-13 17:33:39.536856530 -0700
-@@ -108,6 +108,7 @@
-
- let cmsghdr = cmsghdr {
- cmsg_len: cmsg_len as _,
-+ __pad1: 0,
- cmsg_level: level,
- cmsg_type: kind,
- };
diff --git a/experimental/thunderbird/endianness-js.patch b/experimental/thunderbird/endianness-js.patch
deleted file mode 100644
index 98e1bd092..000000000
--- a/experimental/thunderbird/endianness-js.patch
+++ /dev/null
@@ -1,144 +0,0 @@
-# HG changeset patch
-# User Steve Fink <sfink@mozilla.com>
-# Date 1536603384 25200
-# Mon Sep 10 11:16:24 2018 -0700
-# Node ID f598dceb588d1adf503d30acf4e0915d07d34006
-# Parent b7dd3969261896020d7a9449d22f350a97e3517a
-# EXP-Topic b1488552.enD
-Bug 1488552 - JSString flags bit must alias the low 32 bits of JSObject.group_, not the high 32. r=tcampbell
-
-diff --git a/js/src/gc/RelocationOverlay.h b/js/src/gc/RelocationOverlay.h
---- a/js/src/gc/RelocationOverlay.h
-+++ b/js/src/gc/RelocationOverlay.h
-@@ -29,24 +29,35 @@ struct Cell;
- * This structure overlays a Cell that has been moved and provides a way to find
- * its new location. It's used during generational and compacting GC.
- */
- class RelocationOverlay
- {
- /* See comment in js/public/HeapAPI.h. */
- static const uint32_t Relocated = js::gc::Relocated;
-
-+#if MOZ_LITTLE_ENDIAN
- /*
-- * Keep the low 32 bits untouched. Use them to distinguish strings from
-+ * Keep the first 32 bits untouched. Use them to distinguish strings from
- * objects in the nursery.
- */
- uint32_t preserve_;
-
- /* Set to Relocated when moved. */
- uint32_t magic_;
-+#elif JS_BITS_PER_WORD == 64
-+ /*
-+ * On big-endian, we need to reorder to keep preserve_ lined up with the
-+ * low 32 bits of the aligned group_ pointer in JSObject.
-+ */
-+ uint32_t magic_;
-+ uint32_t preserve_;
-+#else
-+# error "Support for 32-bit big-endian architectures is untested. See bug 1488552."
-+#endif
-
- /* The location |this| was moved to. */
- Cell* newLocation_;
-
- /* A list entry to track all relocated things. */
- RelocationOverlay* next_;
-
- public:
-diff --git a/js/src/vm/StringType.h b/js/src/vm/StringType.h
---- a/js/src/vm/StringType.h
-+++ b/js/src/vm/StringType.h
-@@ -2,16 +2,17 @@
- * vim: set ts=8 sts=4 et sw=4 tw=99:
- * 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/. */
-
- #ifndef vm_StringType_h
- #define vm_StringType_h
-
-+#include "mozilla/EndianUtils.h"
- #include "mozilla/MemoryReporting.h"
- #include "mozilla/PodOperations.h"
- #include "mozilla/Range.h"
-
- #include "jsapi.h"
- #include "jsfriendapi.h"
-
- #include "builtin/String.h"
-@@ -161,18 +162,30 @@ class JSString : public js::gc::Cell
- static const size_t NUM_INLINE_CHARS_LATIN1 = 2 * sizeof(void*) / sizeof(JS::Latin1Char);
- static const size_t NUM_INLINE_CHARS_TWO_BYTE = 2 * sizeof(void*) / sizeof(char16_t);
-
- /* Fields only apply to string types commented on the right. */
- struct Data
- {
- union {
- struct {
-+#if MOZ_LITTLE_ENDIAN
- uint32_t flags; /* JSString */
- uint32_t length; /* JSString */
-+#elif JS_BITS_PER_WORD == 64
-+ /*
-+ * On big-endian, we need to reorder to keep flags lined up
-+ * with the low 32 bits of the aligned group_ pointer in
-+ * JSObject.
-+ */
-+ uint32_t length; /* JSString */
-+ uint32_t flags; /* JSString */
-+#else
-+# error "Support for 32-bit big-endian architectures is untested. See bug 1488552."
-+#endif
- };
- uintptr_t flattenData; /* JSRope (temporary while flattening) */
- } u1;
- union {
- union {
- /* JS(Fat)InlineString */
- JS::Latin1Char inlineStorageLatin1[NUM_INLINE_CHARS_LATIN1];
- char16_t inlineStorageTwoByte[NUM_INLINE_CHARS_TWO_BYTE];
---- thunderbird-60.2.1/js/src/gc/Marking-inl.h.old 2018-10-01 14:51:12.000000000 +0000
-+++ thunderbird-60.2.1/js/src/gc/Marking-inl.h 2018-10-12 19:08:28.260000000 +0000
-@@ -92,10 +92,10 @@
- MOZ_ASSERT(!isForwarded());
- // The location of magic_ is important because it must never be valid to see
- // the value Relocated there in a GC thing that has not been moved.
-- static_assert(offsetof(RelocationOverlay, magic_) == offsetof(JSObject, group_) + sizeof(uint32_t),
-- "RelocationOverlay::magic_ is in the wrong location");
-- static_assert(offsetof(RelocationOverlay, magic_) == offsetof(js::Shape, base_) + sizeof(uint32_t),
-- "RelocationOverlay::magic_ is in the wrong location");
-+ //static_assert(offsetof(RelocationOverlay, magic_) == offsetof(JSObject, group_) + sizeof(uint32_t),
-+ // "RelocationOverlay::magic_ is in the wrong location");
-+ //static_assert(offsetof(RelocationOverlay, magic_) == offsetof(js::Shape, base_) + sizeof(uint32_t),
-+ // "RelocationOverlay::magic_ is in the wrong location");
- static_assert(offsetof(RelocationOverlay, magic_) == offsetof(JSString, d.u1.length),
- "RelocationOverlay::magic_ is in the wrong location");
- magic_ = Relocated;
---- thunderbird-60.2.1/js/src/jsfriendapi.h.old 2018-10-01 14:51:13.000000000 +0000
-+++ thunderbird-60.2.1/js/src/jsfriendapi.h 2018-10-12 19:12:06.190000000 +0000
-@@ -9,6 +9,7 @@
-
- #include "mozilla/Atomics.h"
- #include "mozilla/Casting.h"
-+#include "mozilla/EndianUtils.h"
- #include "mozilla/Maybe.h"
- #include "mozilla/MemoryReporting.h"
- #include "mozilla/UniquePtr.h"
-@@ -640,8 +641,15 @@
- static const uint32_t LATIN1_CHARS_BIT = JS_BIT(6);
- static const uint32_t EXTERNAL_FLAGS = LINEAR_BIT | NON_ATOM_BIT | JS_BIT(5);
- static const uint32_t TYPE_FLAGS_MASK = JS_BIT(6) - 1;
-+#if MOZ_LITTLE_ENDIAN
- uint32_t flags;
- uint32_t length;
-+#elif JS_BITS_PER_WORD == 64
-+ uint32_t length;
-+ uint32_t flags;
-+#else
-+# error "Support for 32-bit big-endian architectures is untested. See bug 1488552."
-+#endif
- union {
- const JS::Latin1Char* nonInlineCharsLatin1;
- const char16_t* nonInlineCharsTwoByte;
diff --git a/experimental/thunderbird/fix-bug-1261392.patch b/experimental/thunderbird/fix-bug-1261392.patch
deleted file mode 100644
index 1f7a36af3..000000000
--- a/experimental/thunderbird/fix-bug-1261392.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- a/tools/profiler/core/platform.h 2017-05-27 11:44:06.733119794 +0000
-+++ b/tools/profiler/core/platform.h 2017-05-27 11:46:16.004253520 +0000
-@@ -54,10 +54,11 @@
- #include <vector>
- #include "StackTop.h"
-
--// We need a definition of gettid(), but glibc doesn't provide a
--// wrapper for it.
--#if defined(__GLIBC__)
-+// We need a definition of gettid(), but Linux libc implementations don't
-+// provide a wrapper for it (except for Bionic)
-+#if defined(__linux__)
- #include <unistd.h>
-+#if !defined(__BIONIC__)
- #include <sys/syscall.h>
- static inline pid_t gettid()
- {
-@@ -71,6 +72,7 @@
- return (pid_t) syscall(SYS_thread_selfid);
- }
- #endif
-+#endif
-
- #ifdef XP_WIN
- #include <windows.h>
diff --git a/experimental/thunderbird/fix-seccomp-bpf.patch b/experimental/thunderbird/fix-seccomp-bpf.patch
deleted file mode 100644
index 47cde56c7..000000000
--- a/experimental/thunderbird/fix-seccomp-bpf.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc.orig 2015-09-23 09:10:08.812740571 +0200
-+++ b/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc 2015-09-23 09:11:38.404746155 +0200
-@@ -23,6 +23,11 @@
- #include "sandbox/linux/services/android_ucontext.h"
- #endif
-
-+// musl libc defines siginfo_t __si_fields instead of _sifields
-+#if defined(OS_LINUX) && !defined(__GLIBC__)
-+#define _sifields __si_fields
-+#endif
-+
- namespace {
-
- struct arch_sigsys {
diff --git a/experimental/thunderbird/mozconfig b/experimental/thunderbird/mozconfig
deleted file mode 100644
index 637171bca..000000000
--- a/experimental/thunderbird/mozconfig
+++ /dev/null
@@ -1,29 +0,0 @@
-ac_add_options --prefix=/usr
-ac_add_options --libdir=/usr/lib
-ac_add_options --disable-crashreporter
-ac_add_options --disable-install-strip
-ac_add_options --disable-jemalloc
-ac_add_options --disable-profiling
-ac_add_options --disable-strip
-ac_add_options --disable-tests
-ac_add_options --disable-updater
-ac_add_options --enable-application=comm/mail
-ac_add_options --enable-alsa
-ac_add_options --enable-calendar
-ac_add_options --enable-dbus
-ac_add_options --enable-default-toolkit=cairo-gtk3
-ac_add_options --enable-official-branding
-ac_add_options --enable-pie
-ac_add_options --enable-pulseaudio
-ac_add_options --enable-startup-notification
-ac_add_options --enable-system-ffi
-ac_add_options --enable-system-hunspell
-ac_add_options --with-pthreads
-ac_add_options --with-system-bz2
-ac_add_options --with-system-icu
-ac_add_options --with-system-jpeg
-ac_add_options --with-system-libevent
-ac_add_options --with-system-nspr
-ac_add_options --with-system-nss
-ac_add_options --with-system-png
-ac_add_options --with-system-zlib
diff --git a/experimental/thunderbird/proper-system-hunspell.patch b/experimental/thunderbird/proper-system-hunspell.patch
deleted file mode 100644
index 056dacce6..000000000
--- a/experimental/thunderbird/proper-system-hunspell.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-moz seem to have no idea what their own damn build system is doing...
-
---- thunderbird-52.6.0/extensions/spellcheck/hunspell/glue/moz.build 2018-01-24 03:06:15.000000000 +0000
-+++ thunderbird-52.6.0/extensions/spellcheck/hunspell/glue/moz.build 2018-03-12 09:17:05.386773708 +0000
-@@ -16,6 +16,9 @@
- if CONFIG['MOZ_SYSTEM_HUNSPELL']:
- CXXFLAGS += CONFIG['MOZ_HUNSPELL_CFLAGS']
- else:
-+ # This variable is referenced in configure.in. Make sure to change that file
-+ # too if you need to change this variable.
-+ DEFINES['HUNSPELL_STATIC'] = True
- LOCAL_INCLUDES += ['../src']
-
- LOCAL_INCLUDES += [
-@@ -33,7 +36,3 @@
- 'RemoteSpellCheckEngineChild.h',
- 'RemoteSpellCheckEngineParent.h',
- ]
--
--# This variable is referenced in configure.in. Make sure to change that file
--# too if you need to change this variable.
--DEFINES['HUNSPELL_STATIC'] = True
diff --git a/experimental/thunderbird/rust-config.patch b/experimental/thunderbird/rust-config.patch
deleted file mode 100644
index 4dbddc2a9..000000000
--- a/experimental/thunderbird/rust-config.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-look, another reason to hate google: fuchsia's triplets confuse the hell out of poor mozconfig
-
-meanwhile, make -foxkit- more important than -unknown-
-
---- thunderbird-60.2.1/build/moz.configure/rust.configure.old 2018-10-01 14:51:04.000000000 +0000
-+++ thunderbird-60.2.1/build/moz.configure/rust.configure 2018-10-11 23:13:15.370000000 +0000
-@@ -119,9 +119,13 @@
- ambiguous = set()
- per_raw_os = {}
- for t in out:
-+ if 'fuchsia' in t: continue
- t = split_triplet(t, allow_unknown=True)
- key = (t.cpu, t.endianness, t.os)
- if key in per_os:
-+ # hax to allow Adélie toolchains to work
-+ if 'foxkit' in per_os[key].alias:
-+ continue
- previous = per_os[key]
- per_raw_os[(previous.cpu, previous.endianness,
- previous.raw_os)] = previous
diff --git a/experimental/thunderbird/skia.patch b/experimental/thunderbird/skia.patch
deleted file mode 100644
index a44ef76ed..000000000
--- a/experimental/thunderbird/skia.patch
+++ /dev/null
@@ -1,132 +0,0 @@
-# HG changeset patch
-# User Lee Salzman <lsalzman@mozilla.com>
-# Date 1527131721 14400
-# Wed May 23 23:15:21 2018 -0400
-# Node ID a8d83bebeab4c07a850711aa2c241a56f784613e
-# Parent 50fbb3e601fef35e2a673895cb0b3bc05374458a
-fix big-endian Skia builds
-
-MozReview-Commit-ID: JQivGBE45qy
-
-diff --git a/gfx/skia/skia/include/core/SkColorPriv.h b/gfx/skia/skia/include/core/SkColorPriv.h
---- a/gfx/skia/skia/include/core/SkColorPriv.h
-+++ b/gfx/skia/skia/include/core/SkColorPriv.h
-@@ -50,27 +50,20 @@ static inline U8CPU SkUnitScalarClampToB
- * For easier compatibility with Skia's GPU backend, we further restrict these
- * to either (in memory-byte-order) RGBA or BGRA. Note that this "order" does
- * not directly correspond to the same shift-order, since we have to take endianess
- * into account.
- *
- * Here we enforce this constraint.
- */
-
--#ifdef SK_CPU_BENDIAN
-- #define SK_RGBA_R32_SHIFT 24
-- #define SK_RGBA_G32_SHIFT 16
-- #define SK_RGBA_B32_SHIFT 8
-- #define SK_RGBA_A32_SHIFT 0
--#else
-- #define SK_RGBA_R32_SHIFT 0
-- #define SK_RGBA_G32_SHIFT 8
-- #define SK_RGBA_B32_SHIFT 16
-- #define SK_RGBA_A32_SHIFT 24
--#endif
-+#define SK_RGBA_R32_SHIFT 0
-+#define SK_RGBA_G32_SHIFT 8
-+#define SK_RGBA_B32_SHIFT 16
-+#define SK_RGBA_A32_SHIFT 24
-
- #define SkGetPackedA32(packed) ((uint32_t)((packed) << (24 - SK_A32_SHIFT)) >> 24)
- #define SkGetPackedR32(packed) ((uint32_t)((packed) << (24 - SK_R32_SHIFT)) >> 24)
- #define SkGetPackedG32(packed) ((uint32_t)((packed) << (24 - SK_G32_SHIFT)) >> 24)
- #define SkGetPackedB32(packed) ((uint32_t)((packed) << (24 - SK_B32_SHIFT)) >> 24)
-
- #define SkA32Assert(a) SkASSERT((unsigned)(a) <= SK_A32_MASK)
- #define SkR32Assert(r) SkASSERT((unsigned)(r) <= SK_R32_MASK)
-diff --git a/gfx/skia/skia/include/core/SkImageInfo.h b/gfx/skia/skia/include/core/SkImageInfo.h
---- a/gfx/skia/skia/include/core/SkImageInfo.h
-+++ b/gfx/skia/skia/include/core/SkImageInfo.h
-@@ -79,17 +79,17 @@ enum SkColorType {
-
- kLastEnum_SkColorType = kRGBA_F16_SkColorType,
-
- #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A)
- kN32_SkColorType = kBGRA_8888_SkColorType,
- #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A)
- kN32_SkColorType = kRGBA_8888_SkColorType,
- #else
-- #error "SK_*32_SHIFT values must correspond to BGRA or RGBA byte order"
-+ kN32_SkColorType = kBGRA_8888_SkColorType,
- #endif
- };
-
- /**
- * Returns the number of bytes-per-pixel for the specified colortype, or 0 if invalid.
- */
- SK_API int SkColorTypeBytesPerPixel(SkColorType ct);
-
-diff --git a/gfx/skia/skia/include/gpu/GrTypes.h b/gfx/skia/skia/include/gpu/GrTypes.h
---- a/gfx/skia/skia/include/gpu/GrTypes.h
-+++ b/gfx/skia/skia/include/gpu/GrTypes.h
-@@ -339,25 +339,22 @@ enum GrPixelConfig {
- kPrivateConfig4_GrPixelConfig,
- kPrivateConfig5_GrPixelConfig,
-
- kLast_GrPixelConfig = kPrivateConfig5_GrPixelConfig
- };
- static const int kGrPixelConfigCnt = kLast_GrPixelConfig + 1;
-
- // Aliases for pixel configs that match skia's byte order.
--#ifndef SK_CPU_LENDIAN
-- #error "Skia gpu currently assumes little endian"
--#endif
- #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A)
- static const GrPixelConfig kSkia8888_GrPixelConfig = kBGRA_8888_GrPixelConfig;
- #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A)
- static const GrPixelConfig kSkia8888_GrPixelConfig = kRGBA_8888_GrPixelConfig;
- #else
-- #error "SK_*32_SHIFT values must correspond to GL_BGRA or GL_RGBA format."
-+ static const GrPixelConfig kSkia8888_GrPixelConfig = kBGRA_8888_GrPixelConfig;
- #endif
-
- /**
- * Optional bitfield flags that can be set on GrSurfaceDesc (below).
- */
- enum GrSurfaceFlags {
- kNone_GrSurfaceFlags = 0x0,
- /**
-diff --git a/gfx/skia/skia/src/core/SkColorData.h b/gfx/skia/skia/src/core/SkColorData.h
---- a/gfx/skia/skia/src/core/SkColorData.h
-+++ b/gfx/skia/skia/src/core/SkColorData.h
-@@ -27,27 +27,20 @@
- * For easier compatibility with Skia's GPU backend, we further restrict these
- * to either (in memory-byte-order) RGBA or BGRA. Note that this "order" does
- * not directly correspond to the same shift-order, since we have to take endianess
- * into account.
- *
- * Here we enforce this constraint.
- */
-
--#ifdef SK_CPU_BENDIAN
-- #define SK_BGRA_B32_SHIFT 24
-- #define SK_BGRA_G32_SHIFT 16
-- #define SK_BGRA_R32_SHIFT 8
-- #define SK_BGRA_A32_SHIFT 0
--#else
-- #define SK_BGRA_B32_SHIFT 0
-- #define SK_BGRA_G32_SHIFT 8
-- #define SK_BGRA_R32_SHIFT 16
-- #define SK_BGRA_A32_SHIFT 24
--#endif
-+#define SK_BGRA_B32_SHIFT 0
-+#define SK_BGRA_G32_SHIFT 8
-+#define SK_BGRA_R32_SHIFT 16
-+#define SK_BGRA_A32_SHIFT 24
-
- #if defined(SK_PMCOLOR_IS_RGBA) && defined(SK_PMCOLOR_IS_BGRA)
- #error "can't define PMCOLOR to be RGBA and BGRA"
- #endif
-
- #define LOCAL_PMCOLOR_SHIFTS_EQUIVALENT_TO_RGBA \
- (SK_A32_SHIFT == SK_RGBA_A32_SHIFT && \
- SK_R32_SHIFT == SK_RGBA_R32_SHIFT && \
diff --git a/experimental/thunderbird/stab.h b/experimental/thunderbird/stab.h
deleted file mode 100644
index 6f70af398..000000000
--- a/experimental/thunderbird/stab.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* $OpenBSD: stab.h,v 1.3 2003/06/02 19:34:12 millert Exp $ */
-/* $NetBSD: stab.h,v 1.4 1994/10/26 00:56:25 cgd Exp $ */
-
-/*-
- * Copyright (c) 1991 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)stab.h 5.2 (Berkeley) 4/4/91
- */
-
-#ifndef _STAB_H_
-#define _STAB_H_
-
-/*
- * The following are symbols used by various debuggers and by the Pascal
- * compiler. Each of them must have one (or more) of the bits defined by
- * the N_STAB mask set.
- */
-
-#define N_GSYM 0x20 /* global symbol */
-#define N_FNAME 0x22 /* F77 function name */
-#define N_FUN 0x24 /* procedure name */
-#define N_STSYM 0x26 /* data segment variable */
-#define N_LCSYM 0x28 /* bss segment variable */
-#define N_MAIN 0x2a /* main function name */
-#define N_PC 0x30 /* global Pascal symbol */
-#define N_RSYM 0x40 /* register variable */
-#define N_SLINE 0x44 /* text segment line number */
-#define N_DSLINE 0x46 /* data segment line number */
-#define N_BSLINE 0x48 /* bss segment line number */
-#define N_SSYM 0x60 /* structure/union element */
-#define N_SO 0x64 /* main source file name */
-#define N_LSYM 0x80 /* stack variable */
-#define N_BINCL 0x82 /* include file beginning */
-#define N_SOL 0x84 /* included source file name */
-#define N_PSYM 0xa0 /* parameter variable */
-#define N_EINCL 0xa2 /* include file end */
-#define N_ENTRY 0xa4 /* alternate entry point */
-#define N_LBRAC 0xc0 /* left bracket */
-#define N_EXCL 0xc2 /* deleted include file */
-#define N_RBRAC 0xe0 /* right bracket */
-#define N_BCOMM 0xe2 /* begin common */
-#define N_ECOMM 0xe4 /* end common */
-#define N_ECOML 0xe8 /* end common (local name) */
-#define N_LENG 0xfe /* length of preceding entry */
-
-#endif /* !_STAB_H_ */
diff --git a/experimental/thunderbird/stackwalk-x86-ppc.patch b/experimental/thunderbird/stackwalk-x86-ppc.patch
deleted file mode 100644
index 5a4189847..000000000
--- a/experimental/thunderbird/stackwalk-x86-ppc.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- thunderbird-52.6.0/mozglue/misc/StackWalk.cpp
-+++ thunderbird-52.6.0/mozglue/misc/StackWalk.cpp
-@@ -41,13 +41,7 @@ static CriticalAddress gCriticalAddress;
- #define MOZ_STACKWALK_SUPPORTS_MACOSX 0
- #endif
-
--#if (defined(linux) && \
-- ((defined(__GNUC__) && (defined(__i386) || defined(PPC))) || \
-- defined(HAVE__UNWIND_BACKTRACE)))
--#define MOZ_STACKWALK_SUPPORTS_LINUX 1
--#else
- #define MOZ_STACKWALK_SUPPORTS_LINUX 0
--#endif
-
- #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
- #define HAVE___LIBC_STACK_END 1
diff --git a/experimental/thunderbird/thunderbird.desktop b/experimental/thunderbird/thunderbird.desktop
deleted file mode 100644
index 210859df0..000000000
--- a/experimental/thunderbird/thunderbird.desktop
+++ /dev/null
@@ -1,64 +0,0 @@
-[Desktop Entry]
-Name=Thunderbird
-GenericName=Mail Client
-GenericName[ast]=Client de correu
-GenericName[ca]=Client de correu
-GenericName[cs]=Poštovní klient
-GenericName[da]=E-postklient
-GenericName[de]=E-Mail-Anwendung
-GenericName[el]=Λογισμικό αλληλογραφίας
-GenericName[es]=Cliente de correo
-GenericName[fi]=Sähköpostiohjelma
-GenericName[fr]=Client de messagerie
-GenericName[gl]=Cliente de correo electrónico
-GenericName[he]=לקוח דוא״ל
-GenericName[hr]=Klijent e-pošte
-GenericName[hu]=Levelezőkliens
-GenericName[it]=Client email
-GenericName[ja]=電子メールクライアント
-GenericName[ko]=메일 클라이언트
-GenericName[nl]=E-mailprogramma
-GenericName[pl]=Klient poczty
-GenericName[pt_BR]=Cliente de E-mail
-GenericName[ru]=Почтовый клиент
-GenericName[sk]=Poštový klient
-GenericName[ug]=ئېلخەت دېتالى
-GenericName[uk]=Поштова програма
-GenericName[vi]=Phần mềm khách quản lý thư điện tử
-GenericName[zh_CN]=邮件新闻客户端
-GenericName[zh_TW]=郵件用戶端
-Comment=Send and receive mail with Thunderbird
-Comment[ast]=Lleer y escribir corréu electrónicu
-Comment[ca]=Llegiu i escriviu correu
-Comment[cs]=Čtení a psaní pošty
-Comment[da]=Skriv/læs e-post/nyhedsgruppe med Mozilla Thunderbird
-Comment[de]=E-Mails und Nachrichten mit Thunderbird lesen und schreiben
-Comment[el]=Διαβάστε και γράψτε γράμματα με το Mozilla Thunderbird
-Comment[es]=Lea y escriba correos y noticias con Thunderbird
-Comment[fi]=Lue ja kirjoita sähköposteja
-Comment[fr]=Lire et écrire des courriels
-Comment[gl]=Lea e escriba correo electrónico
-Comment[he]=קריאה/כתיבה של דוא״ל/חדשות באמצעות Mozilla Thunderbird
-Comment[hr]=Čitajte/šaljite e-poštu s Thunderbird
-Comment[hu]=Levelek írása és olvasása a Thunderbirddel
-Comment[it]=Per leggere e scrivere email
-Comment[ja]=メールの読み書き
-Comment[ko]=Mozilla Thunderbird 메일/뉴스 읽기 및 쓰기 클라이언트
-Comment[nl]=E-mail/nieuws lezen en schrijven met Mozilla Thunderbird
-Comment[pl]=Czytanie i wysyłanie e-maili
-Comment[pt_BR]=Leia e escreva suas mensagens
-Comment[ru]=Читайте и пишите письма
-Comment[sk]=Čítajte a píšte poštu pomocou programu Thunderbird
-Comment[sv]=Läs och skriv e-post
-Comment[ug]=ئېلخەت ۋە خەۋەرلەرنى Mozilla Thunderbird دا كۆرۈش ۋە يېزىش
-Comment[uk]=Читання та написання листів
-Comment[vi]=Đọc và soạn thư điện tử
-Comment[zh_CN]=阅读邮件或新闻
-Comment[zh_TW]=以 Mozilla Thunderbird 讀寫郵件或新聞
-Exec=thunderbird %u
-Icon=thunderbird
-Terminal=false
-Type=Application
-MimeType=message/rfc822;x-scheme-handler/mailto;
-StartupNotify=true
-Categories=Network;Email;
diff --git a/experimental/thunderbird/webrtc-broken.patch b/experimental/thunderbird/webrtc-broken.patch
deleted file mode 100644
index 593942fef..000000000
--- a/experimental/thunderbird/webrtc-broken.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff -Naur firefox-60.0.orig/media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c firefox-60.0/media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c
---- firefox-60.0.orig/media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c 2018-05-13 17:33:55.266855917 -0700
-+++ firefox-60.0/media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c 2018-05-13 20:21:08.158464933 -0700
-@@ -11,7 +11,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include <features.h>
--#if __GLIBC_PREREQ(2, 16)
-+#if __linux__
- #include <sys/auxv.h>
- #else
- #include <fcntl.h>
-@@ -29,7 +29,7 @@
- int architecture = 0;
- unsigned long hwcap = 0;
- const char* platform = NULL;
--#if __GLIBC_PREREQ(2, 16)
-+#if __linux__
- hwcap = getauxval(AT_HWCAP);
- platform = (const char*)getauxval(AT_PLATFORM);
- #else
-@@ -53,7 +53,7 @@
- }
- close(fd);
- }
--#endif // __GLIBC_PREREQ(2,16)
-+#endif // __linux__
- #if defined(__aarch64__)
- architecture = 8;
- if ((hwcap & HWCAP_FP) != 0)
diff --git a/experimental/zfs-utils/APKBUILD b/experimental/zfs-utils/APKBUILD
new file mode 100644
index 000000000..e6d86ec63
--- /dev/null
+++ b/experimental/zfs-utils/APKBUILD
@@ -0,0 +1,49 @@
+# Contributor: Síle Ekaterin Liszka <sheila@vulpine.house>
+# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
+# keep these in sync with kernel version
+_kflavour=""
+_kver="5.4.5-mc0"
+_kver2="$_kver-easy"
+pkgname=zfs-utils
+pkgver=0.8.3
+pkgrel=0
+pkgdesc="User utilities for the ZFS filesystem"
+url="https://open-zfs.org"
+arch="all"
+license="CDDL"
+depends=""
+makedepends="eudev-dev libtirpc-dev linux-headers openssl-dev zlib-dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc zfs-openrc"
+source="https://github.com/zfsonlinux/zfs/releases/download/zfs-$pkgver/zfs-$pkgver.tar.gz"
+builddir="$srcdir/zfs-$pkgver"
+
+prepare() {
+ default_prepare
+ update_config_sub
+}
+
+build() {
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var \
+ --with-linux=/usr/src/linux-$_kver \
+ --with-spec=generic \
+ --with-config=user
+ make
+}
+
+check() {
+ make check
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+ rm -r "$pkgdir/usr/share/zfs/zfs-tests"
+}
+
+sha512sums="aded632e6b04180560d4f2ff283260016e883dadae4e7fda9070b7113dee948099cb7a7b183f1c8139654389a2610fb9cc6f997acdc846040e605125cf016010 zfs-0.8.3.tar.gz"
diff --git a/experimental/zfs/APKBUILD b/experimental/zfs/APKBUILD
new file mode 100644
index 000000000..761c01f56
--- /dev/null
+++ b/experimental/zfs/APKBUILD
@@ -0,0 +1,68 @@
+# Contributor: Síle Ekaterin Liszka <sheila@vulpine.house>
+# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
+# keep these in sync with kernel version
+_kflavour=""
+_kver="5.4.5-mc0"
+_kver2="$_kver-easy"
+pkgname="zfs-$_kver"
+pkgver=0.8.3
+pkgrel=0
+pkgdesc="Linux support for the ZFS filesystem"
+url="https://open-zfs.org"
+arch="all"
+license="CDDL"
+depends="easy-kernel$_kflavour-modules-$_kver zfs-utils"
+makedepends="eudev-dev libtirpc-dev linux-headers openssl-dev zlib-dev
+ easy-kernel$_kflavour-src-$_kver autoconf automake libtool"
+install=""
+subpackages="$pkgname-dev"
+source="https://github.com/zfsonlinux/zfs/releases/download/zfs-$pkgver/zfs-$pkgver.tar.gz
+ fix-autoconf-redirection-for-dash.patch
+ Linux-5.6-compat-time_t-2c3a83701dd1.patch
+ Linux-5.6-compat-timestamp_truncate-795699a6cc28.patch
+ Linux-5.6-compat-ktime_get_raw_ts64-ff5587d65137.patch"
+builddir="$srcdir/zfs-$pkgver"
+
+prepare() {
+ default_prepare
+ update_config_sub
+ ./autogen.sh
+}
+
+build() {
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var \
+ --with-linux=/usr/src/linux-$_kver \
+ --with-spec=generic \
+ --with-config=kernel
+ make
+}
+
+check() {
+ make check
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+}
+
+dev() {
+ default_dev
+ mv "$pkgdir/usr/src/spl-$pkgver" "$subpkgdir/usr/src"
+ cd "$pkgdir/usr/src/zfs-$pkgver"
+ mv zfs.release.in zfs_config.h.in "$subpkgdir/usr/src/zfs-$pkgver"
+ cd "$pkgdir/usr/src/zfs-$pkgver/$_kver2"
+ mv Module.symvers zfs.release spl.release "$subpkgdir/usr/src/zfs-$pkgver/$_kver2"
+ rm -r "$pkgdir/usr/src"
+}
+
+sha512sums="aded632e6b04180560d4f2ff283260016e883dadae4e7fda9070b7113dee948099cb7a7b183f1c8139654389a2610fb9cc6f997acdc846040e605125cf016010 zfs-0.8.3.tar.gz
+47dc563fc1daa4c67096d2316ed2cea6aeaf4ca9e0daa41f2036a4ff3dcb542c88534ac25033a23e8fa97a9b82e56a8933f9fa56bae8a1fa07c1b15eb18f68f8 fix-autoconf-redirection-for-dash.patch
+a74bb30ef2e5f28fdc7b0cfe915f2841762ec8f6cd2368d2e4ba8627443e8e0754011a88b743e27519d191464e35e6c923510451f2a86d7e1a4ad3c5b737015f Linux-5.6-compat-time_t-2c3a83701dd1.patch
+a791406265a6e1501e743b6f13764736439a14a9dfc1feaabc5fc82e27de1b2adf56b566c162fc42313f311fbf76c3213f7c2c05a518de36f96887e3d462e94a Linux-5.6-compat-timestamp_truncate-795699a6cc28.patch
+9c78793a5840bc5fb5bb44a210124c1c8f09ce0ddfe88b91be8dbde5465763912308b89cd87300fd05b898076366528612c34a9c2f834d3b6573aa68eb442ec3 Linux-5.6-compat-ktime_get_raw_ts64-ff5587d65137.patch"
diff --git a/experimental/zfs/Linux-5.6-compat-ktime_get_raw_ts64-ff5587d65137.patch b/experimental/zfs/Linux-5.6-compat-ktime_get_raw_ts64-ff5587d65137.patch
new file mode 100644
index 000000000..1b0402d29
--- /dev/null
+++ b/experimental/zfs/Linux-5.6-compat-ktime_get_raw_ts64-ff5587d65137.patch
@@ -0,0 +1,145 @@
+commit ff5587d651371ab496f7962e85fe2c337fdb8a59
+Author: Brian Behlendorf <behlendorf1@llnl.gov>
+Date: Wed Feb 26 12:42:33 2020 -0800
+
+ Linux 5.6 compat: ktime_get_raw_ts64()
+
+ The getrawmonotonic() and getrawmonotonic64() interfaces have been
+ fully retired. Update gethrtime() to use the replacement interface
+ ktime_get_raw_ts64() which was introduced in the 4.18 kernel.
+
+ Reviewed-by: Tony Hutter <hutter2@llnl.gov>
+ Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
+ Closes #10052
+ Closes #10064
+
+diff --git a/config/kernel-ktime.m4 b/config/kernel-ktime.m4
+new file mode 100644
+index 000000000..64c3b5f90
+--- /dev/null
++++ b/config/kernel-ktime.m4
+@@ -0,0 +1,55 @@
++dnl #
++dnl # 4.18: ktime_get_coarse_real_ts64() replaces current_kernel_time64().
++dnl #
++AC_DEFUN([ZFS_AC_KERNEL_SRC_KTIME_GET_COARSE_REAL_TS64], [
++ ZFS_LINUX_TEST_SRC([ktime_get_coarse_real_ts64], [
++ #include <linux/mm.h>
++ ], [
++ struct timespec64 ts;
++ ktime_get_coarse_real_ts64(&ts);
++ ])
++])
++
++AC_DEFUN([ZFS_AC_KERNEL_KTIME_GET_COARSE_REAL_TS64], [
++ AC_MSG_CHECKING([whether ktime_get_coarse_real_ts64() exists])
++ ZFS_LINUX_TEST_RESULT([ktime_get_coarse_real_ts64], [
++ AC_MSG_RESULT(yes)
++ AC_DEFINE(HAVE_KTIME_GET_COARSE_REAL_TS64, 1,
++ [ktime_get_coarse_real_ts64() exists])
++ ], [
++ AC_MSG_RESULT(no)
++ ])
++])
++
++dnl #
++dnl # 4.18: ktime_get_raw_ts64() replaces getrawmonotonic64().
++dnl #
++AC_DEFUN([ZFS_AC_KERNEL_SRC_KTIME_GET_RAW_TS64], [
++ ZFS_LINUX_TEST_SRC([ktime_get_raw_ts64], [
++ #include <linux/mm.h>
++ ], [
++ struct timespec64 ts;
++ ktime_get_raw_ts64(&ts);
++ ])
++])
++
++AC_DEFUN([ZFS_AC_KERNEL_KTIME_GET_RAW_TS64], [
++ AC_MSG_CHECKING([whether ktime_get_raw_ts64() exists])
++ ZFS_LINUX_TEST_RESULT([ktime_get_raw_ts64], [
++ AC_MSG_RESULT(yes)
++ AC_DEFINE(HAVE_KTIME_GET_RAW_TS64, 1,
++ [ktime_get_raw_ts64() exists])
++ ], [
++ AC_MSG_RESULT(no)
++ ])
++])
++
++AC_DEFUN([ZFS_AC_KERNEL_SRC_KTIME], [
++ ZFS_AC_KERNEL_SRC_KTIME_GET_COARSE_REAL_TS64
++ ZFS_AC_KERNEL_SRC_KTIME_GET_RAW_TS64
++])
++
++AC_DEFUN([ZFS_AC_KERNEL_KTIME], [
++ ZFS_AC_KERNEL_KTIME_GET_COARSE_REAL_TS64
++ ZFS_AC_KERNEL_KTIME_GET_RAW_TS64
++])
+diff --git a/config/kernel-ktime_get_coarse_real_ts64.m4 b/config/kernel-ktime_get_coarse_real_ts64.m4
+deleted file mode 100644
+index 28492bf04..000000000
+--- a/config/kernel-ktime_get_coarse_real_ts64.m4
++++ /dev/null
+@@ -1,23 +0,0 @@
+-dnl #
+-dnl # 4.18: ktime_get_coarse_real_ts64() added. Use it in place of
+-dnl # current_kernel_time64().
+-dnl #
+-AC_DEFUN([ZFS_AC_KERNEL_SRC_KTIME_GET_COARSE_REAL_TS64], [
+- ZFS_LINUX_TEST_SRC([ktime_get_coarse_real_ts64], [
+- #include <linux/mm.h>
+- ], [
+- struct timespec64 ts;
+- ktime_get_coarse_real_ts64(&ts);
+- ])
+-])
+-
+-AC_DEFUN([ZFS_AC_KERNEL_KTIME_GET_COARSE_REAL_TS64], [
+- AC_MSG_CHECKING([whether ktime_get_coarse_real_ts64() exists])
+- ZFS_LINUX_TEST_RESULT([ktime_get_coarse_real_ts64], [
+- AC_MSG_RESULT(yes)
+- AC_DEFINE(HAVE_KTIME_GET_COARSE_REAL_TS64, 1,
+- [ktime_get_coarse_real_ts64() exists])
+- ], [
+- AC_MSG_RESULT(no)
+- ])
+-])
+diff --git a/config/kernel.m4 b/config/kernel.m4
+index 6bb37937c..a0fa2514e 100644
+--- a/config/kernel.m4
++++ b/config/kernel.m4
+@@ -114,7 +114,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
+ ZFS_AC_KERNEL_SRC_CURRENT_TIME
+ ZFS_AC_KERNEL_SRC_USERNS_CAPABILITIES
+ ZFS_AC_KERNEL_SRC_IN_COMPAT_SYSCALL
+- ZFS_AC_KERNEL_SRC_KTIME_GET_COARSE_REAL_TS64
++ ZFS_AC_KERNEL_SRC_KTIME
+ ZFS_AC_KERNEL_SRC_TOTALRAM_PAGES_FUNC
+ ZFS_AC_KERNEL_SRC_TOTALHIGH_PAGES
+ ZFS_AC_KERNEL_SRC_KSTRTOUL
+@@ -208,7 +208,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
+ ZFS_AC_KERNEL_CURRENT_TIME
+ ZFS_AC_KERNEL_USERNS_CAPABILITIES
+ ZFS_AC_KERNEL_IN_COMPAT_SYSCALL
+- ZFS_AC_KERNEL_KTIME_GET_COARSE_REAL_TS64
++ ZFS_AC_KERNEL_KTIME
+ ZFS_AC_KERNEL_TOTALRAM_PAGES_FUNC
+ ZFS_AC_KERNEL_TOTALHIGH_PAGES
+ ZFS_AC_KERNEL_KSTRTOUL
+diff --git a/include/spl/sys/time.h b/include/spl/sys/time.h
+index 312415b7b..56fd725c0 100644
+--- a/include/spl/sys/time.h
++++ b/include/spl/sys/time.h
+@@ -105,8 +105,13 @@ gethrestime_sec(void)
+ static inline hrtime_t
+ gethrtime(void)
+ {
++#if defined(HAVE_KTIME_GET_RAW_TS64)
++ struct timespec64 ts;
++ ktime_get_raw_ts64(&ts);
++#else
+ struct timespec ts;
+ getrawmonotonic(&ts);
++#endif
+ return (((hrtime_t)ts.tv_sec * NSEC_PER_SEC) + ts.tv_nsec);
+ }
+
diff --git a/experimental/zfs/Linux-5.6-compat-time_t-2c3a83701dd1.patch b/experimental/zfs/Linux-5.6-compat-time_t-2c3a83701dd1.patch
new file mode 100644
index 000000000..7a97d968f
--- /dev/null
+++ b/experimental/zfs/Linux-5.6-compat-time_t-2c3a83701dd1.patch
@@ -0,0 +1,110 @@
+commit 2c3a83701dd185cadb30db4556256534e2930c7d
+Author: Brian Behlendorf <behlendorf1@llnl.gov>
+Date: Wed Feb 26 13:18:07 2020 -0800
+
+ Linux 5.6 compat: time_t
+
+ As part of the Linux kernel's y2038 changes the time_t type has been
+ fully retired. Callers are now required to use the time64_t type.
+
+ Rather than move to the new type, I've removed the few remaining
+ places where a time_t is used in the kernel code. They've been
+ replaced with a uint64_t which is already how ZFS internally
+ handled these values.
+
+ Going forward we should work towards updating the remaining user
+ space time_t consumers to the 64-bit interfaces.
+
+ Reviewed-by: Matthew Macy <mmacy@freebsd.org>
+ Reviewed-by: Tony Hutter <hutter2@llnl.gov>
+ Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
+ Closes #10052
+ Closes #10064
+
+diff --git a/include/spl/sys/time.h b/include/spl/sys/time.h
+index 56fd725c0..4309c300b 100644
+--- a/include/spl/sys/time.h
++++ b/include/spl/sys/time.h
+@@ -85,7 +85,7 @@ gethrestime(inode_timespec_t *ts)
+ #endif
+ }
+
+-static inline time_t
++static inline uint64_t
+ gethrestime_sec(void)
+ {
+ #if defined(HAVE_INODE_TIMESPEC64_TIMES)
+diff --git a/include/sys/vdev_impl.h b/include/sys/vdev_impl.h
+index 4f63e1ae5..b55871a5d 100644
+--- a/include/sys/vdev_impl.h
++++ b/include/sys/vdev_impl.h
+@@ -272,7 +272,7 @@ struct vdev {
+ range_tree_t *vdev_initialize_tree; /* valid while initializing */
+ uint64_t vdev_initialize_bytes_est;
+ uint64_t vdev_initialize_bytes_done;
+- time_t vdev_initialize_action_time; /* start and end time */
++ uint64_t vdev_initialize_action_time; /* start and end time */
+
+ /* TRIM related */
+ boolean_t vdev_trim_exit_wanted;
+@@ -293,7 +293,7 @@ struct vdev {
+ uint64_t vdev_trim_rate; /* requested rate (bytes/sec) */
+ uint64_t vdev_trim_partial; /* requested partial TRIM */
+ uint64_t vdev_trim_secure; /* requested secure TRIM */
+- time_t vdev_trim_action_time; /* start and end time */
++ uint64_t vdev_trim_action_time; /* start and end time */
+
+ /* for limiting outstanding I/Os (initialize and TRIM) */
+ kmutex_t vdev_initialize_io_lock;
+diff --git a/lib/libspl/include/sys/time.h b/lib/libspl/include/sys/time.h
+index 291f2190a..c9f616504 100644
+--- a/lib/libspl/include/sys/time.h
++++ b/lib/libspl/include/sys/time.h
+@@ -88,7 +88,7 @@ gethrestime(inode_timespec_t *ts)
+ ts->tv_nsec = tv.tv_usec * NSEC_PER_USEC;
+ }
+
+-static inline time_t
++static inline uint64_t
+ gethrestime_sec(void)
+ {
+ struct timeval tv;
+diff --git a/module/zfs/zfs_debug.c b/module/zfs/zfs_debug.c
+index a64971d0a..d98463f1b 100644
+--- a/module/zfs/zfs_debug.c
++++ b/module/zfs/zfs_debug.c
+@@ -28,7 +28,7 @@
+
+ typedef struct zfs_dbgmsg {
+ procfs_list_node_t zdm_node;
+- time_t zdm_timestamp;
++ uint64_t zdm_timestamp;
+ int zdm_size;
+ char zdm_msg[1]; /* variable length allocation */
+ } zfs_dbgmsg_t;
+diff --git a/module/zfs/vdev_initialize.c b/module/zfs/vdev_initialize.c
+index 3e691c7f5..5899af9fc 100644
+--- a/module/zfs/vdev_initialize.c
++++ b/module/zfs/vdev_initialize.c
+@@ -713,7 +713,7 @@ vdev_initialize_restart(vdev_t *vd)
+ vd->vdev_leaf_zap, VDEV_LEAF_ZAP_INITIALIZE_ACTION_TIME,
+ sizeof (timestamp), 1, &timestamp);
+ ASSERT(err == 0 || err == ENOENT);
+- vd->vdev_initialize_action_time = (time_t)timestamp;
++ vd->vdev_initialize_action_time = timestamp;
+
+ if (vd->vdev_initialize_state == VDEV_INITIALIZE_SUSPENDED ||
+ vd->vdev_offline) {
+diff --git a/module/zfs/vdev_trim.c b/module/zfs/vdev_trim.c
+index c7c429cbd..7dec07e3c 100644
+--- a/module/zfs/vdev_trim.c
++++ b/module/zfs/vdev_trim.c
+@@ -1051,7 +1051,7 @@ vdev_trim_restart(vdev_t *vd)
+ vd->vdev_leaf_zap, VDEV_LEAF_ZAP_TRIM_ACTION_TIME,
+ sizeof (timestamp), 1, &timestamp);
+ ASSERT(err == 0 || err == ENOENT);
+- vd->vdev_trim_action_time = (time_t)timestamp;
++ vd->vdev_trim_action_time = timestamp;
+
+ if (vd->vdev_trim_state == VDEV_TRIM_SUSPENDED ||
+ vd->vdev_offline) {
diff --git a/experimental/zfs/Linux-5.6-compat-timestamp_truncate-795699a6cc28.patch b/experimental/zfs/Linux-5.6-compat-timestamp_truncate-795699a6cc28.patch
new file mode 100644
index 000000000..deb81347b
--- /dev/null
+++ b/experimental/zfs/Linux-5.6-compat-timestamp_truncate-795699a6cc28.patch
@@ -0,0 +1,131 @@
+commit 795699a6cc28b8f1059397e03d1a86d576bfc7dc
+Author: Brian Behlendorf <behlendorf1@llnl.gov>
+Date: Thu Feb 6 12:37:25 2020 -0800
+
+ Linux 5.6 compat: timestamp_truncate()
+
+ The timestamp_truncate() function was added, it replaces the existing
+ timespec64_trunc() function. This change renames our wrapper function
+ to be consistent with the upstream name and updates the compatibility
+ code for older kernels accordingly.
+
+ Reviewed-by: Tony Hutter <hutter2@llnl.gov>
+ Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
+ Closes #9956
+ Closes #9961
+
+diff --git a/config/kernel-inode-times.m4 b/config/kernel-inode-times.m4
+index 57e7f31fd..8a79c299e 100644
+--- a/config/kernel-inode-times.m4
++++ b/config/kernel-inode-times.m4
+@@ -1,8 +1,22 @@
+-dnl #
+-dnl # 4.18 API change
+-dnl # i_atime, i_mtime, and i_ctime changed from timespec to timespec64.
+-dnl #
+ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_TIMES], [
++
++ dnl #
++ dnl # 5.6 API change
++ dnl # timespec64_trunc() replaced by timestamp_truncate() interface.
++ dnl #
++ ZFS_LINUX_TEST_SRC([timestamp_truncate], [
++ #include <linux/fs.h>
++ ],[
++ struct timespec64 ts;
++ struct inode ip;
++
++ ts = timestamp_truncate(ts, &ip);
++ ])
++
++ dnl #
++ dnl # 4.18 API change
++ dnl # i_atime, i_mtime, and i_ctime changed from timespec to timespec64.
++ dnl #
+ ZFS_LINUX_TEST_SRC([inode_times], [
+ #include <linux/fs.h>
+ ],[
+@@ -15,6 +29,15 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_TIMES], [
+ ])
+
+ AC_DEFUN([ZFS_AC_KERNEL_INODE_TIMES], [
++ AC_MSG_CHECKING([whether timestamp_truncate() exists])
++ ZFS_LINUX_TEST_RESULT([timestamp_truncate], [
++ AC_MSG_RESULT(yes)
++ AC_DEFINE(HAVE_INODE_TIMESTAMP_TRUNCATE, 1,
++ [timestamp_truncate() exists])
++ ],[
++ AC_MSG_RESULT(no)
++ ])
++
+ AC_MSG_CHECKING([whether inode->i_*time's are timespec64])
+ ZFS_LINUX_TEST_RESULT([inode_times], [
+ AC_MSG_RESULT(no)
+diff --git a/include/sys/zpl.h b/include/sys/zpl.h
+index 20a3dc674..ef5a0b842 100644
+--- a/include/sys/zpl.h
++++ b/include/sys/zpl.h
+@@ -170,13 +170,14 @@ zpl_dir_emit_dots(struct file *file, zpl_dir_context_t *ctx)
+ }
+ #endif /* HAVE_VFS_ITERATE */
+
+-/*
+- * Linux 4.18, inode times converted from timespec to timespec64.
+- */
+-#if defined(HAVE_INODE_TIMESPEC64_TIMES)
+-#define zpl_inode_timespec_trunc(ts, gran) timespec64_trunc(ts, gran)
++#if defined(HAVE_INODE_TIMESTAMP_TRUNCATE)
++#define zpl_inode_timestamp_truncate(ts, ip) timestamp_truncate(ts, ip)
++#elif defined(HAVE_INODE_TIMESPEC64_TIMES)
++#define zpl_inode_timestamp_truncate(ts, ip) \
++ timespec64_trunc(ts, (ip)->i_sb->s_time_gran)
+ #else
+-#define zpl_inode_timespec_trunc(ts, gran) timespec_trunc(ts, gran)
++#define zpl_inode_timestamp_truncate(ts, ip) \
++ timespec_trunc(ts, (ip)->i_sb->s_time_gran)
+ #endif
+
+ #endif /* _SYS_ZPL_H */
+diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c
+index ec63dbdeb..406cd7ef2 100644
+--- a/module/zfs/zfs_vnops.c
++++ b/module/zfs/zfs_vnops.c
+@@ -3444,8 +3444,8 @@ top:
+
+ if (mask & (ATTR_MTIME | ATTR_SIZE)) {
+ ZFS_TIME_ENCODE(&vap->va_mtime, mtime);
+- ZTOI(zp)->i_mtime = zpl_inode_timespec_trunc(vap->va_mtime,
+- ZTOI(zp)->i_sb->s_time_gran);
++ ZTOI(zp)->i_mtime = zpl_inode_timestamp_truncate(
++ vap->va_mtime, ZTOI(zp));
+
+ SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_MTIME(zfsvfs), NULL,
+ mtime, sizeof (mtime));
+@@ -3453,8 +3453,8 @@ top:
+
+ if (mask & (ATTR_CTIME | ATTR_SIZE)) {
+ ZFS_TIME_ENCODE(&vap->va_ctime, ctime);
+- ZTOI(zp)->i_ctime = zpl_inode_timespec_trunc(vap->va_ctime,
+- ZTOI(zp)->i_sb->s_time_gran);
++ ZTOI(zp)->i_ctime = zpl_inode_timestamp_truncate(vap->va_ctime,
++ ZTOI(zp));
+ SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_CTIME(zfsvfs), NULL,
+ ctime, sizeof (ctime));
+ }
+diff --git a/module/zfs/zpl_inode.c b/module/zfs/zpl_inode.c
+index e1c6ce7b7..c1b582574 100644
+--- a/module/zfs/zpl_inode.c
++++ b/module/zfs/zpl_inode.c
+@@ -382,10 +382,8 @@ zpl_setattr(struct dentry *dentry, struct iattr *ia)
+ vap->va_mtime = ia->ia_mtime;
+ vap->va_ctime = ia->ia_ctime;
+
+- if (vap->va_mask & ATTR_ATIME) {
+- ip->i_atime = zpl_inode_timespec_trunc(ia->ia_atime,
+- ip->i_sb->s_time_gran);
+- }
++ if (vap->va_mask & ATTR_ATIME)
++ ip->i_atime = zpl_inode_timestamp_truncate(ia->ia_atime, ip);
+
+ cookie = spl_fstrans_mark();
+ error = -zfs_setattr(ITOZ(ip), vap, 0, cr);
diff --git a/experimental/zfs/fix-autoconf-redirection-for-dash.patch b/experimental/zfs/fix-autoconf-redirection-for-dash.patch
new file mode 100644
index 000000000..aa6e3becc
--- /dev/null
+++ b/experimental/zfs/fix-autoconf-redirection-for-dash.patch
@@ -0,0 +1,11 @@
+--- a/config/kernel.m4 2020-03-28 09:54:37.851263408 +0000
++++ b/config/kernel.m4 2020-03-28 09:54:47.004155429 +0000
+@@ -603,7 +603,7 @@
+ AC_TRY_COMMAND([
+ KBUILD_MODPOST_NOFINAL="$5" KBUILD_MODPOST_WARN="$6"
+ make modules -k -j$TEST_JOBS -C $LINUX_OBJ $ARCH_UM
+- M=$PWD/$1 &>$1/build.log])
++ M=$PWD/$1 >$1/build.log 2>&1])
+ AS_IF([AC_TRY_COMMAND([$2])], [$3], [$4])
+ ])
+