From af11f6ce731707418676042034808954f108b2a0 Mon Sep 17 00:00:00 2001 From: Kai Kang Date: Fri, 1 Apr 2022 10:42:51 +0800 Subject: mcelog: fix compile error Fix compile error of mcelog if no /usr/bin/python exists on build machine. And adjust indent as well. Signed-off-by: Kai Kang Signed-off-by: Khem Raj --- .../mcelog/0001-genconfig.py-update-shebang.patch | 33 ++++++++++++++++++++++ meta-oe/recipes-support/mcelog/mcelog_180.bb | 4 ++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-support/mcelog/mcelog/0001-genconfig.py-update-shebang.patch diff --git a/meta-oe/recipes-support/mcelog/mcelog/0001-genconfig.py-update-shebang.patch b/meta-oe/recipes-support/mcelog/mcelog/0001-genconfig.py-update-shebang.patch new file mode 100644 index 0000000000..10d17f57d8 --- /dev/null +++ b/meta-oe/recipes-support/mcelog/mcelog/0001-genconfig.py-update-shebang.patch @@ -0,0 +1,33 @@ +From b09ff147e9383d33e6adbcb356b52236610fceda Mon Sep 17 00:00:00 2001 +From: Kai Kang +Date: Fri, 1 Apr 2022 10:00:00 +0800 +Subject: [PATCH] genconfig.py: update shebang + +It fails to call genconfig.py if no /usr/bin/python on build machine: + +| ./genconfig.py mcelog.conf config-intro.man > mcelog.conf.5 +| /bin/sh: ./genconfig.py: /usr/bin/python: bad interpreter: No such file or directory +| Makefile:71: recipe for target 'mcelog.conf.5' failed + +Update shebang with 'env python3' instead. + +Upstream-Status: Pending + +Signed-off-by: Kai Kang +--- + genconfig.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/genconfig.py b/genconfig.py +index ce9987f..982cac6 100755 +--- a/genconfig.py ++++ b/genconfig.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/env python3 + # generate man config documentation from mcelog.conf example + # genconfig.py mcelog.conf intro.html + from __future__ import print_function +-- +2.17.1 + diff --git a/meta-oe/recipes-support/mcelog/mcelog_180.bb b/meta-oe/recipes-support/mcelog/mcelog_180.bb index 249e2421c4..a64aacabf9 100644 --- a/meta-oe/recipes-support/mcelog/mcelog_180.bb +++ b/meta-oe/recipes-support/mcelog/mcelog_180.bb @@ -5,8 +5,10 @@ and should run on all Linux systems that need error handling." HOMEPAGE = "https://mcelog.org/" SECTION = "System Environment/Base" -SRC_URI = "git://git.kernel.org/pub/scm/utils/cpu/mce/mcelog.git;protocol=http;;branch=master \ +SRC_URI = "\ + git://git.kernel.org/pub/scm/utils/cpu/mce/mcelog.git;protocol=http;;branch=master \ file://run-ptest \ + file://0001-genconfig.py-update-shebang.patch \ " SRCREV = "4146c9296a0cbd26f1c5e411cb44877f350053bd" -- cgit v1.2.3-54-g00ecf