diff --git a/testing/thunderbird/APKBUILD b/testing/thunderbird/APKBUILD index 07448669d2c..be5fcab886c 100644 --- a/testing/thunderbird/APKBUILD +++ b/testing/thunderbird/APKBUILD @@ -1,40 +1,19 @@ # Contributor: Joseph Benden # Maintainer: Joseph Benden pkgname=thunderbird -pkgver=78.9.0 -pkgrel=3 +pkgver=91.3.2 +pkgrel=0 pkgdesc="Thunderbird email client" url="https://www.thunderbird.net/" # Limited on: -# s390x, mips, mips64: limited by rust and cargo +# s390x: limited by rust and cargo # s390x: limited by pipewire # armhf: build failure on armhf due to wasm -# ppc64le: Rust SIGSEGVs when compiling gkrust -arch="all !s390x !armhf !mips !mips64 !ppc64le !riscv64" +arch="all !s390x !armhf !riscv64" license="GPL-3.0-or-later AND LGPL-2.1-or-later AND MPL-2.0" options="!check" -depends=" - alsa-lib - dbus-glib - ffmpeg - gnupg - gtk+3.0 - hunspell - icu - libevent - libjpeg-turbo - libnotify - libogg - libtheora - libvorbis - libxcomposite - libxt - nspr - nss - " makedepends=" alsa-lib-dev - autoconf2.13 automake botan-dev bsd-compat-headers @@ -44,7 +23,6 @@ makedepends=" dbus-glib-dev ffmpeg-dev gettext - gtk+2.0-dev gtk+3.0-dev hunspell-dev icu-dev @@ -63,12 +41,14 @@ makedepends=" libxcomposite-dev libxt-dev llvm-dev + m4 mesa-dev nasm nodejs nspr-dev nss-dev nss-static + openmp pipewire-dev pulseaudio-dev python3 @@ -87,13 +67,14 @@ source="https://ftp.mozilla.org/pub/thunderbird/releases/$pkgver/source/thunderb disable-moz-stackwalk.patch fix-rust-target.patch fix-webrtc-glibcisms.patch - fd6847c9416f9eebde636e21d794d25d1be8791d.patch allow-custom-rust-vendor.patch - remove-faulty-libvpx-check.patch disable-neon-in-aom.patch sandbox-fork.patch sandbox-sched_setscheduler.patch + sandbox-largefile.patch + + avoid-redefinition.patch thunderbird.desktop " @@ -213,8 +194,13 @@ build() { export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 export USE_SHORT_LIBNAME=1 + export MACH_USE_SYSTEM_PYTHON=1 + export MOZBUILD_STATE_PATH="$srcdir"/mozbuild # Find our triplet JSON export RUST_TARGET="$CTARGET" + # Build with Clang, takes less RAM + export CC="clang" + export CXX="clang++" # set rpath so linker finds the libs export LDFLAGS="$LDFLAGS -Wl,-rpath,$_mozappdir" @@ -226,12 +212,10 @@ build() { ;; esac - # SIMD broken with rustc >= 1.48 - _rust_simd="--disable-rust-simd" - - # TB doesn't have SIMD available on these arches. + # FF doesn't have SIMD available on these arches. case "$CARCH" in armhf|armv7) + _rust_simd="--disable-rust-simd" _low_mem_flags="--disable-debug-symbols --disable-debug" export RUSTFLAGS="$RUSTFLAGS -C debuginfo=0" ;; @@ -239,9 +223,10 @@ build() { _low_mem_flags="--disable-debug-symbols --disable-debug" export RUSTFLAGS="$RUSTFLAGS -C debuginfo=0" ;; + *) _rust_simd="--enable-rust-simd" ;; esac - ../configure \ + ../mach configure \ --prefix=/usr \ $_arch_config \ $_low_mem_flags \ @@ -252,14 +237,12 @@ build() { --disable-install-strip \ --disable-jemalloc \ --disable-profiling \ - --disable-pulseaudio \ --disable-strip \ --disable-tests \ --disable-updater \ \ --enable-alsa \ --enable-application=comm/mail \ - --enable-cdp \ --enable-dbus \ --enable-default-toolkit=cairo-gtk3-wayland \ --enable-ffmpeg \ @@ -268,6 +251,7 @@ build() { --enable-official-branding \ --enable-openpgp \ --enable-optimize="$CFLAGS -O2" \ + --enable-pulseaudio \ --enable-release \ --enable-smoosh \ --enable-system-ffi \ @@ -289,15 +273,13 @@ build() { --with-distribution-id=org.alpinelinux \ --with-clang-path=/usr/bin/clang \ --with-libclang-path=/usr/lib - make + ../mach build } package() { cd "$builddir"/objdir - make install \ - DESTDIR="$pkgdir" \ - MOZ_MAKE_FLAGS="$MAKEOPTS" + DESTDIR="$pkgdir" MOZ_MAKE_FLAGS="$MAKEOPTS" ../mach install install -m755 -d "$pkgdir"/usr/share/applications install -m755 -d "$pkgdir"/usr/share/pixmaps @@ -359,18 +341,20 @@ package() { ln -snf thunderbird "$pkgdir/$_mozappdir/thunderbird-bin" } -sha512sums="fa5f9fee79c19810682b0848c2a9ca9518ca755b47689984165538d4d2a3d29423dd061691d5d227869472ca7275680e03f2a2b75766707cab264a9733d064cb thunderbird-78.9.0.source.tar.xz +sha512sums=" +954be27795935e494d27d57da99b49ff61db8a2b26fa8e159a30d6c272033b015790735b40129d7de94f861af23cf748f88a7a45df3861f753d6e15d28fb366c thunderbird-91.3.2.source.tar.xz 0b3f1e4b9fdc868e4738b5c81fd6c6128ce8885b260affcb9a65ff9d164d7232626ce1291aaea70132b3e3124f5e13fef4d39326b8e7173e362a823722a85127 stab.h 2f4f15974d52de4bb273b62a332d13620945d284bbc6fe6bd0a1f58ff7388443bc1d3bf9c82cc31a8527aad92b0cd3a1bc41d0af5e1800e0dcbd7033e58ffd71 fix-fortify-system-wrappers.patch -4d55f41d15be7457ad630f8f07e4fc0314c2f75720010b4bbe6a2a7f3228210a1e069949e11795efbe2e784b0762e79fdfe5b8ec38e8a64cb8d9cf3b57dd5af1 fix-tools.patch +4510fb92653d0fdcfbc6d30e18087c0d22d4acd5eb53be7d0a333abe087a9e0bf9e58e56bafe96e1e1b28ebd1fd33b8926dbb70c221007e335b33d1468755c66 fix-tools.patch a4a3e062661bda64d502d426c480ac9645345860118de9df9ffe6e0597738c70c11e5cdef2d4fd12c5e2ee30a09310159230524655a419a4f7e4eeeb0f3c06b0 mallinfo.patch 454ea3263cabce099accbdc47aaf83be26a19f8b5a4568c01a7ef0384601cf8315efd86cd917f9c8bf419c2c845db89a905f3ff9a8eb0c8e41042e93aa96a85c disable-moz-stackwalk.patch -089c97e6011e86a9b9d9e7b0c8ba3af0519d1ce4e2b1e9ab7719762d6968388bfa47dad3bf23a6d41c3d66fdcc6c15e2c926e3ff9500bfd4fbf1b53e6d19dc57 fix-rust-target.patch -d35cacb9ede80e6bfbef0709823e536dddfb1c02d776275b0b7adb5969e9927d8c6117df96873569c3f3db0a18ee5db24f8086a9311a05077892be43a3dd8d79 fix-webrtc-glibcisms.patch -60845dcb034b2c4459c30f7d5f25c8176cf42df794e2cc0e86c3e2abb6541c24b962f3a16ca70a288d4d6f377b68d00b2904b22463108559612053d835d9bff1 fd6847c9416f9eebde636e21d794d25d1be8791d.patch +cd68b89e29e5f6379fbd5679db27b9a5ef70ea65e51c0d0a8137e1f1fd210e35a8cfb047798e9549bc7275606d7ec5c8d8af1335d29da4699db7acd8bc7ff556 fix-rust-target.patch +47c2c2428c3598a42f6241705179642b3378a86ace39c8c3cbef4954e6d220b42e6c76f3d71731d65f67ce2c8597259122ac44bbd45e20993bb8bc70c0c8a010 fix-webrtc-glibcisms.patch 4e584621145cf8add069c6dac18e805b3274a1ee402d84e924df2341f7d3c5be261a93ef51283bacbd606f47fbdc628c4323ecc31efc5b403b8d224b18dc278f allow-custom-rust-vendor.patch -bb75b2abda86e455d81571052a2cfec5a9d858ffa91c50a7217b4b6c02cbfc0400e9114a27bd54ce78d7d3a44e9b03927cf0317654d98c0f39d26c63c9670117 remove-faulty-libvpx-check.patch -f963fcdba7307a0b1712dfb95ceba4ab49f449f60e550bb69d15d50272e6df9add90862251ee561e4ea5fd171a2703552ffa7aade92996f5f0b3e577f1544a6d disable-neon-in-aom.patch -4911ddb41bef8d9f6d6200159cde465627e940fe1c09099be55769d21a5a52a3f737e1bf803daa96126c035b091aea880fbc5d2e6cf5da96ddd17322461a72d6 sandbox-fork.patch +55eab1a02e19a19a1ee0e36b11097ab48a44200e07e543d91469967206854f39709c7c0bc31855559528e64642d610868140e9533f1c0e3bebc953353c142fa8 disable-neon-in-aom.patch +2518f2fc75b5db30058e0735f47d60fdf1e7adfaeee4b33fb2afb1bd9a616ce943fd88f4404d0802d4083703f4acf1d5ad42377218d025bc768807fbaf7e1609 sandbox-fork.patch db26757b2ebf9f567962e32294b4ae48b3a5d0378a7589dfe650fe3a179ff58befbab5082981c68e1c25fb9e56b2db1e4e510d4bca17c3e3aedbf9a2f21806eb sandbox-sched_setscheduler.patch -95a2b1deb4f6c90750fdd2bfe8ca0a7879a5b267965091705a6beb0a0a4b1ccad75d11df7b9885543ca4232ff704e975c6946f4c11804cb71c471e06f9576001 thunderbird.desktop" +b7d0a6126bdf6c0569f80aabf5b37ed2c7a35712eb8a0404a2d85381552f5555d4f97d213ea26cec6a45dc2785f22439376ed5f8e78b4fd664ef0223307b333e sandbox-largefile.patch +b1cb2db3122634f66d2bae7066e76f2dcd455c464e021db4de3b0a08314df95cb667846081682db549dd2af8a00831cabe44a2420c66cdfb5e3b5fa7e6bd21d3 avoid-redefinition.patch +95a2b1deb4f6c90750fdd2bfe8ca0a7879a5b267965091705a6beb0a0a4b1ccad75d11df7b9885543ca4232ff704e975c6946f4c11804cb71c471e06f9576001 thunderbird.desktop +" diff --git a/testing/thunderbird/avoid-redefinition.patch b/testing/thunderbird/avoid-redefinition.patch new file mode 100644 index 00000000000..af11c50384a --- /dev/null +++ b/testing/thunderbird/avoid-redefinition.patch @@ -0,0 +1,15 @@ +Author: Rasmus Thomsen +Reason: FF is mixing userspace net headers (net/if.h) and kernelspace ones +(linux/if.h), leading to redefinitions. We need to include net/if.h before +linux/if.h because linux/if.h has redifinition guards whereas net/if.h doesnt +Upstream: No +--- a/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c.orig 2020-07-28 19:24:32.359751046 +0200 ++++ b/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c 2020-07-28 19:24:37.856343751 +0200 +@@ -31,6 +31,7 @@ + */ + + #if defined(LINUX) ++#include + #include "addrs-netlink.h" + #include + #include diff --git a/testing/thunderbird/disable-neon-in-aom.patch b/testing/thunderbird/disable-neon-in-aom.patch index 01be79c047b..6df05a1e8a1 100644 --- a/testing/thunderbird/disable-neon-in-aom.patch +++ b/testing/thunderbird/disable-neon-in-aom.patch @@ -8,7 +8,7 @@ In file included from /home/buildozer/aports/community/firefox/src/firefox-75.0/ | ^~~~~~~ --- a/media/libaom/moz.build 2020-04-09 08:20:14.608439591 +0200 +++ b/media/libaom/moz.build 2020-04-09 08:20:21.801745246 +0200 -@@ -42,30 +42,6 @@ +@@ -42,26 +42,6 @@ ASFLAGS += [ '-I%s/media/libaom/config/linux/ia32/' % TOPSRCDIR ] LOCAL_INCLUDES += [ '/media/libaom/config/linux/ia32/' ] EXPORTS.aom += [ 'config/linux/ia32/config/aom_config.h' ] @@ -31,11 +31,9 @@ In file included from /home/buildozer/aports/community/firefox/src/firefox-75.0/ - # For cpu-features.h - LOCAL_INCLUDES += [ - '%%%s/sources/android/cpufeatures' % CONFIG['ANDROID_NDK'], -- ] -- if CONFIG['CC_TYPE'] == 'clang': -- ASFLAGS += [ -- '-no-integrated-as', - ] else: # Generic C-only configuration EXPORTS.aom += files['GENERIC_EXPORTS'] + + diff --git a/testing/thunderbird/fd6847c9416f9eebde636e21d794d25d1be8791d.patch b/testing/thunderbird/fd6847c9416f9eebde636e21d794d25d1be8791d.patch deleted file mode 100644 index 1af68d93c62..00000000000 --- a/testing/thunderbird/fd6847c9416f9eebde636e21d794d25d1be8791d.patch +++ /dev/null @@ -1,37 +0,0 @@ -See https://bugzilla.mozilla.org/show_bug.cgi?id=1539739 - -From fd6847c9416f9eebde636e21d794d25d1be8791d Mon Sep 17 00:00:00 2001 -From: Mike Hommey -Date: Sat, 1 Jun 2019 09:06:01 +0900 -Subject: [PATCH] Bug 1526653 - Include struct definitions for user_vfp and - user_vfp_exc. - ---- - js/src/wasm/WasmSignalHandlers.cpp | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -diff --git a/js/src/wasm/WasmSignalHandlers.cpp b/js/src/wasm/WasmSignalHandlers.cpp -index 636537f8478..383c380f04c 100644 ---- a/js/src/wasm/WasmSignalHandlers.cpp -+++ b/js/src/wasm/WasmSignalHandlers.cpp -@@ -248,7 +248,16 @@ using mozilla::DebugOnly; - #endif - - #ifdef WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS --# include -+struct user_vfp { -+ unsigned long long fpregs[32]; -+ unsigned long fpscr; -+}; -+ -+struct user_vfp_exc { -+ unsigned long fpexc; -+ unsigned long fpinst; -+ unsigned long fpinst2; -+}; - #endif - - #if defined(ANDROID) --- -2.20.1 - diff --git a/testing/thunderbird/fix-rust-target.patch b/testing/thunderbird/fix-rust-target.patch index 14f39691cf8..9342063c33a 100644 --- a/testing/thunderbird/fix-rust-target.patch +++ b/testing/thunderbird/fix-rust-target.patch @@ -3,29 +3,29 @@ weird custom build system... --- a/build/moz.configure/rust.configure +++ b/build/moz.configure/rust.configure -@@ -224,6 +224,8 @@ - rust_supported_targets, arm_target, when=rust_compiler) - @checking('for rust %s triplet' % host_or_target_str) - @imports('os') -+ @imports(_from='mozbuild.util', _import='ensure_unicode') -+ @imports(_from='mozbuild.util', _import='system_encoding') - @imports(_from='mozbuild.configure.util', _import='LineIO') - @imports(_from='mozbuild.shellutil', _import='quote') - @imports(_from='tempfile', _import='mkstemp') -@@ -328,7 +330,7 @@ +@@ -225,7 +225,9 @@ + data.setdefault(key, []).append(namespace(rust_target=t, target=info)) + return data - return None +- ++@imports('os') ++@imports(_from='mozbuild.util', _import='ensure_unicode') ++@imports(_from='mozbuild.util', _import='system_encoding') + def detect_rustc_target( + host_or_target, compiler_info, arm_target, rust_supported_targets + ): +@@ -340,13 +342,13 @@ -- rustc_target = find_candidate(candidates) -+ rustc_target = os.environ['RUST_TARGET'] + return None - if rustc_target is None: - die("Don't know how to translate {} for rustc".format( -@@ -373,7 +375,7 @@ - os.remove(out_path) +- rustc_target = find_candidate(candidates) ++ rustc_target = os.environ['RUST_TARGET'] - # This target is usable. -- return rustc_target -+ return ensure_unicode(rustc_target, system_encoding) + if rustc_target is None: + die("Don't know how to translate {} for rustc".format(host_or_target.alias)) + +- return rustc_target ++ return ensure_unicode(rustc_target, system_encoding) - return rust_target + + @imports('os') diff --git a/testing/thunderbird/fix-tools.patch b/testing/thunderbird/fix-tools.patch index 93b9d19c84f..245d694bd38 100644 --- a/testing/thunderbird/fix-tools.patch +++ b/testing/thunderbird/fix-tools.patch @@ -16,22 +16,3 @@ index 19d0a5c56d..b64b543066 100644 + #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]) { - // 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) { -- // Lots of copies! basename's behavior is less than ideal. -- char* c_filename = strdup(filename.c_str()); -- string base = basename(c_filename); -- free(c_filename); -+ // basename's behavior is less than ideal so avoid it -+ const char *c_filename = filename.c_str(); -+ const char *p = strrchr(c_filename, '/'); -+ string base = p ? p+1 : c_filename; - return base; - } - diff --git a/testing/thunderbird/fix-webrtc-glibcisms.patch b/testing/thunderbird/fix-webrtc-glibcisms.patch index 658b076dc8a..7533d94b91e 100644 --- a/testing/thunderbird/fix-webrtc-glibcisms.patch +++ b/testing/thunderbird/fix-webrtc-glibcisms.patch @@ -1,5 +1,5 @@ ---- ./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 +--- ./third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c.orig 2018-05-09 23:48:44.677389171 +0200 ++++ ./third_party/libwebrtc/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 diff --git a/testing/thunderbird/remove-faulty-libvpx-check.patch b/testing/thunderbird/remove-faulty-libvpx-check.patch deleted file mode 100644 index 3fc5fb4c0f3..00000000000 --- a/testing/thunderbird/remove-faulty-libvpx-check.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/toolkit/moz.configure.orig 2020-04-07 18:04:13.886159258 +0200 -+++ b/toolkit/moz.configure 2020-04-07 18:04:37.905834036 +0200 -@@ -1422,11 +1422,6 @@ - "with system libvpx. Use --without-system-libvpx to build " - "with in-tree libvpx.")) - -- check_symbol('vpx_codec_dec_init_ver', flags=vpx.libs, onerror=lambda: die( -- "--with-system-libvpx requested but symbol vpx_codec_dec_init_ver " -- "not found" -- )) -- - set_config('MOZ_SYSTEM_LIBVPX', True) - diff --git a/testing/thunderbird/sandbox-fork.patch b/testing/thunderbird/sandbox-fork.patch index 328943cb001..c7222ab494d 100644 --- a/testing/thunderbird/sandbox-fork.patch +++ b/testing/thunderbird/sandbox-fork.patch @@ -2,12 +2,14 @@ make SYS_fork non-fatal, musl uses it for fork(2) --- a/security/sandbox/linux/SandboxFilter.cpp +++ b/security/sandbox/linux/SandboxFilter.cpp -@@ -1253,6 +1253,8 @@ +@@ -1253,6 +1253,10 @@ // usually do something reasonable on error. case __NR_clone: return ClonePolicy(Error(EPERM)); ++#ifdef __NR_fork + case __NR_fork: + return Error(ENOSYS); ++#endif # ifdef __NR_fadvise64 case __NR_fadvise64: diff --git a/testing/thunderbird/sandbox-largefile.patch b/testing/thunderbird/sandbox-largefile.patch new file mode 100644 index 00000000000..f1cf28b51b9 --- /dev/null +++ b/testing/thunderbird/sandbox-largefile.patch @@ -0,0 +1,17 @@ +--- a/security/sandbox/linux/SandboxFilter.cpp 2020-11-23 22:41:14.556378950 +0100 ++++ b/security/sandbox/linux/SandboxFilter.cpp 2020-11-23 22:40:23.595806444 +0100 +@@ -68,7 +68,13 @@ + + // The headers define O_LARGEFILE as 0 on x86_64, but we need the + // actual value because it shows up in file flags. +-#define O_LARGEFILE_REAL 00100000 ++#if defined(__x86_64__) || defined(__i386__) || defined(__mips__) ++#define O_LARGEFILE_REAL 0100000 ++#elif defined(__powerpc__) ++#define O_LARGEFILE_REAL 0200000 ++#else ++#define O_LARGEFILE_REAL O_LARGEFILE ++#endif + + // Not part of UAPI, but userspace sees it in F_GETFL; see bug 1650751. + #define FMODE_NONOTIFY 0x4000000