Skip to contentSkip to conversation

Fix build issue for apparmor

PATCH In review Jinliang Li 2 participants 4 messages Jun 6, 2018 – Jun 11, 2018

lore
Share & tools
lore
#0 lore raw

cover Fix build issue for apparmor

This patch series fix 2 build issues for apparmor.

Jinliang Li (2):
Fix build issue for apparmor kernel configuration Fix build issue for apparmor when systemd is used

 recipes-kernel/linux/linux-yocto_4.%.bbappend | 2 +-
 recipes-security/AppArmor/apparmor_2.11.0.bb  | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/2 Fix build issue for apparmor kernel configuration

Set the correct path of kernel configuration file in linux-yocto_4.%.bbappend to fix the build issue, which is "Fetcher failure for URL: 'file://apparmor.cfg'. Unable to fetch URL from any source."

---
 recipes-kernel/linux/linux-yocto_4.%.bbappend | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-kernel/linux/linux-yocto_4.%.bbappend +1 -1
index 9d68c99..067be8f 100644
@@ -1,4 +1,4 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-4.12:"
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
 SRC_URI += "\
         ${@bb.utils.contains('DISTRO_FEATURES', 'apparmor', ' file://apparmor.cfg', '', d)} \
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/2 Fix build issue for apparmor when systemd is used

In reply to Jinliang Li

When systemd is used as system init manager, there is a build issue complains "can't found apparmor.service". This patch fix it.

---
 recipes-security/AppArmor/apparmor_2.11.0.bb | 5 +++++
 1 file changed, 5 insertions(+)
recipes-security/AppArmor/apparmor_2.11.0.bb +5 -0
index a83c2c3..fc9b614 100644
@@ -104,6 +104,11 @@ do_install () {
 
 	install ${WORKDIR}/apparmor ${D}/${INIT_D_DIR}/apparmor
 	install ${WORKDIR}/functions ${D}/lib/apparmor
+	if [ "${VIRTUAL-RUNTIME_init_manager}" = "systemd" ]; then
+		install -d ${D}${systemd_system_unitdir}
+		install ${WORKDIR}/apparmor.service \
+			${D}${systemd_system_unitdir}
+	fi
 }
 
 do_compile_ptest () {
Signature · 1 line
2.7.4
#3 lore raw
In reply to Jinliang Li

series merged.

Thanks,

Armin

Quoted 10 lines · Jinliang Li

This patch series fix 2 build issues for apparmor.

Jinliang Li (2):
Fix build issue for apparmor kernel configuration Fix build issue for apparmor when systemd is used

 recipes-kernel/linux/linux-yocto_4.%.bbappend | 2 +-
 recipes-security/AppArmor/apparmor_2.11.0.bb  | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)