Skip to contentSkip to conversation

cri-o: use PACKAGECONFIG to handle selinux

PATCH New Chen Qi 1 participant 1 message Feb 17, 2023

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

PATCH v2 1/1 cri-o: use PACKAGECONFIG to handle selinux

For cri-o, libselinux is optional, this can be seen from its Makefile. So let's make selinux optional by using PACKAGECONFIG, whose default value is determined by the DISTRO_FEATURES. In this way, meta-selinux dependency is not necessary.

---
 recipes-containers/cri-o/cri-o_git.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
recipes-containers/cri-o/cri-o_git.bb +2 -2
index 74fa736..1557671 100644
@@ -40,14 +40,14 @@ DEPENDS = " \
     ostree \
     libdevmapper \
     libseccomp \
-    libselinux \
     "
 RDEPENDS:${PN} = " \
     cni \
     libdevmapper \
     "
 
-SKIP_RECIPE[cri-o] ?= "${@bb.utils.contains('BBFILE_COLLECTIONS', 'selinux', '', 'Depends on libselinux from meta-selinux which is not included', d)}"
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}"
+PACKAGECONFIG[selinux] = ",,libselinux"
 
 PACKAGES =+ "${PN}-config"
 
Signature · 1 line
2.37.1