Fixed rhbz#1293874 - use a Debian patch for disabled extension signing

This commit is contained in:
Martin Stransky 2016-03-21 10:04:31 +01:00
parent 34daab1f68
commit bfde9d04e2
2 changed files with 47 additions and 2 deletions

View File

@ -0,0 +1,37 @@
From: Mike Hommey <mh@glandium.org>
Date: Sat, 5 Dec 2015 18:23:58 +0900
Subject: Allow unsigned addons in /usr/{lib,share}/mozilla/extensions
See rhbz#1293874
---
toolkit/mozapps/extensions/content/extensions.js | 2 ++
toolkit/mozapps/extensions/internal/XPIProvider.jsm | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/toolkit/mozapps/extensions/content/extensions.js b/toolkit/mozapps/extensions/content/extensions.js
index 8625097..9152096 100644
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -211,6 +211,8 @@ function isCorrectlySigned(aAddon) {
// temporary add-ons do not require signing
if (aAddon.scope == AddonManager.SCOPE_TEMPORARY)
return true;
+ if (aAddon.scope == AddonManager.SCOPE_SYSTEM)
+ return true;
if (aAddon.signedState <= AddonManager.SIGNEDSTATE_MISSING)
return false;
if (aAddon.foreignInstall && aAddon.signedState < AddonManager.SIGNEDSTATE_SIGNED)
diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
index 343c087..de62d8a 100644
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -682,7 +682,8 @@ function isUsableAddon(aAddon) {
return false;
}
// temporary and system add-ons do not require signing
- if ((aAddon._installLocation.name != KEY_APP_SYSTEM_DEFAULTS &&
+ if ((aAddon._installLocation.scope != AddonManager.SCOPE_SYSTEM &&
+ aAddon._installLocation.name != KEY_APP_SYSTEM_DEFAULTS &&
aAddon._installLocation.name != KEY_APP_TEMPORARY) &&
mustSign(aAddon.type)) {
if (aAddon.signedState <= AddonManager.SIGNEDSTATE_MISSING)

View File

@ -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: 1%{?pre_tag}%{?dist} Release: 2%{?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
@ -131,7 +131,8 @@ Patch302: mozilla-1228540.patch
Patch303: mozilla-1228540-1.patch Patch303: mozilla-1228540-1.patch
Patch304: mozilla-1253216.patch Patch304: mozilla-1253216.patch
# Gtk3 upstream patches # Debian extension patch
Patch400: Allow-unsigned-addons-in-usr-lib-share-mozilla-exten.patch
# Fix Skia Neon stuff on AArch64 # Fix Skia Neon stuff on AArch64
# Update https://bugzilla.mozilla.org/show_bug.cgi?id=1142056 # Update https://bugzilla.mozilla.org/show_bug.cgi?id=1142056
@ -282,6 +283,9 @@ cd %{tarballdir}
%patch222 -p1 -b .gtk3-20 %patch222 -p1 -b .gtk3-20
%endif %endif
# Debian extension patch
%patch400 -p1 -b .debian-addon
%patch500 -p1 %patch500 -p1
%{__rm} -f .mozconfig %{__rm} -f .mozconfig
@ -785,6 +789,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#--------------------------------------------------------------------- #---------------------------------------------------------------------
%changelog %changelog
* Mon Mar 21 2016 Martin Stransky <stransky@redhat.com> - 45.0.1-2
- Fixed rhbz#1293874 - use a Debian patch for disabled extension
signing
* Wed Mar 16 2016 Martin Stransky <stransky@redhat.com> - 45.0.1-1 * Wed Mar 16 2016 Martin Stransky <stransky@redhat.com> - 45.0.1-1
- Update to 45.0.1 - Update to 45.0.1