Skip to content

Commit 2d540df

Browse files
author
Packit Build
committed
update spec as per rust packaging best practices
added bcond , builrequires: systemd-rpm-macros , checks, cargo_install_lib
1 parent 025b6e4 commit 2d540df

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

greenboot-rs.spec

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
1-
%global __cargo_is_lib() false
1+
%bcond_with check
2+
%global cargo_install_lib 0
23
%global pkgname greenboot
34

45
Name: greenboot-rs
56
Version: 0.16.0
6-
Release: 3%{?dist}
7+
Release: 4%{?dist}
78
Summary: Generic Health Check Framework for systemd
89
License: (Apache-2.0 OR MIT) AND BSD-3-Clause
910
URL: https://github.com/fedora-iot/greenboot-rs
1011
Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.gz
1112

1213
ExcludeArch: s390x i686 %{power64}
1314

14-
%if 0%{?centos} && !0%{?eln}
15-
BuildRequires: rust-toolset
16-
%else
17-
BuildRequires: rust-packaging
18-
%endif
15+
BuildRequires: cargo-rpm-macros
1916
BuildRequires: systemd-rpm-macros
2017

2118

@@ -59,13 +56,16 @@ This package adds some default healthchecks for greenboot.
5956
%cargo_prep
6057

6158
%generate_buildrequires
62-
%cargo_generate_buildrequires -a
59+
%cargo_generate_buildrequires
6360

6461
%build
6562
%cargo_build
6663
%{cargo_license_summary}
6764
%{cargo_license} > LICENSE.dependencies
6865

66+
%check
67+
%cargo_test -f test-remount "--" "--test-threads=1"
68+
6969
%install
7070
%cargo_install
7171
mkdir -p %{buildroot}%{_libexecdir}
@@ -137,6 +137,9 @@ install -DpZm 0644 usr/lib/systemd/system/greenboot-healthcheck.service.d/10-net
137137
%{_unitdir}/greenboot-healthcheck.service.d/10-network-online.conf
138138

139139
%changelog
140+
* Mon Aug 25 2025 Sayan Paul <saypaul@redhat.com> - 0.16.0-4
141+
- Adding rust packaging best practices
142+
140143
* Fri Aug 15 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 0.16.0-3
141144
- Various spec file cleanups
142145

0 commit comments

Comments
 (0)