From f9d8ee1b6400945563f63bf88462e4b0abc998b7 Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Nov 12 2018 23:39:31 +0000 Subject: Switch to a BLS configuration on %%post By default the old grubby tool isn't installed anymore and it's part of the grubby-deprecated package. Instead the grubby wrapper that modifies BLS config files is installed for backward compatiblity with old grubby. So on postinstall the bootloader configuration has to be changed to BLS since non-BLS bootloader configuration won't be updated anymore without the old grubby tool and the new-kernel-pkg script. Signed-off-by: Javier Martinez Canillas --- diff --git a/grubby.spec b/grubby.spec index 1b73e0a..08dcb71 100644 --- a/grubby.spec +++ b/grubby.spec @@ -1,6 +1,6 @@ Name: grubby Version: 8.40 -Release: 19%{?dist} +Release: 20%{?dist} Summary: Command line tool for updating bootloader configs License: GPLv2+ URL: https://github.com/rhinstaller/grubby @@ -38,6 +38,8 @@ Requires: s390utils-base %endif Requires: findutils +Obsoletes: %{name}-bls + %description This package provides a grubby compatibility script that manages BootLoaderSpec files and is meant to only be used for legacy compatibility @@ -76,9 +78,21 @@ sed -e "s,@@LIBEXECDIR@@,%{_libexecdir}/grubby,g" %{SOURCE2} \ sed -e "s,@@LIBEXECDIR@@,%{_libexecdir}/installkernel,g" %{SOURCE3} \ > %{buildroot}%{_sbindir}/installkernel +%post +if [ "$1" = 2 ]; then + arch=$(uname -m) + if [[ $arch == "s390x" ]]; then + command=zipl-switch-to-blscfg + else + command=grub2-switch-to-blscfg + fi + + $command --backup-suffix=.rpmsave &>/dev/null || : +fi + %package deprecated Summary: Legacy command line tool for updating bootloader configs -Conflicts: %{name} <= 8.40-13 +Conflicts: %{name} <= 8.40-18 %description deprecated This package provides deprecated, legacy grubby. This is for temporary @@ -115,6 +129,9 @@ current boot environment. %{_mandir}/man8/*.8* %changelog +* Tue Nov 13 2018 Javier Martinez Canillas - 8.40-20 +- Switch to a BLS configuration on %%post + * Tue Nov 06 2018 Javier Martinez Canillas - 8.40-19 - Make the temporary config wrapper be what "grubby" contains, and put traditional grubby in grubby-deprecated (pjones)