diff --git a/0.3.0.tar.gz b/0.3.0.tar.gz new file mode 100644 index 0000000..70f6a7a Binary files /dev/null and b/0.3.0.tar.gz differ diff --git a/Kmesh.spec b/Kmesh.spec new file mode 100644 index 0000000..ff5155e --- /dev/null +++ b/Kmesh.spec @@ -0,0 +1,103 @@ +%global debug_package %{nil} + +Name: Kmesh +Version: 0.3.0 +Release: 1 +Summary: %{name} is a eBPF-based service mesh kernel solution +License: ASL 2.0 +URL: https://gitee.com/openeuler/%{name} +Source0: %{version}.tar.gz + +BuildRequires: make pkgconf dracut +BuildRequires: protobuf protobuf-c protobuf-c-devel +BuildRequires: golang >= 1.16 +BuildRequires: clang >= 10.0.1 llvm >= 10.0.1 +BuildRequires: libbpf-devel kernel-devel >= 5.10 +BuildRequires: libboundscheck +BuildRequires: uname-build-checks + +Requires: bpftool +Requires: libbpf +Requires: libboundscheck + +%description +%{name} is a eBPF-based service mesh kernel solution. + +ExclusiveArch: x86_64 + +%prep +%autosetup -n %{name}-%{version} -p1 + +%build +cd %{_builddir}/%{name}-%{version} +./build.sh -b + +%install +mkdir -p %{buildroot}%{_bindir} +install %{_builddir}/%{name}-%{version}/kmesh-daemon %{buildroot}%{_bindir} +install %{_builddir}/%{name}-%{version}/kmesh-cmd %{buildroot}%{_bindir} +install %{_builddir}/%{name}-%{version}/build/kmesh-start-pre.sh %{buildroot}%{_bindir} +install %{_builddir}/%{name}-%{version}/build/kmesh-stop-post.sh %{buildroot}%{_bindir} + +mkdir -p %{buildroot}/usr/lib64 +install %{_builddir}/%{name}-%{version}/bpf/deserialization_to_bpf_map/libkmesh_deserial.so %{buildroot}/usr/lib64 +install %{_builddir}/%{name}-%{version}/api/v2-c/libkmesh_api_v2_c.so %{buildroot}/usr/lib64 + +mkdir -p %{buildroot}/lib/modules/kmesh +install %{_builddir}/%{name}-%{version}/kernel/ko/kmesh.ko %{buildroot}/lib/modules/kmesh + +mkdir -p %{buildroot}/%{_sysconfdir}/kmesh +install %{_builddir}/%{name}-%{version}/config/kmesh.json %{buildroot}/%{_sysconfdir}/kmesh + +mkdir -p %{buildroot}/usr/lib/systemd/system +install %{_builddir}/%{name}-%{version}/build/kmesh.service %{buildroot}/usr/lib/systemd/system + +%check +cd %{_builddir}/%{name}-%{version} +#make +#make test + +%post +echo "installing ..." +ln -sf /lib/modules/kmesh/kmesh.ko /lib/modules/`uname -r` +depmod -a + +%preun +if [ "$1" == "1" ]; then + systemctl status kmesh | grep "active (running)" + if [ "$?" == "0" ]; then + systemctl restart kmesh.service + fi +else + systemctl stop kmesh.service +fi + +%postun +if [ "$1" -ne "1" ]; then + rm -rf /lib/modules/`uname -r`/kmesh.ko +fi +depmod -a + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%attr(0550,root,root) %{_bindir}/kmesh-daemon +%attr(0550,root,root) %{_bindir}/kmesh-cmd + +%attr(0500,root,root) /usr/lib64/libkmesh_deserial.so +%attr(0500,root,root) /usr/lib64/libkmesh_api_v2_c.so + +%attr(0550,root,root) %dir /lib/modules/kmesh +%attr(0440,root,root) /lib/modules/kmesh/kmesh.ko + +%attr(0750,root,root) %dir %{_sysconfdir}/kmesh +%config(noreplace) %attr(0640,root,root) %{_sysconfdir}/kmesh/kmesh.json +%config(noreplace) %attr(0640,root,root) /usr/lib/systemd/system/kmesh.service +%attr(0550,root,root) /usr/bin/kmesh-start-pre.sh +%attr(0550,root,root) /usr/bin/kmesh-stop-post.sh + +%changelog +* Mon Jul 31 2023 JofDiamonds - 0.3.0-1 +- init package diff --git a/README.en.md b/README.en.md deleted file mode 100644 index b85c88c..0000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# Kmesh - -#### Description -Kmesh (kernel mesh) is a data plane software for service grids. It is dedicated to providing infrastructure for service communication and service governance for cloud applications, provides better latency and noise floor performance. - -#### 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 9873f75..0000000 --- a/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# Kmesh - -#### 介绍 -Kmesh (kernel mesh) is a data plane software for service grids. It is dedicated to providing infrastructure for service communication and service governance for cloud applications, provides better latency and noise floor performance. - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -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/)