Compare commits
32 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1b413069f7 | |||
| c304def666 | |||
| 156e8b1a72 | |||
| fc8a791cef | |||
| 3c31882c55 | |||
| 73a0b1c45b | |||
| 54586b5245 | |||
| 0b6e381fcb | |||
| 161925cca3 | |||
| d7bae1def5 | |||
| 7b468f9885 | |||
| bcf91eabdf | |||
| f3a88dedc6 | |||
| aeba2d99ae | |||
| 729da1fb58 | |||
| 8e2f8c7b2d | |||
| df5d2510f5 | |||
| ce4ee0272a | |||
| c1b3e5bfd5 | |||
| 530b3c58ec | |||
| ceeded114a | |||
| f6be3eef0e | |||
| 9bd07d0547 | |||
| 2d43183c1e | |||
| 519e42ed08 | |||
| 21652d6569 | |||
| a295738814 | |||
| eee0b5da51 | |||
| 18fb3c8dbf | |||
| 2c5d8ff458 | |||
| 3eed0394ff | |||
| 84907d969c |
@@ -0,0 +1,37 @@
|
||||
From ff265fa1ed86b85e021ec0f16a28ab48c237414a Mon Sep 17 00:00:00 2001
|
||||
From: "Yichun Zhang (agentzh)" <yichun@openresty.com>
|
||||
Date: Sat, 6 May 2023 15:21:14 -0700
|
||||
Subject: [PATCH] PR30405: stapkp_init(): we should not disable preemption
|
||||
around the kallsyms_on_each_symbol() call
|
||||
|
||||
---
|
||||
runtime/linux/kprobes.c | 4 ----
|
||||
1 file changed, 4 deletions(-)
|
||||
|
||||
diff --git a/runtime/linux/kprobes.c b/runtime/linux/kprobes.c
|
||||
index 09f0e0665..1875092c5 100644
|
||||
--- a/runtime/linux/kprobes.c
|
||||
+++ b/runtime/linux/kprobes.c
|
||||
@@ -763,9 +763,7 @@ stapkp_init(struct stap_kprobe_probe *probes,
|
||||
#ifdef STAPCONF_MODULE_MUTEX
|
||||
mutex_lock(&module_mutex);
|
||||
#endif
|
||||
- preempt_disable();
|
||||
kallsyms_on_each_symbol(stapkp_symbol_callback, &sd);
|
||||
- preempt_enable();
|
||||
#ifdef STAPCONF_MODULE_MUTEX
|
||||
mutex_unlock(&module_mutex);
|
||||
#endif
|
||||
@@ -835,9 +833,7 @@ stapkp_refresh(const char *modname,
|
||||
#ifdef STAPCONF_MODULE_MUTEX
|
||||
mutex_lock(&module_mutex);
|
||||
#endif
|
||||
- preempt_disable();
|
||||
kallsyms_on_each_symbol(stapkp_symbol_callback, &sd);
|
||||
- preempt_enable();
|
||||
#ifdef STAPCONF_MODULE_MUTEX
|
||||
mutex_unlock(&module_mutex);
|
||||
#endif
|
||||
--
|
||||
2.39.1
|
||||
|
||||
@@ -0,0 +1,231 @@
|
||||
From 33fae2d0107fb6166b4eac3fdffd277829849ab0 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Cermak <mcermak@redhat.com>
|
||||
Date: Fri, 2 Jun 2023 23:28:07 +0200
|
||||
Subject: [PATCH] =?UTF-8?q?PR30415:=20conflicting=20types=20for=20?=
|
||||
=?UTF-8?q?=E2=80=98kallsyms=5Fon=5Feach=5Fsymbol=E2=80=99?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
---
|
||||
runtime/linux/kprobes.c | 28 ++++++++++++++++++++++++-
|
||||
runtime/linux/runtime.h | 8 +++++--
|
||||
runtime/sym.c | 39 +++++++++++++++++++++++++++++++++++
|
||||
runtime/transport/symbols.c | 4 ++++
|
||||
runtime/transport/transport.c | 1 +
|
||||
staprun/staprun.c | 13 +++++++++++-
|
||||
6 files changed, 89 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/runtime/linux/kprobes.c b/runtime/linux/kprobes.c
|
||||
index 1875092c5..6b30f2c52 100644
|
||||
--- a/runtime/linux/kprobes.c
|
||||
+++ b/runtime/linux/kprobes.c
|
||||
@@ -28,6 +28,9 @@ extern void *_stp_kallsyms_on_each_symbol;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+// No export check and gates. This one seems simply like a non-export.
|
||||
+extern void *_stp_module_kallsyms_on_each_symbol;
|
||||
+
|
||||
#if defined(STAPCONF_KALLSYMS_ON_EACH_SYMBOL) && defined(STAPCONF_KALLSYMS_ON_EACH_SYMBOL_EXPORTED)
|
||||
#define USE_KALLSYMS_ON_EACH_SYMBOL (1)
|
||||
#elif defined(STAPCONF_KALLSYMS_ON_EACH_SYMBOL)
|
||||
@@ -684,7 +687,7 @@ struct stapkp_symbol_data {
|
||||
|
||||
|
||||
static int
|
||||
-stapkp_symbol_callback(void *data, const char *name,
|
||||
+__stapkp_symbol_callback(void *data, const char *name,
|
||||
struct module *mod, unsigned long addr)
|
||||
{
|
||||
struct stapkp_symbol_data *sd = data;
|
||||
@@ -733,6 +736,19 @@ stapkp_symbol_callback(void *data, const char *name,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,4,0)
|
||||
+stapkp_symbol_callback(void *data, const char *name,
|
||||
+ unsigned long addr)
|
||||
+{
|
||||
+ struct module *mod = NULL;
|
||||
+#else
|
||||
+stapkp_symbol_callback(void *data, const char *name,
|
||||
+ struct module *mod, unsigned long addr)
|
||||
+{
|
||||
+#endif
|
||||
+ return __stapkp_symbol_callback(data, name, mod, addr);
|
||||
+}
|
||||
|
||||
static int
|
||||
stapkp_init(struct stap_kprobe_probe *probes,
|
||||
@@ -764,6 +780,11 @@ 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)
|
||||
+ 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);
|
||||
+#endif
|
||||
#ifdef STAPCONF_MODULE_MUTEX
|
||||
mutex_unlock(&module_mutex);
|
||||
#endif
|
||||
@@ -834,6 +855,11 @@ 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)
|
||||
+ 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);
|
||||
+#endif
|
||||
#ifdef STAPCONF_MODULE_MUTEX
|
||||
mutex_unlock(&module_mutex);
|
||||
#endif
|
||||
diff --git a/runtime/linux/runtime.h b/runtime/linux/runtime.h
|
||||
index 86d64fd0d..f7b3cdcf0 100644
|
||||
--- a/runtime/linux/runtime.h
|
||||
+++ b/runtime/linux/runtime.h
|
||||
@@ -221,11 +221,15 @@ static void *_stp_kallsyms_lookup_name;
|
||||
#ifndef CONFIG_PPC64
|
||||
#define STAPCONF_KALLSYMS_ON_EACH_SYMBOL
|
||||
#if !defined(STAPCONF_KALLSYMS_ON_EACH_SYMBOL_EXPORTED)
|
||||
-// XXX Should not be static, since it is linked into kprobes.c.
|
||||
-static void *_stp_kallsyms_on_each_symbol;
|
||||
+// Not static, since it is linked into kprobes.c:
|
||||
+void *_stp_kallsyms_on_each_symbol;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+// No export check and gates. This one seems simply like a non-export.
|
||||
+// Not static, since it is linked into kprobes.c:
|
||||
+void *_stp_module_kallsyms_on_each_symbol;
|
||||
+
|
||||
// PR13489, inode-uprobes sometimes lacks the necessary SYMBOL_EXPORT's.
|
||||
#if !defined(STAPCONF_TASK_USER_REGSET_VIEW_EXPORTED)
|
||||
static void *kallsyms_task_user_regset_view;
|
||||
diff --git a/runtime/sym.c b/runtime/sym.c
|
||||
index fc81ac5e8..29171b45f 100644
|
||||
--- a/runtime/sym.c
|
||||
+++ b/runtime/sym.c
|
||||
@@ -1155,9 +1155,15 @@ 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)
|
||||
+int kallsyms_on_each_symbol(int (*fn)(void *, const char *,
|
||||
+ unsigned long),
|
||||
+ void *data)
|
||||
+#else
|
||||
int kallsyms_on_each_symbol(int (*fn)(void *, const char *, struct module *,
|
||||
unsigned long),
|
||||
void *data)
|
||||
+#endif
|
||||
{
|
||||
/* First, try to use a kallsyms_lookup_name address passed to us
|
||||
through the relocation mechanism. */
|
||||
@@ -1170,6 +1176,39 @@ int kallsyms_on_each_symbol(int (*fn)(void *, const char *, struct module *,
|
||||
_stp_error("BUG: attempting to use unavailable kallsyms_on_each_symbol!!\n");
|
||||
return 0;
|
||||
}
|
||||
+
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,12,0)
|
||||
+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)
|
||||
+int module_kallsyms_on_each_symbol(const char *modname,
|
||||
+ int (*fn)(void *, const char *,
|
||||
+ unsigned long),
|
||||
+ void *data)
|
||||
+#else
|
||||
+int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *, struct module *,
|
||||
+ unsigned long),
|
||||
+ void *data)
|
||||
+#endif
|
||||
+{
|
||||
+ /* 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,4,0)
|
||||
+ return (* (module_kallsyms_on_each_symbol_fn)_stp_module_kallsyms_on_each_symbol)(modname, fn, data);
|
||||
+#else
|
||||
+ return (* (module_kallsyms_on_each_symbol_fn)_stp_module_kallsyms_on_each_symbol)(fn, data);
|
||||
+#endif
|
||||
+
|
||||
+ /* Next, give up and signal a BUG. We should have detected
|
||||
+ that this function is not available and used a different
|
||||
+ mechanism! */
|
||||
+ _stp_error("BUG: attempting to use unavailable module_kallsyms_on_each_symbol!!\n");
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
#endif
|
||||
|
||||
|
||||
diff --git a/runtime/transport/symbols.c b/runtime/transport/symbols.c
|
||||
index 7f2fe0fc8..3af9a1098 100644
|
||||
--- a/runtime/transport/symbols.c
|
||||
+++ b/runtime/transport/symbols.c
|
||||
@@ -119,6 +119,10 @@ static void _stp_do_relocation(const char __user *buf, size_t count)
|
||||
_stp_kallsyms_on_each_symbol = (void *) msg.address;
|
||||
}
|
||||
#endif
|
||||
+ if (!strcmp ("kernel", msg.module)
|
||||
+ && !strcmp ("module_kallsyms_on_each_symbol", msg.reloc)) {
|
||||
+ _stp_module_kallsyms_on_each_symbol = (void *) msg.address;
|
||||
+ }
|
||||
|
||||
_stp_kmodule_update_address(msg.module, msg.reloc, msg.address);
|
||||
}
|
||||
diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c
|
||||
index 3db76badf..cf57d4286 100644
|
||||
--- a/runtime/transport/transport.c
|
||||
+++ b/runtime/transport/transport.c
|
||||
@@ -614,6 +614,7 @@ static int _stp_transport_init(void)
|
||||
#if defined(STAPCONF_KALLSYMS_ON_EACH_SYMBOL) && !defined(STAPCONF_KALLSYMS_ON_EACH_SYMBOL_EXPORTED)
|
||||
_stp_kallsyms_on_each_symbol = NULL;
|
||||
#endif
|
||||
+ _stp_module_kallsyms_on_each_symbol = NULL;
|
||||
#if defined(CONFIG_KALLSYMS) && !defined(STAPCONF_KALLSYMS_LOOKUP_NAME_EXPORTED)
|
||||
_stp_need_kallsyms_stext = 0;
|
||||
#endif
|
||||
diff --git a/staprun/staprun.c b/staprun/staprun.c
|
||||
index edd1bc67a..8437f3af6 100644
|
||||
--- a/staprun/staprun.c
|
||||
+++ b/staprun/staprun.c
|
||||
@@ -640,6 +640,7 @@ int send_relocation_kernel ()
|
||||
int found_stext = 0;
|
||||
int found_kallsyms_lookup_name = 0;
|
||||
int found_kallsyms_on_each_symbol = 0;
|
||||
+ int found_module_kallsyms_on_each_symbol = 0;
|
||||
int done_with_kallsyms = 0;
|
||||
char *line = NULL;
|
||||
size_t linesz = 0;
|
||||
@@ -681,10 +682,20 @@ int send_relocation_kernel ()
|
||||
|
||||
found_kallsyms_on_each_symbol = 1;
|
||||
}
|
||||
+ else if (linesize - pos == sizeof "module_kallsyms_on_each_symbol"
|
||||
+ && !strcmp(line + pos, "module_kallsyms_on_each_symbol" "\n"))
|
||||
+ {
|
||||
+ rc = send_a_relocation ("kernel", "module_kallsyms_on_each_symbol", address);
|
||||
+ if (rc != 0) // non fatal, follows perror()
|
||||
+ dbug(1, "Relocation was reloc module_kallsyms_on_each_symbol=%llx\n", address);
|
||||
+
|
||||
+ found_module_kallsyms_on_each_symbol = 1;
|
||||
+ }
|
||||
}
|
||||
done_with_kallsyms = found_stext
|
||||
&& found_kallsyms_lookup_name
|
||||
- && found_kallsyms_on_each_symbol;
|
||||
+ && found_kallsyms_on_each_symbol
|
||||
+ && found_module_kallsyms_on_each_symbol;
|
||||
}
|
||||
free (line);
|
||||
fclose (kallsyms);
|
||||
--
|
||||
2.39.1
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
From c893e0eaa4dedc90fafc9353ea00fc34ad4b6d42 Mon Sep 17 00:00:00 2001
|
||||
From: William Cohen <wcohen@redhat.com>
|
||||
Date: Wed, 17 May 2023 10:38:31 -0400
|
||||
Subject: [PATCH] Support newer kernels with struct module_memory
|
||||
|
||||
The upstream kernel commit ac3b43283923440900b4f36ca5f9f0b1ca43b70e
|
||||
changed the structures for modules. The runtime printing of kernel
|
||||
information accessed information about modules and the fields in
|
||||
module structure. A test has been added to the autoconf list to
|
||||
determine the appropriate fields to get information about the
|
||||
module.
|
||||
---
|
||||
buildrun.cxx | 2 ++
|
||||
runtime/linux/autoconf-module_memory.c | 3 +++
|
||||
runtime/linux/print.c | 6 ++++++
|
||||
3 files changed, 11 insertions(+)
|
||||
create mode 100644 runtime/linux/autoconf-module_memory.c
|
||||
|
||||
diff --git a/buildrun.cxx b/buildrun.cxx
|
||||
index a4a254c7d..7f4ad860d 100644
|
||||
--- a/buildrun.cxx
|
||||
+++ b/buildrun.cxx
|
||||
@@ -512,6 +512,8 @@ compile_pass (systemtap_session& s)
|
||||
|
||||
output_autoconf(s, o, cs, "autoconf-module_layout.c",
|
||||
"STAPCONF_MODULE_LAYOUT", NULL);
|
||||
+ output_autoconf(s, o, cs, "autoconf-module_memory.c",
|
||||
+ "STAPCONF_MODULE_MEMORY", NULL);
|
||||
output_autoconf(s, o, cs, "autoconf-mod_kallsyms.c",
|
||||
"STAPCONF_MOD_KALLSYMS", NULL);
|
||||
output_exportconf(s, o2, "get_user_pages_remote", "STAPCONF_GET_USER_PAGES_REMOTE");
|
||||
diff --git a/runtime/linux/autoconf-module_memory.c b/runtime/linux/autoconf-module_memory.c
|
||||
new file mode 100644
|
||||
index 000000000..db04b8d2e
|
||||
--- /dev/null
|
||||
+++ b/runtime/linux/autoconf-module_memory.c
|
||||
@@ -0,0 +1,3 @@
|
||||
+#include <linux/module.h>
|
||||
+
|
||||
+struct module_memory ml;
|
||||
diff --git a/runtime/linux/print.c b/runtime/linux/print.c
|
||||
index 57a157986..594b155be 100644
|
||||
--- a/runtime/linux/print.c
|
||||
+++ b/runtime/linux/print.c
|
||||
@@ -361,6 +361,11 @@ static void _stp_print_kernel_info(char *sname, char *vstr, int ctx, int num_pro
|
||||
(unsigned long) (THIS_MODULE->core_layout.size - THIS_MODULE->core_layout.text_size)/1024,
|
||||
(unsigned long) (THIS_MODULE->core_layout.text_size)/1024,
|
||||
#else
|
||||
+#if STAPCONF_MODULE_MEMORY
|
||||
+ (unsigned long) THIS_MODULE->mem[MOD_TEXT].base,
|
||||
+ (unsigned long) (THIS_MODULE->mem[MOD_DATA].size)/1024,
|
||||
+ (unsigned long) (THIS_MODULE->mem[MOD_TEXT].size)/1024,
|
||||
+#else
|
||||
#ifndef STAPCONF_GRSECURITY
|
||||
(unsigned long) THIS_MODULE->module_core,
|
||||
(unsigned long) (THIS_MODULE->core_size - THIS_MODULE->core_text_size)/1024,
|
||||
@@ -370,6 +375,7 @@ static void _stp_print_kernel_info(char *sname, char *vstr, int ctx, int num_pro
|
||||
(unsigned long) (THIS_MODULE->core_size_rw - THIS_MODULE->core_size_rx)/1024,
|
||||
(unsigned long) (THIS_MODULE->core_size_rx)/1024,
|
||||
#endif
|
||||
+#endif
|
||||
#endif
|
||||
ctx/1024,
|
||||
_stp_allocated_net_memory/1024,
|
||||
--
|
||||
2.39.1
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
--- a/tapset/linux/ipmib.stp
|
||||
+++ b/tapset/linux/ipmib.stp
|
||||
@@ -271,7 +271,7 @@
|
||||
* IPSTATS_MIB_INUNKNOWNPROTOS)
|
||||
*/
|
||||
/* icmp_send() is called by ip_local_deliver_finish() */
|
||||
-probe ipmib.InUnknownProtos=kernel.function("icmp_send")
|
||||
+probe ipmib.InUnknownProtos=kernel.function("__icmp_send")
|
||||
{
|
||||
skb = $skb_in;
|
||||
op = 1;
|
||||
@@ -360,7 +360,7 @@
|
||||
* counted in the global @ReasmTimeout (equivalent to SNMP's MIB
|
||||
* IPSTATS_MIB_REASMTIMEOUT)
|
||||
*/
|
||||
-probe ipmib.ReasmTimeout=kernel.function("icmp_send")
|
||||
+probe ipmib.ReasmTimeout=kernel.function("__icmp_send")
|
||||
{
|
||||
skb = $skb_in;
|
||||
op = 0;
|
||||
--- a/tapset/linux/linuxmib.stp
|
||||
+++ b/tapset/linux/linuxmib.stp
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
probe _linuxmib.DelayedACKs.A = kernel.function("tcp_send_ack")
|
||||
{
|
||||
- sk=$sk
|
||||
+ sk=pointer_arg(1)
|
||||
if ( !indelack_timer[sk] ) next
|
||||
op=1
|
||||
key = linuxmib_filter_key(sk,op);
|
||||
--- a/testsuite/systemtap.examples/network/tcp_trace.stp
|
||||
+++ b/testsuite/systemtap.examples/network/tcp_trace.stp
|
||||
@@ -192,7 +192,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
-probe kernel.function("tcp_transmit_skb")
|
||||
+probe kernel.function("__tcp_transmit_skb")
|
||||
{
|
||||
sk = $sk
|
||||
key = filter_key(sk)
|
||||
@@ -1,29 +0,0 @@
|
||||
--- a/testsuite/systemtap.examples/general/tapset/python3_local.stp
|
||||
+++ b/testsuite/systemtap.examples/general/tapset/python3_local.stp
|
||||
@@ -182,7 +182,7 @@
|
||||
n = @cast (dict, "PyDictObject", @PYTHON3_LIBRARY)->ma_used;
|
||||
if (i > n || entries == 0)
|
||||
return 0
|
||||
- return @cast (entries, "PyDictKeysObject", @PYTHON3_LIBRARY)->dk_entries[i]->me_hash
|
||||
+ return @cast (@DK_ENTRIES(entries), "PyDictKeyEntry", @PYTHON3_LIBRARY)[i]->me_hash
|
||||
}
|
||||
|
||||
# FUNCTION P3_GET_DICT_KEY
|
||||
@@ -195,7 +195,7 @@
|
||||
n = @cast (dict, "PyDictObject", @PYTHON3_LIBRARY)->ma_used;
|
||||
if (i > n || entries == 0)
|
||||
return 0
|
||||
- return @cast (entries, "PyDictKeysObject", @PYTHON3_LIBRARY)->dk_entries[i]->me_key
|
||||
+ return @cast (@DK_ENTRIES(entries), "PyDictKeyEntry", @PYTHON3_LIBRARY)[i]->me_key
|
||||
}
|
||||
|
||||
# FUNCTION P3_GET_DICT_VALUE
|
||||
@@ -214,7 +214,7 @@
|
||||
n = @cast (dict, "PyDictObject", @PYTHON3_LIBRARY)->ma_used;
|
||||
if (i > n || entries == 0)
|
||||
return 0
|
||||
- return @cast (entries, "PyDictKeysObject", @PYTHON3_LIBRARY)->dk_entries[i]->me_value
|
||||
+ return @cast (@DK_ENTRIES(entries), "PyDictKeyEntry", @PYTHON3_LIBRARY)[i]->me_value
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
diff --git a/testsuite/systemtap.examples/general/tapset/python_local.stpm b/testsuite/systemtap.examples/general/tapset/python_local.stpm
|
||||
--- a/testsuite/systemtap.examples/general/tapset/python_local.stpm
|
||||
+++ b/testsuite/systemtap.examples/general/tapset/python_local.stpm
|
||||
@@ -8,4 +8,39 @@
|
||||
@define PYTHON3_LIBRARY
|
||||
%(
|
||||
- "/usr/lib64/libpython3.4m.so.1.0"
|
||||
+ "/usr/lib64/libpython3.7m.so.1.0"
|
||||
%)
|
||||
+
|
||||
+@define Py3DictKeysObject(object) %(
|
||||
+ @cast(@object, "PyDictKeysObject", @PYTHON3_LIBRARY)
|
||||
+ %)
|
||||
+@define Py3DictKeyEntry(object) %(
|
||||
+ @cast(@object, "PyDictKeyEntry", @PYTHON3_LIBRARY)
|
||||
+ %)
|
||||
+
|
||||
+@define DK_SIZE(dk) %(
|
||||
+ @Py3DictKeysObject(@dk)->dk_size
|
||||
+%)
|
||||
+@define DK_IXSIZE(dk) %(
|
||||
+ %( CONFIG_64BIT == "y" %?
|
||||
+ %( CONFIG_COMPAT == "y" %?
|
||||
+ (@__compat_task
|
||||
+ ? (@DK_SIZE(@dk) <= 0xff ? 1 : (@DK_SIZE(@dk) <= 0xffff ? 2
|
||||
+: 4))
|
||||
+ : (@DK_SIZE(@dk) <= 0xff ?
|
||||
+ 1 : (@DK_SIZE(@dk) <= 0xffff ?
|
||||
+ 2 : (@DK_SIZE(@dk) <= 0xffffffff ? 4 : 8))))
|
||||
+ %:
|
||||
+ (@DK_SIZE(@dk) <= 0xff ?
|
||||
+ 1 : (@DK_SIZE(@dk) <= 0xffff ?
|
||||
+ 2 : (@DK_SIZE(@dk) <= 0xffffffff ? 4 : 8)))
|
||||
+ %)
|
||||
+ %:
|
||||
+ (@DK_SIZE(@dk) <= 0xff ? 1 : (@DK_SIZE(@dk) <= 0xffff ? 2 : 4))
|
||||
+ %)
|
||||
+%)
|
||||
+
|
||||
+@define DK_ENTRIES(dk) %(
|
||||
+ (@choose_defined(@Py3DictKeysObject(@dk)->dk_entries,
|
||||
+(&@Py3DictKeyEntry(&@Py3DictKeysObject(@dk)->dk_indices[@DK_SIZE(@dk) *
|
||||
+@DK_IXSIZE(@dk)]))))
|
||||
+%)
|
||||
@@ -0,0 +1,63 @@
|
||||
From 5d0424e51857d5f706e78d6d962f380fa70f49f0 Mon Sep 17 00:00:00 2001
|
||||
From: langfei <langfei@huawei.com>
|
||||
Date: Wed, 5 Jul 2023 10:27:11 +0800
|
||||
Subject: [PATCH] fix network tcp test error
|
||||
|
||||
Signed-off-by: langfei <langfei@huawei.com>
|
||||
---
|
||||
tapset/linux/ipmib.stp | 4 ++--
|
||||
tapset/linux/linuxmib.stp | 2 +-
|
||||
testsuite/systemtap.examples/network/tcp_trace.stp | 2 +-
|
||||
3 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tapset/linux/ipmib.stp b/tapset/linux/ipmib.stp
|
||||
index 6f51dfd..603c5d4 100644
|
||||
--- a/tapset/linux/ipmib.stp
|
||||
+++ b/tapset/linux/ipmib.stp
|
||||
@@ -271,7 +271,7 @@ probe ipmib.InAddrErrors=kernel.function("ip_route_input_noref").return!,
|
||||
* IPSTATS_MIB_INUNKNOWNPROTOS)
|
||||
*/
|
||||
/* icmp_send() is called by ip_local_deliver_finish() */
|
||||
-probe ipmib.InUnknownProtos=kernel.function("icmp_send")
|
||||
+probe ipmib.InUnknownProtos=kernel.function("__icmp_send")
|
||||
{
|
||||
skb = $skb_in;
|
||||
op = 1;
|
||||
@@ -360,7 +360,7 @@ probe ipmib.OutRequests=kernel.function("ip_output"),
|
||||
* counted in the global @ReasmTimeout (equivalent to SNMP's MIB
|
||||
* IPSTATS_MIB_REASMTIMEOUT)
|
||||
*/
|
||||
-probe ipmib.ReasmTimeout=kernel.function("icmp_send")
|
||||
+probe ipmib.ReasmTimeout=kernel.function("__icmp_send")
|
||||
{
|
||||
skb = $skb_in;
|
||||
op = 0;
|
||||
diff --git a/tapset/linux/linuxmib.stp b/tapset/linux/linuxmib.stp
|
||||
index 63ec248..cb92875 100644
|
||||
--- a/tapset/linux/linuxmib.stp
|
||||
+++ b/tapset/linux/linuxmib.stp
|
||||
@@ -30,7 +30,7 @@ probe linuxmib.DelayedACKs = _linuxmib.DelayedACKs.* {}
|
||||
|
||||
probe _linuxmib.DelayedACKs.A = kernel.function("tcp_send_ack")
|
||||
{
|
||||
- sk=$sk
|
||||
+ sk=pointer_arg(1)
|
||||
if ( !indelack_timer[sk] ) next
|
||||
op=1
|
||||
key = linuxmib_filter_key(sk,op);
|
||||
diff --git a/testsuite/systemtap.examples/network/tcp_trace.stp b/testsuite/systemtap.examples/network/tcp_trace.stp
|
||||
index 65a32f2..98c77c0 100755
|
||||
--- a/testsuite/systemtap.examples/network/tcp_trace.stp
|
||||
+++ b/testsuite/systemtap.examples/network/tcp_trace.stp
|
||||
@@ -192,7 +192,7 @@ probe kernel.{function("tcp_rcv_established"),
|
||||
}
|
||||
}
|
||||
|
||||
-probe kernel.function("tcp_transmit_skb")
|
||||
+probe kernel.function("__tcp_transmit_skb")
|
||||
{
|
||||
sk = $sk
|
||||
key = filter_key(sk)
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From cea3c6a744e5f0d2017e5cc11033b8d226b482f9 Mon Sep 17 00:00:00 2001
|
||||
From: langfei <langfei@huawei.com>
|
||||
Date: Wed, 5 Jul 2023 10:45:23 +0800
|
||||
Subject: [PATCH] local is only valid in functions for shellcheck sc2168
|
||||
|
||||
Signed-off-by: langfei <langfei@huawei.com>
|
||||
---
|
||||
doc/Tapset_Reference_Guide/publicanize.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/doc/Tapset_Reference_Guide/publicanize.sh b/doc/Tapset_Reference_Guide/publicanize.sh
|
||||
index 330409e..97254fe 100755
|
||||
--- a/doc/Tapset_Reference_Guide/publicanize.sh
|
||||
+++ b/doc/Tapset_Reference_Guide/publicanize.sh
|
||||
@@ -22,7 +22,7 @@ do
|
||||
val=`printf %s $1 | awk -F= '{print $2}'`
|
||||
shift
|
||||
if test -z "$val"; then
|
||||
- local possibleval=$1
|
||||
+ possibleval=$1
|
||||
printf %s $1 "$possibleval" | grep ^- >/dev/null 2>&1
|
||||
if test "$?" != "0"; then
|
||||
val=$possibleval
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
name: systemtap
|
||||
old_version: 4.1
|
||||
new_version: 4.3
|
||||
interface_differences:
|
||||
- type: 'feature'
|
||||
item: 支持eBPF功能
|
||||
diff: 新增
|
||||
influence: 支持prometheus导出器、procfs探针等eBPF功能
|
||||
- type: 'feature'
|
||||
item: 同名probe解析功能
|
||||
diff: 新增
|
||||
influence: 支持用不同的PC地址去区分多个同名的probe
|
||||
- type: 'feature'
|
||||
item: 后端执行器支持try-catch捕获异常
|
||||
diff: 新增
|
||||
influence: 不影响
|
||||
- type: 'ABI'
|
||||
item: 新增gettimeofday()
|
||||
diff: 返回当前的时间
|
||||
influence: 不影响
|
||||
- type: 'ABI'
|
||||
item: 新增dump_stack()
|
||||
diff: 打印内核调用栈
|
||||
influence: 不影响
|
||||
- type: 'ABI'
|
||||
item: gettimeofday_*
|
||||
diff: 返回当前的时间
|
||||
influence: 不影响
|
||||
- type: 'CLI'
|
||||
item: 加强对$variable变量类型的检查
|
||||
diff: 可能在解析和编译的时候输出更多的告警信息
|
||||
influence: 尽可能的修正这些告警信息,虽然不会影响最终的执行结果
|
||||
remark: '功能增强,无影响;'
|
||||
Binary file not shown.
Binary file not shown.
+395
-280
@@ -3,8 +3,6 @@
|
||||
%{!?with_dyninst: %global with_dyninst 1}
|
||||
%{!?with_mokutil: %global with_mokutil 1}
|
||||
%{!?with_openssl: %global with_openssl 1}
|
||||
%{!?with_virthost: %global with_virthost 1}
|
||||
%global virt_config --enable-virt
|
||||
%global crash_config --enable-crash
|
||||
%global dyninst_config --with-dyninst
|
||||
%else
|
||||
@@ -12,13 +10,10 @@
|
||||
%{!?with_dyninst: %global with_dyninst 0}
|
||||
%{!?with_mokutil: %global with_mokutil 0}
|
||||
%{!?with_openssl: %global with_openssl 0}
|
||||
%{!?with_virthost: %global with_virthost 0}
|
||||
%global virt_config --disable-virt
|
||||
%global crash_config --disable-crash
|
||||
%global dyninst_config --without-dyninst
|
||||
%endif
|
||||
|
||||
%define initdir %{_initddir}
|
||||
%define udevrulesdir /usr/lib/udev/rules.d
|
||||
%define dracutstap %{_prefix}/lib/dracut/modules.d/99stap
|
||||
%define dracutbindir /sbin
|
||||
@@ -26,23 +21,27 @@
|
||||
%undefine __brp_mangle_shebangs
|
||||
|
||||
Name: systemtap
|
||||
Version: 4.1
|
||||
Version: 4.9
|
||||
Release: 1
|
||||
Summary: Linux trace and probe tool
|
||||
License: GPLv2+ and Public Domain
|
||||
URL: http://sourceware.org/systemtap/
|
||||
URL: http://sourceware.org/systemtap
|
||||
Source: https://sourceware.org/systemtap/ftp/releases/%{name}-%{version}.tar.gz
|
||||
|
||||
Patch9000: fix-py3example-script-run-fail.patch
|
||||
Patch9001: fix-py3example-script-run-fail-2.patch
|
||||
Patch9002: fix-network-tcp-test.patch
|
||||
Patch1: 0001-PR30405-stapkp_init-we-should-not-disable-preemption.patch
|
||||
Patch2: 0001-Support-newer-kernels-with-struct-module_memory.patch
|
||||
Patch3: 0001-PR30415-conflicting-types-for-kallsyms_on_each_symbo.patch
|
||||
|
||||
BuildRequires: emacs gcc-c++ gettext-devel jpackage-utils java-devel
|
||||
BuildRequires: readline-devel rpm-devel systemd pkgconfig(nss)
|
||||
BuildRequires: pkgconfig(avahi-client) pkgconfig(json-c) pkgconfig(ncurses)
|
||||
BuildRequires: python3-devel python3-setuptools nss-devel avahi-devel
|
||||
BuildRequires: sqlite-devel > 3.7
|
||||
Patch9000: huawei-fix-network-tcp-test-error.patch
|
||||
Patch9001: huawei-local-is-only-valid-in-functions-for-shellche-sc2168.patch
|
||||
|
||||
BuildRequires: gcc-c++ emacs systemd python3-setuptools
|
||||
BuildRequires: gettext-devel rpm-devel readline-devel
|
||||
BuildRequires: pkgconfig(nss) pkgconfig(avahi-client)
|
||||
BuildRequires: pkgconfig(ncurses) pkgconfig(json-c)
|
||||
BuildRequires: jpackage-utils python3-devel
|
||||
BuildRequires: elfutils-devel >= 0.142
|
||||
BuildRequires: sqlite-devel > 3.7
|
||||
%if %{with_dyninst}
|
||||
BuildRequires: dyninst-devel >= 8.0
|
||||
BuildRequires: pkgconfig(libselinux)
|
||||
@@ -50,54 +49,8 @@ BuildRequires: pkgconfig(libselinux)
|
||||
%if %{with_crash}
|
||||
BuildRequires: crash-devel zlib-devel
|
||||
%endif
|
||||
%if %{with_virthost}
|
||||
BuildRequires: pkgconfig(libvirt) pkgconfig(libxml-2.0)
|
||||
Requires: libvirt > 2.0
|
||||
%endif
|
||||
|
||||
Requires: nss coreutils zip unzip shadow-utils chkconfig systemd
|
||||
Requires: shadow-utils openssh-clients python3-pyparsing pyparsing
|
||||
Requires: which elfutils grep nc gcc gcc-c++ make glibc-devel
|
||||
Requires: strace nmap-ncat avahi perl iproute libxml2 findutils
|
||||
Requires: kernel-devel
|
||||
%if %{with_openssl}
|
||||
Requires: openssl
|
||||
%endif
|
||||
%if %{with_mokutil}
|
||||
Requires: mokutil
|
||||
%endif
|
||||
%if %{with_crash}
|
||||
Requires: crash
|
||||
%endif
|
||||
Requires(pre): shadow-utils
|
||||
Requires(post): chkconfig findutils coreutils
|
||||
Requires(preun): chkconfig grep coreutils
|
||||
Requires(postun): grep coreutils
|
||||
|
||||
Provides: systemtap-devel = %{version}-%{release}
|
||||
Provides: systemtap-runtime = %{version}-%{release}
|
||||
Provides: systemtap-server = %{version}-%{release}
|
||||
Provides: systemtap-client = %{version}-%{release}
|
||||
Provides: systemtap-initscript = %{version}-%{release}
|
||||
Provides: systemtap-runtime_java = %{version}-%{release}
|
||||
Provides: systemtap-runtime-python3 = %{version}-%{release}
|
||||
Provides: systemtap-stap-exporter = %{version}-%{release}
|
||||
%if %{with_virthost}
|
||||
Provides: systemtap-runtime-virthost = %{version}-%{release}
|
||||
%endif
|
||||
Provides: systemtap-runtime-virtguest = %{version}-%{release}
|
||||
Obsoletes: systemtap-devel
|
||||
Obsoletes: systemtap-runtime
|
||||
Obsoletes: systemtap-server
|
||||
Obsoletes: systemtap-client
|
||||
Obsoletes: systemtap-initscript
|
||||
Obsoletes: systemtap-runtime_java
|
||||
Obsoletes: systemtap-runtime-python3
|
||||
Obsoletes: systemtap-stap-exporter
|
||||
%if %{with_virthost}
|
||||
Obsoletes: systemtap-runtime-virthost
|
||||
%endif
|
||||
Obsoletes: systemtap-runtime-virtguest
|
||||
Requires: systemtap-client = %{version}-%{release}
|
||||
|
||||
%description
|
||||
SystemTap is an instrumentation system for systems running Linux.
|
||||
@@ -105,199 +58,233 @@ Developers can write instrumentation scripts to collect data on
|
||||
the operation of the system. The base systemtap package contains/requires
|
||||
the components needed to locally develop and execute systemtap scripts.
|
||||
|
||||
%package runtime-java
|
||||
Summary: Systemtap java runtime
|
||||
%package devel
|
||||
Summary: Programmable system-wide instrumentation system - development headers, tools
|
||||
License: GPLv2+
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: byteman > 2.0
|
||||
Requires: iproute
|
||||
Requires: make kernel-devel systemd
|
||||
|
||||
%description runtime-java
|
||||
Systemtap for java runtime support
|
||||
%description devel
|
||||
This package contains the components needed to compile a systemtap
|
||||
script from source form into executable (.ko) forms. It may be
|
||||
installed on a self-contained developer workstation (along with the
|
||||
systemtap-client and systemtap-runtime packages), or on a dedicated
|
||||
remote server (alongside the systemtap-server package). It includes
|
||||
a copy of the standard tapset library and the runtime library C files.
|
||||
|
||||
%package runtime-python3
|
||||
Summary: Systemtap python 3 runtime
|
||||
%package server
|
||||
Summary: Instrumentation System Server
|
||||
License: GPLv2+
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: systemtap-devel = %{version}-%{release}
|
||||
Requires: coreutils nss zip unzip
|
||||
Requires(pre): shadow-utils
|
||||
BuildRequires: nss-devel avahi-devel
|
||||
%if %{with_openssl}
|
||||
Requires: openssl
|
||||
%endif
|
||||
|
||||
%description runtime-python3
|
||||
Systemtap for python3 runtime support
|
||||
%description server
|
||||
This is the remote script compilation server component of systemtap.
|
||||
It announces itself to nearby clients with avahi (if available), and
|
||||
compiles systemtap scripts to kernel objects on their demand.
|
||||
|
||||
%package runtime
|
||||
Summary: Programmable system-wide instrumentation system - runtime
|
||||
License: GPLv2+
|
||||
Requires(pre): shadow-utils
|
||||
|
||||
%description runtime
|
||||
SystemTap runtime contains the components needed to execute
|
||||
a systemtap script that was already compiled into a module
|
||||
using a local or remote systemtap-devel installation.
|
||||
|
||||
%package client
|
||||
Summary: Programmable system-wide instrumentation system - client
|
||||
License: GPLv2+
|
||||
Requires: zip unzip
|
||||
Requires: systemtap-runtime = %{version}-%{release}
|
||||
Requires: coreutils grep sed unzip zip
|
||||
Requires: openssh-clients
|
||||
%if %{with_mokutil}
|
||||
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
|
||||
documentation, and a copy of the tapset library for reference.
|
||||
|
||||
%package sdt-devel
|
||||
Summary: Development package for systemtap
|
||||
Summary: Static probe support tools
|
||||
License: GPLv2+ and Public Domain
|
||||
Requires: python3-pyparsing
|
||||
|
||||
%description sdt-devel
|
||||
The sdt-development package for systemtap.
|
||||
|
||||
%package help
|
||||
Summary: Help documents for systemtap
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
%description help
|
||||
The help documents for systemtap.
|
||||
|
||||
%package lang
|
||||
Summary: Language package for systemtap
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
%description lang
|
||||
The language package for systemtap.
|
||||
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.
|
||||
|
||||
%package testsuite
|
||||
Summary: Instrumentation System Testsuite
|
||||
License: GPLv2+
|
||||
URL: http://sourceware.org/systemtap/
|
||||
Requires: systemtap = %{version}-%{release}
|
||||
Requires: systemtap-devel = %{version}-%{release}
|
||||
Requires: systemtap-sdt-devel = %{version}-%{release}
|
||||
Requires: systemtap-server = %{version}-%{release}
|
||||
Requires: dejagnu which elfutils grep nc
|
||||
Requires: gcc gcc-c++ make glibc-devel
|
||||
Requires: strace
|
||||
Requires: nmap-ncat
|
||||
Requires: avahi
|
||||
Requires: strace nc avahi perf
|
||||
Requires: systemtap-runtime-python3 = %{version}-%{release}
|
||||
%if %{with_crash}
|
||||
Requires: crash
|
||||
%endif
|
||||
Requires: systemtap-runtime-java = %{version}-%{release}
|
||||
Requires: systemtap-runtime-python3 = %{version}-%{release}
|
||||
Requires: perf
|
||||
|
||||
%description testsuite
|
||||
Testsuite for systemtap.
|
||||
This package includes the dejagnu-based systemtap stress self-testing
|
||||
suite. This may be used by system administrators to thoroughly check
|
||||
systemtap on the current system.
|
||||
|
||||
%package runtime-python3
|
||||
Summary: Systemtap Python 3 Runtime Support
|
||||
License: GPLv2+
|
||||
URL: http://sourceware.org/systemtap
|
||||
Requires: systemtap-runtime = %{version}-%{release}
|
||||
|
||||
%description runtime-python3
|
||||
This package includes support files needed to run systemtap scripts
|
||||
that probe python3 processes.
|
||||
|
||||
%package stap-exporter
|
||||
Summary: Systemtap-prometheus interoperation mechanism
|
||||
License: GPLv2+
|
||||
URL: http://sourceware.org/systemtap
|
||||
Requires: systemtap-runtime = %{version}-%{release}
|
||||
|
||||
%description stap-exporter
|
||||
This package includes files for a systemd service that manages
|
||||
systemtap sessions and relays prometheus metrics from the sessions
|
||||
to remote requesters on demand.
|
||||
|
||||
%package jupyter
|
||||
Summary: ISystemtap jupyter kernel and examples
|
||||
License: GPLv2+
|
||||
URL: http://sourceware.org/systemtap/
|
||||
Requires: systemtap = %{version}-%{release}
|
||||
|
||||
%description jupyter
|
||||
This package includes files needed to build and run
|
||||
the interactive systemtap Jupyter kernel, either locally
|
||||
or within a container.
|
||||
|
||||
%package help
|
||||
Summary: systemtap manual
|
||||
License: GPLv2+
|
||||
URL: http://sourceware.org/systemtap
|
||||
|
||||
%description help
|
||||
This package include systemtap manual
|
||||
|
||||
%prep
|
||||
%autosetup %{?setup_elfutils} -p1
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
%configure \
|
||||
%{dyninst_config} \
|
||||
%{crash_config} \
|
||||
%{virt_config} \
|
||||
--enable-sqlite \
|
||||
--enable-pie \
|
||||
--with-rpm \
|
||||
--with-java=%{_jvmdir}/java \
|
||||
--with-dracutstap=%{dracutstap} \
|
||||
--with-dracutbindir=%{dracutbindir} \
|
||||
--with-python3 \
|
||||
--without-python2-probes \
|
||||
--with-python3-probes \
|
||||
--disable-httpd \
|
||||
--with-bpf \
|
||||
--disable-silent-rules \
|
||||
--with-extra-version="rpm %{version}-%{release}"
|
||||
%{dyninst_config} \
|
||||
%{crash_config} \
|
||||
--with-bpf \
|
||||
--disable-httpd \
|
||||
--with-dracutstap=%{dracutstap} \
|
||||
--with-dracutbindir=%{dracutbindir} \
|
||||
--with-python3 \
|
||||
--with-python3-probes \
|
||||
--enable-pie \
|
||||
--with-rpm \
|
||||
--enable-sqlite \
|
||||
--disable-silent-rules \
|
||||
--with-extra-version="rpm %{version}-%{release}"
|
||||
|
||||
%make_build
|
||||
%{_emacs_bytecompile} emacs/systemtap-mode.el
|
||||
|
||||
%install
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
%make_install
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
%find_lang %{name}
|
||||
for dir in $(ls -1d $RPM_BUILD_ROOT%{_mandir}/{??,??_??}) ; do
|
||||
dir=$(echo $dir | sed -e "s|^$RPM_BUILD_ROOT||")
|
||||
lang=$(basename $dir)
|
||||
echo "%%lang($lang) $dir/man*/*" >> %{name}.lang
|
||||
done
|
||||
cp testsuite $RPM_BUILD_ROOT%{_datadir}/systemtap -r
|
||||
|
||||
ln -s %{_datadir}/systemtap/examples
|
||||
find $RPM_BUILD_ROOT%{_datadir}/systemtap/examples -type f -name '*.stp' -print0 | xargs -0 sed -i -r -e '1s@^#!.+stap@#!%{_bindir}/stap@'
|
||||
chmod 755 $RPM_BUILD_ROOT%{_bindir}/staprun
|
||||
install -c -m 755 stap-prep $RPM_BUILD_ROOT%{_bindir}/stap-prep
|
||||
cp -rp testsuite $RPM_BUILD_ROOT%{_datadir}/systemtap
|
||||
mkdir docs.installed
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/*.pdf docs.installed/
|
||||
install -D -m 644 macros.systemtap $RPM_BUILD_ROOT%{_rpmmacrodir}/macros.systemtap
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/stap-server
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/stap-server
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/stap-server/.systemtap
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/stap-server
|
||||
touch $RPM_BUILD_ROOT%{_localstatedir}/log/stap-server/log
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/systemtap
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/systemtap
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
|
||||
install -m 644 initscript/logrotate.stap-server $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/stap-server
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
||||
touch $RPM_BUILD_ROOT%{_unitdir}/systemtap.service
|
||||
install -m 644 initscript/systemtap.service $RPM_BUILD_ROOT%{_unitdir}/systemtap.service
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
|
||||
install -m 755 initscript/systemtap $RPM_BUILD_ROOT%{_sbindir}/systemtap-service
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/conf.d
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/script.d
|
||||
install -m 644 initscript/config.systemtap $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/config
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
||||
touch $RPM_BUILD_ROOT%{_unitdir}/stap-server.service
|
||||
install -m 644 stap-server.service $RPM_BUILD_ROOT%{_unitdir}/stap-server.service
|
||||
mkdir -p $RPM_BUILD_ROOT%{_tmpfilesdir}
|
||||
install -m 644 stap-server.conf $RPM_BUILD_ROOT%{_tmpfilesdir}/stap-server.conf
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_emacs_sitelispdir}
|
||||
install -p -m 644 emacs/systemtap-mode.el* $RPM_BUILD_ROOT%{_emacs_sitelispdir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_emacs_sitestartdir}
|
||||
install -p -m 644 emacs/systemtap-init.el $RPM_BUILD_ROOT%{_emacs_sitestartdir}/systemtap-init.el
|
||||
for subdir in ftdetect ftplugin indent syntax
|
||||
do
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/$subdir
|
||||
install -p -m 644 vim/$subdir/*.vim $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/$subdir
|
||||
done
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{dracutstap}
|
||||
mkdir -p $RPM_BUILD_ROOT%{udevrulesdir}
|
||||
install -D -m 755 stap-prep $RPM_BUILD_ROOT%{_bindir}/stap-prep
|
||||
install -D -m 644 macros.systemtap $RPM_BUILD_ROOT%{_rpmmacrodir}/macros.systemtap
|
||||
install -D -m 644 initscript/logrotate.stap-server $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/stap-server
|
||||
install -D -m 644 initscript/systemtap.service $RPM_BUILD_ROOT%{_unitdir}/systemtap.service
|
||||
install -D -m 755 initscript/systemtap $RPM_BUILD_ROOT%{_sbindir}/systemtap-service
|
||||
install -D -m 644 initscript/config.systemtap $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/config
|
||||
install -D -m 644 stap-server.service $RPM_BUILD_ROOT%{_unitdir}/stap-server.service
|
||||
install -D -m 644 stap-server.conf $RPM_BUILD_ROOT%{_tmpfilesdir}/stap-server.conf
|
||||
install -D -m 644 emacs/systemtap-init.el $RPM_BUILD_ROOT%{_emacs_sitestartdir}/systemtap-init.el
|
||||
install -D -m 644 emacs/systemtap-mode.el* $RPM_BUILD_ROOT%{_emacs_sitelispdir}/
|
||||
install -D -m 644 vim/ftdetect/*.vim $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/ftdetect/*.vim
|
||||
install -D -m 644 vim/ftplugin/*.vim $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/ftplugin/*.vim
|
||||
install -D -m 644 vim/indent/*.vim $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/indent/*.vim
|
||||
install -D -m 644 vim/syntax/*.vim $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/syntax/*.vim
|
||||
install -D -m 644 staprun/guest/99-stapsh.rules $RPM_BUILD_ROOT%{udevrulesdir}/
|
||||
install -D -m 644 staprun/guest/stapsh@.service $RPM_BUILD_ROOT%{_unitdir}/
|
||||
install -D -m 755 initscript/99stap/module-setup.sh $RPM_BUILD_ROOT%{dracutstap}/
|
||||
install -D -m 755 initscript/99stap/install $RPM_BUILD_ROOT%{dracutstap}/
|
||||
install -D -m 755 initscript/99stap/check $RPM_BUILD_ROOT%{dracutstap}/
|
||||
install -D -m 755 initscript/99stap/start-staprun.sh $RPM_BUILD_ROOT%{dracutstap}/
|
||||
install -D -m 755 stap-exporter/stap-exporter $RPM_BUILD_ROOT%{_bindir}/
|
||||
install -D -m 644 stap-exporter/stap-exporter.service $RPM_BUILD_ROOT%{_unitdir}/
|
||||
install -D -m 644 stap-exporter/stap-exporter.8* $RPM_BUILD_ROOT%{_mandir}/man8/
|
||||
touch $RPM_BUILD_ROOT%{_localstatedir}/log/stap-server/log
|
||||
install -p -m 755 initscript/99stap/module-setup.sh $RPM_BUILD_ROOT%{dracutstap}
|
||||
install -p -m 755 initscript/99stap/install $RPM_BUILD_ROOT%{dracutstap}
|
||||
install -p -m 755 initscript/99stap/check $RPM_BUILD_ROOT%{dracutstap}
|
||||
install -p -m 755 initscript/99stap/start-staprun.sh $RPM_BUILD_ROOT%{dracutstap}
|
||||
touch $RPM_BUILD_ROOT%{dracutstap}/params.conf
|
||||
touch $RPM_BUILD_ROOT%{_unitdir}/systemtap.service
|
||||
|
||||
%pre
|
||||
getent group stapusr >/dev/null || groupadd -r stapusr
|
||||
getent group stapsys >/dev/null || groupadd -r stapsys
|
||||
getent group stapdev >/dev/null || groupadd -r stapde
|
||||
getent group stap-server >/dev/null || groupadd -r stap-server
|
||||
getent passwd stap-server >/dev/null || useradd -c "Systemtap Compile Server" -g stap-server -d /var/lib/stap-server -r -s /sbin/nologin stap-server
|
||||
mkdir -p $RPM_BUILD_ROOT/stap-exporter
|
||||
install -p -m 755 stap-exporter/stap-exporter $RPM_BUILD_ROOT%{_bindir}
|
||||
install -m 644 stap-exporter/stap-exporter.service $RPM_BUILD_ROOT%{_unitdir}
|
||||
install -m 644 stap-exporter/stap-exporter.8* $RPM_BUILD_ROOT%{_mandir}/man8
|
||||
|
||||
%post
|
||||
test -e ~stap-server && chmod 750 ~stap-server
|
||||
if [ ! -f ~stap-server/.systemtap/rc ]; then
|
||||
mkdir -p ~stap-server/.systemtap
|
||||
chown stap-server:stap-server ~stap-server/.systemtap
|
||||
numcpu=`/usr/bin/getconf _NPROCESSORS_ONLN`
|
||||
if [ -z "$numcpu" -o "$numcpu" -lt 1 ]; then numcpu=1; fi
|
||||
nproc=`expr $numcpu \* 30`
|
||||
echo "--rlimit-as=614400000 --rlimit-cpu=60 --rlimit-nproc=$nproc --rlimit-stack=1024000 --rlimit-fsize=51200000" > ~stap-server/.systemtap/rc
|
||||
chown stap-server:stap-server ~stap-server/.systemtap/rc
|
||||
fi
|
||||
test -e /var/log/stap-server/log || {
|
||||
touch /var/log/stap-server/log
|
||||
chmod 644 /var/log/stap-server/log
|
||||
chown stap-server:stap-server /var/log/stap-server/log
|
||||
}
|
||||
/bin/systemd-tmpfiles --create /usr/lib/tmpfiles.d/stap-server.conf >/dev/null 2>&1 || :
|
||||
/bin/systemctl enable systemtap.service >/dev/null 2>&1 || :
|
||||
if [ -d /dev/virtio-ports ]; then
|
||||
(find /dev/virtio-ports -iname 'org.systemtap.stapsh.[0-9]*' -type l \
|
||||
| xargs -n 1 basename \
|
||||
| xargs -n 1 -I {} /bin/systemctl start stapsh@{}.service) >/dev/null 2>&1 || :
|
||||
fi
|
||||
exit 0
|
||||
make -C %{_datadir}/systemtap/runtime/uprobes clean || true
|
||||
/sbin/rmmod uprobes || true
|
||||
|
||||
%preun
|
||||
if [ $1 = 0 ]; then
|
||||
for service in `/bin/systemctl --full | grep stapsh@ | cut -d ' ' -f 1`; do
|
||||
/bin/systemctl stop $service >/dev/null 2>&1 || :
|
||||
done
|
||||
fi
|
||||
/bin/systemctl --no-reload disable stap-server.service >/dev/null 2>&1 || :
|
||||
/bin/systemctl stop stap-server.service >/dev/null 2>&1 || :
|
||||
make -C %{_datadir}/systemtap/runtime/uprobes clean || true
|
||||
/sbin/rmmod uprobes || true
|
||||
%pre runtime
|
||||
getent group stapusr >/dev/null || groupadd -g 156 -r stapusr 2>/dev/null || groupadd -r stapusr
|
||||
getent group stapsys >/dev/null || groupadd -g 157 -r stapsys 2>/dev/null || groupadd -r stapsys
|
||||
getent group stapdev >/dev/null || groupadd -g 158 -r stapdev 2>/dev/null || groupadd -r stapdev
|
||||
exit 0
|
||||
|
||||
%postun
|
||||
if [ "$1" -ge "1" ] ; then
|
||||
/bin/systemctl condrestart stap-server.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
if [ "$1" -ge "1" ]; then
|
||||
for service in `/bin/systemctl --full | grep stapsh@ | cut -d ' ' -f 1`; do
|
||||
/bin/systemctl condrestart $service >/dev/null 2>&1 || :
|
||||
done
|
||||
fi
|
||||
|
||||
%triggerin -- systemtap-server
|
||||
if test -e ~stap-server/.systemtap/ssl/server/stap.cert; then
|
||||
/usr/libexec/systemtap/stap-authorize-cert ~stap-server/.systemtap/ssl/server/stap.cert /etc/systemtap/ssl/client >/dev/null
|
||||
/usr/libexec/systemtap/stap-authorize-cert ~stap-server/.systemtap/ssl/server/stap.cert /etc/systemtap/staprun >/dev/null
|
||||
fi
|
||||
exit 0
|
||||
%pre server
|
||||
getent group stap-server >/dev/null || groupadd -g 155 -r stap-server 2>/dev/null || groupadd -r stap-server
|
||||
getent passwd stap-server >/dev/null || \
|
||||
useradd -c "Systemtap Compile Server" -u 155 -g stap-server -d %{_localstatedir}/lib/stap-server -r -s /sbin/nologin stap-server 2>/dev/null || \
|
||||
useradd -c "Systemtap Compile Server" -g stap-server -d %{_localstatedir}/lib/stap-server -r -s /sbin/nologin stap-server
|
||||
|
||||
%pre testsuite
|
||||
getent passwd stapusr >/dev/null || \
|
||||
@@ -308,113 +295,241 @@ getent passwd stapdev >/dev/null || \
|
||||
useradd -c "Systemtap 'stapdev' User" -g stapdev -G stapusr -r -s /sbin/nologin stapdev
|
||||
exit 0
|
||||
|
||||
%post server
|
||||
test -e ~stap-server && chmod 750 ~stap-server
|
||||
if [ ! -f ~stap-server/.systemtap/rc ]; then
|
||||
mkdir -p ~stap-server/.systemtap
|
||||
chown stap-server:stap-server ~stap-server/.systemtap
|
||||
numcpu=`/usr/bin/getconf _NPROCESSORS_ONLN`
|
||||
if [ -z "$numcpu" -o "$numcpu" -lt 1 ]; then numcpu=1; fi
|
||||
nproc=`expr $numcpu \* 30`
|
||||
echo "--rlimit-as=614400000 --rlimit-cpu=60 --rlimit-nproc=$nproc --rlimit-stack=1024000 --rlimit-fsize=51200000" > ~stap-server/.systemtap/rc
|
||||
chown stap-server:stap-server ~stap-server/.systemtap/rc
|
||||
fi
|
||||
|
||||
%triggerin -- java-1.8.0-openjdk, java-1.7.0-openjdk, java-1.6.0-openjdk
|
||||
for f in %{_libexecdir}/systemtap/libHelperSDT_*.so; do
|
||||
arch=`basename $f | cut -f2 -d_ | cut -f1 -d.`
|
||||
for archdir in %{_jvmdir}/*openjdk*/jre/lib/${arch}; do
|
||||
if [ -d ${archdir} ]; then
|
||||
ln -sf %{_libexecdir}/systemtap/libHelperSDT_${arch}.so ${archdir}/libHelperSDT_${arch}.so
|
||||
ln -sf %{_libexecdir}/systemtap/HelperSDT.jar ${archdir}/../ext/HelperSDT.jar
|
||||
fi
|
||||
done
|
||||
done
|
||||
test -e %{_localstatedir}/log/stap-server/log || {
|
||||
touch %{_localstatedir}/log/stap-server/log
|
||||
chmod 644 %{_localstatedir}/log/stap-server/log
|
||||
chown stap-server:stap-server %{_localstatedir}/log/stap-server/log
|
||||
}
|
||||
/bin/systemd-tmpfiles --create %{_tmpfilesdir}/stap-server.conf >/dev/null 2>&1 || :
|
||||
exit 0
|
||||
|
||||
%triggerun -- java-1.8.0-openjdk, java-1.7.0-openjdk, java-1.6.0-openjdk
|
||||
for f in %{_libexecdir}/systemtap/libHelperSDT_*.so; do
|
||||
arch=`basename $f | cut -f2 -d_ | cut -f1 -d.`
|
||||
for archdir in %{_jvmdir}/*openjdk*/jre/lib/${arch}; do
|
||||
rm -f ${archdir}/libHelperSDT_${arch}.so
|
||||
rm -f ${archdir}/../ext/HelperSDT.jar
|
||||
done
|
||||
done
|
||||
%triggerin client -- systemtap-server
|
||||
if test -e ~stap-server/.systemtap/ssl/server/stap.cert; then
|
||||
%{_libexecdir}/systemtap/stap-authorize-cert ~stap-server/.systemtap/ssl/server/stap.cert %{_sysconfdir}/systemtap/ssl/client >/dev/null
|
||||
%{_libexecdir}/systemtap/stap-authorize-cert ~stap-server/.systemtap/ssl/server/stap.cert %{_sysconfdir}/systemtap/staprun >/dev/null
|
||||
fi
|
||||
exit 0
|
||||
|
||||
%triggerpostun -- java-1.8.0-openjdk, java-1.7.0-openjdk, java-1.6.0-openjdk
|
||||
for f in %{_libexecdir}/systemtap/libHelperSDT_*.so; do
|
||||
arch=`basename $f | cut -f2 -d_ | cut -f1 -d.`
|
||||
for archdir in %{_jvmdir}/*openjdk*/jre/lib/${arch}; do
|
||||
if [ -d ${archdir} ]; then
|
||||
ln -sf %{_libexecdir}/systemtap/libHelperSDT_${arch}.so ${archdir}/libHelperSDT_${arch}.so
|
||||
ln -sf %{_libexecdir}/systemtap/HelperSDT.jar ${archdir}/../ext/HelperSDT.jar
|
||||
fi
|
||||
done
|
||||
done
|
||||
%preun server
|
||||
if [ $1 = 0 ] ; then
|
||||
/bin/systemctl --no-reload disable stap-server.service >/dev/null 2>&1 || :
|
||||
/bin/systemctl stop stap-server.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
exit 0
|
||||
|
||||
%postun server
|
||||
if [ "$1" -ge "1" ] ; then
|
||||
/bin/systemctl condrestart stap-server.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
exit 0
|
||||
|
||||
%postun
|
||||
if [ "$1" -ge "1" ] ; then
|
||||
/bin/systemctl condrestart systemtap.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
exit 0
|
||||
|
||||
%preun stap-exporter
|
||||
if [ "$1" -eq "0" ] ; then
|
||||
/bin/systemctl stop stap-exporter.service >/dev/null 2>&1 || :
|
||||
/bin/systemctl disable stap-exporter.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
exit 0
|
||||
|
||||
%post
|
||||
/bin/systemctl enable systemtap.service >/dev/null 2>&1 || :
|
||||
(make -C %{_datadir}/systemtap/runtime/uprobes clean) >/dev/null 2>&1 || true
|
||||
(/sbin/rmmod uprobes) >/dev/null 2>&1 || true
|
||||
|
||||
%preun
|
||||
if [ $1 = 0 ] ; then
|
||||
/bin/systemctl --no-reload disable systemtap.service >/dev/null 2>&1 || :
|
||||
/bin/systemctl stop systemtap.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
exit 0
|
||||
(make -C %{_datadir}/systemtap/runtime/uprobes clean) >/dev/null 2>&1 || true
|
||||
(/sbin/rmmod uprobes) >/dev/null 2>&1 || true
|
||||
|
||||
%files
|
||||
%{_bindir}/*
|
||||
%{_sbindir}/*
|
||||
%{_libdir}/python3.7/site-packages/*
|
||||
%{_datadir}/systemtap/examples/*
|
||||
%{_datadir}/systemtap/tapset
|
||||
%{_datadir}/systemtap/runtime/*
|
||||
%{_datadir}/vim/vimfiles/*/*
|
||||
%{dracutstap}
|
||||
%{udevrulesdir}/*
|
||||
%dir %{_libexecdir}/systemtap
|
||||
%{_libexecdir}/systemtap/*
|
||||
%{_unitdir}/stap-exporter.service
|
||||
%{_unitdir}/stap-server.service
|
||||
%{_unitdir}/stapsh@.service
|
||||
%license COPYING
|
||||
%doc README README.unprivileged AUTHORS NEWS
|
||||
%defattr(-,root,root)
|
||||
%{_unitdir}/systemtap.service
|
||||
%{_sbindir}/systemtap-service
|
||||
%dir %{_sysconfdir}/systemtap
|
||||
%dir %{_sysconfdir}/systemtap/conf.d
|
||||
%dir %{_sysconfdir}/systemtap/script.d
|
||||
%config(noreplace) %{_sysconfdir}/systemtap/config
|
||||
%dir %{_localstatedir}/cache/systemtap
|
||||
%ghost %{_localstatedir}/run/systemtap
|
||||
%dir %{dracutstap}
|
||||
%{dracutstap}/*
|
||||
|
||||
%files server -f systemtap.lang
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/stap-server
|
||||
%dir %{_libexecdir}/systemtap
|
||||
%{_libexecdir}/systemtap/stap-serverd
|
||||
%{_libexecdir}/systemtap/stap-start-server
|
||||
%{_libexecdir}/systemtap/stap-stop-server
|
||||
%{_libexecdir}/systemtap/stap-gen-cert
|
||||
%{_libexecdir}/systemtap/stap-sign-module
|
||||
%{_libexecdir}/systemtap/stap-authorize-cert
|
||||
%{_libexecdir}/systemtap/stap-env
|
||||
%{_unitdir}/stap-server.service
|
||||
%{_tmpfilesdir}/stap-server.conf
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/stap-server
|
||||
%dir %{_sysconfdir}/stap-server
|
||||
%dir %attr(0750,stap-server,stap-server) %{_localstatedir}/lib/stap-server
|
||||
%dir %attr(0700,stap-server,stap-server) %{_localstatedir}/lib/stap-server/.systemtap
|
||||
%dir %attr(0755,stap-server,stap-server) %{_localstatedir}/log/stap-server
|
||||
%ghost %config(noreplace) %attr(0644,stap-server,stap-server) %{_localstatedir}/log/stap-server/log
|
||||
%ghost %attr(0755,stap-server,stap-server) %{_localstatedir}/run/stap-server
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
|
||||
%files devel -f systemtap.lang
|
||||
%{_bindir}/stap
|
||||
%{_bindir}/stap-prep
|
||||
%{_bindir}/stap-profile-annotate
|
||||
%{_bindir}/stap-report
|
||||
%dir %{_datadir}/systemtap
|
||||
%{_datadir}/systemtap/runtime
|
||||
%{_datadir}/systemtap/tapset
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%dir %{_libexecdir}/systemtap
|
||||
%{_emacs_sitelispdir}/*.el*
|
||||
%{_emacs_sitestartdir}/systemtap-init.el
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/stap-server
|
||||
%config(noreplace) %{_sysconfdir}/systemtap/config
|
||||
%ghost %config(noreplace) %attr(0644,stap-server,stap-server) %{_localstatedir}/log/stap-server/log
|
||||
/etc/sysconfig/stap-exporter
|
||||
/etc/stap-exporter
|
||||
%doc README README.unprivileged AUTHORS NEWS
|
||||
%license COPYING
|
||||
%if %{with_crash}
|
||||
%dir %{_libdir}/systemtap
|
||||
%{_libdir}/%{name}/staplog.so*
|
||||
%{_exec_prefix}/lib/debug/usr/lib64/%{name}/staplog.so-%{version}-%{release}.x86_64.debug
|
||||
%endif
|
||||
%exclude %{_bindir}/dtrace
|
||||
%exclude %{python3_sitearch}/HelperSDT
|
||||
%exclude %{python3_sitearch}/HelperSDT-*.egg-info
|
||||
%exclude %{_libexecdir}/systemtap/libHelperSDT_*.so
|
||||
%exclude %{_libexecdir}/systemtap/HelperSDT.jar
|
||||
%exclude %{_libexecdir}/systemtap/stapbm
|
||||
%{_datadir}/vim/vimfiles/*/*.vim
|
||||
%{_libexecdir}/systemtap/python/stap-resolve-module-function.py
|
||||
|
||||
%files runtime-java
|
||||
%files runtime -f systemtap.lang
|
||||
%defattr(-,root,root)
|
||||
%attr(4110,root,stapusr) %{_bindir}/staprun
|
||||
%{_bindir}/stapsh
|
||||
%{_bindir}/stap-merge
|
||||
%{_bindir}/stap-report
|
||||
%{_bindir}/stapbpf
|
||||
%dir %{_libexecdir}/systemtap
|
||||
%{_libexecdir}/systemtap/libHelperSDT_*.so
|
||||
%{_libexecdir}/systemtap/HelperSDT.jar
|
||||
%{_libexecdir}/systemtap/stapbm
|
||||
%{_libexecdir}/systemtap/stapio
|
||||
%{_libexecdir}/systemtap/stap-authorize-cert
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%if %{with_dyninst}
|
||||
%{_bindir}/stapdyn
|
||||
%endif
|
||||
%if %{with_crash}
|
||||
%dir %{_libdir}/systemtap
|
||||
%{_libdir}/systemtap/staplog.so*
|
||||
%endif
|
||||
|
||||
%files runtime-python3
|
||||
%{python3_sitearch}/HelperSDT
|
||||
%{python3_sitearch}/HelperSDT-*.egg-info
|
||||
%files client -f systemtap.lang
|
||||
%defattr(-,root,root)
|
||||
%{_datadir}/systemtap/examples
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%license COPYING
|
||||
%doc docs.installed/*.pdf
|
||||
%{_bindir}/stap
|
||||
%{_bindir}/stap-prep
|
||||
%{_bindir}/stap-report
|
||||
%dir %{_datadir}/systemtap
|
||||
%{_datadir}/systemtap/tapset
|
||||
|
||||
%files sdt-devel
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/dtrace
|
||||
%{_includedir}/sys/sdt.h
|
||||
%{_includedir}/sys/sdt-config.h
|
||||
%{_mandir}/man1/dtrace.1*
|
||||
%{_rpmmacrodir}/macros.systemtap
|
||||
%doc README AUTHORS NEWS
|
||||
%license COPYING
|
||||
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
|
||||
%files testsuite
|
||||
%defattr(-,root,root)
|
||||
%dir %{_datadir}/systemtap
|
||||
%{_datadir}/systemtap/testsuite
|
||||
|
||||
%files runtime-python3
|
||||
%{python3_sitearch}/HelperSDT
|
||||
%{python3_sitearch}/HelperSDT-*.egg-info
|
||||
|
||||
%files stap-exporter
|
||||
%{_unitdir}/stap-exporter.service
|
||||
%{_bindir}/stap-exporter
|
||||
/etc/stap-exporter/*
|
||||
/usr/sbin/stap-exporter
|
||||
/etc/sysconfig/stap-exporter
|
||||
|
||||
%files jupyter
|
||||
%{_bindir}/stap-jupyter-container
|
||||
%{_bindir}/stap-jupyter-install
|
||||
%{_mandir}/man1/stap-jupyter.1*
|
||||
%dir %{_datadir}/systemtap
|
||||
%{_datadir}/systemtap/interactive-notebook
|
||||
|
||||
%files help
|
||||
%{_mandir}/man1/*
|
||||
%{_mandir}/man3/*
|
||||
%{_mandir}/man7/*
|
||||
%{_mandir}/man8/*
|
||||
%{_datadir}/doc/*
|
||||
%exclude %{_mandir}/man1/dtrace.1*
|
||||
|
||||
%files lang -f systemtap.lang
|
||||
%{_mandir}/man[1378]/*
|
||||
|
||||
%changelog
|
||||
* Wed Sep 6 2023 langfei<langfei@huawei.com> - 4.9-1
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
- SUG:NA
|
||||
- DESC:Upgrade to 4.9
|
||||
|
||||
* Tue Aug 8 2023 langfei<langfei@huawei.com> - 4.5-7
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
- SUG:NA
|
||||
- DESC:Adapts to gcc 12 and python 3.11
|
||||
|
||||
* Wed Jul 5 2023 langfei<langfei@huawei.com> - 4.5-6
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
- SUG:NA
|
||||
- DESC:Fix some test cases fail to be executed, Resolve the sc2168 warning detected by the shellcheck tool.
|
||||
|
||||
* Mon Feb 6 2023 langfei<langfei@huawei.com> - 4.5-5
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
- SUG:NA
|
||||
- DESC:Solve systemtap build problem in openEuler:MultiLanguage
|
||||
|
||||
* Mon Dec 5 2022 langfei<langfei@huawei.com> - 4.5-4
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
- SUG:NA
|
||||
- DESC:Resolve stap-exporter.service chenge to disable when upgraded systemtap-stap-exporter package
|
||||
|
||||
* Fri Apr 8 2022 zhouwenpei <zhouwenpei1@h-partners.com> - 4.5-3
|
||||
- Add int type cast to resolve gcc issue for option Wformat=2
|
||||
|
||||
* Tue Feb 15 2022 zhouwenpei <zhouwenpei1@h-partners.com> - 4.5-2
|
||||
- Remove requires on gcc and systemtap-devel
|
||||
|
||||
* Thu Dec 2 2021 zhouwenpei <zhouwenpei1@huawei.com> - 4.5-1
|
||||
- upgrade to 4.5
|
||||
|
||||
* Mon Feb 1 2021 xinghe <xinghe1@huawei.com> - 4.4-1
|
||||
- upgrade to 4.4
|
||||
|
||||
* Tue Jul 21 2020 jinzhimin <jinzhimin2@huawei.com> - 4.3-1
|
||||
- upgrade to 4.3
|
||||
|
||||
* Fri Mar 13 2020 yuxiangyang <yuxiangyang4@huawei.com> - 4.1.3
|
||||
- remove java-runtime
|
||||
|
||||
* Fri Feb 21 2020 yuxiangyang <yuxiangyang4@huawei.com> - 4.1.2
|
||||
- Delete the requirement of python2-pyparsing
|
||||
|
||||
* Mon Aug 12 2019 openEuler Buildteam <buildteam@openeuler.org> - 4.1.1
|
||||
- Package init
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
version_control: git
|
||||
src_repo: https://sourceware.org/git/systemtap.git
|
||||
tag_prefix: ^release-
|
||||
seperator: .
|
||||
Reference in New Issue
Block a user