selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] policycoreutils: make `-laudit -lbz2` conditional
@ 2025-06-23 18:06 Petr Lautrbach
  2025-06-23 18:08 ` James Carter
  0 siblings, 1 reply; 4+ messages in thread
From: Petr Lautrbach @ 2025-06-23 18:06 UTC (permalink / raw)
  To: selinux; +Cc: Petr Lautrbach

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.

Signed-off-by: Petr Lautrbach <lautrbach@redhat.com>
---

v2: fixed indentation, I was inspired by the wrong file :/

 policycoreutils/semodule/Makefile  | 2 ++
 policycoreutils/setsebool/Makefile | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/policycoreutils/semodule/Makefile b/policycoreutils/semodule/Makefile
index 7c45831fcd4e..52a68dfcac10 100644
--- a/policycoreutils/semodule/Makefile
+++ b/policycoreutils/semodule/Makefile
@@ -12,7 +12,9 @@ SEMODULE_OBJS = semodule.o
 
 all: semodule genhomedircon
 
+ifeq ($(DISABLE_SHARED),y)
 semodule: LDLIBS += -laudit -lbz2
+endif
 semodule: $(SEMODULE_OBJS)
 
 genhomedircon:
diff --git a/policycoreutils/setsebool/Makefile b/policycoreutils/setsebool/Makefile
index 1d5148469f01..f68440f90df7 100644
--- a/policycoreutils/setsebool/Makefile
+++ b/policycoreutils/setsebool/Makefile
@@ -15,7 +15,9 @@ BASHCOMPLETIONS=setsebool-bash-completion.sh
 
 all: setsebool
 
+ifeq ($(DISABLE_SHARED),y)
 setsebool: LDLIBS += -laudit -lbz2
+endif
 setsebool: $(SETSEBOOL_OBJS)
 
 install: all
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-07-02 17:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-23 18:06 [PATCH v2] policycoreutils: make `-laudit -lbz2` conditional Petr Lautrbach
2025-06-23 18:08 ` James Carter
2025-07-01 15:15   ` James Carter
2025-07-02 17:14     ` Petr Lautrbach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).