Ver código fonte

boot/grub2: needs host-python3

When the build host does not have a Python interpreter installed,
host-grub2 is failing to configure due to this missing interpreter.
Note that host-grub2 is the first package to fail because it is a
dependency of grub2. The grub2 target package has the same dependency
requirement.

The issue can be quickly reproduced on a host without Python with the
commands:

    cat <<EOF >.config
    BR2_aarch64=y
    BR2_TARGET_GRUB2=y
    BR2_TOOLCHAIN_EXTERNAL=y
    EOF
    make olddefconfig
    make grub2

grub2 autotools configure.ac search for a Python interpreter since
upstream commit [1] 8b467844e "python: Use AM_PATH_PYTHON to determine
interpreter for gentpl.py", first included in grub v2.04 released
on 2019-07-04. For reference, grub2 has been updated to that version
in commit [2] ea7ec41c "boot/grub2: bump to verson 2.04".

This commit fixes the issue by adding the host-python3 dependency to
host-grub2 and grub2.

Fixes:

    checking for a Python interpreter with version >= 2.6... none
    configure: error: no suitable Python interpreter found

[1] https://git.savannah.gnu.org/gitweb/?p=grub.git;a=commitdiff;h=8b467844e11170077c8ca727c39d2bd36eeb5f08
[2] https://gitlab.com/buildroot.org/buildroot/-/commit/ea7ec41cf64e86a692ac45e0d012c6e8199ef110

Reported-by: Vincent Stehlé <vincent.stehle@arm.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Julien Olivain 10 meses atrás
pai
commit
86bb1b2360
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      boot/grub2/grub2.mk

+ 2 - 2
boot/grub2/grub2.mk

@@ -9,8 +9,8 @@ GRUB2_SITE = http://ftp.gnu.org/gnu/grub
 GRUB2_SOURCE = grub-$(GRUB2_VERSION).tar.xz
 GRUB2_LICENSE = GPL-3.0+
 GRUB2_LICENSE_FILES = COPYING
-GRUB2_DEPENDENCIES = host-bison host-flex host-gawk host-grub2
-HOST_GRUB2_DEPENDENCIES = host-bison host-flex host-gawk
+GRUB2_DEPENDENCIES = host-bison host-flex host-gawk host-grub2 host-python3
+HOST_GRUB2_DEPENDENCIES = host-bison host-flex host-gawk host-python3
 GRUB2_INSTALL_IMAGES = YES
 
 # CVE-2019-14865 is about a flaw in the grub2-set-bootflag tool, which