From b423980cd592b8b78c01d9258fd065536e778665 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Fri, 10 Oct 2014 07:18:52 +0000 Subject: [PATCH] Make sure the apparmor profiles and manifests end up in the custom directory, not in the rootfs --- .../hooks/90-precompile-apparmor-policies.chroot | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/live-build/ubuntu-touch/hooks/90-precompile-apparmor-policies.chroot b/live-build/ubuntu-touch/hooks/90-precompile-apparmor-policies.chroot index 8d92cea5..0b53e2f7 100755 --- a/live-build/ubuntu-touch/hooks/90-precompile-apparmor-policies.chroot +++ b/live-build/ubuntu-touch/hooks/90-precompile-apparmor-policies.chroot @@ -11,3 +11,18 @@ echo "I: precompiling deb apparmor policies" echo "I: precompiling custom click apparmor policies" mkdir -p /custom/cache/apparmor /sbin/apparmor_parser -M ${FEATURES} -Q --write-cache --cache-loc=/custom/cache/apparmor/ `find /var/lib/apparmor/profiles/ -maxdepth 1 -type f -not -path '*/\.*'` + + +#get the apparmor manifests and profiles +mkdir -p /custom/lib/apparmor/clicks +mkdir -p /custom/lib/apparmor/profiles + +for manifest in /var/lib/apparmor/clicks/*; do + case $(readlink -f $manifest) in + /custom/*) + mv $manifest /custom/lib/apparmor/clicks/$manifest + profile=$(basename $manifest .json) + mv /var/lib/apparmor/profiles/click_$profile /custom/lib/apparmor/profiles + ;; + esac +done