You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-below/rust-below.spec

108 lines
2.9 KiB

# Generated by rust2rpm 16
%bcond_without check
%global __cargo_skip_build 0
%global crate below
%global forgeurl https://github.com/facebookincubator/below
%global commit 584fdef23f4c7a95a009b84746bb193b68843c1a
Name: rust-%{crate}
Version: 0.2.0
Release: 2%{?dist}
Summary: Interactive tool to view and record historical system data
# Upstream license specification: Apache-2.0
License: ASL 2.0
URL: https://crates.io/crates/below
Source: %{crates_source}
# Bump serde to 1.0.126, tokio to 1.6.1, toml to 0.58, users to 0.11
Patch0: below-fix-metadata.diff
# Fix record_replay_integration test
Patch1: below-fix-tests.patch
# Get these from the repo as they aren't included in the crate
Source1: %{forgeurl}/raw/%{commit}/etc/below.service
Source2: %{forgeurl}/raw/%{commit}/etc/logrotate.conf
Source3: %{forgeurl}/raw/%{commit}/README.md#/README-upstream.md
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging
BuildRequires: systemd-rpm-macros
%global _description %{expand:
below is an interactive tool to view and record historical system data. It has
support for:
- information regarding hardware resource utilization
- viewing the cgroup hierarchy
- cgroup and process information
- pressure stall information (PSI)
- record mode to record system data
- replay mode to replay historical system data
- live mode to view live system data
- dump subcommand to report script-friendly information (e.g. JSON and CSV)
below does not have support for cgroup1.
The name "below" stems from the fact that the below developers rejected many of
atop's design and style decisions.}
%description %{_description}
%package -n %{crate}
Summary: %{summary}
%description -n %{crate} %{_description}
%files -n %{crate}
%license LICENSE
%doc README.md docs
%{_bindir}/%{crate}
%{_unitdir}/%{crate}.service
%{_sysconfdir}/logrotate.d/%{crate}.conf
%dir %{_localstatedir}/log/%{crate}
%post -n %{crate}
%systemd_post %{crate}.service
%preun -n %{crate}
%systemd_preun %{crate}.service
%postun -n %{crate}
%systemd_postun_with_restart %{crate}.service
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%cargo_prep
cp -p %{SOURCE3} README.md
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%install
%cargo_install
install -D -p -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{crate}.service
install -D -p -m0644 %{SOURCE2} \
%{buildroot}%{_sysconfdir}/logrotate.d/%{crate}.conf
install -d -m1777 %{buildroot}%{_localstatedir}/log/%{crate}
%if %{with check}
%check
%cargo_test
%endif
%changelog
* Mon Jun 28 2021 Davide Cavalca <dcavalca@fedoraproject.org> - 0.2.0-2
- Install upstream systemd unit
- Install upstream logrotate config
- Add missing documentation
- Expand the description
* Tue Jun 15 2021 Davide Cavalca <dcavalca@fedoraproject.org> - 0.2.0-1
- Initial package