grub-install bug: themes contain subdirs, but grub-install only copies main dir
"Andreas K. Huettel" <[email protected]> Sat, 13 Dec 2025 19:35:43 +0100
| Newsgroups | gmane.comp.boot-loaders.grub.bugs |
|---|---|
| Organization | Gentoo Linux |
| Message-ID | <2290838.Mh6RI2rZIc@pinacolada> |
--nextPart3893866.MHq7AAxBmi Content-Type: multipart/mixed; boundary="nextPart3763734.R56niFO833"; protected-headers="v1" Content-Transfer-Encoding: 7Bit From: "Andreas K. Huettel" <[email protected]> To: [email protected] Cc: [email protected] Date: Sat, 13 Dec 2025 19:35:43 +0100 Message-ID: <2290838.Mh6RI2rZIc@pinacolada> Organization: Gentoo Linux MIME-Version: 1.0 This is a multi-part message in MIME format. --nextPart3763734.R56niFO833 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Hi all,=20 grub-install allows to pass a parameter to install a theme in the boot part= ition. This works fine for the default starfield theme. However, In general themes can contain subdirectories, as, e.g. "icons", and these a= re not copied by grub-install. As a result, the icons are missing on the scree= n. Attached is a simple POC patch that fixes this. Please consider including i= t or an improved version.=20 Thanks a lot, Andreas =2D-=20 Andreas K. H=C3=BCttel [email protected] Gentoo Linux developer (council, toolchain, base-system, perl, libreoffice) --nextPart3763734.R56niFO833 Content-Disposition: attachment; filename="grub-2.14_rc1-themerecursive.patch" Content-Transfer-Encoding: quoted-printable Content-Type: text/x-patch; charset="UTF-8"; name="grub-2.14_rc1-themerecursive.patch" =46rom c0a83f8ae0f4dfddf4ef360385d61fef2860f9e8 Mon Sep 17 00:00:00 2001 =46rom: =3D?UTF-8?q?Andreas=3D20K=3D2E=3D20H=3DC3=3DBCttel?=3D <dilfridge@g= entoo.org> Date: Sat, 13 Dec 2025 19:15:58 +0100 Subject: [PATCH] grub-install: Allow recursive copying of theme dirs MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit This should be upstreamed in some way. Signed-off-by: Andreas K. H=C3=BCttel <[email protected]> =2D-- util/grub-install-common.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/util/grub-install-common.c b/util/grub-install-common.c index a913ee61c..c1c3c5704 100644 =2D-- a/util/grub-install-common.c +++ b/util/grub-install-common.c @@ -803,13 +803,20 @@ copy_all (const char *srcd, || strcmp (de->d_name, "..") =3D=3D 0) continue; srcf =3D grub_util_path_concat (2, srcd, de->d_name); =2D if (grub_util_is_special_file (srcf) =2D || grub_util_is_directory (srcf)) + if (grub_util_is_special_file (srcf)) { free (srcf); continue; } dstf =3D grub_util_path_concat (2, dstd, de->d_name); + if (grub_util_is_directory (srcf)) + { + grub_install_mkdir_p (dstf); + copy_all (srcf, dstf); + free (srcf); + free (dstf); + continue; + } grub_install_compress_file (srcf, dstf, 1); free (srcf); free (dstf); =2D-=20 2.51.2 --nextPart3763734.R56niFO833-- --nextPart3893866.MHq7AAxBmi Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQKTBAABCgB9FiEE/Rnm0xsZLuTcY+rT3CsWIV7VQSoFAmk9sf9fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEZE MTlFNkQzMUIxOTJFRTREQzYzRUFEM0RDMkIxNjIxNUVENTQxMkEACgkQ3CsWIV7V QSqfuQ/+OggMDov0joO/7mEOPIOvgdPTCQONE8rrfzErdejkHYzuyEGJuk8VsU+T Q4uei6MQuRt8tTeHRO9pGvFe7ClsF/ST0cc9APk0fy0/b310ZYjtJrL8HoZrwvqb 9xr4gQ7lGvvDeSIS+i0jJFdkcbFkzFarXH/8C2JyXQmi3ciNA8Uccja0KPCRxuRp USI/cYMtPxt17IB4NYDPiUdRrYeYOJTBUHoHSWbhz7Po6K7jbGuqmj/JUEONhuYe IkPGebrn3+v5Bq2lI8KW6VVWUzIGhy2vXKfLddnBc/BP4Ab5n3sKI8tvi5SOpqOv Mphn/1Cy1GdUU9SX6EHoJiHpNiKQbG2BCaFYS/g7nyxOyFgYo/ppPCfgsNf+UQpw h94N+QYbo/G+AoEAG4nFL2KUdctLOdARUJrAvDwNnqm3SWehvdlnjNzWHMeMR0je 5vZ8xcpIyvbiLw/n1tKxJ7+icKPijUE3J50NTTkIwWTC8X6xcCEjKgxmtAW0fYlY 1t3DQU/VsL3dqyCvKg5jy5LgHqAuTeQN9GnmGLaxojZbWEkXx5ldzALkpPJ3uFQm e1sUB0vKVPy0zFjjp4sPwwOFy44BDPODlzQ5qmfTV3Dr4UVV017CJ1fXpAfsRB5m 29T5dx8ethwIpZB5/je/u22svPBZsd8uojZyUUEuIdquJ3TcKH4= =5jr9 -----END PGP SIGNATURE----- --nextPart3893866.MHq7AAxBmi--