new file mode 100644
@@ -0,0 +1,48 @@
+From 070fe259ffe163b12aea7fae15dc9f8c6ae6d4c0 Mon Sep 17 00:00:00 2001
+From: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
+Date: Thu, 5 Nov 2026 09:00:00 +0000
+Subject: [PATCH] systemtap: use installer instead of pip for HelperSDT
+
+Pip rejects cross-compiled wheels due to platform tag mismatch,
+breaking 32-bit builds on 64-bit hosts.
+
+Use pypa installer to install the wheel without platform checks,
+eliminating the need for RECORD and direct_url.json cleanup.
+
+Upstream-Status: Submitted [https://sourceware.org/bugzilla/show_bug.cgi?id=34959]
+Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
+---
+ python/Makefile.am | 18 +++++++++++++-----
+ 1 file changed, 13 insertions(+), 5 deletions(-)
+
+diff --git a/python/Makefile.am b/python/Makefile.am
+index 0cb608d5a..226800ad6 100644
+--- a/python/Makefile.am
++++ b/python/Makefile.am
+@@ -35,13 +35,21 @@ if HAVE_PYTHON3_PROBES
+ endif
+
+
+-# Note that we're installing from the wheel we just built.
++# Install the wheel we just built with pypa "installer" rather than pip.
++#
++# The wheel is cross-built and tagged for the target, but it is installed
++# with the native interpreter; pip rejects a wheel whose platform tag does
++# not match the running interpreter, so it cannot install a cross-built
++# wheel. installer simply unpacks the wheel and ignores the tag.
++#
++# --compile-bytecode=0 avoids writing .pyc files that record build paths
++# (they are regenerated on first import), and installer does not write a
++# PEP 610 direct_url.json, so neither needs cleaning up afterwards.
+ install-exec-local:
+ if HAVE_PYTHON3_PROBES
+- $(PYTHON3) -m pip install $(shell readlink -f $(builddir))/py3build/*.whl \
+- $(if $(DESTDIR),--root $(DESTDIR)) --prefix $(prefix) \
+- --no-deps --no-index --no-build-isolation \
+- --ignore-installed --verbose
++ $(PYTHON3) -m installer --compile-bytecode=0 \
++ $(if $(DESTDIR),--destdir $(DESTDIR)) --prefix $(prefix) \
++ $(shell readlink -f $(builddir))/py3build/*.whl
+ endif
+
+ clean-local:
deleted file mode 100644
@@ -1,61 +0,0 @@
-From 3f34320eb37bb583b7bbcec01347a52527991391 Mon Sep 17 00:00:00 2001
-From: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
-Date: Sun, 20 Sep 2026 08:12:00 +0000
-Subject: [PATCH 2/2] python: don't install build paths with the wheel
-
-pip byte-compiles the module it installs using the paths it writes to, so
-with DESTDIR set every .pyc in HelperSDT/__pycache__ records a
-$(DESTDIR)-prefixed source file name, and PEP 610 direct_url.json records
-the file:// URL of the wheel in the build tree. Neither names anything
-that exists on the installed system, and both make the install
-unreproducible; distro QA checks reject them (OpenEmbedded's buildpaths
-test fails the build on all four files).
-
-Pass --no-compile, so the bytecode is generated on first import in the
-right place, and delete direct_url.json after installing. Its line in
-RECORD has to go as well: the line holds a sha256 of the file, and thus of
-the build directory the wheel sat in, so leaving it in place keeps RECORD
-differing between two builds of the same source in different directories
-
-Upstream-Status: Submitted [https://inbox.sourceware.org/systemtap/20260919135744.78642-3-jaipaul.cheernam@est.tech/]
-Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
----
- python/Makefile.am | 19 ++++++++++++++++++-
- 1 file changed, 18 insertions(+), 1 deletion(-)
-
-diff --git a/python/Makefile.am b/python/Makefile.am
-index 0cb608d..ebd1465 100644
---- a/python/Makefile.am
-+++ b/python/Makefile.am
-@@ -36,12 +36,29 @@ endif
-
-
- # Note that we're installing from the wheel we just built.
-+#
-+# --no-compile: pip byte-compiles with the paths it writes to, so with
-+# DESTDIR set the .pyc files record $(DESTDIR)-prefixed source names, which
-+# are wrong on the installed system (and defeat reproducible builds). The
-+# bytecode is regenerated on first import instead.
-+#
-+# PEP 610 direct_url.json records the file:// URL of the wheel in the build
-+# tree, which is likewise meaningless once installed. Delete it, and drop
-+# its line from RECORD too: that line holds a hash of the file, and so of
-+# the build directory, which would keep RECORD varying between builds and
-+# would describe a file that is not installed.
- install-exec-local:
- if HAVE_PYTHON3_PROBES
- $(PYTHON3) -m pip install $(shell readlink -f $(builddir))/py3build/*.whl \
- $(if $(DESTDIR),--root $(DESTDIR)) --prefix $(prefix) \
-- --no-deps --no-index --no-build-isolation \
-+ --no-deps --no-index --no-build-isolation --no-compile \
- --ignore-installed --verbose
-+ rm -f $(DESTDIR)$(python3dir)/*.dist-info/direct_url.json
-+ for r in $(DESTDIR)$(python3dir)/*.dist-info/RECORD; do \
-+ if test -f "$$r"; then \
-+ sed -i '\|/direct_url\.json,|d' "$$r"; \
-+ fi; \
-+ done
- endif
-
- clean-local:
@@ -12,7 +12,7 @@ SRC_URI += " \
file://0001-improve-reproducibility-for-c-compiling.patch \
file://0001-staprun-address-ncurses-6.3-failures.patch \
file://0001-python3.stpm-record-the-installed-libpython-path.patch \
- file://0002-python-don-t-install-build-paths-with-the-wheel.patch \
+ file://0001-systemtap-use-installer-instead-of-pip-for-helpersdt.patch \
"
DEPENDS = "elfutils"
@@ -34,7 +34,7 @@ PACKAGECONFIG[translator] = "--enable-translator,--disable-translator,boost,bash
PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt"
PACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3"
PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c"
-PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,python3-setuptools-native python3-pip-native python3-wheel-native"
+PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,python3-setuptools-native python3-pip-native python3-wheel-native python3-installer-native"
PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod"
PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
Use pypa installer to install the cross-compiled HelperSDT wheel, avoiding pip's host platform tag check that breaks 32-bit builds on 64-bit hosts. This also removes the need for the previous RECORD and direct_url.json cleanup. Tested on qemux86 (core2-32). Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> --- ...staller-instead-of-pip-for-helpersdt.patch | 48 +++++++++++++++ ...t-install-build-paths-with-the-wheel.patch | 61 ------------------- .../recipes-kernel/systemtap/systemtap_5.6.bb | 4 +- 3 files changed, 50 insertions(+), 63 deletions(-) create mode 100644 meta/recipes-kernel/systemtap/systemtap/0001-systemtap-use-installer-instead-of-pip-for-helpersdt.patch delete mode 100644 meta/recipes-kernel/systemtap/systemtap/0002-python-don-t-install-build-paths-with-the-wheel.patch