Updated to 111.0

This commit is contained in:
Martin Stransky 2023-03-20 15:02:19 +01:00
parent b5fde26b8f
commit e8035fe0a1
9 changed files with 106 additions and 6041 deletions

2
.gitignore vendored
View File

@ -560,3 +560,5 @@ firefox-3.6.4.source.tar.bz2
/firefox-110.0.source.tar.xz
/firefox-langpacks-110.0-20230210.tar.xz
/firefox-langpacks-110.0-20230214.tar.xz
/firefox-111.0.source.tar.xz
/firefox-langpacks-111.0-20230320.tar.xz

View File

@ -1,19 +0,0 @@
diff --git a/js/src/irregexp/moz.build b/js/src/irregexp/moz.build
--- a/js/src/irregexp/moz.build
+++ b/js/src/irregexp/moz.build
@@ -12,10 +12,14 @@
include("../js-config.mozbuild")
include("../js-cxxflags.mozbuild")
CXXFLAGS += ["-Wno-error=type-limits", "-Wno-error=return-type"]
+# Suppress spurious warnings in third-party code. See bug 1810584.
+if CONFIG["CC_TYPE"] == "gcc":
+ CXXFLAGS += ["-Wno-error=nonnull"]
+
UNIFIED_SOURCES += [
"imported/regexp-bytecode-generator.cc",
"imported/regexp-bytecode-peephole.cc",
"imported/regexp-bytecodes.cc",
"imported/regexp-compiler-tonode.cc",

93
D168799.diff Normal file
View File

@ -0,0 +1,93 @@
diff --git a/extensions/pref/autoconfig/test/unit/test_autoconfig_custom_path.js b/extensions/pref/autoconfig/test/unit/test_autoconfig_custom_path.js
--- a/extensions/pref/autoconfig/test/unit/test_autoconfig_custom_path.js
+++ b/extensions/pref/autoconfig/test/unit/test_autoconfig_custom_path.js
@@ -9,10 +9,13 @@
let testDirName = do_get_cwd().clone();
Services.env.set("MOZ_SYSTEM_CONFIG_DIR", testDirName.path);
updateAppInfo();
+ try {
+ Services.dirsvc.undefine("SysConfD");
+ } catch (e) {}
let customSysConfD = Services.dirsvc.get("SysConfD", Ci.nsIFile);
let parent = customSysConfD.parent;
let child = customSysConfD.leafName;
notEqual("/etc", parent.path, "SysConfD is not in /etc");
equal("xpcshell", child, "SysConfD is xpcshell");
diff --git a/extensions/pref/autoconfig/test/unit/test_autoconfig_default_path.js b/extensions/pref/autoconfig/test/unit/test_autoconfig_default_path.js
--- a/extensions/pref/autoconfig/test/unit/test_autoconfig_default_path.js
+++ b/extensions/pref/autoconfig/test/unit/test_autoconfig_default_path.js
@@ -6,8 +6,11 @@
);
function run_test() {
updateAppInfo();
+ try {
+ Services.dirsvc.undefine("SysConfD");
+ } catch (e) {}
let defaultSysConfD = Services.dirsvc.get("SysConfD", Ci.nsIFile);
equal("/etc/xpcshell", defaultSysConfD.path, "SysConfD is in /etc");
}
diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp
--- a/modules/libpref/Preferences.cpp
+++ b/modules/libpref/Preferences.cpp
@@ -4917,27 +4917,10 @@
ArrayLength(specialFiles));
if (NS_FAILED(rv)) {
NS_WARNING("Error parsing application default preferences.");
}
-#if defined(MOZ_WIDGET_GTK)
- // Under Flatpak/Snap package, load /etc/firefox/defaults/pref/*.js.
- if (mozilla::widget::IsRunningUnderFlatpakOrSnap()) {
- nsCOMPtr<nsIFile> defaultSnapPrefDir;
- rv = NS_GetSpecialDirectory(NS_OS_SYSTEM_CONFIG_DIR,
- getter_AddRefs(defaultSnapPrefDir));
- NS_ENSURE_SUCCESS(rv, rv);
- defaultSnapPrefDir->AppendNative("defaults"_ns);
- defaultSnapPrefDir->AppendNative("pref"_ns);
-
- rv = pref_LoadPrefsInDir(defaultSnapPrefDir, nullptr, 0);
- if (NS_FAILED(rv)) {
- NS_WARNING("Error parsing application default preferences under Snap.");
- }
- }
-#endif
-
// Load jar:$app/omni.jar!/defaults/preferences/*.js
// or jar:$gre/omni.jar!/defaults/preferences/*.js.
RefPtr<nsZipArchive> appJarReader = Omnijar::GetReader(Omnijar::APP);
// GetReader(Omnijar::APP) returns null when `$app == $gre`, in
@@ -5006,10 +4989,28 @@
// Do we care if a file provided by this process fails to load?
pref_LoadPrefsInDir(path, nullptr, 0);
}
}
+#if defined(MOZ_WIDGET_GTK)
+ // To ensure the system-wide preferences are not overwritten by
+ // firefox/browser/defauts/preferences/*.js we need to load
+ // the /etc/firefox/defaults/pref/*.js settings as last.
+ // Under Flatpak, the NS_OS_SYSTEM_CONFIG_DIR points to /app/etc/firefox
+ nsCOMPtr<nsIFile> defaultSystemPrefDir;
+ rv = NS_GetSpecialDirectory(NS_OS_SYSTEM_CONFIG_DIR,
+ getter_AddRefs(defaultSystemPrefDir));
+ NS_ENSURE_SUCCESS(rv, rv);
+ defaultSystemPrefDir->AppendNative("defaults"_ns);
+ defaultSystemPrefDir->AppendNative("pref"_ns);
+
+ rv = pref_LoadPrefsInDir(defaultSystemPrefDir, nullptr, 0);
+ if (NS_FAILED(rv)) {
+ NS_WARNING("Error parsing application default preferences.");
+ }
+#endif
+
if (XRE_IsParentProcess()) {
SetupTelemetryPref();
}
if (aIsStartup) {

View File

@ -1,23 +0,0 @@
diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -654,10 +654,18 @@
if (window == this) {
sStoredLeaveNotifyEvent = nullptr;
}
}
+ // We need to detach accessible object here because mContainer is a custom
+ // widget and doesn't call gtk_widget_real_destroy() from destroy handler
+ // as regular widgets.
+ AtkObject* ac = gtk_widget_get_accessible(GTK_WIDGET(mContainer));
+ if (ac) {
+ gtk_accessible_set_widget(GTK_ACCESSIBLE(ac), nullptr);
+ }
+
gtk_widget_destroy(mShell);
mShell = nullptr;
mContainer = nullptr;
MOZ_ASSERT(!mGdkWindow,

View File

@ -125,7 +125,7 @@ ExcludeArch: i686
%if %{?system_nss}
%global nspr_version 4.32
%global nspr_build_version %{nspr_version}
%global nss_version 3.86
%global nss_version 3.88
%global nss_build_version %{nss_version}
%endif
@ -172,13 +172,13 @@ ExcludeArch: i686
Summary: Mozilla Firefox Web browser
Name: firefox
Version: 110.0
Release: 3%{?pre_tag}%{?dist}
Version: 111.0
Release: 1%{?pre_tag}%{?dist}
URL: https://www.mozilla.org/firefox/
License: MPLv1.1 or GPLv2+ or LGPLv2+
Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz
%if %{with langpacks}
Source1: firefox-langpacks-%{version}%{?pre_version}-20230214.tar.xz
Source1: firefox-langpacks-%{version}%{?pre_version}-20230320.tar.xz
%endif
Source2: cbindgen-vendor.tar.xz
Source10: firefox-mozconfig
@ -226,8 +226,6 @@ Patch61: firefox-glibc-dynstack.patch
Patch71: 0001-GLIBCXX-fix-for-GCC-12.patch
Patch78: firefox-i686-build.patch
Patch79: firefox-gcc-13-build.patch
Patch80: D167194.diff
Patch81: D169197.diff
# Test patches
# Generate without context by
@ -240,7 +238,7 @@ Patch102: firefox-tests-xpcshell-freeze.patch
# Fedora specific patches
Patch215: firefox-enable-addons.patch
Patch219: rhbz-1173156.patch
Patch224: mozilla-1170092.patch
Patch224: D168799.diff
#ARM run-time patch
Patch226: rhbz-1354671.patch
Patch228: disable-openh264-download.patch
@ -252,7 +250,6 @@ Patch402: mozilla-1196777.patch
Patch407: mozilla-1667096.patch
Patch408: mozilla-1663844.patch
Patch415: mozilla-1670333.patch
Patch418: mozilla-1813500.patch
# PGO/LTO patches
Patch600: pgo.patch
@ -261,9 +258,6 @@ Patch602: mozilla-1516803.patch
# a patch for compiling with gcc on arm (from debian)
Patch990: work-around-GCC-ICE-on-arm.patch
# Backported WebRTC changes for PipeWire/Wayland screen sharing support
Patch1000: libwebrtc-screen-cast-sync.patch
# Work around broken moz.build file on ppc64le (mozb#1779545, mozb#1775202)
Patch1100: mozilla-1775202.patch
@ -506,8 +500,6 @@ This package contains results of tests executed during build.
%patch71 -p1 -b .0001-GLIBCXX-fix-for-GCC-12
%patch78 -p1 -b .firefox-i686
%patch79 -p1 -b .firefox-gcc-13-build
%patch80 -p1 -b .D167194
%patch81 -p1 -b .D169197
# Test patches
#%patch100 -p1 -b .firefox-tests-xpcshell
@ -517,7 +509,7 @@ This package contains results of tests executed during build.
# Fedora patches
%patch215 -p1 -b .addons
%patch219 -p1 -b .rhbz-1173156
%patch224 -p1 -b .1170092
%patch224 -p1 -b .D168799.diff
#ARM run-time patch
%ifarch aarch64
%patch226 -p1 -b .1354671
@ -530,7 +522,6 @@ This package contains results of tests executed during build.
%patch407 -p1 -b .1667096
%patch408 -p1 -b .1663844
%patch415 -p1 -b .1670333
%patch418 -p1 -b .1813500
# PGO patches
%if %{build_with_pgo}
@ -541,11 +532,6 @@ This package contains results of tests executed during build.
%endif
%patch990 -p1 -b .work-around-GCC-ICE-on-arm
%ifnarch ppc64le %{arm} aarch64
%patch1000 -p1 -b .libwebrtc-screen-cast-sync
%endif
%patch1100 -p1 -b .ppc-mobzuild
rm -f .mozconfig
@ -1084,6 +1070,9 @@ fi
#---------------------------------------------------------------------
%changelog
* Mon Mar 20 2023 Martin Stransky <stransky@redhat.com>- 111.0-1
- Updated to 111.0
* Tue Feb 14 2023 Martin Stransky <stransky@redhat.com>- 110.0-3
- Updated to 110.0 build 3

File diff suppressed because it is too large Load Diff

View File

@ -1,99 +0,0 @@
diff -up firefox-87.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 firefox-87.0/extensions/pref/autoconfig/src/nsReadConfig.cpp
--- firefox-87.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 2021-03-18 14:48:36.000000000 +0100
+++ firefox-87.0/extensions/pref/autoconfig/src/nsReadConfig.cpp 2021-03-22 19:20:02.429310184 +0100
@@ -249,8 +249,20 @@ nsresult nsReadConfig::openAndEvaluateJS
if (NS_FAILED(rv)) return rv;
rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), jsFile);
- if (NS_FAILED(rv)) return rv;
+ if (NS_FAILED(rv)) {
+ // Look for cfg file in /etc/<application>/pref
+ rv = NS_GetSpecialDirectory(NS_APP_PREFS_SYSTEM_CONFIG_DIR,
+ getter_AddRefs(jsFile));
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ rv = jsFile->AppendNative(nsLiteralCString("pref"));
+ NS_ENSURE_SUCCESS(rv, rv);
+ rv = jsFile->AppendNative(nsDependentCString(aFileName));
+ NS_ENSURE_SUCCESS(rv, rv);
+ rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), jsFile);
+ NS_ENSURE_SUCCESS(rv, rv);
+ }
} else {
nsAutoCString location("resource://gre/defaults/autoconfig/");
location += aFileName;
diff -up firefox-87.0/modules/libpref/Preferences.cpp.1170092 firefox-87.0/modules/libpref/Preferences.cpp
--- firefox-87.0/modules/libpref/Preferences.cpp.1170092 2021-03-18 14:48:54.000000000 +0100
+++ firefox-87.0/modules/libpref/Preferences.cpp 2021-03-22 19:20:02.429310184 +0100
@@ -4499,6 +4499,9 @@ nsresult Preferences::InitInitialObjects
//
// Thus, in the omni.jar case, we always load app-specific default
// preferences from omni.jar, whether or not `$app == $gre`.
+ //
+ // At very end load configuration from system config location:
+ // - /etc/firefox/pref/*.js
nsresult rv = NS_ERROR_FAILURE;
UniquePtr<nsZipFind> find;
diff -up firefox-87.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-87.0/toolkit/xre/nsXREDirProvider.cpp
--- firefox-87.0/toolkit/xre/nsXREDirProvider.cpp.1170092 2021-03-18 14:52:00.000000000 +0100
+++ firefox-87.0/toolkit/xre/nsXREDirProvider.cpp 2021-03-22 19:37:56.574480347 +0100
@@ -65,6 +65,7 @@
#endif
#ifdef XP_UNIX
# include <ctype.h>
+# include "nsIXULAppInfo.h"
#endif
#ifdef XP_IOS
# include "UIKitDirProvider.h"
@@ -552,6 +553,21 @@ nsXREDirProvider::GetFile(const char* aP
}
}
}
+
+#if defined(XP_UNIX)
+ if (!strcmp(aProperty, NS_APP_PREFS_SYSTEM_CONFIG_DIR)) {
+ nsCString sysConfigDir = nsLiteralCString("/etc/");
+ nsCOMPtr<nsIXULAppInfo> appInfo = do_GetService("@mozilla.org/xre/app-info;1");
+ if (!appInfo)
+ return NS_ERROR_NOT_AVAILABLE;
+ nsCString appName;
+ appInfo->GetName(appName);
+ ToLowerCase(appName);
+ sysConfigDir.Append(appName);
+ return NS_NewNativeLocalFile(sysConfigDir, false, aFile);
+ }
+#endif
+
if (NS_FAILED(rv) || !file) return NS_ERROR_FAILURE;
if (ensureFilePermissions) {
@@ -874,6 +890,16 @@ nsresult nsXREDirProvider::GetFilesInter
}
#endif
+ // Add /etc/<application>/pref/ directory if it exists
+ nsCOMPtr<nsIFile> systemPrefDir;
+ rv = NS_GetSpecialDirectory(NS_APP_PREFS_SYSTEM_CONFIG_DIR,
+ getter_AddRefs(systemPrefDir));
+ if (NS_SUCCEEDED(rv)) {
+ rv = systemPrefDir->AppendNative(nsLiteralCString("pref"));
+ if (NS_SUCCEEDED(rv))
+ directories.AppendObject(systemPrefDir);
+ }
+
rv = NS_NewArrayEnumerator(aResult, directories, NS_GET_IID(nsIFile));
} else if (!strcmp(aProperty, NS_APP_CHROME_DIR_LIST)) {
// NS_APP_CHROME_DIR_LIST is only used to get default (native) icons
diff -up firefox-87.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 firefox-87.0/xpcom/io/nsAppDirectoryServiceDefs.h
--- firefox-87.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 2021-03-18 14:51:58.000000000 +0100
+++ firefox-87.0/xpcom/io/nsAppDirectoryServiceDefs.h 2021-03-22 19:20:02.430310213 +0100
@@ -59,6 +59,7 @@
#define NS_APP_PREFS_DEFAULTS_DIR_LIST "PrefDL"
#define NS_APP_PREFS_OVERRIDE_DIR \
"PrefDOverride" // Directory for per-profile defaults
+#define NS_APP_PREFS_SYSTEM_CONFIG_DIR "PrefSysConf" // Directory with system-wide configuration
#define NS_APP_USER_PROFILE_50_DIR "ProfD"
#define NS_APP_USER_PROFILE_LOCAL_50_DIR "ProfLD"

View File

@ -1,94 +0,0 @@
changeset: 651243:ff57728124c6
tag: tip
parent: 651233:dd0fdd1daa69
user: stransky <stransky@redhat.com>
date: Tue Jan 31 15:53:38 2023 +0100
files: widget/gtk/GfxInfo.cpp
description:
Bug 1813500 [Linux] Don't hang Firefox when glxtest process hangs r?emilio,rmader
Differential Revision: https://phabricator.services.mozilla.com/D168385
diff --git a/widget/gtk/GfxInfo.cpp b/widget/gtk/GfxInfo.cpp
--- a/widget/gtk/GfxInfo.cpp
+++ b/widget/gtk/GfxInfo.cpp
@@ -11,6 +11,7 @@
#include <errno.h>
#include <unistd.h>
#include <string>
+#include <poll.h>
#include <sys/types.h>
#include <sys/utsname.h>
#include <sys/wait.h>
@@ -29,6 +30,9 @@
#include "WidgetUtilsGtk.h"
#include "MediaCodecsSupport.h"
+// How long we wait for data from glxtest process in milliseconds.
+#define GLXTEST_TIMEOUT 4000
+
#define EXIT_STATUS_BUFFER_TOO_SMALL 2
#ifdef DEBUG
bool fire_glxtest_process();
@@ -99,12 +103,28 @@ void GfxInfo::GetData() {
// information in a separate process to protect against bad drivers.
// if glxtest_pipe == -1, that means that we already read the information
- if (glxtest_pipe == -1) return;
+ if (glxtest_pipe == -1) {
+ return;
+ }
+
+ const TimeStamp deadline =
+ TimeStamp::Now() + TimeDuration::FromMilliseconds(GLXTEST_TIMEOUT);
enum { buf_size = 2048 };
char buf[buf_size];
- ssize_t bytesread = read(glxtest_pipe, &buf,
- buf_size - 1); // -1 because we'll append a zero
+ ssize_t bytesread = 0;
+
+ struct pollfd pfd {};
+ pfd.fd = glxtest_pipe;
+ pfd.events = POLLIN;
+ auto ret = poll(&pfd, 1, GLXTEST_TIMEOUT);
+ if (ret <= 0) {
+ gfxCriticalNote << "glxtest: failed to read data from glxtest, we may "
+ "fallback to software rendering\n";
+ } else {
+ // -1 because we'll append a zero
+ bytesread = read(glxtest_pipe, &buf, buf_size - 1);
+ }
close(glxtest_pipe);
glxtest_pipe = -1;
@@ -129,9 +149,9 @@ void GfxInfo::GetData() {
int waitpid_errno = 0;
while (wait_for_glxtest_process) {
wait_for_glxtest_process = false;
- if (waitpid(glxtest_pid, &glxtest_status, 0) == -1) {
+ if (waitpid(glxtest_pid, &glxtest_status, WNOHANG) == -1) {
waitpid_errno = errno;
- if (waitpid_errno == EINTR) {
+ if (waitpid_errno == EAGAIN || waitpid_errno == EINTR) {
wait_for_glxtest_process = true;
} else {
// Bug 718629
@@ -142,6 +162,15 @@ void GfxInfo::GetData() {
waiting_for_glxtest_process_failed = (waitpid_errno != ECHILD);
}
}
+ if (wait_for_glxtest_process) {
+ if (TimeStamp::Now() > deadline) {
+ gfxCriticalNote << "glxtest: glxtest process hangs\n";
+ waiting_for_glxtest_process_failed = true;
+ break;
+ }
+ // Wait 100ms to another waitpid() check.
+ usleep(100000);
+ }
}
int exit_code = EXIT_FAILURE;

View File

@ -1,4 +1,4 @@
SHA512 (cbindgen-vendor.tar.xz) = 0d45c1decfd7aaee853748745c9f5a907c0c6a0cf809c2387aac1cdcf680b0844b1ef4d05148e0527de4ff6e4d4666110bea317bd00b7d73a1210eb58a815563
SHA512 (mochitest-python.tar.gz) = e0a2c569dafe013b6a4c073516388549a8f398d8aa4538a3bc69dcda44737a3a3cf070285e9fa040a15d7a62446665c6158d42a1b6dc3e8d7f4680bc2ef17a16
SHA512 (firefox-110.0.source.tar.xz) = 52a37a8f59a694c4790c0a14cd81fba9e2c982f64e00191afd0897c39ae1d5e25f24cff16f74d0a0b5cdf8e93a9a0974b6042b0de605cf1a533ef4e6a3c0dcf9
SHA512 (firefox-langpacks-110.0-20230214.tar.xz) = 63b8a4428674393cd1d0742708c7c300e9a85d6b294f8fb281b773373db5735208f8d27df7fe769ddba259743f76502e0bf20e953736ebc78a9b3178afa5ecf7
SHA512 (firefox-111.0.source.tar.xz) = cdb300fdbb2b60068b0fc10a18df587b417e484901d36f52dd174d320d3440a42b02ea000f325c5781fd8853a5171b1a5184562fb535ece90619e4c64d46bb82
SHA512 (firefox-langpacks-111.0-20230320.tar.xz) = 754bcc39c969c820c395bf5c67132d2468862e7b0638efb48cda6484e32aa18a807400a766b8a28f850e39684a25c4286aa359451d233a62ed0c545d64135209