diff --git a/sysTrace-1.0.tar.gz b/sysTrace-1.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..0a2142a72e0b32a51d760a6c4f073388fc8a3e8f Binary files /dev/null and b/sysTrace-1.0.tar.gz differ diff --git a/sysTrace.spec b/sysTrace.spec new file mode 100644 index 0000000000000000000000000000000000000000..a4f217f549ed58c1a6f41237a8408d2507659e52 --- /dev/null +++ b/sysTrace.spec @@ -0,0 +1,83 @@ +%global debug_package %{nil} +%global _enable_debug_packages 0 +Name: sysTrace +Version: 1.0 +Release: 1%{?dist} +Summary: System Tracing Library with Fail Slow Detection +License: GPLv2 AND MulanPSL2 +URL: https://gitee.com/src-openeuler/sysTrace +Source0: %{name}-%{version}.tar.gz + +BuildRequires: gcc-c++ cmake make +BuildRequires: python3-devel python3-setuptools +BuildRequires: boost-devel abseil-cpp-devel openssl-devel +BuildRequires: protobuf-devel protobuf-compiler jsoncpp-devel protobuf-c protobuf-c-devel +BuildRequires: libunwind-devel + +%description +sysTrace is a system tracing library that provides low-level system +tracing capabilities for debugging and performance analysis, bundled +with fail slow detection module. + +%package -n sysTrace-failslow +Summary: Fail Slow Detection for AI Model Training and Inference +Requires: python3-pyyaml python3-joblib python3-numpy +Requires: python3-matplotlib python3-pandas python3-scikit-learn +Requires: procps-ng + +%description -n sysTrace-failslow +Fail slow detection module for A-Ops project, providing detection +capabilities for AI model training and inference scenarios. + +%prep +%setup -q -n %{name}-%{version} + +%build +cd sysTrace +bash build.sh +cd .. + +cd sysTrace-failslow +%py3_build +cd .. + +%install +install -d -m 755 %{buildroot}%{_libdir} +install -m 755 sysTrace/build/libsysTrace.so %{buildroot}%{_libdir}/ + +install -d -m 755 %{buildroot}%{_sysconfdir}/systrace/config +install -m 644 sysTrace-failslow/config/*.json %{buildroot}%{_sysconfdir}/systrace/config/ + +cd sysTrace-failslow +%py3_install +cd .. + +%pre -n sysTrace-failslow +getent group systrace >/dev/null || groupadd -r systrace +getent passwd systrace >/dev/null || \ + useradd -r -g systrace -d /var/lib/systrace -s /sbin/nologin \ + -c "System Trace Service Account" systrace + +%post -n sysTrace-failslow +%systemd_post systrace-failslow.service + +%preun -n sysTrace-failslow +%systemd_preun systrace-failslow.service + +%postun -n sysTrace-failslow +%systemd_postun_with_restart sysTrace-failslow.service + +%files +%{_libdir}/libsysTrace.so + +%files -n sysTrace-failslow +%doc sysTrace-failslow/README.md +%{_bindir}/systrace-failslow +%config(noreplace) %{_sysconfdir}/systrace/config/*.json +%{python3_sitelib}/failslow/ +%{python3_sitelib}/systrace_failslow-*.egg-info +%{_unitdir}/systrace-failslow.service + +%changelog +* Wed May 14 2025 liwei <1289113577@qq.com> - 1.0-1 +- Initial package for sysTrace