All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/refpolicy: Treat all modules as custom
@ 2021-08-30 11:45 José Pekkarinen
  2021-08-30 21:14 ` Thomas Petazzoni
  2021-09-17 17:22 ` Antoine Tenart
  0 siblings, 2 replies; 21+ messages in thread
From: José Pekkarinen @ 2021-08-30 11:45 UTC (permalink / raw)
  To: buildroot; +Cc: José Pekkarinen

The current processing of the modules doesn't work for
custom made policies appended through the extra dir mechanism,
since sed won't find a match for custom modules, it will
continue without triggering and error. This patch removes
all the modules from modules.conf and add them one by
one using REFPOLICY_MODULES values.

Signed-off-by: José Pekkarinen <jose.pekkarinen@unikie.com>
---
 package/refpolicy/refpolicy.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/refpolicy/refpolicy.mk b/package/refpolicy/refpolicy.mk
index 0194708b37..1c0a2c3385 100644
--- a/package/refpolicy/refpolicy.mk
+++ b/package/refpolicy/refpolicy.mk
@@ -85,9 +85,9 @@ endef
 # In the context of a monolithic policy enabling a piece of the policy as
 # 'base' or 'module' is equivalent, so we enable them as 'base'.
 define REFPOLICY_CONFIGURE_MODULES
-	$(SED) "s/ = module/ = no/g" $(@D)/policy/modules.conf
+	$(SED) "/ = module/d" $(@D)/policy/modules.conf
 	$(foreach m,$(sort $(REFPOLICY_MODULES)),
-		$(SED) "/^$(m) =/c\$(m) = base" $(@D)/policy/modules.conf
+		$(SED) "/^# Module: $(m)/a\$(m) = base" $(@D)/policy/modules.conf
 	)
 endef
 
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

end of thread, other threads:[~2021-09-23  9:17 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-30 11:45 [Buildroot] [PATCH] package/refpolicy: Treat all modules as custom José Pekkarinen
2021-08-30 21:14 ` Thomas Petazzoni
2021-09-17 17:22 ` Antoine Tenart
2021-09-20  6:01   ` José Pekkarinen
2021-09-20  9:30     ` Antoine Tenart
2021-09-20  9:44       ` José Pekkarinen
2021-09-20 13:21         ` Antoine Tenart
2021-09-20 13:39           ` José Pekkarinen
2021-09-20 13:52             ` Antoine Tenart
2021-09-21  6:29               ` José Pekkarinen
2021-09-21  7:12                 ` Antoine Tenart
2021-09-21 13:32                   ` José Pekkarinen
2021-09-21 13:42                     ` Antoine Tenart
2021-09-22 14:00                       ` José Pekkarinen
2021-09-22 14:23                         ` Antoine Tenart
2021-09-23  6:26                           ` José Pekkarinen
2021-09-23  7:59                             ` Antoine Tenart
2021-09-23  8:33                               ` Antoine Tenart
2021-09-23  8:47                                 ` José Pekkarinen
2021-09-23  9:08                               ` José Pekkarinen
2021-09-23  9:17                                 ` Antoine Tenart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.