Compare commits

...

13 Commits

Author SHA1 Message Date
openeuler-ci-bot
ae61038984
!11 请求将distributeddatamgr_relational_store合入next分支
From: @zxstty 
Reviewed-by: @yukaii 
Signed-off-by: @yukaii
2023-12-12 08:04:38 +00:00
zxstty
5c75baf759 change by zjq 2023-12-06 16:06:05 +08:00
openeuler-ci-bot
dd19f444da
!8 sync next branch to sp3 branch
From: @heppen 
Reviewed-by: @yukaii 
Signed-off-by: @yukaii
2023-11-15 09:25:07 +00:00
openeuler-ci-bot
267e233787
!7 合并到sp2 next
From: @muyuying1 
Reviewed-by: @heppen 
Signed-off-by: @heppen
2023-11-06 14:06:41 +00:00
openeuler-ci-bot
39741b5a4e
!6 同步master分支代码到sp2分支
From: @heppen 
Reviewed-by: @yukaii 
Signed-off-by: @yukaii
2023-08-30 02:00:38 +00:00
openeuler-ci-bot
7421fa4cc0
!5 add source file and spec file
From: @heppen 
Reviewed-by: @yukaii 
Signed-off-by: @yukaii
2023-08-29 12:00:46 +00:00
heppen
f0cb59c221 add source files and spec file 2023-08-29 19:53:34 +08:00
openeuler-ci-bot
cbc9594966
!4 add patch: establish relational store dependency on boundscheck
From: @heppen 
Reviewed-by: @yukaii 
Signed-off-by: @yukaii
2023-08-29 11:44:27 +00:00
openeuler-ci-bot
0718689963
!3 add patch: add third party component
From: @heppen 
Reviewed-by: @yukaii 
Signed-off-by: @yukaii
2023-08-29 11:26:53 +00:00
openeuler-ci-bot
746d48622e
!2 add patch: add huks component
From: @heppen 
Reviewed-by: @yukaii 
Signed-off-by: @yukaii
2023-08-29 09:29:49 +00:00
heppen
e846584aa0 establish relational store dependency on boundscheck 2023-08-28 16:38:33 +08:00
heppen
80e62dada2 add third party component 2023-08-28 16:37:35 +08:00
heppen
670b63e0ba add huks component 2023-08-28 16:35:22 +08:00
9 changed files with 334 additions and 6 deletions

View File

@ -1,6 +1,6 @@
From feaa1b46fbd01dc2c0bfda5c6ef1e5a8d7f7158e Mon Sep 17 00:00:00 2001
From 8a9758f8478bd67980cbadaf318ea059d472ff53 Mon Sep 17 00:00:00 2001
From: heppen <hepeng68@huawei.com>
Date: Tue, 1 Aug 2023 16:52:49 +0800
Date: Mon, 20 Nov 2023 11:50:29 +0800
Subject: [PATCH] remove useless dependencies
---
@ -11,12 +11,12 @@ Subject: [PATCH] remove useless dependencies
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 ++--
interfaces/inner_api/rdb/BUILD.gn | 5 ++--
.../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(-)
12 files changed, 38 insertions(+), 55 deletions(-)
diff --git a/bundle.json b/bundle.json
index f6b926a..d837179 100644
@ -195,10 +195,18 @@ index 2b0ddd1..d992755 100644
}
diff --git a/interfaces/inner_api/rdb/BUILD.gn b/interfaces/inner_api/rdb/BUILD.gn
index 2c0f223..53dd9c6 100644
index 2c0f223..603e3dc 100644
--- a/interfaces/inner_api/rdb/BUILD.gn
+++ b/interfaces/inner_api/rdb/BUILD.gn
@@ -147,8 +147,8 @@ ohos_shared_library("native_rdb") {
@@ -139,7 +139,6 @@ ohos_shared_library("native_rdb") {
]
public_deps = [
"${relational_store_innerapi_path}/appdatafwk:native_appdatafwk",
- "//base/security/huks/frameworks/huks_standard/main/os_dependency:libhuks_os_dependency_standard_static",
"//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
"//foundation/distributeddatamgr/kv_store/interfaces/innerkits/distributeddata:distributeddata_inner",
]
@@ -147,8 +146,8 @@ ohos_shared_library("native_rdb") {
external_deps = [
"c_utils:utils",
"hilog_native:libhilog",

View File

@ -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
appdatafwk.BUILD.gn Normal file
View 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" ]
}

133
bundle.json Normal file
View 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"
]
}
}
}

10
dataability.BUILD.gn Normal file
View 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" ]
}

View File

@ -0,0 +1,121 @@
%define debug_package %{nil}
%global oh_version OpenHarmony-v3.2-Release
%global distributeddata_dir %{_builddir}/foundation/distributeddatamgr/
%global build_opt /opt/distributed-middleware-build
%global bundle_dir %{build_opt}/openeuler/compiler_gn/foundation/distributeddatamgr/relational_store
Name: distributeddatamgr_relational_store
Version: 1.0.0
Release: 3
Summary: Local Relational Data Management from OpenHarmony
License: Apache-2.0
Url: https://gitee.com/openharmony/distributeddatamgr_relational_store
Source1: https://gitee.com/openharmony/distributeddatamgr_relational_store/repository/archive/OpenHarmony-v3.2-Release.tar.gz#/distributeddatamgr_relational_store-OpenHarmony-v3.2-Release.tar.gz
Source2: bundle.json
Source3: appdatafwk.BUILD.gn
Source4: dataability.BUILD.gn
Source5: share.adapter.BUILD.gn
Source6: rdb.BUILD.gn
Patch1: 0001-remove-useless-dependencies.patch
Patch2: 0002-establish-relational-store-dependence-on-boundscheck.patch
BuildRequires: libboundscheck, libicu-devel, libxml2-devel
BuildRequires: distributed-build, hilog, commonlibrary_c_utils
BuildRequires: communication_ipc, communication_dsoftbus
BuildRequires: distributeddatamgr_kv_store
Requires: libboundscheck, libxml2-devel, libicu-devel
Requires: hilog, commonlibrary_c_utils
Requires: systemabilitymgr_safwk, systemabilitymgr_samgr
Requires: communication_ipc, communication_dsoftbus
Requires: 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}/*
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 %{distributeddata_dir}
if [ -d "%{distributeddata_dir}/relational_store" ]; then
rm -rf %{distributeddata_dir}/relational_store
fi
mv %{distributeddata_dir}/%{name}-%{oh_version} %{distributeddata_dir}/relational_store
%patch -P1 -p1 -d %{distributeddata_dir}/relational_store
%patch -P2 -p1 -d %{_builddir}/foundation
%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
%define appdatafwk_dir %{bundle_dir}/interfaces/inner_api/appdatafwk
%define dataability_dir %{bundle_dir}/interfaces/inner_api/dataability
%define share_adapter_dir %{bundle_dir}/interfaces/inner_api/rdb_data_share_adapter
%define rdb_dir %{bundle_dir}/interfaces/inner_api/rdb
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
cp %{SOURCE2} %{buildroot}%{bundle_dir}
cp %{SOURCE3} %{buildroot}%{appdatafwk_dir}/BUILD.gn
cp %{SOURCE4} %{buildroot}%{dataability_dir}/BUILD.gn
cp %{SOURCE5} %{buildroot}%{share_adapter_dir}/BUILD.gn
cp %{SOURCE6} %{buildroot}%{rdb_dir}/BUILD.gn
%ifarch aarch64
%define lib_out_path out/openeuler/linux_clang_arm64/distributeddatamgr/relational_store
%define header_out_path out/openeuler/innerkits/linux-arm64/relational_store
%endif
%ifarch x86_64
%define lib_out_path out/openeuler/linux_clang_x86_64/distributeddatamgr/relational_store
%define header_out_path out/openeuler/innerkits/linux-x86_64/relational_store
%endif
install -m 0755 %{_builddir}/%{lib_out_path}/*.so %{buildroot}/%{_libdir}
install -m 0755 %{_builddir}/%{lib_out_path}/*.so %{buildroot}/system/lib64/
find %{_builddir}/%{header_out_path} -name *.h -print0 | xargs -0 -i cp -rf {} %{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
%files
%{_libdir}/*.so
%{_includedir}/relational_store/*
%{bundle_dir}/*
/system/*
%changelog
* Tue Nov 21 2023 Peng He <hepeng68@huawei.com> - 1.0.0-3
- Update build requires and requires.
* 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

12
rdb.BUILD.gn Normal file
View 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
share.adapter.BUILD.gn Normal file
View 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" ]
}