diff --git a/sysTrace-1.0.tar.gz b/sysTrace-1.0.tar.gz deleted file mode 100644 index 0a2142a72e0b32a51d760a6c4f073388fc8a3e8f..0000000000000000000000000000000000000000 Binary files a/sysTrace-1.0.tar.gz and /dev/null differ diff --git a/sysTrace-1.1.tar.gz b/sysTrace-1.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..38d1abaa2b7660bb7a62700ba9bae7b30c14b440 Binary files /dev/null and b/sysTrace-1.1.tar.gz differ diff --git a/sysTrace.spec b/sysTrace.spec index a4f217f549ed58c1a6f41237a8408d2507659e52..d23a230cb709a71f0648a6916cdcb4d7301c7d7c 100644 --- a/sysTrace.spec +++ b/sysTrace.spec @@ -1,18 +1,17 @@ %global debug_package %{nil} %global _enable_debug_packages 0 Name: sysTrace -Version: 1.0 -Release: 1%{?dist} +Version: 1.1 +Release: 1 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 +BuildRequires: python3-devel +BuildRequires: libbpf libbpf-devel clang bpftool +BuildRequires: protobuf-devel protobuf-compiler protobuf-c protobuf-c-devel %description sysTrace is a system tracing library that provides low-level system @@ -21,7 +20,7 @@ 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-pyyaml python3-joblib python3-numpy python3-setuptools Requires: python3-matplotlib python3-pandas python3-scikit-learn Requires: procps-ng @@ -29,29 +28,52 @@ Requires: procps-ng Fail slow detection module for A-Ops project, providing detection capabilities for AI model training and inference scenarios. +%package -n sysTrace-mcpserver +Summary: Fail Slow Detection for AI Model Training and Inference By MCP +Requires: %{name}-failslow = %{version}-%{release} +Requires: python3-pyyaml python3-joblib python3-numpy python3-mcp +Requires: python3-matplotlib python3-pandas python3-scikit-learn +Requires: procps-ng + +%description -n sysTrace-mcpserver +The slow failure detection module's MCP function of the A-Ops project + %prep %setup -q -n %{name}-%{version} %build -cd sysTrace +cd systrace bash build.sh cd .. -cd sysTrace-failslow +cd failslow +%py3_build +cd .. + +cd systrace_mcp %py3_build cd .. %install install -d -m 755 %{buildroot}%{_libdir} -install -m 755 sysTrace/build/libsysTrace.so %{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/ +install -d -m 755 %{buildroot}%{_sysconfdir}/systrace/mcp_config +install -m 644 failslow/config/*.json %{buildroot}%{_sysconfdir}/systrace/config/ +install -m 644 systrace_mcp/config/*.json %{buildroot}%{_sysconfdir}/systrace/config/ -cd sysTrace-failslow +cd failslow %py3_install cd .. +cd systrace_mcp +%py3_install +cd ../.. + +install -d -m 750 %{buildroot}/var/lib/systrace +install -d -m 750 %{buildroot}/var/lib/systrace/mcp + %pre -n sysTrace-failslow getent group systrace >/dev/null || groupadd -r systrace getent passwd systrace >/dev/null || \ @@ -60,24 +82,55 @@ getent passwd systrace >/dev/null || \ %post -n sysTrace-failslow %systemd_post systrace-failslow.service +chown -R root:systrace %{_sysconfdir}/systrace/config +chmod 750 %{_sysconfdir}/systrace/config +chown -R root:systrace /var/lib/systrace +chmod 750 /var/lib/systrace + +%post -n sysTrace-mcpserver +%systemd_post systrace-mcpserver.service +chown -R root:systrace %{_sysconfdir}/systrace/mcp_config +chmod 750 %{_sysconfdir}/systrace/mcp_config +chown -R root:systrace /var/lib/systrace/mcp +chmod 750 /var/lib/systrace/mcps %preun -n sysTrace-failslow %systemd_preun systrace-failslow.service +%preun -n sysTrace-mcpserver +%systemd_preun systrace-mcpserver.service + %postun -n sysTrace-failslow -%systemd_postun_with_restart sysTrace-failslow.service +%systemd_postun_with_restart systrace-failslow.service + +%postun -n sysTrace-mcpserver +%systemd_postun_with_restart systrace-mcpserver.service %files %{_libdir}/libsysTrace.so %files -n sysTrace-failslow -%doc sysTrace-failslow/README.md +%doc 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 +%dir %attr(750, root, systrace) /var/lib/systrace + +%files -n sysTrace-mcpserver +%doc systrace_mcp/README.md +%{_bindir}/systrace-mcpserver +%{_bindir}/systrace-openapi +%config(noreplace) %{_sysconfdir}/systrace/config/*.json +%{python3_sitelib}/systrace_mcp/ +%{python3_sitelib}/systrace_mcp-*.egg-info +%{_unitdir}/systrace-mcpserver.service +%dir %attr(750, root, systrace) /var/lib/systrace/mcp %changelog +* Mon Aug 11 2025 houxu - 1.1-1 +- Add sysTrace-mcpserver subpackage with MCP integration + * Wed May 14 2025 liwei <1289113577@qq.com> - 1.0-1 - Initial package for sysTrace