160 lines
5.5 KiB
RPMSpec
160 lines
5.5 KiB
RPMSpec
Name: eagle
|
||
Version: 1.1.0
|
||
Release: 7
|
||
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}
|
||
|
||
%package -n python3-eagle-mpctool
|
||
Summary: Python3 package for python-ealge-mpctool
|
||
BuildRequires: python3-devel python3-setuptools
|
||
Requires: python3-numpy python3-pandas python3-psutil python3-scipy ipmitool
|
||
|
||
%description -n python3-eagle-mpctool
|
||
|
||
|
||
%prep
|
||
%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
|
||
if [ "$1" -eq 1 ] || [ ! -d /home/eagle ]; then
|
||
id eagle &>/dev/null || useradd -m eagle
|
||
fi
|
||
|
||
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 || :
|
||
|
||
# 仅在真正卸载($1==0)时才删除用户
|
||
if [ "$1" -eq 0 ]; then
|
||
if id eagle &>/dev/null; then
|
||
userdel -r eagle
|
||
fi
|
||
fi
|
||
|
||
%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)
|
||
%{_bindir}/mpctool
|
||
/usr/lib/systemd/system/mpctool.service
|
||
%{python3_sitelib}/*
|
||
|
||
%changelog
|
||
* Wed May 14 2025 heppen<hepeng68@huawei.com> - 1.1.0-7
|
||
- Bug fix: Unable to delete eagle user after upgrade
|
||
|
||
* Mon Dec 9 2024 heppen<hepeng68@huawei.com> - 1.1.0-6
|
||
- Bug fix: spelling errors of freq_service and idle_service
|
||
|
||
* Mon Oct 21 2024 jinye<jinye10@huawei.com> - 1.1.0-5
|
||
- Bug fix: Fix bug config interval should greater than five
|
||
|
||
* Mon Oct 21 2024 jinye<jinye10@huawei.com> - 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<hepeng68@huawei.com> - 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<hepeng68@huawei.com> - 1.1.0-2
|
||
- Change eagle.service path to /usr/lib/systemd/system
|
||
- Add libidle_service.so to eagle
|
||
|
||
* Mon May 20 2024 heppen<hepeng68@huawei.com> - 1.1.0-1
|
||
- Update to 1.1.0: add eagle bin and libs.
|
||
|
||
* Sat Mar 9 2024 queyanwen<queyanwen@huawei.com> - 1.0.1-4
|
||
- Adapts to 920B: sleeps for 2 seconds after the fan speed is set.
|
||
|
||
* Thu Nov 30 2023 queyanwen<queyanwen@huawei.com> - 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.
|
||
- In addition, the average fuzzy processing in five windows is used to prevent data jitter.
|
||
- When the entire system can obtain the CPU power consumption data, the obtained CPU power consumption
|
||
- is directly used during training, instead of obtaining the CPU power consumption by inferring.
|
||
|
||
* Mon Jun 12 2023 queyanwen<queyanwen@huawei.com> - 1.0.1-2
|
||
- Optimize the accuracy of non-steady-state data prediction and training.
|
||
- The anbient temperature check is added befor the collection is started. If the temperature is
|
||
- greater than 28°C, the collection will not be started.
|
||
|
||
* Mon May 29 2023 queyanwen<queyanwen@huawei.com> - 1.0.1-1
|
||
- Added the handling of overtemperature scenarios of system components during data collection.
|
||
|
||
* Wed Mar 15 2023 queyanwen<queyanwen@huawei.com> - 1.0.0-1
|
||
- First Release
|