Compare commits

...

2 commits

Author SHA1 Message Date
45067e03b0
mv 2023-04-16 17:27:16 -04:00
04ab8b4b08
user/firefox102: new aport 2023-04-16 17:26:09 -04:00
20 changed files with 1884 additions and 0 deletions

665
user/firefox-esr/APKBUILD Normal file
View file

@ -0,0 +1,665 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=firefox-esr
pkgver=102.10.0
# Date of release, YY-MM-DD for metainfo file (see package())
_releasedate=2023-04-11
pkgrel=1
pkgdesc="Firefox web browser - Extended Support Release"
url="https://www.mozilla.org/en-US/firefox/organizations/"
# s390x and riscv64: blocked by rust and cargo
# armhf: build failure on armhf due to wasm
arch="x86_64 armv7 aarch64 x86 ppc64le"
license="GPL-3.0-only AND LGPL-2.1-only AND LGPL-3.0-only AND MPL-2.0"
install="$pkgname.post-upgrade"
depends="
ffmpeg5-libavcodec
"
makedepends="
alsa-lib-dev
automake
bsd-compat-headers
cargo
cbindgen
clang15-dev
dbus-glib-dev
gettext
gtk+3.0-dev
hunspell-dev
icu-dev>=69.1
libevent-dev
libffi-dev
libjpeg-turbo-dev
libnotify-dev
libogg-dev
libtheora-dev
libtool
libvorbis-dev
libvpx-dev
libwebp-dev
libxcomposite-dev
libxt-dev
lld
llvm-dev
m4
mesa-dev
nasm
nodejs
nspr-dev
nss-dev
pipewire-dev
pulseaudio-dev
py3-psutil
py3-zstandard
python3
sed
wasi-sdk
wireless-tools-dev
yasm
zip
"
source="https://ftp.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefox-${pkgver}esr.source.tar.xz
allow-custom-rust-vendor.patch
avoid-redefinition.patch
disable-moz-stackwalk.patch
esr-metainfo.patch
fix-neon-aom.patch
fix-fortify-system-wrappers.patch
fix-rust-target.patch
fix-webrtc-glibcisms.patch
mallinfo.patch
python-deps.patch
sandbox-fork.patch
sandbox-largefile.patch
sandbox-sched_setscheduler.patch
zstandard.patch
stab.h
firefox.desktop
mozilla-location.keys
vendor-prefs.js
"
builddir="$srcdir/firefox-$pkgver"
_mozappdir=/usr/lib/firefox-esr
# help our shared-object scanner to find the libs
ldpath="$_mozappdir"
# secfixes:
# 102.1.0-r0:
# - CVE-2022-2505
# - CVE-2022-36314
# - CVE-2022-36318
# - CVE-2022-36319
# 91.11.0-r0:
# - CVE-2022-2200
# - CVE-2022-31744
# - CVE-2022-34468
# - CVE-2022-34470
# - CVE-2022-34472
# - CVE-2022-34478
# - CVE-2022-34479
# - CVE-2022-34481
# - CVE-2022-34484
# 91.10.0-r0:
# - CVE-2022-31736
# - CVE-2022-31737
# - CVE-2022-31738
# - CVE-2022-31739
# - CVE-2022-31740
# - CVE-2022-31741
# - CVE-2022-31742
# - CVE-2022-31747
# 91.9.1-r0:
# - CVE-2022-1529
# - CVE-2022-1802
# 91.9.0-r0:
# - CVE-2022-29909
# - CVE-2022-29911
# - CVE-2022-29912
# - CVE-2022-29914
# - CVE-2022-29916
# - CVE-2022-29917
# 91.8.0-r0:
# - CVE-2022-1097
# - CVE-2022-1196
# - CVE-2022-24713
# - CVE-2022-28281
# - CVE-2022-28282
# - CVE-2022-28285
# - CVE-2022-28286
# - CVE-2022-28289
# 91.7.0-r0:
# - CVE-2022-26381
# - CVE-2022-26383
# - CVE-2022-26384
# - CVE-2022-26386
# - CVE-2022-26387
# 91.6.1-r0:
# - CVE-2022-26485
# - CVE-2022-26486
# 91.6.0-r0:
# - CVE-2022-22754
# - CVE-2022-22756
# - CVE-2022-22759
# - CVE-2022-22760
# - CVE-2022-22761
# - CVE-2022-22763
# - CVE-2022-22764
# 91.5.0-r0:
# - CVE-2021-4140
# - CVE-2022-22737
# - CVE-2022-22738
# - CVE-2022-22739
# - CVE-2022-22740
# - CVE-2022-22741
# - CVE-2022-22742
# - CVE-2022-22743
# - CVE-2022-22744
# - CVE-2022-22745
# - CVE-2022-22746
# - CVE-2022-22747
# - CVE-2022-22748
# - CVE-2022-22751
# 91.4.0-r0:
# - CVE-2021-43536
# - CVE-2021-43537
# - CVE-2021-43538
# - CVE-2021-43539
# - CVE-2021-43541
# - CVE-2021-43542
# - CVE-2021-43543
# - CVE-2021-43545
# - CVE-2021-43546
# 91.3.0-r0:
# - CVE-2021-38503
# - CVE-2021-38504
# - CVE-2021-38505
# - CVE-2021-38506
# - CVE-2021-38507
# - CVE-2021-38508
# - CVE-2021-38509
# - CVE-2021-38510
# 91.2.0-r0:
# - CVE-2021-32810
# - CVE-2021-38492
# - CVE-2021-38493
# - CVE-2021-38495
# - CVE-2021-38496
# - CVE-2021-38497
# - CVE-2021-38498
# - CVE-2021-38500
# - CVE-2021-38501
# 78.13.0-r0:
# - CVE-2021-29980
# - CVE-2021-29984
# - CVE-2021-29985
# - CVE-2021-29986
# - CVE-2021-29988
# - CVE-2021-29989
# 78.12.0-r0:
# - CVE-2021-29970
# - CVE-2021-29976
# - CVE-2021-30547
# 78.11.0-r0:
# - CVE-2021-29967
# 78.10.0-r0:
# - CVE-2021-23961
# - CVE-2021-23994
# - CVE-2021-23995
# - CVE-2021-23998
# - CVE-2021-23999
# - CVE-2021-24002
# - CVE-2021-29945
# - CVE-2021-29946
# 78.9.0-r0:
# - CVE-2021-23981
# - CVE-2021-23982
# - CVE-2021-23984
# - CVE-2021-23987
# 78.8.0-r0:
# - CVE-2021-23968
# - CVE-2021-23969
# - CVE-2021-23973
# - CVE-2021-23978
# 78.7.0-r0:
# - CVE-2020-26976
# - CVE-2021-23953
# - CVE-2021-23954
# - CVE-2021-23960
# - CVE-2021-23964
# 78.6.1-r0:
# - CVE-2020-16044
# 78.6.0-r0:
# - CVE-2020-16042
# - CVE-2020-26971
# - CVE-2020-26973
# - CVE-2020-26974
# - CVE-2020-26978
# - CVE-2020-35111
# - CVE-2020-35112
# - CVE-2020-35113
# 78.5.0-r0:
# - CVE-2020-15683
# - CVE-2020-15969
# - CVE-2020-15999
# - CVE-2020-16012
# - CVE-2020-26950
# - CVE-2020-26951
# - CVE-2020-26953
# - CVE-2020-26956
# - CVE-2020-26958
# - CVE-2020-26959
# - CVE-2020-26960
# - CVE-2020-26961
# - CVE-2020-26965
# - CVE-2020-26966
# - CVE-2020-26968
# 78.3.0-r0:
# - CVE-2020-15673
# - CVE-2020-15676
# - CVE-2020-15677
# - CVE-2020-15678
# 78.2.0-r0:
# - CVE-2020-15663
# - CVE-2020-15664
# - CVE-2020-15670
# 78.1.0-r0:
# - CVE-2020-15652
# - CVE-2020-15653
# - CVE-2020-15654
# - CVE-2020-15655
# - CVE-2020-15656
# - CVE-2020-15657
# - CVE-2020-15658
# - CVE-2020-15659
# - CVE-2020-6463
# - CVE-2020-6514
# 68.10.0-r0:
# - CVE-2020-12417
# - CVE-2020-12418
# - CVE-2020-12419
# - CVE-2020-12420
# - CVE-2020-12421
# 68.9.0-r0:
# - CVE-2020-12399
# - CVE-2020-12405
# - CVE-2020-12406
# - CVE-2020-12410
# 68.8.0-r0:
# - CVE-2020-12387
# - CVE-2020-12388
# - CVE-2020-12389
# - CVE-2020-12392
# - CVE-2020-12393
# - CVE-2020-12395
# - CVE-2020-6831
# 68.7.0-r0:
# - CVE-2020-6821
# - CVE-2020-6822
# - CVE-2020-6825
# 68.6.1-r0:
# - CVE-2020-6819
# - CVE-2020-6820
# 68.6.0-r0:
# - CVE-2019-20503
# - CVE-2020-6805
# - CVE-2020-6806
# - CVE-2020-6807
# - CVE-2020-6811
# - CVE-2020-6812
# - CVE-2020-6814
# 68.5.0-r0:
# - CVE-2020-6796
# - CVE-2020-6797
# - CVE-2020-6798
# - CVE-2020-6799
# - CVE-2020-6800
# 68.4.1-r0:
# - CVE-2019-17016
# - CVE-2019-17022
# - CVE-2019-17024
# - CVE-2019-17026
# 68.3.0-r0:
# - CVE-2019-17005
# - CVE-2019-17008
# - CVE-2019-17009
# - CVE-2019-17010
# - CVE-2019-17011
# - CVE-2019-17012
# 68.2.0-r0:
# - CVE-2019-11757
# - CVE-2019-11758
# - CVE-2019-11759
# - CVE-2019-11760
# - CVE-2019-11761
# - CVE-2019-11762
# - CVE-2019-11763
# - CVE-2019-11764
# - CVE-2019-15903
# 68.1.0-r0:
# - CVE-2019-9812
# - CVE-2019-11740
# - CVE-2019-11742
# - CVE-2019-11743
# - CVE-2019-11744
# - CVE-2019-11746
# - CVE-2019-11752
# 68.0.2-r0:
# - CVE-2019-11733
# 68.0-r0:
# - CVE-2019-11709
# - CVE-2019-11711
# - CVE-2019-11712
# - CVE-2019-11713
# - CVE-2019-11715
# - CVE-2019-11717
# - CVE-2019-11719
# - CVE-2019-11729
# - CVE-2019-11730
# - CVE-2019-9811
# 60.7.2-r0:
# - CVE-2019-11708
# 60.7.1-r0:
# - CVE-2019-11707
# 60.7.0-r0:
# - CVE-2019-9815
# - CVE-2019-9816
# - CVE-2019-9817
# - CVE-2019-9818
# - CVE-2019-9819
# - CVE-2019-9820
# - CVE-2019-11691
# - CVE-2019-11692
# - CVE-2019-11693
# - CVE-2019-7317
# - CVE-2019-9797
# - CVE-2018-18511
# - CVE-2019-11694
# - CVE-2019-11698
# - CVE-2019-5798
# - CVE-2019-9800
# 60.6.1-r0:
# - CVE-2019-9810
# - CVE-2019-9813
# - CVE-2019-9790
# - CVE-2019-9791
# - CVE-2019-9792
# - CVE-2019-9793
# - CVE-2019-9794
# - CVE-2019-9795
# - CVE-2019-9796
# - CVE-2019-9801
# - CVE-2018-18506
# - CVE-2019-9788
# 60.5.2-r0:
# - CVE-2019-5785
# - CVE-2018-18335
# - CVE-2018-18356
# 60.5.0-r0:
# - CVE-2018-18500
# - CVE-2018-18505
# - CVE-2018-18501
# 52.6.0-r0:
# - CVE-2018-5089
# - CVE-2018-5091
# - CVE-2018-5095
# - CVE-2018-5096
# - CVE-2018-5097
# - CVE-2018-5098
# - CVE-2018-5099
# - CVE-2018-5102
# - CVE-2018-5103
# - CVE-2018-5104
# - CVE-2018-5117
# 52.5.2-r0:
# - CVE-2017-7843
# we need this because cargo verifies checksums of all files in vendor
# crates when it builds and gives us no way to override or update the
# file sanely... so just clear out the file list
_clear_vendor_checksums() {
sed -i 's/\("files":{\)[^}]*/\1/' third_party/rust/$1/.cargo-checksum.json
}
export SHELL=/bin/sh
export BUILD_OFFICIAL=1
export MOZILLA_OFFICIAL=1
export USE_SHORT_LIBNAME=1
export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system
export MOZ_APP_PROFILE="mozilla/firefox"
export MOZ_APP_REMOTINGNAME=firefox-esr
export MOZBUILD_STATE_PATH="$srcdir"/mozbuild
# disable desktop notifications
export MOZ_NOSPAM=1
# Find our triplet JSON
export RUST_TARGET="$CTARGET"
# Build with Clang, takes less RAM
export CC="clang-15"
export CXX="clang++-15"
# set rpath so linker finds the libs
export LDFLAGS="$LDFLAGS -Wl,-rpath,$_mozappdir"
# let firefox do this itself.
unset CARGO_PROFILE_RELEASE_OPT_LEVEL
unset CARGO_PROFILE_RELEASE_LTO
export CFLAGS="$CFLAGS -O2"
export CXXFLAGS="$CXXFLAGS -O2"
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
prepare() {
default_prepare
cp "$srcdir"/stab.h toolkit/crashreporter/google-breakpad/src/
base64 -d "$srcdir"/mozilla-location.keys > "$builddir"/mozilla-api-key
_clear_vendor_checksums audio_thread_priority
_clear_vendor_checksums target-lexicon-0.9.0
_clear_vendor_checksums packed_simd_2
# webrtc does not build on these
case "$CARCH" in
ppc64le)
local webrtc_config="ac_add_options --disable-webrtc"
;;
esac
case "$CARCH" in
armv7)
# broken here
local rust_simd="ac_add_options --disable-rust-simd"
;;
*)
local rust_simd="ac_add_options --enable-rust-simd"
;;
esac
case "$CARCH" in
aarch64|arm*|x86*)
# disable-elf-hack: exists only on aarch64, arm*, x86, x86_64
local arch_config="ac_add_options --disable-elf-hack"
;;
esac
# sandbox only supported here
case "$CARCH" in
x86*|armv7|aarch64)
local sandbox="ac_add_options --enable-sandbox"
;;
*)
local sandbox="ac_add_options --disable-sandbox"
;;
esac
cat > base-mozconfig <<-EOF
# disable unwanted things
ac_add_options --disable-bootstrap
ac_add_options --disable-cargo-incremental
ac_add_options --disable-crashreporter
ac_add_options --disable-debug
ac_add_options --disable-debug-symbols
ac_add_options --disable-install-strip
ac_add_options --disable-jemalloc
ac_add_options --disable-strip
ac_add_options --disable-tests
ac_add_options --disable-updater
# features
ac_add_options --enable-alsa
ac_add_options --enable-dbus
ac_add_options --enable-default-toolkit=cairo-gtk3-wayland
ac_add_options --enable-ffmpeg
ac_add_options --enable-hardening
ac_add_options --enable-linker=lld
ac_add_options --enable-necko-wifi
ac_add_options --enable-official-branding
ac_add_options --enable-optimize="$CFLAGS"
ac_add_options --enable-pulseaudio
ac_add_options --enable-release
ac_add_options --enable-update-channel=release
# system libs
ac_add_options --enable-system-pixman
ac_add_options --with-system-ffi
ac_add_options --with-system-icu
ac_add_options --with-system-jpeg
ac_add_options --with-system-libevent
ac_add_options --with-system-libvpx
ac_add_options --with-system-nspr
ac_add_options --with-system-nss
ac_add_options --with-system-png
ac_add_options --with-system-webp
ac_add_options --with-system-zlib
# misc
ac_add_options --allow-addon-sideload
ac_add_options --prefix=/usr
ac_add_options --with-app-name=firefox-esr
ac_add_options --with-distribution-id=org.alpinelinux
ac_add_options --with-libclang-path=/usr/lib
ac_add_options --with-unsigned-addon-scopes=app,system
#ac_add_options --with-wasi-sysroot=/usr/share/wasi-sysroot
ac_add_options --without-wasm-sandboxed-libraries
ac_add_options --host=$CHOST
ac_add_options --target=$CTARGET
# objdir
mk_add_options MOZ_OBJDIR="$builddir/obj"
mk_add_options RUSTFLAGS="$RUSTFLAGS"
# keys
# these are for alpine linux use only
ac_add_options --with-mozilla-api-keyfile="$builddir/mozilla-api-key"
$arch_config
$rust_simd
$sandbox
$webrtc_config
EOF
}
build() {
cat > .mozconfig base-mozconfig
export MOZ_BUILD_DATE=$(date ${SOURCE_DATE_EPOCH:+ -d@${SOURCE_DATE_EPOCH}} "+%Y%m%d%H%M%S")
# for lto
ulimit -n 4096
# can't be set here and fail
unset RUSTFLAGS
local thinlto_jobs=${JOBS:-1}
case "$CARCH" in
# on this platforms, lld seems to not utilise >1 threads for thinlto for some reason.
# at the same time, having more than 8 also crashes lld for firefox buildsystems (why?).
aarch64)
if [ $thinlto_jobs -gt 8 ]; then
thinlto_jobs=8
fi
;;
esac
export LDFLAGS="$LDFLAGS -Wl,--thinlto-jobs=$thinlto_jobs"
case "$CARCH" in
# lto for 64-bit systems only
aarch64|x86_64|ppc64le)
cat > .mozconfig base-mozconfig <<-EOF
ac_add_options --enable-lto=cross
EOF
esac
./mach build
}
package() {
DESTDIR="$pkgdir" ./mach install
local _png
for _png in ./browser/branding/official/default*.png; do
local i=${_png%.png}
i=${i##*/default}
install -Dm644 "$_png" \
"$pkgdir"/usr/share/icons/hicolor/"$i"x"$i"/apps/firefox-esr.png
done
install -Dm644 browser/branding/official/content/about-logo.png \
"$pkgdir"/usr/share/icons/hicolor/192x192/apps/firefox-esr.png
install -Dm644 browser/branding/official/content/about-logo@2x.png \
"$pkgdir"/usr/share/icons/hicolor/384x384/apps/firefox-esr.png
install -Dm644 browser/branding/official/content/about-logo.svg \
"$pkgdir"/usr/share/icons/hicolor/scalable/apps/firefox-esr.svg
install -Dm644 "$srcdir"/firefox.desktop \
"$pkgdir"/usr/share/applications/firefox-esr.desktop
# install our vendor prefs
install -Dm644 "$srcdir"/vendor-prefs.js \
"$pkgdir"/$_mozappdir/browser/defaults/preferences/vendor.js
# Generate appdata file
mkdir -p "$pkgdir"/usr/share/metainfo/
export VERSION="$pkgver"
export DATE="$_releasedate"
envsubst < "$builddir"/taskcluster/docker/firefox-flatpak/org.mozilla.firefox.appdata.xml.in > "$pkgdir"/usr/share/metainfo/org.mozilla.firefox-esr.appdata.xml
# Replace duplicate binary with wrapper
# https://bugzilla.mozilla.org/show_bug.cgi?id=658850
install -Dm755 /dev/stdin "$pkgdir"/usr/bin/firefox-esr <<- EOF
#!/bin/sh
exec $_mozappdir/firefox-esr "\$@"
EOF
rm "$pkgdir"/$_mozappdir/firefox-esr-bin
ln -sfv /usr/bin/firefox-esr "$pkgdir"/$_mozappdir/firefox-esr-bin
}
sha512sums="
f2b53c35bdd22a3de6f32699b832babcbf499667197c02dd50cf0b6cd956e0f4471f420938c2ab72f0a0686ed99fe74e3184afe9b5f7169130879b8f8fd99f0b firefox-102.10.0esr.source.tar.xz
4e584621145cf8add069c6dac18e805b3274a1ee402d84e924df2341f7d3c5be261a93ef51283bacbd606f47fbdc628c4323ecc31efc5b403b8d224b18dc278f allow-custom-rust-vendor.patch
b1cb2db3122634f66d2bae7066e76f2dcd455c464e021db4de3b0a08314df95cb667846081682db549dd2af8a00831cabe44a2420c66cdfb5e3b5fa7e6bd21d3 avoid-redefinition.patch
454ea3263cabce099accbdc47aaf83be26a19f8b5a4568c01a7ef0384601cf8315efd86cd917f9c8bf419c2c845db89a905f3ff9a8eb0c8e41042e93aa96a85c disable-moz-stackwalk.patch
f7b3b45ba04d05d17439d009bf0c9f27881e126f424e2257552338a0c1e3771ee1289c044babcb0920f62af62873a268c0cf524e1d35711e6dc8b808ca5e9f26 esr-metainfo.patch
d3a54897089eda9fdfe4b25ade1cb2c01c4b31fa9bf0e0ddbb0bbe674072ec5d36a6e52f791a8cbc8d3908e912ac2d7edec69b34d87ecca0acca876d45974c8d fix-neon-aom.patch
2f4f15974d52de4bb273b62a332d13620945d284bbc6fe6bd0a1f58ff7388443bc1d3bf9c82cc31a8527aad92b0cd3a1bc41d0af5e1800e0dcbd7033e58ffd71 fix-fortify-system-wrappers.patch
cd68b89e29e5f6379fbd5679db27b9a5ef70ea65e51c0d0a8137e1f1fd210e35a8cfb047798e9549bc7275606d7ec5c8d8af1335d29da4699db7acd8bc7ff556 fix-rust-target.patch
305c874fdea3096e9c4c6aa6520ac64bb1c347c4b59db8360096646593fe684c3b5377874d91cecd33d56d1410b4714fbdea2b514923723ecbeff79d51265d9b fix-webrtc-glibcisms.patch
a4a3e062661bda64d502d426c480ac9645345860118de9df9ffe6e0597738c70c11e5cdef2d4fd12c5e2ee30a09310159230524655a419a4f7e4eeeb0f3c06b0 mallinfo.patch
f3d419880cc7f043b6eb547894d486457d407640be2bd8b402eb3a534ccea39568f6d506fc44a3b29c94eb0dc6fc2bec6600d161786fd233d26b1dc8970f5ab4 python-deps.patch
2518f2fc75b5db30058e0735f47d60fdf1e7adfaeee4b33fb2afb1bd9a616ce943fd88f4404d0802d4083703f4acf1d5ad42377218d025bc768807fbaf7e1609 sandbox-fork.patch
b7d0a6126bdf6c0569f80aabf5b37ed2c7a35712eb8a0404a2d85381552f5555d4f97d213ea26cec6a45dc2785f22439376ed5f8e78b4fd664ef0223307b333e sandbox-largefile.patch
94433c5ffdbe579c456d95c5f053f61fcbab2f652fa90bc69dcc27d9a1507a8e5c677adeadae9a7a75cc9a55184c1040737f4dfd10b279c088ef016561e6f135 sandbox-sched_setscheduler.patch
12fbe50d94624931a581314b8e6e228a1f8a4550704a6ee4f8904184ac4727efd90982e87a8fdd318e15515f9430dfc6cf7455b301e903003027b3f0afa79795 zstandard.patch
0b3f1e4b9fdc868e4738b5c81fd6c6128ce8885b260affcb9a65ff9d164d7232626ce1291aaea70132b3e3124f5e13fef4d39326b8e7173e362a823722a85127 stab.h
d354f48a29bfc16719f3b230b1395063239d4420f9e47522de4662392d9697b15f931ca3bf6055d100fa33d61a9a1a13477687d5eac99e50ae7dbef9882a5808 firefox.desktop
382510375b1a2fa79be0ab79e3391a021ae2c022429ffbaa7e7a69166f99bb56d01e59a1b10688592a29238f21c9d6977672bd77f9fae439b66bdfe0c55ddb15 mozilla-location.keys
fc45bc3ffb9404e5338ea26a9f04807b40f6f516324972cddd48bedb91b8bd7c6b8d4e03a0209020f5e67b703bc4ff89389985791b9bd544a0fc3951e2dc338e vendor-prefs.js
"

View file

@ -0,0 +1,564 @@
From a5a3db2d32ff1d359aef5ec586b91164570c1685 Mon Sep 17 00:00:00 2001
From: Dan Gohman <sunfish@mozilla.com>
Date: Tue, 5 Nov 2019 09:56:15 -0800
Subject: [PATCH 1/7] Support custom vendor strings.
Add support for custom vendors, as in "x86_64-gentoo-linux-musl".
Fixes #33.
---
src/targets.rs | 108 ++++++++++++++++++++++++++++++++++++++++++++++++-
src/triple.rs | 4 --
2 files changed, 106 insertions(+), 6 deletions(-)
diff --git a/src/targets.rs b/src/targets.rs
index 6ae570e..90b2736 100644
--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs
+++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs
@@ -1,6 +1,8 @@
// This file defines all the identifier enums and target-aware logic.
use crate::triple::{Endianness, PointerWidth, Triple};
+use alloc::boxed::Box;
+use alloc::string::String;
use core::fmt;
use core::str::FromStr;
@@ -292,7 +294,7 @@ impl Aarch64Architecture {
/// The "vendor" field, which in practice is little more than an arbitrary
/// modifier.
-#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
+#[derive(Clone, Debug, PartialEq, Eq, Hash)]
#[allow(missing_docs)]
pub enum Vendor {
Unknown,
@@ -306,6 +308,15 @@ pub enum Vendor {
Sun,
Uwp,
Wrs,
+
+ /// A custom vendor. "Custom" in this context means that the vendor is
+ /// not specifically recognized by upstream Autotools, LLVM, Rust, or other
+ /// relevant authorities on triple naming. It's useful for people building
+ /// and using locally patched toolchains.
+ ///
+ /// Outside of such patched environments, users of `target-lexicon` should
+ /// treat `Custom` the same as `Unknown` and ignore the string.
+ Custom(Box<String>),
}
/// The "operating system" field, which sometimes implies an environment, and
@@ -717,6 +728,7 @@ impl fmt::Display for Vendor {
Vendor::Sun => "sun",
Vendor::Uwp => "uwp",
Vendor::Wrs => "wrs",
+ Vendor::Custom(ref name) => name,
};
f.write_str(s)
}
@@ -738,7 +750,46 @@ impl FromStr for Vendor {
"sun" => Vendor::Sun,
"uwp" => Vendor::Uwp,
"wrs" => Vendor::Wrs,
- _ => return Err(()),
+ custom => {
+ use alloc::borrow::ToOwned;
+
+ // A custom vendor. Since triple syntax is so loosely defined,
+ // be as conservative as we can to avoid potential ambiguities.
+ // We err on the side of being too strict here, as we can
+ // always relax it if needed.
+
+ // Don't allow empty string names.
+ if custom.is_empty() {
+ return Err(());
+ }
+
+ // Don't allow any other recognized name as a custom vendor,
+ // since vendors can be omitted in some contexts.
+ if Architecture::from_str(custom).is_ok()
+ || OperatingSystem::from_str(custom).is_ok()
+ || Environment::from_str(custom).is_ok()
+ || BinaryFormat::from_str(custom).is_ok()
+ {
+ return Err(());
+ }
+
+ // Require the first character to be an ascii lowercase.
+ if !custom.chars().nth(0).unwrap().is_ascii_lowercase() {
+ return Err(());
+ }
+
+ // Restrict the set of characters permitted in a custom vendor.
+ if custom
+ .find(|c: char| {
+ !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.')
+ })
+ .is_some()
+ {
+ return Err(());
+ }
+
+ Vendor::Custom(Box::new(custom.to_owned()))
+ }
})
}
}
@@ -1120,4 +1171,57 @@ mod tests {
assert_eq!(t.environment, Environment::Eabihf);
assert_eq!(t.binary_format, BinaryFormat::Elf);
}
+
+ #[test]
+ fn custom_vendors() {
+ assert!(Triple::from_str("x86_64--linux").is_err());
+ assert!(Triple::from_str("x86_64-42-linux").is_err());
+ assert!(Triple::from_str("x86_64-__customvendor__-linux").is_err());
+ assert!(Triple::from_str("x86_64-^-linux").is_err());
+ assert!(Triple::from_str("x86_64- -linux").is_err());
+ assert!(Triple::from_str("x86_64-CustomVendor-linux").is_err());
+ assert!(Triple::from_str("x86_64-linux-linux").is_err());
+ assert!(Triple::from_str("x86_64-x86_64-linux").is_err());
+ assert!(Triple::from_str("x86_64-elf-linux").is_err());
+ assert!(Triple::from_str("x86_64-gnu-linux").is_err());
+ assert!(Triple::from_str("x86_64-linux-customvendor").is_err());
+ assert!(Triple::from_str("customvendor").is_err());
+ assert!(Triple::from_str("customvendor-x86_64").is_err());
+ assert!(Triple::from_str("x86_64-").is_err());
+ assert!(Triple::from_str("x86_64--").is_err());
+
+ let t = Triple::from_str("x86_64-customvendor-linux")
+ .expect("can't parse target with custom vendor");
+ assert_eq!(t.architecture, Architecture::X86_64);
+ assert_eq!(
+ t.vendor,
+ Vendor::Custom(Box::new(String::from_str("customvendor").unwrap()))
+ );
+ assert_eq!(t.operating_system, OperatingSystem::Linux);
+ assert_eq!(t.environment, Environment::Unknown);
+ assert_eq!(t.binary_format, BinaryFormat::Elf);
+ assert_eq!(t.to_string(), "x86_64-customvendor-linux");
+
+ let t = Triple::from_str("x86_64-customvendor")
+ .expect("can't parse target with custom vendor");
+ assert_eq!(t.architecture, Architecture::X86_64);
+ assert_eq!(
+ t.vendor,
+ Vendor::Custom(Box::new(String::from_str("customvendor").unwrap()))
+ );
+ assert_eq!(t.operating_system, OperatingSystem::Unknown);
+ assert_eq!(t.environment, Environment::Unknown);
+ assert_eq!(t.binary_format, BinaryFormat::Unknown);
+
+ assert_eq!(
+ Triple::from_str("unknown-foo"),
+ Ok(Triple {
+ architecture: Architecture::Unknown,
+ vendor: Vendor::Custom(Box::new(String::from_str("foo").unwrap())),
+ operating_system: OperatingSystem::Unknown,
+ environment: Environment::Unknown,
+ binary_format: BinaryFormat::Unknown,
+ })
+ );
+ }
}
diff --git a/src/triple.rs b/src/triple.rs
index 36dcd9a..1abda26 100644
--- a/third_party/rust/target-lexicon.0.9.0/src/triple.rs
+++ b/third_party/rust/target-lexicon-0.9.0/src/triple.rs
@@ -322,10 +322,6 @@ mod tests {
Triple::from_str("foo"),
Err(ParseError::UnrecognizedArchitecture("foo".to_owned()))
);
- assert_eq!(
- Triple::from_str("unknown-foo"),
- Err(ParseError::UnrecognizedVendor("foo".to_owned()))
- );
assert_eq!(
Triple::from_str("unknown-unknown-foo"),
Err(ParseError::UnrecognizedOperatingSystem("foo".to_owned()))
From 6f90d7274dce4e7f9bb120f6b36cf26881bde9a7 Mon Sep 17 00:00:00 2001
From: Dan Gohman <sunfish@mozilla.com>
Date: Tue, 5 Nov 2019 10:33:56 -0800
Subject: [PATCH 2/7] Add more tests.
---
src/targets.rs | 30 ++++++++++++++++++++++++++++--
1 file changed, 28 insertions(+), 2 deletions(-)
diff --git a/src/targets.rs b/src/targets.rs
index 90b2736..7d1f069 100644
--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs
+++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs
@@ -1174,6 +1174,7 @@ mod tests {
#[test]
fn custom_vendors() {
+ // Test various invalid cases.
assert!(Triple::from_str("x86_64--linux").is_err());
assert!(Triple::from_str("x86_64-42-linux").is_err());
assert!(Triple::from_str("x86_64-__customvendor__-linux").is_err());
@@ -1190,6 +1191,31 @@ mod tests {
assert!(Triple::from_str("x86_64-").is_err());
assert!(Triple::from_str("x86_64--").is_err());
+ // Test various Unicode things.
+ assert!(
+ Triple::from_str("x86_64-𝓬𝓾𝓼𝓽𝓸𝓶𝓿𝓮𝓷𝓭𝓸𝓻-linux").is_err(),
+ "unicode font hazard"
+ );
+ assert!(
+ Triple::from_str("x86_64-ćúśtőḿvéńdőŕ-linux").is_err(),
+ "diacritical mark stripping hazard"
+ );
+ assert!(
+ Triple::from_str("x86_64-customvendοr-linux").is_err(),
+ "homoglyph hazard"
+ );
+ assert!(Triple::from_str("x86_64-customvendor-linux").is_ok());
+ assert!(
+ Triple::from_str("x86_64-ffi-linux").is_err(),
+ "normalization hazard"
+ );
+ assert!(Triple::from_str("x86_64-ffi-linux").is_ok());
+ assert!(
+ Triple::from_str("x86_64-customvendor-linux").is_err(),
+ "zero-width character hazard"
+ );
+
+ // Test some valid cases.
let t = Triple::from_str("x86_64-customvendor-linux")
.expect("can't parse target with custom vendor");
assert_eq!(t.architecture, Architecture::X86_64);
@@ -1202,8 +1228,8 @@ mod tests {
assert_eq!(t.binary_format, BinaryFormat::Elf);
assert_eq!(t.to_string(), "x86_64-customvendor-linux");
- let t = Triple::from_str("x86_64-customvendor")
- .expect("can't parse target with custom vendor");
+ let t =
+ Triple::from_str("x86_64-customvendor").expect("can't parse target with custom vendor");
assert_eq!(t.architecture, Architecture::X86_64);
assert_eq!(
t.vendor,
From c0e318b3c1be2d1965579f07dd563fb9cc0c4eb1 Mon Sep 17 00:00:00 2001
From: Dan Gohman <sunfish@mozilla.com>
Date: Tue, 5 Nov 2019 12:56:31 -0800
Subject: [PATCH 3/7] Use `.chars().any(...)` instead of
`.find(...).is_some()`.
---
src/targets.rs | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/targets.rs b/src/targets.rs
index 7d1f069..1078dd3 100644
--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs
+++ b/third_party/rust/target-lexicon/src-0.9.0/targets.rs
@@ -779,12 +779,9 @@ impl FromStr for Vendor {
}
// Restrict the set of characters permitted in a custom vendor.
- if custom
- .find(|c: char| {
- !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.')
- })
- .is_some()
- {
+ if custom.chars().any(|c: char| {
+ !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.')
+ }) {
return Err(());
}
From f319950528654c772193d9eb3bf40bc8df35fcae Mon Sep 17 00:00:00 2001
From: Dan Gohman <sunfish@mozilla.com>
Date: Thu, 7 Nov 2019 15:15:48 -0800
Subject: [PATCH 4/7] Fix build.rs to generate the correct code to build
Vendors.
---
build.rs | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/build.rs b/build.rs
index a0ba3b7..446f9e7 100644
--- a/third_party/rust/target-lexicon-0.9.0/build.rs
+++ b/third_party/rust/target-lexicon-0.9.0/build.rs
@@ -32,6 +32,7 @@ mod parse_error {
}
}
+use self::targets::Vendor;
use self::triple::Triple;
fn main() {
@@ -60,7 +61,7 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> {
" architecture: Architecture::{:?},",
triple.architecture
)?;
- writeln!(out, " vendor: Vendor::{:?},", triple.vendor)?;
+ writeln!(out, " vendor: {},", vendor_display(&triple.vendor))?;
writeln!(
out,
" operating_system: OperatingSystem::{:?},",
@@ -90,7 +91,7 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> {
writeln!(out, "impl Vendor {{")?;
writeln!(out, " /// Return the vendor for the current host.")?;
writeln!(out, " pub const fn host() -> Self {{")?;
- writeln!(out, " Vendor::{:?}", triple.vendor)?;
+ writeln!(out, " {}", vendor_display(&triple.vendor))?;
writeln!(out, " }}")?;
writeln!(out, "}}")?;
writeln!(out)?;
@@ -160,3 +161,12 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> {
Ok(())
}
+
+fn vendor_display(vendor: &Vendor) -> String {
+ match vendor {
+ Vendor::Custom(custom) => {
+ format!("Vendor::Custom(Box::new(String::from_str({:?})))", custom)
+ }
+ known => format!("Vendor::{:?}", known),
+ }
+}
From e558f6934535be3b8ccc9a99a33e861cb7431dfe Mon Sep 17 00:00:00 2001
From: Dan Gohman <sunfish@mozilla.com>
Date: Fri, 8 Nov 2019 12:10:34 -0800
Subject: [PATCH 5/7] Fix custom vendors in `const fn` contexts.
---
build.rs | 15 +++++++++++----
src/lib.rs | 4 ++--
src/targets.rs | 51 ++++++++++++++++++++++++++++++++++++++++++--------
3 files changed, 56 insertions(+), 14 deletions(-)
diff --git a/build.rs b/build.rs
index 446f9e7..e88206e 100644
--- a/third_party/rust/target-lexicon-0.9.0/build.rs
+++ b/third_party/rust/target-lexicon-0.9.0/build.rs
@@ -53,6 +53,8 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> {
writeln!(out, "use crate::Aarch64Architecture::*;")?;
writeln!(out, "#[allow(unused_imports)]")?;
writeln!(out, "use crate::ArmArchitecture::*;")?;
+ writeln!(out, "#[allow(unused_imports)]")?;
+ writeln!(out, "use crate::CustomVendor;")?;
writeln!(out)?;
writeln!(out, "/// The `Triple` of the current host.")?;
writeln!(out, "pub const HOST: Triple = Triple {{")?;
@@ -139,7 +141,11 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> {
" architecture: Architecture::{:?},",
triple.architecture
)?;
- writeln!(out, " vendor: Vendor::{:?},", triple.vendor)?;
+ writeln!(
+ out,
+ " vendor: {},",
+ vendor_display(&triple.vendor)
+ )?;
writeln!(
out,
" operating_system: OperatingSystem::{:?},",
@@ -164,9 +170,10 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> {
fn vendor_display(vendor: &Vendor) -> String {
match vendor {
- Vendor::Custom(custom) => {
- format!("Vendor::Custom(Box::new(String::from_str({:?})))", custom)
- }
+ Vendor::Custom(custom) => format!(
+ "Vendor::Custom(CustomVendor::Static({:?}))",
+ custom.as_str()
+ ),
known => format!("Vendor::{:?}", known),
}
}
diff --git a/src/lib.rs b/src/lib.rs
index 8d6da8d..70f6488 100644
--- a/third_party/rust/target-lexicon-0.9.0/src/lib.rs
+++ b/third_party/rust/target-lexicon-0.9.0/src/lib.rs
@@ -28,7 +28,7 @@ mod triple;
pub use self::host::HOST;
pub use self::parse_error::ParseError;
pub use self::targets::{
- Aarch64Architecture, Architecture, ArmArchitecture, BinaryFormat, Environment, OperatingSystem,
- Vendor,
+ Aarch64Architecture, Architecture, ArmArchitecture, BinaryFormat, CustomVendor, Environment,
+ OperatingSystem, Vendor,
};
pub use self::triple::{CallingConvention, Endianness, PointerWidth, Triple};
diff --git a/src/targets.rs b/src/targets.rs
index 1078dd3..7152020 100644
--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs
+++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs
@@ -4,6 +4,7 @@ use crate::triple::{Endianness, PointerWidth, Triple};
use alloc::boxed::Box;
use alloc::string::String;
use core::fmt;
+use core::hash::{Hash, Hasher};
use core::str::FromStr;
/// The "architecture" field, which in some cases also specifies a specific
@@ -292,6 +293,39 @@ impl Aarch64Architecture {
}
}
+/// A string for a `Vendor::Custom` that can either be used in `const`
+/// contexts or hold dynamic strings.
+#[derive(Clone, Debug, Eq)]
+pub enum CustomVendor {
+ /// An owned `String`. This supports the general case.
+ Owned(Box<String>),
+ /// A static `str`, so that `CustomVendor` can be constructed in `const`
+ /// contexts.
+ Static(&'static str),
+}
+
+impl CustomVendor {
+ /// Extracts a string slice.
+ pub fn as_str(&self) -> &str {
+ match self {
+ CustomVendor::Owned(s) => s,
+ CustomVendor::Static(s) => s,
+ }
+ }
+}
+
+impl PartialEq for CustomVendor {
+ fn eq(&self, other: &Self) -> bool {
+ self.as_str() == other.as_str()
+ }
+}
+
+impl Hash for CustomVendor {
+ fn hash<H: Hasher>(&self, state: &mut H) {
+ self.as_str().hash(state)
+ }
+}
+
/// The "vendor" field, which in practice is little more than an arbitrary
/// modifier.
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
@@ -316,7 +350,7 @@ pub enum Vendor {
///
/// Outside of such patched environments, users of `target-lexicon` should
/// treat `Custom` the same as `Unknown` and ignore the string.
- Custom(Box<String>),
+ Custom(CustomVendor),
}
/// The "operating system" field, which sometimes implies an environment, and
@@ -728,7 +762,7 @@ impl fmt::Display for Vendor {
Vendor::Sun => "sun",
Vendor::Uwp => "uwp",
Vendor::Wrs => "wrs",
- Vendor::Custom(ref name) => name,
+ Vendor::Custom(ref name) => name.as_str(),
};
f.write_str(s)
}
@@ -779,13 +813,14 @@ impl FromStr for Vendor {
}
// Restrict the set of characters permitted in a custom vendor.
- if custom.chars().any(|c: char| {
+ fn is_prohibited_char(c: char) -> bool {
!(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.')
- }) {
+ }
+ if custom.chars().any(is_prohibited_char) {
return Err(());
}
- Vendor::Custom(Box::new(custom.to_owned()))
+ Vendor::Custom(CustomVendor::Owned(Box::new(custom.to_owned())))
}
})
}
@@ -1218,7 +1253,7 @@ mod tests {
assert_eq!(t.architecture, Architecture::X86_64);
assert_eq!(
t.vendor,
- Vendor::Custom(Box::new(String::from_str("customvendor").unwrap()))
+ Vendor::Custom(CustomVendor::Static("customvendor"))
);
assert_eq!(t.operating_system, OperatingSystem::Linux);
assert_eq!(t.environment, Environment::Unknown);
@@ -1230,7 +1265,7 @@ mod tests {
assert_eq!(t.architecture, Architecture::X86_64);
assert_eq!(
t.vendor,
- Vendor::Custom(Box::new(String::from_str("customvendor").unwrap()))
+ Vendor::Custom(CustomVendor::Static("customvendor"))
);
assert_eq!(t.operating_system, OperatingSystem::Unknown);
assert_eq!(t.environment, Environment::Unknown);
@@ -1240,7 +1275,7 @@ mod tests {
Triple::from_str("unknown-foo"),
Ok(Triple {
architecture: Architecture::Unknown,
- vendor: Vendor::Custom(Box::new(String::from_str("foo").unwrap())),
+ vendor: Vendor::Custom(CustomVendor::Static("foo")),
operating_system: OperatingSystem::Unknown,
environment: Environment::Unknown,
binary_format: BinaryFormat::Unknown,
From bc4b444133b8a5e56602f7c77c10ef3f1e7a7c78 Mon Sep 17 00:00:00 2001
From: Dan Gohman <sunfish@mozilla.com>
Date: Mon, 18 Nov 2019 13:45:58 -0800
Subject: [PATCH 6/7] Add a testcase with a BOM too, just in case.
---
src/targets.rs | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/targets.rs b/src/targets.rs
index 7152020..9a4d990 100644
--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs
+++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs
@@ -1246,6 +1246,10 @@ mod tests {
Triple::from_str("x86_64-customvendor-linux").is_err(),
"zero-width character hazard"
);
+ assert!(
+ Triple::from_str("x86_64-customvendor-linux").is_err(),
+ "BOM hazard"
+ );
// Test some valid cases.
let t = Triple::from_str("x86_64-customvendor-linux")
From 721fbbe1c9cfd3adc9aaf011c62d6a36078f4133 Mon Sep 17 00:00:00 2001
From: Dan Gohman <sunfish@mozilla.com>
Date: Mon, 18 Nov 2019 20:56:40 -0800
Subject: [PATCH 7/7] Use an anonymous function instead of just a local
function.
---
src/targets.rs | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/targets.rs b/src/targets.rs
index 9a4d990..eb5a088 100644
--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs
+++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs
@@ -813,10 +813,9 @@ impl FromStr for Vendor {
}
// Restrict the set of characters permitted in a custom vendor.
- fn is_prohibited_char(c: char) -> bool {
+ if custom.chars().any(|c: char| {
!(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.')
- }
- if custom.chars().any(is_prohibited_char) {
+ }) {
return Err(());
}

View file

@ -0,0 +1,15 @@
Author: Rasmus Thomsen <oss@cogitri.dev>
Reason: FF is mixing userspace net headers (net/if.h) and kernelspace ones
(linux/if.h), leading to redefinitions. We need to include net/if.h before
linux/if.h because linux/if.h has redifinition guards whereas net/if.h doesnt
Upstream: No
--- a/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c.orig 2020-07-28 19:24:32.359751046 +0200
+++ b/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c 2020-07-28 19:24:37.856343751 +0200
@@ -31,6 +31,7 @@
*/
#if defined(LINUX)
+#include <net/if.h>
#include "addrs-netlink.h"
#include <csi_platform.h>
#include <assert.h>

View file

@ -0,0 +1,18 @@
diff --git a/mozglue/misc/StackWalk.cpp b/mozglue/misc/StackWalk.cpp
index 7d62921..adcfa44 100644
--- a/mozglue/misc/StackWalk.cpp
+++ b/mozglue/misc/StackWalk.cpp
@@ -33,13 +33,7 @@ using namespace mozilla;
# 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

View file

@ -0,0 +1,18 @@
see https://gitlab.alpinelinux.org/alpine/aports/-/issues/13235
--- a/taskcluster/docker/firefox-flatpak/org.mozilla.firefox.appdata.xml.in
+++ b/taskcluster/docker/firefox-flatpak/org.mozilla.firefox.appdata.xml.in
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<application>
- <id type="desktop">org.mozilla.firefox</id>
+ <id type="desktop">org.mozilla.firefox-esr</id>
- <launchable type="desktop-id">org.mozilla.firefox.desktop</launchable>
+ <launchable type="desktop-id">firefox-esr.desktop</launchable>
- <name>Firefox</name>
+ <name>Firefox ESR</name>
<developer_name>Mozilla</developer_name>
- <summary>Fast, Private &amp; Safe Web Browser</summary>
+ <summary>Mozilla Firefox Web Browser Extended Support Release</summary>
<metadata_license>CC0-1.0</metadata_license>
<project_license>MPL-2.0</project_license>
<description>

View file

@ -0,0 +1,18 @@
#!/bin/sh
ver_old=$2
if [ "$(apk version -t "$ver_old" '102.2.0-r4')" = '<' ]; then
# renamed appid, needs profile migration
cat 1>&2 <<-EOF
*
* firefox-esr now has a different appid, so you will see a default new
* profile upon starting it. to use your old profile again, you have to
* first migrate it using 'firefox-esr --ProfileManager'. select the
* previous one (if you didn't rename it, it's probably named
* default-something) to migrate it.
*
EOF
fi
exit 0

View file

@ -0,0 +1,340 @@
[Desktop Entry]
Version=1.0
Name=Firefox ESR
GenericName=Web Browser
GenericName[ar]=متصفح ويب
GenericName[ast]=Restolador Web
GenericName[bn]=
GenericName[ca]=Navegador web
GenericName[cs]=Webový prohlížeč
GenericName[da]=Webbrowser
GenericName[de]=Webbrowser
GenericName[el]=Περιηγητής διαδικτύου
GenericName[es]=Navegador web
GenericName[et]=Veebibrauser
GenericName[fa]=مرورگر اینترنتی
GenericName[fi]=WWW-selain
GenericName[fr]=Navigateur Web
GenericName[gl]=Navegador Web
GenericName[he]=דפדפן אינטרנט
GenericName[hr]=Web preglednik
GenericName[hu]=Webböngésző
GenericName[it]=Browser web
GenericName[ja]=
GenericName[ko]=
GenericName[ku]=Geroka torê
GenericName[lt]=Interneto naršyklė
GenericName[nb]=Nettleser
GenericName[nl]=Webbrowser
GenericName[nn]=Nettlesar
GenericName[no]=Nettleser
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador Web
GenericName[ro]=Navigator Internet
GenericName[ru]=Веб-браузер
GenericName[sk]=Internetový prehliadač
GenericName[sl]=Spletni brskalnik
GenericName[sv]=Webbläsare
GenericName[tr]=Web Tarayıcı
GenericName[ug]=توركۆرگۈ
GenericName[uk]=Веб-браузер
GenericName[vi]=Trình duyt Web
GenericName[zh_CN]=
GenericName[zh_TW]=
Comment=Browse the World Wide Web
Comment[ar]=تصفح الشبكة العنكبوتية العالمية
Comment[ast]=Restola pela Rede
Comment[bn]=
Comment[ca]=Navegueu per el web
Comment[cs]=Prohlížení stránek World Wide Webu
Comment[da]=Surf på internettet
Comment[de]=Im Internet surfen
Comment[el]=Μπορείτε να περιηγηθείτε στο διαδίκτυο (Web)
Comment[es]=Navegue por la web
Comment[et]=Lehitse veebi
Comment[fa]=صفحات شبکه جهانی اینترنت را مرور نمایید
Comment[fi]=Selaa Internetin WWW-sivuja
Comment[fr]=Naviguer sur le Web
Comment[gl]=Navegar pola rede
Comment[he]=גלישה ברחבי האינטרנט
Comment[hr]=Pretražite web
Comment[hu]=A világháló böngészése
Comment[it]=Esplora il web
Comment[ja]=
Comment[ko]=
Comment[ku]=Li torê bigere
Comment[lt]=Naršykite internete
Comment[nb]=Surf på nettet
Comment[nl]=Verken het internet
Comment[nn]=Surf på nettet
Comment[no]=Surf på nettet
Comment[pl]=Przeglądanie stron WWW
Comment[pt]=Navegue na Internet
Comment[pt_BR]=Navegue na Internet
Comment[ro]=Navigați pe Internet
Comment[ru]=Доступ в Интернет
Comment[sk]=Prehliadanie internetu
Comment[sl]=Brskajte po spletu
Comment[sv]=Surfa på webben
Comment[tr]=İnternet'te Gezinin
Comment[ug]=دۇنيادىكى توربەتلەرنى كۆرگىلى بولىدۇ
Comment[uk]=Перегляд сторінок Інтернету
Comment[vi]=Đ duyt các trang web
Comment[zh_CN]=
Comment[zh_TW]=
Keywords=Internet;WWW;Browser;Web;Explorer
Keywords[ar]=انترنت;إنترنت;متصفح;ويب;وب
Keywords[ast]=Internet;WWW;Restolador;Web;Esplorador
Keywords[ca]=Internet;WWW;Navegador;Web;Explorador;Explorer
Keywords[cs]=Internet;WWW;Prohlížeč;Web;Explorer
Keywords[da]=Internet;Internettet;WWW;Browser;Browse;Web;Surf;Nettet
Keywords[de]=Internet;WWW;Browser;Web;Explorer;Webseite;Site;surfen;online;browsen
Keywords[el]=Internet;WWW;Browser;Web;Explorer;Διαδίκτυο;Περιηγητής;Firefox;Φιρεφοχ;Ιντερνετ
Keywords[es]=Explorador;Internet;WWW
Keywords[fi]=Internet;WWW;Browser;Web;Explorer;selain;Internet-selain;internetselain;verkkoselain;netti;surffaa
Keywords[fr]=Internet;WWW;Browser;Web;Explorer;Fureteur;Surfer;Navigateur
Keywords[he]=דפדפן;אינטרנט;רשת;אתרים;אתר;פיירפוקס;מוזילה;
Keywords[hr]=Internet;WWW;preglednik;Web
Keywords[hu]=Internet;WWW;Böngésző;Web;Háló;Net;Explorer
Keywords[it]=Internet;WWW;Browser;Web;Navigatore
Keywords[is]=Internet;WWW;Vafri;Vefur;Netvafri;Flakk
Keywords[ja]=Internet;WWW;Web;;;;
Keywords[nb]=Internett;WWW;Nettleser;Explorer;Web;Browser;Nettside
Keywords[nl]=Internet;WWW;Browser;Web;Explorer;Verkenner;Website;Surfen;Online
Keywords[pt]=Internet;WWW;Browser;Web;Explorador;Navegador
Keywords[pt_BR]=Internet;WWW;Browser;Web;Explorador;Navegador
Keywords[ru]=Internet;WWW;Browser;Web;Explorer;интернет;браузер;веб;файрфокс;огнелис
Keywords[sk]=Internet;WWW;Prehliadač;Web;Explorer
Keywords[sl]=Internet;WWW;Browser;Web;Explorer;Brskalnik;Splet
Keywords[tr]=İnternet;WWW;Tarayıcı;Web;Gezgin;Web sitesi;Site;sörf;çevrimiçi;tara
Keywords[uk]=Internet;WWW;Browser;Web;Explorer;Інтернет;мережа;переглядач;оглядач;браузер;веб;файрфокс;вогнелис;перегляд
Keywords[vi]=Internet;WWW;Browser;Web;Explorer;Trình duyt;Trang web
Keywords[zh_CN]=Internet;WWW;Browser;Web;Explorer;;;;;Firefox;ff;;;
Keywords[zh_TW]=Internet;WWW;Browser;Web;Explorer;;;;;;
Exec=firefox-esr %u
Icon=firefox-esr
Terminal=false
X-MultipleArgs=false
Type=Application
MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;application/x-xpinstall;application/pdf;application/json;
StartupNotify=true
StartupWMClass=firefox-esr
Categories=Network;WebBrowser;
Actions=new-window;new-private-window;
[Desktop Action new-window]
Name=New Window
Name[ach]=Dirica manyen
Name[af]=Nuwe venster
Name[an]=Nueva finestra
Name[ar]=نافذة جديدة
Name[as]=
Name[ast]=Ventana nueva
Name[az]=Yeni Pəncərə
Name[be]=Новае акно
Name[bg]=Нов прозорец
Name[bn_BD]= (N)
Name[bn_IN]=
Name[br]=Prenestr nevez
Name[brx]= '(N)
Name[bs]=Novi prozor
Name[ca]=Finestra nova
Name[cak]=K'ak'a' tzuwäch
Name[cs]=Nové okno
Name[cy]=Ffenestr Newydd
Name[da]=Nyt vindue
Name[de]=Neues Fenster
Name[dsb]=Nowe wokno
Name[el]=Νέο παράθυρο
Name[en_GB]=New Window
Name[en_US]=New Window
Name[en_ZA]=New Window
Name[eo]=Nova fenestro
Name[es_AR]=Nueva ventana
Name[es_CL]=Nueva ventana
Name[es_ES]=Nueva ventana
Name[es_MX]=Nueva ventana
Name[et]=Uus aken
Name[eu]=Leiho berria
Name[fa]=پنجره جدید
Name[ff]=Henorde Hesere
Name[fi]=Uusi ikkuna
Name[fr]=Nouvelle fenêtre
Name[fy_NL]=Nij finster
Name[ga_IE]=Fuinneog Nua
Name[gd]=Uinneag ùr
Name[gl]=Nova xanela
Name[gn]=Ovetã pyahu
Name[gu_IN]= િ
Name[he]=חלון חדש
Name[hi_IN]= ि
Name[hr]=Novi prozor
Name[hsb]=Nowe wokno
Name[hu]=Új ablak
Name[hy_AM]=Նոր Պատուհան
Name[id]=Jendela Baru
Name[is]=Nýr gluggi
Name[it]=Nuova finestra
Name[ja]=
Name[ja_JP-mac]=
Name[ka]=
Name[kk]=Жаңа терезе
Name[km]=
Name[kn]= ಿಿ
Name[ko]=
Name[kok]=
Name[ks]=نئئ وِنڈو
Name[lij]=Neuvo barcon
Name[lo]=
Name[lt]=Naujas langas
Name[ltg]=Jauns lūgs
Name[lv]=Jauns logs
Name[mai]= ि
Name[mk]=Нов прозорец
Name[ml]=ി
Name[mr]=
Name[ms]=Tetingkap Baru
Name[my]=
Name[nb_NO]=Nytt vindu
Name[ne_NP]=
Name[nl]=Nieuw venster
Name[nn_NO]=Nytt vindauge
Name[or]= ି
Name[pa_IN]= ਿ
Name[pl]=Nowe okno
Name[pt_BR]=Nova janela
Name[pt_PT]=Nova janela
Name[rm]=Nova fanestra
Name[ro]=Fereastră nouă
Name[ru]=Новое окно
Name[sat]= ि (N)
Name[si]=
Name[sk]=Nové okno
Name[sl]=Novo okno
Name[son]=Zanfun taaga
Name[sq]=Dritare e Re
Name[sr]=Нови прозор
Name[sv_SE]=Nytt fönster
Name[ta]=ி
Name[te]= ి
Name[th]=
Name[tr]=Yeni pencere
Name[tsz]=Eraatarakua jimpani
Name[uk]=Нове вікно
Name[ur]=نیا دریچہ
Name[uz]=Yangi oyna
Name[vi]=Ca s mi
Name[wo]=Palanteer bu bees
Name[xh]=Ifestile entsha
Name[zh_CN]=
Name[zh_TW]=
Exec=firefox-esr --new-window %u
[Desktop Action new-private-window]
Name=New Private Window
Name[ach]=Dirica manyen me mung
Name[af]=Nuwe privaatvenster
Name[an]=Nueva finestra privada
Name[ar]=نافذة خاصة جديدة
Name[as]= ি
Name[ast]=Ventana privada nueva
Name[az]=Yeni Məxfi Pəncərə
Name[be]=Новае акно адасаблення
Name[bg]=Нов прозорец за поверително сърфиране
Name[bn_BD]= ি
Name[bn_IN]= ি
Name[br]=Prenestr merdeiñ prevez nevez
Name[brx]= '
Name[bs]=Novi privatni prozor
Name[ca]=Finestra privada nova
Name[cak]=K'ak'a' ichinan tzuwäch
Name[cs]=Nové anonymní okno
Name[cy]=Ffenestr Breifat Newydd
Name[da]=Nyt privat vindue
Name[de]=Neues privates Fenster
Name[dsb]=Nowe priwatne wokno
Name[el]=Νέο παράθυρο ιδιωτικής περιήγησης
Name[en_GB]=New Private Window
Name[en_US]=New Private Window
Name[en_ZA]=New Private Window
Name[eo]=Nova privata fenestro
Name[es_AR]=Nueva ventana privada
Name[es_CL]=Nueva ventana privada
Name[es_ES]=Nueva ventana privada
Name[es_MX]=Nueva ventana privada
Name[et]=Uus privaatne aken
Name[eu]=Leiho pribatu berria
Name[fa]=پنجره ناشناس جدید
Name[ff]=Henorde Suturo Hesere
Name[fi]=Uusi yksityinen ikkuna
Name[fr]=Nouvelle fenêtre de navigation privée
Name[fy_NL]=Nij priveefinster
Name[ga_IE]=Fuinneog Nua Phríobháideach
Name[gd]=Uinneag phrìobhaideach ùr
Name[gl]=Nova xanela privada
Name[gn]=Ovetã ñemi pyahu
Name[gu_IN]= િ
Name[he]=חלון פרטי חדש
Name[hi_IN]= ि ि
Name[hr]=Novi privatni prozor
Name[hsb]=Nowe priwatne wokno
Name[hu]=Új privát ablak
Name[hy_AM]=Սկսել Գաղտնի դիտարկում
Name[id]=Jendela Mode Pribadi Baru
Name[is]=Nýr huliðsgluggi
Name[it]=Nuova finestra anonima
Name[ja]=
Name[ja_JP-mac]=
Name[ka]=
Name[kk]=Жаңа жекелік терезе
Name[km]=
Name[kn]= ಿ ಿಿ
Name[ko]=
Name[kok]= ि
Name[ks]=نْو پرایوٹ وینڈو
Name[lij]=Nêuvo barcón privòu
Name[lo]=
Name[lt]=Naujas privataus naršymo langas
Name[ltg]=Jauns privatais lūgs
Name[lv]=Jauns privātais logs
Name[mai]= ि ि (W)
Name[mk]=Нов приватен прозорец
Name[ml]=ി
Name[mr]= ि
Name[ms]=Tetingkap Persendirian Baharu
Name[my]=New Private Window
Name[nb_NO]=Nytt privat vindu
Name[ne_NP]= ि
Name[nl]=Nieuw privévenster
Name[nn_NO]=Nytt privat vindauge
Name[or]= ି ି
Name[pa_IN]= ਿ
Name[pl]=Nowe okno prywatne
Name[pt_BR]=Nova janela privativa
Name[pt_PT]=Nova janela privada
Name[rm]=Nova fanestra privata
Name[ro]=Fereastră privată nouă
Name[ru]=Новое приватное окно
Name[sat]= ि ि (W )
Name[si]= (W)
Name[sk]=Nové okno v režime Súkromné prehliadanie
Name[sl]=Novo zasebno okno
Name[son]=Sutura zanfun taaga
Name[sq]=Dritare e Re Private
Name[sr]=Нови приватан прозор
Name[sv_SE]=Nytt privat fönster
Name[ta]=ி ி
Name[te]= ి ి
Name[th]=
Name[tr]=Yeni gizli pencere
Name[tsz]=Juchiiti eraatarakua jimpani
Name[uk]=Приватне вікно
Name[ur]=نیا نجی دریچہ
Name[uz]=Yangi maxfiy oyna
Name[vi]=Ca s riêng tư mi
Name[wo]=Panlanteeru biir bu bees
Name[xh]=Ifestile yangasese entsha
Name[zh_CN]=
Name[zh_TW]=
Exec=firefox-esr --private-window %u

View file

@ -0,0 +1,13 @@
The wrapper features.h gets pulled in by system headers causing thigns to
break. We work around it by simply not wrap features.h
--- ./config/system-headers.mozbuild.orig
+++ ./config/system-headers.mozbuild
@@ -229,7 +229,6 @@
'execinfo.h',
'extras.h',
'fcntl.h',
- 'features.h',
'fenv.h',
'ffi.h',
'fibdef.h',

View file

@ -0,0 +1,13 @@
diff --git a/media/libaom/moz.build b/media/libaom/moz.build
index fd8c7f2..db3f9ca 100644
--- a/media/libaom/moz.build
+++ b/media/libaom/moz.build
@@ -55,7 +55,7 @@ elif CONFIG['CPU_ARCH'] == 'arm':
for f in SOURCES:
if f.endswith('neon.c'):
- SOURCES[f].flags += CONFIG['VPX_ASFLAGS']
+ SOURCES[f].flags += CONFIG['NEON_FLAGS']
if CONFIG['OS_TARGET'] == 'Android':
# For cpu-features.h

View file

@ -0,0 +1,31 @@
Allow us to just set RUST_TARGEt ourselves instead of hacking around in mozilla's
weird custom build system...
--- a/build/moz.configure/rust.configure
+++ b/build/moz.configure/rust.configure
@@ -225,7 +225,9 @@
data.setdefault(key, []).append(namespace(rust_target=t, target=info))
return data
-
+@imports('os')
+@imports(_from='mozbuild.util', _import='ensure_unicode')
+@imports(_from='mozbuild.util', _import='system_encoding')
def detect_rustc_target(
host_or_target, compiler_info, arm_target, rust_supported_targets
):
@@ -340,13 +342,13 @@
return None
- rustc_target = find_candidate(candidates)
+ rustc_target = os.environ['RUST_TARGET']
if rustc_target is None:
die("Don't know how to translate {} for rustc".format(host_or_target.alias))
- return rustc_target
+ return ensure_unicode(rustc_target, system_encoding)
@imports('os')

View file

@ -0,0 +1,20 @@
--- a/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
+++ b/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
@@ -18,7 +18,7 @@
#define WEBRTC_GLIBC_PREREQ(a, b) 0
#endif
-#if WEBRTC_GLIBC_PREREQ(2, 16)
+#if !__GLIBC__ || WEBRTC_GLIBC_PREREQ(2, 16)
#include <sys/auxv.h>
#else
#include <errno.h>
@@ -40,7 +40,7 @@
int architecture = 0;
uint64_t hwcap = 0;
const char* platform = NULL;
-#if WEBRTC_GLIBC_PREREQ(2, 16)
+#if !__GLIBC__ || WEBRTC_GLIBC_PREREQ(2, 16)
hwcap = getauxval(AT_HWCAP);
platform = (const char*)getauxval(AT_PLATFORM);
#else

View file

@ -0,0 +1,20 @@
diff --git a/xpcom/base/nsMemoryReporterManager.cpp b/xpcom/base/nsMemoryReporterManager.cpp
index 865e1b5430..9a00dafecb 100644
--- a/xpcom/base/nsMemoryReporterManager.cpp
+++ b/xpcom/base/nsMemoryReporterManager.cpp
@@ -124,6 +124,7 @@ static MOZ_MUST_USE nsresult ResidentUniqueDistinguishedAmount(int64_t* aN) {
return GetProcSelfSmapsPrivate(aN);
}
+#ifdef __GLIBC__
# ifdef HAVE_MALLINFO
# define HAVE_SYSTEM_HEAP_REPORTER 1
static MOZ_MUST_USE nsresult SystemHeapSize(int64_t* aSizeOut) {
@@ -143,6 +144,7 @@ static MOZ_MUST_USE nsresult SystemHeapSize(int64_t* aSizeOut) {
return NS_OK;
}
# endif
+#endif
#elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
defined(__OpenBSD__) || defined(__FreeBSD_kernel__)

View file

@ -0,0 +1 @@
NjhhZGJjMDEtMDM3OC00Zjc0LTk0N2UtMzBiYzA5NjlhMDc3Cg==

View file

@ -0,0 +1,9 @@
--- a/python/sites/mach.txt
+++ b/python/sites/mach.txt
@@ -134,4 +134,4 @@
# We aren't (yet) able to pin packages in automation, so we have to
# support down to the oldest locally-installed version (5.4.2).
-pypi-optional:psutil>=5.4.2,<=5.8.0:telemetry will be missing some data
+pypi-optional:psutil>=5.4.2,<=5.10.0:telemetry will be missing some data
-pypi-optional:zstandard>=0.11.1,<=0.17.0:zstd archives will not be possible to extract
+pypi-optional:zstandard>=0.11.1,<=0.18.0:zstd archives will not be possible to extract

View file

@ -0,0 +1,15 @@
make SYS_fork non-fatal, musl uses it for fork(2)
--- a/security/sandbox/linux/SandboxFilter.cpp
+++ b/security/sandbox/linux/SandboxFilter.cpp
@@ -1253,6 +1253,10 @@
// usually do something reasonable on error.
case __NR_clone:
return ClonePolicy(Error(EPERM));
+#ifdef __NR_fork
+ case __NR_fork:
+ return Error(ENOSYS);
+#endif
# ifdef __NR_fadvise64
case __NR_fadvise64:

View file

@ -0,0 +1,17 @@
--- a/security/sandbox/linux/SandboxFilter.cpp 2020-11-23 22:41:14.556378950 +0100
+++ b/security/sandbox/linux/SandboxFilter.cpp 2020-11-23 22:40:23.595806444 +0100
@@ -68,7 +68,13 @@
// The headers define O_LARGEFILE as 0 on x86_64, but we need the
// actual value because it shows up in file flags.
-#define O_LARGEFILE_REAL 00100000
+#if defined(__x86_64__) || defined(__i386__) || defined(__mips__)
+#define O_LARGEFILE_REAL 0100000
+#elif defined(__powerpc__)
+#define O_LARGEFILE_REAL 0200000
+#else
+#define O_LARGEFILE_REAL O_LARGEFILE
+#endif
// Not part of UAPI, but userspace sees it in F_GETFL; see bug 1650751.
#define FMODE_NONOTIFY 0x4000000

View file

@ -0,0 +1,16 @@
upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1657849
--- a/security/sandbox/linux/SandboxFilter.cpp
+++ b/security/sandbox/linux/SandboxFilter.cpp
@@ -1694,10 +1694,10 @@
return Allow();
case __NR_sched_get_priority_min:
case __NR_sched_get_priority_max:
+ case __NR_sched_setscheduler:
return Allow();
case __NR_sched_getparam:
- case __NR_sched_getscheduler:
- case __NR_sched_setscheduler: {
+ case __NR_sched_getscheduler: {
Arg<pid_t> pid(0);
return If(pid == 0, Allow()).Else(Trap(SchedTrap, nullptr));
}

71
user/firefox-esr/stab.h Normal file
View file

@ -0,0 +1,71 @@
/* $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_ */

View file

@ -0,0 +1,12 @@
// Use LANG environment variable to choose locale
pref("intl.locale.requested", "");
// Use system-provided dictionaries
pref("spellchecker.dictionary_path", "/usr/share/hunspell");
// Disable default browser checking.
pref("browser.shell.checkDefaultBrowser", false);
// Don't disable our bundled extensions in the application directory
pref("extensions.autoDisableScopes", 11);
pref("extensions.shownSelectionUI", true);

View file

@ -0,0 +1,8 @@
--- a/python/sites/mach.txt
+++ b/python/sites/mach.txt
@@ -134,4 +134,4 @@
# We aren't (yet) able to pin packages in automation, so we have to
# support down to the oldest locally-installed version (5.4.2).
pypi-optional:psutil>=5.4.2,<=5.10.0:telemetry will be missing some data
-pypi-optional:zstandard>=0.11.1,<=0.18.0:zstd archives will not be possible to extract
+pypi-optional:zstandard>=0.11.1:zstd archives will not be possible to extract