Skip to contentSkip to conversation

Stage SELinux config file in the sysroot.

meta-selinux Applied Philip Tricca 2 participants 3 messages Sep 23, 2013 – Sep 27, 2013

lore
Share & tools
lore
#0 lore raw

This is needed to build policy modules outside of the refpolicy. Policy module build systems need to determine the name of the policy that will be in effect on the target host. This allows them to locate the policy headers that will be under $sysroot/usr/share/selinux/$name/include. Given that there *could* be more than one policy installed in the sysroot we can't assume that the policy installed there is the only policy to build against.

---
 recipes-security/selinux/selinux-config_0.1.bb |    3 +++
 1 file changed, 3 insertions(+)
recipes-security/selinux/selinux-config_0.1.bb +3 -0
index 9521dcf..ad0d647 100644
@@ -43,3 +43,6 @@ SELINUXTYPE=${DEFAULT_POLICY}
 	install -m 0644 ${WORKDIR}/config ${D}/${sysconfdir}/selinux/
 }
 
+sysroot_stage_all_append () {
+	sysroot_stage_dir ${D}${sysconfdir} ${SYSROOT_DESTDIR}${sysconfdir}
+}
Signature · 1 line
1.7.10.4
#1 lore raw

Cc'ing Mark.

Quoted 25 lines · Philip Tricca

This is needed to build policy modules outside of the refpolicy. Policy module build systems need to determine the name of the policy that will be in effect on the target host. This allows them to locate the policy headers that will be under $sysroot/usr/share/selinux/$name/include. Given that there *could* be more than one policy installed in the sysroot we can't assume that the policy installed there is the only policy to build against.

---
 recipes-security/selinux/selinux-config_0.1.bb |    3 +++
 1 file changed, 3 insertions(+)
recipes-security/selinux/selinux-config_0.1.bb +3 -0
index 9521dcf..ad0d647 100644
@@ -43,3 +43,6 @@ SELINUXTYPE=${DEFAULT_POLICY}
 	install -m 0644 ${WORKDIR}/config ${D}/${sysconfdir}/selinux/
 }
 
+sysroot_stage_all_append () {
+	sysroot_stage_dir ${D}${sysconfdir} ${SYSROOT_DESTDIR}${sysconfdir}
+}
#2 lore raw
In reply to Philip Tricca

Merged, thanks.
-J.

Quoted 24 lines · [[yocto] [meta-selinux] Stage SELinux config file in the sysroot.] On 13.09.23…

This is needed to build policy modules outside of the refpolicy. Policy module build systems need to determine the name of the policy that will be in effect on the target host. This allows them to locate the policy headers that will be under $sysroot/usr/share/selinux/$name/include. Given that there *could* be more than one policy installed in the sysroot we can't assume that the policy installed there is the only policy to build against.

---
 recipes-security/selinux/selinux-config_0.1.bb |    3 +++
 1 file changed, 3 insertions(+)
recipes-security/selinux/selinux-config_0.1.bb +3 -0
index 9521dcf..ad0d647 100644
@@ -43,3 +43,6 @@ SELINUXTYPE=${DEFAULT_POLICY}
 	install -m 0644 ${WORKDIR}/config ${D}/${sysconfdir}/selinux/
 }
 
+sysroot_stage_all_append () {
+	sysroot_stage_dir ${D}${sysconfdir} ${SYSROOT_DESTDIR}${sysconfdir}
+}
Signature · 2 lines
-Joe MacDonald.
:wq