From 8ca0761fb0651d064a4994be70ab85efffee6e48 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 13 Mar 2022 18:14:54 +0000 Subject: [PATCH] specifically call python3, in scripts with this change, it's unlikely we'll hit errors again. previously, some projects used were calling "python" which in context was python3, but on some setups, the user only has python2 and python3 but no symlink for "python" (which if exists, we assumed linked to python3) now it's unambiguous. docs/build/ can probably be updated now, as a result of this change, to remove the advice about that --- .../default/patches/0015-python-patch.patch | 36 +++++++++++++++++++ ...pecifically-use-python3-in-gentpl.py.patch | 22 ++++++++++++ ...-use-python3-specifically-in-scripts.patch | 35 ++++++++++++++++++ 3 files changed, 93 insertions(+) create mode 100644 resources/coreboot/default/patches/0015-python-patch.patch create mode 100644 resources/grub/patches/0003-specifically-use-python3-in-gentpl.py.patch create mode 100644 resources/seabios/patches/0001-use-python3-specifically-in-scripts.patch diff --git a/resources/coreboot/default/patches/0015-python-patch.patch b/resources/coreboot/default/patches/0015-python-patch.patch new file mode 100644 index 0000000..0f2abc1 --- /dev/null +++ b/resources/coreboot/default/patches/0015-python-patch.patch @@ -0,0 +1,36 @@ +From cb3b04a3849952d8c0fa90616f45cfe5e613a286 Mon Sep 17 00:00:00 2001 +From: Leah Rowe +Date: Sun, 13 Mar 2022 18:04:55 +0000 +Subject: [PATCH 1/1] specifically use python3, in scripts + +--- + src/drivers/intel/fsp2_0/Makefile.inc | 2 +- + util/spdtool/spdtool.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/drivers/intel/fsp2_0/Makefile.inc b/src/drivers/intel/fsp2_0/Makefile.inc +index eaf99d1492..9e82172c9e 100644 +--- a/src/drivers/intel/fsp2_0/Makefile.inc ++++ b/src/drivers/intel/fsp2_0/Makefile.inc +@@ -84,7 +84,7 @@ endif + + ifeq ($(CONFIG_FSP_FULL_FD),y) + $(obj)/Fsp_M.fd: $(call strip_quotes,$(CONFIG_FSP_FD_PATH)) $(DOTCONFIG) +- python 3rdparty/fsp/Tools/SplitFspBin.py split -f $(CONFIG_FSP_FD_PATH) -o "$(obj)" -n "Fsp.fd" ++ python3 3rdparty/fsp/Tools/SplitFspBin.py split -f $(CONFIG_FSP_FD_PATH) -o "$(obj)" -n "Fsp.fd" + + $(obj)/Fsp_S.fd: $(call strip_quotes,$(CONFIG_FSP_FD_PATH)) $(obj)/Fsp_M.fd + true +diff --git a/util/spdtool/spdtool.py b/util/spdtool/spdtool.py +index 89976eac59..2cd7027377 100644 +--- a/util/spdtool/spdtool.py ++++ b/util/spdtool/spdtool.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # spdtool - Tool for partial deblobbing of UEFI firmware images + # SPDX-License-Identifier: GPL-3.0-or-later + # +-- +2.25.1 + diff --git a/resources/grub/patches/0003-specifically-use-python3-in-gentpl.py.patch b/resources/grub/patches/0003-specifically-use-python3-in-gentpl.py.patch new file mode 100644 index 0000000..dd274a5 --- /dev/null +++ b/resources/grub/patches/0003-specifically-use-python3-in-gentpl.py.patch @@ -0,0 +1,22 @@ +From cc315e7b4f9e9b7ac4ed2a662526744c51f789d1 Mon Sep 17 00:00:00 2001 +From: Leah Rowe +Date: Sun, 13 Mar 2022 18:08:57 +0000 +Subject: [PATCH 1/1] specifically use python3 in gentpl.py + +--- + gentpl.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gentpl.py b/gentpl.py +index c86550d4f..cb89cef37 100644 +--- a/gentpl.py ++++ b/gentpl.py +@@ -1,4 +1,4 @@ +-#! /usr/bin/python ++#! /usr/bin/python3 + # GRUB -- GRand Unified Bootloader + # Copyright (C) 2010,2011,2012,2013 Free Software Foundation, Inc. + # +-- +2.25.1 + diff --git a/resources/seabios/patches/0001-use-python3-specifically-in-scripts.patch b/resources/seabios/patches/0001-use-python3-specifically-in-scripts.patch new file mode 100644 index 0000000..9680835 --- /dev/null +++ b/resources/seabios/patches/0001-use-python3-specifically-in-scripts.patch @@ -0,0 +1,35 @@ +From a21f175947d7186e0b5554826e1ae51880a6cfb8 Mon Sep 17 00:00:00 2001 +From: Leah Rowe +Date: Sun, 13 Mar 2022 18:02:26 +0000 +Subject: [PATCH 1/1] use python3 specifically, in scripts + +some systems don't have a python binary anymore, only python2 and +python3 binaries, without creating a symlink to either of them +--- + scripts/acpi_extract.py | 2 +- + scripts/acpi_extract_preprocess.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/scripts/acpi_extract.py b/scripts/acpi_extract.py +index 3ed863b..eb910f3 100755 +--- a/scripts/acpi_extract.py ++++ b/scripts/acpi_extract.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + # Copyright (C) 2011 Red Hat, Inc., Michael S. Tsirkin + # + # This file may be distributed under the terms of the GNU GPLv3 license. +diff --git a/scripts/acpi_extract_preprocess.py b/scripts/acpi_extract_preprocess.py +index 2698118..6963847 100755 +--- a/scripts/acpi_extract_preprocess.py ++++ b/scripts/acpi_extract_preprocess.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + # Copyright (C) 2011 Red Hat, Inc., Michael S. Tsirkin + # + # This file may be distributed under the terms of the GNU GPLv3 license. +-- +2.25.1 +