grub:master

Last commit made on 2024-04-11
Get this branch:
git clone -b master https://git.launchpad.net/grub

Branch merges

Branch information

Name:
master
Repository:
lp:grub

Recent commits

8719cc2... by Daniel Kiper <email address hidden>

windows: Add _stack_chk_guard/_stack_chk_fail symbols for Windows 64-bit target

Otherwise the GRUB cannot start due to missing symbols when stack
protector is enabled on EFI platforms.

Signed-off-by: Daniel Kiper <email address hidden>
Reviewed-by: Vladimir Serbinenko <email address hidden>

0876fdf... by Gary Lin <email address hidden>

util/bash-completion: Fix for bash-completion 2.12

_split_longopt() was the bash-completion private API and removed since
bash-completion 2.12. This commit initializes the bash-completion
general variables with _init_completion() to avoid the potential
"command not found" error.

Although bash-completion 2.12 introduces _comp_initialize() to deprecate
_init_completion(), _init_completion() is still chosen for the better
backward compatibility.

Signed-off-by: Gary Lin <email address hidden>
Reviewed-by: Daniel Kiper <email address hidden>

28c4405... by phcoder

util/grub-fstest: Add a new command zfs-bootfs

It is useful to check zfs-bootfs command.

Signed-off-by: Vladimir Serbinenko <email address hidden>
Reviewed-by: Daniel Kiper <email address hidden>

52e039e... by phcoder

efi: Enable CMOS on x86 EFI platforms

The CMOS actually exists on most EFI platforms and in some cases is used to
store useful data that makes it justifiable for GRUB to read/write it.

As for date and time keep using EFI API and not CMOS one.

Signed-off-by: Vladimir Serbinenko <email address hidden>
Reviewed-by: Daniel Kiper <email address hidden>

aa80270... by phcoder

acpi: Mark MADT entries as packed

No alignment is guaranteed and in fact on my IA-64 SAPIC is aligned
to 4 bytes instead of 8 and causes a trap. It affects only rarely used
lsacpi command and so went unnoticed.

Signed-off-by: Vladimir Serbinenko <email address hidden>
Reviewed-by: Daniel Kiper <email address hidden>

39c927d... by Michael Chang <email address hidden>

gfxmenu/view: Resolve false grub_errno disrupting boot process

When enabling gfxmenu and choosing to boot the Xen hypervisor from its
menu, an error occurred:

  error: ../../grub-core/video/bitmap_scale.c:42:null src bitmap in grub_video_create_scaled.

The error is returned by grub_video_bitmap_create_scaled() when the
source pixmap is not there. The init_background() uses it to scale up
the background image so it can fully fit into the screen resolution.

However not all backgrounds are set by a image, i.e. the "desktop-image"
property of the theme file. Instead a color code may be used, for
example OpenSUSE's green background uses "desktop-color" property:

  desktop-color: "#0D202F"

So it is absolutely fine to call init_background() without a raw pixmap
if color code is used. A missing check has to be added to ensure the
grub_errno will not be erroneously set and gets in the way of ensuing
boot process.

The reason it happens sporadically is due to grub_errno is reset to
GRUB_ERR_NONE in other places if a function's error return can be
ignored. In particular this hunk in grub_gfxmenu_create_box() does the
majority of the reset of grub_errno returned by init_background(), but
the path may not be always chosen.

  grub_video_bitmap_load (&box->raw_pixmaps[i], path);
  grub_free (path);

  /* Ignore missing pixmaps. */
  grub_errno = GRUB_ERR_NONE;

In any case, we cannot account on such random behavior and should only
return grub_errno if it is justified.

On the occasion move the grub_video_bitmap struct definition to the
beginning of the function.

Signed-off-by: Michael Chang <email address hidden>
Reviewed-by: Daniel Kiper <email address hidden>

68dd65c... by Jon DeVree <email address hidden>

fs/xfs: Handle non-continuous data blocks in directory extents

The directory extent list does not have to be a continuous list of data
blocks. When GRUB tries to read a non-existant member of the list,
grub_xfs_read_file() will return a block of zero'ed memory. Checking for
a zero'ed magic number is sufficient to skip this non-existant data block.

Prior to commit 07318ee7e (fs/xfs: Fix XFS directory extent parsing)
this was handled as a subtle side effect of reading the (non-existant)
tail data structure. Since the block was zero'ed the computation of the
number of directory entries in the block would return 0 as well.

Fixes: 07318ee7e (fs/xfs: Fix XFS directory extent parsing)
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2254370

Signed-off-by: Jon DeVree <email address hidden>
Reviewed-By: Vladimir Serbinenko <email address hidden>
Reviewed-by: Daniel Kiper <email address hidden>

04d2a50... by Julian Andres Klode

Revert "templates: Reinstate unused version comparison functions with warning"

We reinstated these functions before the 2.12 release with a warning
such that users upgrading to 2.12 who had custom scripts using them
would not get broken in the upgrade and agreed to remove them after
the 2.12 release. This removes them accordingly.

This reverts commit e7a831963 (templates: Reinstate unused version
comparison functions with warning).

Cc: Mathieu Desnoyers <email address hidden>
Cc: Daniel Kiper <email address hidden>
Signed-off-by: Julian Andres Klode <email address hidden>
Reviewed-by: Daniel Kiper <email address hidden>

4380c2d... by Gary Lin <email address hidden>

util/bash-completion: Load scripts on demand

There are two system directories for bash-completion scripts. One is
/usr/share/bash-completion/completions/ and the other is
/etc/bash_completion.d/. The "etc" scripts are loaded in advance and
for backward compatibility while the "usr" scripts are loaded on demand.
To load scripts on demand it requires a corresponding script for every
command. So, the main bash-completion script is split into several
subscripts for different "grub-*" commands. To share the code the real
completion functions are still implemented in "grub" and each
subscript sources "grub" and invokes the corresponding function.

Signed-off-by: Gary Lin <email address hidden>
Reviewed-by: Daniel Kiper <email address hidden>

9e1b18f... by Samuel thibault

util/grub.d/10_hurd.in: Find proper ld.so on 64-bit systems

The 64-bit ABI defines ld.so to be /lib/ld-x86-64.so.1.

Signed-off-by: Samuel Thibault <email address hidden>
Reviewed-by: Daniel Kiper <email address hidden>