!201 collect module adapt to the 5.10 kernel
From: @zhuofeng6 Reviewed-by: @znzjugod Signed-off-by: @znzjugod
This commit is contained in:
commit
ced9047bda
210013
collect-module-adapt-to-the-5.10-kernel.patch
Normal file
210013
collect-module-adapt-to-the-5.10-kernel.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@
|
|||||||
Summary: System Inspection Framework
|
Summary: System Inspection Framework
|
||||||
Name: sysSentry
|
Name: sysSentry
|
||||||
Version: 1.0.2
|
Version: 1.0.2
|
||||||
Release: 28
|
Release: 29
|
||||||
License: Mulan PSL v2
|
License: Mulan PSL v2
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Source0: https://gitee.com/openeuler/sysSentry/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
Source0: https://gitee.com/openeuler/sysSentry/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
||||||
@ -38,12 +38,15 @@ Patch25: set-logrotate.patch
|
|||||||
Patch26: hbm_online_repair-add-unload-driver.patch
|
Patch26: hbm_online_repair-add-unload-driver.patch
|
||||||
Patch27: add-pyxalarm-and-pySentryNotify-add-multi-users-supp.patch
|
Patch27: add-pyxalarm-and-pySentryNotify-add-multi-users-supp.patch
|
||||||
Patch28: adapt_5.10_kenel_for_syssentry.patch
|
Patch28: adapt_5.10_kenel_for_syssentry.patch
|
||||||
|
Patch29: collect-module-adapt-to-the-5.10-kernel.patch
|
||||||
|
|
||||||
BuildRequires: cmake gcc-c++
|
BuildRequires: cmake gcc-c++
|
||||||
BuildRequires: python3 python3-setuptools
|
BuildRequires: python3 python3-setuptools
|
||||||
BuildRequires: json-c-devel
|
BuildRequires: json-c-devel
|
||||||
BuildRequires: chrpath
|
BuildRequires: chrpath
|
||||||
|
BuildRequires: elfutils-devel clang libbpf-devel bpftool
|
||||||
Requires: libxalarm = %{version}
|
Requires: libxalarm = %{version}
|
||||||
|
Requires: libbpf
|
||||||
|
|
||||||
%description
|
%description
|
||||||
sysSentry provides framework tools for system inspection.
|
sysSentry provides framework tools for system inspection.
|
||||||
@ -74,6 +77,13 @@ Recommends: ipmitool
|
|||||||
%description -n cpu_sentry
|
%description -n cpu_sentry
|
||||||
This package provides CPU fault detection
|
This package provides CPU fault detection
|
||||||
|
|
||||||
|
%package -n pysentry_collect
|
||||||
|
Summary: Supports collect in python immplementation
|
||||||
|
Requires: sysSentry = %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n pysentry_collect
|
||||||
|
This package provides Supports collect for plugins
|
||||||
|
|
||||||
%package -n hbm_online_repair
|
%package -n hbm_online_repair
|
||||||
Summary: hbm_online_repair for the sysSentry
|
Summary: hbm_online_repair for the sysSentry
|
||||||
Provides: hbm_online_repair = %{version}
|
Provides: hbm_online_repair = %{version}
|
||||||
@ -108,6 +118,10 @@ pushd src/c/hbm_online_repair
|
|||||||
make
|
make
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
pushd src/c/ebpf_collector
|
||||||
|
make
|
||||||
|
popd
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# sysSentry
|
# sysSentry
|
||||||
mkdir -p %{buildroot}%{_bindir}
|
mkdir -p %{buildroot}%{_bindir}
|
||||||
@ -119,6 +133,7 @@ install -d -m 700 %{buildroot}/etc/sysSentry/tasks/
|
|||||||
install -d -m 700 %{buildroot}/etc/sysSentry/plugins/
|
install -d -m 700 %{buildroot}/etc/sysSentry/plugins/
|
||||||
install -m 600 config/inspect.conf %{buildroot}%{_sysconfdir}/sysSentry
|
install -m 600 config/inspect.conf %{buildroot}%{_sysconfdir}/sysSentry
|
||||||
install -m 600 service/sysSentry.service %{buildroot}%{_unitdir}
|
install -m 600 service/sysSentry.service %{buildroot}%{_unitdir}
|
||||||
|
install -m 755 src/c/ebpf_collector/ebpf_collector %{buildroot}%{_bindir}
|
||||||
|
|
||||||
# rasdaemon
|
# rasdaemon
|
||||||
install config/tasks/rasdaemon.mod %{buildroot}/etc/sysSentry/tasks/
|
install config/tasks/rasdaemon.mod %{buildroot}/etc/sysSentry/tasks/
|
||||||
@ -131,6 +146,10 @@ install -d %{buildroot}%{_includedir}/xalarm
|
|||||||
install -m 600 service/xalarmd.service %{buildroot}%{_unitdir}
|
install -m 600 service/xalarmd.service %{buildroot}%{_unitdir}
|
||||||
install -m 644 src/libso/xalarm/register_xalarm.h %{buildroot}%{_includedir}/xalarm/register_xalarm.h
|
install -m 644 src/libso/xalarm/register_xalarm.h %{buildroot}%{_includedir}/xalarm/register_xalarm.h
|
||||||
|
|
||||||
|
# sentryCollector
|
||||||
|
install -m 600 config/collector.conf %{buildroot}%{_sysconfdir}/sysSentry
|
||||||
|
install -m 600 service/sentryCollector.service %{buildroot}%{_unitdir}
|
||||||
|
|
||||||
# cpu sentry
|
# cpu sentry
|
||||||
install config/tasks/cpu_sentry.mod %{buildroot}/etc/sysSentry/tasks/
|
install config/tasks/cpu_sentry.mod %{buildroot}/etc/sysSentry/tasks/
|
||||||
install config/plugins/cpu_sentry.ini %{buildroot}/etc/sysSentry/plugins/cpu_sentry.ini
|
install config/plugins/cpu_sentry.ini %{buildroot}/etc/sysSentry/plugins/cpu_sentry.ini
|
||||||
@ -167,6 +186,8 @@ if [ "$1" = "0" ]; then
|
|||||||
systemctl disable xalarmd.service
|
systemctl disable xalarmd.service
|
||||||
systemctl stop sysSentry.service
|
systemctl stop sysSentry.service
|
||||||
systemctl disable sysSentry.service
|
systemctl disable sysSentry.service
|
||||||
|
systemctl stop sentryCollector.service
|
||||||
|
systemctl disable sentryCollector.service
|
||||||
fi
|
fi
|
||||||
rm -rf /var/run/xalarm | :
|
rm -rf /var/run/xalarm | :
|
||||||
rm -rf /var/run/sysSentry | :
|
rm -rf /var/run/sysSentry | :
|
||||||
@ -181,6 +202,7 @@ rm -rf %{buildroot}
|
|||||||
%defattr(0550,root,root)
|
%defattr(0550,root,root)
|
||||||
%attr(0550,root,root) %{python3_sitelib}/xalarm
|
%attr(0550,root,root) %{python3_sitelib}/xalarm
|
||||||
%attr(0550,root,root) %{python3_sitelib}/syssentry
|
%attr(0550,root,root) %{python3_sitelib}/syssentry
|
||||||
|
%attr(0550,root,root) %{python3_sitelib}/sentryCollector
|
||||||
|
|
||||||
# sysSentry
|
# sysSentry
|
||||||
%attr(0500,root,root) %{_bindir}/sentryctl
|
%attr(0500,root,root) %{_bindir}/sentryctl
|
||||||
@ -192,12 +214,22 @@ rm -rf %{buildroot}
|
|||||||
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/inspect.conf
|
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/inspect.conf
|
||||||
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/tasks/rasdaemon.mod
|
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/tasks/rasdaemon.mod
|
||||||
%attr(0600,root,root) %{_unitdir}/sysSentry.service
|
%attr(0600,root,root) %{_unitdir}/sysSentry.service
|
||||||
|
%attr(0755,root,root) %{_bindir}/ebpf_collector
|
||||||
|
|
||||||
# xalarm
|
# xalarm
|
||||||
%attr(0550,root,root) %{_bindir}/xalarmd
|
%attr(0550,root,root) %{_bindir}/xalarmd
|
||||||
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/xalarm.conf
|
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/xalarm.conf
|
||||||
%attr(0600,root,root) %{_unitdir}/xalarmd.service
|
%attr(0600,root,root) %{_unitdir}/xalarmd.service
|
||||||
|
|
||||||
|
# sentryCollector
|
||||||
|
%attr(0550,root,root) %{_bindir}/sentryCollector
|
||||||
|
%attr(0600,root,root) %{_sysconfdir}/sysSentry/collector.conf
|
||||||
|
%attr(0600,root,root) %{_unitdir}/sentryCollector.service
|
||||||
|
|
||||||
|
# pysentry_collect
|
||||||
|
%exclude %{python3_sitelib}/sentryCollector/collect_plugin.py
|
||||||
|
%exclude %{python3_sitelib}/sentryCollector/__pycache__/collect_plugin*
|
||||||
|
|
||||||
# logrotate
|
# logrotate
|
||||||
%dir %{_localstatedir}/lib/logrotate-syssentry
|
%dir %{_localstatedir}/lib/logrotate-syssentry
|
||||||
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/logrotate-sysSentry.conf
|
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/logrotate-sysSentry.conf
|
||||||
@ -238,7 +270,17 @@ rm -rf %{buildroot}
|
|||||||
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/tasks/hbm_online_repair.mod
|
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/tasks/hbm_online_repair.mod
|
||||||
%attr(0550,root,root) %{python3_sitelib}/syssentry/bmc_alarm.py
|
%attr(0550,root,root) %{python3_sitelib}/syssentry/bmc_alarm.py
|
||||||
|
|
||||||
|
%files -n pysentry_collect
|
||||||
|
%attr(0550,root,root) %{python3_sitelib}/sentryCollector/collect_plugin.py
|
||||||
|
%attr(0550,root,root) %{python3_sitelib}/sentryCollector/__pycache__/collect_plugin*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Jan 26 2025 zhuofeng <zhuofeng2@huawei.com> - 1.0.2-29
|
||||||
|
- Type:bugfix
|
||||||
|
- CVE:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:collect module adapt to the 5.10 kernel
|
||||||
|
|
||||||
* Fri Jan 24 2025 jinsaihang <jinsaihang@h-partners.com> - 1.0.2-28
|
* Fri Jan 24 2025 jinsaihang <jinsaihang@h-partners.com> - 1.0.2-28
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- CVE:NA
|
- CVE:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user