Resolves: RHEL-64042

This commit is contained in:
Frank Ch. Eigler 2024-11-11 14:07:03 -05:00
parent c805bfd616
commit ae2f1ae11b
11 changed files with 283 additions and 638 deletions

1
.gitignore vendored
View File

@ -65,3 +65,4 @@
/systemtap-4.9.tar.gz
/systemtap-5.0.tar.gz
/systemtap-5.1.tar.gz
/systemtap-5.2.tar.gz

View File

@ -1,29 +0,0 @@
commit b87891f5aff91b8ebbda8d9218009495848f7747
Author: Martin Cermak <mcermak@redhat.com>
Date: Thu May 16 16:51:08 2024 +0200
PR31495: teach stap-prep to work with other RT kernels
diff --git a/stap-prep b/stap-prep
index 8b429f880..2bbb6bc2f 100755
--- a/stap-prep
+++ b/stap-prep
@@ -103,13 +103,16 @@ done
# 5.14.0-200.rt14.201.el9 ->
# "kernel-rt-debug-5.14.0-200.rt14.201.el9"
# OR?! "kernel-rt-5.14.0-200.rt14.201.el9"
-if expr "$UNAME" : ".*\.rt.*" >/dev/null;
+# OR??!"kernel-rt-5.14.0-447.el9.x86_64+rt"
+if expr "$UNAME" : ".*\.rt.*" || expr "$UNAME" : ".*\+rt.*" >/dev/null;
then
KERNEL=`echo $KERNEL | sed -e s,kernel,kernel-rt,`
fi
KERN_ARCH=`uname -m`
-KERN_REV=`echo $UNAME | sed s/.$KERN_ARCH//` # strip arch from uname
+# strip arch from uname, for kernels like 5.14.0-447.el9.x86_64+rt or
+# 6.9.0-0.rc2.1.el10.x86_64+rt strip the +rt suffix too
+KERN_REV=`echo $UNAME | sed s/.$KERN_ARCH// | sed s/\+rt$//`
if [ -x /usr/bin/dnf4 ]; then
DI="dnf4 debuginfo-install"
DI_DEPS=""

223
PR32302.patch Normal file
View File

@ -0,0 +1,223 @@
commit 8b87bd584dcadb3713eaf6d0c9b540b4f54124bf
gpg: Signature made Mon 11 Nov 2024 11:48:03 AM EST
gpg: using RSA key D8F2E95271BA794E222FBEE0DB83606EC7DAAB26
gpg: Can't check signature: No public key
Author: Martin Cermak <mcermak@redhat.com>
Date: Mon Nov 11 17:41:53 2024 +0100
PR32302: Emit forward decls within tracepoint_derived_probe_group() too
Forward decls added in commit 069def0ae9184 need to actually be
emitted in 2 locations, roughtly corresponding to where
tracepoint_extra_decls() is used.
It would be ideal to put them directly to tracepoint_extra_decls()
but that gives significantly less recognized tracepoints.
The plan is toreview this again though and try to merge the
tracepoint_forward_decls() body into tracepoint_extra_decls()
if possible.
diff --git a/tapsets.cxx b/tapsets.cxx
index b4ad7e14e..06540cafc 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -11729,6 +11729,89 @@ static bool header_exists(systemtap_session& s, const string& header)
return false;
}
+static vector<string> tracepoint_forward_decls ()
+{
+ vector<string> retval;
+ // Kernel 6.12
+ retval.push_back("enum cachefiles_content;");
+ retval.push_back("enum extent_type;");
+ retval.push_back("struct bch_fs;");
+ retval.push_back("struct bch_move_stats;");
+ retval.push_back("struct bpos;");
+ retval.push_back("struct btree_bkey_cached_common;");
+ retval.push_back("struct btree_insert_entry;");
+ retval.push_back("struct btree_path;");
+ retval.push_back("struct btree_trans;");
+ retval.push_back("struct cachefiles_msg;");
+ retval.push_back("struct cachefiles_open;");
+ retval.push_back("struct cachefiles_read;");
+ retval.push_back("struct cachefiles_volume;");
+ retval.push_back("struct clk_rate_request;");
+ retval.push_back("struct compact_control;");
+ retval.push_back("struct fsi_device;");
+ retval.push_back("struct fsi_msg;");
+ retval.push_back("struct fsi_slave;");
+ retval.push_back("struct fuse_req;");
+ retval.push_back("struct get_locks_fail;");
+ retval.push_back("struct gss_cred;");
+ retval.push_back("struct handshake_req;");
+ retval.push_back("struct i2c_client;");
+ retval.push_back("struct ib_mad_agent_private;");
+ retval.push_back("struct ib_mad_qp_info;");
+ retval.push_back("struct ib_mad_send_wr_private;");
+ retval.push_back("struct ib_smp;");
+ retval.push_back("struct iomap;");
+ retval.push_back("struct iomap_iter;");
+ retval.push_back("struct mctp_sk_key;");
+ retval.push_back("struct mptcp_ext;");
+ retval.push_back("struct mptcp_subflow_context;");
+ retval.push_back("struct nbd_request;");
+ retval.push_back("struct netfs_io_request;");
+ retval.push_back("struct netfs_io_stream;");
+ retval.push_back("struct netfs_io_subrequest;");
+ retval.push_back("struct nfs42_clone_args;");
+ retval.push_back("struct nfs42_copy_args;");
+ retval.push_back("struct nfs42_copy_notify_args;");
+ retval.push_back("struct nfs42_copy_notify_res;");
+ retval.push_back("struct nfs42_copy_res;");
+ retval.push_back("struct nfs42_falloc_args;");
+ retval.push_back("struct nfs42_offload_status_args;");
+ retval.push_back("struct nfs42_seek_args;");
+ retval.push_back("struct nfs42_seek_res;");
+ retval.push_back("struct nfs_direct_req;");
+ retval.push_back("struct nfs_page;");
+ retval.push_back("struct opa_smp;");
+ retval.push_back("struct p9_fid;");
+ retval.push_back("struct pwc_device;");
+ retval.push_back("struct request;");
+ retval.push_back("struct rpc_auth;");
+ retval.push_back("struct rpc_gss_wire_cred;");
+ retval.push_back("struct rpcrdma_ep;");
+ retval.push_back("struct rpcrdma_mr;");
+ retval.push_back("struct rpcrdma_notification;");
+ retval.push_back("struct rpcrdma_rep;");
+ retval.push_back("struct rpcrdma_req;");
+ retval.push_back("struct rpcrdma_xprt;");
+ retval.push_back("struct rpc_rqst;");
+ retval.push_back("struct rpc_task;");
+ retval.push_back("struct selinux_audit_data;");
+ retval.push_back("struct spi_device;");
+ retval.push_back("struct svc_rdma_chunk;");
+ retval.push_back("struct svc_rdma_recv_ctxt;");
+ retval.push_back("struct svc_rdma_segment;");
+ retval.push_back("struct svc_rdma_send_ctxt;");
+ retval.push_back("struct svc_rqst;");
+ retval.push_back("struct svcxprt_rdma;");
+ retval.push_back("struct tmigr_cpu;");
+ retval.push_back("struct tmigr_group;");
+ retval.push_back("struct virtio_gpu_ctrl_hdr;");
+ retval.push_back("struct virtqueue;");
+ retval.push_back("struct somenonexistentstruct_123;");
+ retval.push_back("union ifs_sbaf;");
+ retval.push_back("union ifs_sbaf_status;");
+ retval.push_back("union tmigr_state;");
+ return retval;
+}
static vector<string> tracepoint_extra_decls (systemtap_session& s,
const string& header,
@@ -12187,6 +12270,8 @@ tracepoint_derived_probe_group::emit_module_decls (systemtap_session& s)
s.op->newline();
+
+
// We create a MODULE_aux_N.c file for each tracepoint header, to allow them
// to be separately compiled. That's because kernel tracepoint headers sometimes
// conflict. PR13155.
@@ -12207,6 +12292,11 @@ tracepoint_derived_probe_group::emit_module_decls (systemtap_session& s)
tpop = s.op_create_auxiliary();
per_header_aux[header] = tpop;
+ // add needed forward decls/#includes
+ static vector<string> forward_decls = tracepoint_forward_decls();
+ for (unsigned z=0; z<forward_decls.size(); z++)
+ tpop->newline()<< forward_decls[z] << "\n";
+
// PR9993: Add extra headers to work around undeclared types in individual
// include/trace/foo.h files
const vector<string>& extra_decls = tracepoint_extra_decls (s, header,
@@ -12773,83 +12863,10 @@ tracepoint_builder::get_tracequery_modules(systemtap_session& s,
osrc << "#ifdef CONFIG_TRACEPOINTS" << endl;
osrc << "#include <linux/tracepoint.h>" << endl;
- osrc << "enum cachefiles_content;" << endl;
- osrc << "enum extent_type;" << endl;
- osrc << "struct bch_fs;" << endl;
- osrc << "struct bch_move_stats;" << endl;
- osrc << "struct bpos;" << endl;
- osrc << "struct btree_bkey_cached_common;" << endl;
- osrc << "struct btree_insert_entry;" << endl;
- osrc << "struct btree_path;" << endl;
- osrc << "struct btree_trans;" << endl;
- osrc << "struct cachefiles_msg;" << endl;
- osrc << "struct cachefiles_open;" << endl;
- osrc << "struct cachefiles_read;" << endl;
- osrc << "struct cachefiles_volume;" << endl;
- osrc << "struct clk_rate_request;" << endl;
- osrc << "struct compact_control;" << endl;
- osrc << "struct fsi_device;" << endl;
- osrc << "struct fsi_msg;" << endl;
- osrc << "struct fsi_slave;" << endl;
- osrc << "struct fuse_req;" << endl;
- osrc << "struct get_locks_fail;" << endl;
- osrc << "struct gss_cred;" << endl;
- osrc << "struct handshake_req;" << endl;
- osrc << "struct i2c_client;" << endl;
- osrc << "struct ib_mad_agent_private;" << endl;
- osrc << "struct ib_mad_qp_info;" << endl;
- osrc << "struct ib_mad_send_wr_private;" << endl;
- osrc << "struct ib_smp;" << endl;
- osrc << "struct iomap;" << endl;
- osrc << "struct iomap_iter;" << endl;
- osrc << "struct mctp_sk_key;" << endl;
- osrc << "struct mptcp_ext;" << endl;
- osrc << "struct mptcp_subflow_context;" << endl;
- osrc << "struct nbd_request;" << endl;
- osrc << "struct netfs_io_request;" << endl;
- osrc << "struct netfs_io_stream;" << endl;
- osrc << "struct netfs_io_subrequest;" << endl;
- osrc << "struct nfs42_clone_args;" << endl;
- osrc << "struct nfs42_copy_args;" << endl;
- osrc << "struct nfs42_copy_notify_args;" << endl;
- osrc << "struct nfs42_copy_notify_res;" << endl;
- osrc << "struct nfs42_copy_res;" << endl;
- osrc << "struct nfs42_falloc_args;" << endl;
- osrc << "struct nfs42_offload_status_args;" << endl;
- osrc << "struct nfs42_seek_args;" << endl;
- osrc << "struct nfs42_seek_res;" << endl;
- osrc << "struct nfs_direct_req;" << endl;
- osrc << "struct nfs_page;" << endl;
- osrc << "struct opa_smp;" << endl;
- osrc << "struct p9_fid;" << endl;
- osrc << "struct pwc_device;" << endl;
- osrc << "struct request;" << endl;
- osrc << "struct rpc_auth;" << endl;
- osrc << "struct rpc_gss_wire_cred;" << endl;
- osrc << "struct rpcrdma_ep;" << endl;
- osrc << "struct rpcrdma_mr;" << endl;
- osrc << "struct rpcrdma_notification;" << endl;
- osrc << "struct rpcrdma_rep;" << endl;
- osrc << "struct rpcrdma_req;" << endl;
- osrc << "struct rpcrdma_xprt;" << endl;
- osrc << "struct rpc_rqst;" << endl;
- osrc << "struct rpc_task;" << endl;
- osrc << "struct selinux_audit_data;" << endl;
- osrc << "struct spi_device;" << endl;
- osrc << "struct svc_rdma_chunk;" << endl;
- osrc << "struct svc_rdma_recv_ctxt;" << endl;
- osrc << "struct svc_rdma_segment;" << endl;
- osrc << "struct svc_rdma_send_ctxt;" << endl;
- osrc << "struct svc_rqst;" << endl;
- osrc << "struct svcxprt_rdma;" << endl;
- osrc << "struct tmigr_cpu;" << endl;
- osrc << "struct tmigr_group;" << endl;
- osrc << "struct virtio_gpu_ctrl_hdr;" << endl;
- osrc << "struct virtqueue;" << endl;
- osrc << "struct somenonexistentstruct_123;" << endl;
- osrc << "union ifs_sbaf;" << endl;
- osrc << "union ifs_sbaf_status;" << endl;
- osrc << "union tmigr_state;" << endl;
+ // add needed forward decls/#includes
+ static vector<string> forward_decls = tracepoint_forward_decls();
+ for (unsigned z=0; z<forward_decls.size(); z++)
+ osrc << forward_decls[z] << "\n";
// BPF raw tracepoint macros for creating the multiple fields
// of the data struct that describes the raw tracepoint.

View File

@ -1,116 +0,0 @@
commit b8d4274d1e7697801c12c512b6724dd3f59f2c72
Author: William Cohen <wcohen@redhat.com>
Date: Mon May 6 11:36:42 2024 -0400
Support kernels that backported kallsym functions from newer linux kernels
Some Linux distributions may have backported
module_kallsyms_on_each_symbol and kallsyms_on_each_symbol functions
from newer linux kernels. In these situations checking the kernel
version would not detect the proper arguments for these functions.
Systemtap now has a couple of autoconf tests to determine what
arguments should be used for these functions.
diff --git a/buildrun.cxx b/buildrun.cxx
index bb7bdcc9d..8ee8c391f 100644
--- a/buildrun.cxx
+++ b/buildrun.cxx
@@ -506,6 +506,8 @@ compile_pass (systemtap_session& s)
output_autoconf(s, o, cs, "autoconf-pagefault_disable.c", "STAPCONF_PAGEFAULT_DISABLE", NULL);
output_exportconf(s, o2, "kallsyms_lookup_name", "STAPCONF_KALLSYMS_LOOKUP_NAME_EXPORTED");
+ output_autoconf(s, o, cs, "autoconf-kallsyms_6_3.c", "STAPCONF_KALLSYMS_6_3", NULL);
+ output_autoconf(s, o, cs, "autoconf-kallsyms_6_4.c", "STAPCONF_KALLSYMS_6_4", NULL);
output_autoconf(s, o, cs, "autoconf-uidgid.c", "STAPCONF_LINUX_UIDGID_H", NULL);
output_exportconf(s, o2, "sigset_from_compat", "STAPCONF_SIGSET_FROM_COMPAT_EXPORTED");
output_exportconf(s, o2, "vzalloc", "STAPCONF_VZALLOC");
diff --git a/runtime/linux/autoconf-kallsyms_6_3.c b/runtime/linux/autoconf-kallsyms_6_3.c
new file mode 100644
index 000000000..0af1a5c35
--- /dev/null
+++ b/runtime/linux/autoconf-kallsyms_6_3.c
@@ -0,0 +1,6 @@
+#include <linux/module.h>
+
+int module_kallsyms_on_each_symbol(const char *modname,
+ int (*fn)(void *, const char *, struct module*,
+ unsigned long),
+ void *data);
diff --git a/runtime/linux/autoconf-kallsyms_6_4.c b/runtime/linux/autoconf-kallsyms_6_4.c
new file mode 100644
index 000000000..3b3680c53
--- /dev/null
+++ b/runtime/linux/autoconf-kallsyms_6_4.c
@@ -0,0 +1,3 @@
+#include <linux/kallsyms.h>
+int kallsyms_on_each_symbol(int (*fn)(void *, const char *, unsigned long),
+ void *data);
diff --git a/runtime/linux/kprobes.c b/runtime/linux/kprobes.c
index 6b30f2c52..2fba61cbb 100644
--- a/runtime/linux/kprobes.c
+++ b/runtime/linux/kprobes.c
@@ -737,7 +737,7 @@ __stapkp_symbol_callback(void *data, const char *name,
}
static int
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,4,0)
+#if defined(STAPCONF_KALLSYMS_6_4)
stapkp_symbol_callback(void *data, const char *name,
unsigned long addr)
{
@@ -780,7 +780,7 @@ stapkp_init(struct stap_kprobe_probe *probes,
mutex_lock(&module_mutex);
#endif
kallsyms_on_each_symbol(stapkp_symbol_callback, &sd);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0)
+#if defined(STAPCONF_KALLSYMS_6_3) || defined(STAPCONF_KALLSYMS_6_4)
module_kallsyms_on_each_symbol(sd.modname, stapkp_symbol_callback, &sd);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5,12,0)
module_kallsyms_on_each_symbol(stapkp_symbol_callback, &sd);
@@ -855,7 +855,7 @@ stapkp_refresh(const char *modname,
mutex_lock(&module_mutex);
#endif
kallsyms_on_each_symbol(stapkp_symbol_callback, &sd);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0)
+#if defined(STAPCONF_KALLSYMS_6_3)
module_kallsyms_on_each_symbol(sd.modname, stapkp_symbol_callback, &sd);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5,12,0)
module_kallsyms_on_each_symbol(stapkp_symbol_callback, &sd);
diff --git a/runtime/sym.c b/runtime/sym.c
index 3947d42f7..23dd3be30 100644
--- a/runtime/sym.c
+++ b/runtime/sym.c
@@ -1187,7 +1187,7 @@ unsigned long kallsyms_lookup_name (const char *name)
typedef typeof(&kallsyms_on_each_symbol) kallsyms_on_each_symbol_fn;
// XXX Will be linked in place of the kernel's kallsyms_on_each_symbol:
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,4,0)
+#if defined(STAPCONF_KALLSYMS_6_4)
int kallsyms_on_each_symbol(int (*fn)(void *, const char *,
unsigned long),
void *data)
@@ -1214,13 +1214,13 @@ int kallsyms_on_each_symbol(int (*fn)(void *, const char *, struct module *,
typedef typeof(&module_kallsyms_on_each_symbol) module_kallsyms_on_each_symbol_fn;
// XXX Will be linked in place of the kernel's module_kallsyms_on_each_symbol:
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,4,0)
+#if defined(STAPCONF_KALLSYMS_6_4)
int module_kallsyms_on_each_symbol(const char *modname,
int (*fn)(void *, const char *,
unsigned long),
void *data)
#else
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0)
+#if defined(STAPCONF_KALLSYMS_6_3)
int module_kallsyms_on_each_symbol(const char *modname,
int (*fn)(void *, const char *, struct module *,
unsigned long),
@@ -1235,7 +1235,7 @@ int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *, struct module
/* First, try to use a kallsyms_lookup_name address passed to us
through the relocation mechanism. */
if (_stp_module_kallsyms_on_each_symbol != NULL)
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0)
+#if defined(STAPCONF_KALLSYMS_6_3) || defined(STAPCONF_KALLSYMS_6_4)
return ibt_wrapper(int,
(* (module_kallsyms_on_each_symbol_fn)_stp_module_kallsyms_on_each_symbol)(modname, fn, data));
#else

View File

@ -1,22 +0,0 @@
commit ed5649f64a3f8c2e8269f9c4435e9174c4e8c775
Author: William Cohen <wcohen@redhat.com>
Date: Thu May 9 12:23:54 2024 -0400
Support kernels that backported kallsym functions (part 2)
Git commit b8d4274d1e769780 omitted a test for the Linux 6.4 version
of kallsyms function in runtime/linux/kprobes.c.
diff --git a/runtime/linux/kprobes.c b/runtime/linux/kprobes.c
index 2fba61cbb..9ae5565e3 100644
--- a/runtime/linux/kprobes.c
+++ b/runtime/linux/kprobes.c
@@ -855,7 +855,7 @@ stapkp_refresh(const char *modname,
mutex_lock(&module_mutex);
#endif
kallsyms_on_each_symbol(stapkp_symbol_callback, &sd);
-#if defined(STAPCONF_KALLSYMS_6_3)
+#if defined(STAPCONF_KALLSYMS_6_3) || defined(STAPCONF_KALLSYMS_6_4)
module_kallsyms_on_each_symbol(sd.modname, stapkp_symbol_callback, &sd);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5,12,0)
module_kallsyms_on_each_symbol(stapkp_symbol_callback, &sd);

View File

@ -1,248 +0,0 @@
commit 0c437c7e2d02772615d73d1be1c3100d4c1de254
Author: William Cohen <wcohen@redhat.com>
Date: Tue Jun 4 09:46:41 2024 -0400
Address changes in Linux 6.10 /include/linux/vmalloc.h
Upstream linux kernel git commit 88ae5fb755b0d contains a number of
changes in /include/linux/vmalloc.h that affect vmalloc, vmalloc_node,
and vzalloc_node definitions. These are no longer functions but
macros and cannot be found in the list of symbols exported by the
kernel. Support for vzalloc, vmalloc_node, and vzalloc_node has been
in kernels since Linux 2.6.37. Given that systemtap requires Linux
3.10 or newer there is no longer a need to check for the existence of
these functions or provide local versions of them.
diff --git a/buildrun.cxx b/buildrun.cxx
index 8ee8c391f..a7fcd6297 100644
--- a/buildrun.cxx
+++ b/buildrun.cxx
@@ -510,9 +510,6 @@ compile_pass (systemtap_session& s)
output_autoconf(s, o, cs, "autoconf-kallsyms_6_4.c", "STAPCONF_KALLSYMS_6_4", NULL);
output_autoconf(s, o, cs, "autoconf-uidgid.c", "STAPCONF_LINUX_UIDGID_H", NULL);
output_exportconf(s, o2, "sigset_from_compat", "STAPCONF_SIGSET_FROM_COMPAT_EXPORTED");
- output_exportconf(s, o2, "vzalloc", "STAPCONF_VZALLOC");
- output_exportconf(s, o2, "vzalloc_node", "STAPCONF_VZALLOC_NODE");
- output_exportconf(s, o2, "vmalloc_node", "STAPCONF_VMALLOC_NODE");
// RHBZ1233912 - s390 temporary workaround for non-atomic udelay()
output_exportconf(s, o2, "udelay_simple", "STAPCONF_UDELAY_SIMPLE_EXPORTED");
diff --git a/runtime/linux/alloc.c b/runtime/linux/alloc.c
index ab16249e1..add36c30d 100644
--- a/runtime/linux/alloc.c
+++ b/runtime/linux/alloc.c
@@ -404,16 +404,6 @@ static void *_stp_kzalloc(size_t size)
return _stp_kzalloc_gfp(size, STP_ALLOC_FLAGS);
}
-#ifndef STAPCONF_VZALLOC
-static void *vzalloc(unsigned long size)
-{
- void *ret = vmalloc(size);
- if (ret)
- memset(ret, 0, size);
- return ret;
-}
-#endif
-
static void *_stp_vzalloc(size_t size)
{
void *ret;
@@ -438,24 +428,6 @@ static void *_stp_vzalloc(size_t size)
return ret;
}
-
-#ifndef STAPCONF_VMALLOC_NODE
-static void *vmalloc_node(unsigned long size, int node __attribute__((unused)))
-{
- return vmalloc(size);
-}
-#endif
-
-#ifndef STAPCONF_VZALLOC_NODE
-static void *vzalloc_node(unsigned long size, int node)
-{
- void *ret = vmalloc_node(size, node);
- if (ret)
- memset(ret, 0, size);
- return ret;
-}
-#endif
-
static void *_stp_vzalloc_node(size_t size, int node)
{
void *ret;
commit 1fd6fb4d7101e013e21006da3b77b9723be5b446
Author: William Cohen <wcohen@redhat.com>
Date: Mon Jun 3 15:46:49 2024 -0400
Avoid -Werror=empty-body errors from runtime/linux/uprobes-inode.c
Newer linux kernel compiles are being built with -Werror=empty-body.
For some modules generated runtime/linux/uprobes-inode.c is pulled in
and will get error messages like the following:
In file included from /tmp/stapGIM4O9/stap_ded21c54fce18c6570a8930d823aca3a_10928_src.c:2439:
/home/wcohen/systemtap_write/install/share/systemtap/runtime/linux/uprobes-inode.c: In function 'stapiu_change_semaphore_plus':
/home/wcohen/systemtap_write/install/share/systemtap/runtime/linux/uprobes-inode.c:795:5: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body]
795 | ; // already unlocked
| ^
cc1: all warnings being treated as errors
Added "{}" in the appropriate location to indicate to the compiler
that this is intentional.
diff --git a/runtime/linux/uprobes-inode.c b/runtime/linux/uprobes-inode.c
index b07e7b666..103da09dd 100644
--- a/runtime/linux/uprobes-inode.c
+++ b/runtime/linux/uprobes-inode.c
@@ -792,7 +792,7 @@ stapiu_change_semaphore_plus(struct stapiu_consumer* c, struct task_struct *task
if (! any_found)
spin_unlock_irqrestore(&c->process_list_lock, flags);
else
- ; // already unlocked
+ {}; // already unlocked
return rc;
}
commit de8aba9a414b497d98c489173b878058c4031b39
Author: William Cohen <wcohen@redhat.com>
Date: Mon Jun 3 14:40:04 2024 -0400
Avoid -Werror=old-style-declaration for stap_probes array in generated kernel modules
With newer linux kernels additional compilers checks are being done
and will get error messages like the following for the generated
module:
/tmp/stapuundLy/stap_2755fca707746de04395c85872aae4b8_1753_src.c:111:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration]
111 | } static stap_probes[];
| ^
cc1: all warnings being treated as errors
Tweaked the code generation in translate.cxx to output the static
stap_probes array in a form that is agreeable to newer kernel builds.
diff --git a/translate.cxx b/translate.cxx
index 19c165a1d..8fb320e66 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -8748,7 +8748,8 @@ translate_pass (systemtap_session& s)
<< "STAP_PROBE_INIT_NAME(PN) "
<< "STAP_PROBE_INIT_TIMING(L, D) "
<< "}";
- s.op->newline(-1) << "} static stap_probes[];";
+ s.op->newline(-1) << "};";
+ s.op->newline() << "static struct stap_probe stap_probes[];";
s.op->assert_0_indent();
#undef CALCIT
commit da72d04303cfc3ba22b2bb58a26f8dc7868333eb
Author: William Cohen <wcohen@redhat.com>
Date: Mon Jun 3 14:23:08 2024 -0400
Avoid -Werror=empty-body errors from runtime/linux/debug.h macros
When attempting to run the testsuite the sanity.exp test fails
due to the following -Werror=empty-body errors:
/home/wcohen/systemtap_write/install/share/systemtap/runtime/transport/relay_v2.c: In function '__stp_relay_wakeup_timer':
/home/wcohen/systemtap_write/install/share/systemtap/runtime/linux/debug.h:47:36: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body]
47 | #define dbug_trans(level, args...) ;
| ^
/home/wcohen/systemtap_write/install/share/systemtap/runtime/transport/relay_v2.c:195:17: note: in expansion of macro 'dbug_trans'
195 | dbug_trans(0, "relay_v2 wakeup timer expiry\n");
| ^~~~~~~~~~
/home/wcohen/systemtap_write/install/share/systemtap/runtime/transport/symbols.c: In function '_stp_set_stext':
/home/wcohen/systemtap_write/install/share/systemtap/runtime/linux/debug.h:103:34: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body]
103 | #define dbug_sym(level, args...) ;
| ^
/home/wcohen/systemtap_write/install/share/systemtap/runtime/transport/symbols.c:44:17: note: in expansion of macro 'dbug_sym'
44 | dbug_sym(1, "found kernel _stext load address: 0x%lx\n",
| ^~~~~~~~
Changed the effectively empty macros in runtime/linux/debug.h to use
"do { } while (0)" to eliminate these errors.
diff --git a/runtime/linux/debug.h b/runtime/linux/debug.h
index d2ab9e8db..dfc834dbb 100644
--- a/runtime/linux/debug.h
+++ b/runtime/linux/debug.h
@@ -44,8 +44,8 @@
printk(args); \
} while (0)
#else
-#define dbug_trans(level, args...) ;
-#define dbug_trans2(args...) ;
+#define dbug_trans(level, args...) do { } while (0)
+#define dbug_trans2(args...) do { } while (0)
#endif
#ifdef DEBUG_STP_ON_THE_FLY
@@ -53,7 +53,7 @@
_stp_dbug(__FUNCTION__, __LINE__, args); \
} while (0)
#else
-#define dbug_otf(args...) ;
+#define dbug_otf(args...) do { } while (0)
#endif
#ifdef DEBUG_UPROBES
@@ -61,7 +61,7 @@
_stp_dbug(__FUNCTION__, __LINE__, args); \
} while (0)
#else
-#define dbug_uprobes(args...) ;
+#define dbug_uprobes(args...) do { } while (0)
#endif
#ifdef DEBUG_UNWIND /* stack unwinder */
@@ -70,7 +70,7 @@
_stp_dbug(__FUNCTION__, __LINE__, args); \
} while (0)
#else
-#define dbug_unwind(level, args...) ;
+#define dbug_unwind(level, args...) do { } while (0)
#endif
@@ -80,7 +80,7 @@
_stp_dbug(__FUNCTION__, __LINE__, args); \
} while (0)
#else
-#define dbug_task(level, args...) ;
+#define dbug_task(level, args...) do { } while (0)
#endif
@@ -90,7 +90,7 @@
_stp_dbug(__FUNCTION__, __LINE__, args); \
} while (0)
#else
-#define dbug_task_vma(level, args...) ;
+#define dbug_task_vma(level, args...) do { } while (0)
#endif
@@ -100,7 +100,7 @@
_stp_dbug(__FUNCTION__, __LINE__, args); \
} while (0)
#else
-#define dbug_sym(level, args...) ;
+#define dbug_sym(level, args...) do { } while (0)
#endif
@@ -110,7 +110,7 @@
_stp_dbug(__FUNCTION__, __LINE__, args); \
} while (0)
#else
-#define dbug_tp(level, args...) ;
+#define dbug_tp(level, args...) do { } while (0)
#endif
#endif /* _STP_LINUX_DEBUG_H_ */

View File

@ -1,70 +0,0 @@
diff --git a/python/Makefile.am b/python/Makefile.am
index a254480f9..13618dc2f 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -29,12 +29,12 @@ pkglibexecpython_DATA += stap-resolve-module-function.py
all-local:
if HAVE_PYTHON2_PROBES
- (cd $(srcdir); CFLAGS="$(AM_CPPFLAGS)" $(PYTHON) setup.py build \
+ (cd $(srcdir); CFLAGS="$(CFLAGS) $(AM_CPPFLAGS)" $(PYTHON) setup.py build \
--build-base $(shell readlink -f $(builddir))/py2build \
--verbose)
endif
if HAVE_PYTHON3_PROBES
- (cd $(srcdir); CFLAGS="$(AM_CPPFLAGS)" $(PYTHON3) setup.py build \
+ (cd $(srcdir); CFLAGS="$(CFLAGS) $(AM_CPPFLAGS)" $(PYTHON3) setup.py build \
--build-base $(shell readlink -f $(builddir))/py3build \
--verbose)
endif
@@ -45,7 +45,7 @@ endif
# and we need to keep separate build directories for python 2 and 3.
install-exec-local:
if HAVE_PYTHON2_PROBES
- (cd $(srcdir); CFLAGS="$(AM_CPPFLAGS)" $(PYTHON) setup.py build \
+ (cd $(srcdir); CFLAGS="$(CFLAGS) $(AM_CPPFLAGS)" $(PYTHON) setup.py build \
--build-base $(shell readlink -f $(builddir))/py2build \
install --prefix $(DESTDIR)$(prefix) \
--single-version-externally-managed \
@@ -53,7 +53,7 @@ if HAVE_PYTHON2_PROBES
--verbose)
endif
if HAVE_PYTHON3_PROBES
- (cd $(srcdir); CFLAGS="$(AM_CPPFLAGS)" $(PYTHON3) setup.py build \
+ (cd $(srcdir); CFLAGS="$(CFLAGS) $(AM_CPPFLAGS)" $(PYTHON3) setup.py build \
--build-base $(shell readlink -f $(builddir))/py3build \
install --prefix $(DESTDIR)$(prefix) \
--single-version-externally-managed \
diff --git a/python/Makefile.in b/python/Makefile.in
index 1216eefff..62fe2129c 100644
--- a/python/Makefile.in
+++ b/python/Makefile.in
@@ -624,10 +624,10 @@ uninstall-am: uninstall-pkglibexecpythonDATA \
@HAVE_PYTHON_PROBES_TRUE@all-local:
-@HAVE_PYTHON2_PROBES_TRUE@@HAVE_PYTHON_PROBES_TRUE@ (cd $(srcdir); CFLAGS="$(AM_CPPFLAGS)" $(PYTHON) setup.py build \
+@HAVE_PYTHON2_PROBES_TRUE@@HAVE_PYTHON_PROBES_TRUE@ (cd $(srcdir); CFLAGS="$(CFLAGS) $(AM_CPPFLAGS)" $(PYTHON) setup.py build \
@HAVE_PYTHON2_PROBES_TRUE@@HAVE_PYTHON_PROBES_TRUE@ --build-base $(shell readlink -f $(builddir))/py2build \
@HAVE_PYTHON2_PROBES_TRUE@@HAVE_PYTHON_PROBES_TRUE@ --verbose)
-@HAVE_PYTHON3_PROBES_TRUE@@HAVE_PYTHON_PROBES_TRUE@ (cd $(srcdir); CFLAGS="$(AM_CPPFLAGS)" $(PYTHON3) setup.py build \
+@HAVE_PYTHON3_PROBES_TRUE@@HAVE_PYTHON_PROBES_TRUE@ (cd $(srcdir); CFLAGS="$(CFLAGS) $(AM_CPPFLAGS)" $(PYTHON3) setup.py build \
@HAVE_PYTHON3_PROBES_TRUE@@HAVE_PYTHON_PROBES_TRUE@ --build-base $(shell readlink -f $(builddir))/py3build \
@HAVE_PYTHON3_PROBES_TRUE@@HAVE_PYTHON_PROBES_TRUE@ --verbose)
@@ -635,13 +635,13 @@ uninstall-am: uninstall-pkglibexecpythonDATA \
# since only the build command has the '--build-base' directory option
# and we need to keep separate build directories for python 2 and 3.
@HAVE_PYTHON_PROBES_TRUE@install-exec-local:
-@HAVE_PYTHON2_PROBES_TRUE@@HAVE_PYTHON_PROBES_TRUE@ (cd $(srcdir); CFLAGS="$(AM_CPPFLAGS)" $(PYTHON) setup.py build \
+@HAVE_PYTHON2_PROBES_TRUE@@HAVE_PYTHON_PROBES_TRUE@ (cd $(srcdir); CFLAGS="$(CFLAGS) $(AM_CPPFLAGS)" $(PYTHON) setup.py build \
@HAVE_PYTHON2_PROBES_TRUE@@HAVE_PYTHON_PROBES_TRUE@ --build-base $(shell readlink -f $(builddir))/py2build \
@HAVE_PYTHON2_PROBES_TRUE@@HAVE_PYTHON_PROBES_TRUE@ install --prefix $(DESTDIR)$(prefix) \
@HAVE_PYTHON2_PROBES_TRUE@@HAVE_PYTHON_PROBES_TRUE@ --single-version-externally-managed \
@HAVE_PYTHON2_PROBES_TRUE@@HAVE_PYTHON_PROBES_TRUE@ --record $(shell readlink -f $(builddir))/py2build/install_files.txt \
@HAVE_PYTHON2_PROBES_TRUE@@HAVE_PYTHON_PROBES_TRUE@ --verbose)
-@HAVE_PYTHON3_PROBES_TRUE@@HAVE_PYTHON_PROBES_TRUE@ (cd $(srcdir); CFLAGS="$(AM_CPPFLAGS)" $(PYTHON3) setup.py build \
+@HAVE_PYTHON3_PROBES_TRUE@@HAVE_PYTHON_PROBES_TRUE@ (cd $(srcdir); CFLAGS="$(CFLAGS) $(AM_CPPFLAGS)" $(PYTHON3) setup.py build \
@HAVE_PYTHON3_PROBES_TRUE@@HAVE_PYTHON_PROBES_TRUE@ --build-base $(shell readlink -f $(builddir))/py3build \
@HAVE_PYTHON3_PROBES_TRUE@@HAVE_PYTHON_PROBES_TRUE@ install --prefix $(DESTDIR)$(prefix) \
@HAVE_PYTHON3_PROBES_TRUE@@HAVE_PYTHON_PROBES_TRUE@ --single-version-externally-managed \

View File

@ -1,79 +0,0 @@
diff --git a/buildrun.cxx b/buildrun.cxx
index a7fcd6297..e3f2f83d1 100644
--- a/buildrun.cxx
+++ b/buildrun.cxx
@@ -400,6 +400,7 @@ compile_pass (systemtap_session& s)
output_exportconf(s, o2, "__module_text_address", "STAPCONF_MODULE_TEXT_ADDRESS");
output_exportconf(s, o2, "add_timer_on", "STAPCONF_ADD_TIMER_ON");
output_autoconf(s, o, cs, "autoconf-514-panic.c", "STAPCONF_514_PANIC", NULL);
+ output_autoconf(s, o, cs, "autoconf-task_work_cancel_func.c", "STAPCONF_TASK_WORK_CANCEL_FUNC", NULL);
output_dual_exportconf(s, o2, "probe_kernel_read", "probe_kernel_write", "STAPCONF_PROBE_KERNEL");
output_autoconf(s, o, cs, "autoconf-hw_breakpoint_context.c",
diff --git a/runtime/linux/autoconf-task_work_cancel_func.c b/runtime/linux/autoconf-task_work_cancel_func.c
new file mode 100644
index 000000000..0d460de6c
--- /dev/null
+++ b/runtime/linux/autoconf-task_work_cancel_func.c
@@ -0,0 +1,3 @@
+#include <linux/task_work.h>
+
+void* c = & task_work_cancel_func;
diff --git a/runtime/linux/runtime.h b/runtime/linux/runtime.h
index 0e9fe3fea..bd9307385 100644
--- a/runtime/linux/runtime.h
+++ b/runtime/linux/runtime.h
@@ -265,7 +265,7 @@ static void *kallsyms_uprobe_get_swbp_addr;
static void *kallsyms_task_work_add;
#endif
#if !defined(STAPCONF_TASK_WORK_CANCEL_EXPORTED)
-static void *kallsyms_task_work_cancel;
+static void *kallsyms_task_work_cancel_fn;
#endif
#if !defined(STAPCONF_TRY_TO_WAKE_UP_EXPORTED) && !defined(STAPCONF_WAKE_UP_STATE_EXPORTED)
diff --git a/runtime/stp_task_work.c b/runtime/stp_task_work.c
index 0dd3095b6..4818fecbf 100644
--- a/runtime/stp_task_work.c
+++ b/runtime/stp_task_work.c
@@ -3,14 +3,25 @@
#include "linux/task_work_compatibility.h"
+// Handle kernel commit 68cbd415dd4b9c5b9df69f0f091879e56bf5907a
+// task_work: s/task_work_cancel()/task_work_cancel_func()/
+#if defined(STAPCONF_TASK_WORK_CANCEL_FUNC)
+#define TASK_WORK_CANCEL_FN task_work_cancel_func
+#else
+#define TASK_WORK_CANCEL_FN task_work_cancel
+#endif
+
+#define STRINGIFY(x) #x
+#define TOSTRING(x) STRINGIFY(x)
+
#if !defined(STAPCONF_TASK_WORK_ADD_EXPORTED)
// First typedef from the original decls, then #define as typecasted calls.
typedef typeof(&task_work_add) task_work_add_fn;
#define task_work_add(a,b,c) ibt_wrapper(int, (* (task_work_add_fn)kallsyms_task_work_add)((a), (b), (c)))
#endif
#if !defined(STAPCONF_TASK_WORK_CANCEL_EXPORTED)
-typedef typeof(&task_work_cancel) task_work_cancel_fn;
-#define task_work_cancel(a,b) ibt_wrapper(struct callback_head *, (* (task_work_cancel_fn)kallsyms_task_work_cancel)((a), (b)))
+typedef typeof(&TASK_WORK_CANCEL_FN) task_work_cancel_fn;
+#define task_work_cancel(a,b) ibt_wrapper(struct callback_head *, (* (task_work_cancel_fn)kallsyms_task_work_cancel_fn)((a), (b)))
#endif
/* To avoid a crash when a task_work callback gets called after the
@@ -35,9 +46,9 @@ stp_task_work_init(void)
}
#endif
#if !defined(STAPCONF_TASK_WORK_CANCEL_EXPORTED)
- kallsyms_task_work_cancel = (void *)kallsyms_lookup_name("task_work_cancel");
- if (kallsyms_task_work_cancel == NULL) {
- _stp_error("Can't resolve task_work_cancel!");
+ kallsyms_task_work_cancel_fn = (void *)kallsyms_lookup_name(TOSTRING(TASK_WORK_CANCEL_FN));
+ if (kallsyms_task_work_cancel_fn == NULL) {
+ _stp_error("Can't resolve %s!", TOSTRING(TASK_WORK_CANCEL_FN));
return -ENOENT;
}
#endif

View File

@ -1,22 +0,0 @@
commit 470da664cc0afd4aac982806622dbb5d700a7904
Author: Martin Cermak <mcermak@redhat.com>
Date: Fri Aug 9 07:40:43 2024 +0200
RHEL-52491: NSS 3.101.0 compatibility
After NSS rebased to 3.101.0, systemtap stopped being able to grant
trust to stap-server: https://issues.redhat.com/browse/RHEL-52491 .
This patch fixes it.
diff --git a/client-nss.cxx b/client-nss.cxx
index 55266feb7..c09f99ca9 100644
--- a/client-nss.cxx
+++ b/client-nss.cxx
@@ -184,6 +184,7 @@ badCertHandler(void *arg, PRFileDesc *sslSocket)
break;
+ case SEC_ERROR_UNKNOWN_ISSUER:
case SEC_ERROR_CA_CERT_INVALID:
/* The server's certificate is not trusted. Should we trust it? */
secStatus = SECFailure; /* Do not trust by default. */

View File

@ -1,2 +1 @@
SHA512 (systemtap-5.1.tar.gz) = da0fe237d2124031a5786d1221dbb420d90da5497376715fd43a7a9f61a354a229c1128e67ce6becbc012aa3796dc5d337149e239e3c1def0651b179e5bf199f
SHA512 (systemtap-5.2.tar.gz) = 30137e232e44abe98747ae61a71a162eff5abc89e9a922f86ade834eac2cac1923ae06d4ed17710718adba082ad06d2fb544822003a54e13b97eea9e183bdf9d

View File

@ -120,8 +120,8 @@ m stapdev stapdev
Name: systemtap
# PRERELEASE
Version: 5.1
Release: 10%{?release_override}%{?dist}
Version: 5.2
Release: 1%{?release_override}%{?dist}
# for version, see also configure.ac
@ -133,7 +133,8 @@ Release: 10%{?release_override}%{?dist}
# systemtap-runtime /usr/bin/staprun, /usr/bin/stapsh, /usr/bin/stapdyn
# systemtap-client /usr/bin/stap, samples, docs, tapset(bonus), req:-runtime
# systemtap-initscript /etc/init.d/systemtap, dracut module, req:systemtap
# systemtap-sdt-devel /usr/include/sys/sdt.h /usr/bin/dtrace
# systemtap-sdt-devel /usr/include/sys/sdt.h
# systemtap-sdt-dtrace /usr/bin/dtrace
# systemtap-testsuite /usr/share/systemtap/testsuite*, req:systemtap, req:sdt-devel
# systemtap-runtime-java libHelperSDT.so, HelperSDT.jar, stapbm, req:-runtime
# systemtap-runtime-virthost /usr/bin/stapvirt, req:libvirt req:libxml2
@ -155,15 +156,9 @@ Release: 10%{?release_override}%{?dist}
Summary: Programmable system-wide instrumentation system
License: GPL-2.0-or-later
URL: http://sourceware.org/systemtap/
URL: https://sourceware.org/systemtap/
Source: ftp://sourceware.org/pub/systemtap/releases/systemtap-%{version}.tar.gz
Patch1: RHEL-36201a.patch
Patch2: RHEL-36201b.patch
Patch3: PR31495.patch
Patch4: RHEL-42605.patch
Patch5: RHEL-50107.patch
Patch6: RHEL-43481.patch
Patch7: RHEL-52491.patch
Patch0: PR32302.patch
# Build*
BuildRequires: make
@ -266,7 +261,7 @@ the components needed to locally develop and execute systemtap scripts.
%package server
Summary: Instrumentation System Server
License: GPL-2.0-or-later
URL: http://sourceware.org/systemtap/
URL: https://sourceware.org/systemtap/
Requires: systemtap-devel = %{version}-%{release}
Conflicts: systemtap-devel < %{version}-%{release}
Conflicts: systemtap-runtime < %{version}-%{release}
@ -296,7 +291,7 @@ compiles systemtap scripts to kernel objects on their demand.
%package devel
Summary: Programmable system-wide instrumentation system - development headers, tools
License: GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND BSD-2-Clause
URL: http://sourceware.org/systemtap/
URL: https://sourceware.org/systemtap/
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 20
Recommends: (kernel-debug-devel if kernel-debug)
@ -326,7 +321,7 @@ a copy of the standard tapset library and the runtime library C files.
%package runtime
Summary: Programmable system-wide instrumentation system - runtime
License: GPL-2.0-or-later
URL: http://sourceware.org/systemtap/
URL: https://sourceware.org/systemtap/
Requires(pre): shadow-utils
Conflicts: systemtap-devel < %{version}-%{release}
Conflicts: systemtap-server < %{version}-%{release}
@ -341,7 +336,7 @@ using a local or remote systemtap-devel installation.
%package client
Summary: Programmable system-wide instrumentation system - client
License: GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND GFDL-1.2-or-later AND BSD-2-Clause
URL: http://sourceware.org/systemtap/
URL: https://sourceware.org/systemtap/
Requires: zip unzip
Requires: systemtap-runtime = %{version}-%{release}
Requires: coreutils grep sed unzip zip
@ -354,17 +349,19 @@ Requires: mokutil
%endif
%description client
This package contains/requires the components needed to develop
systemtap scripts, and compile them using a local systemtap-devel
or a remote systemtap-server installation, then run them using a
local or remote systemtap-runtime. It includes script samples and
This package contains/requires only the components needed to
use systemtap scripts by compiling them using a local or a remote
systemtap-server service, then run them using a local or
remote systemtap-runtime. It includes script samples and
documentation, and a copy of the tapset library for reference.
It does NOT include all the components for running a systemtap
script in a self-contained fashion; for that, use the -devel
subpackage instead.
%package initscript
Summary: Systemtap Initscripts
License: GPL-2.0-or-later
URL: http://sourceware.org/systemtap/
URL: https://sourceware.org/systemtap/
Requires: systemtap = %{version}-%{release}
%if %{with_systemd}
Requires: systemd
@ -382,9 +379,20 @@ boot-time probing if supported.
%package sdt-devel
Summary: Static probe support tools
Summary: Static probe support header files
License: GPL-2.0-or-later AND CC0-1.0
URL: http://sourceware.org/systemtap/
URL: https://sourceware.org/systemtap/
%description sdt-devel
This package includes the <sys/sdt.h> header file used for static
instrumentation compiled into userspace programs.
%package sdt-dtrace
Summary: Static probe support dtrace tool
License: GPL-2.0-or-later AND CC0-1.0
URL: https://sourceware.org/systemtap/
Provides: dtrace = %{version}-%{release}
%if %{with_pyparsing}
%if %{with_python3}
Requires: python3-pyparsing
@ -397,17 +405,15 @@ Requires: python2-pyparsing
%endif
%endif
%description sdt-devel
This package includes the <sys/sdt.h> header file used for static
instrumentation compiled into userspace programs and libraries, along
with the optional dtrace-compatibility preprocessor to process related
.d files into tracing-macro-laden .h headers.
%description sdt-dtrace
This package includes the dtrace-compatibility preprocessor
to process related .d files into tracing-macro-laden .h headers.
%package testsuite
Summary: Instrumentation System Testsuite
License: GPL-2.0-or-later AND GPL-2.0-only AND GPL-3.0-or-later AND MIT
URL: http://sourceware.org/systemtap/
URL: https://sourceware.org/systemtap/
Requires: systemtap = %{version}-%{release}
Requires: systemtap-sdt-devel = %{version}-%{release}
Requires: systemtap-server = %{version}-%{release}
@ -479,7 +485,7 @@ systemtap on the current system.
%package runtime-java
Summary: Systemtap Java Runtime Support
License: GPL-2.0-or-later
URL: http://sourceware.org/systemtap/
URL: https://sourceware.org/systemtap/
Requires: systemtap-runtime = %{version}-%{release}
# work around fedora ci gating kvetching about i686<->x86-64 conflicts
%ifarch x86_64
@ -501,7 +507,7 @@ that probe Java processes running on the OpenJDK runtimes using Byteman.
%package runtime-python2
Summary: Systemtap Python 2 Runtime Support
License: GPL-2.0-or-later
URL: http://sourceware.org/systemtap/
URL: https://sourceware.org/systemtap/
Requires: systemtap-runtime = %{version}-%{release}
%description runtime-python2
@ -513,7 +519,7 @@ that probe python 2 processes.
%package runtime-python3
Summary: Systemtap Python 3 Runtime Support
License: GPL-2.0-or-later
URL: http://sourceware.org/systemtap/
URL: https://sourceware.org/systemtap/
Requires: systemtap-runtime = %{version}-%{release}
%if ! (%{with_python2_probes})
@ -530,7 +536,7 @@ that probe python 3 processes.
%package exporter
Summary: Systemtap-prometheus interoperation mechanism
License: GPL-2.0-or-later
URL: http://sourceware.org/systemtap/
URL: https://sourceware.org/systemtap/
Requires: systemtap-runtime = %{version}-%{release}
%description exporter
@ -543,7 +549,7 @@ to remote requesters on demand.
%package runtime-virthost
Summary: Systemtap Cross-VM Instrumentation - host
License: GPL-2.0-or-later
URL: http://sourceware.org/systemtap/
URL: https://sourceware.org/systemtap/
# only require libvirt-libs really
#Requires: libvirt >= 1.0.2
Requires: libxml2
@ -558,7 +564,7 @@ connection.
%package runtime-virtguest
Summary: Systemtap Cross-VM Instrumentation - guest
License: GPL-2.0-or-later
URL: http://sourceware.org/systemtap/
URL: https://sourceware.org/systemtap/
Requires: systemtap-runtime = %{version}-%{release}
%if %{with_systemd}
Requires(post): findutils coreutils
@ -578,7 +584,7 @@ systemtap-runtime-virthost machine to execute systemtap scripts.
%package jupyter
Summary: ISystemtap jupyter kernel and examples
License: GPL-2.0-or-later
URL: http://sourceware.org/systemtap/
URL: https://sourceware.org/systemtap/
Requires: systemtap = %{version}-%{release}
%description jupyter
@ -590,13 +596,7 @@ or within a container.
%prep
%setup -q
%patch -P1 -p1
%patch -P2 -p1
%patch -P3 -p1
%patch -P4 -p1
%patch -P5 -p1
%patch -P6 -p1
%patch -P7 -p1
%patch -P0 -p1
%build
@ -741,9 +741,6 @@ find testsuite -type f -name '.gitignore' -print0 | xargs -0 rm -f
# permissions back to 04110 in the %files section below.
chmod 755 $RPM_BUILD_ROOT%{_bindir}/staprun
#install the useful stap-prep script
install -c -m 755 stap-prep $RPM_BUILD_ROOT%{_bindir}/stap-prep
# Copy over the testsuite
cp -rp testsuite $RPM_BUILD_ROOT%{_datadir}/systemtap
@ -1141,13 +1138,14 @@ exit 0
%if %{with_emacsvim}
%{_emacs_sitelispdir}/*.el*
%{_emacs_sitestartdir}/systemtap-init.el
%{_datadir}/vim/vimfiles/*/*.vim
%{_datadir}/vim/vimfiles
%endif
# Notice that the stap-resolve-module-function.py file is used by
# *both* the python2 and python3 subrpms. Both subrpms use that same
# python script to help list python probes.
%if %{with_python3_probes} || %{with_python2_probes}
%{_libexecdir}/systemtap/python/stap-resolve-module-function.py
%dir %{_libexecdir}/systemtap/python
%exclude %{_libexecdir}/systemtap/python/stap-resolve-module-function.py?
%endif
@ -1242,16 +1240,22 @@ exit 0
%files sdt-devel
%{_bindir}/dtrace
%{_includedir}/sys/sdt.h
%{_includedir}/sys/sdt-config.h
%{_mandir}/man1/dtrace.1*
%{_rpmmacrodir}/macros.systemtap
%doc README AUTHORS NEWS
%{!?_licensedir:%global license %%doc}
%license COPYING
%files sdt-dtrace
%{_bindir}/dtrace
%doc README AUTHORS NEWS
%{!?_licensedir:%global license %%doc}
%license COPYING
%{_mandir}/man1/dtrace.1*
%files testsuite
%dir %{_datadir}/systemtap
%{_datadir}/systemtap/testsuite
@ -1320,10 +1324,14 @@ exit 0
# Future new-release entries should be of the form
# * DDD MMM DD YYYY YOURNAME <YOUREMAIL> - V-R
# - Upstream release, see wiki page below for detailed notes.
# http://sourceware.org/systemtap/wiki/SystemTapReleases
# https://sourceware.org/systemtap/wiki/SystemTapReleases
# PRERELEASE
%changelog
* Mon Nov 11 2024 Frank Ch. Eigler <fche@redhat.com> - 5.2-1
- Upstream release, see wiki page below for detailed notes.
- https://sourceware.org/systemtap/wiki/SystemTapReleases
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 5.1-10
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018