disable DefaultDependencies to fix cycle error

Resolves: rhbz#2120593

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
This commit is contained in:
Peter Robinson 2022-08-31 16:21:22 +01:00
parent 436e760797
commit ca86d2f5aa
2 changed files with 62 additions and 2 deletions

View File

@ -0,0 +1,56 @@
From 483cff9b89abc30f218f223bef98704639bd08e7 Mon Sep 17 00:00:00 2001
From: Sayan Paul <saypaul@redhat.com>
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

View File

@ -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 <pbrobinson@fedoraproject.org> - 0.15.1-2
- disable DefaultDependencies to fix cycle error
* Tue Aug 09 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 0.15.1-1
- Add conf during installation