From 7e130731a332e3d5d593b52869e2f4e02da33f59 Mon Sep 17 00:00:00 2001 From: J0WI Date: Sat, 26 Oct 2019 17:04:12 +0200 Subject: testing/thunderbird: upgrade to 68.2.0 --- .../thunderbird/0002-Use-C99-math-isfinite.patch | 17 ---- .../thunderbird/0003-Disable-ccache-stats.patch | 20 ---- testing/thunderbird/APKBUILD | 113 ++++++++------------- testing/thunderbird/disable-ccache-stats.patch | 20 ++++ testing/thunderbird/disable-moz-stackwalk.patch | 12 ++- testing/thunderbird/fix-bug-1261392.patch | 27 ----- testing/thunderbird/fix-fortify-inline.patch | 11 -- testing/thunderbird/fix-musl.patch | 11 ++ testing/thunderbird/fix-rust-target.patch | 8 +- testing/thunderbird/fix-sandbox-membarrier.patch | 54 ++++++++++ testing/thunderbird/fix-seccomp-bpf.patch | 16 +-- testing/thunderbird/fix-stack-overflow.patch | 45 -------- testing/thunderbird/fix-toolkit.patch | 34 +++---- testing/thunderbird/fix-tools.patch | 48 ++++----- testing/thunderbird/fix-webrtc-glibcisms.patch | 25 +++-- testing/thunderbird/mallinfo.patch | 24 +++-- testing/thunderbird/mozilla-build-arm.patch | 11 -- testing/thunderbird/rust-cssparser.patch | 92 ----------------- testing/thunderbird/rust-unitialized-field.patch | 19 ---- testing/thunderbird/rust133.patch | 24 ----- testing/thunderbird/sandbox-membarrier.patch | 54 ---------- 21 files changed, 206 insertions(+), 479 deletions(-) delete mode 100644 testing/thunderbird/0002-Use-C99-math-isfinite.patch delete mode 100644 testing/thunderbird/0003-Disable-ccache-stats.patch create mode 100644 testing/thunderbird/disable-ccache-stats.patch delete mode 100644 testing/thunderbird/fix-bug-1261392.patch delete mode 100644 testing/thunderbird/fix-fortify-inline.patch create mode 100644 testing/thunderbird/fix-musl.patch create mode 100644 testing/thunderbird/fix-sandbox-membarrier.patch delete mode 100644 testing/thunderbird/fix-stack-overflow.patch delete mode 100644 testing/thunderbird/mozilla-build-arm.patch delete mode 100644 testing/thunderbird/rust-cssparser.patch delete mode 100644 testing/thunderbird/rust-unitialized-field.patch delete mode 100644 testing/thunderbird/rust133.patch delete mode 100644 testing/thunderbird/sandbox-membarrier.patch (limited to 'testing') diff --git a/testing/thunderbird/0002-Use-C99-math-isfinite.patch b/testing/thunderbird/0002-Use-C99-math-isfinite.patch deleted file mode 100644 index ba4f5cfb3d..0000000000 --- a/testing/thunderbird/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/testing/thunderbird/0003-Disable-ccache-stats.patch b/testing/thunderbird/0003-Disable-ccache-stats.patch deleted file mode 100644 index 82ca2aa1cb..0000000000 --- a/testing/thunderbird/0003-Disable-ccache-stats.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/python/mozbuild/mozbuild/controller/building.py 2019-07-03 15:25:28.000000000 +0000 -+++ b/python/mozbuild/mozbuild/controller/building.py 2019-07-17 02:49:12.693079588 +0000 -@@ -940,7 +940,7 @@ class BuildDriver(MozbuildObject): - warnings_path = self._get_state_filename('warnings.json') - monitor = self._spawn(BuildMonitor) - monitor.init(warnings_path) -- ccache_start = monitor.ccache_stats() -+ ccache_start = None # monitor.ccache_stats() - footer = BuildProgressFooter(self.log_manager.terminal, monitor) - - # Disable indexing in objdir because it is not necessary and can slow -@@ -1158,7 +1158,7 @@ class BuildDriver(MozbuildObject): - if high_finder: - print(FINDER_SLOW_MESSAGE % finder_percent) - -- ccache_end = monitor.ccache_stats() -+ ccache_end = None # monitor.ccache_stats() - - ccache_diff = None - if ccache_start and ccache_end: diff --git a/testing/thunderbird/APKBUILD b/testing/thunderbird/APKBUILD index 191fcf8c8b..a610b5e845 100644 --- a/testing/thunderbird/APKBUILD +++ b/testing/thunderbird/APKBUILD @@ -2,13 +2,13 @@ # Maintainer: Joseph Benden pkgname=thunderbird -pkgver=60.9.0 +pkgver=68.2.0 _pkgver=$pkgver _xulver=$pkgver pkgrel=0 pkgdesc="Thunderbird email client" url="https://www.thunderbird.net/" -arch="x86_64" +arch="x86_64 aarch64" # limited by rust and cargo license="GPL-3.0-or-later AND LGPL-2.1-or-later AND MPL-2.0" options="!check !strip" depends=" @@ -56,17 +56,16 @@ makedepends=" libtheora-dev libtool libvorbis-dev - libvpx-dev libxcomposite-dev libxt-dev - llvm-dev + llvm9-dev mesa-dev nasm nodejs nspr-dev nss-dev nss-static - paxmark + python2 python3-dev sed sqlite-dev @@ -77,38 +76,23 @@ makedepends=" " source="https://ftp.mozilla.org/pub/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.xz stab.h + + disable-ccache-stats.patch fix-fortify-system-wrappers.patch - fix-fortify-inline.patch fix-seccomp-bpf.patch fix-toolkit.patch fix-tools.patch mallinfo.patch - mozilla-build-arm.patch + disable-moz-stackwalk.patch + fix-musl.patch fix-rust-target.patch - fix-bug-1261392.patch fix-webrtc-glibcisms.patch - sandbox-membarrier.patch - rust-unitialized-field.patch - rust133.patch - 0003-Disable-ccache-stats.patch - rust-cssparser.patch + fix-sandbox-membarrier.patch thunderbird.desktop " _mozappdir=/usr/lib/$pkgname -# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) -# Note: These are for Arch Linux use ONLY. For your own distribution, please -# get your own set of keys. Feel free to contact foutrelis@archlinux.org for -# more information. -_google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM - -# Mozilla API keys (see https://location.services.mozilla.com/api) -# Note: These are for Arch Linux use ONLY. For your own distribution, please -# get your own set of keys. Feel free to contact heftig@archlinux.org for -# more information. -_mozilla_api_key=16674381-f021-49de-8622-3021c5942aff - # help our shared-object scanner to find the libs ldpath="$_mozappdir" sonameprefix="$pkgname:" @@ -129,14 +113,11 @@ prepare() { mkdir -p "$builddir"/objdir echo "ac_add_options BINDGEN_CFLAGS='-I/usr/include/nspr -I/usr/include/pixman-1'" >>objdir/.mozconfig - # add API keys - echo -n "${_google_api_key}" > $builddir/objdir/google-api-key - echo -n "${_mozilla_api_key}" > $builddir/objdir/mozilla-api-key - _clear_vendor_checksums cssparser } build() { + mkdir -p "$builddir"/objdir cd "$builddir"/objdir sed -e 's/checkImpl/checkFFImpl/g' -i ../js/src/vm/JSContext*.h @@ -158,18 +139,29 @@ build() { export CXXFLAGS="$CXXFLAGS -Wno-class-memaccess -Wno-multistatement-macros -Wno-ignored-qualifiers" export LDFLAGS="$LDFLAGS -Wno-subobject-linkage" - ../mach configure \ + case "$CARCH" in + x86_64) + # disable-elf-hack: exists only on arm, x86, x86_64 + _arch_config="--disable-elf-hack" + export RUST_TARGET="$CTARGET" + ;; + aarch64) + export RUST_TARGET="aarch64-unknown-linux-musl" + ;; + esac + + ../configure \ --prefix=/usr \ --libdir=/usr/lib \ + $_arch_config \ \ --disable-crashreporter \ - --disable-elf-hack \ --disable-gold \ - --enable-install-strip \ + --disable-install-strip \ --disable-jemalloc \ --disable-profiling \ --disable-pulseaudio \ - --enable-strip \ + --disable-strip \ --disable-tests \ --disable-updater \ --disable-debug \ @@ -180,22 +172,17 @@ build() { --enable-application=comm/mail \ --enable-default-toolkit=cairo-gtk3 \ --enable-official-branding \ - --enable-optimize="$CFLAGS -fno-ident -fmerge-all-constants -ffunction-sections -fdata-sections -Wno-maybe-uninitialized -Wno-implicit-fallthrough -Wno-unused-function" \ + --enable-optimize="$CFLAGS -O2 -fno-ident -fmerge-all-constants -ffunction-sections -fdata-sections -Wno-maybe-uninitialized -Wno-implicit-fallthrough -Wno-unused-function" \ --enable-release \ --enable-startup-notification \ --enable-system-ffi \ --enable-system-sqlite \ --enable-ffmpeg \ --enable-hardening \ - \ - --with-google-location-service-api-keyfile="${builddir}/objdir/google-api-key" \ - --with-google-safebrowsing-api-keyfile="${builddir}/objdir/google-api-key" \ - --with-mozilla-api-keyfile="${builddir}/objdir/mozilla-api-key" \ + --enable-rust-simd \ \ --with-system-bz2 \ - --with-system-hunspell \ --with-system-icu \ - --with-system-jpeg \ --with-system-libevent \ --with-system-nspr \ --with-system-nss \ @@ -205,9 +192,9 @@ build() { --without-ccache \ --with-clang-path=/usr/bin/clang \ --with-libclang-path=/usr/lib - #--with-system-libvpx # requires 1.7x to work, we've got 1.8.0 currently - - ../mach build -v + # FIXME: fix build with --with-system-libvpx and libvpx 1.8.0 + # https://bugzilla.mozilla.org/show_bug.cgi?id=1525393 + make } package() { @@ -233,14 +220,6 @@ package() { install -m644 ${srcdir}/$pkgname.desktop ${pkgdir}/usr/share/applications/$pkgname.desktop - # thunderbird currently does not work with mprotect. disable it for now - local paxflags="-mp" - [ "$CARCH" = "x86" ] && paxflags="-msp" - - paxmark "$paxflags" "$pkgdir"/$_mozappdir/thunderbird-bin - paxmark "$paxflags" "$pkgdir"/$_mozappdir/plugin-container - paxmark "$paxflags" "$pkgdir"/$_mozappdir/pingsender - _vendorjs="$pkgdir/usr/lib/$pkgname/defaults/preferences/vendor.js" install -Dm644 /dev/stdin "$_vendorjs" < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) - #define HAVE___LIBC_STACK_END 1 + # define HAVE___LIBC_STACK_END 1 diff --git a/testing/thunderbird/fix-bug-1261392.patch b/testing/thunderbird/fix-bug-1261392.patch deleted file mode 100644 index acf56e1ece..0000000000 --- a/testing/thunderbird/fix-bug-1261392.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/tools/profiler/core/platform.h b/tools/profiler/core/platform.h -index 5f0fb69..086a511 100644 ---- a/tools/profiler/core/platform.h -+++ b/tools/profiler/core/platform.h -@@ -42,10 +42,11 @@ - #include "PlatformMacros.h" - #include - --// 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 -+#if !defined(__BIONIC__) - #include - static inline pid_t gettid() { return (pid_t)syscall(SYS_gettid); } - #elif defined(GP_OS_darwin) -@@ -61,6 +62,7 @@ static inline pid_t gettid() { return (pid_t)syscall(SYS_thread_selfid); } - #define getpid _getpid - #endif - #endif -+#endif - - extern mozilla::LazyLogModule gProfilerLog; - diff --git a/testing/thunderbird/fix-fortify-inline.patch b/testing/thunderbird/fix-fortify-inline.patch deleted file mode 100644 index 2498c57fc7..0000000000 --- a/testing/thunderbird/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/testing/thunderbird/fix-musl.patch b/testing/thunderbird/fix-musl.patch new file mode 100644 index 0000000000..996a45f130 --- /dev/null +++ b/testing/thunderbird/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(static_cast(syscall(SYS_gettid))); + #else + return static_cast(gettid()); diff --git a/testing/thunderbird/fix-rust-target.patch b/testing/thunderbird/fix-rust-target.patch index 7dd760ca1d..f81418efd2 100644 --- a/testing/thunderbird/fix-rust-target.patch +++ b/testing/thunderbird/fix-rust-target.patch @@ -1,10 +1,12 @@ --- a/build/moz.configure/rust.configure +++ b/build/moz.configure/rust.configure -@@ -181,9 +181,11 @@ +@@ -280,9 +280,13 @@ die("Don't know how to translate {} for rustc".format( host_or_target.alias)) -+ fixed_alias = rustc_target.alias.replace("-unknown-", "-alpine-").replace("-gnu", "-musl") ++ fixed_alias = rustc_target.alias.replace("-gnu", "-musl") ++ if host_or_target.cpu != 'aarch64': ++ fixed_alias = fixed_alias.replace("-unknown-", "-alpine-") + # Check to see whether our rustc has a reasonably functional stdlib # for our chosen target. @@ -13,7 +15,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 +323,7 @@ os.remove(out_path) # This target is usable. diff --git a/testing/thunderbird/fix-sandbox-membarrier.patch b/testing/thunderbird/fix-sandbox-membarrier.patch new file mode 100644 index 0000000000..4bd3b80d2a --- /dev/null +++ b/testing/thunderbird/fix-sandbox-membarrier.patch @@ -0,0 +1,54 @@ +allow usage of SYS_membarrier, needed since musl-1.1.22 + +Taken from voidlinux: https://github.com/void-linux/void-packages/commit/4198411ac3b9e2620e171c662df82008da0faebb + +--- a/security/sandbox/linux/SandboxFilter.cpp ++++ b/security/sandbox/linux/SandboxFilter.cpp +@@ -572,6 +572,8 @@ + case __NR_set_tid_address: + return Allow(); + #endif ++ case __NR_membarrier: ++ return Allow(); + + // prctl + case __NR_prctl: { + +--- a/security/sandbox/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h ++++ b/security/sandbox/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h +@@ -1385,6 +1385,10 @@ + #define __NR_memfd_create (__NR_SYSCALL_BASE+385) + #endif + ++#if !defined(__NR_membarrier) ++#define __NR_membarrier (__NR_SYSCALL_BASE+389) ++#endif ++ + // ARM private syscalls. + #if !defined(__ARM_NR_BASE) + #define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000) + +--- a/security/sandbox/chromium/sandbox/linux/system_headers/x86_64_linux_syscalls.h ++++ b/security/sandbox/chromium/sandbox/linux/system_headers/x86_64_linux_syscalls.h +@@ -1290,5 +1290,9 @@ + #define __NR_memfd_create 319 + #endif + ++#if !defined(__NR_membarrier) ++#define __NR_membarrier 324 ++#endif ++ + #endif // SANDBOX_LINUX_SYSTEM_HEADERS_X86_64_LINUX_SYSCALLS_H_ + +--- a/security/sandbox/chromium/sandbox/linux/system_headers/x86_32_linux_syscalls.h ++++ b/security/sandbox/chromium/sandbox/linux/system_headers/x86_32_linux_syscalls.h +@@ -1490,5 +1490,9 @@ + #define __NR_shutdown 373 + #endif + ++#if !defined(__NR_membarrier) ++#define __NR_membarrier 375 ++#endif ++ + #endif // SANDBOX_LINUX_SYSTEM_HEADERS_X86_32_LINUX_SYSCALLS_H_ + diff --git a/testing/thunderbird/fix-seccomp-bpf.patch b/testing/thunderbird/fix-seccomp-bpf.patch index ae3ba5d44b..de7bd175ee 100644 --- a/testing/thunderbird/fix-seccomp-bpf.patch +++ b/testing/thunderbird/fix-seccomp-bpf.patch @@ -1,6 +1,5 @@ -diff -ru firefox-62.0.3.orig/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc firefox-62.0.3/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc ---- firefox-62.0.3.orig/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc 2018-12-14 08:53:46.083976137 +0000 -+++ firefox-62.0.3/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc 2018-12-14 08:51:22.084596411 +0000 +--- 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" @@ -13,14 +12,3 @@ diff -ru firefox-62.0.3.orig/security/sandbox/chromium/sandbox/linux/seccomp-bpf namespace { struct arch_sigsys { -diff -ru firefox-62.0.3.orig/security/sandbox/linux/SandboxFilter.cpp firefox-62.0.3/security/sandbox/linux/SandboxFilter.cpp ---- firefox-62.0.3.orig/security/sandbox/linux/SandboxFilter.cpp 2018-10-01 18:35:28.000000000 +0000 -+++ firefox-62.0.3/security/sandbox/linux/SandboxFilter.cpp 2018-12-14 08:57:50.645264590 +0000 -@@ -997,6 +997,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/testing/thunderbird/fix-stack-overflow.patch b/testing/thunderbird/fix-stack-overflow.patch deleted file mode 100644 index e164fc69b6..0000000000 --- a/testing/thunderbird/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(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(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(outBuffer), -+ reinterpret_cast(outBuffer.get()), - outSize); - LOG(("nsHttpCompressConv %p BrotliHandler ODA rv=%x", self, rv)); - if (NS_FAILED(rv)) { diff --git a/testing/thunderbird/fix-toolkit.patch b/testing/thunderbird/fix-toolkit.patch index 8c7ebc1c86..414734dfec 100644 --- a/testing/thunderbird/fix-toolkit.patch +++ b/testing/thunderbird/fix-toolkit.patch @@ -2,7 +2,7 @@ diff --git a/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols 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 -@@ -45,6 +45,7 @@ +@@ -46,6 +46,7 @@ #include #include #include @@ -42,7 +42,7 @@ diff --git a/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_sys 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 -@@ -1134,6 +1134,12 @@ struct kernel_statfs { +@@ -1239,6 +1239,12 @@ struct kernel_statfs { #ifndef __NR_fallocate #define __NR_fallocate 285 #endif @@ -59,28 +59,28 @@ diff --git a/toolkit/mozapps/update/common/updatedefines.h b/toolkit/mozapps/upd index 79276f7..4c67976 100644 --- a/toolkit/mozapps/update/common/updatedefines.h +++ b/toolkit/mozapps/update/common/updatedefines.h -@@ -100,7 +100,7 @@ static inline int mywcsprintf(WCHAR* dest, size_t count, const WCHAR* fmt, +@@ -87,7 +87,7 @@ static inline int mywcsprintf(WCHAR* dest, size_t count, const WCHAR* fmt, - #ifdef SOLARIS - #include --#else -+#elif !defined(__linux__) || defined(__GLIBC__) - #include - #endif - #include + # ifdef SOLARIS + # include +-# else ++# elif !defined(__linux__) || defined(__GLIBC__) + # include + # endif + # include 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 -@@ -3737,6 +3737,7 @@ int add_dir_entries(const NS_tchar *dirpath, ActionList *list) - int add_dir_entries(const NS_tchar *dirpath, ActionList *list) - { +@@ -3978,6 +3978,7 @@ + + int add_dir_entries(const NS_tchar* dirpath, ActionList* list) { int rv = OK; +#if !defined(__linux__) || defined(__GLIBC__) - FTS *ftsdir; - FTSENT *ftsdirEntry; - NS_tchar searchpath[MAXPATHLEN]; -@@ -3840,6 +3841,7 @@ int add_dir_entries(const NS_tchar *dirpath, ActionList *list) + FTS* ftsdir; + FTSENT* ftsdirEntry; + mozilla::UniquePtr searchpath(get_full_path(dirpath)); +@@ -4085,6 +4086,7 @@ } fts_close(ftsdir); diff --git a/testing/thunderbird/fix-tools.patch b/testing/thunderbird/fix-tools.patch index edecb7f678..93b9d19c84 100644 --- a/testing/thunderbird/fix-tools.patch +++ b/testing/thunderbird/fix-tools.patch @@ -1,14 +1,23 @@ ---- a/tools/profiler/core/platform.h -+++ b/tools/profiler/core/platform.h -@@ -29,6 +29,8 @@ - #ifndef TOOLS_PLATFORM_H_ - #define TOOLS_PLATFORM_H_ - -+#include -+ - #include - #include - #include "MainThreadUtils.h" +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 (!getcontext(&sSyncUContext)) { +- PopulateRegsFromContext(*this, &sSyncUContext); +- } ++ #if defined(__GLIBC__) ++ if (!getcontext(&sSyncUContext)) { ++ PopulateRegsFromContext(*this, &sSyncUContext); ++ } ++ #endif + } + #endif +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]) { @@ -25,21 +34,4 @@ + string base = p ? p+1 : c_filename; return base; } - ---- a/tools/profiler/core/platform-linux-android.cpp -+++ b/tools/profiler/core/platform-linux-android.cpp -@@ -497,8 +497,10 @@ static void PlatformInit(PSLockRef aLock) {} - ucontext_t sSyncUContext; - - void Registers::SyncPopulate() { -- if (!getcontext(&sSyncUContext)) { -- PopulateRegsFromContext(*this, &sSyncUContext); -- } -+ #if defined(__GLIBC__) -+ if (!getcontext(&sSyncUContext)) { -+ PopulateRegsFromContext(*this, &sSyncUContext); -+ } -+ #endif - } - #endif diff --git a/testing/thunderbird/fix-webrtc-glibcisms.patch b/testing/thunderbird/fix-webrtc-glibcisms.patch index 958f9ef6c1..658b076dc8 100644 --- a/testing/thunderbird/fix-webrtc-glibcisms.patch +++ b/testing/thunderbird/fix-webrtc-glibcisms.patch @@ -1,13 +1,20 @@ ---- a/media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c 2018-05-09 23:48:44.677389171 +0200 -+++ b/media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c 2018-05-09 23:48:56.254373557 +0200 -@@ -11,7 +11,9 @@ - #include - #include - #include +--- ./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 +@@ -14,7 +14,7 @@ + #ifndef __GLIBC_PREREQ + #define __GLIBC_PREREQ(a, b) 0 + #endif -#if __GLIBC_PREREQ(2, 16) -+#if !__GLIBC__ -+#include -+#elif __GLIBC_PREREQ(2, 16) ++#if !__GLIBC__ || __GLIBC_PREREQ(2, 16) #include #else #include +@@ -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/testing/thunderbird/mallinfo.patch b/testing/thunderbird/mallinfo.patch index 91c65dd059..7916a200ca 100644 --- a/testing/thunderbird/mallinfo.patch +++ b/testing/thunderbird/mallinfo.patch @@ -1,18 +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 -@@ -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/testing/thunderbird/mozilla-build-arm.patch b/testing/thunderbird/mozilla-build-arm.patch deleted file mode 100644 index 8b9022ca3c..0000000000 --- a/testing/thunderbird/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 -@@ -53,7 +53,7 @@ else: - '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/testing/thunderbird/rust-cssparser.patch b/testing/thunderbird/rust-cssparser.patch deleted file mode 100644 index 1fc1805234..0000000000 --- a/testing/thunderbird/rust-cssparser.patch +++ /dev/null @@ -1,92 +0,0 @@ -This is a fix for rust version 1.38.0, which causes the warning below to become an error. - -backport of: - -From 3c98d22c5de3b696bf1fde2b6c90069812312aa6 Mon Sep 17 00:00:00 2001 -From: Simon Sapin -Date: Tue, 23 Apr 2019 13:47:25 +0200 -Subject: [PATCH] Fix a future-compat warning - -``` -warning[E0506]: cannot assign to `self.input.cached_token` because it is borrowed - --> src/parser.rs:591:17 - | -566 | pub fn next_including_whitespace_and_comments(&mut self) -> Result<&Token<'i>, BasicParseError<'i>> { - | - let's call the lifetime of this reference `'1` -... -579 | Some(ref cached_token) - | ---------------- borrow of `self.input.cached_token` occurs here -... -591 | self.input.cached_token = Some(CachedToken { - | ^^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `self.input.cached_token` occurs here -... -603 | Ok(token) - | --------- returning this value requires that `self.input.cached_token.0` is borrowed for `'1` - | - = warning: this error has been downgraded to a warning for backwards compatibility with previous releases - = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future -``` ---- - src/parser.rs | 50 +++++++++++++++++++++++++++----------------------- - 1 file changed, 27 insertions(+), 23 deletions(-) - -diff --git a/src/parser.rs b/src/parser.rs -index 51f441e4..7cef117c 100644 ---- a/third_party/rust/cssparser/src/parser.rs -+++ b/third_party/rust/cssparser/src/parser.rs -@@ -555,28 +555,34 @@ - } - - let token_start_position = self.input.tokenizer.position(); -- let token; -- match self.input.cached_token { -- Some(ref cached_token) -- if cached_token.start_position == token_start_position => { -- self.input.tokenizer.reset(&cached_token.end_state); -- match cached_token.token { -- Token::Function(ref name) => self.input.tokenizer.see_function(name), -- _ => {} -- } -- token = &cached_token.token -+ let using_cached_token = self -+ .input -+ .cached_token -+ .as_ref() -+ .map_or(false, |cached_token| { -+ cached_token.start_position == token_start_position -+ }); -+ let token = if using_cached_token { -+ let cached_token = self.input.cached_token.as_ref().unwrap(); -+ self.input.tokenizer.reset(&cached_token.end_state); -+ match cached_token.token { -+ Token::Function(ref name) => self.input.tokenizer.see_function(name), -+ _ => {} - } -- _ => { -- let new_token = self.input.tokenizer.next() -- .map_err(|()| self.new_basic_error(BasicParseErrorKind::EndOfInput))?; -- self.input.cached_token = Some(CachedToken { -- token: new_token, -- start_position: token_start_position, -- end_state: self.input.tokenizer.state(), -- }); -- token = self.input.cached_token_ref() -- } -- } -+ &cached_token.token -+ } else { -+ let new_token = self -+ .input -+ .tokenizer -+ .next() -+ .map_err(|()| self.new_basic_error(BasicParseErrorKind::EndOfInput))?; -+ self.input.cached_token = Some(CachedToken { -+ token: new_token, -+ start_position: token_start_position, -+ end_state: self.input.tokenizer.state(), -+ }); -+ self.input.cached_token_ref() -+ }; - - if let Some(block_type) = BlockType::opening(token) { - self.at_start_of = Some(block_type); diff --git a/testing/thunderbird/rust-unitialized-field.patch b/testing/thunderbird/rust-unitialized-field.patch deleted file mode 100644 index 67ef3a02ab..0000000000 --- a/testing/thunderbird/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::()) diff --git a/testing/thunderbird/rust133.patch b/testing/thunderbird/rust133.patch deleted file mode 100644 index 9ec1e9c265..0000000000 --- a/testing/thunderbird/rust133.patch +++ /dev/null @@ -1,24 +0,0 @@ -This fixes build errors under recent Rust. - ---- 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/testing/thunderbird/sandbox-membarrier.patch b/testing/thunderbird/sandbox-membarrier.patch deleted file mode 100644 index 24b70ca401..0000000000 --- a/testing/thunderbird/sandbox-membarrier.patch +++ /dev/null @@ -1,54 +0,0 @@ -allow usage of SYS_membarrier, needed since musl-1.1.22 - -Taken from voidlinux: https://github.com/void-linux/void-packages/commit/4198411ac3b9e2620e171c662df82008da0faebb - ---- a/security/sandbox/linux/SandboxFilter.cpp -+++ b/security/sandbox/linux/SandboxFilter.cpp -@@ -283,6 +283,8 @@ - case __NR_set_tid_address: - return Allow(); - #endif -+ case __NR_membarrier: -+ return Allow(); - - // prctl - case __NR_prctl: { - ---- a/security/sandbox/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h -+++ b/security/sandbox/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h -@@ -1385,6 +1385,10 @@ - #define __NR_memfd_create (__NR_SYSCALL_BASE+385) - #endif - -+#if !defined(__NR_membarrier) -+#define __NR_membarrier (__NR_SYSCALL_BASE+389) -+#endif -+ - // ARM private syscalls. - #if !defined(__ARM_NR_BASE) - #define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000) - ---- a/security/sandbox/chromium/sandbox/linux/system_headers/x86_64_linux_syscalls.h -+++ b/security/sandbox/chromium/sandbox/linux/system_headers/x86_64_linux_syscalls.h -@@ -1290,5 +1290,9 @@ - #define __NR_memfd_create 319 - #endif - -+#if !defined(__NR_membarrier) -+#define __NR_membarrier 324 -+#endif -+ - #endif // SANDBOX_LINUX_SYSTEM_HEADERS_X86_64_LINUX_SYSCALLS_H_ - ---- a/security/sandbox/chromium/sandbox/linux/system_headers/x86_32_linux_syscalls.h -+++ b/security/sandbox/chromium/sandbox/linux/system_headers/x86_32_linux_syscalls.h -@@ -1490,5 +1490,9 @@ - #define __NR_shutdown 373 - #endif - -+#if !defined(__NR_membarrier) -+#define __NR_membarrier 375 -+#endif -+ - #endif // SANDBOX_LINUX_SYSTEM_HEADERS_X86_32_LINUX_SYSCALLS_H_ - -- cgit v1.2.3