oeAware-manager/oeAware-manager.spec
fly_1997 1857f64a9a add analysis args check
(cherry picked from commit 1240b95d6244446cc59e94a46642436a14bbe308)
2025-03-25 20:09:24 +08:00

226 lines
8.1 KiB
RPMSpec

Name: oeAware-manager
Version: v2.0.2
Release: 7
Summary: OeAware is a framework for implementing low-load collection, sensing, and tuning on openEuler.
License: MulanPSL2
URL: https://gitee.com/openeuler/%{name}
Source0: %{name}-%{version}.tar.gz
Patch1: 0001-convert-preload_tune-from-dynamic-library-to-static-.patch
Patch2: 0002-add-analysis-tlb-miss-parameter.patch
Patch3: 0003-update-numafast-version.patch
Patch4: 0004-InfocmdHandler-add-the-display-of-running-status.patch
Patch5: 0005-add-parameter-detection.patch
Patch6: 0006-fix-issues.patch
Patch7: 0007-fix-return-value-type-of-the-function.patch
Patch8: 0008-smc_tune-add-insmod-to-the-whilelist.patch
Patch9: 0009-add-analysis-args-check.patch
BuildRequires: cmake make gcc-c++
BuildRequires: boost-devel
BuildRequires: curl-devel
BuildRequires: log4cplus-devel
BuildRequires: yaml-cpp-devel
BuildRequires: libboundscheck
%ifarch aarch64
BuildRequires: libkperf libkperf-devel
Requires: libkperf
%endif
BuildRequires: libnl3 libnl3-devel
BuildRequires: numactl-devel
BuildRequires: kernel-devel
Requires: graphviz yaml-cpp curl log4cplus boost systemd libboundscheck
Requires: libnl3 acl
Requires: sysstat
Obsoletes: oeAware-collector < v2.0.0
Obsoletes: oeAware-scenario < v2.0.0
Obsoletes: oeAware-tune < v2.0.0
%description
%{name} provides server and client components to manage plugins, which include collectors, scenarios, and tunes.
%package devel
Summary: Development files for plugin of oeaware
Requires: %{name} = %{version}-%{release}
%description devel
Development files for plugin of oeaware
%prep
%autosetup -n %{name}-%{version} -p1
%build
sh build.sh -k --release
%install
#install server
install -D -m 0750 build/output/bin/oeaware %{buildroot}%{_bindir}/oeaware
install -D -m 0750 build/output/bin/oeawarectl %{buildroot}%{_bindir}/oeawarectl
install -D -m 0640 config.yaml %{buildroot}%{_sysconfdir}/oeAware/config.yaml
install -D -m 0640 info_cmd.yaml %{buildroot}%{_sysconfdir}/oeAware/info_cmd.yaml
install -D -m 0640 preload.yaml %{buildroot}%{_sysconfdir}/oeAware/preload.yaml
install -D -p -m 0644 oeaware.service %{buildroot}%{_unitdir}/oeaware.service
#install plugin
mkdir -p %{buildroot}%{_libdir}/oeAware-plugin/
mkdir -p %{buildroot}%{_includedir}/oeaware/data
install -dm 0755 %{buildroot}%{_prefix}/lib/smc
install -b -m740 ./build/output/plugin/lib/*.so %{buildroot}%{_libdir}/oeAware-plugin/
install -b -m740 ./build/output/include/oeaware/*.h %{buildroot}%{_includedir}/oeaware
install -b -m740 ./build/output/include/oeaware/data/*.h %{buildroot}%{_includedir}/oeaware/data
install -b -m740 ./build/output/sdk/liboeaware-sdk.so %{buildroot}%{_libdir}
install -D -m 0640 ./build/output/plugin/lib/thread_scenario.conf %{buildroot}%{_libdir}/oeAware-plugin/
install -D -m 0640 ./build/output/plugin/lib/ub_tune.conf %{buildroot}%{_libdir}/oeAware-plugin/
install -D -m 0640 ./build/output/plugin/lib/xcall.yaml %{buildroot}%{_libdir}/oeAware-plugin/
install -D -m 0640 ./build/output/plugin/lib/smc_acc.yaml %{buildroot}%{_libdir}/oeAware-plugin/
install -D -m 0400 ./build/output/plugin/ko/smc_acc.ko %{buildroot}%{_prefix}/lib/smc
%preun
%systemd_preun oeaware.service
%post
if ! grep -q "oeaware:" /etc/group; then
groupadd oeaware
setfacl -m g:oeaware:r /usr/lib64/liboeaware-sdk.so
fi
systemctl start oeaware.service
chcon -t modules_object_t %{_prefix}/lib/smc/smc_acc.ko >/dev/null 2>&1
exit 0
%posttrans
. /etc/os-release || :
if [ "${VERSION}" == "22.03 (LTS-SP4)" ]; then
systemctl enable oeaware.service
fi
%files
%attr(0750, root, root) %{_bindir}/oeaware
%attr(0750, root, root) %{_bindir}/oeawarectl
%attr(0640, root, root) %{_sysconfdir}/oeAware/config.yaml
%attr(0640, root, root) %{_sysconfdir}/oeAware/info_cmd.yaml
%attr(0640, root, root) %{_sysconfdir}/oeAware/preload.yaml
%attr(0644, root, root) %{_unitdir}/oeaware.service
%attr(0640, root, root) %{_libdir}/oeAware-plugin/ub_tune.conf
%attr(0640, root, root) %{_libdir}/oeAware-plugin/thread_scenario.conf
%attr(0640, root, root) %{_libdir}/oeAware-plugin/xcall.yaml
%attr(0640, root, root) %{_libdir}/oeAware-plugin/smc_acc.yaml
%attr(0400, root, root) %{_prefix}/lib/smc/smc_acc.ko
%attr(0440, root, root) %{_libdir}/oeAware-plugin/*.so
%attr(0440, root, root) %{_libdir}/liboeaware-sdk.so
%files devel
%attr(0644, root, root) %{_includedir}/oeaware/*.h
%attr(0644, root, root) %{_includedir}/oeaware/data/*.h
%changelog
* Tue Mar 25 2025 fly_1997 <flylove7@outlook.com> -v2.0.2-7
- add analysis args check
* Mon Mar 24 2025 fly_1997 <flylove7@outlook.com> -v2.0.2-6
- fix smc insmod error
* Wed Mar 19 2025 fly_1997 <flylove7@outlook.com> -v2.0.2-5
- add smc_acc.yaml
- fix type error
* Sat Mar 15 2025 fly_1997 <flylove7@outlook.com> -v2.0.2-4
- use double for analysis tlb parameters
- if an error occurs during smc config loading, smc_tune fails to be enabled
- remove unused instance
* Tue Mar 11 2025 fly_1997 <flylove7@outlook.com> -v2.0.2-3
- add parameter detection
* Sat Mar 8 2025 fly_1997 <flylove7@outlook.com> -v2.0.2-2
- add analysis tlb parameter
- update numafast version
* Mon Feb 24 2025 fly_1997 <flylove7@outlook.com> -v2.0.2-1
- add hugepage detection report
- add transparent hugepage, preload tune instances
- add plugin info
* Mon Dec 30 2024 fly_1997 <flylove7@outlook.com> -v2.0.1-3
- fix config load error
- fix memory leak
- fix access nullptr instance
- update build.sh
* Wed Dec 18 2024 fly_1997 <flylove7@outlook.com> -v2.0.1-2
- fix smc type error
- fix cpu burst unsubscribe problem
- add pmu check
* Wed Dec 11 2024 LHesperus <liuchanggeng@huawei.com> -v2.0.1-1
- add some document
- fix bug : spe period dynamic changes
- fix bug : analysis client not work
- fix bug : cpuburst exit error
- adapt : seep tune , steal task tune, xcall tune
* Fri Dec 6 2024 fly_1997 <flylove7@outlook.com> -v2.0.0-3
- adjust the header file structure
- fix cycles sample, spe memory free
- add one time command collection
* Mon Dec 2 2024 fly_1997 <flylove7@outlook.com> -v2.0.0-2
- fix data free, plugin display, command plugin bugs
- add oeaware group
* Wed Nov 20 2024 LHesperus <liuchanggeng@huawei.com> -v2.0.0-1
- merge the plugin repository into this repository
- add oeaware sdk library
- new interface of plugin : replace the ringbuf data with subscribe
- add new plugin : system info, command collector, xcall
* Thu Sep 5 2024 fly_1997 <flylove7@outlook.com> -v1.0.2-4
- update numafast version
* Mon Jul 8 2024 fly_1997 <flylove7@outlook.com> -v1.0.2-3
- add automatic startup based on the version
- fix coredump when process exits
- modify logger mode to append
* Thu Jun 27 2024 fly_1997 <flylove7@outlook.com> -v1.0.2-2
- add enable automatic startup
* Thu Jun 20 2024 fly_1997 <flylove7@outlook.com> -v1.0.2-1
- update version to v1.0.2-1
* Fri Jun 14 2024 fly_1997 <flylove7@outlook.com> -v1.0.1-6
- fix dependency error and add enable failed logs
- fix dependency disabled failed and pre-enable illegal plugin
* Wed Jun 12 2024 fly_1997 <flylove7@outlook.com> -v1.0.1-5
- add Requires
* Wed Jun 5 2024 fly_1997 <flylove7@outlook.com> -v1.0.1-4
- add dynamic dependencncy adjustment
* Fri May 31 2024 fly_1997 <flylove7@outlook.com> -v1.0.1-3
- refactor instance interfaces and add signal function
* Wed May 15 2024 fly_1997 <flylove7@outlook.com> -v1.0.1-2
- fix pre-enable failed, dependencies missing error, memory leak
- fix warning message
* Sat May 11 2024 fly_1997 <flylove7@outlook.com> -v1.0.1-1
- update version to v1.0.1
* Wed May 8 2024 fly_1997 <flylove7@outlook.com> -v1.0.0-5
- fix systemd service uninstallation issue
- fix load error and args parsing error printing
* Mon May 6 2024 fly_1997 <flylove7@outlook.com> -v1.0.0-4
- add logs, modify sock file permission and serivce file
* Mon Apr 29 2024 fly_1997 <flylove7@outlook.com> -v1.0.0-3
- add error description, refactor, and fix bugs
* Sun Apr 28 2024 huangwenhua <huangwenhua@kylinos.cn> -v1.0.0-2
- Add Requires:graphviz
* Thu Apr 18 2024 fly_1997 <flylove7@outlook.com> -v1.0.0-1
- Package init