From f9c5e2022b54097474e46d9efb54080bd0e4d606 Mon Sep 17 00:00:00 2001 From: Jinliang Li Date: Wed, 6 Jun 2018 22:06:53 +0800 Subject: Fix build issue for apparmor when systemd is used When systemd is used as system init manager, there is a build issue complains "can't found apparmor.service". This patch fix it. Signed-off-by: Jinliang Li Signed-off-by: Armin Kuster --- recipes-security/AppArmor/apparmor_2.11.0.bb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes-security/AppArmor/apparmor_2.11.0.bb b/recipes-security/AppArmor/apparmor_2.11.0.bb index a83c2c3..fc9b614 100644 --- a/recipes-security/AppArmor/apparmor_2.11.0.bb +++ b/recipes-security/AppArmor/apparmor_2.11.0.bb @@ -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 () { -- cgit v1.2.3-54-g00ecf