Make it build against polkit 0.7
This commit is contained in:
parent
dd193c4d4f
commit
99d8475b6d
@ -12,6 +12,7 @@ License: GPLv2+
|
||||
Group: System Environment/Libraries
|
||||
URL: http://www.packagekit.org
|
||||
Source0: http://people.freedesktop.org/~hughsient/releases/PackageKit-%{version}.tar.gz
|
||||
Patch0: polkit.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Requires: dbus >= %{dbus_version}
|
||||
Requires: PackageKit-libs = %{version}-%{release}
|
||||
@ -25,10 +26,11 @@ BuildRequires: libX11-devel
|
||||
BuildRequires: xmlto
|
||||
BuildRequires: sqlite-devel
|
||||
BuildRequires: NetworkManager-glib-devel
|
||||
BuildRequires: PolicyKit-devel
|
||||
BuildRequires: PolicyKit-devel >= 0.7
|
||||
BuildRequires: libtool
|
||||
BuildRequires: docbook-utils
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: autoconf
|
||||
|
||||
|
||||
%description
|
||||
@ -68,6 +70,9 @@ Headers and libraries for PackageKit.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .polkit
|
||||
|
||||
autoconf
|
||||
|
||||
%build
|
||||
%configure --with-default-backend=yum
|
||||
@ -134,6 +139,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_includedir}/*
|
||||
|
||||
%changelog
|
||||
* Sun Dec 9 2007 Matthias Clasen <mclasen@redhat.com> - 0.1.4-2
|
||||
- Make it build against PolicyKit 0.7
|
||||
|
||||
* Tue Nov 27 2007 Robin Norwood <rnorwood@redhat.com> - 0.1.4-1
|
||||
- Update to latest upstream version: 0.1.4
|
||||
- Include spec file changes from hughsie to add yum-packagekit subpackage
|
||||
|
||||
28
polkit.patch
Normal file
28
polkit.patch
Normal file
@ -0,0 +1,28 @@
|
||||
diff -up PackageKit-0.1.3/configure.ac.polkit PackageKit-0.1.3/configure.ac
|
||||
--- PackageKit-0.1.3/configure.ac.polkit 2007-11-10 10:41:06.000000000 -0500
|
||||
+++ PackageKit-0.1.3/configure.ac 2007-12-09 22:33:56.000000000 -0500
|
||||
@@ -228,11 +228,7 @@ AC_ARG_WITH([security_framework],
|
||||
[Default security framework to use polkit,dummy]))
|
||||
# try and guess this if nothing is listed
|
||||
if test x$with_security_framework = x; then
|
||||
- if test -f /usr/bin/polkit-list-actions ; then
|
||||
- with_security_framework=polkit
|
||||
- else
|
||||
- AC_MSG_ERROR([--with-security-framework explicitly required when not using PolicyKit or RBAC])
|
||||
- fi
|
||||
+ with_security_framework=polkit
|
||||
fi
|
||||
|
||||
AC_DEFINE(security_framework, "$with_security_framework", [default security framework])
|
||||
diff -up PackageKit-0.1.3/src/pk-security-polkit.c.polkit PackageKit-0.1.3/src/pk-security-polkit.c
|
||||
--- PackageKit-0.1.3/src/pk-security-polkit.c.polkit 2007-12-09 22:39:21.000000000 -0500
|
||||
+++ PackageKit-0.1.3/src/pk-security-polkit.c 2007-12-09 22:40:47.000000000 -0500
|
||||
@@ -83,7 +83,7 @@ pk_security_can_do_action (PkSecurity *s
|
||||
return POLKIT_RESULT_NO;
|
||||
}
|
||||
|
||||
- pk_result = polkit_context_can_caller_do_action (security->priv->pk_context, pk_action, pk_caller);
|
||||
+ pk_result = polkit_context_is_caller_authorized (security->priv->pk_context, pk_action, pk_caller, TRUE, NULL);
|
||||
pk_debug ("PolicyKit result = '%s'", polkit_result_to_string_representation (pk_result));
|
||||
|
||||
polkit_action_unref (pk_action);
|
||||
Loading…
Reference in New Issue
Block a user