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

106 lines
2.9 KiB

# Generated by rust2rpm 23
4 years ago
%bcond_without check
%global crate below
%global forgeurl https://github.com/facebookincubator/below
Name: rust-below
Version: 0.6.3
Release: %autorelease
4 years ago
Summary: Interactive tool to view and record historical system data
License: Apache-2.0
4 years ago
URL: https://crates.io/crates/below
Source: %{crates_source}
# Get these from the repo as they aren't included in the crate
Source1: %{forgeurl}/raw/v%{version}/etc/below.service
Source2: %{forgeurl}/raw/v%{version}/etc/logrotate.conf
# Manually created patch for downstream crate metadata changes
# * bump cursive from 0.19.0 to 0.20.0
Patch: below-fix-metadata.diff
# below-config and below-model are not available
ExcludeArch: %{arm32} %{ix86}
BuildRequires: rust-packaging >= 21
BuildRequires: systemd-rpm-macros
4 years ago
%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.}
4 years ago
%description %{_description}
%package -n %{crate}
Summary: %{summary}
License: Apache-2.0 AND (Apache-2.0 OR MIT) AND Unicode-DFS-2016 AND (Apache-2.0 OR BSL-1.0) AND BSD-2-Clause AND (Apache-2.0 OR BSD-3-Clause OR MIT) AND (BSD-2-Clause OR LGPL-2.1) AND MIT AND (MPL-2.0 OR MIT OR Apache-2.0) AND (Unlicense OR MIT)
# LICENSE.dependencies contains a full license breakdown
4 years ago
Recommends: logrotate
4 years ago
%description -n %{crate} %{_description}
%files -n %{crate}
%license LICENSE
%if 0%{?fedora}
%license LICENSE.dependencies
%endif
%doc README.md
%{_bindir}/below
%{_unitdir}/%{crate}.service
%dir %{_sysconfdir}/logrotate.d
%config(noreplace) %{_sysconfdir}/logrotate.d/%{crate}.conf
4 years ago
%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
4 years ago
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
4 years ago
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%if 0%{?fedora}
%{cargo_license} > LICENSE.dependencies
%endif
4 years ago
%install
%cargo_install
install -D -p -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{crate}.service
install -D -p -m0644 %{SOURCE2} \
%{buildroot}%{_sysconfdir}/logrotate.d/%{crate}.conf
4 years ago
install -d -m1777 %{buildroot}%{_localstatedir}/log/%{crate}
%if %{with check}
%check
%cargo_test
%endif
%changelog
%autochangelog