[fedora-virt-maint] rpms/python-virtinst/F-11 virtinst-0.400.3-selinux-warn.patch, NONE, 1.1 python-virtinst.spec, 1.66, 1.67

Cole Robinson crobinso at fedoraproject.org
Tue Apr 21 17:19:05 UTC 2009


Author: crobinso

Update of /cvs/pkgs/rpms/python-virtinst/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6308

Modified Files:
	python-virtinst.spec 
Added Files:
	virtinst-0.400.3-selinux-warn.patch 
Log Message:
Only warn if selinux labeling appears to be wrong (bz 496340)


virtinst-0.400.3-selinux-warn.patch:

--- NEW FILE virtinst-0.400.3-selinux-warn.patch ---
diff -rup virtinst-0.400.3/virtinst/VirtualDisk.py new/virtinst/VirtualDisk.py
--- virtinst-0.400.3/virtinst/VirtualDisk.py	2009-04-20 13:09:36.000000000 -0400
+++ new/virtinst/VirtualDisk.py	2009-04-20 13:59:00.000000000 -0400
@@ -678,8 +678,9 @@ class VirtualDisk(VirtualDevice):
                 return
 
             if self._is_remote():
-                raise ValueError, _("Install volume %s has incorrect SELinux label %s, expecting %s" %
-                                    (self.path, label, wantLabel))
+                logging.warn(_("Install volume %s has incorrect SELinux "
+                               "label %s, expecting %s") %
+                               (self.path, label, wantLabel))
             else:
                 changeLabel = True
         elif self.path:
@@ -691,8 +692,9 @@ class VirtualDisk(VirtualDevice):
                     return
 
                 if self._is_remote():
-                    raise ValueError, _("Install volume %s has incorrect SELinux label %s, expecting %s" %
-                                        (self.path, label, wantLabel))
+                    logging.warn(_("Install volume %s has incorrect SELinux "
+                                   "label %s, expecting %s") %
+                                   (self.path, label, wantLabel))
                 else:
                     if self.path[0:4] == "/dev":
                         logging.info("Not changing context on physical device")
@@ -707,8 +709,10 @@ class VirtualDisk(VirtualDevice):
                 selinux.setfilecon(self.path, wantLabel)
                 logging.info("Changed SELinux label to %s" % wantLabel)
             except Exception, e:
-                raise ValueError, _(("Unable to fix install volume SELinux labelling: %s\n" % str(e)) +
-                                    ("Please run 'chcon %s %s' manually and retry installation" % (wantLabel, self.path)))
+                logging.warn(_(("Unable to fix install volume SELinux "
+                                "labelling: %s\n") % str(e)+ "Please run "
+                                "'chcon %s %s' manually and retry "
+                                "installation" % (wantLabel, self.path)))
 
 
     def get_xml_config(self, disknode=None):


Index: python-virtinst.spec
===================================================================
RCS file: /cvs/pkgs/rpms/python-virtinst/F-11/python-virtinst.spec,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- python-virtinst.spec	14 Apr 2009 21:06:59 -0000	1.66
+++ python-virtinst.spec	21 Apr 2009 17:19:02 -0000	1.67
@@ -17,7 +17,7 @@
 Summary: Python modules and utilities for installing virtual machines
 Name: python-%{appname}
 Version: 0.400.3
-Release: 6%{_extra_release}
+Release: 7%{_extra_release}
 Source0: http://virt-manager.org/download/sources/%{appname}/%{appname}-%{version}.tar.gz
 Patch1: %{appname}-%{version}-fix-virtimage-scratch.patch
 Patch2: %{appname}-%{version}-hostdev-libvirt-calls.patch
@@ -29,6 +29,8 @@
 Patch6: %{appname}-%{version}-fix-floppy-dev.patch
 # F11 Translations (bz 493944 and bz 494358)
 Patch7: %{appname}-%{version}-updated-trans.patch
+# Only throw warnings if we fail to relabel install media (bz 496340)
+Patch8: %{appname}-%{version}-selinux-warn.patch
 License: GPLv2+
 Group: Development/Libraries
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -62,6 +64,7 @@
 %patch5 -p1
 %patch6 -p1
 %patch7 -p1
+%patch8 -p1
 
 %build
 python setup.py build
@@ -97,6 +100,9 @@
 %{_bindir}/virt-convert
 
 %changelog
+* Tue Apr 21 2009 Cole Robinson <crobinso at redhat.com> - 0.400.3-7.fc11
+- Only warn if selinux labeling appears to be wrong (bz 496340)
+
 * Tue Apr 14 2009 Cole Robinson <crobinso at redhat.com> - 0.400.3-6.fc11
 - More translation updates
 




More information about the Fedora-virt-maint mailing list