diff --git a/README.en.md b/README.en.md index 6fb7e88212bfa8ff4af89c500fb20aa0ae8f2492..79ce5a44e88d1deeb7cc4e9e15ba40b1e8b07868 100644 --- a/README.en.md +++ b/README.en.md @@ -1,7 +1,7 @@ -# security_dataclassification +# security_dataclassification #### Description -The data transmission management and control module is responsible for providing distributed services with management and control strategies for cross-device transmission. The data transmission control module provides interface definitions related to data transmission control. +{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} #### Software Architecture Software architecture description diff --git a/README.md b/README.md index 8316fc122cc016462be6ae16ca95f63dcf7d1324..be7528722fb963823e5285cf6e9753de378116ed 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ -# security_dataclassification +# security_dataclassification #### 介绍 -The data transmission management and control module is responsible for providing distributed services with management and control strategies for cross-device transmission. The data transmission control module provides interface definitions related to data transmission control. +{**以下是 Gitee 平台说明,您可以替换此简介** +Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 +无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} #### 软件架构 软件架构说明 diff --git a/data_transit_mgr.BUILD.gn b/data_transit_mgr.BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..066f27ed45dbe9dccee51fbfff68acefdd956ddd --- /dev/null +++ b/data_transit_mgr.BUILD.gn @@ -0,0 +1,23 @@ +# 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("datatransmitmgr_config") { + include_dirs = [ "include" ] + libs=["data_transit_mgr.z"] +} + +group("data_transit_mgr") { + public_configs = [ ":datatransmitmgr_config" ] +} diff --git a/data_transit_mgr.bundle.json b/data_transit_mgr.bundle.json new file mode 100644 index 0000000000000000000000000000000000000000..c4974e470484b08d69a847b5ca9ac7121f0c4bf0 --- /dev/null +++ b/data_transit_mgr.bundle.json @@ -0,0 +1,49 @@ +{ + "name": "@ohos/dataclassification", + "description": "data transmission control", + "version": "3.1", + "license": "Apache License 2.0", + "publishAs": "code-segment", + "segment": { + "destPath": "base/security/dataclassification" + }, + "dirs": {}, + "scripts": {}, + "component": { + "name": "dataclassification", + "subsystem": "security", + "syscap": [ + "SystemCapability.Security.DataTransitManager" + ], + "features": [ + "dataclassification_datatransmitmgr" + ], + "adapted_system_type": [ + "standard" + ], + "rom": "50KB", + "ram": "50KB", + "deps": { + "components": [ + "device_security_level", + "hiviewdfx_hilog_native" + ], + "third_party": [] + }, + "build": { + "sub_component": [ + ], + "inner_kits": [ + { + "name": "//base/security/dataclassification/interfaces/innerkits/datatransmitmgr:data_transit_mgr", + "header": { + "header_files": [ + "dev_slinfo_mgr.h" + ], + "header_base": "//base/security/dataclassification/interfaces/innerkits/datatransmitmgr/include" + } + } + ] + } + } +} \ No newline at end of file diff --git a/security_dataclassification.spec b/security_dataclassification.spec new file mode 100644 index 0000000000000000000000000000000000000000..b322e6a03bb2d0e657174599a3ddb708ea97eb01 --- /dev/null +++ b/security_dataclassification.spec @@ -0,0 +1,109 @@ +%define debug_package %{nil} +%global build_opt /opt/distributed-middleware-build +%global oh_version OpenHarmony-v3.2-Release +%global security_path %{_builddir}/base/security +%global third_party_path %{_builddir}/third_party + +Name: security_dataclassification +Version: 1.0.0 +Release: 1%{?dist} +Summary: Data transmission control service +License: Apache-2.0 +URL: https://gitee.com/openharmony/security_device_security_level +Source1: security_dataclassification.tar.gz +Source2: data_transit_mgr.bundle.json +Source3: data_transit_mgr.BUILD.gn + +BuildRequires: gcc, make, hilog, kernel-devel, uname-build-checks +BuildRequires: distributed-build, distributed-beget +BuildRequires: commonlibrary_c_utils +BuildRequires: distributedhardware_device_manager +BuildRequires: notification_eventhandler +BuildRequires: communication_ipc +BuildRequires: security_device_auth, security_huks, security_device_security_level +BuildRequires: systemabilitymgr_safwk, systemabilitymgr_samgr + + +Requires: hilog +Requires: distributed-beget +Requires: commonlibrary_c_utils +Requires: distributedhardware_device_manager +Requires: notification_eventhandler +Requires: communication_ipc +Requires: security_device_auth, security_huks, security_device_security_level +Requires: systemabilitymgr_safwk, systemabilitymgr_samgr + + +%description +The OpenHarmony distributed technology can converge resources from different devices to form a Super Device. Poor security capabilities of any device may threaten the security of the Super Device. The Device Security Level Management (DSLM) module is introduced to manage the security levels of OpenHarmony 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 %{security_path} + + + +# make. +%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}/dataclassification +install -d -m 0755 %{buildroot}/%{_libdir} +install -d -m 0755 %{buildroot}/system/lib64 +install -d -m 0755 %{buildroot}%{build_opt}/openeuler/compiler_gn/base/security/dataclassification/interfaces/innerkits/datatransmitmgr + +%ifarch aarch64 +%define header_out_path out/openeuler/innerkits/linux-arm64/dataclassification +%define module_out_path out/openeuler/linux_clang_arm64/security/dataclassification +%endif +%ifarch x86_64 +%define header_out_path out/openeuler/innerkits/linux-x86_64/dataclassification +%define module_out_path out/openeuler/linux_clang_x86_64/security/dataclassification +%endif + +#cp .so file to /system/lib and /user/lib +install -m 0755 %{_builddir}/%{module_out_path}/*.so %{buildroot}%{_libdir} +install -m 0755 %{_builddir}/%{module_out_path}/*.so %{buildroot}/system/lib64 + +#cp .h file to /usr/include +find %{_builddir}/%{header_out_path} -name *.h -print0 | xargs -0 -i cp -rf {} %{buildroot}%{_includedir}/dataclassification/ + +#cp bundle.json +install -m 0755 %{SOURCE2} %{buildroot}%{build_opt}/openeuler/compiler_gn/base/security/dataclassification/bundle.json + +#cp BUILD.gn +install -m 0755 %{SOURCE3} %{buildroot}%{build_opt}/openeuler/compiler_gn/base/security/dataclassification/interfaces/innerkits/datatransmitmgr/BUILD.gn + +#create soft link +ln -s /usr/include/dataclassification %{buildroot}%{build_opt}/openeuler/compiler_gn/base/security/dataclassification/interfaces/innerkits/datatransmitmgr/include + +# copy ko file to the certain path on deployment environment. +%files +%{_libdir}/*.so +/system/* +%{_includedir}/dataclassification/* +%{build_opt}/* +%changelog +* Mon Nov 6 2023 Jiaqi Zhao - 1.0.0-1 +- Separating the device_security_level component from the master package diff --git a/security_dataclassification.tar.gz b/security_dataclassification.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..651b8fe8315ce9b01390472b5883c6661f81f128 Binary files /dev/null and b/security_dataclassification.tar.gz differ