rpms/virt-manager/F-9 virt-manager-0.5.4-polkit-check.patch, NONE, 1.1 virt-manager.spec, 1.35, 1.36

Daniel P. Berrange berrange at fedoraproject.org
Thu Oct 2 11:57:18 UTC 2008


Author: berrange

Update of /cvs/pkgs/rpms/virt-manager/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv5754

Modified Files:
	virt-manager.spec 
Added Files:
	virt-manager-0.5.4-polkit-check.patch 
Log Message:
Fix broken polkit check (rhbz #464069)

virt-manager-0.5.4-polkit-check.patch:

--- NEW FILE virt-manager-0.5.4-polkit-check.patch ---
changeset:   830:2893744f29b0
user:        "Daniel P. Berrange <berrange at redhat.com>"
date:        Thu Aug 21 12:29:33 2008 +0100
files:       src/virtManager/connection.py
description:
Fix check for policykit


diff -r 043e6981cb84 -r 2893744f29b0 src/virtManager/connection.py
--- a/src/virtManager/connection.py	Thu Aug 21 12:06:35 2008 +0100
+++ b/src/virtManager/connection.py	Thu Aug 21 12:29:33 2008 +0100
@@ -38,7 +38,10 @@
 from virtManager.netdev import vmmNetDevice
 from virtManager.storagepool import vmmStoragePool
 
-LIBVIRT_POLICY_FILE = "/usr/share/PolicyKit/policy/libvirtd.policy"
+LIBVIRT_POLICY_FILES = [
+    "/usr/share/PolicyKit/policy/libvirtd.policy",
+    "/usr/share/PolicyKit/policy/org.libvirt.unix.policy"
+]
 
 def get_local_hostname():
     try:
@@ -137,7 +140,12 @@
 
         self.readOnly = readOnly
         if not self.is_remote() and os.getuid() != 0 and self.uri != "qemu:///session":
-            if not os.path.exists(LIBVIRT_POLICY_FILE):
+            hasPolkit = False
+            for f in LIBVIRT_POLICY_FILES:
+                if os.path.exists(f):
+                    hasPolkit = True
+
+            if not hasPolkit:
                 self.readOnly = True
 
         self.state = self.STATE_DISCONNECTED
@@ -460,6 +468,7 @@
         try:
             flags = 0
             if self.readOnly:
+                logging.info("Caller requested read only connection")
                 flags = libvirt.VIR_CONNECT_RO
 
             self.vmm = libvirt.openAuth(self.uri,



Index: virt-manager.spec
===================================================================
RCS file: /cvs/pkgs/rpms/virt-manager/F-9/virt-manager.spec,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- virt-manager.spec	9 May 2008 17:56:14 -0000	1.35
+++ virt-manager.spec	2 Oct 2008 11:56:48 -0000	1.36
@@ -8,7 +8,7 @@
 
 Name: virt-manager
 Version: 0.5.4
-Release: 4%{_extra_release}
+Release: 5%{_extra_release}
 Summary: Virtual Machine Manager
 
 Group: Applications/Emulators
@@ -20,6 +20,7 @@
 Patch1: %{name}-%{version}-polkit-root.patch
 Patch2: %{name}-%{version}-i18n.patch
 Patch3: %{name}-%{version}-image-dir.patch
+Patch4: %{name}-%{version}-polkit-check.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 # These two are just the oldest version tested
@@ -74,6 +75,7 @@
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 %build
 %configure
@@ -164,6 +166,9 @@
 %{_datadir}/dbus-1/services/%{name}.service
 
 %changelog
+* Thu Oct  2 2008 Daniel P. Berrange <berrange at redhat.com> - 0.5.4-5.fc9
+- Fix polkit policy file check (rhbz #464069)
+
 * Fri May  9 2008 Daniel P. Berrange <berrange at redhat.com> - 0.5.4-4.fc9
 - Default disk images to /var/lib/libvirt/images
 




More information about the fedora-extras-commits mailing list