aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2012-09-06 15:22:27 +0100
committerDaniel P. Berrange <berrange@redhat.com>2012-09-07 13:31:00 +0100
commitbd172f13459ee1f66dd1b0c0e3612a45e297e72a (patch)
treec3f20c4ee6fc311698c7fc726d87a68535ad4f05 /libvirt.spec.in
parentDon't assume use of /sys/fs/cgroup (diff)
downloadlibvirt-bd172f13459ee1f66dd1b0c0e3612a45e297e72a.tar.gz
libvirt-bd172f13459ee1f66dd1b0c0e3612a45e297e72a.tar.bz2
libvirt-bd172f13459ee1f66dd1b0c0e3612a45e297e72a.zip
Fix location of SELinux mount during RPM builds
When building RPMs the host kernel cannot be assumed to match the target OS kernel. Thus auto-detecting /selinux vs /sys/fs/selinux based on the host kernel can result in the wrong choice (eg F18 builds on a RHEL6 host kernel) Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'libvirt.spec.in')
-rw-r--r--libvirt.spec.in10
1 files changed, 10 insertions, 0 deletions
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 044b00f60..cd0121937 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1222,6 +1222,15 @@ of recent versions of Linux (and other OSes).
%if 0%{?enable_autotools}
autoreconf -if
%endif
+
+%if %{with_selinux}
+%if %{?fedora} >= 17 || %{?rhel} >= 7
+%define with_selinux_mount --with-selinux-mount="/sys/fs/selinux"
+%else
+%define with_selinux_mount --with-selinux-mount="/selinux"
+%endif
+%endif
+
%configure %{?_without_xen} \
%{?_without_qemu} \
%{?_without_openvz} \
@@ -1254,6 +1263,7 @@ autoreconf -if
%{?_without_capng} \
%{?_without_netcf} \
%{?_without_selinux} \
+ %{?_with_selinux_mount} \
%{?_without_hal} \
%{?_without_udev} \
%{?_without_yajl} \