|
1 | | -%global __cargo_is_lib() false |
| 1 | +%bcond_with check |
| 2 | +%global cargo_install_lib 0 |
2 | 3 | %global pkgname greenboot |
3 | 4 |
|
4 | 5 | Name: greenboot-rs |
5 | 6 | Version: 0.16.0 |
6 | | -Release: 3%{?dist} |
| 7 | +Release: 4%{?dist} |
7 | 8 | Summary: Generic Health Check Framework for systemd |
8 | 9 | License: (Apache-2.0 OR MIT) AND BSD-3-Clause |
9 | 10 | URL: https://github.com/fedora-iot/greenboot-rs |
10 | 11 | Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.gz |
11 | 12 |
|
12 | 13 | ExcludeArch: s390x i686 %{power64} |
13 | 14 |
|
14 | | -%if 0%{?centos} && !0%{?eln} |
15 | | -BuildRequires: rust-toolset |
16 | | -%else |
17 | | -BuildRequires: rust-packaging |
18 | | -%endif |
| 15 | +BuildRequires: cargo-rpm-macros |
19 | 16 | BuildRequires: systemd-rpm-macros |
20 | 17 |
|
21 | 18 |
|
@@ -59,13 +56,16 @@ This package adds some default healthchecks for greenboot. |
59 | 56 | %cargo_prep |
60 | 57 |
|
61 | 58 | %generate_buildrequires |
62 | | -%cargo_generate_buildrequires -a |
| 59 | +%cargo_generate_buildrequires |
63 | 60 |
|
64 | 61 | %build |
65 | 62 | %cargo_build |
66 | 63 | %{cargo_license_summary} |
67 | 64 | %{cargo_license} > LICENSE.dependencies |
68 | 65 |
|
| 66 | +%check |
| 67 | +%cargo_test -f test-remount "--" "--test-threads=1" |
| 68 | + |
69 | 69 | %install |
70 | 70 | %cargo_install |
71 | 71 | mkdir -p %{buildroot}%{_libexecdir} |
@@ -137,6 +137,9 @@ install -DpZm 0644 usr/lib/systemd/system/greenboot-healthcheck.service.d/10-net |
137 | 137 | %{_unitdir}/greenboot-healthcheck.service.d/10-network-online.conf |
138 | 138 |
|
139 | 139 | %changelog |
| 140 | +* Mon Aug 25 2025 Sayan Paul <saypaul@redhat.com> - 0.16.0-4 |
| 141 | +- Adding rust packaging best practices |
| 142 | + |
140 | 143 | * Fri Aug 15 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 0.16.0-3 |
141 | 144 | - Various spec file cleanups |
142 | 145 |
|
|
0 commit comments