Merge https://gitlab.com/librewolf-community/browser/linux into master
This commit is contained in:
commit
0b6f9419ee
34
CHANGELOG.md
34
CHANGELOG.md
|
@ -7,6 +7,40 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
This project follows the official Firefox releases, but also uses
|
This project follows the official Firefox releases, but also uses
|
||||||
[Arch Linux Package Versioning](https://wiki.archlinux.org/index.php/Arch_package_guidelines#Package_versioning) to mark individual releases in between versions.
|
[Arch Linux Package Versioning](https://wiki.archlinux.org/index.php/Arch_package_guidelines#Package_versioning) to mark individual releases in between versions.
|
||||||
|
|
||||||
|
## [83.0-1] - 2020-11-21
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- New upstream release 83.0
|
||||||
|
- New upstream release of included uBlock Origin (1.31.0)
|
||||||
|
|
||||||
|
## [82.0.3-1] - 2020-11-10
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- New upstream release 82.0.3
|
||||||
|
|
||||||
|
## [82.0.2-1] - 2020-10-29
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- New upstream release 82.0.2
|
||||||
|
- New upstream release of included uBlock Origin (1.30.6)
|
||||||
|
|
||||||
|
## [81.0.2-1] - 2020-10-18
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- New upstream release 81.0.2
|
||||||
|
- New upstream release of included uBlock Origin (1.30.4)
|
||||||
|
|
||||||
|
## [81.0-2] - 2020-10-02
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- New upstream release 81.0
|
||||||
|
- New upstream release of included uBlock Origin (1.30.0)
|
||||||
|
|
||||||
## [80.0.1-1] - 2020-09-06
|
## [80.0.1-1] - 2020-09-06
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
22
PKGBUILD
22
PKGBUILD
|
@ -6,7 +6,7 @@
|
||||||
pkgname=librewolf
|
pkgname=librewolf
|
||||||
_pkgname=LibreWolf
|
_pkgname=LibreWolf
|
||||||
# how to get ci vars instead?
|
# how to get ci vars instead?
|
||||||
pkgver=80.0.1
|
pkgver=83.0
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Community-maintained fork of Firefox, focused on privacy, security and freedom."
|
pkgdesc="Community-maintained fork of Firefox, focused on privacy, security and freedom."
|
||||||
arch=(x86_64 aarch64)
|
arch=(x86_64 aarch64)
|
||||||
|
@ -15,13 +15,15 @@ url="https://librewolf-community.gitlab.io/"
|
||||||
depends=(gtk3 libxt mime-types dbus-glib ffmpeg nss ttf-font libpulse)
|
depends=(gtk3 libxt mime-types dbus-glib ffmpeg nss ttf-font libpulse)
|
||||||
makedepends=(unzip zip diffutils yasm mesa imake inetutils xorg-server-xvfb
|
makedepends=(unzip zip diffutils yasm mesa imake inetutils xorg-server-xvfb
|
||||||
autoconf2.13 rust clang llvm jack gtk2 nodejs cbindgen nasm
|
autoconf2.13 rust clang llvm jack gtk2 nodejs cbindgen nasm
|
||||||
python-setuptools python-psutil git binutils lld)
|
python-setuptools python-psutil python-zstandard git binutils lld)
|
||||||
optdepends=('networkmanager: Location detection via available WiFi networks'
|
optdepends=('networkmanager: Location detection via available WiFi networks'
|
||||||
'libnotify: Notification integration'
|
'libnotify: Notification integration'
|
||||||
'pulseaudio: Audio support'
|
'pulseaudio: Audio support'
|
||||||
'speech-dispatcher: Text-to-Speech'
|
'speech-dispatcher: Text-to-Speech'
|
||||||
'hunspell-en_US: Spell checking, American English')
|
'hunspell-en_US: Spell checking, American English')
|
||||||
options=(!emptydirs !makeflags !strip)
|
options=(!emptydirs !makeflags !strip)
|
||||||
|
_arch_svn=https://git.archlinux.org/svntogit/packages.git/plain/trunk
|
||||||
|
_settings_commit=2f76ae07f7016034273f1887b7f1bedab997909c
|
||||||
source_x86_64=(https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz
|
source_x86_64=(https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz
|
||||||
$pkgname.desktop
|
$pkgname.desktop
|
||||||
"git+https://gitlab.com/${pkgname}-community/browser/common.git"
|
"git+https://gitlab.com/${pkgname}-community/browser/common.git"
|
||||||
|
@ -37,18 +39,18 @@ source_aarch64=(https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/
|
||||||
arm.patch
|
arm.patch
|
||||||
https://raw.githubusercontent.com/archlinuxarm/PKGBUILDs/master/extra/firefox/build-arm-libopus.patch)
|
https://raw.githubusercontent.com/archlinuxarm/PKGBUILDs/master/extra/firefox/build-arm-libopus.patch)
|
||||||
|
|
||||||
sha256sums_x86_64=('596b085e32a2d683ba960e161ea65c6271f90f576d4bf956e0d48e83af992c21'
|
sha256sums_x86_64=('d69e84e8b8449f828683d274c24e03095858362bfed21b08bdd7fe715eea5398'
|
||||||
'0b28ba4cc2538b7756cb38945230af52e8c4659b2006262da6f3352345a8bed2'
|
'0b28ba4cc2538b7756cb38945230af52e8c4659b2006262da6f3352345a8bed2'
|
||||||
'SKIP'
|
'SKIP'
|
||||||
'SKIP'
|
'SKIP'
|
||||||
'2bef819c55935f6c72a7aa28273ecddfce0888429a32465feb6c34a16ff1ed9c'
|
'682bf4bf5d79db0080aa132235a95b25745c8ef944d2a2e1fed985489d894df5'
|
||||||
'd191e65a0ce3eeba0a3171c143fc93e3ded6c29eb751b90d58a7d3bf1983aca6')
|
'41719289b309912c4b6bc86b41594f671427979481a90c32a9d3d0bf1cdd6d44')
|
||||||
sha256sums_aarch64=('596b085e32a2d683ba960e161ea65c6271f90f576d4bf956e0d48e83af992c21'
|
sha256sums_aarch64=('d69e84e8b8449f828683d274c24e03095858362bfed21b08bdd7fe715eea5398'
|
||||||
'0b28ba4cc2538b7756cb38945230af52e8c4659b2006262da6f3352345a8bed2'
|
'0b28ba4cc2538b7756cb38945230af52e8c4659b2006262da6f3352345a8bed2'
|
||||||
'SKIP'
|
'SKIP'
|
||||||
'SKIP'
|
'SKIP'
|
||||||
'2bef819c55935f6c72a7aa28273ecddfce0888429a32465feb6c34a16ff1ed9c'
|
'682bf4bf5d79db0080aa132235a95b25745c8ef944d2a2e1fed985489d894df5'
|
||||||
'd191e65a0ce3eeba0a3171c143fc93e3ded6c29eb751b90d58a7d3bf1983aca6'
|
'41719289b309912c4b6bc86b41594f671427979481a90c32a9d3d0bf1cdd6d44'
|
||||||
'6ca87d2ac7dc48e6f595ca49ac8151936afced30d268a831c6a064b52037f6b7'
|
'6ca87d2ac7dc48e6f595ca49ac8151936afced30d268a831c6a064b52037f6b7'
|
||||||
'2d4d91f7e35d0860225084e37ec320ca6cae669f6c9c8fe7735cdbd542e3a7c9')
|
'2d4d91f7e35d0860225084e37ec320ca6cae669f6c9c8fe7735cdbd542e3a7c9')
|
||||||
|
|
||||||
|
@ -160,6 +162,7 @@ build() {
|
||||||
|
|
||||||
export MOZ_NOSPAM=1
|
export MOZ_NOSPAM=1
|
||||||
export MOZBUILD_STATE_PATH="$srcdir/mozbuild"
|
export MOZBUILD_STATE_PATH="$srcdir/mozbuild"
|
||||||
|
export MACH_USE_SYSTEM_PYTHON=1
|
||||||
|
|
||||||
# LTO needs more open files
|
# LTO needs more open files
|
||||||
ulimit -n 4096
|
ulimit -n 4096
|
||||||
|
@ -254,6 +257,9 @@ pref("spellchecker.dictionary_path", "/usr/share/hunspell");
|
||||||
// pref("extensions.autoDisableScopes", 11);
|
// pref("extensions.autoDisableScopes", 11);
|
||||||
END
|
END
|
||||||
|
|
||||||
|
cd ${srcdir}/settings
|
||||||
|
git checkout ${_settings_commit}
|
||||||
|
cd ${srcdir}/firefox-$pkgver
|
||||||
cp -r ${srcdir}/settings/* ${pkgdir}/usr/lib/${pkgname}/
|
cp -r ${srcdir}/settings/* ${pkgdir}/usr/lib/${pkgname}/
|
||||||
|
|
||||||
local distini="$pkgdir/usr/lib/$pkgname/distribution/distribution.ini"
|
local distini="$pkgdir/usr/lib/$pkgname/distribution/distribution.ini"
|
||||||
|
|
|
@ -53,10 +53,10 @@ apt-get -y -qq install $_DEPENDENCIES;
|
||||||
if [[ $CARCH == 'x86_64' ]];then
|
if [[ $CARCH == 'x86_64' ]];then
|
||||||
# Installs (non-ancient) clang
|
# Installs (non-ancient) clang
|
||||||
apt install -y software-properties-common apt-transport-https ca-certificates
|
apt install -y software-properties-common apt-transport-https ca-certificates
|
||||||
apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main"
|
apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-11 main"
|
||||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add
|
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get -y install clang-9 libclang-9-dev
|
apt-get -y install clang-11 libclang-11-dev
|
||||||
else
|
else
|
||||||
apt-get -y install clang-8 libclang-8-dev
|
apt-get -y install clang-8 libclang-8-dev
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -99,11 +99,11 @@ else
|
||||||
# ubuntu seems to recommend this
|
# ubuntu seems to recommend this
|
||||||
ac_add_options --disable-elf-hack
|
ac_add_options --disable-elf-hack
|
||||||
|
|
||||||
export CC='clang-9'
|
export CC='clang-11'
|
||||||
export CXX='clang++-9'
|
export CXX='clang++-11'
|
||||||
export AR=llvm-ar-9
|
export AR=llvm-ar-11
|
||||||
export NM=llvm-nm-9
|
export NM=llvm-nm-11
|
||||||
export RANLIB=llvm-ranlib-9
|
export RANLIB=llvm-ranlib-11
|
||||||
|
|
||||||
# probably not needed, enabled by default?
|
# probably not needed, enabled by default?
|
||||||
ac_add_options --enable-optimize
|
ac_add_options --enable-optimize
|
||||||
|
@ -118,6 +118,10 @@ patch -p1 -i "${CI_PROJECT_DIR}/deb_patches/build-with-libstdc++-7.patch"
|
||||||
patch -p1 -i "${CI_PROJECT_DIR}/deb_patches/fix-armhf-webrtc-build.patch"
|
patch -p1 -i "${CI_PROJECT_DIR}/deb_patches/fix-armhf-webrtc-build.patch"
|
||||||
patch -p1 -i "${CI_PROJECT_DIR}/deb_patches/webrtc-fix-compiler-flags-for-armhf.patch"
|
patch -p1 -i "${CI_PROJECT_DIR}/deb_patches/webrtc-fix-compiler-flags-for-armhf.patch"
|
||||||
patch -p1 -i "${CI_PROJECT_DIR}/deb_patches/python3-remove-variable-annotations.patch"
|
patch -p1 -i "${CI_PROJECT_DIR}/deb_patches/python3-remove-variable-annotations.patch"
|
||||||
|
patch -p1 -i "${CI_PROJECT_DIR}/deb_patches/python3-remove-fstrings.patch"
|
||||||
|
patch -p1 -i "${CI_PROJECT_DIR}/deb_patches/python3-remove-pep487.patch"
|
||||||
|
patch -p1 -i "${CI_PROJECT_DIR}/deb_patches/silence-gtk-style-assertions.patch"
|
||||||
|
patch -p1 -i "${CI_PROJECT_DIR}/deb_patches/sandbox-update-arm-syscall-numbers.patch"
|
||||||
|
|
||||||
# Remove some pre-installed addons that might be questionable
|
# Remove some pre-installed addons that might be questionable
|
||||||
patch -p1 -i ${CI_PROJECT_DIR}/remove_addons.patch
|
patch -p1 -i ${CI_PROJECT_DIR}/remove_addons.patch
|
||||||
|
|
|
@ -33,6 +33,7 @@ fi
|
||||||
|
|
||||||
export MOZ_NOSPAM=1
|
export MOZ_NOSPAM=1
|
||||||
export MOZBUILD_STATE_PATH="${_MOZBUILD}"
|
export MOZBUILD_STATE_PATH="${_MOZBUILD}"
|
||||||
|
export MACH_USE_SYSTEM_PYTHON=1
|
||||||
|
|
||||||
if [[ $CARCH == 'aarch64' ]]; then
|
if [[ $CARCH == 'aarch64' ]]; then
|
||||||
export MOZ_DEBUG_FLAGS=" "
|
export MOZ_DEBUG_FLAGS=" "
|
||||||
|
@ -63,7 +64,7 @@ rm -f mozconfig
|
||||||
# source /root/.cargo/env
|
# source /root/.cargo/env
|
||||||
|
|
||||||
# install cbindgen
|
# install cbindgen
|
||||||
cargo install --version 0.14.3 cbindgen
|
cargo install --version 0.15.0 cbindgen
|
||||||
|
|
||||||
if [[ $CARCH == 'aarch64' ]]; then
|
if [[ $CARCH == 'aarch64' ]]; then
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ LAUNCHER_SCRIPT=$3;
|
||||||
CI_PROJECT_DIR=${CI_PROJECT_DIR:-$(realpath $(dirname $0)/../../)}
|
CI_PROJECT_DIR=${CI_PROJECT_DIR:-$(realpath $(dirname $0)/../../)}
|
||||||
_SCRIPT_FOLDER=$(realpath $(dirname $0));
|
_SCRIPT_FOLDER=$(realpath $(dirname $0));
|
||||||
_EXTRACTED_TARBALL_FOLDER=$_SCRIPT_FOLDER/librewolf;
|
_EXTRACTED_TARBALL_FOLDER=$_SCRIPT_FOLDER/librewolf;
|
||||||
|
_SETTINGS_COMMIT=2f76ae07f7016034273f1887b7f1bedab997909c
|
||||||
_SETTINGS_REPO='https://gitlab.com/librewolf-community/settings.git';
|
_SETTINGS_REPO='https://gitlab.com/librewolf-community/settings.git';
|
||||||
|
|
||||||
# Extracts the binary tarball
|
# Extracts the binary tarball
|
||||||
|
@ -22,6 +23,9 @@ tar --strip-components=1 -xf $BINARY_TARBALL -C $_EXTRACTED_TARBALL_FOLDER
|
||||||
printf "\nCopying librewolf settings to extracted binary tarball\n";
|
printf "\nCopying librewolf settings to extracted binary tarball\n";
|
||||||
|
|
||||||
git clone $_SETTINGS_REPO $_EXTRACTED_TARBALL_FOLDER/settings;
|
git clone $_SETTINGS_REPO $_EXTRACTED_TARBALL_FOLDER/settings;
|
||||||
|
cd $_EXTRACTED_TARBALL_FOLDER/settings
|
||||||
|
git checkout $_SETTINGS_COMMIT
|
||||||
|
cd -
|
||||||
# no need to keep that in there:
|
# no need to keep that in there:
|
||||||
rm -rf "${_EXTRACTED_TARBALL_FOLDER}/settings/.git";
|
rm -rf "${_EXTRACTED_TARBALL_FOLDER}/settings/.git";
|
||||||
cp $TOGGLE_SETTINGS_SCRIPT $_EXTRACTED_TARBALL_FOLDER/settings;
|
cp $TOGGLE_SETTINGS_SCRIPT $_EXTRACTED_TARBALL_FOLDER/settings;
|
||||||
|
|
|
@ -1,59 +1,30 @@
|
||||||
diff -r 53fd96ca5aa4 media/webrtc/gn-configs/arm_False_arm_linux.json
|
--- a/third_party/libwebrtc/webrtc/system_wrappers/cpu_features_linux_gn/moz.build
|
||||||
--- a/media/webrtc/gn-configs/arm_False_arm_linux.json Sun Dec 09 23:42:51 2018 +0200
|
+++ b/third_party/libwebrtc/webrtc/system_wrappers/cpu_features_linux_gn/moz.build
|
||||||
+++ b/media/webrtc/gn-configs/arm_False_arm_linux.json Mon Dec 10 10:40:13 2018 +0100
|
@@ -31,10 +31,6 @@ LOCAL_INCLUDES += [
|
||||||
@@ -15969,9 +15969,7 @@
|
"/third_party/libwebrtc/webrtc/"
|
||||||
"/home/jenkins/workspace/Firefox-default/label/armv7/firefox/obj-armv7l-unknown-linux-gnueabihf/media/webrtc/trunk/webrtc/gn-output/gen/"
|
|
||||||
],
|
|
||||||
"libs": [],
|
|
||||||
- "sources": [
|
|
||||||
- "//system_wrappers/source/cpu_features_linux.c"
|
|
||||||
- ],
|
|
||||||
+ "sources": [],
|
|
||||||
"type": "static_library"
|
|
||||||
},
|
|
||||||
"//system_wrappers:field_trial_api": {
|
|
||||||
diff -r 53fd96ca5aa4 media/webrtc/gn-configs/arm_True_arm_linux.json
|
|
||||||
--- a/media/webrtc/gn-configs/arm_True_arm_linux.json Sun Dec 09 23:42:51 2018 +0200
|
|
||||||
+++ b/media/webrtc/gn-configs/arm_True_arm_linux.json Mon Dec 10 10:40:13 2018 +0100
|
|
||||||
@@ -15558,9 +15558,7 @@
|
|
||||||
"/home/jenkins/workspace/Firefox-default/label/armv7/firefox/obj-armv7l-unknown-linux-gnueabihf/media/webrtc/trunk/webrtc/gn-output/gen/"
|
|
||||||
],
|
|
||||||
"libs": [],
|
|
||||||
- "sources": [
|
|
||||||
- "//system_wrappers/source/cpu_features_linux.c"
|
|
||||||
- ],
|
|
||||||
+ "sources": [],
|
|
||||||
"type": "static_library"
|
|
||||||
},
|
|
||||||
"//system_wrappers:field_trial_api": {
|
|
||||||
diff -r 53fd96ca5aa4 media/webrtc/trunk/webrtc/system_wrappers/cpu_features_linux_gn/moz.build
|
|
||||||
--- a/media/webrtc/trunk/webrtc/system_wrappers/cpu_features_linux_gn/moz.build Sun Dec 09 23:42:51 2018 +0200
|
|
||||||
+++ b/media/webrtc/trunk/webrtc/system_wrappers/cpu_features_linux_gn/moz.build Mon Dec 10 10:40:13 2018 +0100
|
|
||||||
@@ -31,10 +31,6 @@
|
|
||||||
"/media/webrtc/trunk/webrtc/"
|
|
||||||
]
|
]
|
||||||
|
|
||||||
-UNIFIED_SOURCES += [
|
-UNIFIED_SOURCES += [
|
||||||
- "/media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c"
|
- "/third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c"
|
||||||
-]
|
-]
|
||||||
-
|
-
|
||||||
if CONFIG["MOZ_DEBUG"] == "1":
|
if not CONFIG["MOZ_DEBUG"]:
|
||||||
|
|
||||||
DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
|
DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0"
|
||||||
@@ -53,20 +49,36 @@
|
@@ -53,20 +49,36 @@ if CONFIG["CPU_ARCH"] == "aarch64":
|
||||||
DEFINES["WEBRTC_ARCH_ARM64"] = True
|
DEFINES["WEBRTC_ARCH_ARM64"] = True
|
||||||
DEFINES["WEBRTC_HAS_NEON"] = True
|
DEFINES["WEBRTC_HAS_NEON"] = True
|
||||||
|
|
||||||
-if CONFIG["CPU_ARCH"] == "arm":
|
-if CONFIG["CPU_ARCH"] == "arm":
|
||||||
+ UNIFIED_SOURCES += [
|
-
|
||||||
+ "/media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c"
|
|
||||||
+ ]
|
|
||||||
|
|
||||||
- CFLAGS += [
|
- CFLAGS += [
|
||||||
- "-mfpu=neon"
|
- "-mfpu=neon"
|
||||||
- ]
|
+ UNIFIED_SOURCES += [
|
||||||
+if CONFIG["CPU_ARCH"] == "arm":
|
+ "/third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c"
|
||||||
|
]
|
||||||
|
|
||||||
|
+if CONFIG["CPU_ARCH"] == "arm":
|
||||||
|
+
|
||||||
DEFINES["WEBRTC_ARCH_ARM"] = True
|
DEFINES["WEBRTC_ARCH_ARM"] = True
|
||||||
DEFINES["WEBRTC_ARCH_ARM_V7"] = True
|
DEFINES["WEBRTC_ARCH_ARM_V7"] = True
|
||||||
DEFINES["WEBRTC_HAS_NEON"] = True
|
DEFINES["WEBRTC_HAS_NEON"] = True
|
||||||
|
@ -61,7 +32,7 @@ diff -r 53fd96ca5aa4 media/webrtc/trunk/webrtc/system_wrappers/cpu_features_linu
|
||||||
+if CONFIG["CPU_ARCH"] == "ppc64":
|
+if CONFIG["CPU_ARCH"] == "ppc64":
|
||||||
+
|
+
|
||||||
+ UNIFIED_SOURCES += [
|
+ UNIFIED_SOURCES += [
|
||||||
+ "/media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c"
|
+ "/third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c"
|
||||||
+ ]
|
+ ]
|
||||||
+
|
+
|
||||||
if CONFIG["CPU_ARCH"] == "x86":
|
if CONFIG["CPU_ARCH"] == "x86":
|
||||||
|
@ -71,13 +42,24 @@ diff -r 53fd96ca5aa4 media/webrtc/trunk/webrtc/system_wrappers/cpu_features_linu
|
||||||
]
|
]
|
||||||
|
|
||||||
+ UNIFIED_SOURCES += [
|
+ UNIFIED_SOURCES += [
|
||||||
+ "/media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c"
|
+ "/third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c"
|
||||||
+ ]
|
+ ]
|
||||||
+
|
+
|
||||||
+if CONFIG["CPU_ARCH"] == "x86_64":
|
+if CONFIG["CPU_ARCH"] == "x86_64":
|
||||||
+
|
+
|
||||||
+ UNIFIED_SOURCES += [
|
+ UNIFIED_SOURCES += [
|
||||||
+ "/media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c"
|
+ "/third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c"
|
||||||
+ ]
|
+ ]
|
||||||
+
|
+
|
||||||
Library("cpu_features_linux_gn")
|
Library("cpu_features_linux_gn")
|
||||||
|
--- a/third_party/libwebrtc/webrtc/system_wrappers/BUILD.gn
|
||||||
|
+++ b/third_party/libwebrtc/webrtc/system_wrappers/BUILD.gn
|
||||||
|
@@ -187,7 +187,7 @@ if (is_android && !build_with_mozilla) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-if (is_linux) {
|
||||||
|
+if (is_linux && target_cpu != "arm") {
|
||||||
|
rtc_static_library("cpu_features_linux") {
|
||||||
|
sources = [
|
||||||
|
"source/cpu_features_linux.c",
|
||||||
|
|
|
@ -14,8 +14,8 @@ diff -r ede1c973aa85 build/moz.configure/init.configure
|
||||||
-option(env='PYTHON3', nargs=1, help='Python 3 interpreter (3.6 or later)')
|
-option(env='PYTHON3', nargs=1, help='Python 3 interpreter (3.6 or later)')
|
||||||
+option(env='PYTHON3', nargs=1, help='Python 3 interpreter (3.5 or later)')
|
+option(env='PYTHON3', nargs=1, help='Python 3 interpreter (3.5 or later)')
|
||||||
|
|
||||||
|
option(env='VIRTUALENV_NAME', nargs=1, default='init_py3',
|
||||||
@depends('PYTHON3', check_build_environment, mozconfig, '--help')
|
help='Name of the in-objdir virtualenv')
|
||||||
@@ -334,20 +334,20 @@
|
@@ -334,20 +334,20 @@
|
||||||
'(%s): %s' % (python, e))
|
'(%s): %s' % (python, e))
|
||||||
else:
|
else:
|
||||||
|
|
410
deb_patches/python3-remove-fstrings.patch
Normal file
410
deb_patches/python3-remove-fstrings.patch
Normal file
|
@ -0,0 +1,410 @@
|
||||||
|
Description: remove f-strings that require Python 3.6 (https://docs.python.org/3/whatsnew/3.6.html#whatsnew36-pep498)
|
||||||
|
Author: Olivier Tilloy <olivier.tilloy@canonical.com>
|
||||||
|
|
||||||
|
--- a/third_party/python/glean_parser/glean_parser/lint.py
|
||||||
|
+++ b/third_party/python/glean_parser/glean_parser/lint.py
|
||||||
|
@@ -42,10 +42,10 @@ def _english_list(items: List[str]) -> s
|
||||||
|
if len(items) == 0:
|
||||||
|
return ""
|
||||||
|
elif len(items) == 1:
|
||||||
|
- return f"'{items[0]}'"
|
||||||
|
+ return "'{}'".format(items[0])
|
||||||
|
else:
|
||||||
|
return "{}, or '{}'".format(
|
||||||
|
- ", ".join([f"'{x}'" for x in items[:-1]]), items[-1]
|
||||||
|
+ ", ".join(["'{}'".format(x) for x in items[:-1]]), items[-1]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -88,10 +88,11 @@ def check_common_prefix(
|
||||||
|
if i > 0:
|
||||||
|
common_prefix = "_".join(first[:i])
|
||||||
|
yield (
|
||||||
|
- f"Within category '{category_name}', all metrics begin with "
|
||||||
|
- f"prefix '{common_prefix}'."
|
||||||
|
+ "Within category '{}', all metrics begin with "
|
||||||
|
+ "prefix '{}'."
|
||||||
|
"Remove the prefixes on the metric names and (possibly) "
|
||||||
|
"rename the category."
|
||||||
|
+ .format(category_name, common_prefix)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -131,17 +132,19 @@ def check_unit_in_name(
|
||||||
|
or unit_in_name == time_unit.name
|
||||||
|
):
|
||||||
|
yield (
|
||||||
|
- f"Suffix '{unit_in_name}' is redundant with time_unit "
|
||||||
|
- f"'{time_unit.name}'. Only include time_unit."
|
||||||
|
+ "Suffix '{}' is redundant with time_unit "
|
||||||
|
+ "'{}'. Only include time_unit."
|
||||||
|
+ .format(unit_in_name, time_unit.name)
|
||||||
|
)
|
||||||
|
elif (
|
||||||
|
unit_in_name in TIME_UNIT_ABBREV.keys()
|
||||||
|
or unit_in_name in TIME_UNIT_ABBREV.values()
|
||||||
|
):
|
||||||
|
yield (
|
||||||
|
- f"Suffix '{unit_in_name}' doesn't match time_unit "
|
||||||
|
- f"'{time_unit.name}'. "
|
||||||
|
+ "Suffix '{}' doesn't match time_unit "
|
||||||
|
+ "'{}'. "
|
||||||
|
"Confirm the unit is correct and only include time_unit."
|
||||||
|
+ .format(unit_in_name, time_unit.name)
|
||||||
|
)
|
||||||
|
|
||||||
|
elif memory_unit is not None:
|
||||||
|
@@ -150,26 +153,29 @@ def check_unit_in_name(
|
||||||
|
or unit_in_name == memory_unit.name
|
||||||
|
):
|
||||||
|
yield (
|
||||||
|
- f"Suffix '{unit_in_name}' is redundant with memory_unit "
|
||||||
|
- f"'{memory_unit.name}'. "
|
||||||
|
+ "Suffix '{}' is redundant with memory_unit "
|
||||||
|
+ "'{}'. "
|
||||||
|
"Only include memory_unit."
|
||||||
|
+ .format(unit_in_name, memory_unit.name)
|
||||||
|
)
|
||||||
|
elif (
|
||||||
|
unit_in_name in MEMORY_UNIT_ABBREV.keys()
|
||||||
|
or unit_in_name in MEMORY_UNIT_ABBREV.values()
|
||||||
|
):
|
||||||
|
yield (
|
||||||
|
- f"Suffix '{unit_in_name}' doesn't match memory_unit "
|
||||||
|
- f"{memory_unit.name}'. "
|
||||||
|
+ "Suffix '{}' doesn't match memory_unit "
|
||||||
|
+ "{}'. "
|
||||||
|
"Confirm the unit is correct and only include memory_unit."
|
||||||
|
+ .format(unit_in_name, memory_unit.name)
|
||||||
|
)
|
||||||
|
|
||||||
|
elif unit is not None:
|
||||||
|
if unit_in_name == unit:
|
||||||
|
yield (
|
||||||
|
- f"Suffix '{unit_in_name}' is redundant with unit param "
|
||||||
|
- f"'{unit}'. "
|
||||||
|
+ "Suffix '{}' is redundant with unit param "
|
||||||
|
+ "'{}'. "
|
||||||
|
"Only include unit."
|
||||||
|
+ .format(unit_in_name, unit)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -183,8 +189,9 @@ def check_category_generic(
|
||||||
|
|
||||||
|
if category_name in GENERIC_CATEGORIES:
|
||||||
|
yield (
|
||||||
|
- f"Category '{category_name}' is too generic. "
|
||||||
|
- f"Don't use {_english_list(GENERIC_CATEGORIES)} for category names"
|
||||||
|
+ "Category '{}' is too generic. "
|
||||||
|
+ "Don't use {} for category names"
|
||||||
|
+ .format(category_name, _english_list(GENERIC_CATEGORIES))
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -195,9 +202,10 @@ def check_bug_number(
|
||||||
|
|
||||||
|
if len(number_bugs):
|
||||||
|
yield (
|
||||||
|
- f"For bugs {', '.join(number_bugs)}: "
|
||||||
|
+ "For bugs {}: "
|
||||||
|
"Bug numbers are deprecated and should be changed to full URLs. "
|
||||||
|
"For example, use 'http://bugzilla.mozilla.org/12345' instead of '12345'."
|
||||||
|
+ .format(', '.join(number_bugs))
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -220,7 +228,7 @@ def check_misspelled_pings(
|
||||||
|
for builtin in pings.RESERVED_PING_NAMES:
|
||||||
|
distance = _hamming_distance(ping, builtin)
|
||||||
|
if distance == 1:
|
||||||
|
- yield f"Ping '{ping}' seems misspelled. Did you mean '{builtin}'?"
|
||||||
|
+ yield "Ping '{}' seems misspelled. Did you mean '{}'?".format(ping, builtin)
|
||||||
|
|
||||||
|
|
||||||
|
def check_user_lifetime_expiration(
|
||||||
|
@@ -281,8 +289,9 @@ class GlinterNit:
|
||||||
|
|
||||||
|
def format(self):
|
||||||
|
return (
|
||||||
|
- f"{self.check_type.name.upper()}: {self.check_name}: "
|
||||||
|
- f"{self.name}: {self.msg}"
|
||||||
|
+ "{}: {}: "
|
||||||
|
+ "{}: {}"
|
||||||
|
+ .format(self.check_type.name.upper(), self.check_name, self.name, self.msg)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -374,7 +383,7 @@ def lint_yaml_files(input_filepaths: Ite
|
||||||
|
if len(nits):
|
||||||
|
print("Sorry, Glean found some glinter nits:", file=file)
|
||||||
|
for (path, p) in nits:
|
||||||
|
- print(f"{path} ({p.line}:{p.column}) - {p.message}")
|
||||||
|
+ print("{} ({}:{}) - {}".format(path, p.line, p.column, p.message))
|
||||||
|
print("", file=file)
|
||||||
|
print("Please fix the above nits to continue.", file=file)
|
||||||
|
|
||||||
|
--- a/third_party/python/glean_parser/glean_parser/markdown.py
|
||||||
|
+++ b/third_party/python/glean_parser/glean_parser/markdown.py
|
||||||
|
@@ -73,7 +73,7 @@ def metrics_docs(obj_name: str) -> str:
|
||||||
|
if obj_name.startswith("labeled_"):
|
||||||
|
fixedup_name += "s"
|
||||||
|
|
||||||
|
- return f"https://mozilla.github.io/glean/book/user/metrics/{fixedup_name}.html"
|
||||||
|
+ return "https://mozilla.github.io/glean/book/user/metrics/{}.html".format(fixedup_name)
|
||||||
|
|
||||||
|
|
||||||
|
def ping_docs(ping_name: str) -> str:
|
||||||
|
@@ -84,7 +84,7 @@ def ping_docs(ping_name: str) -> str:
|
||||||
|
if ping_name not in pings.RESERVED_PING_NAMES:
|
||||||
|
return ""
|
||||||
|
|
||||||
|
- return f"https://mozilla.github.io/glean/book/user/pings/{ping_name}.html"
|
||||||
|
+ return "https://mozilla.github.io/glean/book/user/pings/{}.html".format(ping_name)
|
||||||
|
|
||||||
|
|
||||||
|
def if_empty(ping_name: str, custom_pings_cache: Dict[str, pings.Ping] = {}) -> bool:
|
||||||
|
--- a/third_party/python/glean_parser/glean_parser/parser.py
|
||||||
|
+++ b/third_party/python/glean_parser/glean_parser/parser.py
|
||||||
|
@@ -46,7 +46,8 @@ def _update_validator(validator):
|
||||||
|
if len(missing_properties):
|
||||||
|
missing_properties = sorted(list(missing_properties))
|
||||||
|
yield ValidationError(
|
||||||
|
- f"Missing required properties: {', '.join(missing_properties)}"
|
||||||
|
+ "Missing required properties: {}"
|
||||||
|
+ .format(', '.join(missing_properties))
|
||||||
|
)
|
||||||
|
|
||||||
|
validator.VALIDATORS["required"] = required
|
||||||
|
@@ -65,7 +66,7 @@ def _load_file(
|
||||||
|
return {}, None
|
||||||
|
|
||||||
|
if content is None:
|
||||||
|
- yield util.format_error(filepath, "", f"'{filepath}' file can not be empty.")
|
||||||
|
+ yield util.format_error(filepath, "", "'{}' file can not be empty.".format(filepath))
|
||||||
|
return {}, None
|
||||||
|
|
||||||
|
if not isinstance(content, dict):
|
||||||
|
@@ -76,7 +77,7 @@ def _load_file(
|
||||||
|
|
||||||
|
schema_key = content.get("$schema")
|
||||||
|
if not isinstance(schema_key, str):
|
||||||
|
- raise TypeError(f"Invalid schema key {schema_key}")
|
||||||
|
+ raise TypeError("Invalid schema key {}".format(schema_key))
|
||||||
|
|
||||||
|
filetype = FILE_TYPES.get(schema_key)
|
||||||
|
|
||||||
|
@@ -117,7 +118,7 @@ def _get_schema(
|
||||||
|
util.format_error(
|
||||||
|
filepath,
|
||||||
|
"",
|
||||||
|
- f"$schema key must be one of {', '.join(schemas.keys())}",
|
||||||
|
+ "$schema key must be one of {}".format(', '.join(schemas.keys())),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
return schemas[schema_id]
|
||||||
|
@@ -189,7 +190,7 @@ def _instantiate_metrics(
|
||||||
|
if not config.get("allow_reserved") and category_key.split(".")[0] == "glean":
|
||||||
|
yield util.format_error(
|
||||||
|
filepath,
|
||||||
|
- f"For category '{category_key}'",
|
||||||
|
+ "For category '{}'".format(category_key),
|
||||||
|
"Categories beginning with 'glean' are reserved for "
|
||||||
|
"Glean internal use.",
|
||||||
|
)
|
||||||
|
@@ -197,7 +198,7 @@ def _instantiate_metrics(
|
||||||
|
all_objects.setdefault(category_key, OrderedDict())
|
||||||
|
|
||||||
|
if not isinstance(category_val, dict):
|
||||||
|
- raise TypeError(f"Invalid content for {category_key}")
|
||||||
|
+ raise TypeError("Invalid content for {}".format(category_key))
|
||||||
|
|
||||||
|
for metric_key, metric_val in category_val.items():
|
||||||
|
try:
|
||||||
|
@@ -207,7 +208,7 @@ def _instantiate_metrics(
|
||||||
|
except Exception as e:
|
||||||
|
yield util.format_error(
|
||||||
|
filepath,
|
||||||
|
- f"On instance {category_key}.{metric_key}",
|
||||||
|
+ "On instance {}.{}".format(category_key, metric_key),
|
||||||
|
str(e),
|
||||||
|
)
|
||||||
|
metric_obj = None
|
||||||
|
@@ -218,7 +219,7 @@ def _instantiate_metrics(
|
||||||
|
):
|
||||||
|
yield util.format_error(
|
||||||
|
filepath,
|
||||||
|
- f"On instance {category_key}.{metric_key}",
|
||||||
|
+ "On instance {}.{}".format(category_key, metric_key),
|
||||||
|
'Only internal metrics may specify "all-pings" '
|
||||||
|
'in "send_in_pings"',
|
||||||
|
)
|
||||||
|
@@ -234,8 +235,9 @@ def _instantiate_metrics(
|
||||||
|
filepath,
|
||||||
|
"",
|
||||||
|
(
|
||||||
|
- f"Duplicate metric name '{category_key}.{metric_key}' "
|
||||||
|
- f"already defined in '{already_seen}'"
|
||||||
|
+ "Duplicate metric name '{}.{}' "
|
||||||
|
+ "already defined in '{}'"
|
||||||
|
+ .format(category_key, metric_key, already_seen)
|
||||||
|
),
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
@@ -261,17 +263,17 @@ def _instantiate_pings(
|
||||||
|
if ping_key in RESERVED_PING_NAMES:
|
||||||
|
yield util.format_error(
|
||||||
|
filepath,
|
||||||
|
- f"For ping '{ping_key}'",
|
||||||
|
- f"Ping uses a reserved name ({RESERVED_PING_NAMES})",
|
||||||
|
+ "For ping '{}'".format(ping_key),
|
||||||
|
+ "Ping uses a reserved name ({})".format(RESERVED_PING_NAMES),
|
||||||
|
)
|
||||||
|
continue
|
||||||
|
if not isinstance(ping_val, dict):
|
||||||
|
- raise TypeError(f"Invalid content for ping {ping_key}")
|
||||||
|
+ raise TypeError("Invalid content for ping {}".format(ping_key))
|
||||||
|
ping_val["name"] = ping_key
|
||||||
|
try:
|
||||||
|
ping_obj = Ping(**ping_val)
|
||||||
|
except Exception as e:
|
||||||
|
- yield util.format_error(filepath, f"On instance '{ping_key}'", str(e))
|
||||||
|
+ yield util.format_error(filepath, "On instance '{}'".format(ping_key), str(e))
|
||||||
|
continue
|
||||||
|
|
||||||
|
already_seen = sources.get(ping_key)
|
||||||
|
@@ -280,8 +282,9 @@ def _instantiate_pings(
|
||||||
|
yield util.format_error(
|
||||||
|
filepath,
|
||||||
|
"",
|
||||||
|
- f"Duplicate ping name '{ping_key}' "
|
||||||
|
- f"already defined in '{already_seen}'",
|
||||||
|
+ "Duplicate ping name '{}' "
|
||||||
|
+ "already defined in '{}'"
|
||||||
|
+ .format(ping_key, already_seen),
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
all_objects.setdefault("pings", {})[ping_key] = ping_obj
|
||||||
|
--- a/third_party/python/glean_parser/glean_parser/util.py
|
||||||
|
+++ b/third_party/python/glean_parser/glean_parser/util.py
|
||||||
|
@@ -132,7 +132,7 @@ def load_yaml_or_json(path: Path, ordere
|
||||||
|
else:
|
||||||
|
return yaml.load(fd, Loader=_NoDatesSafeLoader)
|
||||||
|
else:
|
||||||
|
- raise ValueError(f"Unknown file extension {path.suffix}")
|
||||||
|
+ raise ValueError("Unknown file extension {}".format(path.suffix))
|
||||||
|
|
||||||
|
|
||||||
|
def ensure_list(value: Any) -> Sequence[Any]:
|
||||||
|
@@ -331,9 +331,9 @@ def format_error(filepath: Union[str, Pa
|
||||||
|
else:
|
||||||
|
filepath = "<string>"
|
||||||
|
if header:
|
||||||
|
- return f"{filepath}: {header}\n{_utils.indent(content)}"
|
||||||
|
+ return "{}: {}\n{}".format(filepath, header, _utils.indent(content))
|
||||||
|
else:
|
||||||
|
- return f"{filepath}:\n{_utils.indent(content)}"
|
||||||
|
+ return "{}:\n{}".format(filepath, _utils.indent(content))
|
||||||
|
|
||||||
|
|
||||||
|
def parse_expires(expires: str) -> datetime.date:
|
||||||
|
@@ -351,8 +351,8 @@ def parse_expires(expires: str) -> datet
|
||||||
|
return datetime.date.fromisoformat(expires)
|
||||||
|
except ValueError:
|
||||||
|
raise ValueError(
|
||||||
|
- f"Invalid expiration date '{expires}'. "
|
||||||
|
- "Must be of the form yyyy-mm-dd in UTC."
|
||||||
|
+ "Invalid expiration date '{}'. "
|
||||||
|
+ "Must be of the form yyyy-mm-dd in UTC.".format(expires)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -382,7 +382,7 @@ def validate_expires(expires: str) -> No
|
||||||
|
max_date = datetime.datetime.now() + datetime.timedelta(days=730)
|
||||||
|
if date > max_date.date():
|
||||||
|
raise ValueError(
|
||||||
|
- f"'{expires}' is more than 730 days (~2 years) in the future.",
|
||||||
|
+ "'{}' is more than 730 days (~2 years) in the future.".format(expires),
|
||||||
|
"Please make sure this is intentional.",
|
||||||
|
"You can supress this warning by adding EXPIRATION_DATE_TOO_FAR to no_lint",
|
||||||
|
"See: https://mozilla.github.io/glean_parser/metrics-yaml.html#no_lint",
|
||||||
|
--- a/third_party/python/glean_parser/tools/extract_data_categories.py
|
||||||
|
+++ b/third_party/python/glean_parser/tools/extract_data_categories.py
|
||||||
|
@@ -62,7 +62,7 @@ def fetch_url(url: str) -> str:
|
||||||
|
if content is not None:
|
||||||
|
return content
|
||||||
|
|
||||||
|
- print(f"Fetching {url}")
|
||||||
|
+ print("Fetching {}".format(url))
|
||||||
|
content = urlopen(url).read()
|
||||||
|
cache[url] = content
|
||||||
|
time.sleep(0.5)
|
||||||
|
@@ -97,7 +97,7 @@ def categories_as_strings(categories: Se
|
||||||
|
"""
|
||||||
|
if len(categories):
|
||||||
|
return [
|
||||||
|
- CATEGORY_MAP.get(x, f"!!!UNKNOWN CATEGORY {x}")
|
||||||
|
+ CATEGORY_MAP.get(x, "!!!UNKNOWN CATEGORY {}".format(x))
|
||||||
|
for x in sorted(list(categories))
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
@@ -119,24 +119,24 @@ def update_lines(
|
||||||
|
|
||||||
|
for line in lines_iter:
|
||||||
|
output.append(line)
|
||||||
|
- if line.startswith(f"{category_name}:"):
|
||||||
|
+ if line.startswith("{}:".format(category_name)):
|
||||||
|
break
|
||||||
|
|
||||||
|
for line in lines_iter:
|
||||||
|
output.append(line)
|
||||||
|
- if line.startswith(f" {metric_name}:"):
|
||||||
|
+ if line.startswith(" {}:".format(metric_name)):
|
||||||
|
break
|
||||||
|
|
||||||
|
for line in lines_iter:
|
||||||
|
output.append(line)
|
||||||
|
- if line.startswith(f" data_reviews:"):
|
||||||
|
+ if line.startswith(" data_reviews:"):
|
||||||
|
break
|
||||||
|
|
||||||
|
for line in lines_iter:
|
||||||
|
if not line.strip().startswith("- "):
|
||||||
|
output.append(" data_sensitivity:\n")
|
||||||
|
for data_sensitivity in data_sensitivity_values:
|
||||||
|
- output.append(f" - {data_sensitivity}\n")
|
||||||
|
+ output.append(" - {}\n".format(data_sensitivity))
|
||||||
|
output.append(line)
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
--- a/third_party/python/glean_parser/glean_parser/metrics.py
|
||||||
|
+++ b/third_party/python/glean_parser/glean_parser/metrics.py
|
||||||
|
@@ -138,7 +138,7 @@ class Metric:
|
||||||
|
"""
|
||||||
|
metric_type = metric_info["type"]
|
||||||
|
if not isinstance(metric_type, str):
|
||||||
|
- raise TypeError(f"Unknown metric type {metric_type}")
|
||||||
|
+ raise TypeError("Unknown metric type {}".format(metric_type))
|
||||||
|
return cls.metric_types[metric_type](
|
||||||
|
category=category,
|
||||||
|
name=name,
|
||||||
|
--- a/third_party/python/glean_parser/glean_parser/translate.py
|
||||||
|
+++ b/third_party/python/glean_parser/glean_parser/translate.py
|
||||||
|
@@ -112,7 +112,7 @@ def translate_metrics(
|
||||||
|
for filepath in output_dir.glob(clear_pattern):
|
||||||
|
filepath.unlink()
|
||||||
|
if len(list(output_dir.iterdir())):
|
||||||
|
- print(f"Extra contents found in '{output_dir}'.")
|
||||||
|
+ print("Extra contents found in '{}'.".format(output_dir))
|
||||||
|
|
||||||
|
# We can't use shutil.copytree alone if the directory already exists.
|
||||||
|
# However, if it doesn't exist, make sure to create one otherwise
|
||||||
|
@@ -146,7 +146,7 @@ def translate(
|
||||||
|
format_desc = OUTPUTTERS.get(output_format, None)
|
||||||
|
|
||||||
|
if format_desc is None:
|
||||||
|
- raise ValueError(f"Unknown output format '{output_format}'")
|
||||||
|
+ raise ValueError("Unknown output format '{}'".format(output_format))
|
||||||
|
|
||||||
|
return translate_metrics(
|
||||||
|
input_filepaths,
|
23
deb_patches/python3-remove-pep487.patch
Normal file
23
deb_patches/python3-remove-pep487.patch
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
Description: revert a change that requires Python 3.6 (https://docs.python.org/3/whatsnew/3.6.html#whatsnew36-pep487)
|
||||||
|
Author: Olivier Tilloy <olivier.tilloy@canonical.com>
|
||||||
|
|
||||||
|
--- a/third_party/python/glean_parser/glean_parser/metrics.py
|
||||||
|
+++ b/third_party/python/glean_parser/glean_parser/metrics.py
|
||||||
|
@@ -15,6 +15,8 @@ from typing import Any, Dict, List, Opti
|
||||||
|
from . import pings
|
||||||
|
from . import util
|
||||||
|
|
||||||
|
+import pep487
|
||||||
|
+
|
||||||
|
|
||||||
|
# Important: if the values are ever changing here, make sure
|
||||||
|
# to also fix mozilla/glean. Otherwise language bindings may
|
||||||
|
@@ -32,7 +34,7 @@ class DataSensitivity(enum.Enum):
|
||||||
|
highly_sensitive = 4
|
||||||
|
|
||||||
|
|
||||||
|
-class Metric:
|
||||||
|
+class Metric(pep487.PEP487Object):
|
||||||
|
typename = "ERROR"
|
||||||
|
glean_internal_metric_cat = "glean.internal.metrics"
|
||||||
|
metric_types = {}
|
|
@ -52,3 +52,97 @@ Author: Olivier Tilloy <olivier.tilloy@canonical.com>
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.root_node = Node(None, is_root_node=True)
|
self.root_node = Node(None, is_root_node=True)
|
||||||
self.end_node = Node(None, is_end_node=True)
|
self.end_node = Node(None, is_end_node=True)
|
||||||
|
--- a/third_party/python/glean_parser/glean_parser/lint.py
|
||||||
|
+++ b/third_party/python/glean_parser/glean_parser/lint.py
|
||||||
|
@@ -237,9 +237,7 @@ def check_user_lifetime_expiration(
|
||||||
|
|
||||||
|
# The checks that operate on an entire category of metrics:
|
||||||
|
# {NAME: (function, is_error)}
|
||||||
|
-CATEGORY_CHECKS: Dict[
|
||||||
|
- str, Tuple[Callable[[str, Iterable[metrics.Metric]], LintGenerator], CheckType]
|
||||||
|
-] = {
|
||||||
|
+CATEGORY_CHECKS = {
|
||||||
|
"COMMON_PREFIX": (check_common_prefix, CheckType.error),
|
||||||
|
"CATEGORY_GENERIC": (check_category_generic, CheckType.error),
|
||||||
|
}
|
||||||
|
@@ -247,9 +245,7 @@ CATEGORY_CHECKS: Dict[
|
||||||
|
|
||||||
|
# The checks that operate on individual metrics:
|
||||||
|
# {NAME: (function, is_error)}
|
||||||
|
-INDIVIDUAL_CHECKS: Dict[
|
||||||
|
- str, Tuple[Callable[[metrics.Metric, dict], LintGenerator], CheckType]
|
||||||
|
-] = {
|
||||||
|
+INDIVIDUAL_CHECKS = {
|
||||||
|
"UNIT_IN_NAME": (check_unit_in_name, CheckType.error),
|
||||||
|
"BUG_NUMBER": (check_bug_number, CheckType.error),
|
||||||
|
"BASELINE_PING": (check_valid_in_baseline, CheckType.error),
|
||||||
|
@@ -282,7 +278,7 @@ def lint_metrics(
|
||||||
|
:param file: The stream to write errors to.
|
||||||
|
:returns: List of nits.
|
||||||
|
"""
|
||||||
|
- nits: List[GlinterNit] = []
|
||||||
|
+ nits = []
|
||||||
|
for (category_name, category) in sorted(list(objs.items())):
|
||||||
|
if category_name == "pings":
|
||||||
|
continue
|
||||||
|
@@ -363,7 +359,7 @@ def lint_yaml_files(input_filepaths: Ite
|
||||||
|
|
||||||
|
# Generic type since the actual type comes from yamllint, which we don't
|
||||||
|
# control.
|
||||||
|
- nits: List = []
|
||||||
|
+ nits = []
|
||||||
|
for path in input_filepaths:
|
||||||
|
# yamllint needs both the file content and the path.
|
||||||
|
file_content = None
|
||||||
|
--- a/third_party/python/glean_parser/glean_parser/metrics.py
|
||||||
|
+++ b/third_party/python/glean_parser/glean_parser/metrics.py
|
||||||
|
@@ -33,10 +33,10 @@ class DataSensitivity(enum.Enum):
|
||||||
|
|
||||||
|
|
||||||
|
class Metric:
|
||||||
|
- typename: str = "ERROR"
|
||||||
|
- glean_internal_metric_cat: str = "glean.internal.metrics"
|
||||||
|
- metric_types: Dict[str, Any] = {}
|
||||||
|
- default_store_names: List[str] = ["metrics"]
|
||||||
|
+ typename = "ERROR"
|
||||||
|
+ glean_internal_metric_cat = "glean.internal.metrics"
|
||||||
|
+ metric_types = {}
|
||||||
|
+ default_store_names = ["metrics"]
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
--- a/third_party/python/glean_parser/glean_parser/pings.py
|
||||||
|
+++ b/third_party/python/glean_parser/glean_parser/pings.py
|
||||||
|
@@ -49,7 +49,7 @@ class Ping:
|
||||||
|
# _validated indicates whether this metric has already been jsonschema
|
||||||
|
# validated (but not any of the Python-level validation).
|
||||||
|
if not _validated:
|
||||||
|
- data: Dict[str, util.JSONType] = {
|
||||||
|
+ data = {
|
||||||
|
"$schema": parser.PINGS_ID,
|
||||||
|
self.name: self.serialize(),
|
||||||
|
}
|
||||||
|
--- a/third_party/python/glean_parser/glean_parser/util.py
|
||||||
|
+++ b/third_party/python/glean_parser/glean_parser/util.py
|
||||||
|
@@ -269,7 +269,7 @@ def fetch_remote_url(url: str, cache: bo
|
||||||
|
if key in dc:
|
||||||
|
return dc[key]
|
||||||
|
|
||||||
|
- contents: str = urllib.request.urlopen(url).read()
|
||||||
|
+ contents = urllib.request.urlopen(url).read()
|
||||||
|
|
||||||
|
if cache:
|
||||||
|
with diskcache.Cache(cache_dir) as dc:
|
||||||
|
--- a/third_party/python/glean_parser/glean_parser/parser.py
|
||||||
|
+++ b/third_party/python/glean_parser/glean_parser/parser.py
|
||||||
|
@@ -339,8 +339,8 @@ def parse_objects(
|
||||||
|
value from the `metrics.yaml`, rather than having it overridden when
|
||||||
|
the metric expires.
|
||||||
|
"""
|
||||||
|
- all_objects: ObjectTree = OrderedDict()
|
||||||
|
- sources: Dict[Any, Path] = {}
|
||||||
|
+ all_objects = OrderedDict()
|
||||||
|
+ sources = {}
|
||||||
|
filepaths = util.ensure_list(filepaths)
|
||||||
|
for filepath in filepaths:
|
||||||
|
content, filetype = yield from _load_file(filepath)
|
||||||
|
|
144
deb_patches/sandbox-update-arm-syscall-numbers.patch
Normal file
144
deb_patches/sandbox-update-arm-syscall-numbers.patch
Normal file
|
@ -0,0 +1,144 @@
|
||||||
|
From 05971bd227dc6c359657d1501711e6865e9430f9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Matthew Denton <mpdenton@chromium.org>
|
||||||
|
Date: Tue, 28 Jul 2020 00:29:01 +0000
|
||||||
|
Subject: [PATCH] Linux sandbox: update arm syscall numbers
|
||||||
|
|
||||||
|
Change-Id: Ia2c39a86fb3516040a74de963115e73b7b1a1e0c
|
||||||
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2318316
|
||||||
|
Reviewed-by: Robert Sesek <rsesek@chromium.org>
|
||||||
|
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
|
||||||
|
Cr-Commit-Position: refs/heads/master@{#792090}
|
||||||
|
---
|
||||||
|
|
||||||
|
diff --git a/security/sandbox/chromium/sandbox/linux/system_headers/arm64_linux_syscalls.h b/security/sandbox/chromium/sandbox/linux/system_headers/arm64_linux_syscalls.h
|
||||||
|
index 59d0eab8..a242c18c 100644
|
||||||
|
--- a/security/sandbox/chromium/sandbox/linux/system_headers/arm64_linux_syscalls.h
|
||||||
|
+++ b/security/sandbox/chromium/sandbox/linux/system_headers/arm64_linux_syscalls.h
|
||||||
|
@@ -1063,4 +1063,60 @@
|
||||||
|
#define __NR_memfd_create 279
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#if !defined(__NR_bpf)
|
||||||
|
+#define __NR_bpf 280
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_execveat)
|
||||||
|
+#define __NR_execveat 281
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_userfaultfd)
|
||||||
|
+#define __NR_userfaultfd 282
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_membarrier)
|
||||||
|
+#define __NR_membarrier 283
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_mlock2)
|
||||||
|
+#define __NR_mlock2 284
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_copy_file_range)
|
||||||
|
+#define __NR_copy_file_range 285
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_preadv2)
|
||||||
|
+#define __NR_preadv2 286
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_pwritev2)
|
||||||
|
+#define __NR_pwritev2 287
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_pkey_mprotect)
|
||||||
|
+#define __NR_pkey_mprotect 288
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_pkey_alloc)
|
||||||
|
+#define __NR_pkey_alloc 289
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_pkey_free)
|
||||||
|
+#define __NR_pkey_free 290
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_statx)
|
||||||
|
+#define __NR_statx 291
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_io_pgetevents)
|
||||||
|
+#define __NR_io_pgetevents 292
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_rseq)
|
||||||
|
+#define __NR_rseq 293
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_ARM64_LINUX_SYSCALLS_H_
|
||||||
|
diff --git a/security/sandbox/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h b/security/sandbox/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h
|
||||||
|
index 1addd53..85e2110b 100644
|
||||||
|
--- a/security/sandbox/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h
|
||||||
|
+++ b/security/sandbox/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h
|
||||||
|
@@ -1385,6 +1385,62 @@
|
||||||
|
#define __NR_memfd_create (__NR_SYSCALL_BASE+385)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#if !defined(__NR_bpf)
|
||||||
|
+#define __NR_bpf (__NR_SYSCALL_BASE+386)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_execveat)
|
||||||
|
+#define __NR_execveat (__NR_SYSCALL_BASE+387)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_userfaultfd)
|
||||||
|
+#define __NR_userfaultfd (__NR_SYSCALL_BASE+388)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_membarrier)
|
||||||
|
+#define __NR_membarrier (__NR_SYSCALL_BASE+389)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_mlock2)
|
||||||
|
+#define __NR_mlock2 (__NR_SYSCALL_BASE+390)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_copy_file_range)
|
||||||
|
+#define __NR_copy_file_range (__NR_SYSCALL_BASE+391)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_preadv2)
|
||||||
|
+#define __NR_preadv2 (__NR_SYSCALL_BASE+392)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_pwritev2)
|
||||||
|
+#define __NR_pwritev2 (__NR_SYSCALL_BASE+393)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_pkey_mprotect)
|
||||||
|
+#define __NR_pkey_mprotect (__NR_SYSCALL_BASE+394)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_pkey_alloc)
|
||||||
|
+#define __NR_pkey_alloc (__NR_SYSCALL_BASE+395)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_pkey_free)
|
||||||
|
+#define __NR_pkey_free (__NR_SYSCALL_BASE+396)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_statx)
|
||||||
|
+#define __NR_statx (__NR_SYSCALL_BASE+397)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_rseq)
|
||||||
|
+#define __NR_rseq (__NR_SYSCALL_BASE+398)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if !defined(__NR_io_pgetevents)
|
||||||
|
+#define __NR_io_pgetevents (__NR_SYSCALL_BASE+399)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
// ARM private syscalls.
|
||||||
|
#if !defined(__ARM_NR_BASE)
|
||||||
|
#define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000)
|
42
deb_patches/silence-gtk-style-assertions.patch
Normal file
42
deb_patches/silence-gtk-style-assertions.patch
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
Description: silence GTK style-related assertions caused by the lack of a "selection" CSS node on GtkTextView in the version of gtk3 in xenial.
|
||||||
|
These assertions were caused by the fix for https://bugzilla.mozilla.org/1654323.
|
||||||
|
Author: Olivier Tilloy <olivier.tilloy@canonical.com>
|
||||||
|
|
||||||
|
--- a/widget/gtk/nsLookAndFeel.cpp
|
||||||
|
+++ b/widget/gtk/nsLookAndFeel.cpp
|
||||||
|
@@ -1216,7 +1216,7 @@ void nsLookAndFeel::EnsureInit() {
|
||||||
|
&color);
|
||||||
|
mTextSelectedText = GDK_RGBA_TO_NS_RGBA(color);
|
||||||
|
};
|
||||||
|
- GrabSelectionColors(selectionStyle);
|
||||||
|
+ GrabSelectionColors(selectionStyle ? selectionStyle : style);
|
||||||
|
if (mTextSelectedBackground == mTextSelectedText) {
|
||||||
|
// Some old distros/themes don't properly use the .selection style, so
|
||||||
|
// fall back to the regular text view style.
|
||||||
|
@@ -1413,6 +1413,7 @@ bool nsLookAndFeel::WidgetUsesImage(Widg
|
||||||
|
};
|
||||||
|
|
||||||
|
GtkStyleContext* style = GetStyleContext(aNodeType);
|
||||||
|
+ if (!style) return false;
|
||||||
|
|
||||||
|
GValue value = G_VALUE_INIT;
|
||||||
|
for (GtkStateFlags state : sFlagsToCheck) {
|
||||||
|
--- a/widget/gtk/WidgetStyleCache.cpp
|
||||||
|
+++ b/widget/gtk/WidgetStyleCache.cpp
|
||||||
|
@@ -933,7 +933,7 @@ static GtkStyleContext* GetWidgetRootSty
|
||||||
|
default:
|
||||||
|
GtkWidget* widget = GetWidget(aNodeType);
|
||||||
|
MOZ_ASSERT(widget);
|
||||||
|
- return gtk_widget_get_style_context(widget);
|
||||||
|
+ return (widget ? gtk_widget_get_style_context(widget) : nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
MOZ_ASSERT(style);
|
||||||
|
@@ -1356,6 +1356,7 @@ GtkStyleContext* GetStyleContext(WidgetN
|
||||||
|
style = GetCssNodeStyleInternal(aNodeType);
|
||||||
|
StyleContextSetScale(style, aScale);
|
||||||
|
}
|
||||||
|
+ if (!style) return nullptr;
|
||||||
|
bool stateChanged = false;
|
||||||
|
bool stateHasDirection = gtk_get_minor_version() >= 8;
|
||||||
|
GtkStateFlags oldState = gtk_style_context_get_state(style);
|
|
@ -23,8 +23,8 @@
|
||||||
# For libyuv
|
# For libyuv
|
||||||
gyp_vars['arm_version'] = int(CONFIG['ARM_ARCH'])
|
gyp_vars['arm_version'] = int(CONFIG['ARM_ARCH'])
|
||||||
|
|
||||||
--- a/media/webrtc/trunk/webrtc/build/config/compiler/BUILD.gn
|
--- a/third_party/libwebrtc/webrtc/build/config/compiler/BUILD.gn
|
||||||
+++ b/media/webrtc/trunk/webrtc/build/config/compiler/BUILD.gn
|
+++ b/third_party/libwebrtc/webrtc/build/config/compiler/BUILD.gn
|
||||||
@@ -590,7 +590,6 @@ config("compiler_cpu_abi") {
|
@@ -590,7 +590,6 @@ config("compiler_cpu_abi") {
|
||||||
if (!is_nacl) {
|
if (!is_nacl) {
|
||||||
cflags += [
|
cflags += [
|
||||||
|
|
|
@ -83,7 +83,7 @@ index 6b8cac0..54648c6 100644
|
||||||
@@ -48,8 +48,8 @@
|
@@ -48,8 +48,8 @@
|
||||||
display: block;
|
display: block;
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
overflow: -moz-hidden-unscrollable;
|
overflow: clip;
|
||||||
- margin-inline: @urlbarViewMarginInline@;
|
- margin-inline: @urlbarViewMarginInline@;
|
||||||
- width: calc(100% - 2 * @urlbarViewMarginInline@);
|
- width: calc(100% - 2 * @urlbarViewMarginInline@);
|
||||||
+ margin-inline: 0;
|
+ margin-inline: 0;
|
||||||
|
|
|
@ -61,14 +61,10 @@ diff --git a/browser/locales/l10n.toml b/browser/locales/l10n.toml
|
||||||
index 0b53c52..f8b605d 100644
|
index 0b53c52..f8b605d 100644
|
||||||
--- a/browser/locales/l10n.toml
|
--- a/browser/locales/l10n.toml
|
||||||
+++ b/browser/locales/l10n.toml
|
+++ b/browser/locales/l10n.toml
|
||||||
@@ -129,14 +129,6 @@ locales = [
|
@@ -133,10 +133,6 @@ locales = [
|
||||||
reference = "browser/extensions/fxmonitor/locales/en-US/**"
|
reference = "browser/extensions/fxmonitor/locales/en-US/**"
|
||||||
l10n = "{l}browser/extensions/fxmonitor/**"
|
l10n = "{l}browser/extensions/fxmonitor/**"
|
||||||
|
|
||||||
-[[paths]]
|
|
||||||
- reference = "browser/extensions/webcompat-reporter/locales/en-US/**"
|
|
||||||
- l10n = "{l}browser/extensions/webcompat-reporter/**"
|
|
||||||
-
|
|
||||||
-[[paths]]
|
-[[paths]]
|
||||||
- reference = "browser/extensions/report-site-issue/locales/en-US/**"
|
- reference = "browser/extensions/report-site-issue/locales/en-US/**"
|
||||||
- l10n = "{l}browser/extensions/report-site-issue/**"
|
- l10n = "{l}browser/extensions/report-site-issue/**"
|
||||||
|
|
Loading…
Reference in a new issue