Fix bpfmt

Bug: N/A
Test: N/A
Flag: NONE trivial format change
Change-Id: I8f6293dcc47a4ead347c4861ba929d4b3042c311
This commit is contained in:
Inseob Kim 2024-04-17 09:48:43 +09:00
parent d0188d8bca
commit ff2018fa84
13 changed files with 266 additions and 207 deletions

View file

@ -42,7 +42,10 @@ license {
],
}
cc_defaults { name: "selinux_policy_version", cflags: ["-DSEPOLICY_VERSION=30"], }
cc_defaults {
name: "selinux_policy_version",
cflags: ["-DSEPOLICY_VERSION=30"],
}
// For vts_treble_sys_prop_test
filegroup {
@ -85,13 +88,13 @@ se_build_files {
srcs: ["technical_debt.cil"],
}
reqd_mask_policy = [":se_build_files{.reqd_mask}"]
plat_public_policy = [":se_build_files{.plat_public}"]
plat_private_policy = [":se_build_files{.plat_private}"]
system_ext_public_policy = [":se_build_files{.system_ext_public}"]
reqd_mask_policy = [":se_build_files{.reqd_mask}"]
plat_public_policy = [":se_build_files{.plat_public}"]
plat_private_policy = [":se_build_files{.plat_private}"]
system_ext_public_policy = [":se_build_files{.system_ext_public}"]
system_ext_private_policy = [":se_build_files{.system_ext_private}"]
product_public_policy = [":se_build_files{.product_public}"]
product_private_policy = [":se_build_files{.product_private}"]
product_public_policy = [":se_build_files{.product_public}"]
product_private_policy = [":se_build_files{.product_private}"]
// reqd_policy_mask - a policy.conf file which contains only the bare minimum
// policy necessary to use checkpolicy.
@ -214,7 +217,6 @@ se_policy_cil {
},
}
// userdebug_plat_policy.conf - the userdebug version plat_sepolicy.cil
se_policy_conf {
name: "userdebug_plat_sepolicy.conf",
@ -305,7 +307,10 @@ se_policy_cil {
name: "product_sepolicy.cil",
src: ":product_sepolicy.conf",
product_specific: true,
filter_out: [":plat_sepolicy.cil", ":system_ext_sepolicy.cil"],
filter_out: [
":plat_sepolicy.cil",
":system_ext_sepolicy.cil",
],
remove_line_marker: true,
}
@ -338,7 +343,10 @@ se_versioned_policy {
base: ":pub_policy.cil",
mapping: true,
version: "current",
filter_out: [":plat_mapping_file", ":system_ext_mapping_file"],
filter_out: [
":plat_mapping_file",
":system_ext_mapping_file",
],
relative_install_path: "mapping", // install to /product/etc/selinux/mapping
product_specific: true,
}
@ -368,7 +376,10 @@ se_versioned_policy {
base: ":pub_policy.cil",
mapping: true,
version: "1000000.0",
filter_out: [":plat_mapping_file", ":system_ext_mapping_file"],
filter_out: [
":plat_mapping_file",
":system_ext_mapping_file",
],
relative_install_path: "mapping", // install to /product/etc/selinux/mapping
product_specific: true,
}
@ -397,9 +408,9 @@ se_policy_conf {
system_ext_public_policy +
product_public_policy +
reqd_mask_policy + [
":se_build_files{.plat_vendor}",
":se_build_files{.vendor}",
],
":se_build_files{.plat_vendor}",
":se_build_files{.vendor}",
],
vendor: true,
installable: false,
}
@ -439,10 +450,10 @@ se_policy_conf {
system_ext_public_policy +
product_public_policy +
reqd_mask_policy + [
":se_build_files{.plat_vendor}",
":se_build_files{.vendor}",
":se_build_files{.odm}",
],
":se_build_files{.plat_vendor}",
":se_build_files{.vendor}",
":se_build_files{.odm}",
],
device_specific: true,
installable: false,
}
@ -472,7 +483,10 @@ se_versioned_policy {
":plat_mapping_file",
":vendor_sepolicy.cil",
],
filter_out: [":plat_pub_versioned.cil", ":vendor_sepolicy.cil"],
filter_out: [
":plat_pub_versioned.cil",
":vendor_sepolicy.cil",
],
device_specific: true,
}
@ -490,7 +504,10 @@ se_versioned_policy {
//////////////////////////////////
genrule {
name: "plat_sepolicy_and_mapping.sha256_gen",
srcs: [":plat_sepolicy.cil", ":plat_mapping_file"],
srcs: [
":plat_sepolicy.cil",
":plat_mapping_file",
],
out: ["plat_sepolicy_and_mapping.sha256"],
cmd: "cat $(in) | sha256sum | cut -d' ' -f1 > $(out)",
}
@ -504,7 +521,10 @@ prebuilt_etc {
genrule {
name: "system_ext_sepolicy_and_mapping.sha256_gen",
srcs: [":system_ext_sepolicy.cil", ":system_ext_mapping_file"],
srcs: [
":system_ext_sepolicy.cil",
":system_ext_mapping_file",
],
out: ["system_ext_sepolicy_and_mapping.sha256"],
cmd: "cat $(in) | sha256sum | cut -d' ' -f1 > $(out)",
}
@ -519,7 +539,10 @@ prebuilt_etc {
genrule {
name: "product_sepolicy_and_mapping.sha256_gen",
srcs: [":product_sepolicy.cil", ":product_mapping_file"],
srcs: [
":product_sepolicy.cil",
":product_mapping_file",
],
out: ["product_sepolicy_and_mapping.sha256"],
cmd: "cat $(in) | sha256sum | cut -d' ' -f1 > $(out)",
}
@ -543,7 +566,10 @@ soong_config_module_type {
module_type: "prebuilt_defaults",
config_namespace: "ANDROID",
bool_variables: ["BOARD_USES_ODMIMAGE"],
properties: ["vendor", "device_specific"],
properties: [
"vendor",
"device_specific",
],
}
precompiled_sepolicy_prebuilts_defaults {
@ -599,7 +625,10 @@ soong_config_module_type {
module_type: "se_policy_binary",
config_namespace: "ANDROID",
bool_variables: ["BOARD_USES_ODMIMAGE"],
properties: ["vendor", "device_specific"],
properties: [
"vendor",
"device_specific",
],
}
filegroup {
@ -651,10 +680,10 @@ se_policy_conf {
system_ext_private_policy +
product_public_policy +
product_private_policy + [
":se_build_files{.plat_vendor}",
":se_build_files{.vendor}",
":se_build_files{.odm}",
],
":se_build_files{.plat_vendor}",
":se_build_files{.vendor}",
":se_build_files{.odm}",
],
target_recovery: true,
installable: false,
recovery: true,
@ -817,7 +846,10 @@ se_bug_map {
se_bug_map {
name: "vendor_bug_map",
srcs: [":bug_map_files{.vendor}", ":bug_map_files{.plat_vendor}"],
srcs: [
":bug_map_files{.vendor}",
":bug_map_files{.plat_vendor}",
],
// Legacy file name of the vendor partition bug_map.
stem: "selinux_denial_metadata",
vendor: true,
@ -832,10 +864,10 @@ se_neverallow_test {
system_ext_private_policy +
product_public_policy +
product_private_policy + [
":se_build_files{.plat_vendor}",
":se_build_files{.vendor}",
":se_build_files{.odm}",
],
":se_build_files{.plat_vendor}",
":se_build_files{.vendor}",
":se_build_files{.odm}",
],
}
//////////////////////////////////

View file

@ -4,4 +4,5 @@ aosp_hook = ${REPO_ROOT}/frameworks/base/tools/aosp/aosp_sha.sh ${PREUPLOAD_COMM
policy_version_check = tools/policy_version_check.sh
[Builtin Hooks]
bpfmt = true
gofmt = true

View file

@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package {
// http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
@ -24,266 +23,266 @@ package {
// TODO(b/236681553): Remove com.android.bluetooth-file_contexts
filegroup {
name: "apex.test-file_contexts",
srcs: [
"apex.test-file_contexts",
],
name: "apex.test-file_contexts",
srcs: [
"apex.test-file_contexts",
],
}
filegroup {
name: "com.android.adbd-file_contexts",
srcs: [
"com.android.adbd-file_contexts",
],
name: "com.android.adbd-file_contexts",
srcs: [
"com.android.adbd-file_contexts",
],
}
filegroup {
name: "com.android.sdkext-file_contexts",
srcs: [
"com.android.sdkext-file_contexts",
],
name: "com.android.sdkext-file_contexts",
srcs: [
"com.android.sdkext-file_contexts",
],
}
filegroup {
name: "com.android.art-file_contexts",
srcs: [
"com.android.art-file_contexts",
],
name: "com.android.art-file_contexts",
srcs: [
"com.android.art-file_contexts",
],
}
filegroup {
name: "com.android.art.debug-file_contexts",
srcs: [
"com.android.art.debug-file_contexts",
],
name: "com.android.art.debug-file_contexts",
srcs: [
"com.android.art.debug-file_contexts",
],
}
filegroup {
name: "com.android.bootanimation-file_contexts",
srcs: [
"com.android.bootanimation-file_contexts",
],
name: "com.android.bootanimation-file_contexts",
srcs: [
"com.android.bootanimation-file_contexts",
],
}
filegroup {
name: "com.android.cellbroadcast-file_contexts",
srcs: [
"com.android.cellbroadcast-file_contexts",
],
name: "com.android.cellbroadcast-file_contexts",
srcs: [
"com.android.cellbroadcast-file_contexts",
],
}
filegroup {
name: "com.android.compos-file_contexts",
srcs: [
"com.android.compos-file_contexts",
],
name: "com.android.compos-file_contexts",
srcs: [
"com.android.compos-file_contexts",
],
}
filegroup {
name: "com.android.conscrypt-file_contexts",
srcs: [
"com.android.conscrypt-file_contexts",
],
name: "com.android.conscrypt-file_contexts",
srcs: [
"com.android.conscrypt-file_contexts",
],
}
filegroup {
name: "com.android.crashrecovery-file_contexts",
srcs: [
"com.android.crashrecovery-file_contexts",
],
name: "com.android.crashrecovery-file_contexts",
srcs: [
"com.android.crashrecovery-file_contexts",
],
}
filegroup {
name: "com.android.federatedcompute-file_contexts",
srcs: [
"com.android.federatedcompute-file_contexts",
],
name: "com.android.federatedcompute-file_contexts",
srcs: [
"com.android.federatedcompute-file_contexts",
],
}
filegroup {
name: "com.android.geotz-file_contexts",
srcs: [
"com.android.geotz-file_contexts",
],
name: "com.android.geotz-file_contexts",
srcs: [
"com.android.geotz-file_contexts",
],
}
filegroup {
name: "com.android.gki-file_contexts",
srcs: [
"com.android.gki-file_contexts",
],
name: "com.android.gki-file_contexts",
srcs: [
"com.android.gki-file_contexts",
],
}
filegroup {
name: "com.android.ipsec-file_contexts",
srcs: [
"com.android.ipsec-file_contexts",
],
name: "com.android.ipsec-file_contexts",
srcs: [
"com.android.ipsec-file_contexts",
],
}
filegroup {
name: "com.android.i18n-file_contexts",
srcs: [
"com.android.i18n-file_contexts",
],
name: "com.android.i18n-file_contexts",
srcs: [
"com.android.i18n-file_contexts",
],
}
filegroup {
name: "com.android.media-file_contexts",
srcs: [
"com.android.media-file_contexts",
],
name: "com.android.media-file_contexts",
srcs: [
"com.android.media-file_contexts",
],
}
filegroup {
name: "com.android.mediaprovider-file_contexts",
srcs: [
"com.android.mediaprovider-file_contexts",
],
name: "com.android.mediaprovider-file_contexts",
srcs: [
"com.android.mediaprovider-file_contexts",
],
}
filegroup {
name: "com.android.media.swcodec-file_contexts",
srcs: [
"com.android.media.swcodec-file_contexts",
],
name: "com.android.media.swcodec-file_contexts",
srcs: [
"com.android.media.swcodec-file_contexts",
],
}
filegroup {
name: "com.android.neuralnetworks-file_contexts",
srcs: [
"com.android.neuralnetworks-file_contexts",
],
name: "com.android.neuralnetworks-file_contexts",
srcs: [
"com.android.neuralnetworks-file_contexts",
],
}
filegroup {
name: "com.android.os.statsd-file_contexts",
srcs: [
"com.android.os.statsd-file_contexts",
],
name: "com.android.os.statsd-file_contexts",
srcs: [
"com.android.os.statsd-file_contexts",
],
}
filegroup {
name: "com.android.permission-file_contexts",
srcs: [
"com.android.permission-file_contexts",
],
name: "com.android.permission-file_contexts",
srcs: [
"com.android.permission-file_contexts",
],
}
filegroup {
name: "com.android.resolv-file_contexts",
srcs: [
"com.android.resolv-file_contexts",
],
name: "com.android.resolv-file_contexts",
srcs: [
"com.android.resolv-file_contexts",
],
}
filegroup {
name: "com.android.runtime-file_contexts",
srcs: [
"com.android.runtime-file_contexts",
],
name: "com.android.runtime-file_contexts",
srcs: [
"com.android.runtime-file_contexts",
],
}
filegroup {
name: "com.android.scheduling-file_contexts",
srcs: [
"com.android.scheduling-file_contexts",
],
name: "com.android.scheduling-file_contexts",
srcs: [
"com.android.scheduling-file_contexts",
],
}
filegroup {
name: "com.android.tzdata-file_contexts",
srcs: [
"com.android.tzdata-file_contexts",
],
name: "com.android.tzdata-file_contexts",
srcs: [
"com.android.tzdata-file_contexts",
],
}
filegroup {
name: "com.android.uwb-file_contexts",
srcs: [
"com.android.uwb-file_contexts",
],
name: "com.android.uwb-file_contexts",
srcs: [
"com.android.uwb-file_contexts",
],
}
file_contexts {
name: "com.android.virt-file_contexts",
defaults: ["contexts_flags_defaults"],
srcs: ["com.android.virt-file_contexts"],
name: "com.android.virt-file_contexts",
defaults: ["contexts_flags_defaults"],
srcs: ["com.android.virt-file_contexts"],
}
filegroup {
name: "com.android.vndk-file_contexts",
srcs: [
"com.android.vndk-file_contexts",
],
name: "com.android.vndk-file_contexts",
srcs: [
"com.android.vndk-file_contexts",
],
}
filegroup {
name: "com.android.wifi-file_contexts",
srcs: [
"com.android.wifi-file_contexts",
],
name: "com.android.wifi-file_contexts",
srcs: [
"com.android.wifi-file_contexts",
],
}
filegroup {
name: "com.android.tethering-file_contexts",
srcs: [
"com.android.tethering-file_contexts",
],
name: "com.android.tethering-file_contexts",
srcs: [
"com.android.tethering-file_contexts",
],
}
filegroup {
name: "com.android.extservices-file_contexts",
srcs: [
"com.android.extservices-file_contexts",
],
name: "com.android.extservices-file_contexts",
srcs: [
"com.android.extservices-file_contexts",
],
}
filegroup {
name: "com.android.adservices-file_contexts",
srcs: [
"com.android.adservices-file_contexts",
],
name: "com.android.adservices-file_contexts",
srcs: [
"com.android.adservices-file_contexts",
],
}
filegroup {
name: "com.android.car.framework-file_contexts",
srcs: [
"com.android.car.framework-file_contexts",
],
name: "com.android.car.framework-file_contexts",
srcs: [
"com.android.car.framework-file_contexts",
],
}
filegroup {
name: "com.android.ondevicepersonalization-file_contexts",
srcs: [
"com.android.ondevicepersonalization-file_contexts",
],
name: "com.android.ondevicepersonalization-file_contexts",
srcs: [
"com.android.ondevicepersonalization-file_contexts",
],
}
filegroup {
name: "com.android.healthfitness-file_contexts",
srcs: [
"com.android.healthfitness-file_contexts",
],
name: "com.android.healthfitness-file_contexts",
srcs: [
"com.android.healthfitness-file_contexts",
],
}
filegroup {
name: "com.android.rkpd-file_contexts",
srcs: [
"com.android.rkpd-file_contexts",
],
name: "com.android.rkpd-file_contexts",
srcs: [
"com.android.rkpd-file_contexts",
],
}
filegroup {
name: "com.android.devicelock-file_contexts",
srcs: [
"com.android.devicelock-file_contexts",
],
name: "com.android.devicelock-file_contexts",
srcs: [
"com.android.devicelock-file_contexts",
],
}
filegroup {
name: "com.android.telephonymodules-file_contexts",
srcs: [
"com.android.telephonymodules-file_contexts"
],
name: "com.android.telephonymodules-file_contexts",
srcs: [
"com.android.telephonymodules-file_contexts",
],
}

View file

@ -21,14 +21,14 @@ package {
}
python_binary_host {
name: "build_sepolicy",
srcs: [
"build_sepolicy.py",
"file_utils.py",
],
required: [
"checkpolicy",
"secilc",
"version_policy",
],
name: "build_sepolicy",
srcs: [
"build_sepolicy.py",
"file_utils.py",
],
required: [
"checkpolicy",
"secilc",
"version_policy",
],
}

View file

@ -210,7 +210,10 @@ sepolicy_vers {
// sepolicy sha256 for vendor
genrule {
name: "microdroid_plat_sepolicy_and_mapping.sha256_gen",
srcs: [":microdroid_plat_sepolicy.cil", ":microdroid_plat_mapping_file"],
srcs: [
":microdroid_plat_sepolicy.cil",
":microdroid_plat_mapping_file",
],
out: ["microdroid_plat_sepolicy_and_mapping.sha256"],
cmd: "cat $(in) | sha256sum | cut -d' ' -f1 > $(out)",
}
@ -254,7 +257,7 @@ genrule {
tools: ["fc_sort"],
out: ["file_contexts"],
cmd: "sed -e 's/#.*$$//' -e '/^$$/d' $(in) > $(out).tmp && " +
"$(location fc_sort) -i $(out).tmp -o $(out)",
"$(location fc_sort) -i $(out).tmp -o $(out)",
}
prebuilt_etc {
@ -271,7 +274,7 @@ genrule {
tools: ["fc_sort"],
out: ["file_contexts"],
cmd: "sed -e 's/#.*$$//' -e '/^$$/d' $(in) > $(out).tmp && " +
"$(location fc_sort) -i $(out).tmp -o $(out)",
"$(location fc_sort) -i $(out).tmp -o $(out)",
}
prebuilt_etc {

View file

@ -14,7 +14,10 @@
se_policy_conf {
name: "29.0_plat_pub_policy.conf",
srcs: [":se_build_files{.plat_public_29.0}", ":se_build_files{.reqd_mask}"],
srcs: [
":se_build_files{.plat_public_29.0}",
":se_build_files{.reqd_mask}",
],
installable: false,
build_variant: "user",
}

View file

@ -14,7 +14,10 @@
se_policy_conf {
name: "30.0_plat_pub_policy.conf",
srcs: [":se_build_files{.plat_public_30.0}", ":se_build_files{.reqd_mask}"],
srcs: [
":se_build_files{.plat_public_30.0}",
":se_build_files{.reqd_mask}",
],
installable: false,
build_variant: "user",
}

View file

@ -14,7 +14,10 @@
se_policy_conf {
name: "31.0_plat_pub_policy.conf",
srcs: [":se_build_files{.plat_public_31.0}", ":se_build_files{.reqd_mask}"],
srcs: [
":se_build_files{.plat_public_31.0}",
":se_build_files{.reqd_mask}",
],
installable: false,
build_variant: "user",
}

View file

@ -14,7 +14,10 @@
se_policy_conf {
name: "32.0_plat_pub_policy.conf",
srcs: [":se_build_files{.plat_public_32.0}", ":se_build_files{.reqd_mask}"],
srcs: [
":se_build_files{.plat_public_32.0}",
":se_build_files{.reqd_mask}",
],
installable: false,
build_variant: "user",
}

View file

@ -14,7 +14,10 @@
se_policy_conf {
name: "33.0_plat_pub_policy.conf",
srcs: [":se_build_files{.plat_public_33.0}", ":se_build_files{.reqd_mask}"],
srcs: [
":se_build_files{.plat_public_33.0}",
":se_build_files{.reqd_mask}",
],
installable: false,
build_variant: "user",
}

View file

@ -14,7 +14,10 @@
se_policy_conf {
name: "34.0_plat_pub_policy.conf",
srcs: [":se_build_files{.plat_public_34.0}", ":se_build_files{.reqd_mask}"],
srcs: [
":se_build_files{.plat_public_34.0}",
":se_build_files{.reqd_mask}",
],
installable: false,
build_variant: "user",
}

View file

@ -9,7 +9,10 @@ package {
cc_library_host_shared {
name: "libsepolwrap",
srcs: ["sepol_wrap.cpp"],
cflags: ["-Wall", "-Werror",],
cflags: [
"-Wall",
"-Werror",
],
export_include_dirs: ["include"],
stl: "c++_static",
@ -137,7 +140,7 @@ python_test_host {
],
test_options: {
unit_test: true,
}
},
}
python_binary_host {

View file

@ -74,7 +74,10 @@ python_binary_host {
python_binary_host {
name: "sepolicy_generate_compat",
srcs: ["sepolicy_generate_compat.py"],
libs: ["mini_cil_parser", "pysepolwrap"],
libs: [
"mini_cil_parser",
"pysepolwrap",
],
data: [":libsepolwrap"],
}