提交 bd172f13 编写于 作者: D Daniel P. Berrange

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: NDaniel P. Berrange <berrange@redhat.com>
上级 a4fd7405
......@@ -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} \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册