From d7df770c4ab2259422d036d706a346380d2d8874 Mon Sep 17 00:00:00 2001 From: Felix Elsner Date: Thu, 16 Jul 2020 13:00:59 +0200 Subject: [PATCH] soong_config: Support SYSTEM_EXT* sepolicy vars The new variable name reflects its actual usage. Keep compatibility with BOARD_PLAT_* because it has been a convention for years. Also add warning messages for BOARD_PLAT_* variables via KATI_deprecated_var. Test: `make selinux_policy` with `SYSTEM_EXT_{PUBLIC,PRIVATE_SEPOLICY_DIRS}` set, observe additions in `$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/selinux` Signed-off-by: Felix Elsner Change-Id: I58c64839cc513ae082cd3ee3c1e108843ea7439e --- core/config.mk | 2 ++ core/soong_config.mk | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/config.mk b/core/config.mk index be0b55cc5a..16fa988778 100644 --- a/core/config.mk +++ b/core/config.mk @@ -155,6 +155,8 @@ $(KATI_obsolete_var COVERAGE_PATHS,Use NATIVE_COVERAGE_PATHS instead) $(KATI_obsolete_var COVERAGE_EXCLUDE_PATHS,Use NATIVE_COVERAGE_EXCLUDE_PATHS instead) $(KATI_obsolete_var BOARD_VNDK_RUNTIME_DISABLE,VNDK-Lite is no longer supported.) $(KATI_obsolete_var LOCAL_SANITIZE_BLACKLIST,Use LOCAL_SANITIZE_BLOCKLIST instead.) +$(KATI_deprecated_var BOARD_PLAT_PUBLIC_SEPOLICY_DIR,Use SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS instead.) +$(KATI_deprecated_var BOARD_PLAT_PRIVATE_SEPOLICY_DIR,Use SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead.) # Used to force goals to build. Only use for conditionally defined goals. .PHONY: FORCE diff --git a/core/soong_config.mk b/core/soong_config.mk index 5b83aa5f21..d5e16f717e 100644 --- a/core/soong_config.mk +++ b/core/soong_config.mk @@ -174,8 +174,9 @@ $(call add_json_list, BoardVendorSepolicyDirs, $(BOARD_VENDOR_SEPOLICY $(call add_json_list, BoardOdmSepolicyDirs, $(BOARD_ODM_SEPOLICY_DIRS)) $(call add_json_list, BoardVendorDlkmSepolicyDirs, $(BOARD_VENDOR_DLKM_SEPOLICY_DIRS)) $(call add_json_list, BoardOdmDlkmSepolicyDirs, $(BOARD_ODM_DLKM_SEPOLICY_DIRS)) -$(call add_json_list, SystemExtPublicSepolicyDirs, $(BOARD_PLAT_PUBLIC_SEPOLICY_DIR)) -$(call add_json_list, SystemExtPrivateSepolicyDirs, $(BOARD_PLAT_PRIVATE_SEPOLICY_DIR)) +# TODO: BOARD_PLAT_* dirs only kept for compatibility reasons. Will be a hard error on API level 31 +$(call add_json_list, SystemExtPublicSepolicyDirs, $(SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS) $(BOARD_PLAT_PUBLIC_SEPOLICY_DIR)) +$(call add_json_list, SystemExtPrivateSepolicyDirs, $(SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS) $(BOARD_PLAT_PRIVATE_SEPOLICY_DIR)) $(call add_json_list, BoardSepolicyM4Defs, $(BOARD_SEPOLICY_M4DEFS)) $(call add_json_bool, Flatten_apex, $(filter true,$(TARGET_FLATTEN_APEX)))