From 5d0c2e417b5dd527ec22faaffe9b8dd28ba4c35e Mon Sep 17 00:00:00 2001 From: William Roberts <william.c.roberts@intel.com> Date: Thu, 23 Mar 2017 11:26:29 -0700 Subject: [PATCH] build: stop generating $T/file_contexts secilc is being used without -f which is causing a file_contexts file to be generated in the root of the tree where the build tools run: $ stat $T/file_contexts File: 'file_contexts' Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: fc00h/64512d Inode: 5508958 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 1000/wcrobert) Gid: ( 1000/wcrobert) Access: 2017-03-23 11:23:41.691538047 -0700 Modify: 2017-03-23 11:23:41.691538047 -0700 Change: 2017-03-23 11:23:41.691538047 -0700 Test: remove $T/file_contexts, touch a policy file and make sepolicy, ensure file is not regenerated. Also, ensure hikey builds and boots. Change-Id: I0d15338a540dba0194c65a1436647c7d38fe3c79 Signed-off-by: William Roberts <william.c.roberts@intel.com> --- Android.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Android.mk b/Android.mk index 44ba23d24..d0edeab68 100644 --- a/Android.mk +++ b/Android.mk @@ -447,7 +447,7 @@ all_cil_files := \ $(LOCAL_BUILT_MODULE): PRIVATE_CIL_FILES := $(all_cil_files) $(LOCAL_BUILT_MODULE): $(HOST_OUT_EXECUTABLES)/secilc $(HOST_OUT_EXECUTABLES)/sepolicy-analyze $(all_cil_files) @mkdir -p $(dir $@) - $(hide) $< -M true -c $(POLICYVERS) $(PRIVATE_CIL_FILES) -o $@.tmp + $(hide) $< -M true -c $(POLICYVERS) $(PRIVATE_CIL_FILES) -o $@.tmp -f /dev/null $(hide) $(HOST_OUT_EXECUTABLES)/sepolicy-analyze $@.tmp permissive > $@.permissivedomains $(hide) if [ "$(TARGET_BUILD_VARIANT)" = "user" -a -s $@.permissivedomains ]; then \ echo "==========" 1>&2; \ @@ -599,7 +599,7 @@ all_cil_files.recovery := \ $(LOCAL_BUILT_MODULE): PRIVATE_CIL_FILES := $(all_cil_files.recovery) $(LOCAL_BUILT_MODULE): $(HOST_OUT_EXECUTABLES)/secilc $(HOST_OUT_EXECUTABLES)/sepolicy-analyze $(all_cil_files.recovery) @mkdir -p $(dir $@) - $(hide) $< -M true -c $(POLICYVERS) $(PRIVATE_CIL_FILES) -o $@.tmp + $(hide) $< -M true -c $(POLICYVERS) $(PRIVATE_CIL_FILES) -o $@.tmp -f /dev/null $(hide) $(HOST_OUT_EXECUTABLES)/sepolicy-analyze $@.tmp permissive > $@.permissivedomains $(hide) if [ "$(TARGET_BUILD_VARIANT)" = "user" -a -s $@.permissivedomains ]; then \ echo "==========" 1>&2; \ -- GitLab