Merge branch 'c8' into a8

This commit is contained in:
eabdullin 2024-12-17 12:07:43 +03:00
commit c0a70a12b8
4 changed files with 21 additions and 6 deletions

View File

@ -155,8 +155,9 @@ case "$COMMAND" in
if [[ "x${GRUB_ENABLE_BLSCFG}" = "xtrue" ]] || [[ ! -f /sbin/new-kernel-pkg ]]; then
ARCH="$(uname -m)"
BLS_TARGET="${BLS_DIR}/${MACHINE_ID}-${KERNEL_VERSION}.conf"
BLS_FAKE_TARGET="${BLS_DIR}/ffffffffffffffffffffffffffffffff-${KERNEL_VERSION}.conf"
BLS_DEBUG="$(echo ${BLS_TARGET} | sed -e "s/${KERNEL_VERSION}/${KERNEL_VERSION}~debug/")"
rm -f "${BLS_TARGET}" "${BLS_DEBUG}"
rm -f "${BLS_TARGET}" "${BLS_DEBUG}" "${BLS_FAKE_TARGET}"
for i in vmlinuz System.map config zImage.stub dtb; do
rm -rf "/boot/${i}-${KERNEL_VERSION}"

10
SOURCES/99-grub-mkconfig.install Normal file → Executable file
View File

@ -9,16 +9,22 @@ ARCH=$(uname -m)
[[ -f /etc/default/grub ]] && . /etc/default/grub
# Can't assume a BLS capable bootloader on ppc64
if [[ x$GRUB_ENABLE_BLSCFG != xfalse &&
if [[ x$GRUB_ENABLE_BLSCFG = xtrue &&
$ARCH != "ppc64" && $ARCH != "ppc64le" ]]; then
exit 0
fi
COMMAND="$1"
grub_cfg=/boot/grub2/grub.cfg
if mountpoint -q /boot/efi; then
os_name=$(grep ^ID= /etc/os-release | sed -e 's/^ID=//' -e 's/rhel/redhat/' -e 's/\"//g')
grub_cfg=/boot/efi/EFI/$os_name/grub.cfg
fi
case "$COMMAND" in
add|remove)
grub2-mkconfig --no-grubenv-update -o /boot/grub2/grub.cfg >& /dev/null
grub2-mkconfig --no-grubenv-update -o $grub_cfg >& /dev/null
;;
*)
;;

View File

@ -11,7 +11,7 @@
Name: grub2
Epoch: 1
Version: 2.02
Release: 158%{?dist}.alma.1
Release: 160%{?dist}.alma.1
Summary: Bootloader with support for Linux, Multiboot and more
Group: System Environment/Base
License: GPLv3+
@ -539,9 +539,17 @@ fi
%endif
%changelog
* Tue Nov 05 2024 Eduard Abdullin <eabdullin@almalinux.org> - 2.02-158.alma.1
* Tue Dec 17 2024 Eduard Abdullin <eabdullin@almalinux.org> - 2.02-160.alma.1
- Debrand for AlmaLinux
* Wed Nov 13 2024 Leo Sandoval <lsandova@redhat.com> - 2.02-160
- Remove BLS fake config in case of kernel removal
- Resolves: #RHEL-4316
* Tue Nov 12 2024 Leo Sandoval <lsandova@redhat.com> - 2.02-159
- Fix default behavior when GRUB_ENABLE_BLSCFG is not present
- Resolves: #RHEL-4319
* Thu Sep 19 2024 Leo Sandoval <lsandova@redhat.com> - 2.02-158
- grub-mkconfig.in: turn off executable owner bit
- Resolves: #RHEL-58835