!8 sync next branch to sp3 branch
From: @heppen Reviewed-by: @yukaii Signed-off-by: @yukaii
This commit is contained in:
commit
dd19f444da
323
0001-remove-useless-dependencies.patch
Normal file
323
0001-remove-useless-dependencies.patch
Normal file
@ -0,0 +1,323 @@
|
|||||||
|
From feaa1b46fbd01dc2c0bfda5c6ef1e5a8d7f7158e Mon Sep 17 00:00:00 2001
|
||||||
|
From: heppen <hepeng68@huawei.com>
|
||||||
|
Date: Tue, 1 Aug 2023 16:52:49 +0800
|
||||||
|
Subject: [PATCH] remove useless dependencies
|
||||||
|
|
||||||
|
---
|
||||||
|
bundle.json | 24 ++-----------------
|
||||||
|
frameworks/js/napi/dataability/BUILD.gn | 2 +-
|
||||||
|
frameworks/js/napi/rdb/BUILD.gn | 6 ++---
|
||||||
|
frameworks/js/napi/relationalstore/BUILD.gn | 6 ++---
|
||||||
|
frameworks/native/rdb/src/rdb_store_impl.cpp | 2 +-
|
||||||
|
frameworks/native/rdb/src/security_policy.cpp | 12 ++++++----
|
||||||
|
.../native/rdb/src/sqlite_sql_builder.cpp | 4 ++--
|
||||||
|
interfaces/inner_api/rdb/BUILD.gn | 4 ++--
|
||||||
|
.../rdb/include/abs_shared_result_set.h | 2 +-
|
||||||
|
.../rdb_data_ability_adapter/BUILD.gn | 12 +++++-----
|
||||||
|
.../inner_api/rdb_data_share_adapter/BUILD.gn | 16 ++++++-------
|
||||||
|
test/native/rdb_data_share_adapter/BUILD.gn | 2 +-
|
||||||
|
12 files changed, 38 insertions(+), 54 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/bundle.json b/bundle.json
|
||||||
|
index f6b926a..d837179 100644
|
||||||
|
--- a/bundle.json
|
||||||
|
+++ b/bundle.json
|
||||||
|
@@ -73,16 +73,14 @@
|
||||||
|
"//foundation/distributeddatamgr/relational_store/interfaces/inner_api/appdatafwk:native_appdatafwk",
|
||||||
|
"//foundation/distributeddatamgr/relational_store/interfaces/inner_api/dataability:native_dataability",
|
||||||
|
"//foundation/distributeddatamgr/relational_store/interfaces/inner_api/rdb_data_share_adapter:rdb_data_share_adapter",
|
||||||
|
- "//foundation/distributeddatamgr/relational_store/interfaces/inner_api/rdb:native_rdb",
|
||||||
|
- "//foundation/distributeddatamgr/relational_store/frameworks/js/napi/dataability:dataability",
|
||||||
|
- "//foundation/distributeddatamgr/relational_store/frameworks/js/napi/rdb:rdb",
|
||||||
|
- "//foundation/distributeddatamgr/relational_store/frameworks/js/napi/relationalstore:relationalstore"
|
||||||
|
+ "//foundation/distributeddatamgr/relational_store/interfaces/inner_api/rdb:native_rdb"
|
||||||
|
],
|
||||||
|
"inner_kits": [
|
||||||
|
{
|
||||||
|
"name": "//foundation/distributeddatamgr/relational_store/interfaces/inner_api/rdb:native_rdb",
|
||||||
|
"header": {
|
||||||
|
"header_files": [
|
||||||
|
+ "abs_predicates.h",
|
||||||
|
"abs_rdb_predicates.h",
|
||||||
|
"abs_result_set.h",
|
||||||
|
"abs_shared_result_set.h",
|
||||||
|
@@ -119,24 +117,6 @@
|
||||||
|
],
|
||||||
|
"header_base": "//foundation/distributeddatamgr/relational_store/interfaces/inner_api/dataability/include"
|
||||||
|
}
|
||||||
|
- },
|
||||||
|
- {
|
||||||
|
- "name": "//foundation/distributeddatamgr/relational_store/interfaces/inner_api/rdb_data_share_adapter:rdb_data_share_adapter",
|
||||||
|
- "header": {
|
||||||
|
- "header_files": [
|
||||||
|
- "rdb_utils.h"
|
||||||
|
- ],
|
||||||
|
- "header_base": "//foundation/distributeddatamgr/relational_store/interfaces/inner_api/rdb_data_share_adapter/include"
|
||||||
|
- }
|
||||||
|
- },
|
||||||
|
- {
|
||||||
|
- "name": "//foundation/distributeddatamgr/relational_store/interfaces/inner_api/rdb_data_ability_adapter:rdb_data_ability_adapter",
|
||||||
|
- "header": {
|
||||||
|
- "header_files": [
|
||||||
|
- "rdb_data_ability_utils.h"
|
||||||
|
- ],
|
||||||
|
- "header_base": "//foundation/distributeddatamgr/relational_store/interfaces/inner_api/rdb_data_ability_adapter/include"
|
||||||
|
- }
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"test": [
|
||||||
|
diff --git a/frameworks/js/napi/dataability/BUILD.gn b/frameworks/js/napi/dataability/BUILD.gn
|
||||||
|
index 6e8d1bd..523f7df 100644
|
||||||
|
--- a/frameworks/js/napi/dataability/BUILD.gn
|
||||||
|
+++ b/frameworks/js/napi/dataability/BUILD.gn
|
||||||
|
@@ -39,7 +39,7 @@ ohos_shared_library("dataability") {
|
||||||
|
|
||||||
|
external_deps = [
|
||||||
|
"hilog_native:libhilog",
|
||||||
|
- "napi:ace_napi",
|
||||||
|
+ # "napi:ace_napi",
|
||||||
|
"relational_store:native_dataability",
|
||||||
|
"relational_store:native_rdb",
|
||||||
|
]
|
||||||
|
diff --git a/frameworks/js/napi/rdb/BUILD.gn b/frameworks/js/napi/rdb/BUILD.gn
|
||||||
|
index 2145263..089d1f5 100644
|
||||||
|
--- a/frameworks/js/napi/rdb/BUILD.gn
|
||||||
|
+++ b/frameworks/js/napi/rdb/BUILD.gn
|
||||||
|
@@ -12,7 +12,7 @@
|
||||||
|
# limitations under the License.
|
||||||
|
import("//build/ohos.gni")
|
||||||
|
import("//build/ohos/ace/ace.gni")
|
||||||
|
-import("//foundation/distributeddatamgr/data_share/datashare.gni")
|
||||||
|
+# import("//foundation/distributeddatamgr/data_share/datashare.gni")
|
||||||
|
import("//foundation/distributeddatamgr/relational_store/relational_store.gni")
|
||||||
|
|
||||||
|
ohos_copy("relational_store_declaration") {
|
||||||
|
@@ -79,8 +79,8 @@ ohos_shared_library("rdb") {
|
||||||
|
]
|
||||||
|
|
||||||
|
external_deps = [
|
||||||
|
- "ability_runtime:abilitykit_native",
|
||||||
|
- "ability_runtime:napi_base_context",
|
||||||
|
+ # "ability_runtime:abilitykit_native",
|
||||||
|
+ # "ability_runtime:napi_base_context",
|
||||||
|
"c_utils:utils",
|
||||||
|
"hilog_native:libhilog",
|
||||||
|
"hitrace_native:hitrace_meter",
|
||||||
|
diff --git a/frameworks/js/napi/relationalstore/BUILD.gn b/frameworks/js/napi/relationalstore/BUILD.gn
|
||||||
|
index 0e99278..c15db9c 100644
|
||||||
|
--- a/frameworks/js/napi/relationalstore/BUILD.gn
|
||||||
|
+++ b/frameworks/js/napi/relationalstore/BUILD.gn
|
||||||
|
@@ -12,7 +12,7 @@
|
||||||
|
# limitations under the License.
|
||||||
|
import("//build/ohos.gni")
|
||||||
|
import("//build/ohos/ace/ace.gni")
|
||||||
|
-import("//foundation/distributeddatamgr/data_share/datashare.gni")
|
||||||
|
+# import("//foundation/distributeddatamgr/data_share/datashare.gni")
|
||||||
|
import("//foundation/distributeddatamgr/relational_store/relational_store.gni")
|
||||||
|
|
||||||
|
ohos_copy("relational_store_declaration") {
|
||||||
|
@@ -78,8 +78,8 @@ ohos_shared_library("relationalstore") {
|
||||||
|
]
|
||||||
|
|
||||||
|
external_deps = [
|
||||||
|
- "ability_runtime:abilitykit_native",
|
||||||
|
- "ability_runtime:napi_base_context",
|
||||||
|
+ # "ability_runtime:abilitykit_native",
|
||||||
|
+ # "ability_runtime:napi_base_context",
|
||||||
|
"c_utils:utils",
|
||||||
|
"hilog_native:libhilog",
|
||||||
|
"hitrace_native:hitrace_meter",
|
||||||
|
diff --git a/frameworks/native/rdb/src/rdb_store_impl.cpp b/frameworks/native/rdb/src/rdb_store_impl.cpp
|
||||||
|
index e414050..8093610 100644
|
||||||
|
--- a/frameworks/native/rdb/src/rdb_store_impl.cpp
|
||||||
|
+++ b/frameworks/native/rdb/src/rdb_store_impl.cpp
|
||||||
|
@@ -934,7 +934,7 @@ int RdbStoreImpl::SetDistributedTables(const std::vector<std::string> &tables)
|
||||||
|
RdbSecurityManager::KeyFileType::PUB_KEY_FILE, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
- LOG_ERROR("success");
|
||||||
|
+ LOG_INFO("success");
|
||||||
|
return E_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/frameworks/native/rdb/src/security_policy.cpp b/frameworks/native/rdb/src/security_policy.cpp
|
||||||
|
index 910069f..1b513ce 100644
|
||||||
|
--- a/frameworks/native/rdb/src/security_policy.cpp
|
||||||
|
+++ b/frameworks/native/rdb/src/security_policy.cpp
|
||||||
|
@@ -17,14 +17,16 @@
|
||||||
|
|
||||||
|
#include "logger.h"
|
||||||
|
#include "rdb_errno.h"
|
||||||
|
-#include "security_label.h"
|
||||||
|
+// #include "security_label.h"
|
||||||
|
|
||||||
|
namespace OHOS {
|
||||||
|
namespace NativeRdb {
|
||||||
|
int SecurityPolicy::SetFileSecurityLevel(const std::string &filePath, const std::string &securityLevel)
|
||||||
|
{
|
||||||
|
- bool result = DistributedFS::ModuleSecurityLabel::SecurityLabel::SetSecurityLabel(filePath, securityLevel);
|
||||||
|
- return result ? E_OK : E_ERROR;
|
||||||
|
+ // bool result = DistributedFS::ModuleSecurityLabel::SecurityLabel::SetSecurityLabel(filePath, securityLevel);
|
||||||
|
+ (void)filePath;
|
||||||
|
+ (void)securityLevel;
|
||||||
|
+ return E_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string SecurityPolicy::GetSecurityLevelValue(SecurityLevel securityLevel)
|
||||||
|
@@ -45,7 +47,9 @@ std::string SecurityPolicy::GetSecurityLevelValue(SecurityLevel securityLevel)
|
||||||
|
|
||||||
|
std::string SecurityPolicy::GetFileSecurityLevel(const std::string &filePath)
|
||||||
|
{
|
||||||
|
- return DistributedFS::ModuleSecurityLabel::SecurityLabel::GetSecurityLabel(filePath);
|
||||||
|
+ (void)filePath;
|
||||||
|
+ return "";
|
||||||
|
+ // return DistributedFS::ModuleSecurityLabel::SecurityLabel::GetSecurityLabel(filePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
int SecurityPolicy::SetSecurityLabel(const RdbStoreConfig &config)
|
||||||
|
diff --git a/frameworks/native/rdb/src/sqlite_sql_builder.cpp b/frameworks/native/rdb/src/sqlite_sql_builder.cpp
|
||||||
|
index 2b0ddd1..d992755 100644
|
||||||
|
--- a/frameworks/native/rdb/src/sqlite_sql_builder.cpp
|
||||||
|
+++ b/frameworks/native/rdb/src/sqlite_sql_builder.cpp
|
||||||
|
@@ -306,12 +306,12 @@ std::string SqliteSqlBuilder::PredicatesNormalize(const std::string &source, int
|
||||||
|
}
|
||||||
|
|
||||||
|
auto index = source.rfind("(*");
|
||||||
|
- if (index != -1) {
|
||||||
|
+ if (index != std::string::npos) {
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
|
||||||
|
index = source.rfind(".");
|
||||||
|
- if (index == -1) {
|
||||||
|
+ if (index == std::string::npos) {
|
||||||
|
return StringUtils::SurroundWithQuote(source, "`");
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/interfaces/inner_api/rdb/BUILD.gn b/interfaces/inner_api/rdb/BUILD.gn
|
||||||
|
index 2c0f223..53dd9c6 100644
|
||||||
|
--- a/interfaces/inner_api/rdb/BUILD.gn
|
||||||
|
+++ b/interfaces/inner_api/rdb/BUILD.gn
|
||||||
|
@@ -147,8 +147,8 @@ ohos_shared_library("native_rdb") {
|
||||||
|
external_deps = [
|
||||||
|
"c_utils:utils",
|
||||||
|
"hilog_native:libhilog",
|
||||||
|
- "hitrace_native:hitrace_meter",
|
||||||
|
- "hitrace_native:libhitracechain",
|
||||||
|
+ # "hitrace_native:hitrace_meter",
|
||||||
|
+ # "hitrace_native:libhitracechain",
|
||||||
|
"huks:libhukssdk",
|
||||||
|
"ipc:ipc_core",
|
||||||
|
]
|
||||||
|
diff --git a/interfaces/inner_api/rdb/include/abs_shared_result_set.h b/interfaces/inner_api/rdb/include/abs_shared_result_set.h
|
||||||
|
index 616f729..af9633f 100644
|
||||||
|
--- a/interfaces/inner_api/rdb/include/abs_shared_result_set.h
|
||||||
|
+++ b/interfaces/inner_api/rdb/include/abs_shared_result_set.h
|
||||||
|
@@ -22,7 +22,7 @@
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#include "abs_result_set.h"
|
||||||
|
-#include "message_parcel.h"
|
||||||
|
+// #include "message_parcel.h"
|
||||||
|
#include "parcel.h"
|
||||||
|
#include "shared_block.h"
|
||||||
|
#include "shared_result_set.h"
|
||||||
|
diff --git a/interfaces/inner_api/rdb_data_ability_adapter/BUILD.gn b/interfaces/inner_api/rdb_data_ability_adapter/BUILD.gn
|
||||||
|
index c45f376..edfd798 100644
|
||||||
|
--- a/interfaces/inner_api/rdb_data_ability_adapter/BUILD.gn
|
||||||
|
+++ b/interfaces/inner_api/rdb_data_ability_adapter/BUILD.gn
|
||||||
|
@@ -11,18 +11,18 @@
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
import("//build/ohos.gni")
|
||||||
|
-import("//foundation/distributeddatamgr/data_share/datashare.gni")
|
||||||
|
+# import("//foundation/distributeddatamgr/data_share/datashare.gni")
|
||||||
|
import("//foundation/distributeddatamgr/relational_store/relational_store.gni")
|
||||||
|
|
||||||
|
config("rdb_data_ability_adapter_config") {
|
||||||
|
visibility = [ ":*" ]
|
||||||
|
include_dirs = [
|
||||||
|
"include",
|
||||||
|
- "${datashare_base_path}/interfaces/inner_api/common/include",
|
||||||
|
- "${datashare_base_path}/interfaces/inner_api/consumer/include",
|
||||||
|
- "${datashare_base_path}/interfaces/inner_api/provider/include",
|
||||||
|
+ # "${datashare_base_path}/interfaces/inner_api/common/include",
|
||||||
|
+ # "${datashare_base_path}/interfaces/inner_api/consumer/include",
|
||||||
|
+ # "${datashare_base_path}/interfaces/inner_api/provider/include",
|
||||||
|
"${relational_store_innerapi_path}/rdb/include",
|
||||||
|
- "${datashare_common_native_path}/include",
|
||||||
|
+ # "${datashare_common_native_path}/include",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -30,7 +30,7 @@ config("rdb_data_ability_adapter_public_config") {
|
||||||
|
visibility = [ ":*" ]
|
||||||
|
include_dirs = [
|
||||||
|
"include",
|
||||||
|
- "${datashare_base_path}/interfaces/inner_api/provider/include",
|
||||||
|
+ # "${datashare_base_path}/interfaces/inner_api/provider/include",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/interfaces/inner_api/rdb_data_share_adapter/BUILD.gn b/interfaces/inner_api/rdb_data_share_adapter/BUILD.gn
|
||||||
|
index 8af6b42..6493c76 100644
|
||||||
|
--- a/interfaces/inner_api/rdb_data_share_adapter/BUILD.gn
|
||||||
|
+++ b/interfaces/inner_api/rdb_data_share_adapter/BUILD.gn
|
||||||
|
@@ -11,18 +11,18 @@
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
import("//build/ohos.gni")
|
||||||
|
-import("//foundation/distributeddatamgr/data_share/datashare.gni")
|
||||||
|
+# import("//foundation/distributeddatamgr/data_share/datashare.gni")
|
||||||
|
import("//foundation/distributeddatamgr/relational_store/relational_store.gni")
|
||||||
|
|
||||||
|
config("rdb_data_share_adapter_config") {
|
||||||
|
visibility = [ ":*" ]
|
||||||
|
include_dirs = [
|
||||||
|
"include",
|
||||||
|
- "${datashare_base_path}/interfaces/inner_api/common/include",
|
||||||
|
- "${datashare_base_path}/interfaces/inner_api/consumer/include",
|
||||||
|
- "${datashare_base_path}/interfaces/inner_api/provider/include",
|
||||||
|
+ # "${datashare_base_path}/interfaces/inner_api/common/include",
|
||||||
|
+ # "${datashare_base_path}/interfaces/inner_api/consumer/include",
|
||||||
|
+ # "${datashare_base_path}/interfaces/inner_api/provider/include",
|
||||||
|
"${relational_store_innerapi_path}/rdb/include",
|
||||||
|
- "${datashare_common_native_path}/include",
|
||||||
|
+ # "${datashare_common_native_path}/include",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -30,14 +30,14 @@ config("rdb_data_share_adapter_public_config") {
|
||||||
|
visibility = [ ":*" ]
|
||||||
|
include_dirs = [
|
||||||
|
"include",
|
||||||
|
- "${datashare_base_path}/interfaces/inner_api/provider/include",
|
||||||
|
+ # "${datashare_base_path}/interfaces/inner_api/provider/include",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
ohos_shared_library("rdb_data_share_adapter") {
|
||||||
|
sources = [
|
||||||
|
- "${relational_store_native_path}/rdb_data_share_adapter/src/rdb_result_set_bridge.cpp",
|
||||||
|
- "${relational_store_native_path}/rdb_data_share_adapter/src/rdb_utils.cpp",
|
||||||
|
+ # "${relational_store_native_path}/rdb_data_share_adapter/src/rdb_result_set_bridge.cpp",
|
||||||
|
+ # "${relational_store_native_path}/rdb_data_share_adapter/src/rdb_utils.cpp",
|
||||||
|
]
|
||||||
|
|
||||||
|
configs = [ ":rdb_data_share_adapter_config" ]
|
||||||
|
diff --git a/test/native/rdb_data_share_adapter/BUILD.gn b/test/native/rdb_data_share_adapter/BUILD.gn
|
||||||
|
index 9e4ad9b..de513b3 100644
|
||||||
|
--- a/test/native/rdb_data_share_adapter/BUILD.gn
|
||||||
|
+++ b/test/native/rdb_data_share_adapter/BUILD.gn
|
||||||
|
@@ -11,7 +11,7 @@
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
import("//build/test.gni")
|
||||||
|
-import("//foundation/distributeddatamgr/data_share/datashare.gni")
|
||||||
|
+# import("//foundation/distributeddatamgr/data_share/datashare.gni")
|
||||||
|
import("//foundation/distributeddatamgr/relational_store/relational_store.gni")
|
||||||
|
|
||||||
|
module_output_path = "relational_store/rdb_data_share_adapter"
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
2517
0002-add-huks-component.patch
Normal file
2517
0002-add-huks-component.patch
Normal file
File diff suppressed because it is too large
Load Diff
13334
0003-add-third-part-component.patch
Normal file
13334
0003-add-third-part-component.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,24 @@
|
|||||||
|
From bbc413f60a0ab0c8b3029f999be051b44101aa21 Mon Sep 17 00:00:00 2001
|
||||||
|
From: wang--ge <wang__ge@126.com>
|
||||||
|
Date: Tue, 18 Jul 2023 15:31:25 +0800
|
||||||
|
Subject: [PATCH] establish relational store dependence on boundscheck
|
||||||
|
|
||||||
|
---
|
||||||
|
.../relational_store/interfaces/inner_api/appdatafwk/BUILD.gn | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/distributeddatamgr/relational_store/interfaces/inner_api/appdatafwk/BUILD.gn b/distributeddatamgr/relational_store/interfaces/inner_api/appdatafwk/BUILD.gn
|
||||||
|
index 688674b..86f5dd9 100644
|
||||||
|
--- a/distributeddatamgr/relational_store/interfaces/inner_api/appdatafwk/BUILD.gn
|
||||||
|
+++ b/distributeddatamgr/relational_store/interfaces/inner_api/appdatafwk/BUILD.gn
|
||||||
|
@@ -34,6 +34,7 @@ ohos_shared_library("native_appdatafwk") {
|
||||||
|
|
||||||
|
public_deps = [
|
||||||
|
"//foundation/communication/ipc/interfaces/innerkits/ipc_core:ipc_core",
|
||||||
|
+ "//third_party/bounds_checking_function:libsec_shared",
|
||||||
|
]
|
||||||
|
|
||||||
|
external_deps = [
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
10
BUILD.gn.appdatafwk
Normal file
10
BUILD.gn.appdatafwk
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import("//build/ohos.gni")
|
||||||
|
|
||||||
|
config("appdatafwk_public_config") {
|
||||||
|
include_dirs = [ "include" ]
|
||||||
|
libs = [ "native_appdatafwk.z" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
group("native_appdatafwk") {
|
||||||
|
public_configs = [ ":appdatafwk_public_config" ]
|
||||||
|
}
|
||||||
10
BUILD.gn.dataability
Normal file
10
BUILD.gn.dataability
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import("//build/ohos.gni")
|
||||||
|
|
||||||
|
config("native_dataability_public_config") {
|
||||||
|
include_dirs = [ "include" ]
|
||||||
|
libs = [ "native_dataability.z" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
group("native_dataability") {
|
||||||
|
public_configs = [ ":native_dataability_public_config" ]
|
||||||
|
}
|
||||||
12
BUILD.gn.rdb
Normal file
12
BUILD.gn.rdb
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import("//build/ohos.gni")
|
||||||
|
|
||||||
|
config("native_rdb_public_config") {
|
||||||
|
include_dirs = [
|
||||||
|
"include"
|
||||||
|
]
|
||||||
|
libs = [ "native_rdb.z" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
group("native_rdb") {
|
||||||
|
public_configs = [ ":native_rdb_public_config" ]
|
||||||
|
}
|
||||||
10
BUILD.gn.share.adapter
Normal file
10
BUILD.gn.share.adapter
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import("//build/ohos.gni")
|
||||||
|
|
||||||
|
config("rdb_data_share_adapter_public_config") {
|
||||||
|
include_dirs = [ "include" ]
|
||||||
|
libs = [ "rdb_data_share_adapter.z" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
group("rdb_data_share_adapter") {
|
||||||
|
public_configs = [ ":rdb_data_share_adapter_public_config" ]
|
||||||
|
}
|
||||||
133
bundle.json
Normal file
133
bundle.json
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
{
|
||||||
|
"name": "@ohos/distributeddatamgr_relational_store",
|
||||||
|
"version": "3.1.0",
|
||||||
|
"description": "Local Data Management",
|
||||||
|
"homePage": "https://gitee.com/openharmony",
|
||||||
|
"license": "Apache V2",
|
||||||
|
"repository": "https://gitee.com/openharmony/distributeddatamgr_relational_store",
|
||||||
|
"domain": "os",
|
||||||
|
"language": "",
|
||||||
|
"publishAs": "code-segment",
|
||||||
|
"private": false,
|
||||||
|
"scripts": {},
|
||||||
|
"tags": [
|
||||||
|
"foundation"
|
||||||
|
],
|
||||||
|
"keywords": [
|
||||||
|
"distributeddatamgr",
|
||||||
|
"relational_store"
|
||||||
|
],
|
||||||
|
"envs": [],
|
||||||
|
"dirs": {},
|
||||||
|
"author": {
|
||||||
|
"name": "",
|
||||||
|
"email": "",
|
||||||
|
"url": ""
|
||||||
|
},
|
||||||
|
"contributors": [
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"email": "",
|
||||||
|
"url": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"segment": {
|
||||||
|
"destPath": "foundation/distributeddatamgr/relational_store"
|
||||||
|
},
|
||||||
|
"component": {
|
||||||
|
"name": "relational_store",
|
||||||
|
"subsystem": "distributeddatamgr",
|
||||||
|
"syscap": [
|
||||||
|
"SystemCapability.DistributedDataManager.RelationalStore.Core"
|
||||||
|
],
|
||||||
|
"features": ["relational_store_rdb_support_icu"],
|
||||||
|
"adapted_system_type": [
|
||||||
|
"standard"
|
||||||
|
],
|
||||||
|
"rom": "",
|
||||||
|
"ram": "",
|
||||||
|
"deps": {
|
||||||
|
"components": [
|
||||||
|
"ability_base",
|
||||||
|
"ability_runtime",
|
||||||
|
"napi",
|
||||||
|
"hitrace_native",
|
||||||
|
"hilog_native",
|
||||||
|
"ipc",
|
||||||
|
"utils_base",
|
||||||
|
"common",
|
||||||
|
"icu",
|
||||||
|
"samgr"
|
||||||
|
],
|
||||||
|
"third_party": [
|
||||||
|
"sqlite",
|
||||||
|
"shared_icuuc",
|
||||||
|
"shared_icui18n",
|
||||||
|
"libxml2",
|
||||||
|
"libsec_shared",
|
||||||
|
"gtest_main"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"build": {
|
||||||
|
"sub_component": [
|
||||||
|
"//foundation/distributeddatamgr/relational_store/interfaces/inner_api/appdatafwk:native_appdatafwk",
|
||||||
|
"//foundation/distributeddatamgr/relational_store/interfaces/inner_api/dataability:native_dataability",
|
||||||
|
"//foundation/distributeddatamgr/relational_store/interfaces/inner_api/rdb_data_share_adapter:rdb_data_share_adapter",
|
||||||
|
"//foundation/distributeddatamgr/relational_store/interfaces/inner_api/rdb:native_rdb"
|
||||||
|
],
|
||||||
|
"inner_kits": [
|
||||||
|
{
|
||||||
|
"name": "//foundation/distributeddatamgr/relational_store/interfaces/inner_api/rdb:native_rdb",
|
||||||
|
"header": {
|
||||||
|
"header_files": [
|
||||||
|
"abs_rdb_predicates.h",
|
||||||
|
"abs_result_set.h",
|
||||||
|
"abs_shared_result_set.h",
|
||||||
|
"rdb_errno.h",
|
||||||
|
"rdb_helper.h",
|
||||||
|
"rdb_open_callback.h",
|
||||||
|
"rdb_predicates.h",
|
||||||
|
"rdb_store.h",
|
||||||
|
"rdb_store_config.h",
|
||||||
|
"result_set.h",
|
||||||
|
"shared_result_set.h",
|
||||||
|
"transaction_observer.h",
|
||||||
|
"value_object.h",
|
||||||
|
"values_bucket.h"
|
||||||
|
],
|
||||||
|
"header_base": "//foundation/distributeddatamgr/relational_store/interfaces/inner_api/rdb/include"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "//foundation/distributeddatamgr/relational_store/interfaces/inner_api/appdatafwk:native_appdatafwk",
|
||||||
|
"header": {
|
||||||
|
"header_files": [
|
||||||
|
"shared_block.h"
|
||||||
|
],
|
||||||
|
"header_base": "//foundation/distributeddatamgr/relational_store/interfaces/inner_api/appdatafwk/include"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "//foundation/distributeddatamgr/relational_store/interfaces/inner_api/dataability:native_dataability",
|
||||||
|
"header": {
|
||||||
|
"header_files": [
|
||||||
|
"data_ability_predicates.h",
|
||||||
|
"predicates_utils.h"
|
||||||
|
],
|
||||||
|
"header_base": "//foundation/distributeddatamgr/relational_store/interfaces/inner_api/dataability/include"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"test": [
|
||||||
|
"//foundation/distributeddatamgr/relational_store/test/js/dataability:unittest",
|
||||||
|
"//foundation/distributeddatamgr/relational_store/test/js/rdb:unittest",
|
||||||
|
"//foundation/distributeddatamgr/relational_store/test/js/relationalstore:unittest",
|
||||||
|
"//foundation/distributeddatamgr/relational_store/test/native/dataability:unittest",
|
||||||
|
"//foundation/distributeddatamgr/relational_store/test/native/rdb:unittest",
|
||||||
|
"//foundation/distributeddatamgr/relational_store/test/native/rdb:fuzztest",
|
||||||
|
"//foundation/distributeddatamgr/relational_store/test/native/rdb_data_share_adapter:unittest",
|
||||||
|
"//foundation/distributeddatamgr/relational_store/test/native/rdb:distributedtest"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
119
distributeddatamgr_relational_store.spec
Normal file
119
distributeddatamgr_relational_store.spec
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
%define debug_package %{nil}
|
||||||
|
%global oh_version OpenHarmony-v3.2-Release
|
||||||
|
%global relational_store_dir %{_builddir}/foundation/distributeddatamgr/
|
||||||
|
%global build_opt /opt/distributed-middleware-build
|
||||||
|
%global bundle_dir %{build_opt}/openeuler/compiler_gn/foundation/distributeddatamgr/relational_store
|
||||||
|
%global appdatafwk_dir %{bundle_dir}/interfaces/inner_api/appdatafwk
|
||||||
|
%global dataability_dir %{bundle_dir}/interfaces/inner_api/dataability
|
||||||
|
%global share_adapter_dir %{bundle_dir}/interfaces/inner_api/rdb_data_share_adapter
|
||||||
|
%global rdb_dir %{bundle_dir}/interfaces/inner_api/rdb
|
||||||
|
|
||||||
|
Name: distributeddatamgr_relational_store
|
||||||
|
Version: 1.0.0
|
||||||
|
Release: 2
|
||||||
|
Summary: Local Data Management
|
||||||
|
License: Apache-2.0
|
||||||
|
Url: https://gitee.com/openharmony/distributeddatamgr_relational_store
|
||||||
|
Source0: https://gitee.com/openharmony/distributeddatamgr_relational_store/repository/archive/OpenHarmony-v3.2-Release.tar.gz#/distributeddatamgr_relational_store-OpenHarmony-v3.2-Release.tar.gz
|
||||||
|
Source1: bundle.json
|
||||||
|
Source2: BUILD.gn.appdatafwk
|
||||||
|
Source3: BUILD.gn.dataability
|
||||||
|
Source4: BUILD.gn.share.adapter
|
||||||
|
Source5: BUILD.gn.rdb
|
||||||
|
Patch0: 0001-remove-useless-dependencies.patch
|
||||||
|
Patch1: 0002-add-huks-component.patch
|
||||||
|
Patch2: 0003-add-third-part-component.patch
|
||||||
|
Patch3: 0004-establish-relational-store-dependence-on-boundscheck.patch
|
||||||
|
|
||||||
|
BuildRequires: libatomic libicu-devel libxml2-devel openssl-devel
|
||||||
|
BuildRequires: distributed-build distributed-build_lite hilog distributed-utils
|
||||||
|
BuildRequires: distributeddatamgr_kv_store libicu
|
||||||
|
|
||||||
|
Requires: hilog distributed-utils distributeddatamgr_kv_store
|
||||||
|
|
||||||
|
%description
|
||||||
|
A relational database (RDB) is a database that manages data based on a relational model. The OpenHarmony relational database provides a complete mechanism for managing local databases based on the SQLite component.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
rm -rf %{_builddir}/*
|
||||||
|
|
||||||
|
cd %{_builddir}
|
||||||
|
cp -rp %{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
|
||||||
|
mv build/openeuler/vendor %{_builddir}/
|
||||||
|
|
||||||
|
%setup -q -T -a 0 -c -n %{relational_store_dir}
|
||||||
|
mv %{relational_store_dir}%{name}-%{oh_version} %{relational_store_dir}relational_store
|
||||||
|
cp -rf %{_builddir}/build/openeuler/compiler_gn/* %{_builddir}/
|
||||||
|
|
||||||
|
cd %{_builddir}
|
||||||
|
%patch0 -p1 -d %{relational_store_dir}relational_store
|
||||||
|
%patch1 -p1 -d %{_builddir}/base/security
|
||||||
|
%patch2 -p1 -d %{_builddir}/third_party
|
||||||
|
%patch3 -p1 -d %{_builddir}/foundation
|
||||||
|
|
||||||
|
%build
|
||||||
|
cd %{_builddir}
|
||||||
|
rm -rf %{_builddir}/out
|
||||||
|
|
||||||
|
%ifarch x86_64
|
||||||
|
./build.sh --product-name openeuler --target-cpu x86_64
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%ifarch aarch64
|
||||||
|
./build.sh --product-name openeuler --target-cpu arm64
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%install
|
||||||
|
install -d -m 0755 %{buildroot}%{_includedir}/relational_store
|
||||||
|
install -d -m 0755 %{buildroot}%{_libdir}
|
||||||
|
install -d -m 0755 %{buildroot}%{appdatafwk_dir}
|
||||||
|
install -d -m 0755 %{buildroot}%{dataability_dir}
|
||||||
|
install -d -m 0755 %{buildroot}%{share_adapter_dir}
|
||||||
|
install -d -m 0755 %{buildroot}%{rdb_dir}
|
||||||
|
install -d -m 0755 %{buildroot}/system/lib64
|
||||||
|
|
||||||
|
%ifarch aarch64
|
||||||
|
module_out_path="out/openeuler/linux_clang_arm64/distributeddatamgr/relational_store/"
|
||||||
|
header_out_path="out/openeuler/innerkits/linux-arm64/relational_store"
|
||||||
|
%endif
|
||||||
|
%ifarch x86_64
|
||||||
|
module_out_path="out/openeuler/linux_clang_x86_64/distributeddatamgr/relational_store/"
|
||||||
|
header_out_path="out/openeuler/innerkits/linux-x86_64/relational_store"
|
||||||
|
%endif
|
||||||
|
|
||||||
|
install -m 0755 %{_builddir}/${module_out_path}/*.so %{buildroot}%{_libdir}
|
||||||
|
install -m 0755 %{_builddir}/${module_out_path}/*.so %{buildroot}/system/lib64/
|
||||||
|
|
||||||
|
find %{_builddir}/${header_out_path} -name *.h -print0 | xargs -0 -i cp -rvf {} %{buildroot}%{_includedir}/relational_store/
|
||||||
|
|
||||||
|
pushd %{_builddir}/foundation/distributeddatamgr/relational_store/
|
||||||
|
for include_file in `find . \( -name js -o -name test -o -name mock \) -prune -o -name "*.h" -type f`
|
||||||
|
do
|
||||||
|
if [[ ${include_file} != *.h ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
cp --parents ${include_file} %{buildroot}%{bundle_dir}
|
||||||
|
done
|
||||||
|
popd
|
||||||
|
|
||||||
|
cp %{SOURCE1} %{buildroot}%{bundle_dir}
|
||||||
|
cp %{SOURCE2} %{buildroot}%{appdatafwk_dir}/BUILD.gn
|
||||||
|
cp %{SOURCE3} %{buildroot}%{dataability_dir}/BUILD.gn
|
||||||
|
cp %{SOURCE4} %{buildroot}%{share_adapter_dir}/BUILD.gn
|
||||||
|
cp %{SOURCE5} %{buildroot}%{rdb_dir}/BUILD.gn
|
||||||
|
|
||||||
|
%files
|
||||||
|
%{_libdir}/*.so
|
||||||
|
%{_includedir}/relational_store/*
|
||||||
|
%{bundle_dir}/*
|
||||||
|
/system/*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Aug 03 2023 Peng He <hepeng68@huawei.com> - 1.0.0-2
|
||||||
|
- Add requires and rectify the contents of the RPM package.
|
||||||
|
|
||||||
|
* Fri Jun 9 2023 Ge Wang <wang__ge@126.com> - 1.0.0-1
|
||||||
|
- init package
|
||||||
Loading…
x
Reference in New Issue
Block a user