[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Really build without selinux when library is missing.
From: |
Michael Haubenwallner |
Subject: |
Re: [PATCH] Really build without selinux when library is missing. |
Date: |
Tue, 22 Oct 2013 08:27:06 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.8 |
On 10/21/2013 04:25 PM, Pádraig Brady wrote:
> On 10/21/2013 02:41 PM, Michael Haubenwallner wrote:
>> * m4/selinux-selinux-h.m4: When the selinux library is missing, really
>> continue without selinux, as already told in the warning message.
>> --- a/m4/selinux-selinux-h.m4
>> +++ b/m4/selinux-selinux-h.m4
>> @@ -65,5 +65,6 @@ AC_DEFUN([gl_LIBSELINUX],
>> 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
>> ])
>>
>
> That would still be dependent on /selinux being present
> for the right thing to be done.
Indeed!
> Does this more general fix work for you?
>
> diff --git a/m4/selinux-selinux-h.m4 b/m4/selinux-selinux-h.m4
> index 17cccff..eb005fc 100644
> --- a/m4/selinux-selinux-h.m4
> +++ b/m4/selinux-selinux-h.m4
> @@ -61,9 +61,11 @@ AC_DEFUN([gl_LIBSELINUX],
> AC_SUBST([LIB_SELINUX])
>
> # Warn 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.])
> + 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
> + with_selinux=no
> fi
> ])
>
Yes, of course!
Thank you!
/haubi/