Oops, meant to send to bug-gnulib (CCd). Apologies.

On Fri, Jan 9, 2026 at 6:43 PM Michael Daniels <[email protected]> wrote:
>
> * m4/selinux-selinux-h.m4: only continue without SELinux in the
> situation in which the warning is provided
> (i.e. the current system supports SELinux but libselinux is missing).
>
> Previously, SELinux was disabled whenever libselinux was missing, which,
> for coreutils >= 9.9, is incorrect (as chcon/runcon should be built
> whenever --with-selinux is provided to the configure script,
> and neither of those actually need libselinux).
> ---
>  m4/selinux-selinux-h.m4 | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/m4/selinux-selinux-h.m4 b/m4/selinux-selinux-h.m4
> index 5b93446162..ffff90efb3 100644
> --- a/m4/selinux-selinux-h.m4
> +++ b/m4/selinux-selinux-h.m4
> @@ -86,12 +86,12 @@ AC_DEFUN([gl_LIBSELINUX],
>    fi
>    AC_SUBST([LIB_SELINUX])
>
> -  # Warn if SELinux is found but libselinux is absent;
> -  if test "$ac_cv_search_setfilecon" = no; then
> -    if test "$host" = "$build" && test -d /selinux; then
> -      AC_MSG_WARN([This system supports SELinux but libselinux is missing.])
> -      AC_MSG_WARN([AC_PACKAGE_NAME will be compiled without SELinux 
> support.])
> -    fi
> +  # Disable SELinux support if SELinux is found but libselinux is absent
> +  if test "$ac_cv_search_setfilecon" = no
> +     && test "$host" = "$build"
> +     && test -d /selinux; then
> +    AC_MSG_WARN([This system supports SELinux but libselinux is missing.])
> +    AC_MSG_WARN([AC_PACKAGE_NAME will be compiled without SELinux support.])
>      with_selinux=no
>    fi
>  ])
> --
> 2.51.2
>

Reply via email to