sysSentry/sysSentry.spec

212 lines
7.0 KiB
RPMSpec
Raw Normal View History

2024-06-11 14:25:32 +08:00
# Copyright (c) Huawei Technologies Co., Ltd. 2014-2023. All rights reserved.
# Description: spec file for package syssentry
Summary: System Inspection Framework
Name: sysSentry
Version: 1.0.3
Release: 1
2024-06-11 14:25:32 +08:00
License: Mulan PSL v2
Group: System Environment/Daemons
Source0: https://gitee.com/openeuler/sysSentry/releases/download/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: cmake gcc-c++
BuildRequires: python3 python3-setuptools
BuildRequires: json-c-devel
BuildRequires: chrpath
BuildRequires: elfutils-devel clang libbpf-devel bpftool
2024-12-28 11:34:58 +08:00
BuildRequires: python3-numpy python3-pytest
Requires: pyxalarm = %{version}
Requires: libbpf
%define PYTHON_VERSION %{python3_version}
%define PKGVER syssentry-%{version}-py%{PYTHON_VERSION}.egg-info
2024-06-11 14:25:32 +08:00
%description
sysSentry provides framework tools for system inspection.
%package -n libxalarm
Summary: The xalarm library for the sysSentry
Requires: json-c
Provides: libxalarm = %{version}
%description -n libxalarm
This package provides xalarm library for the sysSentry.
%package -n libxalarm-devel
Summary: The development package for the libxalarm
Requires: libxalarm = %{version}
Requires: json-c-devel
Provides: libxalarm-devel = %{version}
%description -n libxalarm-devel
This package provides developer tools for the libxalarm.
%package -n avg_block_io
Summary: Supports slow I/O detection
Requires: sysSentry = %{version}-%{release}
Requires: pysentry_notify = %{version}-%{release}
Requires: pysentry_collect = %{version}-%{release}
%description -n avg_block_io
This package provides Supports slow I/O detection based on EBPF
%package -n ai_block_io
Summary: Supports slow I/O detection
Requires: python3-numpy
Requires: sysSentry = %{version}-%{release}
Requires: pysentry_notify = %{version}-%{release}
Requires: pysentry_collect = %{version}-%{release}
%description -n ai_block_io
This package provides Supports slow I/O detection based on AI
%package -n pyxalarm
Summary: Supports xalarm api in python immplementation
Requires: sysSentry = %{version}-%{release}
%description -n pyxalarm
This package provides Supports xalarm api for users
%package -n pysentry_notify
Summary: Supports xalarm report in python immplementation
Requires: sysSentry = %{version}-%{release}
%description -n pysentry_notify
This package provides Supports xalarm report for plugins
%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
2024-10-26 14:14:27 +08:00
%package -n hbm_online_repair
Summary: hbm_online_repair for the sysSentry
Provides: hbm_online_repair = %{version}
BuildRequires: libtraceevent-devel
Requires: libtraceevent ipmitool
Requires: sysSentry = %{version}-%{release}
%description -n hbm_online_repair
This package provides hbm_online_repair for the sysSentry.
2024-06-11 14:25:32 +08:00
%prep
%autosetup -n %{name}-%{version} -p1
%build
%make_build
2024-10-26 14:14:27 +08:00
2024-06-11 14:25:32 +08:00
%install
%make_install
2024-06-11 14:25:32 +08:00
%post
/sbin/ldconfig
%preun
if [ "$1" = "0" ]; then
systemctl stop xalarmd.service
systemctl disable xalarmd.service
systemctl stop sysSentry.service
systemctl disable sysSentry.service
systemctl stop sentryCollector.service
systemctl disable sentryCollector.service
2024-06-11 14:25:32 +08:00
fi
rm -rf /var/run/xalarm | :
rm -rf /var/run/sysSentry | :
%postun
/sbin/ldconfig
%files
2024-06-11 14:25:32 +08:00
%defattr(0550,root,root)
%attr(0550,root,root) %{python3_sitelib}/xalarm
2024-06-11 14:25:32 +08:00
%attr(0550,root,root) %{python3_sitelib}/syssentry
%attr(0550,root,root) %{python3_sitelib}/%{PKGVER}
%attr(0550,root,root) %{python3_sitelib}/sentryCollector
2024-06-11 14:25:32 +08:00
# sysSentry
%attr(0500,root,root) %{_bindir}/sentryctl
%attr(0550,root,root) %{_bindir}/syssentry
%attr(0550,root,root) %{_bindir}/ebpf_collector
2024-06-11 14:25:32 +08:00
%attr(0750,root,root) %config(noreplace) %{_var}/log/sysSentry
%attr(0750,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/tasks
%attr(0750,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/plugins
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/inspect.conf
%attr(0600,root,root) %{_unitdir}/sysSentry.service
%exclude %{python3_sitelib}/sentryCollector/collect_plugin.py
%exclude %{python3_sitelib}/xalarm/register_xalarm.py
%exclude %{python3_sitelib}/xalarm/sentry_notify.py
%exclude %{python3_sitelib}/syssentry/__pycache__
%exclude %{python3_sitelib}/sentryCollector/__pycache__
%exclude %{python3_sitelib}/xalarm/__pycache__
%exclude %{_sysconfdir}/sysSentry/tasks/ai_block_io.mod
%exclude %{_sysconfdir}/sysSentry/plugins/ai_block_io.ini
%exclude %{_sysconfdir}/sysSentry/tasks/avg_block_io.mod
%exclude %{_sysconfdir}/sysSentry/plugins/avg_block_io.ini
2024-06-11 14:25:32 +08:00
# xalarm
%attr(0550,root,root) %{_bindir}/xalarmd
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/xalarm.conf
%attr(0600,root,root) %{_unitdir}/xalarmd.service
2024-12-11 16:10:45 +08:00
# logrotate
%dir %{_localstatedir}/lib/logrotate-syssentry
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/logrotate-sysSentry.conf
2024-12-11 16:10:45 +08:00
%attr(0500,root,root) %{_sysconfdir}/cron.hourly/logrotate-sysSentry
# sentryCollector
%attr(0550,root,root) %{_bindir}/sentryCollector
%attr(0600,root,root) %{_sysconfdir}/sysSentry/collector.conf
%attr(0600,root,root) %{_unitdir}/sentryCollector.service
2024-10-26 14:14:27 +08:00
%exclude %{_sysconfdir}/sysSentry/tasks/hbm_online_repair.mod
%exclude %{python3_sitelib}/syssentry/bmc_*
%exclude %{python3_sitelib}/syssentry/*/bmc_*
2024-06-11 14:25:32 +08:00
%files -n libxalarm
%attr(0550,root,root) %{_libdir}/libxalarm.so
%files -n libxalarm-devel
%attr(0550,root,root) %{_includedir}/xalarm/register_xalarm.h
%files -n pyxalarm
%attr(0550,root,root) %{python3_sitelib}/xalarm/register_xalarm.py
%files -n pysentry_notify
%attr(0550,root,root) %{python3_sitelib}/xalarm/sentry_notify.py
2024-06-11 14:25:32 +08:00
%files -n avg_block_io
%attr(0500,root,root) %{_bindir}/avg_block_io
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/tasks/avg_block_io.mod
%attr(0600,root,root) %{_sysconfdir}/sysSentry/plugins/avg_block_io.ini
%attr(0550,root,root) %{python3_sitelib}/sentryPlugins/avg_block_io
%exclude %{python3_sitelib}/sentryPlugins/avg_block_io/__pycache__
%files -n ai_block_io
%attr(0500,root,root) %{_bindir}/ai_block_io
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/tasks/ai_block_io.mod
%attr(0600,root,root) %{_sysconfdir}/sysSentry/plugins/ai_block_io.ini
%attr(0550,root,root) %{python3_sitelib}/sentryPlugins/ai_block_io
%exclude %{python3_sitelib}/sentryPlugins/ai_block_io/__pycache__
%files -n pysentry_collect
%attr(0550,root,root) %{python3_sitelib}/sentryCollector/collect_plugin.py
2024-10-26 14:14:27 +08:00
%files -n hbm_online_repair
%attr(0550,root,root) %{_bindir}/hbm_online_repair
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/hbm_online_repair.env
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/tasks/hbm_online_repair.mod
%attr(0550,root,root) %{python3_sitelib}/syssentry/bmc_alarm.py
2024-06-11 14:25:32 +08:00
%changelog
* Mon Jan 20 2025 zhuofeng <zhuofeng2@huawei.com> - 1.0.3-1
2024-09-04 20:16:44 +08:00
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:1.0.3 init