Provide system wide config dir (mozbz#1170092), Allow lock preferences from .js files (mozbz#440908)
This commit is contained in:
parent
4bed479594
commit
b33c1cc33c
10
firefox.spec
10
firefox.spec
@ -87,7 +87,7 @@
|
|||||||
Summary: Mozilla Firefox Web browser
|
Summary: Mozilla Firefox Web browser
|
||||||
Name: firefox
|
Name: firefox
|
||||||
Version: 45.0.1
|
Version: 45.0.1
|
||||||
Release: 2%{?pre_tag}%{?dist}
|
Release: 3%{?pre_tag}%{?dist}
|
||||||
URL: https://www.mozilla.org/projects/firefox/
|
URL: https://www.mozilla.org/projects/firefox/
|
||||||
License: MPLv1.1 or GPLv2+ or LGPLv2+
|
License: MPLv1.1 or GPLv2+ or LGPLv2+
|
||||||
Group: Applications/Internet
|
Group: Applications/Internet
|
||||||
@ -280,7 +280,7 @@ cd %{tarballdir}
|
|||||||
%patch301 -p1 -b .1205199
|
%patch301 -p1 -b .1205199
|
||||||
%patch302 -p1 -b .1228540
|
%patch302 -p1 -b .1228540
|
||||||
%patch303 -p1 -b .1228540-1
|
%patch303 -p1 -b .1228540-1
|
||||||
#%patch224 -p1 -b .1170092
|
%patch224 -p1 -b .1170092
|
||||||
|
|
||||||
%if 0%{?fedora} > 23
|
%if 0%{?fedora} > 23
|
||||||
%patch304 -p2 -b .1253216
|
%patch304 -p2 -b .1253216
|
||||||
@ -289,7 +289,7 @@ cd %{tarballdir}
|
|||||||
|
|
||||||
# Debian extension patch
|
# Debian extension patch
|
||||||
%patch400 -p1 -b .debian-addon
|
%patch400 -p1 -b .debian-addon
|
||||||
#%patch401 -p1 -b .js-pref-lock
|
%patch401 -p1 -b .js-pref-lock
|
||||||
|
|
||||||
%patch500 -p1
|
%patch500 -p1
|
||||||
|
|
||||||
@ -794,6 +794,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|||||||
#---------------------------------------------------------------------
|
#---------------------------------------------------------------------
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 21 2016 Martin Stransky <stransky@redhat.com> - 45.0.1-3
|
||||||
|
- Provide system wide config dir (mozbz#1170092)
|
||||||
|
- Allow lock preferences from .js files (mozbz#440908)
|
||||||
|
|
||||||
* Mon Mar 21 2016 Martin Stransky <stransky@redhat.com> - 45.0.1-2
|
* Mon Mar 21 2016 Martin Stransky <stransky@redhat.com> - 45.0.1-2
|
||||||
- Fixed rhbz#1293874 - use a Debian patch for disabled extension
|
- Fixed rhbz#1293874 - use a Debian patch for disabled extension
|
||||||
signing
|
signing
|
||||||
|
@ -1,17 +1,7 @@
|
|||||||
# HG changeset patch
|
diff -up firefox-45.0.1/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 firefox-45.0.1/extensions/pref/autoconfig/src/nsReadConfig.cpp
|
||||||
# User Jan Horak <jhorak@redhat.com>
|
--- firefox-45.0.1/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 2016-03-15 23:37:54.000000000 +0100
|
||||||
# Parent f986e55c4e0b41c6b50bd74d287614b564d7895f
|
+++ firefox-45.0.1/extensions/pref/autoconfig/src/nsReadConfig.cpp 2016-03-21 16:10:42.540417899 +0100
|
||||||
# Bug 1170092 - Read default prefs also from /etc/firefox/defaults/pref
|
@@ -245,8 +245,20 @@ nsresult nsReadConfig::openAndEvaluateJS
|
||||||
|
|
||||||
diff --git a/extensions/pref/autoconfig/src/nsReadConfig.cpp b/extensions/pref/autoconfig/src/nsReadConfig.cpp
|
|
||||||
--- a/extensions/pref/autoconfig/src/nsReadConfig.cpp
|
|
||||||
+++ b/extensions/pref/autoconfig/src/nsReadConfig.cpp
|
|
||||||
@@ -240,18 +240,30 @@ nsresult nsReadConfig::openAndEvaluateJS
|
|
||||||
if (NS_FAILED(rv))
|
|
||||||
return rv;
|
|
||||||
|
|
||||||
rv = jsFile->AppendNative(nsDependentCString(aFileName));
|
|
||||||
if (NS_FAILED(rv))
|
|
||||||
return rv;
|
return rv;
|
||||||
|
|
||||||
rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), jsFile);
|
rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), jsFile);
|
||||||
@ -34,20 +24,10 @@ diff --git a/extensions/pref/autoconfig/src/nsReadConfig.cpp b/extensions/pref/a
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
nsAutoCString location("resource://gre/defaults/autoconfig/");
|
nsAutoCString location("resource://gre/defaults/autoconfig/");
|
||||||
location += aFileName;
|
diff -up firefox-45.0.1/modules/libpref/Preferences.cpp.1170092 firefox-45.0.1/modules/libpref/Preferences.cpp
|
||||||
|
--- firefox-45.0.1/modules/libpref/Preferences.cpp.1170092 2016-03-21 16:10:42.540417899 +0100
|
||||||
nsCOMPtr<nsIURI> uri;
|
+++ firefox-45.0.1/modules/libpref/Preferences.cpp 2016-03-21 16:13:29.145888710 +0100
|
||||||
rv = NS_NewURI(getter_AddRefs(uri), location);
|
@@ -1214,6 +1214,8 @@ static nsresult pref_InitInitialObjects(
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp
|
|
||||||
--- a/modules/libpref/Preferences.cpp
|
|
||||||
+++ b/modules/libpref/Preferences.cpp
|
|
||||||
@@ -1228,16 +1228,18 @@ static nsresult pref_InitInitialObjects(
|
|
||||||
// - jar:$app/omni.jar!/defaults/preferences/*.js
|
|
||||||
// - $app/defaults/preferences/*.js
|
|
||||||
// and in non omni.jar case:
|
|
||||||
// - $app/defaults/preferences/*.js
|
|
||||||
// When $app == $gre, we additionally load, in omni.jar case:
|
|
||||||
// - jar:$gre/omni.jar!/defaults/preferences/*.js
|
// - jar:$gre/omni.jar!/defaults/preferences/*.js
|
||||||
// Thus, in omni.jar case, we always load app-specific default preferences
|
// Thus, in omni.jar case, we always load app-specific default preferences
|
||||||
// from omni.jar, whether or not $app == $gre.
|
// from omni.jar, whether or not $app == $gre.
|
||||||
@ -56,38 +36,18 @@ diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp
|
|||||||
|
|
||||||
nsZipFind *findPtr;
|
nsZipFind *findPtr;
|
||||||
nsAutoPtr<nsZipFind> find;
|
nsAutoPtr<nsZipFind> find;
|
||||||
nsTArray<nsCString> prefEntries;
|
diff -up firefox-45.0.1/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-45.0.1/toolkit/xre/nsXREDirProvider.cpp
|
||||||
const char *entryName;
|
--- firefox-45.0.1/toolkit/xre/nsXREDirProvider.cpp.1170092 2016-03-15 23:37:46.000000000 +0100
|
||||||
uint16_t entryNameLen;
|
+++ firefox-45.0.1/toolkit/xre/nsXREDirProvider.cpp 2016-03-21 16:12:06.498655156 +0100
|
||||||
|
@@ -51,6 +51,7 @@
|
||||||
nsRefPtr<nsZipArchive> jarReader = mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE);
|
|
||||||
diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
|
|
||||||
--- a/toolkit/xre/nsXREDirProvider.cpp
|
|
||||||
+++ b/toolkit/xre/nsXREDirProvider.cpp
|
|
||||||
@@ -47,16 +47,17 @@
|
|
||||||
#ifdef XP_MACOSX
|
|
||||||
#include "nsILocalFileMac.h"
|
|
||||||
// for chflags()
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef XP_UNIX
|
#ifdef XP_UNIX
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
+#include "nsIXULAppInfo.h"
|
+#include "nsIXULAppInfo.h"
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef XP_IOS
|
||||||
#if defined(XP_MACOSX)
|
#include "UIKitDirProvider.h"
|
||||||
#define APP_REGISTRY_NAME "Application Registry"
|
@@ -457,6 +458,20 @@ nsXREDirProvider::GetFile(const char* aP
|
||||||
#elif defined(XP_WIN)
|
|
||||||
#define APP_REGISTRY_NAME "registry.dat"
|
|
||||||
#else
|
|
||||||
#define APP_REGISTRY_NAME "appreg"
|
|
||||||
@@ -438,16 +439,30 @@ nsXREDirProvider::GetFile(const char* aP
|
|
||||||
rv = tmp;
|
|
||||||
}
|
|
||||||
tmp = EnsureDirectoryExists(file);
|
|
||||||
if (NS_FAILED(tmp)) {
|
|
||||||
rv = tmp;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -108,17 +68,7 @@ diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
|
|||||||
if (NS_FAILED(rv) || !file)
|
if (NS_FAILED(rv) || !file)
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
if (ensureFilePermissions) {
|
@@ -753,6 +768,14 @@ nsXREDirProvider::GetFilesInternal(const
|
||||||
bool fileToEnsureExists;
|
|
||||||
bool isWritable;
|
|
||||||
if (NS_SUCCEEDED(file->Exists(&fileToEnsureExists)) && fileToEnsureExists
|
|
||||||
&& NS_SUCCEEDED(file->IsWritable(&isWritable)) && !isWritable) {
|
|
||||||
@@ -713,16 +728,24 @@ nsXREDirProvider::GetFilesInternal(const
|
|
||||||
rv = NS_NewArrayEnumerator(aResult, directories);
|
|
||||||
}
|
|
||||||
else if (!strcmp(aProperty, NS_APP_PREFS_DEFAULTS_DIR_LIST)) {
|
|
||||||
nsCOMArray<nsIFile> directories;
|
|
||||||
|
|
||||||
LoadDirIntoArray(mXULAppDir, kAppendPrefDir, directories);
|
LoadDirIntoArray(mXULAppDir, kAppendPrefDir, directories);
|
||||||
LoadDirsIntoArray(mAppBundleDirectories,
|
LoadDirsIntoArray(mAppBundleDirectories,
|
||||||
kAppendPrefDir, directories);
|
kAppendPrefDir, directories);
|
||||||
@ -133,20 +83,10 @@ diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
|
|||||||
|
|
||||||
rv = NS_NewArrayEnumerator(aResult, directories);
|
rv = NS_NewArrayEnumerator(aResult, directories);
|
||||||
}
|
}
|
||||||
else if (!strcmp(aProperty, NS_EXT_PREFS_DEFAULTS_DIR_LIST)) {
|
diff -up firefox-45.0.1/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 firefox-45.0.1/xpcom/io/nsAppDirectoryServiceDefs.h
|
||||||
nsCOMArray<nsIFile> directories;
|
--- firefox-45.0.1/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 2016-03-15 23:37:47.000000000 +0100
|
||||||
|
+++ firefox-45.0.1/xpcom/io/nsAppDirectoryServiceDefs.h 2016-03-21 16:10:42.541417902 +0100
|
||||||
LoadDirsIntoArray(mExtensionDirectories,
|
@@ -67,6 +67,7 @@
|
||||||
kAppendPrefDir, directories);
|
|
||||||
diff --git a/xpcom/io/nsAppDirectoryServiceDefs.h b/xpcom/io/nsAppDirectoryServiceDefs.h
|
|
||||||
--- a/xpcom/io/nsAppDirectoryServiceDefs.h
|
|
||||||
+++ b/xpcom/io/nsAppDirectoryServiceDefs.h
|
|
||||||
@@ -61,16 +61,17 @@
|
|
||||||
|
|
||||||
#define NS_SHARED "SHARED"
|
|
||||||
|
|
||||||
#define NS_APP_PREFS_50_DIR "PrefD" // Directory which contains user prefs
|
|
||||||
#define NS_APP_PREFS_50_FILE "PrefF"
|
|
||||||
#define NS_APP_PREFS_DEFAULTS_DIR_LIST "PrefDL"
|
#define NS_APP_PREFS_DEFAULTS_DIR_LIST "PrefDL"
|
||||||
#define NS_EXT_PREFS_DEFAULTS_DIR_LIST "ExtPrefDL"
|
#define NS_EXT_PREFS_DEFAULTS_DIR_LIST "ExtPrefDL"
|
||||||
#define NS_APP_PREFS_OVERRIDE_DIR "PrefDOverride" // Directory for per-profile defaults
|
#define NS_APP_PREFS_OVERRIDE_DIR "PrefDOverride" // Directory for per-profile defaults
|
||||||
@ -154,8 +94,3 @@ diff --git a/xpcom/io/nsAppDirectoryServiceDefs.h b/xpcom/io/nsAppDirectoryServi
|
|||||||
|
|
||||||
#define NS_APP_USER_PROFILE_50_DIR "ProfD"
|
#define NS_APP_USER_PROFILE_50_DIR "ProfD"
|
||||||
#define NS_APP_USER_PROFILE_LOCAL_50_DIR "ProfLD"
|
#define NS_APP_USER_PROFILE_LOCAL_50_DIR "ProfLD"
|
||||||
|
|
||||||
#define NS_APP_USER_CHROME_DIR "UChrm"
|
|
||||||
#define NS_APP_USER_SEARCH_DIR "UsrSrchPlugns"
|
|
||||||
|
|
||||||
#define NS_APP_LOCALSTORE_50_FILE "LclSt"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user