diff --git a/PackageKit.spec b/PackageKit.spec index ff034b5..f2d124a 100644 --- a/PackageKit.spec +++ b/PackageKit.spec @@ -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 - 0.1.4-2 +- Make it build against PolicyKit 0.7 + * Tue Nov 27 2007 Robin Norwood - 0.1.4-1 - Update to latest upstream version: 0.1.4 - Include spec file changes from hughsie to add yum-packagekit subpackage diff --git a/polkit.patch b/polkit.patch new file mode 100644 index 0000000..5997fcf --- /dev/null +++ b/polkit.patch @@ -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);