/boot/loader/entries is created by /lib/kernel/install.d/90-loaderentry.install
which is provided by systemd-udev package and run when a new kernel is added if
it doesn't exist
Resolves: #RHEL-212729
Signed-off-by: Josue Hernandez <josherna@redhat.com>
Fix the rpm verificaton issues (see NOTE below) introduced in 2.06-83 [1].
On the other hand, 2.06-85 [2] introduced a change on grub2-mkconfig where
it prevents overwritting `${EFI_HOME}/grub.cfg` with side effects on the
`%posttrans` scriptlet, where it tries to recreate it in case this
file does not exist but due to [2] the `${EFI}/grub.cfg` file is never
created. Fix the `%posttrans` code with the logic but applied to
${GRUB_HOME}/grub.cfg. On the same scriplet, make sure
${EFI_HOME}/grub.cfg is present before grepping into it. The changes also
fix the issue reported on RHEL-45870 where now /boot/grub2/grub.cfg
conf file has the right permission (-rw-------).
NOTE: With 2.06-83 release, the grub.cfg configuration files regressed on
file's mode (M) verification
[root@localhost ~]# rpm -Va
S.5....T. c /etc/ssh/sshd_config
.M....... c /boot/efi/EFI/redhat/grub.cfg
.M....... c /boot/grub2/grub.cfg
The following change fixes the issues above as seen in log
[root@localhost ~]# rpm -Va
S.5....T. c /etc/ssh/sshd_config
[1] https://pkgs.devel.redhat.com/cgit/rpms/grub2/commit/?h=rhel-9-main&id=694ab652e3443719e3876e3d183e59b2f9e055fd
[2] https://pkgs.devel.redhat.com/cgit/rpms/grub2/commit/?h=rhel-9-main&id=0185426fb4d693307cda0c7740e9dcf9907cc146
Resolves: #RHEL-45870
Signed-off-by: Leo Sandoval <lsandova@redhat.com>