firefox: fix mozilla bug 1623885

This commit is contained in:
Danny Rawlins 2020-05-01 23:43:38 +10:00
parent 7b1b4f5558
commit ca9896f1ef
4 changed files with 105 additions and 3 deletions

View File

@ -1,7 +1,9 @@
untrusted comment: verify with /etc/ports/contrib.pub untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF376UBZwv6BYV6JuyRL8jnRNXfVaZFtqbKl/rRHhCKCS8h1iYDvR7cD27rFca1PNkNHKbn0Qn0CRPl/sh1sjg3gU= RWSagIOpLGJF3yUgdfAY4vHtMV6CevDODZBEnbom03jvyzzrd6tQSqzkY3l2LwLPbG747qPSpKAFu8WFGsnaZgkEaG2cL5PIKg0=
SHA256 (Pkgfile) = 373363dded4c117d099b6fc90818062a047111d34a5e8f98ac22b8d39330b775 SHA256 (Pkgfile) = dbc5d23540e2598e3f300e84b15dd88e836d1a6f3ad853e78b8b3d684eb03c52
SHA256 (.footprint) = 9df33aad85e11ded757ac494b9d53f882cade01f805dacc3b52e1ed602436bbb SHA256 (.footprint) = 9df33aad85e11ded757ac494b9d53f882cade01f805dacc3b52e1ed602436bbb
SHA256 (firefox-75.0.source.tar.xz) = bbb1054d8f2717c634480556d3753a8483986af7360e023bb6232df80b746b0f SHA256 (firefox-75.0.source.tar.xz) = bbb1054d8f2717c634480556d3753a8483986af7360e023bb6232df80b746b0f
SHA256 (firefox.desktop) = 8ba3439f3dfc5cab883641969c93d8d15f8f20d7188d9568346b2edad52d6f91 SHA256 (firefox.desktop) = 8ba3439f3dfc5cab883641969c93d8d15f8f20d7188d9568346b2edad52d6f91
SHA256 (0001-Use-remoting-name-for-GDK-application-names.patch) = 5f7ac724a5c5afd9322b1e59006f4170ea5354ca1e0e60dab08b7784c2d8463c
SHA256 (0001-Bug-1623885-Add-subsystem-to-Mesa-sandbox-policy.patch) = ebb169804750ddc10a4801ed6ddb37356331bbf76615f58eb29de2e6e15ee930
SHA256 (fix-unicode-errors.patch) = 47fa576aa3e2dcb1f1d48fa504893bcbe31e7a5fef7c1f2e84570a2692c6794d SHA256 (fix-unicode-errors.patch) = 47fa576aa3e2dcb1f1d48fa504893bcbe31e7a5fef7c1f2e84570a2692c6794d

View File

@ -0,0 +1,35 @@
From 0447215abf836bbb8eef53aeccf029dd40bd1a52 Mon Sep 17 00:00:00 2001
From: Jeff Gilbert <jgilbert@mozilla.com>
Date: Sun, 12 Apr 2020 21:21:32 +0000
Subject: [PATCH] Bug 1623885 - Add "subsystem" to Mesa sandbox policy to fix
libdrm-2.4.101+. r=gcp, a=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D70579
---
.../linux/broker/SandboxBrokerPolicyFactory.cpp | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp b/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp
index 3aa7cf27e353..0b3948ebd92e 100644
--- a/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp
+++ b/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp
@@ -86,10 +86,12 @@ static void AddMesaSysfsPaths(SandboxBroker::Policy* aPolicy) {
// broker. To match this, allow the canonical paths.
UniqueFreePtr<char[]> realSysPath(realpath(sysPath.get(), nullptr));
if (realSysPath) {
- static const Array<const char*, 7> kMesaAttrSuffixes = {
- "revision", "vendor", "device", "subsystem_vendor",
- "subsystem_device", "uevent", "config"};
- for (const auto attrSuffix : kMesaAttrSuffixes) {
+ constexpr const char* kMesaAttrSuffixes[] = {
+ "config", "device", "revision",
+ "subsystem", "subsystem_device", "subsystem_vendor",
+ "uevent", "vendor",
+ };
+ for (const auto& attrSuffix : kMesaAttrSuffixes) {
nsPrintfCString attrPath("%s/%s", realSysPath.get(),
attrSuffix);
aPolicy->AddPath(rdonly, attrPath.get());
--
2.26.2

View File

@ -0,0 +1,55 @@
From 83f234464554c7f4393cd1dbdeb3a68d3ae0ccae 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(-)
diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
index 984b998133bd..b6c9f013940c 100644
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -3746,11 +3746,7 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) {
// consistently.
// Set program name to the one defined in application.ini.
- {
- nsAutoCString program(gAppData->name);
- ToLowerCase(program);
- g_set_prgname(program.get());
- }
+ g_set_prgname(gAppData->remotingName);
// Initialize GTK here for splash.
diff --git a/widget/gtk/nsAppShell.cpp b/widget/gtk/nsAppShell.cpp
index 0daa78fdbbad..49038d0bb1c8 100644
--- a/widget/gtk/nsAppShell.cpp
+++ b/widget/gtk/nsAppShell.cpp
@@ -24,6 +24,7 @@
# include "WakeLockListener.h"
#endif
#include "gfxPlatform.h"
+#include "nsAppRunner.h"
#include "ScreenHelperGTK.h"
#include "HeadlessScreenHelper.h"
#include "mozilla/widget/ScreenManager.h"
@@ -175,10 +176,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);
}
}
--
2.24.0

View File

@ -6,14 +6,22 @@
name=firefox name=firefox
version=75.0 version=75.0
release=1 release=2
source=(https://ftp.mozilla.org/pub/firefox/releases/$version/source/firefox-$version.source.tar.xz source=(https://ftp.mozilla.org/pub/firefox/releases/$version/source/firefox-$version.source.tar.xz
firefox.desktop firefox.desktop
0001-Use-remoting-name-for-GDK-application-names.patch
0001-Bug-1623885-Add-subsystem-to-Mesa-sandbox-policy.patch
fix-unicode-errors.patch) fix-unicode-errors.patch)
build() { build() {
cd firefox-$version cd firefox-$version
# https://bugzilla.mozilla.org/show_bug.cgi?id=1530052
patch -p1 -i $SRC/0001-Use-remoting-name-for-GDK-application-names.patch
# https://bugzilla.mozilla.org/show_bug.cgi?id=1627486
patch -p1 -i $SRC/0001-Bug-1623885-Add-subsystem-to-Mesa-sandbox-policy.patch
# https://bugzilla.mozilla.org/show_bug.cgi?id=1532169 # https://bugzilla.mozilla.org/show_bug.cgi?id=1532169
patch -p1 -i $SRC/fix-unicode-errors.patch patch -p1 -i $SRC/fix-unicode-errors.patch
@ -49,6 +57,8 @@ cat <<- EOF > .mozconfig
ac_add_options --enable-system-pixman ac_add_options --enable-system-pixman
ac_add_options --enable-alsa ac_add_options --enable-alsa
ac_add_options --enable-optimize ac_add_options --enable-optimize
ac_add_options --enable-release
ac_add_options --enable-rust-simd
ac_add_options --disable-debug-symbols ac_add_options --disable-debug-symbols
ac_add_options --disable-pulseaudio ac_add_options --disable-pulseaudio
ac_add_options --enable-official-branding ac_add_options --enable-official-branding