in yocto selinux the selinux-image.bbclass fails

71 Views Asked by At

i am building a readonly rootfs from yocto and i need to add the selinux. i added inherit selinux-image

#install SELinux packages

IMAGE_INSTALL_append = "
packagegroup-core-selinux
"

inherit selinux-image

my_image.bb

i added all the values from the README to the conf file

but when i build i get the error from the "selinux_set_labels" that it cannot find the selinux/config.

when i look at the tmp/work directory i see there is a refpolicy mls directory with the conf and all the rest of the policies files but in the rootfs (IMAGE_ROOTFS) is missing.

could someone tell me why the policy files are not installed in the IMAGE_ROOTFS or how to fix it that the selinux-image.bbclass will work

thanks

1

There are 1 best solutions below

0
user2095970 On

i found my answer. i had to add to the image_install:append = " refpolicy-mls" and it added the policy files. The SELinux is still disable and i dont now why but the files are added to my image