This commit is contained in:
Christian Glombek 2018-10-19 15:33:14 +02:00
parent 9778fb8820
commit 532832230f
3 changed files with 22 additions and 15 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/v0.4.tar.gz /v0.4.tar.gz
/v0.5.tar.gz

View File

@ -3,8 +3,8 @@
%global build_timestamp %(date +"%Y%m%d%H%M%%S") %global build_timestamp %(date +"%Y%m%d%H%M%%S")
Name: greenboot Name: greenboot
Version: 0.4 Version: 0.5
Release: 2%{?dist} Release: 1%{?dist}
Summary: Generic Health Check Framework for systemd Summary: Generic Health Check Framework for systemd
License: LGPLv2+ License: LGPLv2+
URL: https://github.com/%{github_owner}/%{github_project} URL: https://github.com/%{github_owner}/%{github_project}
@ -57,23 +57,21 @@ Requires: %{name} = %{version}-%{release}
%install %install
install -Dpm 0755 usr/libexec/greenboot/greenboot.sh %{buildroot}%{_libexecdir}/%{name}/%{name}.sh install -Dpm 0755 usr/libexec/greenboot/greenboot.sh %{buildroot}%{_libexecdir}/%{name}/%{name}.sh
install -Dpm 0755 usr/libexec/greenboot/greenboot_motdgen.sh %{buildroot}%{_libexecdir}/%{name}/%{name}_motdgen.sh
install -Dpm 0644 usr/lib/systemd/system/greenboot.target %{buildroot}%{_unitdir}/greenboot.target install -Dpm 0644 usr/lib/systemd/system/greenboot.target %{buildroot}%{_unitdir}/greenboot.target
install -Dpm 0644 usr/lib/systemd/system/greenboot-healthcheck.service %{buildroot}%{_unitdir}/greenboot-healthcheck.service 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/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/redboot.service %{buildroot}%{_unitdir}/redboot.service
mkdir -p %{buildroot}/run/%{name} install -Dpm 0644 usr/lib/systemd/system/greenboot-motdgen.service %{buildroot}%{_unitdir}/greenboot-motdgen.service
mkdir -p %{buildroot}%{_sysconfdir}/motd.d
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/check/required.d mkdir -p %{buildroot}%{_sysconfdir}/%{name}/check/required.d
mkdir %{buildroot}%{_sysconfdir}/%{name}/check/wanted.d mkdir %{buildroot}%{_sysconfdir}/%{name}/check/wanted.d
mkdir %{buildroot}%{_sysconfdir}/%{name}/green.d mkdir %{buildroot}%{_sysconfdir}/%{name}/green.d
mkdir %{buildroot}%{_sysconfdir}/%{name}/red.d mkdir %{buildroot}%{_sysconfdir}/%{name}/red.d
mkdir %{buildroot}%{_sysconfdir}/%{name}/motd
install -Dpm 0755 etc/greenboot/check/required.d/* %{buildroot}%{_sysconfdir}/%{name}/check/required.d 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/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/green.d/* %{buildroot}%{_sysconfdir}/%{name}/green.d
install -Dpm 0755 etc/greenboot/red.d/* %{buildroot}%{_sysconfdir}/%{name}/red.d install -Dpm 0755 etc/greenboot/red.d/* %{buildroot}%{_sysconfdir}/%{name}/red.d
install -Dpm 0644 etc/greenboot/motd/* %{buildroot}%{_sysconfdir}/%{name}/motd install -Dpm 0644 etc/greenboot/motd %{buildroot}%{_sysconfdir}/%{name}/motd
ln -snf /run/greenboot/motd %{buildroot}%{_sysconfdir}/motd.d/%{name}
%post %post
%systemd_post greenboot.target %systemd_post greenboot.target
@ -81,18 +79,27 @@ ln -snf /run/greenboot/motd %{buildroot}%{_sysconfdir}/motd.d/%{name}
%systemd_post greenboot-healthcheck.service %systemd_post greenboot-healthcheck.service
%systemd_post redboot.service %systemd_post redboot.service
%post motd
%systemd_post greenboot-motdgen.service
%preun %preun
%systemd_preun greenboot.target %systemd_preun greenboot.target
%systemd_preun greenboot.service %systemd_preun greenboot.service
%systemd_preun greenboot-healthcheck.service %systemd_preun greenboot-healthcheck.service
%systemd_preun redboot.service %systemd_preun redboot.service
%preun motd
%systemd_preun greenboot-motdgen.service
%postun %postun
%systemd_postun_with_restart greenboot.target %systemd_postun_with_restart greenboot.target
%systemd_postun_with_restart greenboot.service %systemd_postun_with_restart greenboot.service
%systemd_postun_with_restart greenboot-healthcheck.service %systemd_postun_with_restart greenboot-healthcheck.service
%systemd_postun_with_restart redboot.service %systemd_postun_with_restart redboot.service
%postun motd
%systemd_postun greenboot-motdgen.service
%check %check
# TODO # TODO
@ -112,16 +119,12 @@ ln -snf /run/greenboot/motd %{buildroot}%{_sysconfdir}/motd.d/%{name}
%dir %{_sysconfdir}/%{name}/check/wanted.d %dir %{_sysconfdir}/%{name}/check/wanted.d
%{_sysconfdir}/%{name}/check/wanted.d/00_wanted_scripts_start.sh %{_sysconfdir}/%{name}/check/wanted.d/00_wanted_scripts_start.sh
%dir %{_sysconfdir}/%{name}/green.d %dir %{_sysconfdir}/%{name}/green.d
%{_sysconfdir}/%{name}/green.d/00_greenboot_notification.sh
%dir %{_sysconfdir}/%{name}/red.d %dir %{_sysconfdir}/%{name}/red.d
%{_sysconfdir}/%{name}/red.d/00_redboot_notification.sh
%files motd %files motd
%dir /run/%{name} %config %{_sysconfdir}/%{name}/motd
%config(noreplace) %{_sysconfdir}/motd.d/%{name} %{_libexecdir}/%{name}/%{name}_motdgen.sh
%config %{_sysconfdir}/%{name}/motd/ %{_unitdir}/greenboot-motdgen.service
%{_sysconfdir}/%{name}/green.d/50_greenboot_motd.sh
%{_sysconfdir}/%{name}/red.d/50_redboot_motd.sh
%files ostree-grub2 %files ostree-grub2
%{_sysconfdir}/%{name}/green.d/01_ostree_grub2_fallback.sh %{_sysconfdir}/%{name}/green.d/01_ostree_grub2_fallback.sh
@ -133,6 +136,9 @@ ln -snf /run/greenboot/motd %{buildroot}%{_sysconfdir}/motd.d/%{name}
%{_sysconfdir}/%{name}/red.d/99_reboot.sh %{_sysconfdir}/%{name}/red.d/99_reboot.sh
%changelog %changelog
* Fri Oct 19 2018 Christian Glombek <lorbus@fedoraproject.org> - 0.5-1
- Update to v0.5
* Tue Oct 02 2018 Christian Glombek <lorbus@fedoraproject.org> - 0.4-2 * Tue Oct 02 2018 Christian Glombek <lorbus@fedoraproject.org> - 0.4-2
- Spec Review - Spec Review

View File

@ -1 +1 @@
SHA512 (v0.4.tar.gz) = 66841040467527deec390178cd298f2358fc19e844c2d2d09e29f377b39d17b769611993b4d2a519a77adf5030b533c3edd132c0c7fe9b5b0090b554226d56d6 SHA512 (v0.5.tar.gz) = 9f3a0690c9fcee982f5395455a29362ae8c09b1fc739f8d9d7bcfa0b3929a52a35fe22dd93f5696cf044782d0c52e3fb2a5e205533661d54e8bb61b76854d72b