From a78854eae92f5f34e506b507689d83c23978db0ddfea3d59cdb3d21d5cb3fb5f Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Thu, 16 Feb 2012 05:03:57 +0000 Subject: [PATCH] - Add upstream patches to fix issues with older PolicyKit c05ec920-polkit0-build.patch fcdfa31f-polkit0-auth.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=198 --- c05ec920-polkit0-build.patch | 24 +++++++++++++++++++ ...lkit0.patch => fcdfa31f-polkit0-auth.patch | 15 +++++------- libvirt.changes | 7 ++++++ libvirt.spec | 5 ++-- 4 files changed, 40 insertions(+), 11 deletions(-) create mode 100644 c05ec920-polkit0-build.patch rename a06fab95-polkit0.patch => fcdfa31f-polkit0-auth.patch (87%) diff --git a/c05ec920-polkit0-build.patch b/c05ec920-polkit0-build.patch new file mode 100644 index 0000000..74d9341 --- /dev/null +++ b/c05ec920-polkit0-build.patch @@ -0,0 +1,24 @@ +commit c05ec920219dc9fad9230c3cea7c1fb17d29ddc3 +Author: Jim Fehlig +Date: Wed Feb 15 21:34:13 2012 -0700 + + Fix build with polkit0 + + Commit 8dd623b9 introduced a build error with --enable-compile-warnings=error + + remote.c:2593: error: unused variable 'rv' [-Wunused-variable] + + Pushing under build-breaker rule. + +Index: libvirt-0.9.10/daemon/remote.c +=================================================================== +--- libvirt-0.9.10.orig/daemon/remote.c ++++ libvirt-0.9.10/daemon/remote.c +@@ -2589,7 +2589,6 @@ remoteDispatchAuthPolkit(virNetServerPtr + DBusError err; + const char *action; + char *ident = NULL; +- int rv = -1; + struct daemonClientPrivate *priv = + virNetServerClientGetPrivateData(client); + diff --git a/a06fab95-polkit0.patch b/fcdfa31f-polkit0-auth.patch similarity index 87% rename from a06fab95-polkit0.patch rename to fcdfa31f-polkit0-auth.patch index 2a00446..6eb1f97 100644 --- a/a06fab95-polkit0.patch +++ b/fcdfa31f-polkit0-auth.patch @@ -12,11 +12,11 @@ Fix polkit authentication bypass when caller UID = 0. daemon/remote.c | 20 +++++++++----------- 1 files changed, 9 insertions(+), 11 deletions(-) -diff --git a/daemon/remote.c b/daemon/remote.c -index 1cea942..a57656c 100644 ---- a/daemon/remote.c -+++ b/daemon/remote.c -@@ -2052,16 +2052,16 @@ remoteDispatchAuthList(virNetServerPtr server ATTRIBUTE_UNUSED, +Index: libvirt-0.9.10/daemon/remote.c +=================================================================== +--- libvirt-0.9.10.orig/daemon/remote.c ++++ libvirt-0.9.10/daemon/remote.c +@@ -2052,16 +2052,16 @@ remoteDispatchAuthList(virNetServerPtr s } else if (callerUid == 0) { char *ident; if (virAsprintf(&ident, "pid:%lld,uid:%d", @@ -42,7 +42,7 @@ index 1cea942..a57656c 100644 } } -@@ -2593,8 +2593,6 @@ remoteDispatchAuthPolkit(virNetServerPtr server, +@@ -2592,8 +2592,6 @@ remoteDispatchAuthPolkit(virNetServerPtr struct daemonClientPrivate *priv = virNetServerClientGetPrivateData(client); @@ -51,6 +51,3 @@ index 1cea942..a57656c 100644 virMutexLock(&priv->lock); action = virNetServerClientGetReadonly(client) ? --- -1.7.7 - diff --git a/libvirt.changes b/libvirt.changes index 6e6e841..33fc3f7 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Feb 15 22:00:42 MST 2012 - jfehlig@suse.com + +- Add upstream patches to fix issues with older PolicyKit + c05ec920-polkit0-build.patch + fcdfa31f-polkit0-auth.patch + ------------------------------------------------------------------- Wed Feb 15 11:57:25 MST 2012 - jfehlig@suse.com diff --git a/libvirt.spec b/libvirt.spec index ae06df3..b6e462f 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -15,7 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - # For now, default to a full server + client build %define client_only 0 @@ -404,7 +403,8 @@ Source1: libvirtd.init Source2: libvirtd-relocation-server.fw Source99: baselibs.conf # Upstream patches -Patch0: a06fab95-polkit0.patch +Patch0: c05ec920-polkit0-build.patch +Patch1: fcdfa31f-polkit0-auth.patch # Need to go upstream Patch100: xen-name-for-devid.patch Patch101: clone.patch @@ -540,6 +540,7 @@ Authors: %prep %setup -q %patch0 -p1 +%patch1 -p1 %patch100 -p1 %patch101 %patch102 -p1