diff --git a/01-boundcheck.patch b/01-boundcheck.patch new file mode 100644 index 0000000000000000000000000000000000000000..b127ece0f7d125052c2e1a068470cd75c9d594d4 --- /dev/null +++ b/01-boundcheck.patch @@ -0,0 +1,80 @@ +diff -crN '--exclude=.git' DCF-1.0.0-org/CMakeLists.txt DCF/CMakeLists.txt +*** DCF-1.0.0-org/CMakeLists.txt 2021-11-30 11:22:45.072192931 +0800 +--- DCF/CMakeLists.txt 2021-11-30 11:36:31.164889527 +0800 +*************** +*** 10,16 **** + set(CJSON_PATH "${DCF_LIBRARY}/cJSON/lib") + set(VERSION_SRC ${PROJECT_SOURCE_DIR}/src/dcf_version.c) + +! set(vpp_libsecurec "securec") + + set(CMAKE_INSTALL_PREFIX $ENV{dcf_install_prefix}) + +--- 10,16 ---- + set(CJSON_PATH "${DCF_LIBRARY}/cJSON/lib") + set(VERSION_SRC ${PROJECT_SOURCE_DIR}/src/dcf_version.c) + +! set(vpp_libsecurec "boundscheck") + + set(CMAKE_INSTALL_PREFIX $ENV{dcf_install_prefix}) + +diff -crN '--exclude=.git' DCF-1.0.0-org/src/dcf_interface.c DCF/src/dcf_interface.c +*** DCF-1.0.0-org/src/dcf_interface.c 2021-11-30 11:22:45.080193015 +0800 +--- DCF/src/dcf_interface.c 2021-11-30 11:37:16.053362085 +0800 +*************** +*** 38,44 **** + #include "elc_stream.h" + #include "util_perf_stat.h" + #include "cm_ip.h" +! #include "cJSON.h" + #include "util_profile_stat.h" + #include "stream.h" + #include "cb_func.h" +--- 38,44 ---- + #include "elc_stream.h" + #include "util_perf_stat.h" + #include "cm_ip.h" +! #include "cjson/cJSON.h" + #include "util_profile_stat.h" + #include "stream.h" + #include "cb_func.h" +diff -crN '--exclude=.git' DCF-1.0.0-org/src/metadata/metadata.c DCF/src/metadata/metadata.c +*** DCF-1.0.0-org/src/metadata/metadata.c 2021-11-30 11:22:45.080193015 +0800 +--- DCF/src/metadata/metadata.c 2021-11-30 11:37:34.153552633 +0800 +*************** +*** 32,38 **** + #include "md_stream.h" + #include "md_param.h" + #include "md_store.h" +! #include "cJSON.h" + + #ifdef __cplusplus + extern "C" { +--- 32,38 ---- + #include "md_stream.h" + #include "md_param.h" + #include "md_store.h" +! #include "cjson/cJSON.h" + + #ifdef __cplusplus + extern "C" { +diff -crN '--exclude=.git' DCF-1.0.0-org/src/utils/util_profile_stat.h DCF/src/utils/util_profile_stat.h +*** DCF-1.0.0-org/src/utils/util_profile_stat.h 2021-11-30 11:22:45.084193057 +0800 +--- DCF/src/utils/util_profile_stat.h 2021-11-30 11:37:25.201458391 +0800 +*************** +*** 37,43 **** + #include "cm_num.h" + #include "cm_latch.h" + #include "cm_file.h" +! #include "cJSON.h" + + + #define MAX_ITEM_COUNT 100 +--- 37,43 ---- + #include "cm_num.h" + #include "cm_latch.h" + #include "cm_file.h" +! #include "cjson/cJSON.h" + + + #define MAX_ITEM_COUNT 100 diff --git a/DCF-1.0.0.tar.gz b/DCF-1.0.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..22052d6194293da55e5f3e038f95d032bc1b85ee Binary files /dev/null and b/DCF-1.0.0.tar.gz differ diff --git a/README.en.md b/README.en.md deleted file mode 100644 index ca7896a958b94231c560b0310b4aa3183edf440a..0000000000000000000000000000000000000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# opengauss-dcf - -#### Description -openGauss distributed consensus framework library - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md deleted file mode 100644 index adcc88cb9ba418d779a13546942b0d9f51976b8f..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# opengauss-dcf - -#### 介绍 -openGauss distributed consensus framework library - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 -5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/opengauss-dcf.spec b/opengauss-dcf.spec new file mode 100644 index 0000000000000000000000000000000000000000..37124c63194ee7e05c18f0596fde753d3ff46f3e --- /dev/null +++ b/opengauss-dcf.spec @@ -0,0 +1,44 @@ +Name: DCF +Version: 1.0.0 +Release: 1 +Summary: A distributed consensus framework library +License: MulanPSL-2.0 +URL: https://gitee.com/opengauss/DCF +Source0: %{name}-%{version}.tar.gz + +Patch1: 01-boundcheck.patch + +BuildRequires: cmake gcc gcc-c++ lz4-devel openssl-devel zstd-devel libboundscheck cjson-devel + + +%description +DCF is A distributed consensus framework library for openGauss + + +%prep +%setup -q +%patch1 -p1 + +%build +cmake -DCMAKE_BUILD_TYPE=Release -DUSE32BIT=OFF -DTEST=OFF -DENABLE_EXPORT_API=OFF CMakeLists.txt +%make_build all -s %{?_smp_mflags} + + +%install +mkdir -p %{buildroot}/%{_prefix}/include +mkdir -p %{buildroot}/%{_prefix}/lib +cp src/interface/dcf_interface.h %{buildroot}/%{_prefix}/include +cp output/lib/libdcf.* %{buildroot}/%{_prefix}/lib + +%post + +%preun + +%files +%defattr (-,root,root) +%{_prefix}/include/dcf_interface.h +%{_prefix}/lib/libdcf.so + +%changelog +* Wed Dec 1 2021 zhangxubo - 1.0.0-1 +- Package init diff --git a/opengauss-dcf.yaml b/opengauss-dcf.yaml new file mode 100644 index 0000000000000000000000000000000000000000..cbcb9b436476adf851464a663162a71f7a71e000 --- /dev/null +++ b/opengauss-dcf.yaml @@ -0,0 +1,4 @@ +version_control: gitee +src_repo: opengauss/DCF +tag_prefix: ^libdcf +seperator: .