From 420646fe56e5673d2bf0b35805fc1f5e1b2354de Mon Sep 17 00:00:00 2001 From: Christian Glombek Date: Mon, 1 Apr 2019 15:08:30 +0200 Subject: [PATCH] Update to v0.7 Rename ostree-grub2 subpackage to rpm-ostree-grub2 to be more explicit Add auto-update-fallback meta subpackage --- .gitignore | 1 + README.md | 0 greenboot.spec | 101 +++++++++++++++++++++++++++++++++++-------------- sources | 2 +- 4 files changed, 74 insertions(+), 30 deletions(-) mode change 100644 => 100755 .gitignore mode change 100644 => 100755 README.md mode change 100644 => 100755 greenboot.spec mode change 100644 => 100755 sources diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 index 636d237..6a0db00 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /v0.4.tar.gz /v0.5.tar.gz /v0.6.tar.gz +/v0.7.tar.gz diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/greenboot.spec b/greenboot.spec old mode 100644 new mode 100755 index 99ca1a7..c981068 --- a/greenboot.spec +++ b/greenboot.spec @@ -1,5 +1,5 @@ Name: greenboot -Version: 0.6 +Version: 0.7 Release: 1%{?dist} Summary: Generic Health Check Framework for systemd License: LGPLv2+ @@ -19,22 +19,32 @@ Requires: systemd %description %{summary}. +%package auto-update-fallback +Summary: Automatic updates and failure fallback for rpm-ostree-based system +Requires: %{name} = %{version}-%{release} +Requires: %{name}-reboot = %{version}-%{release} +Requires: %{name}-rpm-ostree-grub2 = %{version}-%{release} + +%description auto-update-fallback +%{summary}. + %package status Summary: Message of the Day updater for greenboot Requires: %{name} = %{version}-%{release} +# PAM is required to programatically read motd messages from /etc/motd.d/* Requires: pam >= 1.3.1-15 -Requires: openssh +# While not strictly necessary to generate the motd, the main use-case of this package is to display it on SSH login +Recommends: openssh %description status %{summary}. -%package ostree-grub2 -Summary: Scripts for greenboot on OSTree-based systems using the Grub2 bootloader +%package rpm-ostree-grub2 +Summary: Scripts for greenboot on rpm-ostree-based systems using the Grub2 bootloader Requires: %{name} = %{version}-%{release} Requires: %{name}-grub2 = %{version}-%{release} -Requires: %{name}-reboot = %{version}-%{release} -%description ostree-grub2 +%description rpm-ostree-grub2 %{summary}. %package grub2 @@ -61,45 +71,68 @@ mkdir -p %{buildroot}%{_sysconfdir}/%{name}/check/required.d mkdir %{buildroot}%{_sysconfdir}/%{name}/check/wanted.d mkdir %{buildroot}%{_sysconfdir}/%{name}/green.d mkdir %{buildroot}%{_sysconfdir}/%{name}/red.d -install -Dpm 0755 usr/libexec/greenboot/greenboot %{buildroot}%{_libexecdir}/%{name}/%{name} -install -Dpm 0755 usr/libexec/greenboot/greenboot-status %{buildroot}%{_libexecdir}/%{name}/greenboot-status -install -Dpm 0644 usr/lib/motd.d/boot-status %{buildroot}%{_exec_prefix}/lib/motd.d/boot-status -install -Dpm 0644 usr/lib/systemd/system/greenboot-healthcheck.service %{buildroot}%{_unitdir}/greenboot-healthcheck.service -install -Dpm 0644 usr/lib/systemd/system/greenboot.service %{buildroot}%{_unitdir}/greenboot.service -install -Dpm 0644 usr/lib/systemd/system/redboot.service %{buildroot}%{_unitdir}/redboot.service -install -Dpm 0644 usr/lib/systemd/system/greenboot-status.service %{buildroot}%{_unitdir}/greenboot-status.service -install -Dpm 0755 etc/greenboot/check/required.d/* %{buildroot}%{_sysconfdir}/%{name}/check/required.d -install -Dpm 0755 etc/greenboot/check/wanted.d/* %{buildroot}%{_sysconfdir}/%{name}/check/wanted.d -install -Dpm 0755 etc/greenboot/green.d/* %{buildroot}%{_sysconfdir}/%{name}/green.d -install -Dpm 0755 etc/greenboot/red.d/* %{buildroot}%{_sysconfdir}/%{name}/red.d +mkdir -p %{buildroot}%{_unitdir} +install -DpZm 0755 usr/libexec/greenboot/greenboot %{buildroot}%{_libexecdir}/%{name}/%{name} +install -DpZm 0755 usr/libexec/greenboot/greenboot-grub2-set-counter %{buildroot}%{_libexecdir}/%{name}/greenboot-grub2-set-counter +install -DpZm 0755 usr/libexec/greenboot/greenboot-rpm-ostree-grub2-check-fallback %{buildroot}%{_libexecdir}/%{name}/greenboot-rpm-ostree-grub2-check-fallback +install -DpZm 0755 usr/libexec/greenboot/greenboot-status %{buildroot}%{_libexecdir}/%{name}/greenboot-status +install -DpZm 0644 usr/lib/motd.d/boot-status %{buildroot}%{_exec_prefix}/lib/motd.d/boot-status +install -DpZm 0644 usr/lib/systemd/system/* %{buildroot}%{_unitdir} +install -DpZm 0644 usr/lib/tmpfiles.d/greenboot-status-motd.conf %{buildroot}%{_tmpfilesdir}/greenboot-status-motd.conf +install -DpZm 0755 etc/greenboot/check/required.d/* %{buildroot}%{_sysconfdir}/%{name}/check/required.d +install -DpZm 0755 etc/greenboot/check/wanted.d/* %{buildroot}%{_sysconfdir}/%{name}/check/wanted.d %post -%systemd_post greenboot.service %systemd_post greenboot-healthcheck.service +%systemd_post greenboot.service %systemd_post redboot.service +%systemd_post redboot.target + +%post grub2 +%systemd_post greenboot-grub2-set-counter.service +%systemd_post greenboot-grub2-set-success.service + +%post reboot +%systemd_post redboot-auto-reboot.service + +%post rpm-ostree-grub2 +%systemd_post greenboot-rpm-ostree-grub2-check-fallback.service %post status %systemd_post greenboot-status.service %preun -%systemd_preun greenboot.service %systemd_preun greenboot-healthcheck.service +%systemd_preun greenboot.service %systemd_preun redboot.service +%systemd_preun redboot.target + +%preun grub2 +%systemd_preun greenboot-grub2-set-counter.service +%systemd_preun greenboot-grub2-set-success.service + +%preun rpm-ostree-grub2 +%systemd_preun greenboot-rpm-ostree-grub2-check-fallback.service %preun status %systemd_preun greenboot-status.service %postun -%systemd_postun_with_restart greenboot.service -%systemd_postun_with_restart greenboot-healthcheck.service -%systemd_postun_with_restart redboot.service +%systemd_postun greenboot-healthcheck.service +%systemd_postun greenboot.service +%systemd_postun redboot.service +%systemd_postun redboot.target + +%postun grub2 +%systemd_postun greenboot-grub2-set-counter.service +%systemd_postun greenboot-grub2-set-success.service + +%postun rpm-ostree-grub2 +%systemd_postun greenboot-rpm-ostree-grub2-check-fallback.service %postun status %systemd_postun greenboot-status.service -%check -# TODO - %files %doc README.md %license LICENSE @@ -108,6 +141,7 @@ install -Dpm 0755 etc/greenboot/red.d/* %{buildroot}%{_sysconfdir}/%{name}/red.d %{_unitdir}/greenboot-healthcheck.service %{_unitdir}/greenboot.service %{_unitdir}/redboot.service +%{_unitdir}/redboot.target %dir %{_sysconfdir}/%{name} %dir %{_sysconfdir}/%{name}/check %dir %{_sysconfdir}/%{name}/check/required.d @@ -120,18 +154,27 @@ install -Dpm 0755 etc/greenboot/red.d/* %{buildroot}%{_sysconfdir}/%{name}/red.d %files status %{_exec_prefix}/lib/motd.d/boot-status %{_libexecdir}/%{name}/greenboot-status +%{_tmpfilesdir}/greenboot-status-motd.conf %{_unitdir}/greenboot-status.service -%files ostree-grub2 -%{_sysconfdir}/%{name}/green.d/01_ostree_grub2_fallback.sh +%files rpm-ostree-grub2 +%{_libexecdir}/%{name}/greenboot-rpm-ostree-grub2-check-fallback +%{_unitdir}/greenboot-rpm-ostree-grub2-check-fallback.service %files grub2 -%{_sysconfdir}/%{name}/green.d/02_grub2_boot_success.sh +%{_libexecdir}/%{name}/greenboot-grub2-set-counter +%{_unitdir}/greenboot-grub2-set-success.service +%{_unitdir}/greenboot-grub2-set-counter.service %files reboot -%{_sysconfdir}/%{name}/red.d/99_reboot.sh +%{_unitdir}/redboot-auto-reboot.service %changelog +* Mon Apr 01 2019 Christian Glombek - 0.7-1 +- Update to v0.7 +- Rename ostree-grub2 subpackage to rpm-ostree-grub2 to be more explicit +- Add auto-update-fallback meta subpackage + * Wed Feb 13 2019 Christian Glombek - 0.6-1 - Update to v0.6 - Integrate with systemd's boot-complete.target diff --git a/sources b/sources old mode 100644 new mode 100755 index c8f20cd..daee682 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v0.6.tar.gz) = 83853d10af27837b3b299e0e6865f8eeefaff22753e09f7afd17fa2f9c4a611cd7c003e776fc47c2e85683ea0930517f5d0f9c003c845b7e19aebb64c26db3ac +SHA512 (v0.7.tar.gz) = a47a0a1474ac3e363d7818a4a2a429dfa2132bff3d68fb0c3c6fe202e52dd8bc20dee0dd078e54f11b4f77fe5f0d62757c27ba30f5e7ae4d254c8b4480d31b38