diff mbox series

[RFC,v2,18/27] libselinux: fix logic for building android backend

Message ID 20230814132025.45364-19-cgzones@googlemail.com (mailing list archive)
State Accepted
Commit 25a181108714
Delegated to: Petr Lautrbach
Headers show
Series libselinux: rework selabel_file(5) database | expand

Commit Message

Christian Göttsche Aug. 14, 2023, 1:20 p.m. UTC
Fix the typo and adjust the logic accordingly so the android backend is
not build by default, but if either ANDROID_HOST or
LABEL_BACKEND_ANDROID is set to y.

Fixes: c2a58cc52574 ("libselinux: LABEL_BACKEND_ANDROID add option to enable")
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 libselinux/src/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

James Carter Oct. 10, 2023, 7:13 p.m. UTC | #1
On Mon, Aug 14, 2023 at 9:42 AM Christian Göttsche
<cgzones@googlemail.com> wrote:
>
> Fix the typo and adjust the logic accordingly so the android backend is
> not build by default, but if either ANDROID_HOST or
> LABEL_BACKEND_ANDROID is set to y.
>
> Fixes: c2a58cc52574 ("libselinux: LABEL_BACKEND_ANDROID add option to enable")
> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>

Acked-by: James Carter <jwcart2@gmail.com>

> ---
>  libselinux/src/Makefile | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile
> index 15d224e1..86a254da 100644
> --- a/libselinux/src/Makefile
> +++ b/libselinux/src/Makefile
> @@ -131,11 +131,10 @@ DISABLE_FLAGS+= -DNO_MEDIA_BACKEND -DNO_DB_BACKEND -DNO_X_BACKEND \
>  SRCS= callbacks.c freecon.c label.c label_file.c \
>         label_backends_android.c regex.c label_support.c \
>         matchpathcon.c setrans_client.c sha1.c booleans.c
> -else
>  LABEL_BACKEND_ANDROID=y
>  endif
>
> -ifneq ($(LABEL_BACKEND_ANDROIDT),y)
> +ifneq ($(LABEL_BACKEND_ANDROID),y)
>  SRCS:= $(filter-out label_backends_android.c, $(SRCS))
>  DISABLE_FLAGS+= -DNO_ANDROID_BACKEND
>  endif
> --
> 2.40.1
>
James Carter Oct. 12, 2023, 5:55 p.m. UTC | #2
On Tue, Oct 10, 2023 at 3:13 PM James Carter <jwcart2@gmail.com> wrote:
>
> On Mon, Aug 14, 2023 at 9:42 AM Christian Göttsche
> <cgzones@googlemail.com> wrote:
> >
> > Fix the typo and adjust the logic accordingly so the android backend is
> > not build by default, but if either ANDROID_HOST or
> > LABEL_BACKEND_ANDROID is set to y.
> >
> > Fixes: c2a58cc52574 ("libselinux: LABEL_BACKEND_ANDROID add option to enable")
> > Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
>
> Acked-by: James Carter <jwcart2@gmail.com>
>
Merged.
Thanks,
Jim

> > ---
> >  libselinux/src/Makefile | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile
> > index 15d224e1..86a254da 100644
> > --- a/libselinux/src/Makefile
> > +++ b/libselinux/src/Makefile
> > @@ -131,11 +131,10 @@ DISABLE_FLAGS+= -DNO_MEDIA_BACKEND -DNO_DB_BACKEND -DNO_X_BACKEND \
> >  SRCS= callbacks.c freecon.c label.c label_file.c \
> >         label_backends_android.c regex.c label_support.c \
> >         matchpathcon.c setrans_client.c sha1.c booleans.c
> > -else
> >  LABEL_BACKEND_ANDROID=y
> >  endif
> >
> > -ifneq ($(LABEL_BACKEND_ANDROIDT),y)
> > +ifneq ($(LABEL_BACKEND_ANDROID),y)
> >  SRCS:= $(filter-out label_backends_android.c, $(SRCS))
> >  DISABLE_FLAGS+= -DNO_ANDROID_BACKEND
> >  endif
> > --
> > 2.40.1
> >
diff mbox series

Patch

diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile
index 15d224e1..86a254da 100644
--- a/libselinux/src/Makefile
+++ b/libselinux/src/Makefile
@@ -131,11 +131,10 @@  DISABLE_FLAGS+= -DNO_MEDIA_BACKEND -DNO_DB_BACKEND -DNO_X_BACKEND \
 SRCS= callbacks.c freecon.c label.c label_file.c \
 	label_backends_android.c regex.c label_support.c \
 	matchpathcon.c setrans_client.c sha1.c booleans.c
-else
 LABEL_BACKEND_ANDROID=y
 endif
 
-ifneq ($(LABEL_BACKEND_ANDROIDT),y)
+ifneq ($(LABEL_BACKEND_ANDROID),y)
 SRCS:= $(filter-out label_backends_android.c, $(SRCS))
 DISABLE_FLAGS+= -DNO_ANDROID_BACKEND
 endif