diff mbox series

arm/linux-arm64-ack: fix buildpaths in the perf Python module

Message ID 20221107163115.3896537-1-ross.burton@arm.com
State New
Headers show
Series arm/linux-arm64-ack: fix buildpaths in the perf Python module | expand

Commit Message

Ross Burton Nov. 7, 2022, 4:31 p.m. UTC
Use --prefix instead of --root when installing the Python modules to
ensure that build paths are not embedded in the compiled .pyc files.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 ...ge-root-to-prefix-for-python-install.patch | 34 +++++++++++++++++++
 .../linux/linux-arm64-ack_5.15.bb             |  1 +
 2 files changed, 35 insertions(+)
 create mode 100644 meta-arm/recipes-kernel/linux/linux-arm64-ack/0001-perf-change-root-to-prefix-for-python-install.patch
diff mbox series

Patch

diff --git a/meta-arm/recipes-kernel/linux/linux-arm64-ack/0001-perf-change-root-to-prefix-for-python-install.patch b/meta-arm/recipes-kernel/linux/linux-arm64-ack/0001-perf-change-root-to-prefix-for-python-install.patch
new file mode 100644
index 00000000..637d90ae
--- /dev/null
+++ b/meta-arm/recipes-kernel/linux/linux-arm64-ack/0001-perf-change-root-to-prefix-for-python-install.patch
@@ -0,0 +1,34 @@ 
+Take a patch from linux-yocto to fix buildpaths in perf's python module.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+From b8cd0e429bf75b673c438a8277d4bc74327df992 Mon Sep 17 00:00:00 2001
+From: Tom Zanussi <tom.zanussi@intel.com>
+Date: Tue, 3 Jul 2012 13:07:23 -0500
+Subject: [PATCH] perf: change --root to --prefix for python install
+
+Otherwise we get the sysroot path appended to the build path, not what
+we want.
+
+Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
+---
+ tools/perf/Makefile.perf | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
+index 8f738e11356d..ee945d8e3996 100644
+--- a/tools/perf/Makefile.perf
++++ b/tools/perf/Makefile.perf
+@@ -1022,7 +1022,7 @@ install-bin: install-tools install-tests install-traceevent-plugins
+ install: install-bin try-install-man
+ 
+ install-python_ext:
+-	$(PYTHON_WORD) util/setup.py --quiet install --root='/$(DESTDIR_SQ)'
++	$(PYTHON_WORD) util/setup.py --quiet install --prefix='$(DESTDIR_SQ)/usr'
+ 
+ # 'make install-doc' should call 'make -C Documentation install'
+ $(INSTALL_DOC_TARGETS):
+-- 
+2.34.1
+
diff --git a/meta-arm/recipes-kernel/linux/linux-arm64-ack_5.15.bb b/meta-arm/recipes-kernel/linux/linux-arm64-ack_5.15.bb
index c3c9b4dc..804c068f 100644
--- a/meta-arm/recipes-kernel/linux/linux-arm64-ack_5.15.bb
+++ b/meta-arm/recipes-kernel/linux/linux-arm64-ack_5.15.bb
@@ -8,6 +8,7 @@  SRC_URI = " \
     git://android.googlesource.com/kernel/common.git;protocol=https;branch=android13-5.15-lts \
     file://0001-lib-build_OID_registry-fix-reproducibility-issues.patch \
     file://0002-vt-conmakehash-improve-reproducibility.patch \
+    file://0001-perf-change-root-to-prefix-for-python-install.patch \
     "
 
 # tag: ASB-2022-05-05_13-5.15-93-ge8b3f31d7a60