extra/thunderbird to 78.4.3-1

This commit is contained in:
Kevin Mihelich 2020-11-21 17:22:07 +00:00
parent 3fa050b579
commit 23aac23feb
6 changed files with 202 additions and 93 deletions

View file

@ -13,25 +13,46 @@ buildarch=12
highmem=1 highmem=1
pkgname=thunderbird pkgname=thunderbird
pkgver=68.12.0 pkgver=78.4.3
pkgrel=1 pkgrel=1
pkgdesc='Standalone mail and news reader from mozilla.org' pkgdesc='Standalone mail and news reader from mozilla.org'
url='https://www.mozilla.org/thunderbird/' url='https://www.mozilla.org/thunderbird/'
arch=(x86_64) arch=(x86_64)
license=(MPL GPL LGPL) license=(MPL GPL LGPL)
depends=(gtk3 libxt startup-notification mime-types dbus-glib alsa-lib depends=(
nss hunspell sqlite ttf-font icu) # libvpx glibc gtk3 libgdk-3.so mime-types dbus libdbus-1.so dbus-glib alsa-lib nss
makedepends=(unzip zip diffutils python python2 yasm nasm mesa imake libpulse inetutils xorg-server-xvfb hunspell sqlite ttf-font libvpx libvpx.so zlib bzip2 botan libwebp libevent
autoconf2.13 rust clang llvm gtk2 cbindgen nodejs) libjpeg-turbo libffi nspr gcc-libs libx11 libxrender libxfixes libxext
libxcomposite libxdamage pango libpango-1.0.so cairo gdk-pixbuf2 icu
libicui18n.so libicuuc.so freetype2 libfreetype.so fontconfig
libfontconfig.so glib2 libglib-2.0.so pixman libpixman-1.so gnupg
)
makedepends=(
unzip zip diffutils python python-setuptools yasm nasm mesa imake libpulse
inetutils xorg-server-xvfb autoconf2.13 rust clang llvm gtk2 cbindgen nodejs
gawk perl findutils
)
optdepends=('libcanberra: sound support') optdepends=('libcanberra: sound support')
options=(!emptydirs !makeflags) options=(!emptydirs !makeflags)
source=(https://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.xz{,.asc} source=(https://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.xz{,.asc}
$pkgname.desktop thunderbird.desktop
vendor-prefs.js
distribution.ini
mozconfig.cfg
configure-fix-passing-system-bzip2-ldflags.patch
thunderbird-rust-1.47.patch::https://src.fedoraproject.org/rpms/thunderbird/raw/86967ddc206310ba7bb9eb57a933031909288ce2/f/rust-1.47.patch
thunderbird-78.4.3-gpgme-double-armored-fix.patch
arm.patch arm.patch
Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch) Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch)
sha512sums=('e7559536a9e024747e3ac7c20e4ffde5adf57657d02109ea32c39bf736ad03707fc7a14a0d3f1c91fa6fd69ead3c38d6c32ce78bd468834d9ba7f77f728332c6' sha512sums=('0c441f5a55301f4d012caff111d6a882205048e4adf301ff3cfa553e1665e47a1fd835a926bd97c61e543a79465c5ada73ae699fc56425dec3dbc40f17b75620'
'SKIP' 'SKIP'
'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012'
'6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734'
'5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f'
'71032d834e3e764b8aa44d0af5caab3a343adf6439e522a024d147fef9ea260ffbe28cfcc465b432601df3527074631c9458e1ca67316e7922c362fd54a85a8e'
'e3ed2708b8354015cb3d2c81048d1ce4932d1effbe2b40efa7cf9b45c1b923b9fd708645e2f8aa0136a485a3f7ce6b396b85721aaf535a4a764fd5005fb7e222'
'd337a77104d411df219f3ae1c7d136ae92f944a18969cc92e6257b4f909204677a58df43187d41f53d4c36c29f57f53bdbad90d8263e6a9b0781640944895cad'
'92f4c5946f288b30728382830b99b91980ecd845d1606ab251bbdde5cf53387e966727a23f35a3bf7756ee77e72e478f3fb468668e8c412f552547eeb3408299'
'c25883c4860e511a99d9fbfba5b824145c0862729101721605725f609ca2a41848b741dd100eff390f57031dc5f14af3ea30133de30f75cb20197c420ae20972' 'c25883c4860e511a99d9fbfba5b824145c0862729101721605725f609ca2a41848b741dd100eff390f57031dc5f14af3ea30133de30f75cb20197c420ae20972'
'8ca4f72f1fc0a7fc128f05112d8f77be5350826010069ee3b787989131f02b82d014a4781e97ebe5694852c4bb5e87bb5313e562cfb7cb2afb6f904124027e13') '8ca4f72f1fc0a7fc128f05112d8f77be5350826010069ee3b787989131f02b82d014a4781e97ebe5694852c4bb5e87bb5313e562cfb7cb2afb6f904124027e13')
validpgpkeys=(14F26682D0916CDD81E37B6D61B7B526D98F0353) # Mozilla Software Releases <release@mozilla.com> validpgpkeys=(14F26682D0916CDD81E37B6D61B7B526D98F0353) # Mozilla Software Releases <release@mozilla.com>
@ -51,59 +72,19 @@ _mozilla_api_key=16674381-f021-49de-8622-3021c5942aff
prepare() { prepare() {
cd $pkgname-$pkgver cd $pkgname-$pkgver
echo -n "$_google_api_key" >google-api-key local src
echo -n "$_mozilla_api_key" >mozilla-api-key for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
[[ $src = *.patch ]] || continue
echo "Applying patch $src..."
patch -Np1 < "../$src"
done
cat >.mozconfig <<END printf "%s" "$_google_api_key" >google-api-key
ac_add_options --enable-application=comm/mail printf "%s" "$_mozilla_api_key" >mozilla-api-key
ac_add_options --enable-calendar cp ../mozconfig.cfg .mozconfig
sed "s|@PWD@|${PWD@Q}|g" -i .mozconfig
ac_add_options --prefix=/usr
ac_add_options --enable-release
#ac_add_options --enable-linker=gold
#ac_add_options --enable-hardening
#ac_add_options --enable-optimize
# https://bugzilla.mozilla.org/show_bug.cgi?id=1521249
#ac_add_options --enable-rust-simd
# https://bugzilla.mozilla.org/show_bug.cgi?id=1423822
#ac_add_options --disable-elf-hack
# Branding
ac_add_options --enable-official-branding
ac_add_options --enable-update-channel=release
ac_add_options --with-distribution-id=org.archlinux
export BUILD_OFFICIAL=1
export MOZILLA_OFFICIAL=1
mk_add_options BUILD_OFFICIAL=1
mk_add_options MOZILLA_OFFICIAL=1
# Keys
ac_add_options --with-google-location-service-api-keyfile=${PWD@Q}/google-api-key
ac_add_options --with-google-safebrowsing-api-keyfile=${PWD@Q}/google-api-key
ac_add_options --with-mozilla-api-keyfile=${PWD@Q}/mozilla-api-key
# ALARM
ac_add_options --disable-webrtc
# System libraries
ac_add_options --with-system-zlib
ac_add_options --with-system-bz2
ac_add_options --with-system-icu
ac_add_options --with-system-jpeg
# ac_add_options --with-system-libvpx
ac_add_options --with-system-nspr
ac_add_options --with-system-nss
ac_add_options --enable-system-sqlite
ac_add_options --enable-system-ffi
# Features
ac_add_options --enable-alsa
ac_add_options --disable-jack
ac_add_options --enable-startup-notification
ac_add_options --disable-crashreporter
ac_add_options --disable-updater
ac_add_options --disable-gconf
END
if [[ $CARCH == "armv7h" ]]; then if [[ $CARCH == "armv7h" ]]; then
echo "ac_add_options --disable-elf-hack" >> .mozconfig echo "ac_add_options --disable-elf-hack" >> .mozconfig
@ -118,13 +99,13 @@ END
export CXXFLAGS+=" -g0" export CXXFLAGS+=" -g0"
export LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" export LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
export RUSTFLAGS="-Cdebuginfo=0" export RUSTFLAGS="-Cdebuginfo=0"
patch -p1 -i ../arm.patch
patch -p1 -i ../Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch
} }
build() { build() {
cd $pkgname-$pkgver cd $pkgname-$pkgver
if [[ -n "${SOURCE_DATE_EPOCH}" ]]; then
export MOZ_BUILD_DATE=$(date --date "@${SOURCE_DATE_EPOCH}" "%Y%m%d%H%M%S")
fi
./mach configure ./mach configure
./mach build ./mach build
./mach buildsymbols ./mach buildsymbols
@ -134,34 +115,9 @@ package() {
cd $pkgname-$pkgver cd $pkgname-$pkgver
DESTDIR="$pkgdir" ./mach install DESTDIR="$pkgdir" ./mach install
_vendorjs="$pkgdir/usr/lib/$pkgname/defaults/preferences/vendor.js" install -Dm 644 ../vendor-prefs.js -t "$pkgdir/usr/lib/$pkgname/defaults/pref"
install -Dm644 /dev/stdin "$_vendorjs" <<END install -Dm 644 ../distribution.ini -t "$pkgdir/usr/lib/$pkgname/distribution"
// Use LANG environment variable to choose locale install -Dm 644 ../thunderbird.desktop -t "$pkgdir/usr/share/applications"
pref("intl.locale.requested", "");
// Use system-provided dictionaries
pref("spellchecker.dictionary_path", "/usr/share/hunspell");
// Disable default mailer checking.
pref("mail.shell.checkDefaultMail", false);
// Don't disable our bundled extensions in the application directory
pref("extensions.autoDisableScopes", 11);
pref("extensions.shownSelectionUI", true);
END
_distini="$pkgdir/usr/lib/$pkgname/distribution/distribution.ini"
install -Dm644 /dev/stdin "$_distini" <<END
[Global]
id=archlinux
version=1.0
about=Mozilla Thunderbird for Arch Linux
[Preferences]
app.distributor=archlinux
app.distributor.channel=$pkgname
app.partner.archlinux=archlinux
END
for i in 16 22 24 32 48 64 128 256; do for i in 16 22 24 32 48 64 128 256; do
install -Dm644 comm/mail/branding/thunderbird/default${i}.png \ install -Dm644 comm/mail/branding/thunderbird/default${i}.png \
@ -170,9 +126,6 @@ END
install -Dm644 comm/mail/branding/thunderbird/TB-symbolic.svg \ install -Dm644 comm/mail/branding/thunderbird/TB-symbolic.svg \
"$pkgdir/usr/share/icons/hicolor/symbolic/apps/thunderbird-symbolic.svg" "$pkgdir/usr/share/icons/hicolor/symbolic/apps/thunderbird-symbolic.svg"
install -Dm644 ../$pkgname.desktop \
"$pkgdir/usr/share/applications/$pkgname.desktop"
# Use system-provided dictionaries # Use system-provided dictionaries
ln -Ts /usr/share/hunspell "$pkgdir/usr/lib/$pkgname/dictionaries" ln -Ts /usr/share/hunspell "$pkgdir/usr/lib/$pkgname/dictionaries"
ln -Ts /usr/share/hyphen "$pkgdir/usr/lib/$pkgname/hyphenation" ln -Ts /usr/share/hyphen "$pkgdir/usr/lib/$pkgname/hyphenation"

View file

@ -0,0 +1,25 @@
From 9855927c896eaeecb21c1541942ee6d557144183 Mon Sep 17 00:00:00 2001
From: anthraxx <levente@leventepolyak.net>
Date: Sun, 8 Nov 2020 13:26:47 +0100
Subject: [PATCH] configure: fix passing system bzip2 ldflags
---
comm/third_party/openpgp.configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/comm/third_party/openpgp.configure b/comm/third_party/openpgp.configure
index 2f9c796..2cbc907 100644
--- a/comm/third_party/openpgp.configure
+++ b/comm/third_party/openpgp.configure
@@ -80,7 +80,7 @@ with only_when('--enable-compile-environment'):
if bzip2_pkg:
cflags = list(bzip2_pkg.cflags)
libs = bzip2_pkg.libs
- return namespace(cflags=cflags, libs=libs, path=(value[0]), )
+ return namespace(cflags=cflags, ldflags=libs, )
# Fallback
return namespace(
ldflags=['-lbz2'],
--
2.28.0

View file

@ -0,0 +1,8 @@
[Global]
id=archlinux
version=1.0
about=Mozilla Thunderbird for Arch Linux
[Preferences]
app.distributor=archlinux
app.distributor.channel=thunderbird

View file

@ -0,0 +1,44 @@
ac_add_options --enable-application=comm/mail
ac_add_options --prefix=/usr
ac_add_options --enable-release
ac_add_options --enable-linker=gold
ac_add_options --enable-hardening
ac_add_options --enable-optimize
ac_add_options --enable-rust-simd
# https://bugzilla.mozilla.org/show_bug.cgi?id=1423822
ac_add_options --disable-elf-hack
# Branding
ac_add_options --enable-official-branding
ac_add_options --enable-update-channel=release
ac_add_options --with-distribution-id=org.archlinux
# Keys
ac_add_options --with-google-location-service-api-keyfile=@PWD@/google-api-key
ac_add_options --with-google-safebrowsing-api-keyfile=@PWD@/google-api-key
ac_add_options --with-mozilla-api-keyfile=@PWD@/mozilla-api-key
# System libraries
ac_add_options --with-system-zlib
ac_add_options --with-system-bz2
ac_add_options --with-system-icu
ac_add_options --with-system-jpeg
# does not have APNG support
# ac_add_options --with-system-png
ac_add_options --with-system-libvpx
ac_add_options --with-system-nspr
ac_add_options --with-system-nss
ac_add_options --with-system-botan
ac_add_options --with-system-webp
ac_add_options --with-system-libevent
ac_add_options --with-system-ffi
ac_add_options --with-system-pixman
# Features
ac_add_options --enable-alsa
ac_add_options --enable-openpgp
ac_add_options --enable-calendar
ac_add_options --disable-jack
ac_add_options --disable-crashreporter
ac_add_options --disable-updater

View file

@ -0,0 +1,62 @@
# HG changeset patch
# User Kai Engert <kaie@kuix.de>
# Date 1605644505 -3600
# Tue Nov 17 21:21:45 2020 +0100
# Node ID 8eee96dfe5184bfe9b78abb473fb5b66d408d537
# Parent 997190de89d38dccdb6de5b1e585c2f997d6d6c8
Bug 1675939 - Detect if output from GPGME.gpgme_op_decrypt_ext is armored. r=PatrickBrunschwig
diff --git a/comm/mail/extensions/openpgp/content/modules/GPGME.jsm b/comm/mail/extensions/openpgp/content/modules/GPGME.jsm
--- a/comm/mail/extensions/openpgp/content/modules/GPGME.jsm
+++ b/comm/mail/extensions/openpgp/content/modules/GPGME.jsm
@@ -74,6 +74,8 @@ var GPGME = {
throw new Error("gpgme_new failed");
}
+ GPGMELib.gpgme_set_armor(c1, 1);
+
result.exitCode = GPGMELib.gpgme_op_decrypt_ext(
c1,
GPGMELib.GPGME_DECRYPT_UNWRAP,
@@ -98,14 +100,35 @@ var GPGME = {
).contents;
// The result of decrypt(GPGME_DECRYPT_UNWRAP) is an OpenPGP message.
- // However, GPGME always returns the results as a binary encoding.
- // GPG 1.12.0 ignored gpgme_set_armor(context, 1) and
- // gpgme_data_set_encoding(data_plain, GPGME_DATA_ENCODING_ARMOR).
+ // Because old versions of GPGME (e.g. 1.12.0) may return the
+ // results as a binary encoding (despite gpgme_set_armor),
+ // we check if the result looks like an armored message.
+ // If it doesn't we apply armoring ourselves.
+
+ let armor_head = "-----BEGIN PGP MESSAGE-----";
+
+ let head_of_array = ctypes.cast(
+ result_buf,
+ ctypes.char.array(armor_head.length).ptr
+ ).contents;
+
+ let isArmored = false;
- // TODO: Find a way to pass the binary data directly to the
- // RNP.decrypt function for efficiency.
+ try {
+ // If this is binary, which usually isn't a valid UTF-8
+ // encoding, it will throw an error.
+ let head_of_array_string = head_of_array.readString();
+ if (head_of_array_string == armor_head) {
+ isArmored = true;
+ }
+ } catch (ex) {}
- result.decryptedData = enArmorCB(unwrapped, result_len.value);
+ if (isArmored) {
+ result.decryptedData = unwrapped.readString();
+ } else {
+ result.decryptedData = enArmorCB(unwrapped, result_len.value);
+ }
+
GPGMELib.gpgme_free(result_buf);
}

View file

@ -0,0 +1,17 @@
// Use LANG environment variable to choose locale
pref("intl.locale.requested", "");
// Use system-provided dictionaries
pref("spellchecker.dictionary_path", "/usr/share/hunspell");
// Disable default mailer checking
pref("mail.shell.checkDefaultMail", false);
// Don't disable our bundled extensions in the application directory
pref("extensions.autoDisableScopes", 11);
pref("extensions.shownSelectionUI", true);
// Disable telemetry
pref("datareporting.healthreport.uploadEnabled", false);
pref("datareporting.policy.dataSubmissionEnabled", false);
pref("toolkit.telemetry.archive.enabled", false);