2021-02-04 08:07:40 +01:00
|
|
|
package {
|
|
|
|
// http://go/android-license-faq
|
|
|
|
// A large-scale-change added 'default_applicable_licenses' to import
|
|
|
|
// the below license kinds from "system_sepolicy_license":
|
|
|
|
// SPDX-license-identifier-Apache-2.0
|
|
|
|
default_applicable_licenses: ["system_sepolicy_license"],
|
|
|
|
}
|
|
|
|
|
2017-05-25 18:53:47 +02:00
|
|
|
cc_library_host_shared {
|
|
|
|
name: "libsepolwrap",
|
|
|
|
srcs: ["sepol_wrap.cpp"],
|
|
|
|
cflags: ["-Wall", "-Werror",],
|
|
|
|
export_include_dirs: ["include"],
|
2021-12-29 05:56:14 +01:00
|
|
|
stl: "c++_static",
|
2017-09-01 23:08:46 +02:00
|
|
|
|
|
|
|
// libsepolwrap gets loaded from the system python, which does not have the
|
|
|
|
// ASAN runtime. So turn off sanitization for ourself, and use static
|
|
|
|
// libraries, since the shared libraries will use ASAN.
|
2017-10-04 18:42:29 +02:00
|
|
|
static_libs: [
|
|
|
|
"libbase",
|
|
|
|
"libsepol",
|
|
|
|
],
|
2017-09-01 23:08:46 +02:00
|
|
|
sanitize: {
|
|
|
|
never: true,
|
|
|
|
},
|
2017-05-25 18:53:47 +02:00
|
|
|
}
|
2017-06-01 00:36:07 +02:00
|
|
|
|
2022-01-21 11:32:53 +01:00
|
|
|
python_library_host {
|
|
|
|
name: "mini_cil_parser",
|
|
|
|
srcs: ["mini_parser.py"],
|
|
|
|
}
|
|
|
|
|
|
|
|
python_library_host {
|
|
|
|
name: "pysepolwrap",
|
2017-09-23 23:42:50 +02:00
|
|
|
srcs: [
|
2019-04-11 01:53:17 +02:00
|
|
|
"fc_sort.py",
|
2017-09-26 21:58:29 +02:00
|
|
|
"policy.py",
|
2022-01-21 11:32:53 +01:00
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
python_binary_host {
|
|
|
|
name: "treble_sepolicy_tests",
|
|
|
|
srcs: [
|
2018-02-08 18:54:59 +01:00
|
|
|
"treble_sepolicy_tests.py",
|
2017-09-26 21:58:29 +02:00
|
|
|
],
|
2022-07-25 04:30:02 +02:00
|
|
|
version: {
|
|
|
|
py3: {
|
|
|
|
embedded_launcher: true,
|
|
|
|
},
|
|
|
|
},
|
2022-01-21 11:32:53 +01:00
|
|
|
libs: [
|
|
|
|
"mini_cil_parser",
|
|
|
|
"pysepolwrap",
|
|
|
|
],
|
2021-12-29 05:56:14 +01:00
|
|
|
data: [":libsepolwrap"],
|
2017-09-26 21:58:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
python_binary_host {
|
|
|
|
name: "sepolicy_tests",
|
|
|
|
srcs: [
|
2018-02-08 18:54:59 +01:00
|
|
|
"sepolicy_tests.py",
|
2017-09-26 21:58:29 +02:00
|
|
|
],
|
2022-07-25 04:30:02 +02:00
|
|
|
version: {
|
|
|
|
py3: {
|
|
|
|
embedded_launcher: true,
|
|
|
|
},
|
|
|
|
},
|
2022-01-21 11:32:53 +01:00
|
|
|
libs: ["pysepolwrap"],
|
2021-12-29 05:56:14 +01:00
|
|
|
data: [":libsepolwrap"],
|
2017-09-26 21:58:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
python_binary_host {
|
|
|
|
name: "searchpolicy",
|
|
|
|
srcs: [
|
2018-04-24 20:03:22 +02:00
|
|
|
"searchpolicy.py",
|
2017-09-23 23:42:50 +02:00
|
|
|
],
|
2022-01-21 11:32:53 +01:00
|
|
|
libs: ["pysepolwrap"],
|
2017-09-23 23:42:50 +02:00
|
|
|
required: ["libsepolwrap"],
|
2017-06-01 00:36:07 +02:00
|
|
|
}
|
2018-09-30 02:47:10 +02:00
|
|
|
|
|
|
|
python_binary_host {
|
|
|
|
name: "combine_maps",
|
|
|
|
srcs: [
|
|
|
|
"combine_maps.py",
|
|
|
|
],
|
2022-01-21 11:32:53 +01:00
|
|
|
libs: ["mini_cil_parser"],
|
2018-09-30 02:47:10 +02:00
|
|
|
}
|
2019-04-11 01:53:17 +02:00
|
|
|
|
|
|
|
python_binary_host {
|
|
|
|
name: "fc_sort",
|
|
|
|
srcs: [
|
|
|
|
"fc_sort.py",
|
|
|
|
],
|
|
|
|
}
|
2020-12-21 05:16:44 +01:00
|
|
|
|
2021-11-24 04:44:28 +01:00
|
|
|
python_test_host {
|
|
|
|
name: "fc_sort_test",
|
|
|
|
srcs: [
|
|
|
|
"fc_sort.py",
|
|
|
|
"fc_sort_test.py",
|
|
|
|
],
|
|
|
|
test_options: {
|
|
|
|
unit_test: true,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-12-21 05:16:44 +01:00
|
|
|
python_binary_host {
|
|
|
|
name: "check_prop_prefix",
|
|
|
|
srcs: ["check_prop_prefix.py"],
|
|
|
|
}
|