spec: Fix enablement of grub services and timer
Fix enablement of grub services and timer: - Switch back to static enablement for grub services in tools package - Add %%triggerpostun to apply grub-boot-success.timer preset when upgrading from older versions where this was not a preset Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2247635 Signed-off-by: Christian Glombek <cglombek@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
8a9297c431
commit
94ecc476ab
27
grub2.spec
27
grub2.spec
@ -17,7 +17,7 @@
|
|||||||
Name: grub2
|
Name: grub2
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 2.06
|
Version: 2.06
|
||||||
Release: 106%{?dist}
|
Release: 107%{?dist}
|
||||||
Summary: Bootloader with support for Linux, Multiboot and more
|
Summary: Bootloader with support for Linux, Multiboot and more
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
URL: http://www.gnu.org/software/grub/
|
URL: http://www.gnu.org/software/grub/
|
||||||
@ -274,6 +274,12 @@ install -D -m 0755 -t %{buildroot}%{_userunitdir} \
|
|||||||
docs/grub-boot-success.{timer,service}
|
docs/grub-boot-success.{timer,service}
|
||||||
# Install systemd system-update unit to set boot_indeterminate for offline-upd
|
# 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 -t %{buildroot}%{_unitdir} docs/grub-boot-indeterminate.service
|
||||||
|
install -d -m 0755 %{buildroot}%{_unitdir}/system-update.target.wants
|
||||||
|
install -d -m 0755 %{buildroot}%{_unitdir}/reboot.target.wants
|
||||||
|
ln -s ../grub-boot-indeterminate.service \
|
||||||
|
%{buildroot}%{_unitdir}/system-update.target.wants
|
||||||
|
ln -s ../grub2-systemd-integration.service \
|
||||||
|
%{buildroot}%{_unitdir}/reboot.target.wants
|
||||||
|
|
||||||
# Don't run debuginfo on all the grub modules and whatnot; it just
|
# Don't run debuginfo on all the grub modules and whatnot; it just
|
||||||
# rejects them, complains, and slows down extraction.
|
# rejects them, complains, and slows down extraction.
|
||||||
@ -325,20 +331,19 @@ elif [ -f /etc/grub.d/01_users ] && \
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%post tools
|
%post tools
|
||||||
%systemd_post grub-boot-indeterminate.service
|
|
||||||
%systemd_post grub2-systemd-integration.service
|
|
||||||
%systemd_user_post grub-boot-success.timer
|
%systemd_user_post grub-boot-success.timer
|
||||||
|
|
||||||
%preun tools
|
%preun tools
|
||||||
%systemd_preun grub-boot-indeterminate.service
|
|
||||||
%systemd_preun grub2-systemd-integration.service
|
|
||||||
%systemd_user_preun grub-boot-success.timer
|
%systemd_user_preun grub-boot-success.timer
|
||||||
|
|
||||||
%postun tools
|
%postun tools
|
||||||
%systemd_postun_with_restart grub-boot-indeterminate.service
|
|
||||||
%systemd_postun_with_restart grub2-systemd-integration.service
|
|
||||||
%systemd_user_postun_with_restart grub-boot-success.timer
|
%systemd_user_postun_with_restart grub-boot-success.timer
|
||||||
|
|
||||||
|
%triggerpostun tools -- grub2-tools < 1:2.06-107
|
||||||
|
# grub-boot-success.timer was moved from a hard symlink under /lib/systemd
|
||||||
|
# to a preset, apply the preset when upgrading from pre-preset versions
|
||||||
|
/usr/lib/systemd/systemd-update-helper install-user-units grub-boot-success.timer
|
||||||
|
|
||||||
%posttrans common
|
%posttrans common
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
@ -435,7 +440,9 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg
|
|||||||
%{_userunitdir}/grub-boot-success.timer
|
%{_userunitdir}/grub-boot-success.timer
|
||||||
%{_userunitdir}/grub-boot-success.service
|
%{_userunitdir}/grub-boot-success.service
|
||||||
%{_unitdir}/grub-boot-indeterminate.service
|
%{_unitdir}/grub-boot-indeterminate.service
|
||||||
|
%{_unitdir}/system-update.target.wants
|
||||||
%{_unitdir}/grub2-systemd-integration.service
|
%{_unitdir}/grub2-systemd-integration.service
|
||||||
|
%{_unitdir}/reboot.target.wants
|
||||||
%{_unitdir}/systemd-logind.service.d
|
%{_unitdir}/systemd-logind.service.d
|
||||||
%{_infodir}/grub2*
|
%{_infodir}/grub2*
|
||||||
%{_datarootdir}/grub/*
|
%{_datarootdir}/grub/*
|
||||||
@ -548,6 +555,12 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Nov 14 2023 Hans de Goede <hdegoede@redhat.com> - 2.06-107
|
||||||
|
- spec: Switch back to static enablement for grub services in tools package
|
||||||
|
- spec: Add %%triggerpostun to apply grub-boot-success.timer preset
|
||||||
|
when upgrading from older versions where this was not a preset
|
||||||
|
- Resolves: #2247635
|
||||||
|
|
||||||
* Mon Nov 6 2023 Nicolas Frayer <nfrayer@redhat.com> - 2.06-106
|
* Mon Nov 6 2023 Nicolas Frayer <nfrayer@redhat.com> - 2.06-106
|
||||||
- util: grub-install on EFI if forced
|
- util: grub-install on EFI if forced
|
||||||
- Resolves: #1917213
|
- Resolves: #1917213
|
||||||
|
Loading…
Reference in New Issue
Block a user