The 0.15.3 release

Resolves: rhbz#2126170

Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
This commit is contained in:
Paul Whalen 2022-11-29 16:42:52 -05:00
parent 7b1535561b
commit 295a8d14d2
4 changed files with 9 additions and 114 deletions

View File

@ -1,46 +0,0 @@
From 2c0ac48ec6fd620816da4e240d9a2310922786d6 Mon Sep 17 00:00:00 2001
From: Antonio Murdaca <runcom@linux.com>
Date: Thu, 8 Sep 2022 14:20:30 +0200
Subject: [PATCH] avoid running checks if conditions aren't met
Signed-off-by: Antonio Murdaca <runcom@linux.com>
---
.../greenboot/check/required.d/01_repository_dns_check.sh | 5 +++++
usr/lib/greenboot/check/required.d/02_watchdog.sh | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/usr/lib/greenboot/check/required.d/01_repository_dns_check.sh b/usr/lib/greenboot/check/required.d/01_repository_dns_check.sh
index f661dcd..51e52b3 100644
--- a/usr/lib/greenboot/check/required.d/01_repository_dns_check.sh
+++ b/usr/lib/greenboot/check/required.d/01_repository_dns_check.sh
@@ -44,6 +44,11 @@ if [[ ! -d $REPOS_DIRECTORY ]]; then
exit 1
fi
+if [ -z "$(ls -A $REPOS_DIRECTORY)" ]; then
+ echo "${REPOS_DIRECTORY} is empty, skipping check"
+ exit 0
+fi
+
get_domain_names_from_platform_urls
if [[ -n $DOMAIN_NAMES ]]; then
get_dns_resolution_from_domain_names
diff --git a/usr/lib/greenboot/check/required.d/02_watchdog.sh b/usr/lib/greenboot/check/required.d/02_watchdog.sh
index 101750d..b072288 100644
--- a/usr/lib/greenboot/check/required.d/02_watchdog.sh
+++ b/usr/lib/greenboot/check/required.d/02_watchdog.sh
@@ -41,6 +41,11 @@ check_if_current_boot_is_wd_triggered() {
fi
}
+if ! check_if_there_is_a_watchdog ; then
+ echo "No watchdog on the system, skipping check"
+ exit 0
+fi
+
# This is in order to test check_if_current_boot_is_wd_triggered
# function within a container
if [ "${1}" != "--source-only" ]; then
--
2.37.3

View File

@ -1,56 +0,0 @@
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

@ -1,8 +1,8 @@
%global debug_package %{nil}
Name: greenboot
Version: 0.15.1
Release: 3%{?dist}
Version: 0.15.3
Release: 1%{?dist}
Summary: Generic Health Check Framework for systemd
License: LGPLv2+
@ -11,9 +11,7 @@ License: LGPLv2+
%global repo_tag v%{version}
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
Patch1: 0001-avoid-running-checks-if-conditions-aren-t-met.patch
Source0: https://github.com/%{repo_owner}/%{repo_name}/archive/%{repo_tag}.tar.gz
ExcludeArch: s390x
BuildRequires: systemd-rpm-macros
@ -52,7 +50,7 @@ Obsoletes: greenboot-update-platforms-check <= 0.12.0
%{summary}.
%prep
%autosetup -p1
%setup -q
%build
@ -91,7 +89,6 @@ install -DpZm 0644 etc/greenboot/greenboot.conf %{buildroot}%{_sysconfdir}/%{nam
%systemd_post greenboot-grub2-set-success.service
%systemd_post greenboot-rpm-ostree-grub2-check-fallback.service
%systemd_post redboot-auto-reboot.service
%systemd_post greenboot-service-monitor.service
%post default-health-checks
%systemd_post greenboot-loading-message.service
@ -106,7 +103,6 @@ install -DpZm 0644 etc/greenboot/greenboot.conf %{buildroot}%{_sysconfdir}/%{nam
%systemd_preun greenboot-grub2-set-counter.service
%systemd_preun greenboot-grub2-set-success.service
%systemd_preun greenboot-rpm-ostree-grub2-check-fallback.service
%systemd_preun greenboot-service-monitor.service
%preun default-health-checks
%systemd_preun greenboot-loading-message.service
@ -121,7 +117,6 @@ install -DpZm 0644 etc/greenboot/greenboot.conf %{buildroot}%{_sysconfdir}/%{nam
%systemd_postun greenboot-grub2-set-counter.service
%systemd_postun greenboot-grub2-set-success.service
%systemd_postun greenboot-rpm-ostree-grub2-check-fallback.service
%systemd_postun greenboot-service-monitor.service
%postun default-health-checks
%systemd_postun greenboot-loading-message.service
@ -162,8 +157,6 @@ install -DpZm 0644 etc/greenboot/greenboot.conf %{buildroot}%{_sysconfdir}/%{nam
%{_unitdir}/greenboot-rpm-ostree-grub2-check-fallback.service
%{_libexecdir}/%{name}/redboot-auto-reboot
%{_unitdir}/redboot-auto-reboot.service
%{_libexecdir}/%{name}/greenboot-service-monitor
%{_unitdir}/greenboot-service-monitor.service
%{_sysconfdir}/%{name}/greenboot.conf
%files default-health-checks
@ -173,6 +166,10 @@ install -DpZm 0644 etc/greenboot/greenboot.conf %{buildroot}%{_sysconfdir}/%{nam
%{_prefix}/lib/%{name}/check/required.d/02_watchdog.sh
%changelog
* Tue Nov 29 2022 Paul Whalen <pwhalen@fedoraproject.org> - 0.15.3-1
- The 0.15.3 release
- revert service-monitor
* Thu Sep 08 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 0.15.1-3
- Avoid running health checks if conditions aren't met

View File

@ -1 +1 @@
SHA512 (greenboot-0.15.1.tar.gz) = 756dd5840ead975082f20defb83489a75b4a3370eaf43a9aa6b7b4dad925597ddf5518e2a0566d1545189bf2e31d2200e626a602433b6a5f5a0d2cb5511dd6d8
SHA512 (v0.15.3.tar.gz) = 8cf8586f84c27f9a5462d8bfe127370059aac0a97170b9cf1793f4d9d40c9e61cae772ec6512b0f01356d6a3a599f7ecc25238ac4d6a14485259b82e8d8b5b49