diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2022-11-19 02:10:20 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2022-11-21 02:08:32 -0600 |
commit | dfe2d88752285a8da3bb1501caf9e804c5294150 (patch) | |
tree | c900c6d56f496734ccd7f586caa0bc6cbea61030 | |
parent | f79ddfd3022bb02ebe179c931df2d1f481164884 (diff) | |
download | packages-dfe2d88752285a8da3bb1501caf9e804c5294150.tar.gz packages-dfe2d88752285a8da3bb1501caf9e804c5294150.tar.bz2 packages-dfe2d88752285a8da3bb1501caf9e804c5294150.tar.xz packages-dfe2d88752285a8da3bb1501caf9e804c5294150.zip |
user/firefox-esr: Update to 91.13.0
It still works on ppc64! Even with VP8/VP9 video!
-rw-r--r-- | user/firefox-esr/APKBUILD | 155 | ||||
-rw-r--r-- | user/firefox-esr/disable-gecko-profiler.patch | 14 | ||||
-rw-r--r-- | user/firefox-esr/fix-bug-1261392.patch | 25 | ||||
-rw-r--r-- | user/firefox-esr/gcc89074.patch | 24 | ||||
-rw-r--r-- | user/firefox-esr/jpeg-link.patch | 30 | ||||
-rw-r--r-- | user/firefox-esr/mozconfig | 3 | ||||
-rw-r--r-- | user/firefox-esr/newer-cbindgen.patch | 17 | ||||
-rw-r--r-- | user/firefox-esr/rust-32bit.patch | 50 | ||||
-rw-r--r-- | user/firefox-esr/seccomp-musl.patch | 49 | ||||
-rw-r--r-- | user/firefox-esr/seccomp-time64.patch | 112 | ||||
-rw-r--r-- | user/firefox-esr/skia-sucks1.patch | 84 | ||||
-rw-r--r-- | user/firefox-esr/skia-sucks2.patch | 44 | ||||
-rw-r--r-- | user/firefox-esr/skia-unified.patch (renamed from user/firefox-esr/skia-sucks3.patch) | 39 | ||||
-rw-r--r-- | user/firefox-esr/webrender.patch | 54 | ||||
-rw-r--r-- | user/firefox-esr/webrtc-broken.patch | 30 |
15 files changed, 205 insertions, 525 deletions
diff --git a/user/firefox-esr/APKBUILD b/user/firefox-esr/APKBUILD index 2796e3e36..41b1166b9 100644 --- a/user/firefox-esr/APKBUILD +++ b/user/firefox-esr/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Molly Miller <adelie@m-squa.red> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=firefox-esr -pkgver=68.10.0 +pkgver=91.13.0 pkgrel=0 pkgdesc="Firefox web browser (extended support release)" url="https://www.mozilla.org/firefox/" @@ -14,8 +14,8 @@ depends="" # system-libs # actual deps makedepends=" - autoconf2.13 cargo cbindgen clang llvm8-dev node ncurses-dev - perl rust rust-std cmd:which + autoconf2.13 cargo cbindgen clang llvm14-dev node ncurses-dev + perl python3 rust rust-std cmd:which ncurses-dev openssl-dev @@ -27,28 +27,23 @@ makedepends=" libxrender-dev libxt-dev nasm nss-static sqlite-dev startup-notification-dev unzip yasm zip gtk+2.0-dev " -_py2ver="2.7.16" _ffxver="$pkgver"'esr' source="https://ftp.mozilla.org/pub/firefox/releases/$_ffxver/source/firefox-$_ffxver.source.tar.xz - https://www.python.org/ftp/python/$_py2ver/Python-$_py2ver.tar.xz mozconfig bad-google-code.patch - disable-gecko-profiler.patch fix-mutex-build.patch fix-seccomp-bpf.patch + gcc89074.patch jpeg-link.patch mozilla-build-arm.patch + newer-cbindgen.patch ppc32-fix.patch rust-32bit.patch - seccomp-musl.patch - seccomp-time64.patch shut-up-warning.patch - skia-sucks1.patch - skia-sucks2.patch - skia-sucks3.patch + skia-unified.patch stackwalk-x86-ppc.patch - webrtc-broken.patch + webrender.patch firefox.desktop firefox-safe.desktop @@ -60,110 +55,6 @@ ldpath="$_mozappdir" # secfixes: firefox-esr # 68.0.2-r0: # - CVE-2019-11733 -# 68.1.0-r0: -# - CVE-2019-9812 -# - CVE-2019-11735 -# - CVE-2019-11736 -# - CVE-2019-11738 -# - CVE-2019-11740 -# - CVE-2019-11742 -# - CVE-2019-11743 -# - CVE-2019-11744 -# - CVE-2019-11746 -# - CVE-2019-11747 -# - CVE-2019-11748 -# - CVE-2019-11749 -# - CVE-2019-11750 -# - CVE-2019-11751 -# - CVE-2019-11752 -# - CVE-2019-11753 -# 68.2.0-r0: -# - CVE-2019-15903 -# - CVE-2019-11757 -# - CVE-2019-11758 -# - CVE-2019-11759 -# - CVE-2019-11760 -# - CVE-2019-11761 -# - CVE-2019-11762 -# - CVE-2019-11763 -# - CVE-2019-11764 -# 68.3.0-r0: -# - CVE-2019-11745 -# - CVE-2019-13722 -# - CVE-2019-17005 -# - CVE-2019-17008 -# - CVE-2019-17009 -# - CVE-2019-17010 -# - CVE-2019-17011 -# - CVE-2019-17012 -# 68.4.1-r0: -# - CVE-2019-17016 -# - CVE-2019-17017 -# - CVE-2019-17022 -# - CVE-2019-17024 -# - CVE-2019-17026 -# 68.5.0-r0: -# - CVE-2020-6796 -# - CVE-2020-6797 -# - CVE-2020-6798 -# - CVE-2020-6799 -# 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.7.0-r0: -# - CVE-2020-6819 -# - CVE-2020-6820 -# - CVE-2020-6821 -# - CVE-2020-6822 -# - CVE-2020-6825 -# 68.8.0-r0: -# - CVE-2020-6831 -# - CVE-2020-12387 -# - CVE-2020-12392 -# - CVE-2020-12395 -# 68.9.0-r0: -# - CVE-2020-12399 -# - CVE-2020-12405 -# - CVE-2020-12406 -# - CVE-2020-12410 -# 68.10.0-r0: -# - CVE-2020-12417 -# - CVE-2020-12418 -# - CVE-2020-12419 -# - CVE-2020-12420 -# - CVE-2020-12421 - -unpack() { - default_unpack - [ -z $SKIP_PYTHON ] || return 0 - - msg "Killing all remaining hope for humanity and building Python 2..." - cd "$srcdir/Python-$_py2ver" - [ -d ../python ] && rm -r ../python - - # 19:39 <+solar> just make the firefox build process build its own py2 copy - # 20:03 <calvin> TheWilfox: there's always violence - - sed -e 's/é/e/g' /etc/os-release > "$srcdir"/os-release - export UNIXCONFDIR="$srcdir" - - ./configure --prefix="$srcdir/python" --with-ensurepip=install - make -j $JOBS - # 6 tests failed: - # test__locale test_os test_posix test_re test_strptime test_time - # make test - make -j $JOBS install - - # firefox's bundled pipenv and pip aren't new enough to support - # configurable UNIXCONFDIR - export PATH="$srcdir/python/bin:$PATH" - pip2 install virtualenv pipenv -} prepare() { default_prepare @@ -178,18 +69,12 @@ prepare() { echo "ac_add_options --disable-elf-hack" >> "$builddir"/mozconfig ;; ppc) - echo "ac_add_options --disable-webrtc" >> "$builddir"/mozconfig; export LDFLAGS="$LDFLAGS -latomic" ;; s390x) echo "ac_add_options --disable-startupcache" >> "$builddir"/mozconfig ;; esac - - rm "$builddir"/third_party/python/virtualenv/virtualenv_support/pip*.whl - rm "$builddir"/third_party/python/virtualenv/virtualenv_support/setuptools*.whl - cp "$srcdir/Python-$_py2ver"/Lib/ensurepip/_bundled/*.whl \ - "$builddir/third_party/python/virtualenv/virtualenv_support" } build() { @@ -197,6 +82,7 @@ build() { export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 export USE_SHORT_LIBNAME=1 + export MACH_USE_SYSTEM_PYTHON=1 # gcc 6 export CXXFLAGS="-fno-delete-null-pointer-checks -fno-schedule-insns2" @@ -205,18 +91,19 @@ build() { export UNIXCONFDIR="$srcdir" - export PATH="$srcdir/python/bin:$PATH" ./mach build } run() { cd "$builddir"/obj-$CHOST/dist/bin export LD_LIBRARY_PATH=. + export PROFILE_DIR="$builddir"/obj-$CHOST/tmp/profile-default + [ -d $PROFILE_DIR ] || ./firefox -no-remote -CreateProfile "Test $PROFILE_DIR" ./firefox -no-remote -profile "$builddir"/obj-$CHOST/tmp/profile-default } package() { - export PATH="$srcdir/python/bin:$PATH" + export MACH_USE_SYSTEM_PYTHON=1 DESTDIR="$pkgdir" ./mach install install -m755 -d ${pkgdir}/usr/share/applications @@ -252,24 +139,20 @@ package() { EOF } -sha512sums="c5c1833560364851e7cf8ea51659bc4fb60239b960125cdb20fe31f742d757ffdaef8f314f800dc91214ee8e358033dc2af971c08bbba474ef6158b101881653 firefox-68.10.0esr.source.tar.xz -16e814e8dcffc707b595ca2919bd2fa3db0d15794c63d977364652c4a5b92e90e72b8c9e1cc83b5020398bd90a1b397dbdd7cb931c49f1aa4af6ef95414b43e0 Python-2.7.16.tar.xz -f82758d279cd12a1b30a9b36ac3c265cfb137df3db7ae185f2c538504e46fa70ace1b051fce847356851062b5cc9cd741a6d33d54f8cd103aa0c8272cb19ccc4 mozconfig +sha512sums="38b4cc52de21e76d6061e6ba175e1cbfd888a16070aa951f5a44283f2db9d7e94f2504621f0da78feac6e71491a6d0e7038f63dd0ae112dcad700eb02e9aa516 firefox-91.13.0esr.source.tar.xz +86168a5e5b8aa3ea7cc0d40174baa97595c82b8e599937155fbd7761e7df7220980c74f75e96c34e5f660423e42ad67761f57b2923389be363253868bac033a9 mozconfig ace7492f4fb0523c7340fdc09c831906f74fddad93822aff367135538dacd3f56288b907f5a04f53f94c76e722ba0bab73e28d83ec12d3e672554712e6b08613 bad-google-code.patch -9c14041f0295682b8dbeb6d5b58a2f9dc0a2dc8bef995a0f7e30fa0b17c51aa0f6748f80fb8584169db7687e2eeb404dff68a09158ae56a5f24eef30685dd2b3 disable-gecko-profiler.patch c0b2bf43206c2a5154e560ef30189a1062ae856861b39f52ce69002390ff9972d43e387bfd2bf8d2ab3cac621987bc042c8c0a8b4cf90ae05717ca7705271880 fix-mutex-build.patch 70863b985427b9653ce5e28d6064f078fb6d4ccf43dd1b68e72f97f44868fc0ce063161c39a4e77a0a1a207b7365d5dc7a7ca5e68c726825eba814f2b93e2f5d fix-seccomp-bpf.patch -de8e3b15cd7dffb0eca5a729434986e5916234914cdc5fdcdbbc67d8bb439a535ed932293518dd74c3be07555ed60c9541d6758cd2f69d27c22965f7a076e4e3 jpeg-link.patch +6eb7fb134760f5d232710c56f18f14de4f533e41e269531edd01f5650f6d641513e34a8d2294af5ad6fd184736f674c734efb4cc003636a75e14a8fdba2fe3b0 gcc89074.patch +240d6c9290a20e2c9ccfa2d15c9a636fc1b09b62f09285eb688974d888390da2a84271f14c397570b58ccdcf29b99370f7183cc0dbbbe581bf6e7d7ee8dcabd2 jpeg-link.patch e61664bc93eadce5016a06a4d0684b34a05074f1815e88ef2613380d7b369c6fd305fb34f83b5eb18b9e3138273ea8ddcfdcb1084fdcaa922a1e5b30146a3b18 mozilla-build-arm.patch +eb158bf2e4b9d513ae36f3c977a3b110ea8c4801c3c94841bc3ad4cdca3bdfc96d4a662e5a2e662fe7a01b0f1af097280097b16f5d0e83d29b4a7e6cbb8c7396 newer-cbindgen.patch 06a3f4ee6d3726adf3460952fcbaaf24bb15ef8d15b3357fdd1766c7a62b00bd53a1e943b5df7f4e1a69f4fae0d44b64fae1e027d7812499c77894975969ea10 ppc32-fix.patch -7c615703dc9b8427eeadd13bc9beda02e1c3d986cac1167feaf48fdfdcc15b7456460d4d58f301054cf459242ee75bbcd76bf67e26c2a443bc5655975d24ca1b rust-32bit.patch -efc77a320850e10e8b99e6fb5d3dd28a3044e287fd87efbdf95807de26a6885235b2d994743cb374345d91a0353abd70a5790b829e37b717b77605e24d4f7f98 seccomp-musl.patch -4b20dfa3ef3d470af069a274c53ea35c67d2d123f1b543ee243e7038ed94f5a1a6121f1f67713a9442e246b979c042f11efc7a6c32d0b8d3fd2c448dd1258733 seccomp-time64.patch +153f955169e1489d49867be90f68e8a4722cad8edb3a9d1ddb6161e34399e1b4e9e82dc8d72aaba1d5f585bca7c4852433e8ecb068be1583df7155c7cce0223b rust-32bit.patch 39ddb15d1453a8412275c36fc8db3befc69dffd4a362e932d280fb7fd1190db595a2af9b468ee49e0714f5e9df6e48eb5794122a64fa9f30d689de8693acbb15 shut-up-warning.patch -e751ffab263f03d4c74feebc617e3af115b1b53cf54fe16c3acc585eec67773f37aa8de4c19599fa6478179b01439025112ef2b759aa9923c9900e7081cb65a9 skia-sucks1.patch -9152bd3e6dc446337e6a2ed602279c620aedecc796ba28e777854c4f41fcf3067f9ebd086a4b63a6b76c2e69ec599ac6435b8eeda4f7488b1c45f69113facba4 skia-sucks2.patch -7a1fa27e060b2f025eaebbd39fb5c62960b62450241437e6d057d58cef9faf1cd1a85efe3b6a37b865d686ff18e90605ebea3089b26243f2d14876c2107106a6 skia-sucks3.patch +961fa1c856e97e4d08da4682f520ecf23075571a532a781c5e14dbec4915130b02a8199caf6602013ea904d347c4f06d086b0fe84a3850dd6910d351232da599 skia-unified.patch 452b47b825294779f98ed46bc1065dad76b79ff453521ef049934a120f349c84a1c863b16af1828fe053059823da9690ec917c055ae02dcc5c80c54cad732448 stackwalk-x86-ppc.patch -be68f1387aa6677875a67106e2d6a9db470c934c943056d3b53391a63034235108e41945c53957db427d9cdc59f0aa2f9e6f2f8cd862e090e512a3ab9cbcc9a8 webrtc-broken.patch +b7c1ac21cd03b7cdc887e005ed970cf13ff95643c7651decf1e6d42094cda6a0464dc2ba3cded3827f6d0f3682c2c9b081a7667f386133aa6e3072d0464e72e8 webrender.patch f3b7c3e804ce04731012a46cb9e9a6b0769e3772aef9c0a4a8c7520b030fdf6cd703d5e9ff49275f14b7d738fe82a0a4fde3bc3219dff7225d5db0e274987454 firefox.desktop 5dcb6288d0444a8a471d669bbaf61cdb1433663eff38b72ee5e980843f5fc07d0d60c91627a2c1159215d0ad77ae3f115dcc5fdfe87e64ca704b641aceaa44ed firefox-safe.desktop" diff --git a/user/firefox-esr/disable-gecko-profiler.patch b/user/firefox-esr/disable-gecko-profiler.patch deleted file mode 100644 index 160ac6097..000000000 --- a/user/firefox-esr/disable-gecko-profiler.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -uwr firefox-67.0-old/toolkit/moz.configure firefox-67.0/toolkit/moz.configure ---- firefox-67.0-old/toolkit/moz.configure 2019-05-22 10:35:06.170036401 +0000 -+++ firefox-67.0/toolkit/moz.configure 2019-05-22 10:36:21.680036609 +0000 -@@ -70,10 +70,6 @@ - if value: - return True - --set_config('MOZ_GECKO_PROFILER', gecko_profiler_define) --set_define('MOZ_GECKO_PROFILER', gecko_profiler_define) -- -- - # Whether code to parse ELF binaries should be compiled for the Gecko profiler - # (for symbol table dumping). - @depends(gecko_profiler, target) diff --git a/user/firefox-esr/fix-bug-1261392.patch b/user/firefox-esr/fix-bug-1261392.patch deleted file mode 100644 index fa40914d6..000000000 --- a/user/firefox-esr/fix-bug-1261392.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/tools/profiler/core/platform.h 2017-05-27 11:44:06.733119794 +0000 -+++ b/tools/profiler/core/platform.h 2017-05-27 11:46:16.004253520 +0000 -@@ -54,10 +54,11 @@ - #include <vector> - #include "StackTop.h" - --// We need a definition of gettid(), but old glibc versions don't provide a --// wrapper for it. --#if defined(__GLIBC__) -+// We need a definition of gettid(), but Linux libc implementations don't -+// provide a wrapper for it (except for Bionic) -+#if defined(__linux__) - # include <unistd.h> -+#if !defined(__BIONIC__) - # include <sys/syscall.h> - # define gettid() static_cast<pid_t>(syscall(SYS_gettid)) -+#endif -@@ -71,6 +72,7 @@ - return (pid_t) syscall(SYS_thread_selfid); - } - #endif -+#endif - - #ifdef XP_WIN - #include <windows.h> diff --git a/user/firefox-esr/gcc89074.patch b/user/firefox-esr/gcc89074.patch new file mode 100644 index 000000000..e9713193c --- /dev/null +++ b/user/firefox-esr/gcc89074.patch @@ -0,0 +1,24 @@ +Upstream-URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1688122 +Upstream-URL: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89074 + +Valid code, but only used for debugging. GCC 12 fixed this. +Moz upstream not interested. + +--- firefox-91.13.0/dom/base/nsTreeSanitizer.cpp.old 2022-08-15 13:04:32.000000000 -0500 ++++ firefox-91.13.0/dom/base/nsTreeSanitizer.cpp 2022-11-19 00:42:15.892580023 -0600 +@@ -632,15 +632,6 @@ + constexpr const nsStaticAtom* const kURLAttributesSVG[] = {nsGkAtoms::href, + nullptr}; + +-static_assert(AllOf(std::begin(kURLAttributesSVG), std::end(kURLAttributesSVG), +- [](auto aURLAttributeSVG) { +- return AnyOf(std::begin(kAttributesSVG), +- std::end(kAttributesSVG), +- [&](auto aAttributeSVG) { +- return aAttributeSVG == aURLAttributeSVG; +- }); +- })); +- + const nsStaticAtom* const kElementsMathML[] = { + nsGkAtoms::abs_, // abs + nsGkAtoms::_and, // and diff --git a/user/firefox-esr/jpeg-link.patch b/user/firefox-esr/jpeg-link.patch index 8f27e72e4..a04d924d4 100644 --- a/user/firefox-esr/jpeg-link.patch +++ b/user/firefox-esr/jpeg-link.patch @@ -1,15 +1,25 @@ ---- firefox-68.2.0/toolkit/moz.configure.old 2019-11-11 16:33:48.441920266 +0000 -+++ firefox-68.2.0/toolkit/moz.configure 2019-11-11 16:41:36.221754664 +0000 -@@ -1482,9 +1482,9 @@ +--- firefox-91.13.0/toolkit/moz.configure.old 2022-08-15 13:05:59.000000000 -0500 ++++ firefox-91.13.0/toolkit/moz.configure 2022-11-15 01:26:57.874201494 -0600 +@@ -1758,14 +1758,14 @@ ) - with only_when('--with-system-jpeg'): -- check_symbol('jpeg_destroy_compress', flags=jpeg_flags.ldflags, -- onerror=lambda: die('--with-system-jpeg requested but symbol ' -- 'jpeg_destroy_compress not found.')) -+ #check_symbol('jpeg_destroy_compress', flags=jpeg_flags.ldflags, -+ # onerror=lambda: die('--with-system-jpeg requested but symbol ' -+ # 'jpeg_destroy_compress not found.')) + with only_when("--with-system-jpeg"): +- check_symbol( +- "jpeg_destroy_compress", +- flags=jpeg_flags.ldflags, +- onerror=lambda: die( +- "--with-system-jpeg requested but symbol " +- "jpeg_destroy_compress not found." +- ), +- ) ++ #check_symbol( ++ # "jpeg_destroy_compress", ++ # flags=jpeg_flags.ldflags, ++ # onerror=lambda: die( ++ # "--with-system-jpeg requested but symbol " ++ # "jpeg_destroy_compress not found." ++ # ), ++ #) c_compiler.try_compile( includes=[ diff --git a/user/firefox-esr/mozconfig b/user/firefox-esr/mozconfig index 55e1a95ce..ed1f42dbb 100644 --- a/user/firefox-esr/mozconfig +++ b/user/firefox-esr/mozconfig @@ -7,15 +7,14 @@ ac_add_options --disable-profiling ac_add_options --disable-strip ac_add_options --disable-tests ac_add_options --disable-updater +ac_add_options --disable-webrtc ac_add_options --enable-alsa ac_add_options --enable-application=browser ac_add_options --enable-dbus ac_add_options --enable-default-toolkit=cairo-gtk3 ac_add_options --enable-official-branding ac_add_options --enable-pulseaudio -ac_add_options --enable-startup-notification ac_add_options --enable-system-ffi -ac_add_options --with-system-bz2 ac_add_options --with-system-icu ac_add_options --with-system-jpeg ac_add_options --with-system-libevent diff --git a/user/firefox-esr/newer-cbindgen.patch b/user/firefox-esr/newer-cbindgen.patch new file mode 100644 index 000000000..9829237ee --- /dev/null +++ b/user/firefox-esr/newer-cbindgen.patch @@ -0,0 +1,17 @@ +Description: Remove an extra constant definition that is now being + generated by newer versions of cbindgen (0.24), and causing + build failures because it is defined in several places. +Author: Olivier Tilloy <olivier.tilloy@canonical.com> +Upstream-URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1773259 + +--- a/gfx/webrender_bindings/webrender_ffi.h ++++ b/gfx/webrender_bindings/webrender_ffi.h +@@ -77,8 +77,6 @@ struct WrPipelineInfo; + struct WrPipelineIdAndEpoch; + using WrPipelineIdEpochs = nsTArray<WrPipelineIdAndEpoch>; + +-const uint64_t ROOT_CLIP_CHAIN = ~0; +- + } // namespace wr + } // namespace mozilla + diff --git a/user/firefox-esr/rust-32bit.patch b/user/firefox-esr/rust-32bit.patch index f9281cb7a..cff36e90b 100644 --- a/user/firefox-esr/rust-32bit.patch +++ b/user/firefox-esr/rust-32bit.patch @@ -1,20 +1,32 @@ ---- firefox-68.1.0/config/makefiles/rust.mk.old 2019-08-26 16:52:20.000000000 +0000 -+++ firefox-68.1.0/config/makefiles/rust.mk 2019-10-03 21:17:55.062373830 +0000 -@@ -47,7 +47,7 @@ - ifndef DEVELOPER_OPTIONS - ifndef MOZ_DEBUG_RUST - # Enable link-time optimization for release builds. --cargo_rustc_flags += -C lto -+# OOMs on 32-bit machines: cargo_rustc_flags += -C lto - endif - endif +--- firefox-91.13.0/config/makefiles/rust.mk.old 2022-08-15 13:04:32.000000000 -0500 ++++ firefox-91.13.0/config/makefiles/rust.mk 2022-11-15 01:35:10.150096648 -0600 +@@ -64,19 +64,19 @@ + # These flags are passed via `cargo rustc` and only apply to the final rustc + # invocation (i.e., only the top-level crate, not its dependencies). + cargo_rustc_flags = $(CARGO_RUSTCFLAGS) +-ifndef DEVELOPER_OPTIONS +-ifndef MOZ_DEBUG_RUST ++#ifndef DEVELOPER_OPTIONS ++#ifndef MOZ_DEBUG_RUST + # Enable link-time optimization for release builds, but not when linking + # gkrust_gtest. And not when doing cross-language LTO. +-ifndef MOZ_LTO_RUST_CROSS +-ifeq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE))) +-cargo_rustc_flags += -Clto +-endif ++#ifndef MOZ_LTO_RUST_CROSS ++#ifeq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE))) ++#cargo_rustc_flags += -Clto ++#endif + # We need -Cembed-bitcode=yes for all crates when using -Clto. +-RUSTFLAGS += -Cembed-bitcode=yes +-endif +-endif +-endif ++#RUSTFLAGS += -Cembed-bitcode=yes ++#endif ++#endif ++#endif -@@ -246,7 +246,7 @@ - ifndef DEVELOPER_OPTIONS - ifndef MOZ_DEBUG_RUST - ifeq ($(OS_ARCH), Linux) -- $(call py_action,check_binary,--target --networking $@) -+# Fails because we disable LTO: $(call py_action,check_binary,--target --networking $@) - endif - endif - endif + ifdef CARGO_INCREMENTAL + export CARGO_INCREMENTAL diff --git a/user/firefox-esr/seccomp-musl.patch b/user/firefox-esr/seccomp-musl.patch deleted file mode 100644 index edd4a3024..000000000 --- a/user/firefox-esr/seccomp-musl.patch +++ /dev/null @@ -1,49 +0,0 @@ -Backport of https://hg.mozilla.org/mozilla-central/rev/a0be746532f437055e4190cc8db802ad1239405e - -diff --git a/security/sandbox/linux/SandboxFilter.cpp b/security/sandbox/linux/SandboxFilter.cpp ---- a/security/sandbox/linux/SandboxFilter.cpp -+++ b/security/sandbox/linux/SandboxFilter.cpp -@@ -419,16 +419,20 @@ class SandboxPolicyCommon : public Sandb - case __NR_faccessat: - return Trap(AccessAtTrap, mBroker); - CASES_FOR_stat: - return Trap(StatTrap, mBroker); - CASES_FOR_lstat: - return Trap(LStatTrap, mBroker); - CASES_FOR_fstatat: - return Trap(StatAtTrap, mBroker); -+ // Used by new libc and Rust's stdlib, if available. -+ // We don't have broker support yet so claim it does not exist. -+ case __NR_statx: -+ return Error(ENOSYS); - case __NR_chmod: - return Trap(ChmodTrap, mBroker); - case __NR_link: - return Trap(LinkTrap, mBroker); - case __NR_mkdir: - return Trap(MkdirTrap, mBroker); - case __NR_symlink: - return Trap(SymlinkTrap, mBroker); -@@ -538,16 +542,20 @@ class SandboxPolicyCommon : public Sandb - .ElseIf(advice == MADV_HUGEPAGE, Allow()) - .ElseIf(advice == MADV_NOHUGEPAGE, Allow()) - #ifdef MOZ_ASAN - .ElseIf(advice == MADV_DONTDUMP, Allow()) - #endif - .Else(InvalidSyscall()); - } - -+ // musl libc will set this up in pthreads support. -+ case __NR_membarrier: -+ return Allow(); -+ - // Signal handling - #if defined(ANDROID) || defined(MOZ_ASAN) - case __NR_sigaltstack: - #endif - CASES_FOR_sigreturn: - CASES_FOR_sigprocmask: - CASES_FOR_sigaction: - return Allow(); - - diff --git a/user/firefox-esr/seccomp-time64.patch b/user/firefox-esr/seccomp-time64.patch deleted file mode 100644 index 72cc28b5d..000000000 --- a/user/firefox-esr/seccomp-time64.patch +++ /dev/null @@ -1,112 +0,0 @@ -This drops the use of the chromium sandbox syscall headers which were -defining syscall numbers if they were undefined. This masked the time64 -issue initially since while musl renamed several of the time32 syscall -numbers to catch breakage like this, these headers were silently -bringing them back. I did this by comparing the syscall numbers provided -by the chromium and musl headers and redefining the generic names to -their time64 counterparts. - -For gettimeofday and settimeofday there does not appear to be a time64 -counterpart so I have defined them as the time32 versions. For -settimeofday this should not matter (the seccomp filter will block this -by virture of not being on the whitelist - no content process needs to -set the time anyway). - -It is not possible to entirely block the usage of time32 syscalls -because musl uses them internally when it can or in fallback paths. - -I did not check the MIPS headers since we don't currently ship a MIPS -port, so in the future those includes should be examined and dropped -too... - ---- firefox-68.8.0/security/sandbox/chromium/sandbox/linux/system_headers/linux_syscalls.h 2020-04-29 16:49:45.000000000 -0500 -+++ firefox-68.8.0/security/sandbox/chromium/sandbox/linux/system_headers/linux_syscalls.h 2020-05-20 03:09:47.369457646 -0500 -@@ -8,18 +8,7 @@ - - #ifndef SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SYSCALLS_H_ - #define SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SYSCALLS_H_ -- --#if defined(__x86_64__) --#include "sandbox/linux/system_headers/x86_64_linux_syscalls.h" --#endif -- --#if defined(__i386__) --#include "sandbox/linux/system_headers/x86_32_linux_syscalls.h" --#endif -- --#if defined(__arm__) && defined(__ARM_EABI__) --#include "sandbox/linux/system_headers/arm_linux_syscalls.h" --#endif -+#include <sys/syscall.h> - - #if defined(__mips__) && (_MIPS_SIM == _ABIO32) - #include "sandbox/linux/system_headers/mips_linux_syscalls.h" -@@ -33,5 +22,36 @@ - #include "sandbox/linux/system_headers/arm64_linux_syscalls.h" - #endif - -+#if !defined(__NR_clock_getres) && defined(__NR_clock_getres_time64) -+#define __NR_clock_getres __NR_clock_getres_time64 -+#endif -+#if !defined(__NR_clock_gettime) && defined(__NR_clock_gettime64) -+#define __NR_clock_gettime __NR_clock_gettime64 -+#endif -+#if !defined(__NR_clock_nanosleep) && defined(__NR_clock_nanosleep_time64) -+#define __NR_clock_nanosleep __NR_clock_nanosleep_time64 -+#endif -+#if !defined(__NR_clock_settime) && defined(__NR_clock_settime64) -+#define __NR_clock_settime __NR_clock_settime64 -+#endif -+#if !defined(__NR_gettimeofday) && defined(__NR_gettimeofday_time32) -+#define __NR_gettimeofday __NR_gettimeofday_time32 -+#endif -+#if !defined(__NR_settimeofday) && defined(__NR_settimeofday_time32) -+#define __NR_settimeofday __NR_settimeofday_time32 -+#endif -+#if !defined(__NR_timer_gettime) && defined(__NR_timer_gettime64) -+#define __NR_timer_gettime __NR_timer_gettime64 -+#endif -+#if !defined(__NR_timer_settime) && defined(__NR_timer_settime64) -+#define __NR_timer_settime __NR_timer_settime64 -+#endif -+#if !defined(__NR_timerfd_gettime) && defined(__NR_timerfd_gettime64) -+#define __NR_timerfd_gettime __NR_timerfd_gettime64 -+#endif -+#if !defined(__NR_timerfd_settime) && defined(__NR_timerfd_settime64) -+#define __NR_timerfd_settime __NR_timerfd_settime64 -+#endif -+ - #endif // SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SYSCALLS_H_ - ---- firefox-68.8.0/security/sandbox/linux/SandboxFilter.cpp 2020-04-29 16:49:45.000000000 -0500 -+++ firefox-68.8.0/security/sandbox/linux/SandboxFilter.cpp 2020-05-19 23:33:27.829642593 -0500 -@@ -478,6 +478,9 @@ class SandboxPolicyCommon : public Sandb - - // Thread synchronization - case __NR_futex: -+#ifdef __NR_futex_time64 -+ case __NR_futex_time64: -+#endif - // FIXME: This could be more restrictive.... - return Allow(); - -@@ -488,6 +491,9 @@ class SandboxPolicyCommon : public Sandb - case __NR_epoll_pwait: - case __NR_epoll_ctl: - case __NR_ppoll: -+#ifdef __NR_ppoll_time64 -+ case __NR_ppoll_time64: -+#endif - case __NR_poll: - return Allow(); - -@@ -1017,6 +1023,9 @@ class ContentSandboxPolicy : public Sand - - CASES_FOR_select: - case __NR_pselect6: -+#ifdef __NR_pselect6_time64 -+ case __NR_pselect6_time64: -+#endif - return Allow(); - - CASES_FOR_getdents: diff --git a/user/firefox-esr/skia-sucks1.patch b/user/firefox-esr/skia-sucks1.patch deleted file mode 100644 index a02c3b775..000000000 --- a/user/firefox-esr/skia-sucks1.patch +++ /dev/null @@ -1,84 +0,0 @@ -# HG changeset patch -# Parent 548d0a2f3a22bfac32ec0c3921c6c969c8bf32a9 - -diff -r 548d0a2f3a22 gfx/2d/ConvolutionFilter.cpp ---- a/gfx/2d/ConvolutionFilter.cpp Mon Jul 22 16:57:54 2019 +0200 -+++ b/gfx/2d/ConvolutionFilter.cpp Thu Jul 25 14:27:59 2019 +0200 -@@ -35,9 +35,38 @@ - return true; - } - -+static void ByteSwapArray(uint8_t *u8Array, int32_t size) { -+ uint32_t *array = reinterpret_cast<uint32_t*>(u8Array); -+ for (int pxl = 0; pxl < size; ++pxl) { -+ // Use an endian swap to move the bytes, i.e. BGRA -> ARGB. -+ uint32_t rgba = array[pxl]; -+ array[pxl] = NativeEndian::swapToLittleEndian(rgba); -+ } -+} -+ - void ConvolutionFilter::ConvolveHorizontally(const uint8_t* aSrc, uint8_t* aDst, - bool aHasAlpha) { -+#ifdef MOZ_BIG_ENDIAN -+ int outputSize = mFilter->numValues(); -+ -+ // Input size isn't handed in, so we have to calculate it quickly -+ int inputSize = 0; -+ for (int xx = 0; xx < outputSize; ++xx) { -+ // Get the filter that determines the current output pixel. -+ int filterOffset, filterLength; -+ mFilter->FilterForValue(xx, &filterOffset, &filterLength); -+ inputSize = std::max(inputSize, filterOffset + filterLength); -+ } -+ -+ ByteSwapArray((uint8_t*)aSrc, inputSize); -+#endif -+ - SkOpts::convolve_horizontally(aSrc, *mFilter, aDst, aHasAlpha); -+ -+#ifdef MOZ_BIG_ENDIAN -+ ByteSwapArray((uint8_t*)aSrc, inputSize); -+ ByteSwapArray(aDst, outputSize); -+#endif - } - - void ConvolutionFilter::ConvolveVertically(uint8_t* const* aSrc, uint8_t* aDst, -@@ -49,8 +78,26 @@ - int32_t filterLength; - auto filterValues = - mFilter->FilterForValue(aRowIndex, &filterOffset, &filterLength); -+ -+#ifdef MOZ_BIG_ENDIAN -+ for (int filterY = 0; filterY < filterLength; filterY++) { -+ // Skia only knows LE, so we have to swizzle the input -+ ByteSwapArray(aSrc[filterY], aRowSize); -+ } -+#endif -+ - SkOpts::convolve_vertically(filterValues, filterLength, aSrc, aRowSize, aDst, - aHasAlpha); -+ -+#ifdef MOZ_BIG_ENDIAN -+ // After skia is finished, we swizzle back to BE, in case -+ // the input is used again somewhere else -+ for (int filterY = 0; filterY < filterLength; filterY++) { -+ ByteSwapArray(aSrc[filterY], aRowSize); -+ } -+ // The destination array as well -+ ByteSwapArray(aDst, aRowSize); -+#endif - } - - /* ConvolutionFilter::ComputeResizeFactor is derived from Skia's -diff -r 548d0a2f3a22 gfx/skia/skia/include/core/SkPreConfig.h ---- a/gfx/skia/skia/include/core/SkPreConfig.h Mon Jul 22 16:57:54 2019 +0200 -+++ b/gfx/skia/skia/include/core/SkPreConfig.h Thu Jul 25 14:27:59 2019 +0200 -@@ -73,7 +73,7 @@ - defined(__ppc__) || defined(__hppa) || \ - defined(__PPC__) || defined(__PPC64__) || \ - defined(_MIPSEB) || defined(__ARMEB__) || \ -- defined(__s390__) || \ -+ defined(__s390__) || defined(__s390x__) || \ - (defined(__sh__) && defined(__BIG_ENDIAN__)) || \ - (defined(__ia64) && defined(__BIG_ENDIAN__)) - #define SK_CPU_BENDIAN diff --git a/user/firefox-esr/skia-sucks2.patch b/user/firefox-esr/skia-sucks2.patch deleted file mode 100644 index 1a498f871..000000000 --- a/user/firefox-esr/skia-sucks2.patch +++ /dev/null @@ -1,44 +0,0 @@ -# HG changeset patch -# Parent aecb4600e5da17443b224c79eee178c1d8e155e3 -For FF68, AntiAliasing of XULTexts seem to be broken on big endian (s390x). Text and icons of the sandwich-menu to the -right of the address bar, as well as plugin-windows appears transparant, which usually means unreadable (white on white). - -diff -r aecb4600e5da gfx/skia/skia/include/private/SkNx.h ---- a/gfx/skia/skia/include/private/SkNx.h Tue Aug 20 09:46:55 2019 +0200 -+++ b/gfx/skia/skia/include/private/SkNx.h Mon Sep 09 10:04:06 2019 +0200 -@@ -238,7 +238,18 @@ - AI SkNx operator*(const SkNx& y) const { return fVal * y.fVal; } - AI SkNx operator/(const SkNx& y) const { return fVal / y.fVal; } - -+ // On Big endian the commented out variant doesn't work, -+ // and honestly, I have no idea why it exists in the first place. -+ // The reason its broken is, I think, that it defaults to the double-variant of ToBits() -+ // which gets a 64-bit integer, and FromBits returns 32-bit, -+ // cutting off the wrong half again. -+ // Overall, I see no reason to have ToBits and FromBits at all (even for floats/doubles). -+ // Still we are only "fixing" this for big endian and leave little endian alone (never touch a running system) -+#ifdef SK_CPU_BENDIAN -+ AI SkNx operator&(const SkNx& y) const { return fVal & y.fVal; } -+#else - AI SkNx operator&(const SkNx& y) const { return FromBits(ToBits(fVal) & ToBits(y.fVal)); } -+#endif - AI SkNx operator|(const SkNx& y) const { return FromBits(ToBits(fVal) | ToBits(y.fVal)); } - AI SkNx operator^(const SkNx& y) const { return FromBits(ToBits(fVal) ^ ToBits(y.fVal)); } - -diff -r aecb4600e5da gfx/skia/skia/src/opts/SkBlitMask_opts.h ---- a/gfx/skia/skia/src/opts/SkBlitMask_opts.h Tue Aug 20 09:46:55 2019 +0200 -+++ b/gfx/skia/skia/src/opts/SkBlitMask_opts.h Mon Sep 09 10:04:06 2019 +0200 -@@ -203,7 +203,13 @@ - // ~~~> - // a = 1*aa + d(1-1*aa) = aa + d(1-aa) - // c = 0*aa + d(1-1*aa) = d(1-aa) -+ -+ // For big endian we have to swap the alpha-mask from 0,0,0,255 to 255,0,0,0 -+#ifdef SK_CPU_BENDIAN -+ return Sk4px(Sk16b(aa) & Sk16b(255,0,0,0, 255,0,0,0, 255,0,0,0, 255,0,0,0)) -+#else - return Sk4px(Sk16b(aa) & Sk16b(0,0,0,255, 0,0,0,255, 0,0,0,255, 0,0,0,255)) -+#endif - + d.approxMulDiv255(aa.inv()); - }; - while (h --> 0) { diff --git a/user/firefox-esr/skia-sucks3.patch b/user/firefox-esr/skia-unified.patch index 9d2ffc410..77bc56299 100644 --- a/user/firefox-esr/skia-sucks3.patch +++ b/user/firefox-esr/skia-unified.patch @@ -1,3 +1,42 @@ +https://bugzilla.mozilla.org/show_bug.cgi?id=1344659 + +--- firefox-102.1.0/gfx/2d/Types.h ++++ firefox-102.1.0/gfx/2d/Types.h +@@ -91,15 +91,8 @@ UNKNOWN, + // The following values are endian-independent synonyms. The _UINT32 suffix + // indicates that the name reflects the layout when viewed as a uint32_t + // value. +-#if MOZ_LITTLE_ENDIAN() + A8R8G8B8_UINT32 = B8G8R8A8, // 0xAARRGGBB + X8R8G8B8_UINT32 = B8G8R8X8, // 0x00RRGGBB +-#elif MOZ_BIG_ENDIAN() +- A8R8G8B8_UINT32 = A8R8G8B8, // 0xAARRGGBB +- X8R8G8B8_UINT32 = X8R8G8B8, // 0x00RRGGBB +-#else +-# error "bad endianness" +-#endif + + // The following values are OS and endian-independent synonyms. + // + + +https://bugzilla.mozilla.org/show_bug.cgi?id=1325259 + +--- firefox-102.1.0/gfx/2d/DrawTargetSkia.cpp ++++ firefox-102.1.0/gfx/2d/DrawTargetSkia.cpp +@@ -154,8 +154,12 @@ } + return surfaceBounds.Intersect(bounds); + } + ++#if __sparc ++static const int kARGBAlphaOffset = 0; ++#else + static const int kARGBAlphaOffset = + SurfaceFormat::A8R8G8B8_UINT32 == SurfaceFormat::B8G8R8A8 ? 3 : 0; ++#endif + + static bool VerifyRGBXFormat(uint8_t* aData, const IntSize& aSize, + const int32_t aStride, SurfaceFormat aFormat) { # HG changeset patch # Parent 46ea866ca3acb8bb5e1709ceb799b9c94f591dec Problem description: Tab-titles that are too long to fit into a tab get faded out. diff --git a/user/firefox-esr/webrender.patch b/user/firefox-esr/webrender.patch new file mode 100644 index 000000000..a2457e576 --- /dev/null +++ b/user/firefox-esr/webrender.patch @@ -0,0 +1,54 @@ +# HG changeset patch +# User Petr Sumbera <petr.sumbera@oracle.com> +# Date 1648114576 25200 +# Thu Mar 24 02:36:16 2022 -0700 +# Node ID 903e5f164c0ed424492eec6f388c03cbbcf99913 +# Parent 20d81e68da033746bf81acbb08490f16679853da +Bug 1716707 [s390x] Software WebRender does not support big endian + +diff -r 20d81e68da03 -r 903e5f164c0e gfx/webrender_bindings/RenderCompositorSWGL.cpp +--- a/gfx/webrender_bindings/RenderCompositorSWGL.cpp Thu Mar 24 06:57:58 2022 +0000 ++++ b/gfx/webrender_bindings/RenderCompositorSWGL.cpp Thu Mar 24 02:36:16 2022 -0700 +@@ -7,6 +7,7 @@ + #include "RenderCompositorSWGL.h" + + #include "mozilla/gfx/Logging.h" ++#include "mozilla/gfx/Swizzle.h" + #include "mozilla/widget/CompositorWidget.h" + + #ifdef MOZ_WIDGET_GTK +@@ -235,6 +237,13 @@ + } + mDT->Flush(); + ++#if MOZ_BIG_ENDIAN() ++ // One swizzle to rule them all. ++ gfx::SwizzleData(mMappedData, mMappedStride, gfx::SurfaceFormat::B8G8R8A8, ++ mMappedData, mMappedStride, gfx::SurfaceFormat::A8R8G8B8, ++ mDT->GetSize()); ++#endif ++ + // Done with the DT. Hand it back to the widget and clear out any trace of it. + mWidget->EndRemoteDrawingInRegion(mDT, mDirtyRegion); + mDirtyRegion.SetEmpty(); +diff -r 20d81e68da03 -r 903e5f164c0e image/imgFrame.cpp +--- a/image/imgFrame.cpp Thu Mar 24 06:57:58 2022 +0000 ++++ b/image/imgFrame.cpp Thu Mar 24 02:36:16 2022 -0700 +@@ -372,6 +372,17 @@ + return NS_ERROR_OUT_OF_MEMORY; + } + ++#if MOZ_BIG_ENDIAN() ++ if (aBackend == gfx::BackendType::SKIA && canUseDataSurface) { ++ // SKIA is lying about what format it returns on big endian ++ for (int ii=0; ii < mRawSurface->GetSize().Height()*mRawSurface->Stride() / 4; ++ii) { ++ uint32_t *vals = (uint32_t*)(mRawSurface->GetData()); ++ uint32_t val = ((vals[ii] << 8) & 0xFF00FF00 ) | ((vals[ii] >> 8) & 0xFF00FF ); ++ vals[ii] = (val << 16) | (val >> 16); ++ } ++ } ++#endif ++ + if (!canUseDataSurface) { + // We used an offscreen surface, which is an "optimized" surface from + // imgFrame's perspective. diff --git a/user/firefox-esr/webrtc-broken.patch b/user/firefox-esr/webrtc-broken.patch deleted file mode 100644 index 85b1b1209..000000000 --- a/user/firefox-esr/webrtc-broken.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -Naur firefox-60.0.orig/media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c firefox-60.0/media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c ---- firefox-60.0.orig/media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c 2018-05-13 17:33:55.266855917 -0700 -+++ firefox-60.0/media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c 2018-05-13 20:21:08.158464933 -0700 -@@ -11,7 +11,7 @@ - #ifndef __GLIBC_PREREQ - #define __GLIBC_PREREQ(a, b) 0 - #endif --#if __GLIBC_PREREQ(2, 16) -+#if __linux__ - #include <sys/auxv.h> - #else - #include <fcntl.h> -@@ -29,7 +29,7 @@ - int architecture = 0; - unsigned long hwcap = 0; - const char* platform = NULL; --#if __GLIBC_PREREQ(2, 16) -+#if __linux__ - hwcap = getauxval(AT_HWCAP); - platform = (const char*)getauxval(AT_PLATFORM); - #else -@@ -53,7 +53,7 @@ - } - close(fd); - } --#endif // __GLIBC_PREREQ(2,16) -+#endif // __linux__ - #if defined(__aarch64__) - architecture = 8; - if ((hwcap & HWCAP_FP) != 0) |