diff --git a/0001-greenboot-grub2-set-counter.service-ensure-boot-is-m.patch b/0001-greenboot-grub2-set-counter.service-ensure-boot-is-m.patch new file mode 100644 index 0000000..1084099 --- /dev/null +++ b/0001-greenboot-grub2-set-counter.service-ensure-boot-is-m.patch @@ -0,0 +1,30 @@ +From 402c6b86eae2fce8c76afd744b7560a0f78e183e Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Thu, 22 Sep 2022 14:00:41 -0700 +Subject: [PATCH] greenboot-grub2-set-counter.service: ensure /boot is mounted + +See https://bugzilla.redhat.com/show_bug.cgi?id=2121944 . As it +stands, this service can actually race with the mounting of +/boot, and fail if it starts before /boot is mounted. Adding +this ensures that doesn't happen. + +Signed-off-by: Adam Williamson +--- + usr/lib/systemd/system/greenboot-grub2-set-counter.service | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/usr/lib/systemd/system/greenboot-grub2-set-counter.service b/usr/lib/systemd/system/greenboot-grub2-set-counter.service +index 5b758c7..72837dc 100644 +--- a/usr/lib/systemd/system/greenboot-grub2-set-counter.service ++++ b/usr/lib/systemd/system/greenboot-grub2-set-counter.service +@@ -12,6 +12,7 @@ Description=Set grub2 boot counter in preparation of upgrade + DefaultDependencies=no + Before=ostree-finalize-staged.service + Conflicts=greenboot-grub2-set-success.service ++RequiresMountsFor=/boot + + [Service] + Type=oneshot +-- +2.37.3 + diff --git a/greenboot.spec b/greenboot.spec index 44e46b7..99ab90d 100644 --- a/greenboot.spec +++ b/greenboot.spec @@ -2,7 +2,7 @@ Name: greenboot Version: 0.15.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Generic Health Check Framework for systemd License: LGPLv2+ @@ -12,6 +12,10 @@ License: LGPLv2+ URL: https://github.com/%{repo_owner}/%{repo_name} Source0: https://github.com/%{repo_owner}/%{repo_name}/archive/%{repo_tag}.tar.g#/%{name}-%{version}.tar.gz +# https://github.com/fedora-iot/greenboot/pull/84 +# https://bugzilla.redhat.com/show_bug.cgi?id=2121944 +# Ensure /boot is mounted before greenboot-grub2-set-counter.service runs +Patch0: 0001-greenboot-grub2-set-counter.service-ensure-boot-is-m.patch ExcludeArch: s390x BuildRequires: systemd-rpm-macros @@ -171,6 +175,9 @@ install -DpZm 0644 etc/greenboot/greenboot.conf %{buildroot}%{_sysconfdir}/%{nam %{_prefix}/lib/%{name}/check/required.d/02_watchdog.sh %changelog +* Fri Sep 23 2022 Adam Williamson - 0.15.2-2 +- Backport PR #84 to fix RHBZ #2121944 + * Thu Sep 08 2022 Peter Robinson - 0.15.2-1 - Update to 0.15.2