From 75c0e048b804127f83168ee08994a13ee60b433f Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Thu, 15 Nov 2012 10:16:46 -0500 Subject: [PATCH] Attempt to open the correct libmozjs185 library, otherwise polkit authz rules will not work unless js-devel is installed (fdo #57146) --- polkit-0.108-fix-libmozjs185-soname.patch | 32 +++++++++++++++++++++++ polkit.spec | 8 +++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 polkit-0.108-fix-libmozjs185-soname.patch diff --git a/polkit-0.108-fix-libmozjs185-soname.patch b/polkit-0.108-fix-libmozjs185-soname.patch new file mode 100644 index 0000000..ef781da --- /dev/null +++ b/polkit-0.108-fix-libmozjs185-soname.patch @@ -0,0 +1,32 @@ +From a6747362693a91f8cfa3bd5e619cf91e2e03941b Mon Sep 17 00:00:00 2001 +From: David Zeuthen +Date: Thu, 15 Nov 2012 10:09:06 -0500 +Subject: [PATCH] Don't require libmozjs185 devel packages for polkit rules to + work + +The SO-name rules for SpiderMonkey are a little bit weird and we were +opening wrong file. This problem was reported in + + https://bugs.freedesktop.org/show_bug.cgi?id=57146 + +Signed-off-by: David Zeuthen +--- + src/polkitbackend/polkitbackendjsauthority.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/polkitbackend/polkitbackendjsauthority.c b/src/polkitbackend/polkitbackendjsauthority.c +index 034edc4..e4aa46b 100644 +--- a/src/polkitbackend/polkitbackendjsauthority.c ++++ b/src/polkitbackend/polkitbackendjsauthority.c +@@ -238,7 +238,7 @@ djs_init (PolkitBackendJsAuthority *authority) + guint n; + const gchar *library_name; + +- library_name = "libmozjs185.so"; ++ library_name = "libmozjs185.so.1.0"; + module = g_module_open (library_name, 0); + if (module == NULL) + goto out; +-- +1.8.0 + diff --git a/polkit.spec b/polkit.spec index 7093dae..3218bb0 100644 --- a/polkit.spec +++ b/polkit.spec @@ -6,7 +6,7 @@ Summary: polkit Authorization Framework Name: polkit Version: 0.108 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ URL: http://www.freedesktop.org/wiki/Software/polkit Source0: http://www.freedesktop.org/software/polkit/releases/%{name}-%{version}.tar.gz @@ -41,6 +41,7 @@ Obsoletes: polkit-desktop-policy < 0.103 Provides: polkit-desktop-policy = 0.103 Patch0: polkit-0.108-include-gmodule.patch +Patch1: polkit-0.108-fix-libmozjs185-soname.patch %description polkit is a toolkit for defining and handling authorizations. It is @@ -82,6 +83,7 @@ Meta-package for JavaScript engine used by polkit. %prep %setup -q %patch0 -p1 -b .include-gmodule +%patch1 -p1 -b .libmozjs185-soname %build %if 0%{?enable_autoreconf} @@ -163,6 +165,10 @@ exit 0 %{_datadir}/doc/polkit-js-engine-%{version}/README %changelog +* Thu Nov 15 2012 David Zeuthen 0.108-3%{?dist} +- Attempt to open the correct libmozjs185 library, otherwise polkit + authz rules will not work unless js-devel is installed (fdo #57146) + * Wed Nov 14 2012 David Zeuthen 0.108-2%{?dist} - Include gmodule-2.0 to avoid build error