%global debug_package %{nil} Name: resctl-demo Version: 1.0.0 Release: 2%{?dist} Summary: Demonstrate various features of Linux resource control License: ASL 2.0 URL: https://github.com/facebookexperimental/resctl-demo Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz %if 0%{?el8} %else BuildRequires: cargo >= 1.42 BuildRequires: rust >= 1.42 %endif BuildRequires: ncurses-devel BuildRequires: pkgconfig(dbus-1) >= 1.6 Requires: gnuplot%{?_isa} Recommends: oomd%{?_isa} %description Resource control aims to control compute resource distribution to improve reliability and utilization of a system. The facebook kernel and container teams have been intensively researching and implementing mechanisms and methods to advance resource control. resctl-demo demonstrates and documents various aspects of resource control using self-contained workloads in guided scenarios. %prep %autosetup -p1 %if 0%{?el8} curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal -y %endif # Set codegen-units to 1 echo 'codegen-units = 1' >> Cargo.toml %build export CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_OPT_LEVEL=3 %if 0%{?el8} $HOME/.cargo/bin/cargo build --release %else cargo build --release %endif %install install -Dpm755 target/release/rd-hashd \ -t %{buildroot}%{_bindir}/ install -Dpm755 target/release/rd-agent \ -t %{buildroot}%{_bindir}/ install -Dpm755 target/release/resctl-demo \ -t %{buildroot}%{_bindir}/ strip %{buildroot}%{_bindir}/* %files %license LICENSE %doc README.md %{_bindir}/rd-hashd %{_bindir}/rd-agent %{_bindir}/resctl-demo %changelog * Tue Nov 24 2020 Artem Polishchuk - 1.0.0-1 - Initial package