aboutsummaryrefslogtreecommitdiffstats
path: root/community/firefox-esr
diff options
context:
space:
mode:
authorLi Q <li66@21cn.com>2019-07-13 14:11:58 -0300
committerSören Tempel <soeren+git@soeren-tempel.net>2019-07-17 12:48:11 +0200
commit6aadc57ae091f6fb0adb24cdf7f23d04f0503545 (patch)
treee1e7d9bd76cf789f2b872ce78bcb444e9faa41de /community/firefox-esr
parent6f7f26dac17d4027ca00a7181310699405320e23 (diff)
downloadaports-6aadc57ae091f6fb0adb24cdf7f23d04f0503545.tar.bz2
aports-6aadc57ae091f6fb0adb24cdf7f23d04f0503545.tar.xz
community/firefox-esr: upgrade to 68.0
See https://www.mozilla.org/en-US/security/advisories/mfsa2019-22/
Diffstat (limited to 'community/firefox-esr')
-rw-r--r--community/firefox-esr/0002-Use-C99-math-isfinite.patch17
-rw-r--r--community/firefox-esr/APKBUILD75
-rw-r--r--community/firefox-esr/disable-hunspell_hooks.patch11
-rw-r--r--community/firefox-esr/disable-moz-stackwalk.patch12
-rw-r--r--community/firefox-esr/fix-arm-version-detect.patch13
-rw-r--r--community/firefox-esr/fix-bug-1261392.patch25
-rw-r--r--community/firefox-esr/fix-fortify-inline.patch11
-rw-r--r--community/firefox-esr/fix-musl.patch11
-rw-r--r--community/firefox-esr/fix-rust-target.patch4
-rw-r--r--community/firefox-esr/fix-rust.patch26
-rw-r--r--community/firefox-esr/fix-sandbox-membarrier.patch (renamed from community/firefox-esr/sandbox-membarrier.patch)2
-rw-r--r--community/firefox-esr/fix-seccomp-bpf.patch18
-rw-r--r--community/firefox-esr/fix-stack-overflow.patch45
-rw-r--r--community/firefox-esr/fix-toolkit.patch72
-rw-r--r--community/firefox-esr/fix-tools.patch43
-rw-r--r--community/firefox-esr/fix-webrtc-glibcisms.patch21
-rw-r--r--community/firefox-esr/mallinfo.patch24
-rw-r--r--community/firefox-esr/mozilla-build-arm.patch11
-rw-r--r--community/firefox-esr/rust-unitialized-field.patch19
19 files changed, 128 insertions, 332 deletions
diff --git a/community/firefox-esr/0002-Use-C99-math-isfinite.patch b/community/firefox-esr/0002-Use-C99-math-isfinite.patch
deleted file mode 100644
index ba4f5cfb3d..0000000000
--- a/community/firefox-esr/0002-Use-C99-math-isfinite.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- ./xpcom/ds/nsMathUtils.h.orig
-+++ ./xpcom/ds/nsMathUtils.h
-@@ -104,12 +104,12 @@
- #ifdef WIN32
- // NOTE: '!!' casts an int to bool without spamming MSVC warning C4800.
- return !!_finite(aNum);
--#elif defined(XP_DARWIN)
-+#elif defined(XP_DARWIN) || defined(_GLIBCXX_CMATH)
- // Darwin has deprecated |finite| and recommends |isfinite|. The former is
- // not present in the iOS SDK.
- return std::isfinite(aNum);
- #else
-- return finite(aNum);
-+ return isfinite(aNum);
- #endif
- }
-
diff --git a/community/firefox-esr/APKBUILD b/community/firefox-esr/APKBUILD
index 51fdc5d4ff..85f311917b 100644
--- a/community/firefox-esr/APKBUILD
+++ b/community/firefox-esr/APKBUILD
@@ -1,8 +1,7 @@
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
-# Contributor:
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=firefox-esr
-pkgver=60.7.2
+pkgver=68.0
pkgrel=0
pkgdesc="Firefox web browser - Extended Support Release"
url="https://www.mozilla.org/en-US/firefox/organizations/"
@@ -16,14 +15,14 @@ makedepends="
bsd-compat-headers
bzip2-dev
cargo
+ cbindgen
clang-dev
dbus-glib-dev
ffmpeg-dev
- gconf-dev
gtk+2.0-dev
gtk+3.0-dev
hunspell-dev
- icu-dev
+ icu-dev>=64.2
libevent-dev
libidl-dev
libjpeg-turbo-dev
@@ -36,11 +35,12 @@ makedepends="
libxcomposite-dev
llvm8-dev
mesa-dev
+ nasm
+ nodejs
nspr-dev
- nss-dev>=3.26
+ nss-dev>=3.45
nss-static
- paxmark
- python2
+ python3-dev
sqlite-dev
sed
startup-notification-dev
@@ -52,23 +52,17 @@ makedepends="
source="https://ftp.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefox-"$pkgver"esr.source.tar.xz
stab.h
- fix-rust.patch
fix-fortify-system-wrappers.patch
- fix-fortify-inline.patch
- disable-hunspell_hooks.patch
fix-seccomp-bpf.patch
fix-toolkit.patch
fix-tools.patch
mallinfo.patch
- fix-arm-version-detect.patch
- mozilla-build-arm.patch
disable-moz-stackwalk.patch
+ fix-musl.patch
fix-rust-target.patch
- fix-bug-1261392.patch
- rust-unitialized-field.patch
fix-webrtc-glibcisms.patch
- sandbox-membarrier.patch
+ fix-sandbox-membarrier.patch
firefox.desktop
firefox-safe.desktop"
@@ -174,18 +168,16 @@ build() {
--enable-alsa \
--enable-default-toolkit=cairo-gtk3 \
--enable-official-branding \
- --enable-optimize="$CFLAGS" \
- --enable-pie \
+ --enable-optimize="$CFLAGS -O2" \
--enable-startup-notification \
--enable-system-ffi \
- --enable-system-hunspell \
--enable-system-sqlite \
--enable-ffmpeg \
+ --enable-hardening \
+ --enable-rust-simd \
\
- --with-pthreads \
--with-system-bz2 \
--with-system-icu \
- --with-system-jpeg \
--with-system-libevent \
--with-system-nspr \
--with-system-nss \
@@ -197,19 +189,11 @@ build() {
# FIXME: fix build with --with-system-libvpx and libvpx 1.8.0
# https://bugzilla.mozilla.org/show_bug.cgi?id=1525393
make
-
- # paxmark outside fakeroot
- paxmark -msp dist/bin/xpcshell
-
}
package() {
cd "$builddir"/objdir
- # only used for startupcache creation.
- local paxflags="-msp"
- paxmark "$paxflags" dist/bin/xpcshell
-
make install \
DESTDIR="$pkgdir" \
MOZ_MAKE_FLAGS="$MAKEOPTS"
@@ -229,13 +213,6 @@ package() {
install -m644 ${srcdir}/firefox.desktop ${pkgdir}/usr/share/applications/firefox.desktop
install -m644 ${srcdir}/firefox-safe.desktop ${pkgdir}/usr/share/applications/firefox-safe.desktop
- # firefox currently does not work with mprotect. disable it for now
- local paxflags="-mp"
- [ "$CARCH" = "x86" ] && paxflags="-msp"
-
- paxmark "$paxflags" "$pkgdir"/$_mozappdir/firefox
- paxmark "$paxflags" "$pkgdir"/$_mozappdir/plugin-container
-
# launcher as symlink is broken from firefox-7.0
rm "$pkgdir"/usr/bin/firefox
libgl=$(scanelf -qF '#F%S' /usr/lib/libGL.so)
@@ -251,7 +228,7 @@ __EOF__
cat >> "$pkgdir"/$_mozappdir/browser/defaults/preferences/firefox-branding.js <<- EOF
// Use LANG environment variable to choose locale
- pref("intl.locale.matchOS", true);
+ pref("intl.locale.requested", "");
// Disable default browser checking.
pref("browser.shell.checkDefaultBrowser", false);
@@ -267,23 +244,17 @@ __EOF__
rm -f "$pkgdir"/${_mozappdirdev}/sdk/lib/libxul.so
}
-sha512sums="1258b0bf231b1b5c96b7063f2529ad9cd312cbd043b1d732abbc439093b41833361bbec3b740f3cf70299734035aa0a7db87c6b7b1537b9619b94bebf9b5c22b firefox-60.7.2esr.source.tar.xz
+sha512sums="6f4d4063822080e4e7e1c7ed3eace9ef7c302170ae30437d96ffca969440eaa633b62dc17e6379cd0be9a26c7c6824c090860bf002f0bb57ccf7c59fbc771c93 firefox-68.0esr.source.tar.xz
0b3f1e4b9fdc868e4738b5c81fd6c6128ce8885b260affcb9a65ff9d164d7232626ce1291aaea70132b3e3124f5e13fef4d39326b8e7173e362a823722a85127 stab.h
-845209a7f831c069a1c1d20f88e388423656f7c2f0915b5e7cfb7f47947883d4f9eb2f887b6f10ac5d75d0b323b495b693ec21cd2208ee5071283089bc023f07 fix-rust.patch
2f4f15974d52de4bb273b62a332d13620945d284bbc6fe6bd0a1f58ff7388443bc1d3bf9c82cc31a8527aad92b0cd3a1bc41d0af5e1800e0dcbd7033e58ffd71 fix-fortify-system-wrappers.patch
-09bc32cf9ee81b9cc6bb58ddbc66e6cc5c344badff8de3435cde5848e5a451e0172153231db85c2385ff05b5d9c20760cb18e4138dfc99060a9e960de2befbd5 fix-fortify-inline.patch
-0fcc647af53a3ce21c2bc36e5631eb0935e7243ebb3ab59b5719542cc54a6ac023a4a857b43b75756efb9ed80c0aecaa94dc5679a3b3792f82e87bf2c1af82e1 disable-hunspell_hooks.patch
-3414fd06110e853b01043d5d1090cfe1e6c13e8aa3c9f97a91ba390b37d6e909d3e836dbc9b2c261e636056ac10ca78de07adbd27f68102b979fc533b2f9c560 fix-seccomp-bpf.patch
-892d6a5544c23983a2d62eab954a9b68883e3c0b66e3bdc47255f21ef700bda6fce90657249cbc59f88b1372f4fb83e2f0a7cfd62201d58a5cd6089358223cf3 fix-toolkit.patch
-2024a81e867fba6dbd31971ae7a8a984a4db5d4b5fc6dafba92521ac8e0b3e99cc80f1e0bd079faef0d1bb5cb5ea1040ecb4da085fe2bf2a640f3cc4da3ec5c5 fix-tools.patch
-bdcd1b402d2ec94957ba5d08cbad7b1a7f59c251c311be9095208491a05abb05a956c79f27908e1f26b54a3679387b2f33a51e945b650671ad85c0a2d59a5a29 mallinfo.patch
-015e1ff6dbf920033982b5df95d869a0b7bf56c6964e45e50649ddf46d1ce09563458e45240c3ecb92808662b1300b67507f7af272ba184835d91068a9e7d5b0 fix-arm-version-detect.patch
-e61664bc93eadce5016a06a4d0684b34a05074f1815e88ef2613380d7b369c6fd305fb34f83b5eb18b9e3138273ea8ddcfdcb1084fdcaa922a1e5b30146a3b18 mozilla-build-arm.patch
-251c170504f3418e47feeaee5cc5a7cf7fdf4a5ee0283b1497933fdce1857a3fe299da1178a044d5d39f84ddbca761fb542345f8f183bf62c3557cba4a47a874 disable-moz-stackwalk.patch
-42cc44fda4b05259b38f055d6f51461746aa89a474cedc5e92fb9d20879da0d12b1b515b273a549e7302cda9c7eddde20d5fdba09853e5c658784ad6d0b20078 fix-rust-target.patch
-a50b412edf9573a0bd04a43578b1c927967a616b73a5995eefb15bfa78fd2bd14e36ec05315a0703f6370ecd524e6bcb012e7285beb1245e9add9b8553acb79e fix-bug-1261392.patch
-01b48a708cc6bc6e3cd7cc7b16f5137ec344566ac891d699b65e322bc992726072fa14a54cef1a7775799fcbbcf90a6c170107c8524caba3bc311b42d93b7581 rust-unitialized-field.patch
-75b97d59e81e5f1debe6a459b535da704d5a2ac4a57c446d16058fd18db81e22317fcc3ec11b89f569f4de87e8e80ced027c0e72e7f1dd16f6fd0feb6b263919 fix-webrtc-glibcisms.patch
-e725a6e9b2361cd566ae2f90861dbce9f2231f16721ec02f4b9f9986b7dc82cc006ea6a500ae7f30c095ce746132a5bd1d9532c4cf0d1541dcc672a20aef8807 sandbox-membarrier.patch
+84b84d2d7dbc16002510bf856796ad345ac38ef6d3254670230189bba7c2d4781714d231236d5a3d70129a4597b430c3171644b01ad0f5a5bb13b55d407337a4 fix-seccomp-bpf.patch
+2c65ea7280e6e89826ebad563ee25203a99ff0b4ba8fc60ec261ada6c69874d649c6ac92fcecc6307a6e5a00de27d7956acf944d556ddfadec0411be16f4e0b8 fix-toolkit.patch
+4d55f41d15be7457ad630f8f07e4fc0314c2f75720010b4bbe6a2a7f3228210a1e069949e11795efbe2e784b0762e79fdfe5b8ec38e8a64cb8d9cf3b57dd5af1 fix-tools.patch
+a4a3e062661bda64d502d426c480ac9645345860118de9df9ffe6e0597738c70c11e5cdef2d4fd12c5e2ee30a09310159230524655a419a4f7e4eeeb0f3c06b0 mallinfo.patch
+454ea3263cabce099accbdc47aaf83be26a19f8b5a4568c01a7ef0384601cf8315efd86cd917f9c8bf419c2c845db89a905f3ff9a8eb0c8e41042e93aa96a85c disable-moz-stackwalk.patch
+e0df4fc649012f023443ce9165da29d36459dbca5df64a31008b28d96264fba909858de36d0cf1b1cb1aab898342413f0cd77c90ebe21d1f9a0504631d6d1d0e fix-musl.patch
+676c47e3dc25b059a2efcc7bbb0e7748be7f8a908d1ed6c4d81a0930a35ed28566bdc738b84e13fd11c0e7f07ab1a1969caa06b3acf9b95002eb6b3beb30b82c fix-rust-target.patch
+d35cacb9ede80e6bfbef0709823e536dddfb1c02d776275b0b7adb5969e9927d8c6117df96873569c3f3db0a18ee5db24f8086a9311a05077892be43a3dd8d79 fix-webrtc-glibcisms.patch
+f85f2c19c3dafab915bcb40e580fc442fd9eab5916696849edf0b105c758dd807dfe23a6479935613c81496711eb377c73227c03eb8582204c3442a4d0e397a2 fix-sandbox-membarrier.patch
f3b7c3e804ce04731012a46cb9e9a6b0769e3772aef9c0a4a8c7520b030fdf6cd703d5e9ff49275f14b7d738fe82a0a4fde3bc3219dff7225d5db0e274987454 firefox.desktop
5dcb6288d0444a8a471d669bbaf61cdb1433663eff38b72ee5e980843f5fc07d0d60c91627a2c1159215d0ad77ae3f115dcc5fdfe87e64ca704b641aceaa44ed firefox-safe.desktop"
diff --git a/community/firefox-esr/disable-hunspell_hooks.patch b/community/firefox-esr/disable-hunspell_hooks.patch
deleted file mode 100644
index 1eaa4d0351..0000000000
--- a/community/firefox-esr/disable-hunspell_hooks.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/mozilla-config.h.in 2016-07-06 15:16:06.621880293 +0200
-+++ b/mozilla-config.h.in 2016-07-06 15:16:42.958428126 +0200
-@@ -54,7 +54,7 @@
- * HUNSPELL_STATIC is defined in extensions/spellcheck/hunspell/src/Makefile.in,
- * unless --enable-system-hunspell is defined.
- */
--#if defined(HUNSPELL_STATIC)
-+#if 0
- #include "hunspell_alloc_hooks.h"
- #include "hunspell_fopen_hooks.h"
- #endif
diff --git a/community/firefox-esr/disable-moz-stackwalk.patch b/community/firefox-esr/disable-moz-stackwalk.patch
index 99ac8dee2c..b6bc756d2b 100644
--- a/community/firefox-esr/disable-moz-stackwalk.patch
+++ b/community/firefox-esr/disable-moz-stackwalk.patch
@@ -1,18 +1,18 @@
diff --git a/mozglue/misc/StackWalk.cpp b/mozglue/misc/StackWalk.cpp
-index e39e38b4c..a8b7251c5 100644
+index 7d62921..adcfa44 100644
--- a/mozglue/misc/StackWalk.cpp
+++ b/mozglue/misc/StackWalk.cpp
-@@ -32,13 +32,7 @@ using namespace mozilla;
- #define MOZ_STACKWALK_SUPPORTS_MACOSX 0
+@@ -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
+-# define MOZ_STACKWALK_SUPPORTS_LINUX 1
-#else
- #define MOZ_STACKWALK_SUPPORTS_LINUX 0
+ # define MOZ_STACKWALK_SUPPORTS_LINUX 0
-#endif
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
- #define HAVE___LIBC_STACK_END 1
+ # define HAVE___LIBC_STACK_END 1
diff --git a/community/firefox-esr/fix-arm-version-detect.patch b/community/firefox-esr/fix-arm-version-detect.patch
deleted file mode 100644
index c0c2a2e830..0000000000
--- a/community/firefox-esr/fix-arm-version-detect.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/build/autoconf/arch.m4 b/build/autoconf/arch.m4
-index b62ea71..53179a7 100644
---- a/build/autoconf/arch.m4
-+++ b/build/autoconf/arch.m4
-@@ -215,7 +215,7 @@ if test "$CPU_ARCH" = "arm"; then
-
- AC_MSG_CHECKING(ARM version support in compiler)
- dnl Determine the target ARM architecture (5 for ARMv5, v5T, v5E, etc.; 6 for ARMv6, v6K, etc.)
-- ARM_ARCH=`${CC-cc} ${CFLAGS} -dM -E - < /dev/null | sed -n 's/.*__ARM_ARCH_\([[0-9]][[0-9]]*\).*/\1/p'`
-+ ARM_ARCH=`${CC-cc} ${CFLAGS} -dM -E - < /dev/null | sed -n 's/.*__ARM_ARCH_\([[0-9]][[0-9]]*\).*/\1/p' | head -n 1`
- AC_MSG_RESULT("$ARM_ARCH")
-
- AC_MSG_CHECKING(for ARM NEON support in compiler)
diff --git a/community/firefox-esr/fix-bug-1261392.patch b/community/firefox-esr/fix-bug-1261392.patch
deleted file mode 100644
index 1f7a36af3b..0000000000
--- a/community/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 glibc doesn't provide a
--// wrapper for it.
--#if defined(__GLIBC__)
-+// We need a definition of gettid(), but Linux libc implementations don't
-+// provide a wrapper for it (except for Bionic)
-+#if defined(__linux__)
- #include <unistd.h>
-+#if !defined(__BIONIC__)
- #include <sys/syscall.h>
- static inline pid_t gettid()
- {
-@@ -71,6 +72,7 @@
- return (pid_t) syscall(SYS_thread_selfid);
- }
- #endif
-+#endif
-
- #ifdef XP_WIN
- #include <windows.h>
diff --git a/community/firefox-esr/fix-fortify-inline.patch b/community/firefox-esr/fix-fortify-inline.patch
deleted file mode 100644
index 2498c57fc7..0000000000
--- a/community/firefox-esr/fix-fortify-inline.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/media/webrtc/signaling/src/sdp/sipcc/sdp_os_defs.h
-+++ b/media/webrtc/signaling/src/sdp/sipcc/sdp_os_defs.h
-@@ -27,8 +27,5 @@
- typedef int16_t int16;
- typedef unsigned short ushort;
- typedef unsigned long ulong;
--#ifndef __GNUC_STDC_INLINE__
--#define inline
--#endif
-
- #endif /* _SDP_OS_DEFS_H_ */
diff --git a/community/firefox-esr/fix-musl.patch b/community/firefox-esr/fix-musl.patch
new file mode 100644
index 0000000000..996a45f130
--- /dev/null
+++ b/community/firefox-esr/fix-musl.patch
@@ -0,0 +1,11 @@
+--- a/tools/profiler/core/platform-linux-android.cpp 2019-07-09 22:58:30.039475686 +0200
++++ b/tools/profiler/core/platform-linux-android.cpp 2019-07-09 22:58:39.331437677 +0200
+@@ -73,7 +73,7 @@
+
+ int profiler_current_thread_id() {
+ // glibc doesn't provide a wrapper for gettid().
+-#if defined(__GLIBC__)
++#if defined(__linux__)
+ return static_cast<int>(static_cast<pid_t>(syscall(SYS_gettid)));
+ #else
+ return static_cast<int>(gettid());
diff --git a/community/firefox-esr/fix-rust-target.patch b/community/firefox-esr/fix-rust-target.patch
index 7dd760ca1d..8c4b6739ab 100644
--- a/community/firefox-esr/fix-rust-target.patch
+++ b/community/firefox-esr/fix-rust-target.patch
@@ -1,6 +1,6 @@
--- a/build/moz.configure/rust.configure
+++ b/build/moz.configure/rust.configure
-@@ -181,9 +181,11 @@
+@@ -280,9 +280,11 @@
die("Don't know how to translate {} for rustc".format(
host_or_target.alias))
@@ -13,7 +13,7 @@
in_fd, in_path = mkstemp(prefix='conftest', suffix='.rs')
out_fd, out_path = mkstemp(prefix='conftest', suffix='.rlib')
os.close(out_fd)
-@@ -220,7 +222,7 @@
+@@ -319,7 +321,7 @@
os.remove(out_path)
# This target is usable.
diff --git a/community/firefox-esr/fix-rust.patch b/community/firefox-esr/fix-rust.patch
deleted file mode 100644
index d3e6546c10..0000000000
--- a/community/firefox-esr/fix-rust.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-This fixes build errors under recent Rust.
-
-Taken from void linux: https://github.com/void-linux/void-packages/commit/5fb88cfb0a16ceb873d41560ccd8fd863ced9279
-
---- a/servo/components/style_traits/lib.rs
-+++ b/servo/components/style_traits/lib.rs
-@@ -9,7 +9,7 @@
- #![crate_name = "style_traits"]
- #![crate_type = "rlib"]
-
--#![deny(unsafe_code, missing_docs)]
-+#![deny(unsafe_code)]
-
- extern crate app_units;
- #[macro_use] extern crate bitflags;
---- a/servo/components/style/lib.rs
-+++ b/servo/components/style/lib.rs
-@@ -23,8 +23,6 @@
- //! [cssparser]: ../cssparser/index.html
- //! [selectors]: ../selectors/index.html
-
--#![deny(missing_docs)]
--
- extern crate app_units;
- extern crate arrayvec;
- extern crate atomic_refcell;
diff --git a/community/firefox-esr/sandbox-membarrier.patch b/community/firefox-esr/fix-sandbox-membarrier.patch
index 24b70ca401..4bd3b80d2a 100644
--- a/community/firefox-esr/sandbox-membarrier.patch
+++ b/community/firefox-esr/fix-sandbox-membarrier.patch
@@ -4,7 +4,7 @@ Taken from voidlinux: https://github.com/void-linux/void-packages/commit/4198411
--- a/security/sandbox/linux/SandboxFilter.cpp
+++ b/security/sandbox/linux/SandboxFilter.cpp
-@@ -283,6 +283,8 @@
+@@ -572,6 +572,8 @@
case __NR_set_tid_address:
return Allow();
#endif
diff --git a/community/firefox-esr/fix-seccomp-bpf.patch b/community/firefox-esr/fix-seccomp-bpf.patch
index c44d9ea48e..de7bd175ee 100644
--- a/community/firefox-esr/fix-seccomp-bpf.patch
+++ b/community/firefox-esr/fix-seccomp-bpf.patch
@@ -1,7 +1,5 @@
-diff --git a/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc b/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc
-index 003708d2c..79488795d 100644
---- a/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc
-+++ b/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc
+--- a/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc 2018-12-14 08:53:46.083976137 +0000
++++ b/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc 2018-12-14 08:51:22.084596411 +0000
@@ -25,6 +25,11 @@
#include "sandbox/linux/system_headers/linux_seccomp.h"
#include "sandbox/linux/system_headers/linux_signal.h"
@@ -14,15 +12,3 @@ index 003708d2c..79488795d 100644
namespace {
struct arch_sigsys {
-diff --git a/security/sandbox/linux/SandboxFilter.cpp b/security/sandbox/linux/SandboxFilter.cpp
-index 0f59f2a87..5c07dbb31 100644
---- a/security/sandbox/linux/SandboxFilter.cpp
-+++ b/security/sandbox/linux/SandboxFilter.cpp
-@@ -989,6 +989,7 @@ class ContentSandboxPolicy : public SandboxPolicyCommon {
- // ffmpeg, and anything else that calls isatty(), will be told
- // that nothing is a typewriter:
- .ElseIf(request == TCGETS, Error(ENOTTY))
-+ .ElseIf(request == TIOCGWINSZ, Error(ENOTTY))
- // Allow anything that isn't a tty ioctl, for now; bug 1302711
- // will cover changing this to a default-deny policy.
- .ElseIf(shifted_type != kTtyIoctls, Allow())
diff --git a/community/firefox-esr/fix-stack-overflow.patch b/community/firefox-esr/fix-stack-overflow.patch
deleted file mode 100644
index e164fc69b6..0000000000
--- a/community/firefox-esr/fix-stack-overflow.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-https://bugs.alpinelinux.org/issues/5559
-https://bugzilla.mozilla.org/show_bug.cgi?id=1274732
-
-diff --git a/netwerk/streamconv/converters/nsHTTPCompressConv.cpp b/netwerk/streamconv/converters/nsHTTPCompressConv.cpp
-index 1193529..aeb96b5 100644
---- a/netwerk/streamconv/converters/nsHTTPCompressConv.cpp
-+++ b/netwerk/streamconv/converters/nsHTTPCompressConv.cpp
-@@ -165,9 +165,8 @@ nsHTTPCompressConv::BrotliHandler(nsIInputStream *stream, void *closure, const c
- nsHTTPCompressConv *self = static_cast<nsHTTPCompressConv *>(closure);
- *countRead = 0;
-
-- const uint32_t kOutSize = 128 * 1024; // just a chunk size, we call in a loop
-- unsigned char outBuffer[kOutSize];
-- unsigned char *outPtr;
-+ const size_t kOutSize = 128 * 1024; // just a chunk size, we call in a loop
-+ uint8_t *outPtr;
- size_t outSize;
- size_t avail = aAvail;
- BrotliResult res;
-@@ -177,9 +176,15 @@ nsHTTPCompressConv::BrotliHandler(nsIInputStream *stream, void *closure, const c
- return NS_OK;
- }
-
-+ auto outBuffer = MakeUniqueFallible<uint8_t[]>(kOutSize);
-+ if (outBuffer == nullptr) {
-+ self->mBrotli->mStatus = NS_ERROR_OUT_OF_MEMORY;
-+ return self->mBrotli->mStatus;
-+ }
-+
- do {
- outSize = kOutSize;
-- outPtr = outBuffer;
-+ outPtr = outBuffer.get();
-
- // brotli api is documented in brotli/dec/decode.h and brotli/dec/decode.c
- LOG(("nsHttpCompresssConv %p brotlihandler decompress %d\n", self, avail));
-@@ -210,7 +215,7 @@ nsHTTPCompressConv::BrotliHandler(nsIInputStream *stream, void *closure, const c
- nsresult rv = self->do_OnDataAvailable(self->mBrotli->mRequest,
- self->mBrotli->mContext,
- self->mBrotli->mSourceOffset,
-- reinterpret_cast<const char *>(outBuffer),
-+ reinterpret_cast<const char *>(outBuffer.get()),
- outSize);
- LOG(("nsHttpCompressConv %p BrotliHandler ODA rv=%x", self, rv));
- if (NS_FAILED(rv)) {
diff --git a/community/firefox-esr/fix-toolkit.patch b/community/firefox-esr/fix-toolkit.patch
index 6cd48dde8b..414734dfec 100644
--- a/community/firefox-esr/fix-toolkit.patch
+++ b/community/firefox-esr/fix-toolkit.patch
@@ -1,6 +1,7 @@
-diff -upr /tmp/firefox-60.5.0.orig/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc firefox-60.5.0/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc
---- /tmp/firefox-60.5.0.orig/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc 2019-02-11 18:55:48.607258656 +0100
-+++ firefox-60.5.0/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc 2019-02-11 20:57:51.386533134 +0100
+diff --git a/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc b/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc
+index 4222ce3..4d40c6a 100644
+--- a/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc
++++ b/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc
@@ -46,6 +46,7 @@
#include <sys/mman.h>
#include <sys/stat.h>
@@ -9,9 +10,10 @@ diff -upr /tmp/firefox-60.5.0.orig/toolkit/crashreporter/google-breakpad/src/com
#include <iostream>
#include <set>
-diff -upr /tmp/firefox-60.5.0.orig/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc firefox-60.5.0/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc
---- /tmp/firefox-60.5.0.orig/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc 2019-02-11 18:55:48.610591990 +0100
-+++ firefox-60.5.0/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc 2019-02-11 20:57:51.386533134 +0100
+diff --git a/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc b/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc
+index 6019fc7..5953e32 100644
+--- a/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc
++++ b/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc
@@ -41,6 +41,10 @@
#include "common/using_std_string.h"
@@ -23,9 +25,10 @@ diff -upr /tmp/firefox-60.5.0.orig/toolkit/crashreporter/google-breakpad/src/com
using std::vector;
namespace google_breakpad {
-diff -upr /tmp/firefox-60.5.0.orig/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h firefox-60.5.0/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h
---- /tmp/firefox-60.5.0.orig/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h 2019-02-11 18:55:48.610591990 +0100
-+++ firefox-60.5.0/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h 2019-02-11 20:57:51.389866466 +0100
+diff --git a/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h b/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h
+index 98ee2dd..d57aa68 100644
+--- a/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h
++++ b/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h
@@ -55,7 +55,7 @@
#ifdef HAVE_MACH_O_NLIST_H
@@ -35,10 +38,11 @@ diff -upr /tmp/firefox-60.5.0.orig/toolkit/crashreporter/google-breakpad/src/com
#include <a.out.h>
#endif
-diff -upr /tmp/firefox-60.5.0.orig/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h firefox-60.5.0/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h
---- /tmp/firefox-60.5.0.orig/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h 2019-02-11 18:55:48.647258669 +0100
-+++ firefox-60.5.0/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h 2019-02-11 19:01:23.614038547 +0100
-@@ -1210,6 +1210,12 @@ struct kernel_statfs {
+diff --git a/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h b/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h
+index 93fdad7..f34e5e0 100644
+--- a/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h
++++ b/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h
+@@ -1239,6 +1239,12 @@ struct kernel_statfs {
#ifndef __NR_fallocate
#define __NR_fallocate 285
#endif
@@ -51,30 +55,32 @@ diff -upr /tmp/firefox-60.5.0.orig/toolkit/crashreporter/google-breakpad/src/thi
/* End of x86-64 definitions */
#elif defined(__mips__)
#if _MIPS_SIM == _MIPS_SIM_ABI32
-diff -upr /tmp/firefox-60.5.0.orig/toolkit/mozapps/update/common/updatedefines.h firefox-60.5.0/toolkit/mozapps/update/common/updatedefines.h
---- /tmp/firefox-60.5.0.orig/toolkit/mozapps/update/common/updatedefines.h 2019-02-11 18:55:49.287258893 +0100
-+++ firefox-60.5.0/toolkit/mozapps/update/common/updatedefines.h 2019-02-11 20:58:30.753178073 +0100
-@@ -100,7 +100,7 @@ static inline int mywcsprintf(WCHAR* des
+diff --git a/toolkit/mozapps/update/common/updatedefines.h b/toolkit/mozapps/update/common/updatedefines.h
+index 79276f7..4c67976 100644
+--- a/toolkit/mozapps/update/common/updatedefines.h
++++ b/toolkit/mozapps/update/common/updatedefines.h
+@@ -87,7 +87,7 @@ static inline int mywcsprintf(WCHAR* dest, size_t count, const WCHAR* fmt,
+
+ # ifdef SOLARIS
+ # include <sys/stat.h>
+-# else
++# elif !defined(__linux__) || defined(__GLIBC__)
+ # include <fts.h>
+ # endif
+ # include <dirent.h>
+diff --git a/toolkit/mozapps/update/updater/updater.cpp b/toolkit/mozapps/update/updater/updater.cpp
+index 257ccb4..01314e4 100644
+--- a/toolkit/mozapps/update/updater/updater.cpp
++++ b/toolkit/mozapps/update/updater/updater.cpp
+@@ -3978,6 +3978,7 @@
- #ifdef SOLARIS
- #include <sys/stat.h>
--#else
-+#elif !defined(__linux__) || defined(__GLIBC__)
- #include <fts.h>
- #endif
- #include <dirent.h>
-diff -upr /tmp/firefox-60.5.0.orig/toolkit/mozapps/update/updater/updater.cpp firefox-60.5.0/toolkit/mozapps/update/updater/updater.cpp
---- /tmp/firefox-60.5.0.orig/toolkit/mozapps/update/updater/updater.cpp 2019-02-11 18:55:49.283925558 +0100
-+++ firefox-60.5.0/toolkit/mozapps/update/updater/updater.cpp 2019-02-11 20:57:57.303196520 +0100
-@@ -3733,6 +3733,7 @@ int add_dir_entries(const NS_tchar *dirp
-
- int add_dir_entries(const NS_tchar *dirpath, ActionList *list) {
+ int add_dir_entries(const NS_tchar* dirpath, ActionList* list) {
int rv = OK;
+#if !defined(__linux__) || defined(__GLIBC__)
- FTS *ftsdir;
- FTSENT *ftsdirEntry;
+ FTS* ftsdir;
+ FTSENT* ftsdirEntry;
mozilla::UniquePtr<NS_tchar[]> searchpath(get_full_path(dirpath));
-@@ -3833,6 +3834,7 @@ int add_dir_entries(const NS_tchar *dirp
+@@ -4085,6 +4086,7 @@
}
fts_close(ftsdir);
diff --git a/community/firefox-esr/fix-tools.patch b/community/firefox-esr/fix-tools.patch
index fdb08845d9..93b9d19c84 100644
--- a/community/firefox-esr/fix-tools.patch
+++ b/community/firefox-esr/fix-tools.patch
@@ -1,33 +1,26 @@
-diff -upr /tmp/firefox-60.5.0.orig/tools/profiler/core/platform-linux-android.cpp firefox-60.5.0/tools/profiler/core/platform-linux-android.cpp
---- /tmp/firefox-60.5.0.orig/tools/profiler/core/platform-linux-android.cpp 2019-02-11 18:55:48.543925300 +0100
-+++ firefox-60.5.0/tools/profiler/core/platform-linux-android.cpp 2019-02-12 10:00:02.735569929 +0100
-@@ -497,8 +497,10 @@ static void PlatformInit(PSLockRef aLock
+diff --git a/tools/profiler/core/platform-linux-android.cpp b/tools/profiler/core/platform-linux-android.cpp
+index 19d0a5c56d..b64b543066 100644
+--- a/tools/profiler/core/platform-linux-android.cpp
++++ b/tools/profiler/core/platform-linux-android.cpp
+@@ -506,8 +506,10 @@ static void PlatformInit(PSLockRef aLock) {}
ucontext_t sSyncUContext;
void Registers::SyncPopulate() {
-+#if defined(__GLIBC__)
- if (!getcontext(&sSyncUContext)) {
- PopulateRegsFromContext(*this, &sSyncUContext);
- }
-+#endif
+- if (!getcontext(&sSyncUContext)) {
+- PopulateRegsFromContext(*this, &sSyncUContext);
+- }
++ #if defined(__GLIBC__)
++ if (!getcontext(&sSyncUContext)) {
++ PopulateRegsFromContext(*this, &sSyncUContext);
++ }
++ #endif
}
#endif
-diff -upr /tmp/firefox-60.5.0.orig/tools/profiler/core/platform.h firefox-60.5.0/tools/profiler/core/platform.h
---- /tmp/firefox-60.5.0.orig/tools/profiler/core/platform.h 2019-02-11 18:55:48.540591965 +0100
-+++ firefox-60.5.0/tools/profiler/core/platform.h 2019-02-12 10:00:02.735569929 +0100
-@@ -29,6 +29,8 @@
- #ifndef TOOLS_PLATFORM_H_
- #define TOOLS_PLATFORM_H_
-
-+#include <sys/types.h>
-+
- #include <stdint.h>
- #include <math.h>
- #include "MainThreadUtils.h"
-diff -upr /tmp/firefox-60.5.0.orig/tools/profiler/lul/LulElf.cpp firefox-60.5.0/tools/profiler/lul/LulElf.cpp
---- /tmp/firefox-60.5.0.orig/tools/profiler/lul/LulElf.cpp 2019-02-11 18:55:48.547258635 +0100
-+++ firefox-60.5.0/tools/profiler/lul/LulElf.cpp 2019-02-12 10:00:59.802296448 +0100
-@@ -459,10 +459,10 @@ string FormatIdentifier(unsigned char id
+diff --git a/tools/profiler/lul/LulElf.cpp b/tools/profiler/lul/LulElf.cpp
+index 9998d04d0d..348a7086fc 100644
+--- a/tools/profiler/lul/LulElf.cpp
++++ b/tools/profiler/lul/LulElf.cpp
+@@ -469,10 +469,10 @@ string FormatIdentifier(unsigned char identifier[16]) {
// Return the non-directory portion of FILENAME: the portion after the
// last slash, or the whole filename if there are no slashes.
string BaseFileName(const string& filename) {
diff --git a/community/firefox-esr/fix-webrtc-glibcisms.patch b/community/firefox-esr/fix-webrtc-glibcisms.patch
index dc9206b50e..658b076dc8 100644
--- a/community/firefox-esr/fix-webrtc-glibcisms.patch
+++ b/community/firefox-esr/fix-webrtc-glibcisms.patch
@@ -1,13 +1,20 @@
--- ./media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c.orig 2018-05-09 23:48:44.677389171 +0200
+++ ./media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c 2018-05-09 23:48:56.254373557 +0200
-@@ -11,7 +11,9 @@
- #include <stdlib.h>
- #include <string.h>
- #include <features.h>
+@@ -14,7 +14,7 @@
+ #ifndef __GLIBC_PREREQ
+ #define __GLIBC_PREREQ(a, b) 0
+ #endif
-#if __GLIBC_PREREQ(2, 16)
-+#if !defined(__GLIBC__)
-+#include <sys/auxv.h>
-+#elif __GLIBC_PREREQ(2, 16)
++#if !__GLIBC__ || __GLIBC_PREREQ(2, 16)
#include <sys/auxv.h>
#else
#include <fcntl.h>
+@@ -32,7 +32,7 @@
+ int architecture = 0;
+ unsigned long hwcap = 0;
+ const char* platform = NULL;
+-#if __GLIBC_PREREQ(2, 16)
++#if !__GLIBC__ || __GLIBC_PREREQ(2, 16)
+ hwcap = getauxval(AT_HWCAP);
+ platform = (const char*)getauxval(AT_PLATFORM);
+ #else
diff --git a/community/firefox-esr/mallinfo.patch b/community/firefox-esr/mallinfo.patch
index 9959b52a4c..7916a200ca 100644
--- a/community/firefox-esr/mallinfo.patch
+++ b/community/firefox-esr/mallinfo.patch
@@ -1,20 +1,20 @@
diff --git a/xpcom/base/nsMemoryReporterManager.cpp b/xpcom/base/nsMemoryReporterManager.cpp
-index 89ee563..eab8cd7 100644
+index 865e1b5430..9a00dafecb 100644
--- a/xpcom/base/nsMemoryReporterManager.cpp
+++ b/xpcom/base/nsMemoryReporterManager.cpp
-@@ -153,6 +153,7 @@ ResidentUniqueDistinguishedAmount(int64_t* aN)
+@@ -124,6 +124,7 @@ static MOZ_MUST_USE nsresult ResidentUniqueDistinguishedAmount(int64_t* aN) {
return GetProcSelfSmapsPrivate(aN);
}
-
+
+#ifdef __GLIBC__
- #define HAVE_SYSTEM_HEAP_REPORTER 1
- nsresult
- SystemHeapSize(int64_t* aSizeOut)
-@@ -172,6 +173,7 @@ SystemHeapSize(int64_t* aSizeOut)
- *aSizeOut = size_t(info.hblkhd) + size_t(info.uordblks);
- return NS_OK;
+ # 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__) \
+
+ #elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
+ defined(__OpenBSD__) || defined(__FreeBSD_kernel__)
diff --git a/community/firefox-esr/mozilla-build-arm.patch b/community/firefox-esr/mozilla-build-arm.patch
deleted file mode 100644
index dcf2f6d8a4..0000000000
--- a/community/firefox-esr/mozilla-build-arm.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./gfx/ycbcr/moz.build.orig 2014-04-03 13:50:38.990296661 +0000
-+++ ./gfx/ycbcr/moz.build 2014-04-03 13:52:26.878268547 +0000
-@@ -59,7 +59,7 @@
- 'yuv_row_other.cpp',
- ]
-
--if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['HAVE_ARM_NEON']:
-+if CONFIG['HAVE_ARM_NEON']:
- SOURCES += [
- 'yuv_row_arm.s',
- ]
diff --git a/community/firefox-esr/rust-unitialized-field.patch b/community/firefox-esr/rust-unitialized-field.patch
deleted file mode 100644
index 67ef3a02ab..0000000000
--- a/community/firefox-esr/rust-unitialized-field.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- ./media/audioipc/audioipc/src/cmsg.rs.orig 2018-05-09 22:19:14.748631939 +0200
-+++ ./media/audioipc/audioipc/src/cmsg.rs 2018-05-09 22:19:22.961620862 +0200
-@@ -106,11 +106,11 @@ impl ControlMsgBuilder {
- return Err(Error::NoSpace);
- }
-
-- let cmsghdr = cmsghdr {
-- cmsg_len: cmsg_len as _,
-- cmsg_level: level,
-- cmsg_type: kind,
-- };
-+ use std::mem;
-+ let mut cmsghdr: cmsghdr = unsafe { mem::zeroed() };
-+ cmsghdr.cmsg_len = cmsg_len as _;
-+ cmsghdr.cmsg_level = level;
-+ cmsghdr.cmsg_type = kind;
-
- let cmsghdr = unsafe {
- slice::from_raw_parts(&cmsghdr as *const _ as *const _, mem::size_of::<cmsghdr>())