[PATCH] fixup! Add security policy support

Sascha Hauer s.hauer at pengutronix.de
Fri Aug 22 03:37:43 PDT 2025


Remove policy-list files before recreating them, otherwise we can get stale
security configs when changing the build configuration or branch.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 49658e5fe2..be87fbbc7a 100644
--- a/Makefile
+++ b/Makefile
@@ -1195,10 +1195,14 @@ targets += include/generated/sconfig_names.h
 KPOLICY = $(shell find $(objtree)/ -name policy-list -exec cat {} \;)
 KPOLICY.tmp = $(addsuffix .tmp,$(KPOLICY))
 
+PHONY += remove-policies
+remove-policies: FORCE
+	find -name "policy-list" | xargs rm
+
 PHONY += collect-policies
 collect-policies: KBUILD_MODULES :=
 collect-policies: KBUILD_BUILTIN :=
-collect-policies: $(barebox-dirs) FORCE
+collect-policies: remove-policies $(barebox-dirs) FORCE
 
 PHONY += security_listconfigs
 security_listconfigs: collect-policies FORCE
-- 
2.47.2




More information about the barebox mailing list