change by zjq
This commit is contained in:
parent
e417a92819
commit
5b314c9522
406
0001-remove-dependency-and-adapt-for-build-device_manager.patch
Normal file
406
0001-remove-dependency-and-adapt-for-build-device_manager.patch
Normal file
@ -0,0 +1,406 @@
|
||||
From cd2f37dcc4bc09b440753670b0f4ec7c1c425c0c Mon Sep 17 00:00:00 2001
|
||||
From: heppen <hepeng68@huawei.com>
|
||||
Date: Tue, 20 Jun 2023 17:44:14 +0800
|
||||
Subject: [PATCH] remove dependency and adapt for build
|
||||
|
||||
---
|
||||
bundle.json | 3 ++-
|
||||
common/src/dfx/standard/dm_hisysevent.cpp | 23 ++++++++--------
|
||||
common/src/dfx/standard/dm_hitrace.cpp | 8 +++---
|
||||
ext/no_interaction_auth/BUILD.gn | 10 +++----
|
||||
ext/pin_auth/BUILD.gn | 2 +-
|
||||
interfaces/inner_kits/native_cpp/BUILD.gn | 4 +--
|
||||
interfaces/kits/js/BUILD.gn | 2 +-
|
||||
services/implementation/BUILD.gn | 6 ++---
|
||||
services/service/BUILD.gn | 12 +++------
|
||||
.../ipc/standard/ipc_server_listener.h | 1 +
|
||||
.../dmcommoneventmanager_fuzzer/BUILD.gn | 2 +-
|
||||
.../dmdiscoverymanager_fuzzer/BUILD.gn | 2 +-
|
||||
test/fuzztest/pinauth_fuzzer/BUILD.gn | 2 +-
|
||||
test/fuzztest/pinauthui_fuzzer/BUILD.gn | 2 +-
|
||||
test/unittest/BUILD.gn | 26 +++++++++----------
|
||||
test/unittest/UTTest_dm_dfx.h | 2 +-
|
||||
utils/BUILD.gn | 6 ++---
|
||||
.../standard/permission_manager.cpp | 2 +-
|
||||
18 files changed, 58 insertions(+), 57 deletions(-)
|
||||
|
||||
diff --git a/bundle.json b/bundle.json
|
||||
index 5d6b7849..bee412cb 100644
|
||||
--- a/bundle.json
|
||||
+++ b/bundle.json
|
||||
@@ -72,7 +72,8 @@
|
||||
"device_manager_callback.h",
|
||||
"dm_device_info.h",
|
||||
"dm_publish_info.h",
|
||||
- "dm_subscribe_info.h"
|
||||
+ "dm_subscribe_info.h",
|
||||
+ "dm_app_image_info.h"
|
||||
],
|
||||
"header_base": "//foundation/distributedhardware/device_manager/interfaces/inner_kits/native_cpp/include"
|
||||
}
|
||||
diff --git a/common/src/dfx/standard/dm_hisysevent.cpp b/common/src/dfx/standard/dm_hisysevent.cpp
|
||||
index 4e9b2970..a508cb85 100644
|
||||
--- a/common/src/dfx/standard/dm_hisysevent.cpp
|
||||
+++ b/common/src/dfx/standard/dm_hisysevent.cpp
|
||||
@@ -17,23 +17,24 @@
|
||||
|
||||
#include "dm_constants.h" // for DM_OK
|
||||
#include "dm_log.h" // for LOGE
|
||||
-#include "hisysevent.h" // for HiSysEvent, HiSysEvent::Domain, HiSysEvent...
|
||||
+// #include "hisysevent.h" // for HiSysEvent, HiSysEvent::Domain, HiSysEvent...
|
||||
#include "unistd.h" // for getpid, getuid
|
||||
|
||||
namespace OHOS {
|
||||
namespace DistributedHardware {
|
||||
void SysEventWrite(const std::string &status, int32_t eventType, const std::string &msg)
|
||||
{
|
||||
- int32_t res = OHOS::HiviewDFX::HiSysEvent::Write(
|
||||
- OHOS::HiviewDFX::HiSysEvent::Domain::DISTRIBUTED_DEVICE_MANAGER,
|
||||
- status.c_str(),
|
||||
- (OHOS::HiviewDFX::HiSysEvent::EventType)eventType,
|
||||
- "PID", getpid(),
|
||||
- "UID", getuid(),
|
||||
- "MSG", msg.c_str());
|
||||
- if (res != DM_OK) {
|
||||
- LOGE("%s Write HiSysEvent error, res:%d", status.c_str(), res);
|
||||
- }
|
||||
+ return;
|
||||
+ // int32_t res = OHOS::HiviewDFX::HiSysEvent::Write(
|
||||
+ // OHOS::HiviewDFX::HiSysEvent::Domain::DISTRIBUTED_DEVICE_MANAGER,
|
||||
+ // status.c_str(),
|
||||
+ // (OHOS::HiviewDFX::HiSysEvent::EventType)eventType,
|
||||
+ // "PID", getpid(),
|
||||
+ // "UID", getuid(),
|
||||
+ // "MSG", msg.c_str());
|
||||
+ // if (res != DM_OK) {
|
||||
+ // LOGE("%s Write HiSysEvent error, res:%d", status.c_str(), res);
|
||||
+ // }
|
||||
}
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
diff --git a/common/src/dfx/standard/dm_hitrace.cpp b/common/src/dfx/standard/dm_hitrace.cpp
|
||||
index 1bbe65fa..caa79885 100644
|
||||
--- a/common/src/dfx/standard/dm_hitrace.cpp
|
||||
+++ b/common/src/dfx/standard/dm_hitrace.cpp
|
||||
@@ -13,18 +13,20 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
#include "dm_hitrace.h"
|
||||
-#include "hitrace_meter.h"
|
||||
+// #include "hitrace_meter.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace DistributedHardware {
|
||||
void DmTraceStart(const std::string &msg)
|
||||
{
|
||||
- StartTrace(HITRACE_TAG_DEVICE_MANAGER, msg);
|
||||
+ return;
|
||||
+ // StartTrace(HITRACE_TAG_DEVICE_MANAGER, msg);
|
||||
}
|
||||
|
||||
void DmTraceEnd()
|
||||
{
|
||||
- FinishTrace(HITRACE_TAG_DEVICE_MANAGER);
|
||||
+ return;
|
||||
+ // FinishTrace(HITRACE_TAG_DEVICE_MANAGER);
|
||||
}
|
||||
} // namespace DistributedHardware
|
||||
} // namespace OHOS
|
||||
diff --git a/ext/no_interaction_auth/BUILD.gn b/ext/no_interaction_auth/BUILD.gn
|
||||
index 231e60e4..29b7d6c1 100644
|
||||
--- a/ext/no_interaction_auth/BUILD.gn
|
||||
+++ b/ext/no_interaction_auth/BUILD.gn
|
||||
@@ -72,12 +72,12 @@ if (defined(ohos_lite)) {
|
||||
]
|
||||
|
||||
external_deps = [
|
||||
- "ability_base:want",
|
||||
- "bundle_framework:appexecfwk_base",
|
||||
- "bundle_framework:appexecfwk_core",
|
||||
+ # "ability_base:want",
|
||||
+ #"bundle_framework:appexecfwk_base",
|
||||
+ #"bundle_framework:appexecfwk_core",
|
||||
"c_utils:utils",
|
||||
- "common_event_service:cesfwk_core",
|
||||
- "common_event_service:cesfwk_innerkits",
|
||||
+ # "common_event_service:cesfwk_core",
|
||||
+ # "common_event_service:cesfwk_innerkits",
|
||||
"dsoftbus:softbus_client",
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"init:libbeget_proxy",
|
||||
diff --git a/ext/pin_auth/BUILD.gn b/ext/pin_auth/BUILD.gn
|
||||
index d49e4f4a..efcb0321 100644
|
||||
--- a/ext/pin_auth/BUILD.gn
|
||||
+++ b/ext/pin_auth/BUILD.gn
|
||||
@@ -140,7 +140,7 @@ if (defined(ohos_lite)) {
|
||||
]
|
||||
|
||||
external_deps = [
|
||||
- "ability_base:want",
|
||||
+ # "ability_base:want",
|
||||
"init:libbegetutil",
|
||||
]
|
||||
|
||||
diff --git a/interfaces/inner_kits/native_cpp/BUILD.gn b/interfaces/inner_kits/native_cpp/BUILD.gn
|
||||
index d5726567..81ea6a65 100644
|
||||
--- a/interfaces/inner_kits/native_cpp/BUILD.gn
|
||||
+++ b/interfaces/inner_kits/native_cpp/BUILD.gn
|
||||
@@ -149,8 +149,8 @@ if (defined(ohos_lite)) {
|
||||
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
- "hisysevent_native:libhisysevent",
|
||||
- "hitrace_native:hitrace_meter",
|
||||
+ # "hisysevent_native:libhisysevent",
|
||||
+ # "hitrace_native:hitrace_meter",
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"ipc:ipc_core",
|
||||
"samgr:samgr_proxy",
|
||||
diff --git a/interfaces/kits/js/BUILD.gn b/interfaces/kits/js/BUILD.gn
|
||||
index a71f79a1..bd0febab 100644
|
||||
--- a/interfaces/kits/js/BUILD.gn
|
||||
+++ b/interfaces/kits/js/BUILD.gn
|
||||
@@ -46,7 +46,7 @@ ohos_shared_library("devicemanager") {
|
||||
"LOG_DOMAIN=0xD004100",
|
||||
]
|
||||
|
||||
- external_deps = [ "bundle_framework:appexecfwk_base" ]
|
||||
+ external_deps = [ #"bundle_framework:appexecfwk_base" ]
|
||||
|
||||
subsystem_name = "distributedhardware"
|
||||
relative_install_dir = "module/distributedhardware"
|
||||
diff --git a/services/implementation/BUILD.gn b/services/implementation/BUILD.gn
|
||||
index 126232e2..45bf523b 100644
|
||||
--- a/services/implementation/BUILD.gn
|
||||
+++ b/services/implementation/BUILD.gn
|
||||
@@ -220,10 +220,10 @@ if (defined(ohos_lite)) {
|
||||
}
|
||||
|
||||
external_deps = [
|
||||
- "ability_base:want",
|
||||
+ # "ability_base:want",
|
||||
"c_utils:utils",
|
||||
- "common_event_service:cesfwk_core",
|
||||
- "common_event_service:cesfwk_innerkits",
|
||||
+ # "common_event_service:cesfwk_core",
|
||||
+ # "common_event_service:cesfwk_innerkits",
|
||||
"dsoftbus:softbus_client",
|
||||
"init:libbegetutil",
|
||||
"ipc:ipc_core",
|
||||
diff --git a/services/service/BUILD.gn b/services/service/BUILD.gn
|
||||
index bb353c12..fd7bb180 100644
|
||||
--- a/services/service/BUILD.gn
|
||||
+++ b/services/service/BUILD.gn
|
||||
@@ -112,10 +112,10 @@ if (defined(ohos_lite)) {
|
||||
"//third_party/mbedtls",
|
||||
]
|
||||
|
||||
- external_deps = [
|
||||
- "hisysevent_native:libhisysevent",
|
||||
- "hitrace_native:hitrace_meter",
|
||||
- ]
|
||||
+ # external_deps = [
|
||||
+ # # "hisysevent_native:libhisysevent",
|
||||
+ # # "hitrace_native:hitrace_meter",
|
||||
+ # ]
|
||||
}
|
||||
} else {
|
||||
executable("devicemanagerservice") {
|
||||
@@ -180,10 +180,6 @@ if (defined(ohos_lite)) {
|
||||
]
|
||||
}
|
||||
}
|
||||
-} else if (!support_jsapi) {
|
||||
- group("devicemanagerservice") {
|
||||
- deps = []
|
||||
- }
|
||||
} else {
|
||||
config("devicemanagerservice_config") {
|
||||
include_dirs = [
|
||||
diff --git a/services/service/include/ipc/standard/ipc_server_listener.h b/services/service/include/ipc/standard/ipc_server_listener.h
|
||||
index 0ff7bb80..02283724 100644
|
||||
--- a/services/service/include/ipc/standard/ipc_server_listener.h
|
||||
+++ b/services/service/include/ipc/standard/ipc_server_listener.h
|
||||
@@ -17,6 +17,7 @@
|
||||
#define OHOS_DM_IPC_SERVER_LISTENER_H
|
||||
|
||||
#include <cstdint>
|
||||
+#include <memory>
|
||||
|
||||
#include "ipc_req.h"
|
||||
#include "ipc_rsp.h"
|
||||
diff --git a/test/fuzztest/dmcommoneventmanager_fuzzer/BUILD.gn b/test/fuzztest/dmcommoneventmanager_fuzzer/BUILD.gn
|
||||
index a7dda4f8..997596f2 100644
|
||||
--- a/test/fuzztest/dmcommoneventmanager_fuzzer/BUILD.gn
|
||||
+++ b/test/fuzztest/dmcommoneventmanager_fuzzer/BUILD.gn
|
||||
@@ -57,7 +57,7 @@ ohos_fuzztest("DmCommonEventManagerFuzzTest") {
|
||||
]
|
||||
|
||||
external_deps = [
|
||||
- "ability_base:want",
|
||||
+ # "ability_base:want",
|
||||
"c_utils:utils",
|
||||
"common_event_service:cesfwk_core",
|
||||
"common_event_service:cesfwk_innerkits",
|
||||
diff --git a/test/fuzztest/dmdiscoverymanager_fuzzer/BUILD.gn b/test/fuzztest/dmdiscoverymanager_fuzzer/BUILD.gn
|
||||
index a183baab..64b5f7bf 100644
|
||||
--- a/test/fuzztest/dmdiscoverymanager_fuzzer/BUILD.gn
|
||||
+++ b/test/fuzztest/dmdiscoverymanager_fuzzer/BUILD.gn
|
||||
@@ -56,7 +56,7 @@ ohos_fuzztest("DmDiscoveryManagerFuzzTest") {
|
||||
]
|
||||
|
||||
external_deps = [
|
||||
- "ability_base:want",
|
||||
+ # "ability_base:want",
|
||||
"c_utils:utils",
|
||||
"common_event_service:cesfwk_core",
|
||||
"common_event_service:cesfwk_innerkits",
|
||||
diff --git a/test/fuzztest/pinauth_fuzzer/BUILD.gn b/test/fuzztest/pinauth_fuzzer/BUILD.gn
|
||||
index a37f310f..5d9e7b8c 100644
|
||||
--- a/test/fuzztest/pinauth_fuzzer/BUILD.gn
|
||||
+++ b/test/fuzztest/pinauth_fuzzer/BUILD.gn
|
||||
@@ -92,7 +92,7 @@ ohos_fuzztest("PinAuthFuzzTest") {
|
||||
]
|
||||
|
||||
external_deps = [
|
||||
- "ability_base:want",
|
||||
+ # "ability_base:want",
|
||||
"init:libbegetutil",
|
||||
]
|
||||
}
|
||||
diff --git a/test/fuzztest/pinauthui_fuzzer/BUILD.gn b/test/fuzztest/pinauthui_fuzzer/BUILD.gn
|
||||
index 5de26477..dd56d78e 100644
|
||||
--- a/test/fuzztest/pinauthui_fuzzer/BUILD.gn
|
||||
+++ b/test/fuzztest/pinauthui_fuzzer/BUILD.gn
|
||||
@@ -92,7 +92,7 @@ ohos_fuzztest("PinAuthUiFuzzTest") {
|
||||
]
|
||||
|
||||
external_deps = [
|
||||
- "ability_base:want",
|
||||
+ # "ability_base:want",
|
||||
"init:libbegetutil",
|
||||
]
|
||||
}
|
||||
diff --git a/test/unittest/BUILD.gn b/test/unittest/BUILD.gn
|
||||
index b154fdfb..cae3a92b 100644
|
||||
--- a/test/unittest/BUILD.gn
|
||||
+++ b/test/unittest/BUILD.gn
|
||||
@@ -178,8 +178,8 @@ ohos_unittest("UTTest_softbus_connector") {
|
||||
deps = [ ":device_manager_test_common" ]
|
||||
|
||||
external_deps = [
|
||||
- "hisysevent_native:libhisysevent",
|
||||
- "hitrace_native:hitrace_meter",
|
||||
+ # "hisysevent_native:libhisysevent",
|
||||
+ # "hitrace_native:hitrace_meter",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -194,8 +194,8 @@ ohos_unittest("UTTest_softbus_session") {
|
||||
deps = [ ":device_manager_test_common" ]
|
||||
|
||||
external_deps = [
|
||||
- "hisysevent_native:libhisysevent",
|
||||
- "hitrace_native:hitrace_meter",
|
||||
+ # "hisysevent_native:libhisysevent",
|
||||
+ # "hitrace_native:hitrace_meter",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -367,8 +367,8 @@ ohos_unittest("UTTest_dm_device_state_manager") {
|
||||
deps = [ ":device_manager_test_common" ]
|
||||
|
||||
external_deps = [
|
||||
- "hisysevent_native:libhisysevent",
|
||||
- "hitrace_native:hitrace_meter",
|
||||
+ # "hisysevent_native:libhisysevent",
|
||||
+ # "hitrace_native:hitrace_meter",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -504,7 +504,7 @@ ohos_unittest("UTTest_dm_discovery_manager") {
|
||||
|
||||
deps = [ ":device_manager_test_common" ]
|
||||
|
||||
- external_deps = [ "hitrace_native:hitrace_meter" ]
|
||||
+ # external_deps = [ "hitrace_native:hitrace_meter" ]
|
||||
}
|
||||
|
||||
## UnitTest UTTest_dm_discovery_manager }}}
|
||||
@@ -528,7 +528,7 @@ ohos_unittest("UTTest_dm_publish_manager") {
|
||||
|
||||
deps = [ ":device_manager_test_common" ]
|
||||
|
||||
- external_deps = [ "hitrace_native:hitrace_meter" ]
|
||||
+ # external_deps = [ "hitrace_native:hitrace_meter" ]
|
||||
}
|
||||
|
||||
## UnitTest UTTest_dm_publish_manager }}}
|
||||
@@ -642,15 +642,15 @@ ohos_static_library("device_manager_test_common") {
|
||||
}
|
||||
|
||||
external_deps = [
|
||||
- "ability_base:want",
|
||||
- "bundle_framework:appexecfwk_base",
|
||||
- "bundle_framework:appexecfwk_core",
|
||||
+ # "ability_base:want",
|
||||
+ #"bundle_framework:appexecfwk_base",
|
||||
+ #"bundle_framework:appexecfwk_core",
|
||||
"common_event_service:cesfwk_core",
|
||||
"common_event_service:cesfwk_innerkits",
|
||||
"dsoftbus:softbus_client",
|
||||
"eventhandler:libeventhandler",
|
||||
- "hisysevent_native:libhisysevent",
|
||||
- "hitrace_native:hitrace_meter",
|
||||
+ # "hisysevent_native:libhisysevent",
|
||||
+ # "hitrace_native:hitrace_meter",
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"init:libbegetutil",
|
||||
"ipc:ipc_core",
|
||||
diff --git a/test/unittest/UTTest_dm_dfx.h b/test/unittest/UTTest_dm_dfx.h
|
||||
index 8bba3789..d20b9b8f 100644
|
||||
--- a/test/unittest/UTTest_dm_dfx.h
|
||||
+++ b/test/unittest/UTTest_dm_dfx.h
|
||||
@@ -29,7 +29,7 @@
|
||||
#undef private
|
||||
#include "dm_hisysevent.h"
|
||||
#include "dm_hitrace.h"
|
||||
-#include "hitrace_meter.h"
|
||||
+// #include "hitrace_meter.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace DistributedHardware {
|
||||
diff --git a/utils/BUILD.gn b/utils/BUILD.gn
|
||||
index 0d231c71..59e9e9bd 100644
|
||||
--- a/utils/BUILD.gn
|
||||
+++ b/utils/BUILD.gn
|
||||
@@ -181,10 +181,10 @@ if (defined(ohos_lite)) {
|
||||
deps = [ "//third_party/mbedtls:mbedtls_shared" ]
|
||||
|
||||
external_deps = [
|
||||
- "access_token:libaccesstoken_sdk",
|
||||
+ # "access_token:libaccesstoken_sdk",
|
||||
"c_utils:utils",
|
||||
- "hisysevent_native:libhisysevent",
|
||||
- "hitrace_native:hitrace_meter",
|
||||
+ # # "hisysevent_native:libhisysevent",
|
||||
+ # "hitrace_native:hitrace_meter",
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"ipc:ipc_core",
|
||||
"samgr:samgr_proxy",
|
||||
diff --git a/utils/src/permission/standard/permission_manager.cpp b/utils/src/permission/standard/permission_manager.cpp
|
||||
index 11db468c..e3de417b 100644
|
||||
--- a/utils/src/permission/standard/permission_manager.cpp
|
||||
+++ b/utils/src/permission/standard/permission_manager.cpp
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "iservice_registry.h"
|
||||
#include "system_ability_definition.h"
|
||||
#include "ipc_skeleton.h"
|
||||
-#include "access_token.h"
|
||||
+// #include "access_token.h"
|
||||
#include "hap_token_info.h"
|
||||
#include "native_token_info.h"
|
||||
#include "accesstoken_kit.h"
|
||||
--
|
||||
2.33.0
|
||||
|
||||
25
device_manager.BUILD.gn
Normal file
25
device_manager.BUILD.gn
Normal file
@ -0,0 +1,25 @@
|
||||
# Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# 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("//build/ohos.gni")
|
||||
|
||||
config("devicemanagersdk_config") {
|
||||
include_dirs = [
|
||||
"include"
|
||||
]
|
||||
libs = ["devicemanagersdk.z"]
|
||||
}
|
||||
|
||||
group("devicemanagersdk") {
|
||||
public_configs = [":devicemanagersdk_config"]
|
||||
}
|
||||
72
device_manager.bundle.json
Normal file
72
device_manager.bundle.json
Normal file
@ -0,0 +1,72 @@
|
||||
{
|
||||
"name": "@ohos/device_manager",
|
||||
"description": "device manager service",
|
||||
"version": "3.1",
|
||||
"license": "Apache License 2.0",
|
||||
"repository": "https://gitee.com/openharmony/device_manager",
|
||||
"publishAs": "code-segment",
|
||||
"segment": {
|
||||
"destPath": "foundation/distributedhardware/device_manager"
|
||||
},
|
||||
"dirs": {},
|
||||
"scripts": {},
|
||||
"component": {
|
||||
"name": "device_manager",
|
||||
"subsystem": "distributedhardware",
|
||||
"syscap":[ "SystemCapability.DistributedHardware.DeviceManager" ],
|
||||
"features":["device_manager_no_interaction_auth"],
|
||||
"adapted_system_type": [ "standard", "small" ],
|
||||
"rom": "2M",
|
||||
"ram": "16M",
|
||||
"deps": {
|
||||
"components": [
|
||||
"ability_base",
|
||||
"ability_runtime",
|
||||
"access_token",
|
||||
"appexecfwk_standard",
|
||||
"bundle_framework",
|
||||
"c_utils",
|
||||
"common_event_service",
|
||||
"device_auth",
|
||||
"dsoftbus",
|
||||
"hisysevent_native",
|
||||
"hitrace_native",
|
||||
"hiviewdfx_hilog_native",
|
||||
"init",
|
||||
"ipc",
|
||||
"napi",
|
||||
"os_account",
|
||||
"safwk",
|
||||
"samgr",
|
||||
"startup_l2"
|
||||
],
|
||||
"third_party": [
|
||||
"json",
|
||||
"node",
|
||||
"googletest",
|
||||
"mbedtls"
|
||||
]
|
||||
},
|
||||
"build": {
|
||||
"group_type": {
|
||||
},
|
||||
"inner_kits": [
|
||||
{
|
||||
"type": "so",
|
||||
"name": "//foundation/distributedhardware/device_manager/interfaces/inner_kits/native_cpp:devicemanagersdk",
|
||||
"header": {
|
||||
"header_files": [
|
||||
"device_manager.h",
|
||||
"device_manager_callback.h",
|
||||
"dm_device_info.h",
|
||||
"dm_publish_info.h",
|
||||
"dm_subscribe_info.h"
|
||||
],
|
||||
"header_base": "//foundation/distributedhardware/device_manager/interfaces/inner_kits/native_cpp/include"
|
||||
}
|
||||
}
|
||||
],
|
||||
"test": []
|
||||
}
|
||||
}
|
||||
}
|
||||
112
device_manager.spec
Normal file
112
device_manager.spec
Normal file
@ -0,0 +1,112 @@
|
||||
%define debug_package %{nil}
|
||||
%global oh_version OpenHarmony-v3.2-Release
|
||||
|
||||
%global distributedhardware_dir %{_builddir}/foundation/distributedhardware
|
||||
%global build_opt /opt/distributed-middleware-build
|
||||
%global systemabilitymgr_dir %{_builddir}/foundation/systemabilitymgr
|
||||
%global third_party_dir %{_builddir}/third_party
|
||||
|
||||
Name: distributedhardware_device_manager
|
||||
Version: 1.0.0
|
||||
Release: 2
|
||||
Summary: Distributed middleware used components.
|
||||
License: Apache-2.0
|
||||
Url: https://gitee.com/openharmony/
|
||||
Source1: https://gitee.com/openharmony/distributedhardware_device_manager/repository/archive/openHarmony-v3.2-Release.tar.gz #/distributedhardware_device_manager-OpenHarmony-v3.2-Release.tar.gz
|
||||
Source2: https://gitee.com/openharmony/third_party_json/repository/archive/openHarmony-v3.2-Release.tar.gz #/third_party_json-OpenHarmony-v3.2-Release.tar.gz
|
||||
Source3: device_manager.bundle.json
|
||||
Source4: device_manager.BUILD.gn
|
||||
|
||||
Patch1: 0001-remove-dependency-and-adapt-for-build-device_manager.patch
|
||||
|
||||
BuildRequires: gcc, make, hilog, kernel-devel, uname-build-checks
|
||||
BuildRequires: distributed-build, distributed-beget
|
||||
BuildRequires: commonlibrary_c_utils
|
||||
BuildRequires: notification_eventhandler
|
||||
BuildRequires: communication_ipc, communication_dsoftbus
|
||||
BuildRequires: security_device_auth, security_huks
|
||||
BuildRequires: systemabilitymgr_safwk, systemabilitymgr_samgr
|
||||
|
||||
Requires: distributed-beget
|
||||
Requires: commonlibrary_c_utils
|
||||
Requires: notification_eventhandler
|
||||
Requires: communication_ipc, communication_dsoftbus
|
||||
Requires: security_device_auth, security_huks
|
||||
Requires: systemabilitymgr_safwk, systemabilitymgr_samgr
|
||||
Requires: libboundscheck
|
||||
|
||||
%description
|
||||
The DeviceManager component provides authentication networking capabilities for account independent distributed devices on OpenHarmony, and provides developers with a set of interfaces for monitoring, discovering, and authenticating between distributed devices.
|
||||
|
||||
# Decompress source code package, make patches to the source code.
|
||||
%prep
|
||||
rm -rf %{_builddir}/*
|
||||
|
||||
cp -rf %{build_opt} %{_builddir}/build
|
||||
[ ! -L "%{_builddir}/build.sh" ] && ln -s %{_builddir}/build/build_scripts/build.sh %{_builddir}/build.sh
|
||||
[ ! -L "%{_builddir}/.gn" ] && ln -s %{_builddir}/build/core/gn/dotfile.gn %{_builddir}/.gn
|
||||
[ ! -L "%{_builddir}/build.py" ] && ln -s %{_builddir}/build/lite/build.py %{_builddir}/build.py
|
||||
cp -rf %{_builddir}/build/openeuler/vendor %{_builddir}/
|
||||
cp -rf %{_builddir}/build/openeuler/compiler_gn/* %{_builddir}
|
||||
|
||||
%setup -q -D -T -a 1 -c -n %{distributedhardware_dir}/
|
||||
%patch -P1 -p1 -d %{distributedhardware_dir}/device_manager
|
||||
|
||||
%setup -q -D -T -a 2 -c -n %{third_party_dir}/
|
||||
|
||||
%build
|
||||
|
||||
%ifarch x86_64
|
||||
%{_builddir}/build.sh --product-name openeuler --target-cpu x86_64
|
||||
%endif
|
||||
|
||||
%ifarch aarch64
|
||||
%{_builddir}/build.sh --product-name openeuler --target-cpu arm64
|
||||
%endif
|
||||
|
||||
%install
|
||||
install -d -m 0755 %{buildroot}/%{_includedir}/device_manager
|
||||
install -d -m 0755 %{buildroot}/%{_libdir}
|
||||
install -d -m 0755 %{buildroot}%{_includedir}/nlohmann_json
|
||||
install -d -m 0755 %{buildroot}%{_includedir}/nlohmann_json/single_include
|
||||
install -d -m 0755 %{buildroot}%{build_opt}/openeuler/compiler_gn/foundation/distributedhardware/device_manager/interfaces/inner_kits/native_cpp
|
||||
|
||||
%ifarch aarch64
|
||||
%define header_out_path out/openeuler/innerkits/linux-arm64/
|
||||
%define module_out_path out/openeuler/linux_clang_arm64
|
||||
%endif
|
||||
%ifarch x86_64
|
||||
%define header_out_path out/openeuler/innerkits/linux-x86_64/
|
||||
%define module_out_path out/openeuler/linux_clang_x86_64
|
||||
%endif
|
||||
|
||||
# prepare so
|
||||
install -m 0755 %{_builddir}/%{module_out_path}/distributedhardware/device_manager/*.so %{buildroot}/%{_libdir}
|
||||
|
||||
# prepare head files
|
||||
find %{_builddir}/%{header_out_path} -name *.h -print0 | xargs -0 -i cp -rf {} %{buildroot}/%{_includedir}/device_manager/
|
||||
|
||||
# copy nlohmann_json header file to includedir.
|
||||
cp -rf %{third_party_dir}/json/include/nlohmann %{buildroot}/%{_includedir}/nlohmann_json
|
||||
cp -rf %{third_party_dir}/json/single_include/nlohmann %{buildroot}/%{_includedir}/nlohmann_json/single_include
|
||||
|
||||
#cp json file
|
||||
install -m 0755 %{SOURCE3} %{buildroot}/%{build_opt}/openeuler/compiler_gn/foundation/distributedhardware/device_manager/bundle.json
|
||||
|
||||
#cp gn file
|
||||
install -m 0755 %{SOURCE4} %{buildroot}/%{build_opt}/openeuler/compiler_gn/foundation/distributedhardware/device_manager/interfaces/inner_kits/native_cpp/BUILD.gn
|
||||
|
||||
#create soft link
|
||||
ln -s /usr/include/device_manager %{buildroot}%{build_opt}/openeuler/compiler_gn/foundation/distributedhardware/device_manager/interfaces/inner_kits/native_cpp/include
|
||||
|
||||
%files
|
||||
%{_includedir}/device_manager/*
|
||||
%{_includedir}/nlohmann_json/*
|
||||
%{_libdir}/*.so
|
||||
%{build_opt}/*
|
||||
|
||||
%changelog
|
||||
* Tue Oct 31 2023 Yuying Mu <muyuying1@huawei.com> - 1.0.0-1
|
||||
* Tue Nov 21 2023 Jiaqi Zhao <zhaojiaqi18@huawei.com> - 1.0.0-1
|
||||
- Init and adapt device manager to openEuler
|
||||
|
||||
Binary file not shown.
BIN
third_party_json-OpenHarmony-v3.2-Release.tar.gz
Normal file
BIN
third_party_json-OpenHarmony-v3.2-Release.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user