grub-efi-x86_64: set bootloader-id to distribution name from /etc/os-release [release 2.12-3mamba;Mon Mar 18 2024]

This commit is contained in:
Silvan Calarco 2024-03-19 16:57:31 +01:00
parent 5e1b6ce245
commit bfd9bf56d5
5 changed files with 44 additions and 62 deletions

View File

@ -1,7 +1,6 @@
--- grub-2.02_beta3/util/grub.d/10_linux.in.orig 2016-08-25 21:42:17.171800345 +0200
+++ grub-2.02_beta3/util/grub.d/10_linux.in 2016-08-25 21:53:04.725194113 +0200
@@ -235,16 +235,41 @@
fi
--- grub-2.12/util/grub.d/10_linux.in.orig 2023-12-23 20:04:08.760546100 +0100
+++ grub-2.12/util/grub.d/10_linux.in 2023-12-23 20:09:01.621915577 +0100
@@ -295,14 +295,33 @@
# TRANSLATORS: %s is replaced with an OS name
echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {"
is_top_level=false
@ -12,17 +11,14 @@
- linux_entry "${OS}" "${version}" advanced \
- "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
+ linux_entry "${OS} (proprietary video driver)" "${version}" nomodeset \
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT} nomodeset"
+
+ linux_entry "${OS} (with debug messages)" "${version}" debug \
+ "${GRUB_CMDLINE_LINUX} debug"
+
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
linux_entry "${OS}" "${version}" recovery \
"single ${GRUB_CMDLINE_LINUX}"
"${GRUB_CMDLINE_LINUX_RECOVERY} ${GRUB_CMDLINE_LINUX}"
fi
+
+ initrd=
+ for i in "initramfs-${version}-failsafe.img.gz" "initramfs-${alt_version}-failsafe.img.gz" \
+ "initramfs-${version}-failsafe.img" "initramfs-${alt_version}-failsafe.img" \
@ -33,14 +29,10 @@
+ fi
+ done
+ if test -n "${initrd}" ; then
+ gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2
+ gettext_printf "Found initrd image: %sn" "${dirname}/${initrd}" >&2
+ linux_entry "${OS} (failsafe)" "${version}" advanced \
+ "rddebug splash selinux=0 ${GRUB_CMDLINE_LINUX_DEFAULT}"
+ fi
+ echo -e "\tmenuentry ' ' {"
+ echo -e "\t\ttrue"
+ echo -e "\t}"
+
list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
done
# If at least one kernel was found, then we need to

View File

@ -21,16 +21,3 @@ diff -Nru grub-2.02.orig/grub-core/gfxmenu/view.c grub-2.02/grub-core/gfxmenu/vi
}
static void
diff -Nru grub-2.02.orig/grub-core/normal/menu.c grub-2.02/grub-core/normal/menu.c
--- grub-2.02.orig/grub-core/normal/menu.c 2015-09-02 22:10:53.000000000 +0200
+++ grub-2.02/grub-core/normal/menu.c 2017-10-30 16:52:29.545653772 +0100
@@ -810,9 +810,6 @@
notify_booting (grub_menu_entry_t entry,
void *userdata __attribute__((unused)))
{
- grub_printf (" ");
- grub_printf_ (N_("Booting `%s'"), entry->title);
- grub_printf ("\n\n");
}
/* Callback invoked when a default menu entry executed because of a timeout

View File

@ -1,36 +1,32 @@
%define majver %(echo %version| cut -d. -f1-2)
%define pkgver %(echo %version | tr _ -)
#%define betaver %(echo %version| cut -d. -f3)
%define unifont_ver 15.1.04
Name: grub
Epoch: 2
Version: 2.06
Release: 7mamba
Version: 2.12
Release: 3mamba
Summary: A Multiboot boot loader derived from GRUB, the GRand Unified Bootloader
Group: System/Kernel and Hardware
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.gnu.org/software/grub/
# Get from bazaar repository with:
# bzr branch http://bzr.savannah.gnu.org/r/grub/trunk/grub
# cd grub; ./autogen.sh; ./configure; make dist
#Source: ftp://ftp.gnu.org/gnu/grub/grub-%{version}.tar.xz
#Source: git://git.savannah.gnu.org/grub.git/grub-%{pkgver}/grub-%{version}.tar.bz2
Source: ftp://ftp.gnu.org/gnu/grub/grub-%{version}.tar.gz
Source1: http://unifoundry.com/unifont-5.1.20080820.bdf.gz
Source: https://ftp.gnu.org/gnu/grub/grub-%{version}.tar.gz
Source1: https://ftp.gnu.org/gnu/unifont/unifont-%{unifont_ver}/unifont-%{unifont_ver}.bdf.gz
Source2: %{name}2-default
Source3: grub-2.00-openmamba-conf-other
Source4: %{name}2-sysconfig
Source5: grub-2.00-openmamba-conf-other-linux
Source6: %{name}2-conf-failsafe
Patch1: grub-2.02-openmamba_boot_choices.patch
Patch1: grub-2.12-openmamba_boot_choices.patch
Patch2: grub-2.00-stdio.patch
Patch3: %{name}2-1.97-sysconfig.patch
Patch9: %{name}2-1.99-fix_saved_entry_default.patch
Patch10: grub-2.00-flex-2.5.37.patch
Patch11: grub-2.00-gcc-4.5.patch
Patch12: grub-2.06-openmamba-default-nomodeset.patch
Patch13: grub-2.02-silent-boot.patch
Patch13: grub-2.12-silent-boot.patch
Patch14: grub-2.04-fix-enable-nls-install-locale-dir.patch
Patch15: grub-2.04-custom-boot-message.patch
Patch16: grub-2.06-e2fsprogs-1.47.patch
@ -39,7 +35,7 @@ License: GPL
BuildRequires: glibc-devel
BuildRequires: libdevmapper-devel
BuildRequires: libfreetype-devel
BuildRequires: libfuse-devel
BuildRequires: libfuse3-devel
BuildRequires: liblzma-devel
BuildRequires: libzfs-devel
## AUTOBUILDREQ-END
@ -105,14 +101,14 @@ This package contains the efi boot files needed to boot according to EFI standar
%setup -q -n grub-%{majver}
#-D -T
#:<< _EOF
%patch1 -p1
%patch3 -p1
%patch9 -p1
%patch12 -p1
%patch13 -p1
%patch 1 -p1
%patch 3 -p1
%patch 9 -p1
%patch 12 -p1
%patch 13 -p1
#%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch 15 -p1
#%patch 16 -p1
gunzip -c %{SOURCE1} > unifont.bdf
@ -122,9 +118,14 @@ ld -v | grep "gold" && {
exit 1
}
# Pull in language files
sh ./linguas.sh
./autogen.sh
# 2.12: workaround for *** No rule to make target '../grub-core/extra_deps.lst', needed by 'syminfo.lst'
touch grub-core/extra_deps.lst
%build
#:<< _EOF
# WARNING: build requires ld.bfd; ld.gold produces not working binary
@ -234,6 +235,7 @@ install -d -m0755 %{buildroot}/boot/efi
%find_lang grub || touch %{name}.lang
#rm -f %{buildroot}%{_sysconfdir}/grub.d/30_os-prober
rm -f %{buildroot}%{_infodir}/dir
%post
%install_info %{name}.info-1
@ -249,7 +251,7 @@ install -d -m0755 %{buildroot}/boot/efi
%posttrans
if [ $1 -ge 1 ]; then
grep GRUB_DISABLE_OS_PROBER /etc/default/grub || \
grep -q GRUB_DISABLE_OS_PROBER /etc/default/grub || \
cat >> /etc/default/grub << ___EOF
GRUB_DISABLE_OS_PROBER=false
___EOF
@ -269,12 +271,9 @@ if [ $1 -ge 1 ]; then
. /etc/sysconfig/grub
fi
. /etc/os-release
if [ "$GRUB_INSTALL_DEVICE_EFI" -a -e /sys/firmware/efi ]; then
mount $GRUB_INSTALL_DEVICE_EFI /boot/efi && {
if [ -e /boot/efi/EFI/${NAME} -a -e /sys/firmware/efi ]; then
grub-install --target=i386-efi --efi-directory=/boot/efi \
--bootloader-id="${NAME} boot manager" --recheck
umount $GRUB_INSTALL_DEVICE_EFI
}
--bootloader-id="${NAME}" --recheck
fi
fi
:
@ -285,12 +284,9 @@ if [ $1 -ge 1 ]; then
. /etc/sysconfig/grub
fi
. /etc/os-release
if [ "$GRUB_INSTALL_DEVICE_EFI" -a -e /sys/firmware/efi ]; then
mount $GRUB_INSTALL_DEVICE_EFI /boot/efi && {
if [ -e /boot/efi/EFI/${NAME} -a -e /sys/firmware/efi ]; then
grub-install --target=x86_64-efi --efi-directory=/boot/efi \
--bootloader-id="${NAME} boot manager" --recheck
umount $GRUB_INSTALL_DEVICE_EFI
}
--bootloader-id="${NAME}" --recheck
fi
fi
:
@ -306,13 +302,11 @@ fi
%{_sysconfdir}/grub.d/00_header
%{_sysconfdir}/grub.d/10_linux
%{_sysconfdir}/grub.d/20_linux_xen
#%{_sysconfdir}/grub.d/20_other
%{_sysconfdir}/grub.d/25_bli
%{_sysconfdir}/grub.d/30_uefi-firmware
#%{_sysconfdir}/grub.d/30_other_linux
%{_sysconfdir}/grub.d/30_os-prober
%{_sysconfdir}/grub.d/40_custom
%{_sysconfdir}/grub.d/41_custom
#%{_sysconfdir}/grub.d/90_linux_failsafe
%{_sysconfdir}/bash_completion.d/grub
%{_sysconfdir}/grub.d/README
%{_bindir}/grub-glue-efi
@ -393,6 +387,15 @@ fi
%endif
%changelog
* Mon Mar 18 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 2.12-3mamba
- grub-efi-x86_64: set bootloader-id to distribution name from /etc/os-release
* Mon Feb 05 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 2.12-2mamba
- syntax fix in openbmamba_boot_choices patch
* Sun Feb 04 2024 Automatic Build System <autodist@openmamba.org> 2.12-1mamba
- automatic version update by autodist
* Sun Jul 30 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 2.06-7mamba
- require xorriso for grub-mkrescue

BIN
unifont-15.1.04.bdf.gz Normal file

Binary file not shown.

Binary file not shown.