From a8d8f6f2931a42f09ad7fe24f4fdc9cce33355c6 Mon Sep 17 00:00:00 2001 From: BrainL Date: Thu, 5 Jun 2025 15:23:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=A8=A1=E6=8B=9F=E5=99=A8?= =?UTF-8?q?=E7=BC=96=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: BrainL --- bundle.json | 4 ++- .../js/napi/file_access_ext_ability/BUILD.gn | 3 ++- interfaces/inner_api/file_access/BUILD.gn | 6 +---- interfaces/kits/native/trash/BUILD.gn | 1 - interfaces/kits/picker/BUILD.gn | 26 ++++++------------- .../externalfileaccess_fuzzer/BUILD.gn | 2 ++ .../externalfileaccessaccess_fuzzer/BUILD.gn | 3 +++ .../BUILD.gn | 3 +++ .../externalfileaccessdelete_fuzzer/BUILD.gn | 3 +++ .../BUILD.gn | 3 +++ .../BUILD.gn | 3 +++ .../BUILD.gn | 3 +++ .../BUILD.gn | 3 +++ .../externalfileaccessmkdir_fuzzer/BUILD.gn | 3 +++ .../externalfileaccessmove_fuzzer/BUILD.gn | 3 +++ .../BUILD.gn | 3 +++ .../externalfileaccessrename_fuzzer/BUILD.gn | 3 +++ .../BUILD.gn | 3 +++ .../fileaccessextbaseproxy_fuzzer/BUILD.gn | 2 ++ .../fileaccessextconnection_fuzzer/BUILD.gn | 1 + test/unittest/BUILD.gn | 12 +++++++++ 21 files changed, 67 insertions(+), 26 deletions(-) diff --git a/bundle.json b/bundle.json index 3b657ef6..f26d9f73 100644 --- a/bundle.json +++ b/bundle.json @@ -39,8 +39,10 @@ "access_token", "os_account", "c_utils", + "cJSON", "image_framework", - "common_event_service" + "common_event_service", + "selinux_adapter" ] }, "build": { diff --git a/frameworks/js/napi/file_access_ext_ability/BUILD.gn b/frameworks/js/napi/file_access_ext_ability/BUILD.gn index 2efb3546..29981b6c 100644 --- a/frameworks/js/napi/file_access_ext_ability/BUILD.gn +++ b/frameworks/js/napi/file_access_ext_ability/BUILD.gn @@ -10,7 +10,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -import("//arkcompiler/ets_frontend/es2panda/es2abc_config.gni") + +import("//build/config/components/ets_frontend/es2abc_config.gni") import("//build/ohos.gni") es2abc_gen_abc("gen_file_access_ext_ability_abc") { diff --git a/interfaces/inner_api/file_access/BUILD.gn b/interfaces/inner_api/file_access/BUILD.gn index 380e0c09..fb401d91 100644 --- a/interfaces/inner_api/file_access/BUILD.gn +++ b/interfaces/inner_api/file_access/BUILD.gn @@ -119,7 +119,6 @@ ohos_shared_library("file_access_extension_ability_kit") { } include_dirs = [ - "${commonlibrary_path}/c_utils/base/include", "${user_file_service_path}/services/native/file_access_service/include", ] @@ -141,10 +140,7 @@ ohos_shared_library("file_access_extension_ability_kit") { configs = [ ":ability_config" ] version_script = "libfile_access_extension_ability_kit.map" - public_configs = [ - ":ability_public_config", - "${ability_runtime_path}/frameworks/native/ability:ability_context_public_config", - ] + public_configs = [ ":ability_public_config" ] external_deps = [ "ability_base:want", diff --git a/interfaces/kits/native/trash/BUILD.gn b/interfaces/kits/native/trash/BUILD.gn index 9d6e47fe..04a5022c 100644 --- a/interfaces/kits/native/trash/BUILD.gn +++ b/interfaces/kits/native/trash/BUILD.gn @@ -27,7 +27,6 @@ ohos_shared_library("trash") { include_dirs = [ "include", - "${file_api_path}/interfaces/kits/rust/include", "${user_file_service_path}/utils", ] diff --git a/interfaces/kits/picker/BUILD.gn b/interfaces/kits/picker/BUILD.gn index 3ca1c2aa..3ffd4037 100644 --- a/interfaces/kits/picker/BUILD.gn +++ b/interfaces/kits/picker/BUILD.gn @@ -11,29 +11,19 @@ # See the License for the specific language governing permissions and # limitations under the License. +import("//build/config/components/ets_frontend/es2abc_config.gni") import("//build/ohos.gni") import("//build/ohos/ace/ace.gni") -import("../../../../../../arkcompiler/ets_frontend/es2panda/es2abc_config.gni") import("../../../filemanagement_aafwk.gni") # compile .js to .abc. -action("gen_picker_abc") { - visibility = [ ":*" ] - script = "../../../../../../arkcompiler/ets_frontend/es2panda/scripts/generate_js_bytecode.py" - - args = [ - "--src-js", - rebase_path("picker.js"), - "--dst-file", - rebase_path(target_out_dir + "/picker.abc"), - "--frontend-tool-path", - rebase_path("${es2abc_build_path}"), - "--module", - ] - deps = - [ "../../../../../../arkcompiler/ets_frontend/es2panda:es2panda_build" ] - inputs = [ "picker.js" ] - outputs = [ target_out_dir + "/picker.abc" ] + +es2abc_gen_abc("gen_picker_abc") { + src_js = rebase_path("picker.js") + dst_file = rebase_path(target_out_dir + "/picker.abc") + in_puts = [ "picker.js" ] + out_puts = [ target_out_dir + "/picker.abc" ] + extra_args = [ "--module" ] } base_output_path = get_label_info(":picker_js", "target_out_dir") diff --git a/test/fuzztest/externalfileaccess_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccess_fuzzer/BUILD.gn index 999941de..96627b20 100644 --- a/test/fuzztest/externalfileaccess_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccess_fuzzer/BUILD.gn @@ -48,11 +48,13 @@ ohos_fuzztest("ExternalFileAccessFuzzTest") { "access_token:libnativetoken", "access_token:libtoken_setproc", "bundle_framework:appexecfwk_core", + "cJSON:cjson_static", "c_utils:utils", "hilog:libhilog", "ipc:ipc_core", "ipc:rpc", "samgr:samgr_proxy", + "selinux_adapter:librestorecon", ] cflags = [ diff --git a/test/fuzztest/externalfileaccessaccess_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccessaccess_fuzzer/BUILD.gn index b5ff597a..366750a8 100644 --- a/test/fuzztest/externalfileaccessaccess_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccessaccess_fuzzer/BUILD.gn @@ -49,13 +49,16 @@ ohos_fuzztest("ExternalFileAccessAccessFuzzTest") { "access_token:libtoken_setproc", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson_static", "c_utils:utils", "hilog:libhilog", "hitrace:hitrace_meter", "image_framework:image_native", "ipc:ipc_core", + "ipc:ipc_napi", "napi:ace_napi", "samgr:samgr_proxy", + "selinux_adapter:librestorecon", ] } diff --git a/test/fuzztest/externalfileaccesscreatefile_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccesscreatefile_fuzzer/BUILD.gn index 08b055d5..f4081b59 100644 --- a/test/fuzztest/externalfileaccesscreatefile_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccesscreatefile_fuzzer/BUILD.gn @@ -48,13 +48,16 @@ ohos_fuzztest("ExternalFileAccessCreateFileFuzzTest") { "access_token:libtoken_setproc", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson_static", "c_utils:utils", "hilog:libhilog", "hitrace:hitrace_meter", "image_framework:image_native", "ipc:ipc_core", + "ipc:ipc_napi", "napi:ace_napi", "samgr:samgr_proxy", + "selinux_adapter:librestorecon", ] } diff --git a/test/fuzztest/externalfileaccessdelete_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccessdelete_fuzzer/BUILD.gn index 5d7bdcb8..b7716541 100644 --- a/test/fuzztest/externalfileaccessdelete_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccessdelete_fuzzer/BUILD.gn @@ -49,13 +49,16 @@ ohos_fuzztest("ExternalFileAccessDeleteFuzzTest") { "access_token:libtoken_setproc", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson_static", "c_utils:utils", "hilog:libhilog", "hitrace:hitrace_meter", "image_framework:image_native", "ipc:ipc_core", + "ipc:ipc_napi", "napi:ace_napi", "samgr:samgr_proxy", + "selinux_adapter:librestorecon", ] } diff --git a/test/fuzztest/externalfileaccessgetfileinfofromrelativepath_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccessgetfileinfofromrelativepath_fuzzer/BUILD.gn index bba16afa..705fdcab 100644 --- a/test/fuzztest/externalfileaccessgetfileinfofromrelativepath_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccessgetfileinfofromrelativepath_fuzzer/BUILD.gn @@ -48,13 +48,16 @@ ohos_fuzztest("ExternalFileAccessGetFileInfoFromRelativePathFuzzTest") { "access_token:libtoken_setproc", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson_static", "c_utils:utils", "hilog:libhilog", "hitrace:hitrace_meter", "image_framework:image_native", "ipc:ipc_core", + "ipc:ipc_napi", "napi:ace_napi", "samgr:samgr_proxy", + "selinux_adapter:librestorecon", ] } diff --git a/test/fuzztest/externalfileaccessgetfileinfofromuri_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccessgetfileinfofromuri_fuzzer/BUILD.gn index 9e09df22..f5ecec9a 100644 --- a/test/fuzztest/externalfileaccessgetfileinfofromuri_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccessgetfileinfofromuri_fuzzer/BUILD.gn @@ -48,13 +48,16 @@ ohos_fuzztest("ExternalFileAccessGetFileInfoFromUriFuzzTest") { "access_token:libtoken_setproc", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson_static", "c_utils:utils", "hilog:libhilog", "hitrace:hitrace_meter", "image_framework:image_native", "ipc:ipc_core", + "ipc:ipc_napi", "napi:ace_napi", "samgr:samgr_proxy", + "selinux_adapter:librestorecon", ] } diff --git a/test/fuzztest/externalfileaccessgetroots_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccessgetroots_fuzzer/BUILD.gn index 29428da9..57ee244d 100644 --- a/test/fuzztest/externalfileaccessgetroots_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccessgetroots_fuzzer/BUILD.gn @@ -48,13 +48,16 @@ ohos_fuzztest("ExternalFileAccessGetRootsFuzzTest") { "access_token:libtoken_setproc", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson_static", "c_utils:utils", "hilog:libhilog", "hitrace:hitrace_meter", "image_framework:image_native", "ipc:ipc_core", + "ipc:ipc_napi", "napi:ace_napi", "samgr:samgr_proxy", + "selinux_adapter:librestorecon", ] } diff --git a/test/fuzztest/externalfileaccesslistfile_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccesslistfile_fuzzer/BUILD.gn index a935c0b4..b09c02ec 100644 --- a/test/fuzztest/externalfileaccesslistfile_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccesslistfile_fuzzer/BUILD.gn @@ -48,13 +48,16 @@ ohos_fuzztest("ExternalFileAccessListFileFuzzTest") { "access_token:libtoken_setproc", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson_static", "c_utils:utils", "hilog:libhilog", "hitrace:hitrace_meter", "image_framework:image_native", "ipc:ipc_core", + "ipc:ipc_napi", "napi:ace_napi", "samgr:samgr_proxy", + "selinux_adapter:librestorecon", ] } diff --git a/test/fuzztest/externalfileaccessmkdir_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccessmkdir_fuzzer/BUILD.gn index 40d302d3..0b0a42fd 100644 --- a/test/fuzztest/externalfileaccessmkdir_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccessmkdir_fuzzer/BUILD.gn @@ -49,13 +49,16 @@ ohos_fuzztest("ExternalFileAccessMkdirFuzzTest") { "access_token:libtoken_setproc", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson_static", "c_utils:utils", "hilog:libhilog", "hitrace:hitrace_meter", "image_framework:image_native", "ipc:ipc_core", + "ipc:ipc_napi", "napi:ace_napi", "samgr:samgr_proxy", + "selinux_adapter:librestorecon", ] } diff --git a/test/fuzztest/externalfileaccessmove_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccessmove_fuzzer/BUILD.gn index c04b0e07..e845a8ac 100644 --- a/test/fuzztest/externalfileaccessmove_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccessmove_fuzzer/BUILD.gn @@ -49,13 +49,16 @@ ohos_fuzztest("ExternalFileAccessMoveFuzzTest") { "access_token:libtoken_setproc", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson_static", "c_utils:utils", "hilog:libhilog", "hitrace:hitrace_meter", "image_framework:image_native", "ipc:ipc_core", + "ipc:ipc_napi", "napi:ace_napi", "samgr:samgr_proxy", + "selinux_adapter:librestorecon", ] } diff --git a/test/fuzztest/externalfileaccessopenfile_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccessopenfile_fuzzer/BUILD.gn index ce879f44..ba64c2d0 100644 --- a/test/fuzztest/externalfileaccessopenfile_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccessopenfile_fuzzer/BUILD.gn @@ -48,13 +48,16 @@ ohos_fuzztest("ExternalFileAccessOpenFileFuzzTest") { "access_token:libtoken_setproc", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson_static", "c_utils:utils", "hilog:libhilog", "hitrace:hitrace_meter", "image_framework:image_native", "ipc:ipc_core", + "ipc:ipc_napi", "napi:ace_napi", "samgr:samgr_proxy", + "selinux_adapter:librestorecon", ] } diff --git a/test/fuzztest/externalfileaccessrename_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccessrename_fuzzer/BUILD.gn index 26796a85..2eb208d1 100644 --- a/test/fuzztest/externalfileaccessrename_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccessrename_fuzzer/BUILD.gn @@ -49,13 +49,16 @@ ohos_fuzztest("ExternalFileAccessRenameFuzzTest") { "access_token:libtoken_setproc", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson_static", "c_utils:utils", "hilog:libhilog", "hitrace:hitrace_meter", "image_framework:image_native", "ipc:ipc_core", + "ipc:ipc_napi", "napi:ace_napi", "samgr:samgr_proxy", + "selinux_adapter:librestorecon", ] } diff --git a/test/fuzztest/externalfileaccessscanfile_fuzzer/BUILD.gn b/test/fuzztest/externalfileaccessscanfile_fuzzer/BUILD.gn index 7452eeb0..2f1d93f4 100644 --- a/test/fuzztest/externalfileaccessscanfile_fuzzer/BUILD.gn +++ b/test/fuzztest/externalfileaccessscanfile_fuzzer/BUILD.gn @@ -48,13 +48,16 @@ ohos_fuzztest("ExternalFileAccessScanFileFuzzTest") { "access_token:libtoken_setproc", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "cJSON:cjson_static", "c_utils:utils", "hilog:libhilog", "hitrace:hitrace_meter", "image_framework:image_native", "ipc:ipc_core", + "ipc:ipc_napi", "napi:ace_napi", "samgr:samgr_proxy", + "selinux_adapter:librestorecon", ] } diff --git a/test/fuzztest/fileaccessextbaseproxy_fuzzer/BUILD.gn b/test/fuzztest/fileaccessextbaseproxy_fuzzer/BUILD.gn index 50675fad..2e6b1627 100644 --- a/test/fuzztest/fileaccessextbaseproxy_fuzzer/BUILD.gn +++ b/test/fuzztest/fileaccessextbaseproxy_fuzzer/BUILD.gn @@ -50,11 +50,13 @@ ohos_fuzztest("FileAccessExtBaseProxyFuzzTest") { "access_token:libnativetoken", "access_token:libtoken_setproc", "bundle_framework:appexecfwk_core", + "cJSON:cjson_static", "c_utils:utils", "hilog:libhilog", "hitrace:hitrace_meter", "ipc:ipc_core", "safwk:system_ability_fwk", + "selinux_adapter:librestorecon", ] defines = [ "private=public" ] diff --git a/test/fuzztest/fileaccessextconnection_fuzzer/BUILD.gn b/test/fuzztest/fileaccessextconnection_fuzzer/BUILD.gn index 6299ceed..73d98a82 100644 --- a/test/fuzztest/fileaccessextconnection_fuzzer/BUILD.gn +++ b/test/fuzztest/fileaccessextconnection_fuzzer/BUILD.gn @@ -48,6 +48,7 @@ ohos_fuzztest("FileAccessExtConnectionFuzzTest") { "hilog:libhilog", "hitrace:hitrace_meter", "ipc:ipc_core", + "ipc:ipc_napi", "safwk:system_ability_fwk", ] diff --git a/test/unittest/BUILD.gn b/test/unittest/BUILD.gn index 26c9d9c7..618ca1d9 100644 --- a/test/unittest/BUILD.gn +++ b/test/unittest/BUILD.gn @@ -105,6 +105,7 @@ ohos_unittest("external_file_access_basic_test") { "access_token:libnativetoken", "access_token:libtoken_setproc", "bundle_framework:appexecfwk_core", + "cJSON:cjson_static", "c_utils:utils", "googletest:gmock_main", "googletest:gtest_main", @@ -112,6 +113,7 @@ ohos_unittest("external_file_access_basic_test") { "ipc:ipc_core", "ipc:rpc", "samgr:samgr_proxy", + "selinux_adapter:librestorecon", ] defines = [ "private=public" ] @@ -161,6 +163,7 @@ ohos_unittest("external_file_access_management_test") { "access_token:libnativetoken", "access_token:libtoken_setproc", "bundle_framework:appexecfwk_core", + "cJSON:cjson_static", "c_utils:utils", "googletest:gmock_main", "googletest:gtest_main", @@ -168,6 +171,7 @@ ohos_unittest("external_file_access_management_test") { "ipc:ipc_core", "ipc:rpc", "samgr:samgr_proxy", + "selinux_adapter:librestorecon", ] defines = [ "private=public" ] @@ -213,6 +217,7 @@ ohos_unittest("external_file_access_notify_test") { "access_token:libnativetoken", "access_token:libtoken_setproc", "bundle_framework:appexecfwk_core", + "cJSON:cjson_static", "c_utils:utils", "googletest:gmock_main", "googletest:gtest_main", @@ -220,6 +225,7 @@ ohos_unittest("external_file_access_notify_test") { "ipc:ipc_core", "ipc:rpc", "samgr:samgr_proxy", + "selinux_adapter:librestorecon", ] } @@ -263,12 +269,14 @@ ohos_unittest("abnormal_file_access_test") { "access_token:libnativetoken", "access_token:libtoken_setproc", "bundle_framework:appexecfwk_core", + "cJSON:cjson_static", "c_utils:utils", "googletest:gmock_main", "googletest:gtest_main", "hilog:libhilog", "ipc:ipc_core", "samgr:samgr_proxy", + "selinux_adapter:librestorecon", ] } @@ -307,13 +315,16 @@ ohos_unittest("file_access_ext_stub_impl_test") { "access_token:libaccesstoken_sdk", "access_token:libnativetoken", "access_token:libtoken_setproc", + "cJSON:cjson_static", "c_utils:utils", "googletest:gmock_main", "googletest:gtest_main", "hilog:libhilog", "hitrace:hitrace_meter", "ipc:ipc_core", + "ipc:ipc_napi", "napi:ace_napi", + "selinux_adapter:librestorecon", ] use_exceptions = true @@ -370,6 +381,7 @@ ohos_unittest("js_file_access_ext_ability_test") { "hitrace:hitrace_meter", "init:libbegetutil", "ipc:ipc_core", + "ipc:ipc_napi", "napi:ace_napi", "os_account:os_account_innerkits", ] -- Gitee