summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/perf
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-09-20 12:11:51 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-09-21 09:20:49 +0100
commitf4951a44c666505d718815d92d3900fcdd5a0304 (patch)
treefe2fd289f9189b6b2b2304edb5ffb5e6e79a089c /meta/recipes-kernel/perf
parent9622beb8034905b2bbc31ed7c8bd770b6fcd19b8 (diff)
downloadpoky-f4951a44c666505d718815d92d3900fcdd5a0304.tar.gz
perf: Fix for recent kernel upgrades
With recent kernel changes in stable, the full path to python was being encoded into binaries and python install files. Add some workarounds for both issues to fix build reproducibility issues. (From OE-Core rev: cf33e2ab2693eafaf0e5fc45666355d60e084281) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/perf')
-rw-r--r--meta/recipes-kernel/perf/perf.bb6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 9f7c300a40..31bc04635d 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -145,6 +145,9 @@ do_install() {
145 # we are checking for this make target to be compatible with older perf versions 145 # we are checking for this make target to be compatible with older perf versions
146 if ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'true', 'false', d)} && grep -q install-python_ext ${S}/tools/perf/Makefile*; then 146 if ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'true', 'false', d)} && grep -q install-python_ext ${S}/tools/perf/Makefile*; then
147 oe_runmake DESTDIR=${D} install-python_ext 147 oe_runmake DESTDIR=${D} install-python_ext
148 if [ -e ${D}${libdir}/python*/site-packages/perf-*/SOURCES.txt ]; then
149 sed -i -e 's#${WORKDIR}##g' ${D}${libdir}/python*/site-packages/perf-*/SOURCES.txt
150 fi
148 fi 151 fi
149} 152}
150 153
@@ -245,6 +248,9 @@ do_configure:prepend () {
245 # change the Makefile line to remove everything before 'tools/perf' 248 # change the Makefile line to remove everything before 'tools/perf'
246 sed -i -e "s%srcdir_SQ = \$(subst ','\\\'',\$(srcdir))%srcdir_SQ = \$(patsubst \%tools/perf,tools/perf,\$(subst ','\\\'',\$(srcdir)))%g" \ 249 sed -i -e "s%srcdir_SQ = \$(subst ','\\\'',\$(srcdir))%srcdir_SQ = \$(patsubst \%tools/perf,tools/perf,\$(subst ','\\\'',\$(srcdir)))%g" \
247 ${S}/tools/perf/Makefile.config 250 ${S}/tools/perf/Makefile.config
251 # Avoid hardcoded path to python-native
252 sed -i -e 's#\(PYTHON_WORD := \)$(call shell-wordify,$(PYTHON))#\1 python3#g' \
253 ${S}/tools/perf/Makefile.config
248 fi 254 fi
249 if [ -e "${S}/tools/perf/tests/Build" ]; then 255 if [ -e "${S}/tools/perf/tests/Build" ]; then
250 # OUTPUT is the full path, we have python on the path so we remove it from the 256 # OUTPUT is the full path, we have python on the path so we remove it from the