diff --git a/.gitignore b/.gitignore index 488ed59..636d237 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /v0.4.tar.gz /v0.5.tar.gz +/v0.6.tar.gz diff --git a/greenboot.spec b/greenboot.spec index e4f3969..99ca1a7 100644 --- a/greenboot.spec +++ b/greenboot.spec @@ -1,30 +1,31 @@ -%global github_owner LorbusChris -%global github_project greenboot -%global build_timestamp %(date +"%Y%m%d%H%M%%S") - Name: greenboot -Version: 0.5 -Release: 2%{?dist} +Version: 0.6 +Release: 1%{?dist} Summary: Generic Health Check Framework for systemd License: LGPLv2+ -URL: https://github.com/%{github_owner}/%{github_project} -Source0: https://github.com/%{github_owner}/%{github_project}/archive/v%{version}.tar.gz + +%global repo_owner LorbusChris +%global repo_name %{name} +%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.gz BuildArch: noarch -BuildRequires: systemd +BuildRequires: systemd-rpm-macros %{?systemd_requires} Requires: systemd %description %{summary}. -%package motd +%package status Summary: Message of the Day updater for greenboot Requires: %{name} = %{version}-%{release} -Requires: pam >= 1.3.1 +Requires: pam >= 1.3.1-15 Requires: openssh -%description motd +%description status %{summary}. %package ostree-grub2 @@ -51,54 +52,50 @@ Requires: %{name} = %{version}-%{release} %{summary}. %prep -%setup -qn %{github_project}-%{version} +%setup %build %install -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-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-motdgen.service %{buildroot}%{_unitdir}/greenboot-motdgen.service 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 -install -Dpm 0644 etc/greenboot/motd %{buildroot}%{_sysconfdir}/%{name}/motd %post -%systemd_post greenboot.target %systemd_post greenboot.service %systemd_post greenboot-healthcheck.service %systemd_post redboot.service -%post motd -%systemd_post greenboot-motdgen.service +%post status +%systemd_post greenboot-status.service %preun -%systemd_preun greenboot.target %systemd_preun greenboot.service %systemd_preun greenboot-healthcheck.service %systemd_preun redboot.service -%preun motd -%systemd_preun greenboot-motdgen.service +%preun status +%systemd_preun greenboot-status.service %postun -%systemd_postun_with_restart greenboot.target %systemd_postun_with_restart greenboot.service %systemd_postun_with_restart greenboot-healthcheck.service %systemd_postun_with_restart redboot.service -%postun motd -%systemd_postun greenboot-motdgen.service +%postun status +%systemd_postun greenboot-status.service %check # TODO @@ -107,8 +104,7 @@ install -Dpm 0644 etc/greenboot/motd %{buildroot}%{_sysconfdir}/%{name}/motd %doc README.md %license LICENSE %dir %{_libexecdir}/%{name} -%{_libexecdir}/%{name}/%{name}.sh -%{_unitdir}/greenboot.target +%{_libexecdir}/%{name}/%{name} %{_unitdir}/greenboot-healthcheck.service %{_unitdir}/greenboot.service %{_unitdir}/redboot.service @@ -121,10 +117,10 @@ install -Dpm 0644 etc/greenboot/motd %{buildroot}%{_sysconfdir}/%{name}/motd %dir %{_sysconfdir}/%{name}/green.d %dir %{_sysconfdir}/%{name}/red.d -%files motd -%config %{_sysconfdir}/%{name}/motd -%{_libexecdir}/%{name}/%{name}_motdgen.sh -%{_unitdir}/greenboot-motdgen.service +%files status +%{_exec_prefix}/lib/motd.d/boot-status +%{_libexecdir}/%{name}/greenboot-status +%{_unitdir}/greenboot-status.service %files ostree-grub2 %{_sysconfdir}/%{name}/green.d/01_ostree_grub2_fallback.sh @@ -136,8 +132,10 @@ install -Dpm 0644 etc/greenboot/motd %{buildroot}%{_sysconfdir}/%{name}/motd %{_sysconfdir}/%{name}/red.d/99_reboot.sh %changelog -* Fri Feb 01 2019 Fedora Release Engineering - 0.5-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild +* Wed Feb 13 2019 Christian Glombek - 0.6-1 +- Update to v0.6 +- Integrate with systemd's boot-complete.target +- Rewrite motd sub-package and rename to status * Fri Oct 19 2018 Christian Glombek - 0.5-1 - Update to v0.5 diff --git a/sources b/sources index 9c78692..c8f20cd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v0.5.tar.gz) = 9f3a0690c9fcee982f5395455a29362ae8c09b1fc739f8d9d7bcfa0b3929a52a35fe22dd93f5696cf044782d0c52e3fb2a5e205533661d54e8bb61b76854d72b +SHA512 (v0.6.tar.gz) = 83853d10af27837b3b299e0e6865f8eeefaff22753e09f7afd17fa2f9c4a611cd7c003e776fc47c2e85683ea0930517f5d0f9c003c845b7e19aebb64c26db3ac