firefox/mozilla-bmo1170092.patch
Jan Horak cf91fdcf27 Rebase to 140.3.0 ESR
Following changes were made during rebase:
Use gcc toolset 14 instead of 13
Fixed annocheck workaround and backported ensure kiosk mode
Removed disable-vsync-for-kiosk.patch
Update to 140 esr
Update bundled package list
Cleanup patches:
- remove unused patches
- fix patch versioning
- rename webrtc-128.0.patch to D225034.xxxx based on the merge request
Use system libraries for drm/gbm/pipewire
Update patch disabling PipeWire support
Backported fips patches
Enable system nss
Update nss versions
Added fixes for rhel9 from SE
Fix the system pipewire build
Update to 140.1.0
Cleanup and incorporating of SE changes
Fixing spec file
adding av1-else-condition-add.patch
fixing av1 disable patch
Fixed exceptionHandler patch
Update to 140.2.0
Removed bundled(cups) as long as it is not bundled
Changes related to rebase-140 of rhel-9.x(9.0, 9.2, 9.4) streams owned by SE
1.Added updated nss-3.112 in the Sources and .gitignore and updated its reference inside specfile
2.Add condition to not enable system_gbm, drm, pipewire as build was failing
3.Added handling for setting bundled_nss=1 for these streams,so that it used nss bundled nspr
changes related to rhel 8.x(2,4,6,8) and 7.9 version
Added fixes for missing translation and gnome kiosk
Update to 140.3.0 esr

Resolves: RHEL-114042
2025-10-03 11:12:01 +02:00

96 lines
4.5 KiB
Diff

diff -up firefox-140.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.mozilla-bmo1170092 firefox-140.0/extensions/pref/autoconfig/src/nsReadConfig.cpp
--- firefox-140.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.mozilla-bmo1170092 2025-06-02 15:26:44.000000000 +0200
+++ firefox-140.0/extensions/pref/autoconfig/src/nsReadConfig.cpp 2025-06-04 13:24:00.344728697 +0200
@@ -263,8 +263,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-140.0/modules/libpref/Preferences.cpp.mozilla-bmo1170092 firefox-140.0/modules/libpref/Preferences.cpp
--- firefox-140.0/modules/libpref/Preferences.cpp.mozilla-bmo1170092 2025-06-02 15:26:51.000000000 +0200
+++ firefox-140.0/modules/libpref/Preferences.cpp 2025-06-04 13:24:00.345430064 +0200
@@ -4914,6 +4914,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-140.0/toolkit/xre/nsXREDirProvider.cpp.mozilla-bmo1170092 firefox-140.0/toolkit/xre/nsXREDirProvider.cpp
--- firefox-140.0/toolkit/xre/nsXREDirProvider.cpp.mozilla-bmo1170092 2025-06-02 15:27:00.000000000 +0200
+++ firefox-140.0/toolkit/xre/nsXREDirProvider.cpp 2025-06-04 15:44:09.413562326 +0200
@@ -76,6 +76,7 @@
#endif
#ifdef XP_UNIX
# include <ctype.h>
+# include "nsIXULAppInfo.h"
#endif
#ifdef XP_IOS
# include "UIKitDirProvider.h"
@@ -462,6 +463,17 @@ nsXREDirProvider::GetFile(const char* aP
rv = file->AppendNative(nsLiteralCString(PREF_OVERRIDE_DIRNAME));
NS_ENSURE_SUCCESS(rv, rv);
rv = EnsureDirectoryExists(file);
+ } else 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);
+ NS_NewNativeLocalFile(sysConfigDir, getter_AddRefs(file));
+ rv = EnsureDirectoryExists(file);
} else {
// We don't know anything about this property. Fail without warning, because
// otherwise we'll get too much warning spam due to
@@ -518,6 +530,16 @@ nsXREDirProvider::GetFiles(const char* a
}
#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-140.0/xpcom/io/nsAppDirectoryServiceDefs.h.mozilla-bmo1170092 firefox-140.0/xpcom/io/nsAppDirectoryServiceDefs.h
--- firefox-140.0/xpcom/io/nsAppDirectoryServiceDefs.h.mozilla-bmo1170092 2025-06-02 15:27:01.000000000 +0200
+++ firefox-140.0/xpcom/io/nsAppDirectoryServiceDefs.h 2025-06-04 13:24:00.346423861 +0200
@@ -58,6 +58,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"