eagle/eagle.spec

148 lines
5.1 KiB
RPMSpec
Raw Normal View History

Name: eagle
2024-11-04 18:54:17 +08:00
Version: 1.1.0
Release: 6
Summary: eagle kit
2023-03-12 16:28:23 +08:00
License: Mulan PSL v2
URL: https://gitee.com/openeuler/eagle
Source0: eagle-mpctool.tar.gz
2024-11-04 18:54:17 +08:00
Source1: eagle-1.1.0.tar.gz
BuildRequires: gcc, make, cmake, powerapi-devel, numactl-devel
Requires: powerapi, numactl-libs, tar
2023-03-12 16:28:23 +08:00
%description
2024-11-04 18:54:17 +08:00
EAGLE(Energy Aware intelliGent scheduler) is a service for dynamically tuning the OS based on energy efficiency.
2023-03-12 16:28:23 +08:00
%define debug_package %{nil}
%package -n python3-eagle-mpctool
Summary: Python3 package for python-ealge-mpctool
2023-03-12 16:28:23 +08:00
BuildRequires: python3-devel python3-setuptools
Requires: python3-numpy python3-pandas python3-psutil python3-scipy ipmitool
2023-03-12 16:28:23 +08:00
%description -n python3-eagle-mpctool
2023-03-12 16:28:23 +08:00
%prep
2024-11-04 18:54:17 +08:00
%setup -n mpctool -b 0 -T
%setup -n eagle -b 1 -T
2023-03-12 16:28:23 +08:00
%build
2024-11-04 18:54:17 +08:00
cd %{_builddir}/mpctool
2023-03-12 16:28:23 +08:00
%py3_build
2024-11-04 18:54:17 +08:00
cd %{_builddir}/eagle
sh ./build.sh
2023-03-12 16:28:23 +08:00
%install
2024-11-04 18:54:17 +08:00
cd %{_builddir}/mpctool
2023-03-12 16:28:23 +08:00
%py3_install
2024-11-04 18:54:17 +08:00
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
2023-03-12 16:28:23 +08:00
%files -n python3-eagle-mpctool
2023-03-12 16:28:23 +08:00
%defattr(-,root,root)
%{_bindir}/mpctool
/usr/lib/systemd/system/mpctool.service
%{python3_sitelib}/*
%changelog
* Mon Dec 9 2024 heppen<hepeng68@huawei.com> - 1.1.0-6
- Bug fix: spelling errors of freq_service and idle_service
2024-11-04 18:54:17 +08:00
* 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
2023-03-12 16:28:23 +08:00
- First Release