policycoreutils: make `-laudit -lbz2` conditional
PATCH 1/1 policycoreutils: make `-laudit -lbz2` conditional
Commit da6cd3d8d7600 ("Support static-only builds") introduced possibility to build static-only toolchain. For static builds of semodule and setsebool seems to be necessary to use -laudit -lbz2. As an side effect, when policycoreutils is built without other components, the buildroot requires libaudit.so and libbz2.so to be available. For shared builds this is not necessary and had not been required before.
--- policycoreutils/semodule/Makefile | 4 +++- policycoreutils/setsebool/Makefile | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-)
policycoreutils/semodule/Makefile +3 -1
@@ -12,7 +12,9 @@ SEMODULE_OBJS = semodule.o all: semodule genhomedircon -semodule: LDLIBS += -laudit -lbz2 +ifeq ($(DISABLE_SHARED),y) + semodule: LDLIBS += -laudit -lbz2 +endif semodule: $(SEMODULE_OBJS) genhomedircon:
policycoreutils/setsebool/Makefile +3 -1
@@ -15,7 +15,9 @@ BASHCOMPLETIONS=setsebool-bash-completion.sh all: setsebool -setsebool: LDLIBS += -laudit -lbz2 +ifeq ($(DISABLE_SHARED),y) + setsebool: LDLIBS += -laudit -lbz2 +endif setsebool: $(SETSEBOOL_OBJS) install: all
Signature · 1 line
2.49.0
Quoted 19 lines · Petr Lautrbach
Commit
da6cd3d8d7600("Support static-only builds") introduced possibility to build static-only toolchain. For static builds ofsemoduleandsetseboolseems to be necessary to use-laudit -lbz2. As an side effect, when policycoreutils is built without other components, the buildroot requires libaudit.so and libbz2.so to be available. For shared builds this is not necessary and had not been required before.Signed-off-by Petr Lautrbach <[email protected]>--- policycoreutils/semodule/Makefile | 4 +++- policycoreutils/setsebool/Makefile | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-)policycoreutils/semodule/Makefile +0
-0
policycoreutils/semodule/Makefile SEMODULE_OBJS = semodule.o · line 16
Quoted 6 lines
policycoreutils/semodule/Makefile +2
-1@@ -12,7 +12,9 @@ SEMODULE_OBJS = semodule.o all: semodule genhomedircon -semodule: LDLIBS += -laudit -lbz2 +ifeq ($(DISABLE_SHARED),y) + semodule: LDLIBS += -laudit -lbz2
make does not like the tab here (or the one below either). Thanks,
Jim
Quoted 23 lines
policycoreutils/semodule/Makefile +1
-0+endif semodule: $(SEMODULE_OBJS) genhomedircon:policycoreutils/setsebool/Makefile +3
-2@@ -15,7 +15,9 @@ BASHCOMPLETIONS=setsebool-bash-completion.sh all: setsebool -setsebool: LDLIBS += -laudit -lbz2 +ifeq ($(DISABLE_SHARED),y) + setsebool: LDLIBS += -laudit -lbz2 +endif setsebool: $(SETSEBOOL_OBJS) install: all --2.49.0