oeAware-manager/oeAware-manager.spec
fly_1997 f807f0f894 fix header, spe memory free, cycles sample bugs
(cherry picked from commit f990ed00c3b7ec2393dff9d2eb60da1939e1ff4a)
2024-12-11 19:12:08 +08:00

172 lines
6.1 KiB
RPMSpec

Name: oeAware-manager
Version: v2.0.0
Release: 3
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-remove-old-code.patch
Patch2: 0002-add-data-free-and-fix-unsubscribe-error.patch
Patch3: 0003-fix-failed-to-connect-to-the-sdk-and-command-executi.patch
Patch4: 0004-add-command-verification.patch
Patch5: 0005-modify-C-interface-name-add-enable-count-and-fix-bug.patch
Patch6: 0006-add-one-time-command-collection.patch
Patch7: 0007-fix-bug-free-spe-mem-after-use-data.patch
Patch8: 0008-Adjust-the-header-file-structure.patch
Patch9: 0009-cycles-sample-add-elf-resolve-to-support-d-fot.patch
BuildRequires: cmake make gcc-c++
BuildRequires: boost-devel
BuildRequires: curl-devel
BuildRequires: log4cplus-devel
BuildRequires: yaml-cpp-devel
BuildRequires: gtest-devel gmock-devel
BuildRequires: libboundscheck
%ifarch aarch64
BuildRequires: libkperf libkperf-devel
%endif
BuildRequires: libnl3 libnl3-devel
BuildRequires: numactl-devel
BuildRequires: kernel-devel
Requires: graphviz yaml-cpp curl log4cplus boost systemd libboundscheck
Requires: libnl3 acl
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
%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 -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 0400 ./build/output/plugin/ko/smc_acc.ko %{buildroot}%{_prefix}/lib/smc
%preun
%systemd_preun oeaware.service
%post
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
if ! grep -q "oeaware:" /etc/group; then
groupadd oeaware
fi
%files
%attr(0750, root, root) %{_bindir}/oeaware
%attr(0750, root, root) %{_bindir}/oeawarectl
%attr(0640, root, root) %{_sysconfdir}/oeAware/config.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(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
* 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