From 151562f64526ff57379f48541f9ffdea481db016 Mon Sep 17 00:00:00 2001 From: Inseob Kim Date: Fri, 12 Apr 2024 10:53:34 +0900 Subject: [PATCH] Add selinux_policy_system_soong phony module selinux_policy_system is in Android.mk. selinux_policy_system_soong is a phony module in Android.bp for Soong built system images. Bug: 329208946 Test: m aosp_cf_system_x86_64 Change-Id: If101155c5a706925d52593bab648b878b075f7f2 --- Android.bp | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/Android.bp b/Android.bp index b47d72f9d..d208920c4 100644 --- a/Android.bp +++ b/Android.bp @@ -88,6 +88,45 @@ se_build_files { srcs: ["technical_debt.cil"], } +soong_config_module_type { + name: "se_phony", + module_type: "phony", + config_namespace: "ANDROID", + bool_variables: ["PRODUCT_PRECOMPILED_SEPOLICY"], + list_variables: ["PLATFORM_SEPOLICY_COMPAT_VERSIONS"], + properties: ["required"], +} + +se_phony { + // Currently used only for aosp_cf_system_x86_64 + // TODO(b/329208946): migrate selinux_policy_system to Soong + name: "selinux_policy_system_soong", + required: [ + "plat_bug_map", + "plat_file_contexts", + "plat_hwservice_contexts", + "plat_keystore2_key_contexts", + "plat_mac_permissions.xml", + "plat_mapping_file", + "plat_property_contexts", + "plat_seapp_contexts", + "plat_sepolicy.cil", + "plat_service_contexts", + "secilc", + ], + soong_config_variables: { + PLATFORM_SEPOLICY_COMPAT_VERSIONS: { + required: [ + "plat_%s.cil", + "%s.compat.cil", + ], + }, + PRODUCT_PRECOMPILED_SEPOLICY: { + required: ["plat_sepolicy_and_mapping.sha256"], + }, + }, +} + reqd_mask_policy = [":se_build_files{.reqd_mask}"] plat_public_policy = [":se_build_files{.plat_public}"] plat_private_policy = [":se_build_files{.plat_private}"]