summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/systemtap
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/systemtap')
-rw-r--r--meta/recipes-kernel/systemtap/systemtap-native_git.bb2
-rw-r--r--meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb40
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/0001-Makefile.am-remove-runtime-linux-uprobes-and-runtime.patch40
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/0001-bpf-translate.cxx-fix-build-against-upcoming-gcc-14-.patch40
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/0001-configure.ac-fix-broken-libdebuginfod-library-auto-d.patch51
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/0001-prerelease-datestamp-fixes.patch23
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/0001-staprun-address-ncurses-6.3-failures.patch61
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/0001-staprun-fix-build-against-upcoming-gcc-14-Werror-cal.patch36
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/0001-transport-protect-include-and-callsite-with-same-con.patch44
-rw-r--r--meta/recipes-kernel/systemtap/systemtap_git.bb41
-rw-r--r--meta/recipes-kernel/systemtap/systemtap_git.inc18
11 files changed, 287 insertions, 109 deletions
diff --git a/meta/recipes-kernel/systemtap/systemtap-native_git.bb b/meta/recipes-kernel/systemtap/systemtap-native_git.bb
index 19cc1cf0f0..2690b259c8 100644
--- a/meta/recipes-kernel/systemtap/systemtap-native_git.bb
+++ b/meta/recipes-kernel/systemtap/systemtap-native_git.bb
@@ -1,6 +1,6 @@
1 1
2require systemtap_git.bb 2require systemtap_git.bb
3 3
4inherit native 4inherit_defer native
5 5
6addtask addto_recipe_sysroot after do_populate_sysroot before do_build 6addtask addto_recipe_sysroot after do_populate_sysroot before do_build
diff --git a/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb b/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb
deleted file mode 100644
index 46820ef489..0000000000
--- a/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb
+++ /dev/null
@@ -1,40 +0,0 @@
1SUMMARY = "UProbes kernel module for SystemTap"
2
3require systemtap_git.inc
4
5DEPENDS = "systemtap virtual/kernel"
6
7# On systems without CONFIG_UTRACE, this package is empty.
8ALLOW_EMPTY_${PN} = "1"
9
10inherit module-base gettext
11
12FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemtap:"
13
14FILES_${PN} += "${datadir}/systemtap/runtime/uprobes"
15
16# Compile and install the uprobes kernel module on machines with utrace
17# support. Note that staprun expects it in the systemtap/runtime directory,
18# not in /lib/modules.
19do_compile() {
20 if grep -q "CONFIG_UTRACE=y" ${STAGING_KERNEL_BUILDDIR}/.config
21 then
22 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS CC LD CPP
23 oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
24 AR="${KERNEL_AR}" \
25 -C ${STAGING_KERNEL_DIR} scripts
26 oe_runmake KDIR=${STAGING_KERNEL_DIR} \
27 M="${S}/runtime/uprobes/" \
28 CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
29 AR="${KERNEL_AR}" \
30 -C "${S}/runtime/uprobes/"
31 fi
32}
33
34do_install() {
35 if [ -e "${S}/runtime/uprobes/uprobes.ko" ]
36 then
37 install -d ${D}${datadir}/systemtap/runtime/uprobes/
38 install -m 0644 ${S}/runtime/uprobes/uprobes.ko ${D}${datadir}/systemtap/runtime/uprobes/
39 fi
40}
diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-Makefile.am-remove-runtime-linux-uprobes-and-runtime.patch b/meta/recipes-kernel/systemtap/systemtap/0001-Makefile.am-remove-runtime-linux-uprobes-and-runtime.patch
new file mode 100644
index 0000000000..2d46a3962d
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/0001-Makefile.am-remove-runtime-linux-uprobes-and-runtime.patch
@@ -0,0 +1,40 @@
1From 5a01e28bd806326b2143e3e6bb28d4780c5d879d Mon Sep 17 00:00:00 2001
2From: Victor Kamensky <victor.kamensky7@gmail.com>
3Date: Sun, 3 Dec 2023 18:40:05 -0800
4Subject: [PATCH] Makefile.am: remove runtime/linux/uprobes and
5 runtime/linux/uprobes2 install
6
7"PR30434 continuation: Removed old uprobes, uprobes2 implementation,
8uprobes-inc.h & any mentions of CONFIG_UTRACE." commit removed uprobes,
9and uprobes2 sources and directories, but Makefile.am still tries to
10install them. In fact after failing to 'cd' into runtime/linux/uprobes
11directory it copies top level *.[ch] files into
12${prefix}/share/systemtap/runtime/linux/uprobes directory.
13
14The issue was caught by OpenEmbedded project do_package_qa checks.
15
16Signed-off-by: Victor Kamensky <victor.kamensky7@gmail.com>
17
18Upstream-Status: Submitted [https://sourceware.org/pipermail/systemtap/2023q4/027880.html]
19---
20 Makefile.am | 4 ----
21 1 file changed, 4 deletions(-)
22
23diff --git a/Makefile.am b/Makefile.am
24index 5737c6b20..2ba896088 100644
25--- a/Makefile.am
26+++ b/Makefile.am
27@@ -277,10 +277,6 @@ endif
28 do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/softfloat/$$f; done)
29 (cd $(srcdir)/runtime/linux; for f in *.[ch]; \
30 do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/linux/$$f; done)
31- (cd $(srcdir)/runtime/linux/uprobes; for f in Makefile *.[ch]; \
32- do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/linux/uprobes/$$f; done)
33- (cd $(srcdir)/runtime/linux/uprobes2; for f in *.[ch]; \
34- do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/runtime/linux/uprobes2/$$f; done)
35 (cd $(srcdir)/tapset; find . \( -name '*.stp' -o -name '*.stpm' -o -name README \) -print \
36 | while read f; do $(INSTALL_DATA) -D $$f $(DESTDIR)$(pkgdatadir)/tapset/$$f; done)
37 (cd $(srcdir)/testsuite/systemtap.examples; find . -type f -print \
38--
392.31.1
40
diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-bpf-translate.cxx-fix-build-against-upcoming-gcc-14-.patch b/meta/recipes-kernel/systemtap/systemtap/0001-bpf-translate.cxx-fix-build-against-upcoming-gcc-14-.patch
new file mode 100644
index 0000000000..e3d94d9312
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/0001-bpf-translate.cxx-fix-build-against-upcoming-gcc-14-.patch
@@ -0,0 +1,40 @@
1From d42139cf9cd26d0c0363fcfe007716baeb8de517 Mon Sep 17 00:00:00 2001
2From: Sergei Trofimovich <slyich@gmail.com>
3Date: Fri, 22 Dec 2023 19:42:38 +0000
4Subject: [PATCH] bpf-translate.cxx: fix build against upcoming `gcc-14`
5 (`-Werror=calloc-transposed-args`)
6
7`gcc-14` added a new `-Wcalloc-transposed-args` warning recently. It
8detected minor infelicity in `calloc()` API usage in `systemtap`:
9
10 bpf-translate.cxx: In function 'bpf::BPF_Section* bpf::output_probe(BPF_Output&, program&, const std::string&, unsigned int)':
11 bpf-translate.cxx:5044:39: error: 'void* calloc(size_t, size_t)' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
12 5044 | bpf_insn *buf = (bpf_insn*) calloc (sizeof(bpf_insn), ninsns);
13 | ^~~~~~~~~~~~~~~~
14 bpf-translate.cxx:5044:39: note: earlier argument should specify number of elements, later size of each element
15
16Upstream-Status: Backport [https://sourceware.org/git/?p=systemtap.git;a=commit;h=d42139cf9cd26d0c0363fcfe007716baeb8de517]
17Signed-off-by: Khem Raj <raj.khem@gmail.com>
18---
19 bpf-translate.cxx | 4 ++--
20 1 file changed, 2 insertions(+), 2 deletions(-)
21
22diff --git a/bpf-translate.cxx b/bpf-translate.cxx
23index 1a9302463..aa8ef65ce 100644
24--- a/bpf-translate.cxx
25+++ b/bpf-translate.cxx
26@@ -5041,9 +5041,9 @@ output_probe(BPF_Output &eo, program &prog,
27 }
28 }
29
30- bpf_insn *buf = (bpf_insn*) calloc (sizeof(bpf_insn), ninsns);
31+ bpf_insn *buf = (bpf_insn*) calloc (ninsns, sizeof(bpf_insn));
32 assert (buf);
33- Elf64_Rel *rel = (Elf64_Rel*) calloc (sizeof(Elf64_Rel), nreloc);
34+ Elf64_Rel *rel = (Elf64_Rel*) calloc (nreloc, sizeof(Elf64_Rel));
35 assert (rel);
36
37 unsigned i = 0, r = 0;
38--
392.43.0
40
diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-configure.ac-fix-broken-libdebuginfod-library-auto-d.patch b/meta/recipes-kernel/systemtap/systemtap/0001-configure.ac-fix-broken-libdebuginfod-library-auto-d.patch
new file mode 100644
index 0000000000..98641826f6
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/0001-configure.ac-fix-broken-libdebuginfod-library-auto-d.patch
@@ -0,0 +1,51 @@
1From 3913ad3e28a19811e1b52338112344a487057e4f Mon Sep 17 00:00:00 2001
2From: Victor Kamensky <victor.kamensky7@gmail.com>
3Date: Mon, 18 Dec 2023 03:13:38 +0000
4Subject: [PATCH 1/2] configure.ac: fix broken libdebuginfod library auto
5 detection
6
7After 2e67b053e3796ee7cf29a39f9698729b52078406 "configury: rework debuginfod searches"
8commit, libdebuginfod.so library auto detection is broken. It was reported by Martin Jansa
9on openembedded-core mailing list [1].
10
11Currently configure.ac does "AC_DEFINE([HAVE_LIBDEBUGINFOD], [1] ..." as long as
12no --without-debuginfod option is passed, regardless PKG_CHECK_MODULES check result.
13It seems to be bad copy/paste. Address the issue by moving the AC_DEFINE back to
14PKG_CHECK_MODULES action-if-found block.
15
16To reproduce the issue on FC system, one can do the following
17"sudo dnf remove elfutils-debuginfod-client-devel" and then try to build SystemTap
18util.cxx will fail to compile because of missing elfutils/debuginfod.h because
19config.h will have "#define HAVE_LIBDEBUGINFOD 1", while config.log and configure
20output indicates that check for libdebuginfod library failed.
21
22[1] https://lists.openembedded.org/g/openembedded-core/message/192109?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3Acreated%2C0%2Csystemtap%2C20%2C2%2C0%2C102987514
23
24Upstream-Status: Submitted [https://sourceware.org/pipermail/systemtap/2023q4/027914.html]
25Signed-off-by: Victor Kamensky <victor.kamensky7@gmail.com>
26---
27 configure.ac | 5 ++---
28 1 file changed, 2 insertions(+), 3 deletions(-)
29
30diff --git a/configure.ac b/configure.ac
31index d9559c5c3..18cd7f84a 100644
32--- a/configure.ac
33+++ b/configure.ac
34@@ -219,12 +219,11 @@ dnl take the user at his or her word
35 elif test "x$with_debuginfod" != xno; then
36 dnl check in the system pkgconfig
37 PKG_CHECK_MODULES([debuginfod], [libdebuginfod >= 0.179],
38- [have_debuginfod=1],
39+ [have_debuginfod=1
40+ AC_DEFINE([HAVE_LIBDEBUGINFOD], [1], [Define to 1 if debuginfod is enabled.])],
41 [if test "x$with_debuginfod" = xyes; then
42 AC_MSG_ERROR(["--with-debuginfod was given, but libdebuginfod is missing or unusable."])
43 fi])
44- AC_DEFINE([HAVE_LIBDEBUGINFOD], [1], [Define to 1 if debuginfod is enabled.])
45- AC_MSG_RESULT([yes])
46 else
47 AC_MSG_RESULT([no])
48 fi
49--
502.31.1
51
diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-prerelease-datestamp-fixes.patch b/meta/recipes-kernel/systemtap/systemtap/0001-prerelease-datestamp-fixes.patch
new file mode 100644
index 0000000000..afdc10a3fe
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/0001-prerelease-datestamp-fixes.patch
@@ -0,0 +1,23 @@
1From cfc2c1d53924face11e3fab78ded61c359778eb9 Mon Sep 17 00:00:00 2001
2From: "Frank Ch. Eigler" <fche@redhat.com>
3Date: Sat, 4 Nov 2023 12:19:59 -0400
4Subject: [PATCH] prerelease datestamp fixes
5
6Upstream-Status: Backport
7---
8 NEWS | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-)
10
11diff --git a/NEWS b/NEWS
12index c7f31e8b7..f0f9056c4 100644
13--- a/NEWS
14+++ b/NEWS
15@@ -1,4 +1,4 @@
16-* What's new in version 5.0, 2023-11-03
17+* What's new in version 5.0, 2023-11-04
18
19 - Performance improvements in uprobe registration and module startup.
20
21--
222.31.1
23
diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-staprun-address-ncurses-6.3-failures.patch b/meta/recipes-kernel/systemtap/systemtap/0001-staprun-address-ncurses-6.3-failures.patch
new file mode 100644
index 0000000000..1decf21593
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/0001-staprun-address-ncurses-6.3-failures.patch
@@ -0,0 +1,61 @@
1From 191f528da19193d713d94ee252e2485efd9af4d3 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Mon, 25 Oct 2021 17:59:24 +0200
4Subject: [PATCH] staprun: address ncurses 6.3 failures
5
6Upstream-Status: Submitted [by email to smakarov@redhat.com,systemtap@sourceware.org]
7Signed-off-by: Alexander Kanavin <alex@linutronix.de>
8---
9 staprun/monitor.c | 24 ++++++++++++------------
10 1 file changed, 12 insertions(+), 12 deletions(-)
11
12diff --git a/staprun/monitor.c b/staprun/monitor.c
13index 478634c09..f4fbfd686 100644
14--- a/staprun/monitor.c
15+++ b/staprun/monitor.c
16@@ -448,12 +448,12 @@ void monitor_render(void)
17 if (active_window == 0)
18 wattron(status, A_BOLD);
19 wprintw(status, "\n%*s\t%*s\t%*s\t%*s\t%*s\t%*s\t%s\n",
20- width[p_index], HIGHLIGHT("index", p_index, comp_fn_index),
21- width[p_state], HIGHLIGHT("state", p_state, comp_fn_index),
22- width[p_hits], HIGHLIGHT("hits", p_hits, comp_fn_index),
23- width[p_min], HIGHLIGHT("min", p_min, comp_fn_index),
24- width[p_avg], HIGHLIGHT("avg", p_avg, comp_fn_index),
25- width[p_max], HIGHLIGHT("max", p_max, comp_fn_index),
26+ (int)width[p_index], HIGHLIGHT("index", p_index, comp_fn_index),
27+ (int)width[p_state], HIGHLIGHT("state", p_state, comp_fn_index),
28+ (int)width[p_hits], HIGHLIGHT("hits", p_hits, comp_fn_index),
29+ (int)width[p_min], HIGHLIGHT("min", p_min, comp_fn_index),
30+ (int)width[p_avg], HIGHLIGHT("avg", p_avg, comp_fn_index),
31+ (int)width[p_max], HIGHLIGHT("max", p_max, comp_fn_index),
32 HIGHLIGHT("name", p_name, comp_fn_index));
33 if (active_window == 0)
34 wattroff(status, A_BOLD);
35@@ -466,17 +466,17 @@ void monitor_render(void)
36 json_object *probe, *field;
37 probe = json_object_array_get_idx(jso_probe_list, i);
38 json_object_object_get_ex(probe, "index", &field);
39- wprintw(status, "%*s\t", width[p_index], json_object_get_string(field));
40+ wprintw(status, "%*s\t", (int)width[p_index], json_object_get_string(field));
41 json_object_object_get_ex(probe, "state", &field);
42- wprintw(status, "%*s\t", width[p_state], json_object_get_string(field));
43+ wprintw(status, "%*s\t", (int)width[p_state], json_object_get_string(field));
44 json_object_object_get_ex(probe, "hits", &field);
45- wprintw(status, "%*s\t", width[p_hits], json_object_get_string(field));
46+ wprintw(status, "%*s\t", (int)width[p_hits], json_object_get_string(field));
47 json_object_object_get_ex(probe, "min", &field);
48- wprintw(status, "%*s\t", width[p_min], json_object_get_string(field));
49+ wprintw(status, "%*s\t", (int)width[p_min], json_object_get_string(field));
50 json_object_object_get_ex(probe, "avg", &field);
51- wprintw(status, "%*s\t", width[p_avg], json_object_get_string(field));
52+ wprintw(status, "%*s\t", (int)width[p_avg], json_object_get_string(field));
53 json_object_object_get_ex(probe, "max", &field);
54- wprintw(status, "%*s\t", width[p_max], json_object_get_string(field));
55+ wprintw(status, "%*s\t", (int)width[p_max], json_object_get_string(field));
56 getyx(status, discard, cur_x);
57 json_object_object_get_ex(probe, "name", &field);
58 wprintw(status, "%.*s", max_cols-cur_x-1, json_object_get_string(field));
59--
602.20.1
61
diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-staprun-fix-build-against-upcoming-gcc-14-Werror-cal.patch b/meta/recipes-kernel/systemtap/systemtap/0001-staprun-fix-build-against-upcoming-gcc-14-Werror-cal.patch
new file mode 100644
index 0000000000..22578fb3f6
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/0001-staprun-fix-build-against-upcoming-gcc-14-Werror-cal.patch
@@ -0,0 +1,36 @@
1From 52596f023652114642faba5726c99488529029ce Mon Sep 17 00:00:00 2001
2From: Sergei Trofimovich <slyich@gmail.com>
3Date: Thu, 21 Dec 2023 10:00:06 +0000
4Subject: [PATCH] staprun: fix build against upcoming `gcc-14`
5 (`-Werror=calloc-transposed-args`)
6
7`gcc-14` added a new `-Wcalloc-transposed-args` warning recently. It
8detected minor infelicity in `calloc()` API usage in `systemtap`:
9
10 staprun.c: In function 'main':
11 staprun.c:550:50: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
12 550 | char ** new_argv = calloc(sizeof(char *),argc+2);
13 | ^~~~
14
15Upstream-Status: Backport [https://sourceware.org/git/?p=systemtap.git;a=commit;h=52596f023652114642faba5726c99488529029ce]
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18 staprun/staprun.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21diff --git a/staprun/staprun.c b/staprun/staprun.c
22index 8437f3af6..d1b0b221b 100644
23--- a/staprun/staprun.c
24+++ b/staprun/staprun.c
25@@ -547,7 +547,7 @@ int main(int argc, char **argv)
26 us to extend argv[], with all the C fun that entails. */
27 #ifdef HAVE_OPENAT
28 if (relay_basedir_fd >= 0) {
29- char ** new_argv = calloc(sizeof(char *),argc+2);
30+ char ** new_argv = calloc(argc+2, sizeof(char *));
31 const int new_Foption_size = 10; /* -FNNNNN */
32 char * new_Foption = malloc(new_Foption_size);
33 int i;
34--
352.43.0
36
diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-transport-protect-include-and-callsite-with-same-con.patch b/meta/recipes-kernel/systemtap/systemtap/0001-transport-protect-include-and-callsite-with-same-con.patch
deleted file mode 100644
index efc79f6c0f..0000000000
--- a/meta/recipes-kernel/systemtap/systemtap/0001-transport-protect-include-and-callsite-with-same-con.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From cbf27cd54071f788231e69d96dbaad563f1010d4 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@gmail.com>
3Date: Fri, 18 Dec 2020 13:15:08 -0500
4Subject: [PATCH] transport: protect include and callsite with same conditional
5
6transport.c has the following code block:
7
8 if (!debugfs_p && security_locked_down (LOCKDOWN_DEBUGFS))
9
10Which is protected by the conditional STAPCONF_LOCKDOWN_DEBUGFS.
11
12linux/security.h provides the definition of LOCKDOWN_DEBUGFS, and
13must be included or we have a compilation issue.
14
15The include of security.h is protected by #ifdef CONFIG_SECURITY_LOCKDOWN_LSM,
16which means that in some configurations we can get out of sync with
17the include and the callsite.
18
19If we protect the include and the callsite with the same #ifdef, we can
20be sure that they will be consistent.
21
22Upstream-status: Inappropriate (kernel-devsrc specific)
23
24Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
25---
26 runtime/transport/transport.c | 2 +-
27 1 file changed, 1 insertion(+), 1 deletion(-)
28
29diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c
30index bb4a98bd3..88e20ea28 100644
31--- a/runtime/transport/transport.c
32+++ b/runtime/transport/transport.c
33@@ -21,7 +21,7 @@
34 #include <linux/namei.h>
35 #include <linux/delay.h>
36 #include <linux/mutex.h>
37-#ifdef CONFIG_SECURITY_LOCKDOWN_LSM
38+#ifdef STAPCONF_LOCKDOWN_DEBUGFS
39 #include <linux/security.h>
40 #endif
41 #include "../uidgid_compatibility.h"
42--
432.19.1
44
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.bb b/meta/recipes-kernel/systemtap/systemtap_git.bb
index c4a6eef59a..68f5c76428 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.bb
+++ b/meta/recipes-kernel/systemtap/systemtap_git.bb
@@ -6,7 +6,10 @@ HOMEPAGE = "https://sourceware.org/systemtap/"
6 6
7require systemtap_git.inc 7require systemtap_git.inc
8 8
9SRC_URI += "file://0001-improve-reproducibility-for-c-compiling.patch" 9SRC_URI += " \
10 file://0001-improve-reproducibility-for-c-compiling.patch \
11 file://0001-staprun-address-ncurses-6.3-failures.patch \
12 "
10 13
11DEPENDS = "elfutils" 14DEPENDS = "elfutils"
12 15
@@ -21,58 +24,62 @@ STAP_DOCS ?= "--disable-docs --disable-publican --disable-refdocs"
21 24
22EXTRA_OECONF += "${STAP_DOCS} " 25EXTRA_OECONF += "${STAP_DOCS} "
23 26
24PACKAGECONFIG ??= "translator sqlite monitor python3-probes" 27PACKAGECONFIG ??= "translator sqlite monitor python3-probes ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}"
25PACKAGECONFIG[translator] = "--enable-translator,--disable-translator,boost,bash" 28PACKAGECONFIG[translator] = "--enable-translator,--disable-translator,boost,bash"
26PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt" 29PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt"
27PACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3" 30PACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3"
28PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c" 31PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c"
29PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,python3-setuptools-native" 32PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,python3-setuptools-native"
33PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod"
30 34
31inherit autotools gettext pkgconfig systemd 35inherit autotools gettext pkgconfig systemd
32inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3-probes', 'distutils3-base', '', d)} 36inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'python3-probes', 'setuptools3-base', '', d)}
37
38# | ../git/elaborate.cxx:2601:21: error: storing the address of local variable 'sym' in '*s.systemtap_session::symbol_resolver' [-Werror=dangling-pointer=]
39CXXFLAGS += "-Wno-dangling-pointer"
33 40
34# exporter comes with python3-probes 41# exporter comes with python3-probes
35PACKAGES =+ "${PN}-exporter" 42PACKAGES =+ "${PN}-exporter"
36FILES_${PN}-exporter = "${sysconfdir}/stap-exporter/* \ 43FILES:${PN}-exporter = "${sysconfdir}/stap-exporter/* \
37 ${sysconfdir}/sysconfig/stap-exporter \ 44 ${sysconfdir}/sysconfig/stap-exporter \
38 ${systemd_unitdir}/system/stap-exporter.service \ 45 ${systemd_system_unitdir}/stap-exporter.service \
39 ${sbindir}/stap-exporter" 46 ${sbindir}/stap-exporter"
40RDEPENDS_${PN}-exporter = "${PN} python3-core python3-netclient" 47RDEPENDS:${PN}-exporter = "${PN} python3-core python3-netclient"
41SYSTEMD_SERVICE_${PN}-exporter = "stap-exporter.service" 48SYSTEMD_SERVICE:${PN}-exporter = "stap-exporter.service"
42 49
43PACKAGES =+ "${PN}-runtime" 50PACKAGES =+ "${PN}-runtime"
44FILES_${PN}-runtime = "\ 51FILES:${PN}-runtime = "\
45 ${bindir}/staprun \ 52 ${bindir}/staprun \
46 ${bindir}/stap-merge \ 53 ${bindir}/stap-merge \
47 ${bindir}/stapsh \ 54 ${bindir}/stapsh \
48 ${libexecdir}/${BPN}/stapio \ 55 ${libexecdir}/${BPN}/stapio \
49" 56"
50RDEPENDS_${PN}_class-target += "${PN}-runtime" 57RDEPENDS:${PN}:class-target += "${PN}-runtime"
51 58
52PACKAGES =+ "${PN}-examples" 59PACKAGES =+ "${PN}-examples"
53FILES_${PN}-examples = "${datadir}/${BPN}/examples/" 60FILES:${PN}-examples = "${datadir}/${BPN}/examples/"
54RDEPENDS_${PN}-examples += "${PN}" 61RDEPENDS:${PN}-examples += "${PN}"
55 62
56# don't complain that some examples involve bash, perl, php... 63# don't complain that some examples involve bash, perl, php...
57INSANE_SKIP_${PN}-examples += "file-rdeps" 64INSANE_SKIP:${PN}-examples += "file-rdeps"
58 65
59PACKAGES =+ "${PN}-python" 66PACKAGES =+ "${PN}-python"
60FILES_${PN}-python += "\ 67FILES:${PN}-python += "\
61 ${bindir}/dtrace \ 68 ${bindir}/dtrace \
62 ${libdir}/python*/ \ 69 ${libdir}/python*/ \
63 ${libexecdir}/${BPN}/python/ \ 70 ${libexecdir}/${BPN}/python/ \
64" 71"
65# python material requires sdt headers 72# python material requires sdt headers
66RDEPENDS_${PN}-python += "${PN}-dev python3-core" 73RDEPENDS:${PN}-python += "${PN}-dev python3-core"
67INSANE_SKIP_${PN}-python += "dev-deps" 74INSANE_SKIP:${PN}-python += "dev-deps"
68 75
69do_configure_prepend () { 76do_configure:prepend () {
70 # Improve reproducibility for c++ object files 77 # Improve reproducibility for c++ object files
71 reltivepath="${@os.path.relpath(d.getVar('STAGING_INCDIR'), d.getVar('S'))}" 78 reltivepath="${@os.path.relpath(d.getVar('STAGING_INCDIR'), d.getVar('S'))}"
72 sed -i "s:@RELATIVE_STAGING_INCDIR@:$reltivepath:g" ${S}/stringtable.h 79 sed -i "s:@RELATIVE_STAGING_INCDIR@:$reltivepath:g" ${S}/stringtable.h
73} 80}
74 81
75do_install_append () { 82do_install:append () {
76 if [ ! -f ${D}${bindir}/stap ]; then 83 if [ ! -f ${D}${bindir}/stap ]; then
77 # translator disabled case, need to leave only minimal runtime 84 # translator disabled case, need to leave only minimal runtime
78 rm -rf ${D}${datadir}/${PN} 85 rm -rf ${D}${datadir}/${PN}
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc
index 016b423847..c574bcb2ba 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.inc
+++ b/meta/recipes-kernel/systemtap/systemtap_git.inc
@@ -1,17 +1,21 @@
1LICENSE = "GPLv2" 1LICENSE = "GPL-2.0-only"
2LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" 2LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
3SRCREV = "988f439af39a359b4387963ca4633649866d8275" 3SRCREV = "e72dc118e563c645d93a1a2d771e8d90e8fec1ae"
4PV = "4.4" 4PV = "5.0"
5 5
6SRC_URI = "git://sourceware.org/git/systemtap.git \ 6SRC_URI = "git://sourceware.org/git/systemtap.git;branch=master;protocol=https \
7 file://0001-Do-not-let-configure-write-a-python-location-into-th.patch \ 7 file://0001-Do-not-let-configure-write-a-python-location-into-th.patch \
8 file://0001-Install-python-modules-to-correct-library-dir.patch \ 8 file://0001-Install-python-modules-to-correct-library-dir.patch \
9 file://0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch \ 9 file://0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch \
10 file://0001-transport-protect-include-and-callsite-with-same-con.patch \ 10 file://0001-Makefile.am-remove-runtime-linux-uprobes-and-runtime.patch \
11 file://0001-prerelease-datestamp-fixes.patch \
12 file://0001-configure.ac-fix-broken-libdebuginfod-library-auto-d.patch \
13 file://0001-bpf-translate.cxx-fix-build-against-upcoming-gcc-14-.patch \
14 file://0001-staprun-fix-build-against-upcoming-gcc-14-Werror-cal.patch \
11 " 15 "
12 16
13COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64|microblazeel|mips).*-linux' 17COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64|microblazeel|mips|riscv64).*-linux'
14COMPATIBLE_HOST_libc-musl = 'null' 18COMPATIBLE_HOST:libc-musl = 'null'
15 19
16S = "${WORKDIR}/git" 20S = "${WORKDIR}/git"
17 21