9 Star 0 Fork 5

src-openEuler/secDetector

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
secDetector.spec 6.25 KB
一键复制 编辑 原始数据 按行查看 历史
%global debug_package %{nil}
%define kernel_version %(ver=`rpm -qa|grep kernel-devel`;echo ${ver#*kernel-devel-})
Name : secDetector
Summary : OS Security Intrusion Detection System
Version : 1.0
Release : 14
License : GPL-2.0
Source0 : %{name}-v%{version}.tar.gz
BuildRequires: kernel-devel kernel-headers
BuildRequires: gcc gcc-c++ clang cmake make
BuildRequires: libbpf-devel bpftool
BuildRequires: grpc-devel grpc-plugins protobuf-devel c-ares-devel libuuid-devel
Requires : kernel
Requires : protobuf grpc libuuid libbpf
Patch0001: Backport-fix-report-api-function.patch
Patch0002: Backport-service-fix-power_of_2-bug.patch
Patch0003: Backport-check-value-for-topic.patch
Patch0004: Backport-fix-printf-error-in-main.cpp.patch
Patch0005: Backport-fix-system-crash-caused-by-registration-exception.patch
Patch0006: Backport-fix-register-kpobe-mutiple-times.patch
Patch0007: Backport-rm-kmodule_list-in-mc-and-fix-param-ringbuf-desc.patch
Patch0008: Backport-fix-memory-leak-bug-in-sc-analyze-unit.patch
Patch0009: Backport-fix-bug-of-mc-case-not-collect-data.patch
Patch0010: Backport-del-useless-code-for-timestamp.patch
Patch0011: Backport-modify-for-getting-common-info-in-createfile.patch
Patch0012: Backport-fix-memleak-bug-in-secDetector_program_action.patch
Patch0013: Backport-fix-timestamp-memleak.patch
Patch0014: Backport-add-handle-cleanup-and-refactor-Subscribe-UnSubscrib.patch
Patch0015: Backport-lib-modify-for-unsub.patch
Patch0016: Backport-add-nullptr-check-in-Subscribe.patch
Patch0017: Backport-modify-for-multiple-sub-in-the-same-process.patch
Patch0018: Backport-creatfile-check-op-intent-value.patch
Patch0019: Backport-createfile-check-f_mode-and-fix-typo.patch
Patch0021: Backport-add-lock-limit-publish-API.patch
Patch0022: Backport-secDetectord-fix-a-grpc-hang-bug.patch
Patch0023: Backport-secUnsub-del-topic.patch
Patch0024: Backport-secUnsub-del-topic-in-README.patch
Patch0025: Backport-modify-for-code-review.patch
Patch0026: Backport-modify-for-secReadFrom-error.patch
Patch0027: Backport-fix-invalid-TUF-8-data-in-memory-corruption-module.patch
Patch0028: Backport-set-cmake-minimum-required-to-VERSION-3.22.patch
Patch0029: Backport-grpc-fix-coredump-in-Publish.patch
Patch0030: Backport-fix-the-memory-leak-in-collect-unit.patch
Patch0031: Backport-fix-memory-leak-in-program_action.patch
Patch0032: Backport-bug-fix-memory-leak-in-sc-analyze-unit.patch
Patch0033: Backport-fix-6.x-kernel-compile-error.patch
%description
OS Security Intrusion Detection System
%package devel
Summary : Files for development
%description devel
The secDetector-devel package contains header file for development
%prep
%autosetup -n %{name}-v%{version} -p1
%build
cd kerneldriver/core
sed -i 's#/lib/modules/$(shell uname -r)/build#/lib/modules/%{kernel_version}/build#' Makefile
make
cd ../cases
sed -i 's#/lib/modules/$(shell uname -r)/build#/lib/modules/%{kernel_version}/build#' Makefile
make
cd ../../
mkdir -p build
cd build
cmake .. && make
%install
mkdir -p $RPM_BUILD_ROOT/lib/modules/%{kernel_version}/extra/secDetector
install -m 600 ./kerneldriver/core/secDetector_core.ko $RPM_BUILD_ROOT/lib/modules/%{kernel_version}/extra/secDetector
install -m 600 ./kerneldriver/cases/secDetector_kmodule_baseline.ko $RPM_BUILD_ROOT/lib/modules/%{kernel_version}/extra/secDetector
install -m 600 ./kerneldriver/cases/secDetector_memory_corruption.ko $RPM_BUILD_ROOT/lib/modules/%{kernel_version}/extra/secDetector
install -m 600 ./kerneldriver/cases/secDetector_program_action.ko $RPM_BUILD_ROOT/lib/modules/%{kernel_version}/extra/secDetector
mkdir -p $RPM_BUILD_ROOT/usr/bin
install -m 700 ./build/observer_agent/secDetectord $RPM_BUILD_ROOT/usr/bin/secDetectord
mkdir -p $RPM_BUILD_ROOT/usr/lib64/secDetector
install -m 700 ./build/lib/libsecDetectorsdk.so $RPM_BUILD_ROOT/usr/lib64/secDetector
mkdir -p $RPM_BUILD_ROOT/usr/include/secDetector
install -m 644 ./lib/secDetector_sdk.h $RPM_BUILD_ROOT/usr/include/secDetector
install -m 644 ./include/secDetector_topic.h $RPM_BUILD_ROOT/usr/include/secDetector
%pre
%post
depmod -a `uname -r`
%preun
%postun
depmod -a
%posttrans
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%attr(0400,root,root) /lib/modules/%{kernel_version}/extra/secDetector/secDetector_core.ko
%attr(0400,root,root) /lib/modules/%{kernel_version}/extra/secDetector/secDetector_kmodule_baseline.ko
%attr(0400,root,root) /lib/modules/%{kernel_version}/extra/secDetector/secDetector_memory_corruption.ko
%attr(0400,root,root) /lib/modules/%{kernel_version}/extra/secDetector/secDetector_program_action.ko
%attr(0700,root,root) /usr/bin/secDetectord
%attr(0500,root,root) /usr/lib64/secDetector/libsecDetectorsdk.so
%files devel
%defattr(-,root,root)
%attr(0644,root,root) /usr/include/secDetector/secDetector_sdk.h
%attr(0644,root,root) /usr/include/secDetector/secDetector_topic.h
%changelog
* Tue Feb 20 2024 hurricane618 <hurricane618@hotmail.com> 1.0-14
- backport patch to fix compile error in v6.6 kernel
* Thu Dec 21 2023 hurricane618 <hurricane618@hotmail.com> 1.0-13
- backport patchs to fix memory
* Thu Dec 14 2023 zcfsite <zhchf2010@126.com> 1.0-12
- fix secReadFrom error,invalid TUF-8 data in mc module,publish coredump
* Mon Dec 11 2023 zhangguangzhi <zhangguangzhi3@huawei.com> 1.0-11
- backport patch
* Mon Dec 11 2023 chenjingwen6 <lhchenjw@gmail.com> 1.0-10
- backport some patches to fix issue such as grpc hangs
* Sat Dec 9 2023 zhangguangzhi <zhangguangzhi3@huawei.com> 1.0-9
- backport some patches
* Tue Dec 05 2023 hurricane618 <hurricane618@hotmail.com> 1.0-8
- backport some patches
* Wed Nov 29 2023 hurricane618 <hurricane618@hotmail.com> 1.0-7
- fix backport patch0001
* Wed Nov 29 2023 zhangguangzhi <zhangguangzhi3@huawei.com> 1.0-6
- backport some patches
* Mon Nov 27 2023 zcfsite <zhchf2010@126.com> 1.0-5
- fix some kerneldriver error
* Wed Nov 22 2023 zhangguangzhi <zhangguangzhi3@huawei.com> 1.0-4
- add patch to check value for topic
* Tue Nov 21 2023 chenjingwen6 <lhchenjw@gmail.com> 1.0-3
- add patch to fix power_of_2 bug
* Sun Nov 19 2023 hurricane618 <hurricane618@hotmail.com> 1.0-2
- add fix patch
* Sat Nov 18 2023 zcfsite <zhchf2010@126.com> 1.0-1
- release v1.0
* Wed Nov 15 2023 zcfsite <zhchf2010@126.com> 0.9-2
- add devel package
* Tue Nov 14 2023 zcfsite <zhchf2010@126.com> 0.9-1
- Init package
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/secDetector.git
git@gitee.com:src-openeuler/secDetector.git
src-openeuler
secDetector
secDetector
master

搜索帮助