From 87bef3384494aebaf9d91247a7aaab84bd233f8b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Sat, 17 Mar 2012 20:01:14 +0000 Subject: [PATCH] - rel 8 - fix running lxc on systems without selinux enabled Changed files: libvirt.spec -> 1.70 lxc-without-selinux.patch -> 1.1 --- libvirt.spec | 4 +++- lxc-without-selinux.patch | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 lxc-without-selinux.patch diff --git a/libvirt.spec b/libvirt.spec index 9cf59ab..b5d0d9e 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -30,7 +30,7 @@ Summary: Toolkit to interact with virtualization capabilities Summary(pl.UTF-8): Narzędzia współpracujące z funkcjami wirtualizacji Name: libvirt Version: 0.9.10 -Release: 7 +Release: 8 License: LGPL v2.1+ Group: Base/Kernel Source0: ftp://ftp.libvirt.org/libvirt/%{name}-%{version}.tar.gz @@ -41,6 +41,7 @@ Patch0: %{name}-sasl.patch Patch1: %{name}-lxc.patch Patch2: libvirt-qemu-acl.patch Patch3: libvirt-xend.patch +Patch4: lxc-without-selinux.patch URL: http://www.libvirt.org/ BuildRequires: audit-libs-devel BuildRequires: augeas-devel @@ -249,6 +250,7 @@ Zarządca blokad sanlock dla biblioteki libvirt. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 # weird translations %{__rm} po/{my,eu_ES}.{po,gmo} diff --git a/lxc-without-selinux.patch b/lxc-without-selinux.patch new file mode 100644 index 0000000..8e12407 --- /dev/null +++ b/lxc-without-selinux.patch @@ -0,0 +1,22 @@ +--- libvirt-0.9.10/src/lxc/lxc_container.c~ 2012-02-13 08:06:23.000000000 +0100 ++++ libvirt-0.9.10/src/lxc/lxc_container.c 2012-03-17 20:40:10.960883236 +0100 +@@ -501,7 +501,7 @@ + if (pivotRoot) { + #if HAVE_SELINUX + if (getfilecon("/", &con) < 0 && +- errno != ENOTSUP) { ++ errno != ENOTSUP && errno != ENODATA) { + virReportSystemError(errno, "%s", + _("Failed to query file context on /")); + goto cleanup; +--- libvirt-0.9.10/src/lxc/lxc_controller.c~ 2012-03-17 20:14:16.117479754 +0100 ++++ libvirt-0.9.10/src/lxc/lxc_controller.c 2012-03-17 20:41:17.730886249 +0100 +@@ -1492,7 +1492,7 @@ + + #if HAVE_SELINUX + if (getfilecon(root->src, &con) < 0 && +- errno != ENOTSUP) { ++ errno != ENOTSUP && errno != ENODATA) { + virReportSystemError(errno, + _("Failed to query file context on %s"), + root->src); -- 2.44.0