apitrace's CLI bakes APITRACE_PYTHON_EXECUTABLE, defined unconditionally
to ${Python3_EXECUTABLE} - the absolute path of the python CMake found at
configure time.

On the autobuilder that resolves to the launching
venv python /srv/pokybuild/buildbot-venv/bin/python3, which lives under the
worker HOME, so /usr/bin/apitrace trips:

  QA Issue: File /usr/bin/apitrace in package apitrace contains reference
  to the build host HOME directory [buildpaths]

Signed-off-by: Khem Raj <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
---
 meta-oe/recipes-devtools/apitrace/apitrace_13.0.bb | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/meta-oe/recipes-devtools/apitrace/apitrace_13.0.bb 
b/meta-oe/recipes-devtools/apitrace/apitrace_13.0.bb
index 83e2971552..2c07364835 100644
--- a/meta-oe/recipes-devtools/apitrace/apitrace_13.0.bb
+++ b/meta-oe/recipes-devtools/apitrace/apitrace_13.0.bb
@@ -29,3 +29,14 @@ EXTRA_OECMAKE += "\
 LDFLAGS:append:riscv32 = " -latomic"
 
 SECURITY_CFLAGS:toolchain-clang = ""
+
+# Upstream bakes the absolute python CMake found at configure time
+# (Python3_EXECUTABLE) into the apitrace binary as APITRACE_PYTHON_EXECUTABLE.
+# That path points into the build host (e.g. the autobuilder's
+# /srv/pokybuild/buildbot-venv/bin/python3) which trips the buildpaths QA
+# check and does not exist on the target. The diff/leaks helper subcommands
+# exec it via os::execute(), which uses execvp(), so resolve "python3" through
+# PATH at runtime instead.
+do_configure:prepend() {
+    sed -i -E 
's|(APITRACE_PYTHON_EXECUTABLE=)"[^"]*Python3_EXECUTABLE[^"]*"|\1"python3"|' 
${S}/cli/CMakeLists.txt
+}
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#127937): 
https://lists.openembedded.org/g/openembedded-devel/message/127937
Mute This Topic: https://lists.openembedded.org/mt/120018164/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to