## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 9; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Generated by rust2rpm 27 %bcond check 1 %global crate rd-agent %global selinuxtype targeted %bcond selinux 1 Name: rust-rd-agent Version: 2.2.5 Release: %autorelease Summary: Management agent for resctl-demo License: Apache-2.0 URL: https://crates.io/crates/rd-agent Source: %{crates_source} # Used as a data file by rd-agent for the compile sideload Source: https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.8.11.tar.xz # Manually created patch for downstream crate metadata changes # * bump enum-iterator to 2.0 # * allow procfs 0.17: # https://github.com/facebookexperimental/resctl-demo/pull/326 Patch: rd-agent-fix-metadata.diff # https://github.com/facebookexperimental/resctl-demo/commit/f65eedf9017332255ef0a48649664c26b45b9c07 Patch: rd-agent-enum-iterator.patch # SELinux policy Source10: %{crate}.fc Source11: %{crate}.if Source12: %{crate}.te BuildRequires: cargo-rpm-macros >= 24 %if %{with selinux} BuildRequires: selinux-policy-devel %endif %global _description %{expand: Management agent for resctl-demo.} %description %{_description} %package -n %{crate} Summary: %{summary} # (MIT OR Apache-2.0) AND Unicode-DFS-2016 # 0BSD # 0BSD OR MIT OR Apache-2.0 # Apache-2.0 # Apache-2.0 OR BSL-1.0 # Apache-2.0 OR MIT # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT # BSD-2-Clause OR Apache-2.0 OR MIT # MIT # MIT OR Apache-2.0 # MIT OR Zlib OR Apache-2.0 # Unlicense OR MIT License: 0BSD AND Apache-2.0 AND MIT AND Unicode-DFS-2016 AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (MIT OR Zlib OR Apache-2.0) AND (Unlicense OR MIT) # LICENSE.dependencies contains a full license breakdown %if %{with selinux} Requires: (%{crate}-selinux if selinux-policy-%{selinuxtype}) %endif Recommends: rd-hashd = %{version} Recommends: %{crate}-data = %{version}-%{release} Recommends: bcc Recommends: fio Recommends: oomd Recommends: stress Recommends: tar Recommends: wget Recommends: xz %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE %license LICENSE.dependencies %doc README.md %{_bindir}/rd-agent %attr(2775, root, wheel) %dir %{_sharedstatedir}/resctl-demo %package -n %{crate}-data Summary: Data files for %{crate} BuildArch: noarch %description -n %{crate}-data This package contains data files for %{crate}. %files -n %{crate}-data %{_datadir}/resctl-demo %if %{with selinux} %package -n %{crate}-selinux Summary: SELinux policy for %{crate} BuildArch: noarch Requires: selinux-policy-%{selinuxtype} Requires(post): selinux-policy-%{selinuxtype} %{?selinux_requires} %description -n %{crate}-selinux This package contains the SELinux policy for %{crate}. %pre -n %{crate}-selinux %selinux_relabel_pre -s %{selinuxtype} %post -n %{crate}-selinux %selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{selinuxtype}/%{crate}.pp.bz2 %selinux_relabel_post -s %{selinuxtype} %postun -n %{crate}-selinux if [ $1 -eq 0 ]; then %selinux_modules_uninstall -s %{selinuxtype} %{crate} %selinux_relabel_post -s %{selinuxtype} fi %files -n %{crate}-selinux %{_datadir}/selinux/packages/%{selinuxtype}/%{crate}.pp.* %ghost %verify(not md5 size mtime) %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{crate} %endif %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep %if %{with selinux} mkdir selinux cp -p %{SOURCE10} %{SOURCE11} %{SOURCE12} selinux %endif %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %if %{with selinux} make -C selinux -f %{_datadir}/selinux/devel/Makefile %{crate}.pp bzip2 -9 selinux/%{crate}.pp %endif %install %cargo_install install -Dpm0644 %SOURCE1 %{buildroot}%{_datadir}/resctl-demo/linux.tar.xz mkdir -p %{buildroot}%{_sharedstatedir}/resctl-demo %if %{with selinux} install -Dm0644 selinux/%{crate}.pp.bz2 \ %{buildroot}%{_datadir}/selinux/packages/%{selinuxtype}/%{crate}.pp.bz2 %endif %if %{with check} %check %cargo_test %endif %changelog ## START: Generated by rpmautospec * Thu Dec 05 2024 Benjamin A. Beasley - 2.2.5-9 - Deduplicate the License expression * Thu Dec 05 2024 Benjamin A. Beasley - 2.2.5-8 - Update License * Thu Dec 05 2024 Benjamin A. Beasley - 2.2.5-5 - Allow procfs 0.17 * Sat Jul 20 2024 Fedora Release Engineering - 2.2.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Thu May 23 2024 Fabio Valentini - 2.2.5-3 - Rebuild with Rust 1.78 to fix incomplete debuginfo and backtraces * Thu May 02 2024 Davide Cavalca - 2.2.5-2 - Rebuild for rd-util update * Wed May 01 2024 Davide Cavalca - 2.2.5-1 - Update to 2.2.5; Fixes: RHBZ#2081989, RHBZ#2214221 * Fri Jan 26 2024 Fedora Release Engineering - 2.1.2-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Aug 07 2023 Fabio Valentini - 2.1.2-9 - Regenerate with rust2rpm v24 * Fri Jul 21 2023 Fedora Release Engineering - 2.1.2-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Sat Jan 28 2023 Fabio Valentini - 2.1.2-7 - Rebuild for CVE-2022-24765 and CVE-2022-29187 in libgit2 * Sat Jan 21 2023 Fedora Release Engineering - 2.1.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Sat Jul 23 2022 Fedora Release Engineering - 2.1.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Tue Feb 15 2022 Zbigniew Jędrzejewski-Szmek - 2.1.2-4 - Rebuild with package notes * Fri Jan 21 2022 Fedora Release Engineering - 2.1.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Oct 22 2021 Davide Cavalca - 2.1.2-2 - Build for epel8 * Thu Oct 21 2021 Davide Cavalca - 2.1.2-1 - Initial import; Fixes: RHBZ#1990930 ## END: Generated by rpmautospec