diff options
author | Joan Figueras | 2020-06-30 15:14:21 +0200 |
---|---|---|
committer | Joan Figueras | 2020-06-30 15:14:21 +0200 |
commit | bffb5a842db814b55a922a8893b8b1ef6d7e9b90 (patch) | |
tree | 830a0e8e83afe9d6a7bdd04c2a033b72e4ca161e | |
parent | 50b5e438a9802ac8405c6a45d13650d9ee96bb35 (diff) | |
download | aur-bffb5a842db814b55a922a8893b8b1ef6d7e9b90.tar.gz |
78.0
-rw-r--r-- | .SRCINFO | 26 | ||||
-rw-r--r-- | 0001-Use-remoting-name-for-GDK-application-names.patch | 43 | ||||
-rw-r--r-- | PKGBUILD | 159 | ||||
-rw-r--r-- | firefox-esr.desktop (renamed from firefox.desktop) | 0 | ||||
-rw-r--r-- | upload-symbol-archive | 25 |
5 files changed, 167 insertions, 86 deletions
@@ -1,6 +1,6 @@ pkgbase = firefox-esr pkgdesc = Standalone web browser from mozilla.org, Extended Support Release - pkgver = 68.9.0 + pkgver = 78.0 pkgrel = 1 url = https://www.mozilla.org/en-US/firefox/organizations/ arch = x86_64 @@ -10,7 +10,6 @@ pkgbase = firefox-esr makedepends = unzip makedepends = zip makedepends = diffutils - makedepends = python2-setuptools makedepends = yasm makedepends = mesa makedepends = imake @@ -22,15 +21,13 @@ pkgbase = firefox-esr makedepends = llvm makedepends = jack makedepends = gtk2 - makedepends = python makedepends = nodejs - makedepends = python2-psutil makedepends = cbindgen makedepends = nasm + makedepends = python-setuptools + makedepends = python-psutil depends = gtk3 - depends = mozilla-common depends = libxt - depends = startup-notification depends = mime-types depends = dbus-glib depends = ffmpeg @@ -42,19 +39,24 @@ pkgbase = firefox-esr optdepends = pulseaudio: Audio support optdepends = speech-dispatcher: Text-to-Speech optdepends = hunspell-en_US: Spell checking, American English - provides = firefox=68.9.0 + provides = firefox=78.0 conflicts = firefox options = !emptydirs options = !makeflags - source = https://ftp.mozilla.org/pub/firefox/releases/68.9.0esr/source/firefox-68.9.0esr.source.tar.xz - source = firefox.desktop + options = !strip + source = https://archive.mozilla.org/pub/firefox/releases/78.0esr/source/firefox-78.0esr.source.tar.xz + source = https://archive.mozilla.org/pub/firefox/releases/78.0esr/source/firefox-78.0esr.source.tar.xz.asc + source = firefox-esr.desktop source = firefox-symbolic.svg source = 0001-Use-remoting-name-for-GDK-application-names.patch - validpgpkeys = 2B90598A745E992F315E22C58AB132963A06537A - sha256sums = 935105e1a8a97d64daffb372690e2b566b5f07641f01470929dbbc82d20d4407 + source = upload-symbol-archive + validpgpkeys = 14F26682D0916CDD81E37B6D61B7B526D98F0353 + sha256sums = cc5d177899899b25c0d37d55592962e2dfa1666e784825d4de04bf53bb497309 + sha256sums = SKIP sha256sums = ba8a1610fe3ccc65cb58f2651df0ae9df632ecc17b3af8d13670950e9e2d27d8 sha256sums = a2474b32b9b2d7e0fb53a4c89715507ad1c194bef77713d798fa39d507def9e9 - sha256sums = ab07ab26617ff76fce68e07c66b8aa9b96c2d3e5b5517e51a3c3eac2edd88894 + sha256sums = 3bb7463471fb43b2163a705a79a13a3003d70fff4bbe44f467807ca056de9a75 + sha256sums = eb9b9c058d1505e5b82526a8cad63f98e04fc17c4715f6b4cfc778e10fcfaf27 pkgname = firefox-esr diff --git a/0001-Use-remoting-name-for-GDK-application-names.patch b/0001-Use-remoting-name-for-GDK-application-names.patch index 8cc378636c19..73ae042cc17c 100644 --- a/0001-Use-remoting-name-for-GDK-application-names.patch +++ b/0001-Use-remoting-name-for-GDK-application-names.patch @@ -1,19 +1,18 @@ -From 1cab10b39cfda068100cab8c598f1ca0f50e4131 Mon Sep 17 00:00:00 2001 -Message-Id: <1cab10b39cfda068100cab8c598f1ca0f50e4131.1553597287.git.jan.steffens@gmail.com> +From 5025aab61517c8608b555ba929c61eb0706bd6bd Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> Date: Mon, 25 Mar 2019 20:30:11 +0100 Subject: [PATCH] Use remoting name for GDK application names --- - toolkit/xre/nsAppRunner.cpp | 6 +----- - widget/gtk/nsAppShell.cpp | 7 +++---- - 2 files changed, 4 insertions(+), 9 deletions(-) + toolkit/xre/nsAppRunner.cpp | 6 +----- + widget/gtk/nsAppShell.cpp | 11 ++++------- + 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp -index 0b808ef215f06..28911c0ffeaec 100644 +index da8289200e72..452195b146f3 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp -@@ -3728,11 +3728,7 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) { +@@ -3785,11 +3785,7 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) { // consistently. // Set program name to the one defined in application.ini. @@ -27,7 +26,7 @@ index 0b808ef215f06..28911c0ffeaec 100644 // Initialize GTK here for splash. diff --git a/widget/gtk/nsAppShell.cpp b/widget/gtk/nsAppShell.cpp -index 0686ff814916b..ae4a4ea55f420 100644 +index 163a93e2d1a4..4b6d45217671 100644 --- a/widget/gtk/nsAppShell.cpp +++ b/widget/gtk/nsAppShell.cpp @@ -24,6 +24,7 @@ @@ -38,19 +37,23 @@ index 0686ff814916b..ae4a4ea55f420 100644 #include "ScreenHelperGTK.h" #include "HeadlessScreenHelper.h" #include "mozilla/widget/ScreenManager.h" -@@ -171,10 +172,8 @@ nsresult nsAppShell::Init() { - // option when program uses gdk_set_program_class(). - // - // See https://bugzilla.gnome.org/show_bug.cgi?id=747634 -- nsAutoString brandName; -- mozilla::widget::WidgetUtils::GetBrandShortName(brandName); -- if (!brandName.IsEmpty()) { -- gdk_set_program_class(NS_ConvertUTF16toUTF8(brandName).get()); -+ if (gAppData) { -+ gdk_set_program_class(gAppData->remotingName); +@@ -175,13 +176,9 @@ nsresult nsAppShell::Init() { + // See https://bugzilla.gnome.org/show_bug.cgi?id=747634 + // + // Only bother doing this for the parent process, since it's the one +- // creating top-level windows. (At this point, a child process hasn't +- // received the list of registered chrome packages, so the +- // GetBrandShortName call would fail anyway.) +- nsAutoString brandName; +- mozilla::widget::WidgetUtils::GetBrandShortName(brandName); +- if (!brandName.IsEmpty()) { +- gdk_set_program_class(NS_ConvertUTF16toUTF8(brandName).get()); ++ // creating top-level windows. ++ if (gAppData) { ++ gdk_set_program_class(gAppData->remotingName); + } } } - -- -2.21.0 +2.26.1 @@ -1,20 +1,18 @@ -# $Id$ # Maintainer : Figue <ffigue@gmail.com> # Contributor : Ionut Biru <ibiru@archlinux.org> # Contributor: Jakub Schmidtke <sjakub@gmail.com> pkgname=firefox-esr -pkgver=68.9.0 +pkgver=78.0 pkgrel=1 pkgdesc="Standalone web browser from mozilla.org, Extended Support Release" arch=(x86_64) license=(MPL GPL LGPL) url="https://www.mozilla.org/en-US/firefox/organizations/" -depends=(gtk3 mozilla-common libxt startup-notification mime-types dbus-glib - ffmpeg nss ttf-font libpulse) -makedepends=(unzip zip diffutils python2-setuptools yasm mesa imake inetutils - xorg-server-xvfb autoconf2.13 rust clang llvm jack gtk2 - python nodejs python2-psutil cbindgen nasm) +depends=(gtk3 libxt mime-types dbus-glib ffmpeg nss ttf-font libpulse) +makedepends=(unzip zip diffutils yasm mesa imake inetutils xorg-server-xvfb + autoconf2.13 rust clang llvm jack gtk2 nodejs cbindgen nasm + python-setuptools python-psutil) optdepends=('networkmanager: Location detection via available WiFi networks' 'libnotify: Notification integration' 'pulseaudio: Audio support' @@ -22,14 +20,16 @@ optdepends=('networkmanager: Location detection via available WiFi networks' 'hunspell-en_US: Spell checking, American English') provides=(firefox=${pkgver}) conflicts=(firefox) -options=(!emptydirs !makeflags) -source=(https://ftp.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefox-${pkgver}esr.source.tar.xz - firefox.desktop firefox-symbolic.svg 0001-Use-remoting-name-for-GDK-application-names.patch) -sha256sums=('935105e1a8a97d64daffb372690e2b566b5f07641f01470929dbbc82d20d4407' +options=(!emptydirs !makeflags !strip) +source=(https://archive.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefox-${pkgver}esr.source.tar.xz{,.asc} + ${pkgname}.desktop firefox-symbolic.svg 0001-Use-remoting-name-for-GDK-application-names.patch upload-symbol-archive) +sha256sums=('cc5d177899899b25c0d37d55592962e2dfa1666e784825d4de04bf53bb497309' + 'SKIP' 'ba8a1610fe3ccc65cb58f2651df0ae9df632ecc17b3af8d13670950e9e2d27d8' 'a2474b32b9b2d7e0fb53a4c89715507ad1c194bef77713d798fa39d507def9e9' - 'ab07ab26617ff76fce68e07c66b8aa9b96c2d3e5b5517e51a3c3eac2edd88894') -validpgpkeys=('2B90598A745E992F315E22C58AB132963A06537A') + '3bb7463471fb43b2163a705a79a13a3003d70fff4bbe44f467807ca056de9a75' + 'eb9b9c058d1505e5b82526a8cad63f98e04fc17c4715f6b4cfc778e10fcfaf27') +validpgpkeys=('14F26682D0916CDD81E37B6D61B7B526D98F0353') # Mozilla Software Releases <release@mozilla.com> # 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 @@ -41,10 +41,11 @@ _google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM # 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 +_mozilla_api_key=e05d56db0a694edc8b5aaebda3f2db6a prepare() { - cd firefox-${pkgver} + mkdir mozbuild + cd firefox-$pkgver # https://bugzilla.mozilla.org/show_bug.cgi?id=1530052 patch -Np1 -i ../0001-Use-remoting-name-for-GDK-application-names.patch @@ -52,32 +53,29 @@ prepare() { echo -n "$_google_api_key" >google-api-key echo -n "$_mozilla_api_key" >mozilla-api-key - cat >.mozconfig <<END + cat >../mozconfig <<END ac_add_options --enable-application=browser 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 -ac_add_options --disable-elf-hack -export CC=clang -export CXX=clang++ +export CC='clang --target=x86_64-unknown-linux-gnu' +export CXX='clang++ --target=x86_64-unknown-linux-gnu' export AR=llvm-ar export NM=llvm-nm export RANLIB=llvm-ranlib - # Branding ac_add_options --enable-official-branding ac_add_options --enable-update-channel=release ac_add_options --with-distribution-id=org.archlinux ac_add_options --with-unsigned-addon-scopes=app,system +ac_add_options --allow-addon-sideload export MOZILLA_OFFICIAL=1 -export MOZ_APP_REMOTINGNAME=$pkgname +export MOZ_APP_REMOTINGNAME=${pkgname//-/} export MOZ_TELEMETRY_REPORTING=1 -export MOZ_ADDON_SIGNING=1 export MOZ_REQUIRE_SIGNING=1 # Keys @@ -92,46 +90,87 @@ ac_add_options --with-system-nss # Features ac_add_options --enable-alsa ac_add_options --enable-jack -ac_add_options --enable-startup-notification ac_add_options --enable-crashreporter -ac_add_options --disable-gconf ac_add_options --disable-updater +ac_add_options --disable-tests END } build() { - cd firefox-${pkgver} + cd firefox-$pkgver + + export MOZ_NOSPAM=1 + export MOZBUILD_STATE_PATH="$srcdir/mozbuild" + + # LTO needs more open files + ulimit -n 4096 + + # -fno-plt with cross-LTO causes obscure LLVM errors + # LLVM ERROR: Function Import: link error + CFLAGS="${CFLAGS/-fno-plt/}" + CXXFLAGS="${CXXFLAGS/-fno-plt/}" - # Do PGO - #xvfb-run -a -n 95 -s "-extension GLX -screen 0 1280x1024x24" \ - # MOZ_PGO=1 ./mach build + # Do 3-tier PGO + echo "Building instrumented browser..." + cat >.mozconfig ../mozconfig - <<END +ac_add_options --enable-profile-generate=cross +END ./mach build + + echo "Profiling instrumented browser..." + ./mach package + LLVM_PROFDATA=llvm-profdata \ + JARLOG_FILE="$PWD/jarlog" \ + xvfb-run -s "-screen 0 1920x1080x24 -nolisten local" \ + ./mach python build/pgo/profileserver.py + + if [[ ! -s merged.profdata ]]; then + echo "No profile data produced." + return 1 + fi + + if [[ ! -s jarlog ]]; then + echo "No jar log produced." + return 1 + fi + + echo "Removing instrumented browser..." + ./mach clobber + + echo "Building optimized browser..." + cat >.mozconfig ../mozconfig - <<END +ac_add_options --enable-lto=cross +ac_add_options --enable-profile-use=cross +ac_add_options --with-pgo-profile-path=${PWD@Q}/merged.profdata +ac_add_options --with-pgo-jarlog=${PWD@Q}/jarlog +END + ./mach build + + echo "Building symbol archive..." ./mach buildsymbols } package() { - cd firefox-${pkgver} + cd firefox-$pkgver DESTDIR="$pkgdir" ./mach install - find . -name '*crashreporter-symbols-full.zip' -exec cp -fvt "$startdir" {} + - _vendorjs="$pkgdir/usr/lib/firefox/browser/defaults/preferences/vendor.js" - install -Dm644 /dev/stdin "$_vendorjs" <<END + local vendorjs="$pkgdir/usr/lib/$pkgname/browser/defaults/preferences/vendor.js" + install -Dvm644 /dev/stdin "$vendorjs" <<END // Use LANG environment variable to choose locale pref("intl.locale.requested", ""); +// Use system-provided dictionaries +pref("spellchecker.dictionary_path", "/usr/share/hunspell"); + // Disable default browser checking. pref("browser.shell.checkDefaultBrowser", false); -// Don't disable our bundled extensions in the application directory +// Don't disable extensions in the application directory pref("extensions.autoDisableScopes", 11); -pref("extensions.shownSelectionUI", true); - -// Opt all of us into e10s, instead of just 50% -pref("browser.tabs.remote.autostart", true); END - _distini="$pkgdir/usr/lib/firefox/distribution/distribution.ini" - install -Dm644 /dev/stdin "$_distini" <<END + local distini="$pkgdir/usr/lib/$pkgname/distribution/distribution.ini" + install -Dvm644 /dev/stdin "$distini" <<END [Global] id=archlinux version=1.0 @@ -143,32 +182,44 @@ app.distributor.channel=$pkgname app.partner.archlinux=archlinux END + local i theme=official for i in 16 22 24 32 48 64 128 256; do - install -Dm644 browser/branding/official/default$i.png \ + install -Dvm644 browser/branding/$theme/default$i.png \ "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/$pkgname.png" done - install -Dm644 browser/branding/official/content/about-logo.png \ + install -Dvm644 browser/branding/$theme/content/about-logo.png \ "$pkgdir/usr/share/icons/hicolor/192x192/apps/$pkgname.png" - install -Dm644 browser/branding/official/content/about-logo@2x.png \ + install -Dvm644 browser/branding/$theme/content/about-logo@2x.png \ "$pkgdir/usr/share/icons/hicolor/384x384/apps/$pkgname.png" - install -Dm644 ../firefox-symbolic.svg \ + install -Dvm644 browser/branding/$theme/content/identity-icons-brand.svg \ "$pkgdir/usr/share/icons/hicolor/symbolic/apps/$pkgname-symbolic.svg" - install -Dm644 ../firefox.desktop \ - "$pkgdir/usr/share/applications/firefox.desktop" - - # Use system-provided dictionaries - ln -Ts /usr/share/hunspell "$pkgdir/usr/lib/firefox/dictionaries" - ln -Ts /usr/share/hyphen "$pkgdir/usr/lib/firefox/hyphenation" + install -Dvm644 ../$pkgname.desktop \ + "$pkgdir/usr/share/applications/$pkgname.desktop" # Install a wrapper to avoid confusion about binary path - install -Dm755 /dev/stdin "$pkgdir/usr/bin/firefox" <<END + install -Dvm755 /dev/stdin "$pkgdir/usr/bin/$pkgname" <<END #!/bin/sh -exec /usr/lib/firefox/firefox "\$@" +exec /usr/lib/$pkgname/firefox "\$@" END # Replace duplicate binary with wrapper # https://bugzilla.mozilla.org/show_bug.cgi?id=658850 - ln -srf "$pkgdir/usr/bin/firefox" \ - "$pkgdir/usr/lib/firefox/firefox-bin" + ln -srfv "$pkgdir/usr/bin/$pkgname" "$pkgdir/usr/lib/$pkgname/firefox-bin" + + # Use system certificates + local nssckbi="$pkgdir/usr/lib/$pkgname/libnssckbi.so" + if [[ -e $nssckbi ]]; then + ln -srfv "$pkgdir/usr/lib/libnssckbi.so" "$nssckbi" + fi + + if [[ -f "$startdir/.crash-stats-api.token" ]]; then + find . -name '*crashreporter-symbols-full.zip' -exec \ + "$startdir/upload-symbol-archive" "$startdir/.crash-stats-api.token" {} + + else + find . -name '*crashreporter-symbols-full.zip' -exec \ + cp -fvt "$startdir" {} + + fi } + +# vim:set sw=2 et: diff --git a/firefox.desktop b/firefox-esr.desktop index 119fad05b82a..119fad05b82a 100644 --- a/firefox.desktop +++ b/firefox-esr.desktop diff --git a/upload-symbol-archive b/upload-symbol-archive new file mode 100644 index 000000000000..059a399c429f --- /dev/null +++ b/upload-symbol-archive @@ -0,0 +1,25 @@ +#!/bin/bash -e + +die() { + echo >&2 "$@" + exit 1 +} + +(( $# >= 2 )) || die "Usage: $0 TOKEN-FILE SYMBOL-ARCHIVE..." +token="$1" +shift + +[[ -f $token && -s $token ]] || die "Invalid TOKEN-FILE ${token@Q}" + +for zip; do + [[ $(file -SEbi "$zip") == application/zip* ]] || die "Invalid SYMBOL-ARCHIVE ${zip@Q}" +done + +for zip; do + echo >&2 "Uploading ${zip@Q} ..." + curl -X POST -H "Auth-Token: $(<"$token")" -F "${zip##*/}=@$zip" \ + --retry 4 --retry-connrefused --connect-timeout 120 \ + https://symbols.mozilla.org/upload/ + echo + mv -v "$zip" "$zip.uploaded" +done |