Skip to content

Commit 025b6e4

Browse files
authored
Spec cleanups (#103)
* spec: fix runtime deps The binaries are in the greenboot package, not greenboot-rs so move the runtime deps to the right location and remove the obsolete deps from the root package. Signed-off-by: Peter Robinson <pbrobinson@gmail.com> * spec: Update spec description Update the package description to something move descriptive. Signed-off-by: Peter Robinson <pbrobinson@gmail.com> * spec: cleanup spec formatting The spec layout/formatting was a complete dog's breakfast so lets clean it up so it's all uniform. Signed-off-by: Peter Robinson <pbrobinson@gmail.com> * spec: Update package name for systemd services Fix the package name of the systemd services so they actually get run. Signed-off-by: Peter Robinson <pbrobinson@gmail.com> * spec: drop unused conditionals, bump release Drop global conditionals we don't use, bump the release. Signed-off-by: Peter Robinson <pbrobinson@gmail.com> * spec: Fix source URL Fix the source URL so the file has identifiable naming. Signed-off-by: Peter Robinson <pbrobinson@gmail.com> * spec: fix up licensing Because rust binaries are statically linked the whole binary has to take into account the combined licenses of all the components that go into making that binary. Add the cargo licensing bits to the package and update the combined license to reflect the output. The healthchecks are just BSD-3-Clause so reflect that in the sub-package. Signed-off-by: Peter Robinson <pbrobinson@gmail.com> --------- Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
1 parent 4504460 commit 025b6e4

1 file changed

Lines changed: 44 additions & 44 deletions

File tree

greenboot-rs.spec

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,58 @@
1-
Name: greenboot-rs
2-
Version: 0.16.0
3-
Release: 2%{?dist}
4-
Summary: Generic Health Check Framework for systemd
5-
License: BSD-3-Clause
6-
7-
%bcond_without check
8-
%global __cargo_skip_build 0
91
%global __cargo_is_lib() false
102
%global pkgname greenboot
113

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

13-
URL: https://github.com/fedora-iot/greenboot-rs
14-
Source0: %{name}-%{version}.tar.gz
15-
16-
ExcludeArch: s390x i686 %{power64}
12+
ExcludeArch: s390x i686 %{power64}
1713

1814
%if 0%{?centos} && !0%{?eln}
19-
BuildRequires: rust-toolset
15+
BuildRequires: rust-toolset
2016
%else
21-
BuildRequires: rust-packaging
17+
BuildRequires: rust-packaging
2218
%endif
23-
BuildRequires: systemd-rpm-macros
19+
BuildRequires: systemd-rpm-macros
2420

25-
%{?systemd_requires}
26-
Requires: systemd >= 240
27-
Requires: bootupd
28-
Requires: rpm-ostree
29-
# PAM is required to programmatically read motd messages from /etc/motd.d/*
30-
# This causes issues with RHEL-8 as the fix isn't there an el8 is on pam-1.3.x
31-
Requires: pam >= 1.4.0
32-
# While not strictly necessary to generate the motd, the main use-case of this package is to display it on SSH login
33-
Recommends: openssh
3421

3522
%description
36-
This is the source package for the Rust implementation of greenboot.
23+
Greenboot is a generic health check framework for systemd allowing
24+
the use of healthchecks to check the state of the system post
25+
upgrade to ensure the system is in a known-good state and to allow
26+
automated rollback actions if it's not.
3727

3828
%package -n %{pkgname}
39-
Summary: %{summary}
29+
Summary: %{summary}
4030
# this replaces the bash version of greenboot
41-
Provides: %{pkgname} = %{version}-%{release}
42-
Obsoletes: %{pkgname} < %{version}-%{release}
43-
Conflicts: %{pkgname} < %{version}-%{release}
44-
Requires: systemd >= 240
45-
Requires: rpm-ostree
46-
Requires: pam >= 1.4.0
47-
Recommends: openssh
31+
Provides: %{pkgname} = %{version}-%{release}
32+
Obsoletes: %{pkgname} < %{version}-%{release}
33+
Conflicts: %{pkgname} < %{version}-%{release}
34+
%{?systemd_requires}
35+
Requires: systemd >= 240
36+
Requires: rpm-ostree
37+
Requires: bootupd
38+
Requires: pam >= 1.4.0
39+
Recommends: openssh
4840

4941
%description -n %{pkgname}
5042

51-
%{summary}.
43+
%{description}.
5244

5345
%package -n %{pkgname}-default-health-checks
54-
Summary: Series of optional and curated health checks
55-
Requires: %{pkgname} = %{version}-%{release}
56-
Requires: util-linux
57-
Requires: jq
46+
Summary: Series of optional and curated health checks
47+
License: BSD-3-Clause
48+
Requires: %{pkgname} = %{version}-%{release}
49+
Requires: util-linux
50+
Requires: jq
5851

5952
%description -n %{pkgname}-default-health-checks
60-
%{summary}.
53+
%{description}.
54+
55+
This package adds some default healthchecks for greenboot.
6156

6257
%prep
6358
%autosetup -n %{name}-%{version}
@@ -68,6 +63,8 @@ Requires: jq
6863

6964
%build
7065
%cargo_build
66+
%{cargo_license_summary}
67+
%{cargo_license} > LICENSE.dependencies
7168

7269
%install
7370
%cargo_install
@@ -94,24 +91,24 @@ install -DpZm 0755 usr/lib/greenboot/check/required.d/* %{buildroot}%{_prefix}/l
9491
install -DpZm 0755 usr/lib/greenboot/check/wanted.d/* %{buildroot}%{_prefix}/lib/%{pkgname}/check/wanted.d
9592
install -DpZm 0644 usr/lib/systemd/system/greenboot-healthcheck.service.d/10-network-online.conf %{buildroot}%{_unitdir}/greenboot-healthcheck.service.d/10-network-online.conf
9693

97-
%post
94+
%post -n %{pkgname}
9895
%systemd_post greenboot-healthcheck.service
9996
%systemd_post greenboot-set-rollback-trigger.service
10097
%systemd_post greenboot-success.target
10198

102-
%preun
99+
%preun -n %{pkgname}
103100
%systemd_preun greenboot-healthcheck.service
104101
%systemd_preun greenboot-set-rollback-trigger.service
105102
%systemd_preun greenboot-success.target
106103

107-
%postun
104+
%postun -n %{pkgname}
108105
%systemd_postun greenboot-healthcheck.service
109106
%systemd_postun greenboot-set-rollback-trigger.service
110107
%systemd_postun greenboot-success.target
111108

112109
%files -n %{pkgname}
110+
%license LICENSE LICENSE.dependencies
113111
%doc README.md
114-
%license LICENSE
115112
%dir %{_libexecdir}/%{pkgname}
116113
%{_libexecdir}/%{pkgname}/%{pkgname}
117114
%{_unitdir}/greenboot-healthcheck.service
@@ -140,10 +137,13 @@ install -DpZm 0644 usr/lib/systemd/system/greenboot-healthcheck.service.d/10-net
140137
%{_unitdir}/greenboot-healthcheck.service.d/10-network-online.conf
141138

142139
%changelog
140+
* Fri Aug 15 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 0.16.0-3
141+
- Various spec file cleanups
142+
143143
* Fri Jul 25 2025 Paul Whalen <pwhalen@fedoraproject.org> - 0.16.0-2
144144
- Update src to greenboot-rs, binaries remain greenboot
145145
- Obsoletes/Conflicts for bash greenboot, Provides greenboot
146146

147147
* Thu Jul 24 2025 Sayan Paul <saypaul@redhat.com> - 0.16.0-1
148148
- Initial Package
149-
- Switched to native Fedora dependencies, removing vendoring.
149+
- Switched to native Fedora dependencies, removing vendoring.

0 commit comments

Comments
 (0)