From 72d28eac873f2679d098a26ec9775a0178195239 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 23:28:53 +0100 Subject: [PATCH] updated patch to customize boot message posttrans: use OS name from /etc/os-release when building EFI loaders add -theme-starfield subpackage [release 2.04-5mamba;Sat Jul 09 2022] --- grub-2.04-custom-boot-message.patch | 28 +++++++++++++++ ...ilence-loading-linux-initrd-messages.patch | 18 ---------- grub.spec | 35 ++++++++++++++----- 3 files changed, 54 insertions(+), 27 deletions(-) create mode 100644 grub-2.04-custom-boot-message.patch delete mode 100644 grub-2.06-silence-loading-linux-initrd-messages.patch diff --git a/grub-2.04-custom-boot-message.patch b/grub-2.04-custom-boot-message.patch new file mode 100644 index 0000000..0d439d2 --- /dev/null +++ b/grub-2.04-custom-boot-message.patch @@ -0,0 +1,28 @@ +--- grub-2.04/util/grub.d/10_linux.in.orig 2022-07-09 11:36:06.424051173 +0200 ++++ grub-2.04/util/grub.d/10_linux.in 2022-07-09 11:48:54.914573836 +0200 +@@ -31,7 +31,7 @@ + if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then + OS=GNU/Linux + else +- OS="${GRUB_DISTRIBUTOR} GNU/Linux" ++ OS="${GRUB_DISTRIBUTOR}" + CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}" + fi + +@@ -138,7 +138,7 @@ + fi + printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/" + fi +- message="$(gettext_printf "Loading Linux %s ..." ${version})" ++ message="$(gettext_printf "%s starting ..." ${OS})" + sed "s/^/$submenu_indentation/" << EOF + echo '$(echo "$message" | grub_quote)' + linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} +@@ -151,7 +151,6 @@ + initrd_path="${initrd_path} ${rel_dirname}/${i}" + done + sed "s/^/$submenu_indentation/" << EOF +- echo '$(echo "$message" | grub_quote)' + initrd $(echo $initrd_path) + EOF + fi diff --git a/grub-2.06-silence-loading-linux-initrd-messages.patch b/grub-2.06-silence-loading-linux-initrd-messages.patch deleted file mode 100644 index 986c1e9..0000000 --- a/grub-2.06-silence-loading-linux-initrd-messages.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- grub-2.06/util/grub.d/10_linux.in.orig 2022-07-02 12:16:56.107567186 +0200 -+++ grub-2.06/util/grub.d/10_linux.in 2022-07-02 12:17:13.583436240 +0200 -@@ -140,7 +140,6 @@ - fi - message="$(gettext_printf "Loading Linux %s ..." ${version})" - sed "s/^/$submenu_indentation/" << EOF -- echo '$(echo "$message" | grub_quote)' - linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} - EOF - if test -n "${initrd}" ; then -@@ -151,7 +150,6 @@ - initrd_path="${initrd_path} ${rel_dirname}/${i}" - done - sed "s/^/$submenu_indentation/" << EOF -- echo '$(echo "$message" | grub_quote)' - initrd $(echo $initrd_path) - EOF - fi diff --git a/grub.spec b/grub.spec index e34804f..40e3a96 100644 --- a/grub.spec +++ b/grub.spec @@ -4,7 +4,7 @@ Name: grub Epoch: 2 Version: 2.04 -Release: 4mamba +Release: 5mamba Summary: A Multiboot boot loader derived from GRUB, the GRand Unified Bootloader Group: System/Kernel and Hardware Vendor: openmamba @@ -32,7 +32,7 @@ Patch11: grub-2.00-gcc-4.5.patch Patch12: grub-2.02_beta3-openmamba-default-nomodeset.patch Patch13: grub-2.02-silent-boot.patch Patch14: grub-2.04-fix-enable-nls-install-locale-dir.patch -Patch15: grub-2.06-silence-loading-linux-initrd-messages.patch +Patch15: grub-2.04-custom-boot-message.patch Patch16: grub-2.04-binutils-2.36.patch License: GPL ## AUTOBUILDREQ-BEGIN @@ -66,6 +66,13 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-root GNU GRUB is a Multiboot boot loader. It was derived from GRUB, GRand Unified Bootloader, which was originally designed and implemented by Erich Stefan Boleyn. Briefly, boot loader is the first software program that runs when a computer starts. It is responsible for loading and transferring control to the operating system kernel software (such as the Hurd or the Linux). The kernel, in turn, initializes the rest of the operating system (e.g. GNU). +%package theme-starfield +Summary: Starfield theme for GRUB +Group: System/Kernel and Hardware + +%description theme-starfield +This package contains the startfield theme provided with %{name}. + %package efi Summary: GRUB Multiboot boot loader build for EFI Group: System/Kernel and Hardware @@ -104,7 +111,7 @@ This package contains the efi boot files needed to boot according to EFI standar %patch12 -p1 %patch13 -p1 %patch14 -p1 -%patch15 -p1 +%patch15 -p1 -b .custom-boot-message %patch16 -p1 -b .binutils-2.36 gunzip -c %{SOURCE1} > unifont.bdf @@ -254,10 +261,11 @@ if [ $1 -ge 1 ]; then if [ -e /etc/sysconfig/grub ]; 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 && { grub-install --target=i386-efi --efi-directory=/boot/efi \ - --bootloader-id="openmamba Boot Manager" --recheck + --bootloader-id="${NAME} boot manager" --recheck umount $GRUB_INSTALL_DEVICE_EFI } fi @@ -269,10 +277,11 @@ if [ $1 -ge 1 ]; then if [ -e /etc/sysconfig/grub ]; 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 && { grub-install --target=x86_64-efi --efi-directory=/boot/efi \ - --bootloader-id="openmamba Boot Manager" --recheck + --bootloader-id="${NAME} boot manager" --recheck umount $GRUB_INSTALL_DEVICE_EFI } fi @@ -335,20 +344,23 @@ fi %{_datadir}/grub/unicode.pf2 %{_datadir}/grub/widthspec.h %dir %{_datadir}/grub/themes -%dir %{_datadir}/grub/themes/starfield -%{_datadir}/grub/themes/starfield/* %{_infodir}/grub-dev.info.gz %dir %{_prefix}/lib/grub %ifarch x86_64 %{ix86} %dir %{_prefix}/lib/grub/i386-pc %{_prefix}/lib/grub/i386-pc/* %endif -%{_mandir}/man1/grub*.1.gz -%{_mandir}/man8/grub*.8.gz +%{_mandir}/man1/grub*.1* +%{_mandir}/man8/grub*.8* %{_datadir}/info/grub.info.gz %doc AUTHORS COPYING #% doc ChangeLog NEWS README THANKS TODO +%files theme-starfield +%defattr(-,root,root) +%dir %{_datadir}/grub/themes/starfield +%{_datadir}/grub/themes/starfield/* + %ifarch %{ix86} aarch64 %files efi %defattr(-,root,root) @@ -372,6 +384,11 @@ fi %endif %changelog +* Sat Jul 09 2022 Silvan Calarco 2.04-5mamba +- updated patch to customize boot message +- posttrans: use OS name from /etc/os-release when building EFI loaders +- add -theme-starfield subpackage + * Sun Jul 03 2022 Silvan Calarco 2.04-4mamba - patched to fix modules sizes with binutils >= 2.36 (see also https://bugs.funtoo.org/browse/FL-8245 )