diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-09-20 12:11:51 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-09-28 08:02:10 +0100 |
| commit | d63a01674895979c035e2e16b79ff7ec22f2611a (patch) | |
| tree | b51518a9adeca9f93dcd4c3c88c2536fce7a7120 | |
| parent | 8ab37a166f1e43fe3d18e1a01f6f8937c81685cb (diff) | |
| download | poky-d63a01674895979c035e2e16b79ff7ec22f2611a.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: 35dbd02b73a586db9e09c6a6d36252244ea5e91f)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit cf33e2ab2693eafaf0e5fc45666355d60e084281)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-kernel/perf/perf.bb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index 95b4362958..772bc2dea1 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb | |||
| @@ -144,6 +144,9 @@ do_install() { | |||
| 144 | # we are checking for this make target to be compatible with older perf versions | 144 | # we are checking for this make target to be compatible with older perf versions |
| 145 | if ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'true', 'false', d)} && grep -q install-python_ext ${S}/tools/perf/Makefile*; then | 145 | if ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'true', 'false', d)} && grep -q install-python_ext ${S}/tools/perf/Makefile*; then |
| 146 | oe_runmake DESTDIR=${D} install-python_ext | 146 | oe_runmake DESTDIR=${D} install-python_ext |
| 147 | if [ -e ${D}${libdir}/python*/site-packages/perf-*/SOURCES.txt ]; then | ||
| 148 | sed -i -e 's#${WORKDIR}##g' ${D}${libdir}/python*/site-packages/perf-*/SOURCES.txt | ||
| 149 | fi | ||
| 147 | fi | 150 | fi |
| 148 | } | 151 | } |
| 149 | 152 | ||
| @@ -244,6 +247,9 @@ do_configure:prepend () { | |||
| 244 | # change the Makefile line to remove everything before 'tools/perf' | 247 | # change the Makefile line to remove everything before 'tools/perf' |
| 245 | sed -i -e "s%srcdir_SQ = \$(subst ','\\\'',\$(srcdir))%srcdir_SQ = \$(patsubst \%tools/perf,tools/perf,\$(subst ','\\\'',\$(srcdir)))%g" \ | 248 | sed -i -e "s%srcdir_SQ = \$(subst ','\\\'',\$(srcdir))%srcdir_SQ = \$(patsubst \%tools/perf,tools/perf,\$(subst ','\\\'',\$(srcdir)))%g" \ |
| 246 | ${S}/tools/perf/Makefile.config | 249 | ${S}/tools/perf/Makefile.config |
| 250 | # Avoid hardcoded path to python-native | ||
| 251 | sed -i -e 's#\(PYTHON_WORD := \)$(call shell-wordify,$(PYTHON))#\1 python3#g' \ | ||
| 252 | ${S}/tools/perf/Makefile.config | ||
| 247 | fi | 253 | fi |
| 248 | if [ -e "${S}/tools/perf/tests/Build" ]; then | 254 | if [ -e "${S}/tools/perf/tests/Build" ]; then |
| 249 | # OUTPUT is the full path, we have python on the path so we remove it from the | 255 | # OUTPUT is the full path, we have python on the path so we remove it from the |
