From f6937d26ebe5bb51142257ad11110d890ed382d0 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Wed, 31 Aug 2022 13:03:19 +0100 Subject: [PATCH] disable DefaultDependencies to fix cycle error --- ...faultDependencies-to-fix-cycle-error.patch | 56 +++++++++++++++++++ greenboot.spec | 8 ++- 2 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 0001-disable-DefaultDependencies-to-fix-cycle-error.patch diff --git a/0001-disable-DefaultDependencies-to-fix-cycle-error.patch b/0001-disable-DefaultDependencies-to-fix-cycle-error.patch new file mode 100644 index 0000000..88e4c0d --- /dev/null +++ b/0001-disable-DefaultDependencies-to-fix-cycle-error.patch @@ -0,0 +1,56 @@ +From 483cff9b89abc30f218f223bef98704639bd08e7 Mon Sep 17 00:00:00 2001 +From: Sayan Paul +Date: Mon, 29 Aug 2022 22:33:06 +0530 +Subject: [PATCH] disable DefaultDependencies to fix cycle error + +The fix relaxes the dependecies of task-runner and status service that +otherwise causes issue in the service to start as well as missing +logs +signed off: saypaul@fedoraproject.org +--- + usr/lib/systemd/system/greenboot-grub2-set-success.service | 2 ++ + usr/lib/systemd/system/greenboot-status.service | 1 + + usr/lib/systemd/system/greenboot-task-runner.service | 2 ++ + 3 files changed, 5 insertions(+) + +diff --git a/usr/lib/systemd/system/greenboot-grub2-set-success.service b/usr/lib/systemd/system/greenboot-grub2-set-success.service +index f5ef55a..87a7a61 100644 +--- a/usr/lib/systemd/system/greenboot-grub2-set-success.service ++++ b/usr/lib/systemd/system/greenboot-grub2-set-success.service +@@ -11,6 +11,8 @@ + Description=Mark boot as successful in grubenv + Requires=boot-complete.target + After=boot-complete.target ++Conflicts=redboot.target ++DefaultDependencies=no + + [Service] + Type=oneshot +diff --git a/usr/lib/systemd/system/greenboot-status.service b/usr/lib/systemd/system/greenboot-status.service +index b12ec2f..f52c183 100644 +--- a/usr/lib/systemd/system/greenboot-status.service ++++ b/usr/lib/systemd/system/greenboot-status.service +@@ -12,6 +12,7 @@ Description=greenboot MotD Generator + After=greenboot-healthcheck.service + After=greenboot-task-runner.service + After=redboot-task-runner.service ++DefaultDependencies=no + + [Service] + Type=oneshot +diff --git a/usr/lib/systemd/system/greenboot-task-runner.service b/usr/lib/systemd/system/greenboot-task-runner.service +index d1fc07f..bf5e94b 100644 +--- a/usr/lib/systemd/system/greenboot-task-runner.service ++++ b/usr/lib/systemd/system/greenboot-task-runner.service +@@ -11,6 +11,8 @@ + Description=greenboot Success Scripts Runner + Requires=boot-complete.target + After=boot-complete.target ++Conflicts=redboot.target ++DefaultDependencies=no + + [Service] + Type=oneshot +-- +2.37.2 + diff --git a/greenboot.spec b/greenboot.spec index b1a928f..04e846b 100644 --- a/greenboot.spec +++ b/greenboot.spec @@ -2,7 +2,7 @@ Name: greenboot Version: 0.15.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Generic Health Check Framework for systemd License: LGPLv2+ @@ -12,6 +12,7 @@ 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 +Patch0: 0001-disable-DefaultDependencies-to-fix-cycle-error.patch ExcludeArch: s390x BuildRequires: systemd-rpm-macros @@ -50,7 +51,7 @@ Obsoletes: greenboot-update-platforms-check <= 0.12.0 %{summary}. %prep -%setup -q +%autosetup -p1 %build @@ -171,6 +172,9 @@ install -DpZm 0644 etc/greenboot/greenboot.conf %{buildroot}%{_sysconfdir}/%{nam %{_prefix}/lib/%{name}/check/required.d/02_watchdog.sh %changelog +* Wed Aug 31 2022 Peter Robinson - 0.15.1-2 +- disable DefaultDependencies to fix cycle error + * Tue Aug 09 2022 Peter Robinson - 0.15.1-1 - Add conf during installation