diff mbox series

[2/5] systemtap: correctly set include location for the python module

Message ID 20250606205809.4071299-2-alex.kanavin@gmail.com
State New
Headers show
Series [1/5] kea: correctly eliminate build host paths from installed file | expand

Commit Message

Alexander Kanavin June 6, 2025, 8:58 p.m. UTC
From: Alexander Kanavin <alex@linutronix.de>

This issue was as well exposed by setting S to be in UNPACKDIR.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 ...am-use-absolute-path-for-source-dire.patch | 36 +++++++++++++++++++
 .../recipes-kernel/systemtap/systemtap_git.bb |  1 +
 2 files changed, 37 insertions(+)
 create mode 100644 meta/recipes-kernel/systemtap/systemtap/0001-python-Makefile.am-use-absolute-path-for-source-dire.patch
diff mbox series

Patch

diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-python-Makefile.am-use-absolute-path-for-source-dire.patch b/meta/recipes-kernel/systemtap/systemtap/0001-python-Makefile.am-use-absolute-path-for-source-dire.patch
new file mode 100644
index 00000000000..dacd19edd1d
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/0001-python-Makefile.am-use-absolute-path-for-source-dire.patch
@@ -0,0 +1,36 @@ 
+From 71e4ffd46dbbb7de1d06edb66f3e1fe0de423586 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Wed, 21 May 2025 13:25:46 +0200
+Subject: [PATCH] python/Makefile.am: use absolute path for source directory
+ includes as well
+
+Otherwise it would be relative to the build directory,
+which works only if the build and source directory are in the
+same parent directory, and breaks if they're on different levels.
+
+Upstream-Status: Submitted [by email to fche@redhat.com,wcohen@redhat.com,systemtap@sourceware.org]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ python/Makefile.am | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/python/Makefile.am b/python/Makefile.am
+index 9d5cb7bcb..130e90b24 100644
+--- a/python/Makefile.am
++++ b/python/Makefile.am
+@@ -2,10 +2,10 @@
+ 
+ AUTOMAKE_OPTIONS = subdir-objects
+ 
+-# Note that we have to use 'abs_builddir' here since we change
++# Note that we have to use absolute directores here since we change
+ # directories back to the source directory when building the python
+ # extension.
+-AM_CPPFLAGS = -I$(srcdir)/../includes
++AM_CPPFLAGS = -I$(abs_srcdir)/../includes
+ AM_CPPFLAGS += -I$(abs_builddir)/../includes/sys
+ 
+ # Add OE's CFLAGS which contains `-fdebug-prefix-map' options to
+-- 
+2.39.5
+
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.bb b/meta/recipes-kernel/systemtap/systemtap_git.bb
index 254bac4d6f9..588b3b8d36f 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.bb
+++ b/meta/recipes-kernel/systemtap/systemtap_git.bb
@@ -9,6 +9,7 @@  require systemtap_git.inc
 SRC_URI += " \
            file://0001-improve-reproducibility-for-c-compiling.patch \
            file://0001-staprun-address-ncurses-6.3-failures.patch \
+           file://0001-python-Makefile.am-use-absolute-path-for-source-dire.patch \
            "
 
 DEPENDS = "elfutils"