!1 add stalld source package and spec file

From: @duyiwei7w 
Reviewed-by: @duguhaotian, @yangzhao_kl 
Signed-off-by: @yangzhao_kl
This commit is contained in:
openeuler-ci-bot 2022-02-17 02:25:05 +00:00 committed by Gitee
commit 5c819d7709
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 55 additions and 0 deletions

BIN
stalld-1.14.1.tar.bz2 Normal file

Binary file not shown.

55
stalld.spec Normal file
View File

@ -0,0 +1,55 @@
Name: stalld
Version: 1.14.1
Release: 1
Summary: Daemon that finds starving tasks and gives them a temporary boost
License: GPLv2
URL: https://gitlab.com/rt-linux-tools/%{name}.git
Source0: https://gitlab.com/rt-linux-tools/%{name}/-/archive/v%{version}/%{name}-%{version}.tar.bz2
BuildRequires: glibc-devel
BuildRequires: gcc
BuildRequires: make
BuildRequires: systemd
Requires: systemd
%description
The stalld program monitors the set of system threads,
looking for threads that are ready-to-run but have not
been given processor time for some threshold period.
When a starving thread is found, it is given a temporary
boost using the SCHED_DEADLINE policy. The default is to
allow 10 microseconds of runtime for 1 second of clock time.
%prep
%autosetup
%build
%make_build CFLAGS="%{optflags} %{build_cflags} -DVERSION="\\\"%{version}\\\""" LDFLAGS="%{build_ldflags}"
%install
%make_install DOCDIR=%{_docdir} MANDIR=%{_mandir} BINDIR=%{_bindir} DATADIR=%{_datadir} VERSION=%{version}
%make_install -C redhat UNITDIR=%{_unitdir}
%files
%{_bindir}/%{name}
%{_bindir}/throttlectl
%{_unitdir}/%{name}.service
%config(noreplace) %{_sysconfdir}/sysconfig/stalld
%doc %{_docdir}/README.md
%doc %{_mandir}/man8/stalld.8*
%license gpl-2.0.txt
%post
%systemd_post %{name}.service
%preun
%systemd_preun %{name}.service
%postun
%systemd_postun_with_restart %{name}.service
%changelog
* Mon Jan 24 2022 duyiwei <duyiwei@kylinos.cn> - 1.14.1-1
- Package init