Add support for setting boot_success / boot_indeterminate grubenv flags

Add support for making the user session automatically set the boot_success
flag and make offline-updates increment the boot_indeterminate grubenv var.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
Hans de Goede 2018-07-16 13:52:24 +00:00 committed by Peter Jones
parent ce0f493268
commit 1d36e193e6

View File

@ -7,7 +7,7 @@
Name: grub2
Epoch: 1
Version: 2.02
Release: 43%{?dist}
Release: 44%{?dist}
Summary: Bootloader with support for Linux, Multiboot and more
Group: System Environment/Base
License: GPLv3+
@ -40,6 +40,8 @@ BuildRequires: freetype-devel gettext-devel git
BuildRequires: texinfo
BuildRequires: dejavu-sans-fonts
BuildRequires: help2man
# For %%_userunitdir macro
BuildRequires: systemd
%ifarch %{efi_arch}
BuildRequires: pesign >= 0.99-8
%endif
@ -211,6 +213,20 @@ install -D -m 0755 -t %{buildroot}%{_prefix}/lib/kernel/install.d/ %{SOURCE9}
install -d -m 0755 %{buildroot}%{_sysconfdir}/kernel/install.d/
install -m 0644 /dev/null %{buildroot}%{_sysconfdir}/kernel/install.d/20-grubby.install
install -m 0644 /dev/null %{buildroot}%{_sysconfdir}/kernel/install.d/90-loaderentry.install
# Install grub2-set-bootflag polkit policy
install -D -m 0755 -t %{buildroot}%{_datadir}/polkit-1/actions \
docs/org.gnu.grub.policy
# Install systemd user service to set the boot_success flag
install -D -m 0755 -t %{buildroot}%{_userunitdir} \
docs/grub-boot-success.{timer,service}
install -d -m 0755 %{buildroot}%{_userunitdir}/timers.target.wants
ln -s ../grub-boot-success.timer \
%{buildroot}%{_userunitdir}/timers.target.wants
# Install systemd system-update unit to set boot_indeterminate for offline-upd
install -D -m 0755 -t %{buildroot}%{_unitdir} docs/grub-boot-indeterminate.service
install -d -m 0755 %{buildroot}%{_unitdir}/system-update.target.wants
ln -s ../grub-boot-indeterminate.service \
%{buildroot}%{_unitdir}/system-update.target.wants
# Don't run debuginfo on all the grub modules and whatnot; it just
# rejects them, complains, and slows down extraction.
@ -355,6 +371,12 @@ fi
%attr(0644,root,root) %ghost %config(noreplace) %{_sysconfdir}/default/grub
%config %{_sysconfdir}/grub.d/??_*
%{_sysconfdir}/grub.d/README
%{_datadir}/polkit-1/actions/org.gnu.grub.policy
%{_userunitdir}/grub-boot-success.timer
%{_userunitdir}/grub-boot-success.service
%{_userunitdir}/timers.target.wants
%{_unitdir}/grub-boot-indeterminate.service
%{_unitdir}/system-update.target.wants
%{_infodir}/%{name}*
%{_datarootdir}/grub/*
%{_sbindir}/%{name}-install
@ -457,6 +479,10 @@ fi
%endif
%changelog
* Mon Jul 16 2018 Hans de Goede <hdegoede@redhat.com> - 2.02-44
- Make the user session automatically set the boot_success grubenv flag
- Make offline-updates increment the boot_indeterminate grubenv variable
* Mon Jul 16 2018 pjones <pjones@redhat.com> - 2.02-43
- Rework SB patches and 10_linux.in changes