From ff3ad8e7b7d1df81d979fff987c4b3a6c855a617 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Sat, 18 Apr 2020 22:55:34 +0800 Subject: optee-test-qoriq: add patch to use python3 python2 is EOL January 2020. This fixes build failure due to python2. Signed-off-by: Ting Liu --- .../0001-use-python3-instead-of-python.patch | 48 ++++++++++++++++++++++ recipes-security/optee/optee-test-qoriq_git.bb | 1 + 2 files changed, 49 insertions(+) create mode 100644 recipes-security/optee/optee-test-qoriq/0001-use-python3-instead-of-python.patch diff --git a/recipes-security/optee/optee-test-qoriq/0001-use-python3-instead-of-python.patch b/recipes-security/optee/optee-test-qoriq/0001-use-python3-instead-of-python.patch new file mode 100644 index 00000000..20f190af --- /dev/null +++ b/recipes-security/optee/optee-test-qoriq/0001-use-python3-instead-of-python.patch @@ -0,0 +1,48 @@ +From 6271160639002a2580d80b75b5397a96d56329f2 Mon Sep 17 00:00:00 2001 +From: Scott Branden +Date: Fri, 27 Dec 2019 12:54:28 -0800 +Subject: [PATCH] use python3 instead of python + +use python3 instead of python as python2 is EOL January 2020. + +Signed-off-by: Scott Branden +Reviewed-by: Jerome Forissier +Tested-by: Jerome Forissier (QEMU, CFG_GCM_NIST_VECTORS=y) +Upstream-Status: Backport from v3.8.0 +--- + scripts/file_to_c.py | 4 ++-- + scripts/rsp_to_gcm_test.py | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/scripts/file_to_c.py b/scripts/file_to_c.py +index ae16f52..b4ce2a2 100755 +--- a/scripts/file_to_c.py ++++ b/scripts/file_to_c.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: BSD-2-Clause + # + # Copyright (c) 2018, Linaro Limited +@@ -29,7 +29,7 @@ def main(): + + f.write("const uint8_t " + args.name + "[] = {\n") + i = 0 +- for x in array.array("B", inf.read()): ++ for x in array.array("B", map(ord, (inf.read()))): + f.write("0x" + '{0:02x}'.format(x) + ",") + i = i + 1 + if i % 8 == 0: +diff --git a/scripts/rsp_to_gcm_test.py b/scripts/rsp_to_gcm_test.py +index 0543541..e4418be 100755 +--- a/scripts/rsp_to_gcm_test.py ++++ b/scripts/rsp_to_gcm_test.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + modes = {'encrypt': 0, 'decrypt': 1} + +-- +2.7.4 + diff --git a/recipes-security/optee/optee-test-qoriq_git.bb b/recipes-security/optee/optee-test-qoriq_git.bb index 7205e9de..b66725c7 100644 --- a/recipes-security/optee/optee-test-qoriq_git.bb +++ b/recipes-security/optee/optee-test-qoriq_git.bb @@ -10,6 +10,7 @@ inherit python3native SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_test;nobranch=1 \ file://0001-fix-build-failure-with-GCC-9.patch \ + file://0001-use-python3-instead-of-python.patch \ " S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf