add patch to libvirt for by-passing the check for netns being installed
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Tue, 8 Apr 2014 10:46:53 +0000 (12:46 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Tue, 8 Apr 2014 10:46:53 +0000 (12:46 +0200)
libvirt-1.2.3-bypass-netns-check.patch [new file with mode: 0644]
libvirt.spec

diff --git a/libvirt-1.2.3-bypass-netns-check.patch b/libvirt-1.2.3-bypass-netns-check.patch
new file mode 100644 (file)
index 0000000..8449f0c
--- /dev/null
@@ -0,0 +1,18 @@
+diff -ru libvirt-1.2.3/src/lxc/lxc_driver.c libvirt-1.2.3.pl/src/lxc/lxc_driver.c
+--- libvirt-1.2.3/src/lxc/lxc_driver.c 2014-03-27 11:35:01.000000000 +0100
++++ libvirt-1.2.3.pl/src/lxc/lxc_driver.c      2014-04-08 12:25:03.000000000 +0200
+@@ -1475,9 +1475,14 @@
+     const char *argv[] = {"ip", "link", "set", "lo", "netns", "-1", NULL};
+     int ip_rc;
++    /* somehow this check fails on PL nodes
++       most likely related to selinux as suggested in
++       https://bugzilla.redhat.com/show_bug.cgi?id=1050210
++       
+     if (virRun(argv, &ip_rc) < 0 ||
+         !(WIFEXITED(ip_rc) && (WEXITSTATUS(ip_rc) != 255)))
+         return 0;
++    */
+     if (lxcContainerAvailable(LXC_CONTAINER_FEATURE_NET) < 0)
+         return 0;
index e7fc19b..7ba3dda 100644 (file)
@@ -411,6 +411,7 @@ URL: http://libvirt.org/
     %define mainturl stable_updates/
 %endif
 Source: http://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.gz
+Patch1: libvirt-1.2.3-bypass-netns-check.patch
 
 %if %{with_libvirtd}
 Requires: libvirt-daemon = %{version}-%{release}
@@ -1190,6 +1191,7 @@ driver
 
 %prep
 %setup -q
+%patch1 -p0 -b .bypass-netns-check
 
 %build
 %if ! %{with_xen}