When a kernel-debug package is installed, it should only be set as default
if DEFAULTDEBUG=yes is set in /etc/sysconfig/kernel. But currently there's
no default field set in /etc/zipl.conf so the implicit order used to sort
boot entries is used.
The debug kernels contains a +debug suffix which makes them be sorted with
more precedence than non-debug kernels by the RPM sorting algorithm:
rpm --eval '%{lua: print(rpm.vercmp("4.18.0-193.el8.s390x+debug", "4.18.0-193.el8.s390x"))}'
1
So using the implicit order when a debug kernel is installed and a default
is not set leads to a wrong behavior.
The zipl kernel-install script attempts to set a default entry if has to,
but only if one is present in the zipl.conf file. Take also into account
the case when there isn't one to avoid using the implicit sorting and not
cover these corner cases like the one with the debug kernel.
Resolves: rhbz#1698363
The kernel-install plugin removed the "${BOOT_DIR_ABS%/*}" directory that
was created unconditionally by the kernel-install script. Since the other
plugins used the existence of this directory as the indication on whether
systemd-boot was used or not.
But now the kernel-install script doesn't unconditionally create this dir
anymore and if $BOOT/$MACHINE_ID exists, so there's no need anymore to do
any cleanup.
The 91-zipl.install kernel-install script attempts to execute zipl when a
kernel is installed, but this will fail if there isn't a zipl confg file.
Also, the kernel-install scripts are using ',' as the sed delimiter when
updating the kernel command line options in the BLS fragment file. But it
is valid to have that character in a cmdline so instead use '#' for that.
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>