[libvirt] [PATCH] configure.ac SELinux fixes

* Fix a logic error in configure.ac that prevented --with-selinux=no from being used with --with-secdriver-selinux=no. * Fix some strings to clarify the difference between --with-selinux and --with-secdriver-selinux. Signed-off-by: Spencer Shimko <sshimko@tresys.com> --- configure.ac | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 42c09b4..68dca54 100644 --- a/configure.ac +++ b/configure.ac @@ -869,14 +869,14 @@ if test "$with_selinux" != "no"; then AC_CHECK_HEADER([selinux/selinux.h],[],[fail=1]) AC_CHECK_LIB([selinux], [fgetfilecon],[],[fail=1]) test $fail = 1 && - AC_MSG_ERROR([You must install the SELinux development package in order to compile libvirt]) + AC_MSG_ERROR([You must install the libselinux development package in order to compile libvirt with basic SELinux support]) fi CFLAGS="$old_cflags" LIBS="$old_libs" fi if test "$with_selinux" = "yes"; then SELINUX_LIBS="-lselinux" - AC_DEFINE_UNQUOTED([HAVE_SELINUX], 1, [whether SELinux is available for security]) + AC_DEFINE_UNQUOTED([HAVE_SELINUX], 1, [whether basic SELinux functionality is available]) fi AM_CONDITIONAL([HAVE_SELINUX], [test "$with_selinux" != "no"]) AC_SUBST([SELINUX_CFLAGS]) @@ -891,9 +891,9 @@ AC_ARG_WITH([secdriver-selinux], if test "$with_selinux" != "yes" ; then if test "$with_secdriver_selinux" = "check" ; then with_secdriver_selinux=no - else - AC_MSG_ERROR([You must install the SELinux development package in order to compile libvirt]) - fi + elif test "$with_secdriver_selinux" = "yes"; then + AC_MSG_ERROR([You must install the libselinux development package and enable SELinux with the --with-selinux=yes in order to compile libvirt --with-secdriver-selinux=yes]) + fi else old_cflags="$CFLAGS" old_libs="$LIBS" @@ -910,7 +910,7 @@ else if test "$with_secdriver_selinux" = "check" ; then with_secdriver_selinux=no else - AC_MSG_ERROR([You must install the SELinux development package in order to compile libvirt]) + AC_MSG_ERROR([You must install libselinux development package >= 2.0.82 in order to compile libvirt --with-secdriver-selinux=yes]) fi else with_secdriver_selinux=yes -- 1.6.6.1

On 04/21/2010 11:44 AM, spencer@beyondabstraction.net wrote:
* Fix a logic error in configure.ac that prevented --with-selinux=no from being used with --with-secdriver-selinux=no.
* Fix some strings to clarify the difference between --with-selinux and --with-secdriver-selinux.
@@ -891,9 +891,9 @@ AC_ARG_WITH([secdriver-selinux], if test "$with_selinux" != "yes" ; then if test "$with_secdriver_selinux" = "check" ; then with_secdriver_selinux=no - else - AC_MSG_ERROR([You must install the SELinux development package in order to compile libvirt]) - fi + elif test "$with_secdriver_selinux" = "yes"; then + AC_MSG_ERROR([You must install the libselinux development package and enable SELinux with the --with-selinux=yes in order to compile libvirt --with-secdriver-selinux=yes]) + fi
ACK on the logic fix, and the error message changes seemed okay. Your git configuration might be off: you sent from a different email address than your signed-off line, and with no associated name, which confused git am. I ended up manually setting the commit Author: field to match your signed-off line. I also had to fix a trailing whitespace bug, in order to pass 'make syntax-check'. But after that, I went ahead and pushed this; thanks again for the patch. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
participants (2)
-
Eric Blake
-
spencer@beyondabstraction.net