diff --git a/eagle-1.1.0.tar.gz b/eagle-1.1.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..260477cb5c492891e78b5ab957bf81f9133428e2 Binary files /dev/null and b/eagle-1.1.0.tar.gz differ diff --git a/eagle.spec b/eagle.spec index 3392619ad24672ade7d2a58e4806c03ce6f69a3f..223f9274efc8369dfc3dc2b0cc43a9647056d559 100644 --- a/eagle.spec +++ b/eagle.spec @@ -1,13 +1,16 @@ Name: eagle -Version: 1.0.1 -Release: 4 +Version: 1.1.0 +Release: 5 Summary: eagle kit License: Mulan PSL v2 URL: https://gitee.com/openeuler/eagle Source0: eagle-mpctool.tar.gz - +Source1: eagle-1.1.0.tar.gz +BuildRequires: gcc, make, cmake, powerapi-devel, numactl-devel +Requires: powerapi, numactl-libs, tar %description +EAGLE(Energy Aware intelliGent scheduler) is a service for dynamically tuning the OS based on energy efficiency. %define debug_package %{nil} @@ -20,14 +23,73 @@ Requires: python3-numpy python3-pandas python3-psutil python3-scipy ip %prep -%autosetup -n mpctool -p1 +%setup -n mpctool -b 0 -T +%setup -n eagle -b 1 -T %build +cd %{_builddir}/mpctool %py3_build +cd %{_builddir}/eagle +sh ./build.sh + %install +cd %{_builddir}/mpctool %py3_install +install -d %{buildroot}/%{_sysconfdir}/eagle +install -d %{buildroot}/%{_sysconfdir}/eagle/plugin +install -d %{buildroot}/usr/lib/systemd/system +install -d %{buildroot}/%{_sbindir} +install -d %{buildroot}/%{_libdir} + +cd %{_builddir}/eagle +cp release/eagle/conf/*.ini %{buildroot}/%{_sysconfdir}/eagle +cp eagle.service %{buildroot}/usr/lib/systemd/system/eagle.service +install -m 0755 release/eagle/eagle %{buildroot}/%{_sbindir} +install -m 0755 release/eagle/lib/libpwrapi_adaptor.so %{buildroot}/%{_libdir} +install -m 0755 release/eagle/lib/libfreq_service.so %{buildroot}/%{_sysconfdir}/eagle/plugin +install -m 0755 release/eagle/lib/libmpc_service.so %{buildroot}/%{_sysconfdir}/eagle/plugin +install -m 0755 release/eagle/lib/libsched_service.so %{buildroot}/%{_sysconfdir}/eagle/plugin +install -m 0755 release/eagle/lib/libidle_service.so %{buildroot}/%{_sysconfdir}/eagle/plugin + +%post +useradd -m eagle +chown -R eagle:eagle /etc/eagle +if [ ! -d /var/log/eagle ]; then + mkdir /var/log/eagle + mkdir /var/log/eagle/bak + chown -R eagle:eagle /var/log/eagle +fi + +#Add user "eagle" to POWERAPI list +PWRAPI_CONF_FILE=/etc/sysconfig/pwrapis/pwrapis_config.ini +sed -n '/^admin=/p' $PWRAPI_CONF_FILE | grep eagle > /dev/null +if [ $? -ne 0 ] +then + sed -i '/^admin=/s/$/,eagle/' $PWRAPI_CONF_FILE +fi + +sleep 5 # sleep for 5 seconds to wait for powerapi update admin list. +systemctl start eagle.service + +%preun +systemctl stop eagle.service +systemctl disable eagle.service +userdel -r eagle + +%post -n python3-eagle-mpctool +systemctl start mpctool.service + +%preun -n python3-eagle-mpctool +systemctl stop mpctool.service +systemctl disable mpctool.service + +%files +%{_sysconfdir}/eagle/* +/usr/lib/systemd/system/eagle.service +%{_sbindir}/eagle +%{_libdir}/*.so %files -n python3-eagle-mpctool %defattr(-,root,root) @@ -36,10 +98,33 @@ Requires: python3-numpy python3-pandas python3-psutil python3-scipy ip %{python3_sitelib}/* %changelog +* Mon Oct 21 2024 jinye - 1.1.0-5 +- Bug fix: Fix bug config interval should greater than five + +* Mon Oct 21 2024 jinye - 1.1.0-4 +- Bug fix: Default policy can't restore after stop eagle service +- Bug fix: Some spell bugs +- Bug fix: Modify watt_sched_enable don't take effect +- Bug fix: Set watt_sched_enable as zero SetWattFirstDomain return error +- Reconstruct eagle init and load part + +* Thu Jun 20 2024 heppen - 1.1.0-3 +- Bug fix: Ctrl Auth request on main thread, but release on socket thread. +- Bug fix: Modify policy file but do not take effect. +- Bug fix: IsNumStr returns false when the input string is a negative number. +- Add instructions to the config file. + +* Tue Jun 11 2024 heppen - 1.1.0-2 +- Change eagle.service path to /usr/lib/systemd/system +- Add libidle_service.so to eagle + +* Mon May 20 2024 heppen - 1.1.0-1 +- Update to 1.1.0: add eagle bin and libs. + * Sat Mar 9 2024 queyanwen - 1.0.1-4 - Adapts to 920B: sleeps for 2 seconds after the fan speed is set. -* Thur Nov 30 2023 queyanwen - 1.0.1-3 +* Thu Nov 30 2023 queyanwen - 1.0.1-3 - The current condition for determining whether the system enters the stable state is that - the difference between the maximum temperature and the minimum temperature within 60s is less than 0.2 degrees. - This judgment is too strict and needs to be changed to 2 degrees.