Compare commits

..

13 Commits
master ... f24

Author SHA1 Message Date
Frank Ch. Eigler b3f4bb85f1 Merge branch 'f25' into f24
* f25:
  kernel 4.11 support
  rhbz1439914
  rebuild for dyninst 9.3.1
  Rebuild for dyninst 9.3
  release 3.1
  Automated weekly systemtap rawhide release: 0.20170206git7dadf6d
  Automated weekly systemtap rawhide release: 0.20170130git575fe91
  Automated weekly systemtap rawhide release: 0.20170130git675838c
2017-07-10 09:34:28 -04:00
Frank Ch. Eigler 8e2f20f1bf Merge branch 'f26' into f25
* f26:
  kernel 4.11 support
  rhbz1439914
  rebuild for dyninst 9.3.1
2017-05-15 16:12:07 -04:00
Frank Ch. Eigler 43d514b856 kernel 4.11 support 2017-05-15 15:38:09 -04:00
Frank Ch. Eigler cdc8fbe05c rhbz1439914 2017-04-06 17:06:04 -04:00
Stan Cox 61c8529211 rebuild for dyninst 9.3.1 2017-03-16 16:48:33 -04:00
Stan Cox 369b0894f0 Rebuild for dyninst 9.3 2017-03-10 13:57:26 -05:00
Frank Ch. Eigler e3fee6e2e8 release 3.1 2017-02-17 12:51:27 -05:00
Frank Ch. Eigler dbf80d39eb merge-f25 2017-01-25 17:27:58 -05:00
Frank Ch. Eigler 39f3f199b2 Merge branch 'f25' into f24
* f25: (42 commits)
  Automated weekly systemtap rawhide release: 0.20170125gite81970274b46
  Automated weekly systemtap rawhide release: 0.20170123git756c7cf
  Automated weekly systemtap rawhide release: 0.20170123git100bca3
  Automated weekly systemtap rawhide release: 0.20170116git8065f5d
  Automated weekly systemtap rawhide release: 0.20170116gitd5eac54
  Automated weekly systemtap rawhide release: 0.20170116git3d13f4e
  Rebuild for readline 7.x
  rebuild for dyninst 9.3.0
  Automated weekly systemtap rawhide release: 0.20170109gitf8bc2a5
  Automated weekly systemtap rawhide release: 0.20170103git7e8210a
  Automated weekly systemtap rawhide release: 0.20161226git397109b0a7b2
  Rebuild for Python 3.6
  Automated weekly systemtap rawhide release: 0.20161219gitcccf2f5
  Automated weekly systemtap rawhide release: 0.20161212git2cd5c938b39b
  Automated weekly systemtap rawhide release: 0.20161212git2cd5c938b39b
  Automated weekly systemtap rawhide release: 0.20161212git2cd5c93
  Automated weekly systemtap rawhide release: 0.20161205gitda79853
  Automated weekly systemtap rawhide release: 0.20161128git9ed4785
  Automated weekly systemtap rawhide release: 0.20161121git09dd8f0
  Automated weekly systemtap rawhide release: 0.20161114git5fb76b5
  ...
2017-01-25 17:10:07 -05:00
Frank Ch. Eigler eed857910b rhbz1374089 2016-09-07 19:43:47 -04:00
Josh Stone 1328f0dcf7 fix kernel-4.6 conflicts (PR19940, PR19940, PR20158, PR20161) 2016-07-21 11:59:10 -07:00
Frank Ch. Eigler 9dff469f00 Merge branch 'f23' into f24
* f23:
  cont'd
  PR19874 brown paper bag fix
2016-03-28 09:05:02 -04:00
Frank Ch. Eigler 761e49022a Merge branch 'master' into f24
* master:
  date tweak
  upstream release 3.0
  Automated weekly systemtap rawhide release: 0.20160321git1a442bf
2016-03-27 22:14:37 -04:00
17 changed files with 710 additions and 330 deletions

40
.gitignore vendored
View File

@ -1,41 +1 @@
/systemtap-3.1.tar.gz
/systemtap-3.2-0.20170321git272146660f54.tar.gz
/systemtap-3.2-0.20170406git83d186dc7f5c.tar.gz
/systemtap-3.2-0.20170410gitcbf2583808d6.tar.gz
/systemtap-3.2-0.20170512gitc67d8f274b21.tar.gz
/systemtap-3.2.tar.gz
/systemtap-3.3-0.20180222git5ef0c24456e3.tar.gz
/systemtap-3.3-0.20180315gitc2585f2b58cd.tar.gz
/systemtap-3.3-0.20180420gitd4a446c.tar.gz
/systemtap-3.3-0.20180508git9c6ac6cda49e.tar.gz
/systemtap-3.3.tar.gz
/systemtap-4.0-0.20180810git.tar.gz
/systemtap-4.0-0.20180906git37598c4fee7c.tar.gz
/systemtap-4.0-0.20180914gitc51d4e55d285.tar.gz
/systemtap-4.0-0.20180914gitc1befcceae01.tar.gz
/systemtap-4.0-0.20180914git11a0a7aea387.tar.gz
/systemtap-4.0-0.20180914gitfe4e14f4af16.tar.gz
/systemtap-4.0-0.20180914gitfe4e14f4af16.1.tar.gz
/systemtap-4.0-0.20181003git4ad1e11de831.tar.gz
/systemtap-4.0.tar.gz
/systemtap-4.1-0.20181126gitf082df49dd91.tar.gz
/systemtap-4.1-0.20181126git47ce37a149b6.tar.gz
/systemtap-4.1-0.20181203gitec3b46eb9b19.tar.gz
/systemtap-4.1-0.20181204git891810c246d6.tar.gz
/systemtap-4.1-0.20190123gitc8084763b75f.tar.gz
/systemtap-4.1-0.20190125git905865da1024.tar.gz
/systemtap-4.1-0.20190207git4e76869512d2.tar.gz
/systemtap-4.1-0.20190307gitf7fb9c9182dc.tar.gz
/systemtap-4.1-0.20190308gitb3627d9aa037.tar.gz
/systemtap-4.1-0.20190327git2ede4cecb20c.tar.gz
/systemtap-4.1-0.20190502git446e7c358247.tar.gz
/systemtap-4.1.tar.gz
/systemtap-4.2-0.20190513git8b868f3dd030.tar.gz
/systemtap-4.2-0.20190613git2d77f531a5d1.tar.gz
/systemtap-4.2-0.20190618git47c3f6c60174.tar.gz
/systemtap-4.2-0.20190807gitebfc300ec2ad.tar.gz
/systemtap-4.2-0.20190827git8ffab23ff.tar.gz
/systemtap-4.2.tar.gz
/systemtap-4.3-0.20200112gitb1e6a6645bba.tar.gz
/systemtap-4.3-0.20200203git6c0b74f5910a.tar.gz
/systemtap-4.3-0.20200211git91ffb97ad335.tar.gz

36
bz1439914.patch Normal file
View File

@ -0,0 +1,36 @@
commit 272146660f54786bb61d388f6d3a4eb20e7d9369 (origin/master2, master2)
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Mar 21 17:04:08 2017 -0400
gcc PR80115: sys/sdt.h: tweak i386 argument passing
Use %w[arg] to request that widened forms of register names be passed
to the sys/sdt.h macro operand strings, so as to avoid nominating
sub-registers such as %sil within -m32 code, which gcc <= 6 sometimes
buggily did.
diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h
index 3b7eda7976d1..eff315bcd885 100644
--- a/includes/sys/sdt.h
+++ b/includes/sys/sdt.h
@@ -82,9 +82,11 @@
# define _SDT_ASM_STRING_1(x) _SDT_ASM_1(.asciz #x)
# define _SDT_ARGFMT(no) %n[_SDT_S##no]@_SDT_ARGTMPL(_SDT_A##no)
+
# ifndef STAP_SDT_ARG_CONSTRAINT
# define STAP_SDT_ARG_CONSTRAINT nor
# endif
+
# define _SDT_STRINGIFY(x) #x
# define _SDT_ARG_CONSTRAINT_STRING(x) _SDT_STRINGIFY(x)
# define _SDT_ARG(n, x) \
@@ -173,6 +175,8 @@ __extension__ extern unsigned long long __sdt_unsp;
#if defined __powerpc__ || defined __powerpc64__
# define _SDT_ARGTMPL(id) %I[id]%[id]
+#elif defined __i386__
+# define _SDT_ARGTMPL(id) %w[id] /* gcc.gnu.org/PR80115 */
#else
# define _SDT_ARGTMPL(id) %[id]
#endif

55
bz1448099.1.patch Normal file
View File

@ -0,0 +1,55 @@
commit 62640f2ed0deef9355970d216136ad4c49afa3d0
Author: David Smith <dsmith@redhat.com>
Date: Fri Mar 17 09:36:42 2017 -0500
PR21255: Fix missing get_task_mm() declaration.
* buildrun.cxx (compile_pass): Add <linux/sched/mm.h> autoconf test. This
was caused by the following kernel commit:
commit 6e84f31522f931027bf695752087ece278c10d3f
Author: Ingo Molnar <mingo@kernel.org>
Date: Wed Feb 8 18:51:29 2017 +0100
sched/headers: Prepare for new header dependencies before moving
code to <linux/sched/mm.h>
* runtime/linux/access_process_vm.h: Include <linux/sched.h> and, if it
exists, <linux/sched/mm.h>.
* runtime/linux/autoconf-sched-mm.c: New file.
diff --git a/buildrun.cxx b/buildrun.cxx
index aaea64c..644eea9 100644
--- a/buildrun.cxx
+++ b/buildrun.cxx
@@ -402,6 +402,7 @@ compile_pass (systemtap_session& s)
output_autoconf(s, o, "autoconf-netfilter-4_4.c", "STAPCONF_NETFILTER_V44", NULL);
output_autoconf(s, o, "autoconf-smpcall-5args.c", "STAPCONF_SMPCALL_5ARGS", NULL);
output_autoconf(s, o, "autoconf-smpcall-4args.c", "STAPCONF_SMPCALL_4ARGS", NULL);
+ output_autoconf(s, o, "autoconf-sched-mm.c", "STAPCONF_SCHED_MM_H", NULL);
// used by tapset/timestamp_monotonic.stp
output_exportconf(s, o, "cpu_clock", "STAPCONF_CPU_CLOCK");
diff --git a/runtime/linux/access_process_vm.h b/runtime/linux/access_process_vm.h
index 22a1220..a46b86f 100644
--- a/runtime/linux/access_process_vm.h
+++ b/runtime/linux/access_process_vm.h
@@ -3,6 +3,10 @@
* some distros export it on some architectures. To workaround this inconsistency,
* we copied and pasted it here. Fortunately, everything it calls is exported.
*/
+#include <linux/sched.h>
+#ifdef STAPCONF_SCHED_MM_H
+#include <linux/sched/mm.h>
+#endif
#include <linux/pagemap.h>
#include <asm/cacheflush.h>
diff --git a/runtime/linux/autoconf-sched-mm.c b/runtime/linux/autoconf-sched-mm.c
new file mode 100644
index 0000000..6d3f1c2
--- /dev/null
+++ b/runtime/linux/autoconf-sched-mm.c
@@ -0,0 +1,3 @@
+#include <linux/sched.h>
+#include <linux/sched/mm.h>
+

37
bz1448099.2.patch Normal file
View File

@ -0,0 +1,37 @@
commit a477a43122609691ce6ef24f71114cfaa9790392
Author: David Smith <dsmith@redhat.com>
Date: Fri Mar 17 10:44:12 2017 -0500
PR21255: Fix missing __set_task_state() definition.
* runtime/stp_utrace.c: Fix missing __set_task_state() definition. If we
can't find a __set_task_state() definition, define our own.
diff --git a/runtime/stp_utrace.c b/runtime/stp_utrace.c
index bb2d663..5924016 100644
--- a/runtime/stp_utrace.c
+++ b/runtime/stp_utrace.c
@@ -29,6 +29,14 @@
#include "stp_helper_lock.h"
+#if defined(__set_task_state)
+#define __stp_set_task_state(tsk, state_value) \
+ __set_task_state((tsk), (state_value))
+#else
+#define __stp_set_task_state(tsk, state_value) \
+ do { (tsk)->state = (state_value); } while (0)
+#endif
+
/*
* Per-thread structure private to utrace implementation.
* If task_struct.utrace_flags is nonzero, task_struct.utrace
@@ -1105,7 +1113,7 @@ static bool utrace_do_stop(struct task_struct *target, struct utrace *utrace)
*/
spin_lock_irq(&target->sighand->siglock);
if (likely(task_is_stopped(target)))
- __set_task_state(target, TASK_TRACED);
+ __stp_set_task_state(target, TASK_TRACED);
spin_unlock_irq(&target->sighand->siglock);
} else if (utrace->resume > UTRACE_REPORT) {
utrace->resume = UTRACE_REPORT;

42
bz1448099.3.patch Normal file
View File

@ -0,0 +1,42 @@
commit 030e9465eadf7d3b3a278951264dac83b2f4b4f7
Author: David Smith <dsmith@redhat.com>
Date: Wed Feb 22 10:04:00 2017 -0600
Update the vfs.stp tapset for newer kernels.
* tapset/linux/vfs.stp: Since the __block_write_begin() function can be
inlined on newer kernels, we'll also probe
__block_write_begin_int(). Also, check to see if '$file' is defined
before using it in _vfs.block_write_begin.return.
diff --git a/tapset/linux/vfs.stp b/tapset/linux/vfs.stp
index 4572bd7..32db300 100644
--- a/tapset/linux/vfs.stp
+++ b/tapset/linux/vfs.stp
@@ -1104,7 +1104,8 @@ probe _vfs.generic_commit_write = kernel.function("generic_commit_write") ?
argstr = sprintf("%p, %p, %d, %d", $file, $page, $from, $to)
}
-probe _vfs.block_prepare_write = kernel.function("__block_write_begin") !,
+probe _vfs.block_prepare_write = kernel.function("__block_write_begin_int") !,
+ kernel.function("__block_write_begin") !,
kernel.function("__block_prepare_write")
{
page = $page
@@ -1134,6 +1135,7 @@ probe _vfs.block_prepare_write = kernel.function("__block_write_begin") !,
}
probe _vfs.block_prepare_write.return =
+ kernel.function("__block_write_begin_int").return !,
kernel.function("__block_write_begin").return !,
kernel.function("__block_prepare_write").return
{
@@ -1188,7 +1190,7 @@ probe _vfs.block_write_begin.return =
name = "_vfs.block_write_begin"
retstr = sprintf("%d", $return)
- file = @entry($file)
+ file = @choose_defined(@entry($file), "")
pathname = @defined(@entry($file)) ? fullpath_struct_file(task_current(), @entry($file)) : ""
pos = @entry($pos)
len = @entry($len)

43
bz1448099.4.patch Normal file
View File

@ -0,0 +1,43 @@
commit 5ab0c875df5011725f9cd2f0804c00bf9e63d492
Author: David Smith <dsmith@redhat.com>
Date: Thu Mar 2 15:23:28 2017 -0600
Fix s390x compile error in runtime/stack-s390.c.
* runtime/stack-s390.c (__stp_stack_print): Update code to let it compile
on the 4.10 kernel. Kernel commit d5c352c moved 'thread_info' into
task_struct.
diff --git a/runtime/stack-s390.c b/runtime/stack-s390.c
index 38eb73f..56043fc 100644
--- a/runtime/stack-s390.c
+++ b/runtime/stack-s390.c
@@ -11,7 +11,6 @@ static unsigned long
__stp_show_stack (unsigned long sp, unsigned long low,
unsigned long high, int verbose)
{
-
struct stack_frame *sf;
struct pt_regs *regs;
unsigned long ip;
@@ -62,9 +61,18 @@ static void __stp_stack_print (struct pt_regs *regs,
sp = __stp_show_stack(sp,
S390_lowcore.async_stack - ASYNC_SIZE,
- S390_lowcore.async_stack,verbose);
+ S390_lowcore.async_stack, verbose);
+#ifdef CONFIG_THREAD_INFO_IN_TASK
+ /* FIXME: Note that this CONFIG_THREAD_INFO_IN_TASK
+ * code is untested, since the s390 uses the dwarf
+ * unwinder so this code doesn't get called. */
+ __stp_show_stack(sp, ((unsigned long)current->stack),
+ (((unsigned long)current->stack)
+ + THREAD_SIZE), verbose);
+#else
__stp_show_stack(sp,
S390_lowcore.thread_info,
- S390_lowcore.thread_info + THREAD_SIZE,verbose);
+ S390_lowcore.thread_info + THREAD_SIZE, verbose);
+#endif
}

72
bz1448099.5.patch Normal file
View File

@ -0,0 +1,72 @@
commit 386b8596d721e93ad618e682ecddb323d2bee446
Author: David Smith <dsmith@redhat.com>
Date: Thu Mar 2 15:25:17 2017 -0600
Fix s390x-specific syscall tests.
* testsuite/buildok/syscalls-arch-detailed.stp: Made s390x probe tests
optional, since the underlying probes don't exist on the 4.10 kernel.
* testsuite/buildok/nd_syscalls-arch-detailed.stp: Ditto.
diff --git a/testsuite/buildok/nd_syscalls-arch-detailed.stp b/testsuite/buildok/nd_syscalls-arch-detailed.stp
index 364b13e..b927d15 100755
--- a/testsuite/buildok/nd_syscalls-arch-detailed.stp
+++ b/testsuite/buildok/nd_syscalls-arch-detailed.stp
@@ -429,22 +429,22 @@ probe nd_syscall.ppc64_newuname.return ?
#
%( arch == "s390" %?
-probe nd_syscall.getresgid16
+probe nd_syscall.getresgid16 ?
{
printf("%s, %s\n", name, argstr)
printf("%p, %p, %p\n", rgid_uaddr, egid_uaddr, sgid_uaddr)
}
-probe nd_syscall.getresgid16.return
+probe nd_syscall.getresgid16.return ?
{
printf("%s, %s\n", name, retstr)
}
-probe nd_syscall.getresuid16
+probe nd_syscall.getresuid16 ?
{
printf("%s, %s\n", name, argstr)
printf("%p, %p, %p\n", ruid_uaddr, euid_uaddr, suid_uaddr)
}
-probe nd_syscall.getresuid16.return
+probe nd_syscall.getresuid16.return ?
{
printf("%s, %s\n", name, retstr)
}
diff --git a/testsuite/buildok/syscalls-arch-detailed.stp b/testsuite/buildok/syscalls-arch-detailed.stp
index 8d7d21e..914da9e 100755
--- a/testsuite/buildok/syscalls-arch-detailed.stp
+++ b/testsuite/buildok/syscalls-arch-detailed.stp
@@ -429,22 +429,22 @@ probe syscall.ppc64_newuname.return ?
#
%( arch == "s390" %?
-probe syscall.getresgid16
+probe syscall.getresgid16 ?
{
printf("%s, %s\n", name, argstr)
printf("%p, %p, %p\n", rgid_uaddr, egid_uaddr, sgid_uaddr)
}
-probe syscall.getresgid16.return
+probe syscall.getresgid16.return ?
{
printf("%s, %s\n", name, retstr)
}
-probe syscall.getresuid16
+probe syscall.getresuid16 ?
{
printf("%s, %s\n", name, argstr)
printf("%p, %p, %p\n", ruid_uaddr, euid_uaddr, suid_uaddr)
}
-probe syscall.getresuid16.return
+probe syscall.getresuid16.return ?
{
printf("%s, %s\n", name, retstr)
}

48
bz1448099.6.patch Normal file
View File

@ -0,0 +1,48 @@
commit 9f1c7a872e7a13d1ee29b692d0f1f4dd18a07baa
Author: David Smith <dsmith@redhat.com>
Date: Tue May 9 16:20:41 2017 -0500
Avoid missing "task_stack()" definition on 4.11 kernels.
* runtime/compatdefs.h: If <linux/sched/task_stack.h> exists, include
it. This avoids a missing task_stack() definition.
* buildrun.cxx (compile_pass): Add autoconf test for
<linux/sched/task_stack.h>.
* runtime/linux/autoconf-sched-task_stack.c: New file.
diff --git a/buildrun.cxx b/buildrun.cxx
index 21ed3c5..6da308a 100644
--- a/buildrun.cxx
+++ b/buildrun.cxx
@@ -403,6 +403,7 @@ compile_pass (systemtap_session& s)
output_autoconf(s, o, "autoconf-smpcall-5args.c", "STAPCONF_SMPCALL_5ARGS", NULL);
output_autoconf(s, o, "autoconf-smpcall-4args.c", "STAPCONF_SMPCALL_4ARGS", NULL);
output_autoconf(s, o, "autoconf-sched-mm.c", "STAPCONF_SCHED_MM_H", NULL);
+ output_autoconf(s, o, "autoconf-sched-task_stack.c", "STAPCONF_SCHED_TASK_STACK_H", NULL);
// used by tapset/timestamp_monotonic.stp
output_exportconf(s, o, "cpu_clock", "STAPCONF_CPU_CLOCK");
diff --git a/runtime/compatdefs.h b/runtime/compatdefs.h
index ba429b5..f261bfd 100644
--- a/runtime/compatdefs.h
+++ b/runtime/compatdefs.h
@@ -57,6 +57,10 @@ static inline int _stp_is_compat_task(void)
*/
#include <asm/processor.h>
#include <asm/ptrace.h>
+#include <linux/sched.h>
+#ifdef STAPCONF_SCHED_TASK_STACK_H
+#include <linux/sched/task_stack.h>
+#endif
#if !defined(task_pt_regs)
#if defined(__powerpc__)
diff --git a/runtime/linux/autoconf-sched-task_stack.c b/runtime/linux/autoconf-sched-task_stack.c
new file mode 100644
index 0000000..cdfcc60
--- /dev/null
+++ b/runtime/linux/autoconf-sched-task_stack.c
@@ -0,0 +1,3 @@
+#include <linux/sched.h>
+#include <linux/sched/task_stack.h>
+

36
bz1448099.7.1.patch Normal file
View File

@ -0,0 +1,36 @@
diff --git a/tapset/linux/proc_mem.stp b/tapset/linux/proc_mem.stp
index 4b20686..890be69 100644
--- a/tapset/linux/proc_mem.stp
+++ b/tapset/linux/proc_mem.stp
@@ -155,7 +155,7 @@ function proc_mem_size_pid:long (pid:long)
if (_stp_valid_task(task)) {
mm = task->mm
if (mm != 0)
- return mm->total_vm
+ return @mm(mm)->total_vm
}
return 0
}
@@ -322,8 +322,8 @@ function proc_mem_txt_pid:long (pid:long)
if (_stp_valid_task(task)) {
mm = task->mm
if (mm != 0) {
- s = mm->start_code
- e = mm->end_code
+ s = @mm(mm)->start_code
+ e = @mm(mm)->end_code
return _stp_mem_txt_adjust (s, e)
}
}
@@ -381,8 +381,9 @@ function proc_mem_data_pid:long (pid:long)
if (_stp_valid_task(task)) {
mm = task->mm
if (mm != 0) {
- return (@defined(&@mm(0)->data_vm) ? (mm->data_vm + mm->stack_vm)
- : (mm->total_vm - mm->shared_vm))
+ return (@defined(&@mm(0)->data_vm)
+ ? (@mm(mm)->data_vm + @mm(mm)->stack_vm)
+ : (@mm(mm)->total_vm - @mm(mm)->shared_vm))
}
}
return 0

142
bz1448099.7.patch Normal file
View File

@ -0,0 +1,142 @@
commit c7029a89f5f1ff6d6a7008e8bccb797046f8af50
Author: David Smith <dsmith@redhat.com>
Date: Tue May 9 16:32:25 2017 -0500
Add missing @cast() calls for 4.11 kernels.
* tapset/linux/task.stp: Add a "signal_struct" cast to
_task_rlimit_cur().
* tapset/linux/task.stpm: Fix @mm() macro for kernels >= 2.6.34, where the
mm_struct definition has moved to <linux/mm_types.h>
* tapset/linux/proc_mem.stp (proc_mem_size): Use the @mm() macro to cast
values to a mm_struct.
(proc_mem_txt): Ditto.
(proc_mem_data): Ditto.
* tapset/linux/context.stp (cmdline_args): Ditto.
* tapset/linux/context-envvar.stp (env_var): Ditto.
diff --git a/tapset/linux/context-envvar.stp b/tapset/linux/context-envvar.stp
index 4d4c648..2ceb6c8 100644
--- a/tapset/linux/context-envvar.stp
+++ b/tapset/linux/context-envvar.stp
@@ -28,8 +28,8 @@ function env_var:string(name:string)
mm = task_current()->mm;
if (mm)
{
- env_start = mm->env_start;
- env_end = mm->env_end;
+ env_start = @mm(mm)->env_start;
+ env_end = @mm(mm)->env_end;
if (env_start != 0 && env_end != 0)
{
len = env_end - env_start;
diff --git a/tapset/linux/context.stp b/tapset/linux/context.stp
index e563983..8ab81b4 100644
--- a/tapset/linux/context.stp
+++ b/tapset/linux/context.stp
@@ -559,8 +559,8 @@ function cmdline_args:string(n:long, m:long, delim:string)
if (__mm == 0)
return "";
- __arg_start = __mm->arg_start;
- __arg_end = __mm->arg_end;
+ __arg_start = @mm(__mm)->arg_start;
+ __arg_end = @mm(__mm)->arg_end;
if (__arg_start == 0 || __arg_end == 0)
return "";
diff --git a/tapset/linux/proc_mem.stp b/tapset/linux/proc_mem.stp
index de6f423..161033d 100644
--- a/tapset/linux/proc_mem.stp
+++ b/tapset/linux/proc_mem.stp
@@ -124,7 +124,7 @@ function proc_mem_size:long ()
if (_stp_valid_task(task)) {
mm = task->mm
if (mm != 0)
- return mm->total_vm
+ return @mm(mm)->total_vm
}
return 0
}
@@ -144,7 +144,7 @@ function proc_mem_size:long (pid:long)
if (_stp_valid_task(task)) {
mm = task->mm
if (mm != 0)
- return mm->total_vm
+ return @mm(mm)->total_vm
}
return 0
}
@@ -260,8 +260,8 @@ function proc_mem_txt:long ()
if (_stp_valid_task(task)) {
mm = task->mm
if (mm != 0) {
- s = mm->start_code
- e = mm->end_code
+ s = @mm(mm)->start_code
+ e = @mm(mm)->end_code
return _stp_mem_txt_adjust(s, e)
}
}
@@ -283,8 +283,8 @@ function proc_mem_txt:long (pid:long)
if (_stp_valid_task(task)) {
mm = task->mm
if (mm != 0) {
- s = mm->start_code
- e = mm->end_code
+ s = @mm(mm)->start_code
+ e = @mm(mm)->end_code
return _stp_mem_txt_adjust (s, e)
}
}
@@ -308,8 +308,9 @@ function proc_mem_data:long ()
if (_stp_valid_task(task)) {
mm = task->mm
if (mm != 0) {
- return (@defined(&@mm(0)->data_vm) ? (mm->data_vm + mm->stack_vm)
- : (mm->total_vm - mm->shared_vm))
+ return (@defined(&@mm(0)->data_vm)
+ ? (@mm(mm)->data_vm + @mm(mm)->stack_vm)
+ : (@mm(mm)->total_vm - @mm(mm)->shared_vm))
}
}
return 0
@@ -330,8 +331,9 @@ function proc_mem_data:long (pid:long)
if (_stp_valid_task(task)) {
mm = task->mm
if (mm != 0) {
- return (@defined(&@mm(0)->data_vm) ? (mm->data_vm + mm->stack_vm)
- : (mm->total_vm - mm->shared_vm))
+ return (@defined(&@mm(0)->data_vm)
+ ? (@mm(mm)->data_vm + @mm(mm)->stack_vm)
+ : (@mm(mm)->total_vm - @mm(mm)->shared_vm))
}
}
return 0
diff --git a/tapset/linux/task.stp b/tapset/linux/task.stp
index 5467e05..f7c852e 100644
--- a/tapset/linux/task.stp
+++ b/tapset/linux/task.stp
@@ -40,7 +40,7 @@ function task_current:long () {
return -1;
}
sig = @task(task)->signal;
- return sig->rlim[nd_limit]->rlim_cur;
+ return @cast(sig, "signal_struct")->rlim[nd_limit]->rlim_cur;
}
/* sfunction task_rlimit - The current resource limit of the task
diff --git a/tapset/linux/task.stpm b/tapset/linux/task.stpm
index 7df04e3..f1bfb8e 100644
--- a/tapset/linux/task.stpm
+++ b/tapset/linux/task.stpm
@@ -3,5 +3,9 @@
%)
@define mm(ptr) %(
+ %( kernel_v >= "2.6.34" %?
+ @cast(@ptr, "mm_struct", "kernel<linux/mm_types.h>")
+ %:
@cast(@ptr, "mm_struct", "kernel<linux/sched.h>")
+ %)
%)

65
bz1448099.8.patch Normal file
View File

@ -0,0 +1,65 @@
commit 35ea394c93d3c296c0c809d21bc397b531b7e965
Author: David Smith <dsmith@redhat.com>
Date: Tue May 9 16:39:11 2017 -0500
Add small testsuite fixes for 4.11 kernels.
* testsuite/buildok/twentyseven.stp: Avoid missing inlined function
arguments by probing 'kernel.function("do_execve").call'.
* testsuite/buildok/thirtyone.stp: On 4.11 kernels, handle the vfs_stat()
function being renamed to vfs_statx().
* testsuite/systemtap.pass1-4/buildok.exp: Add kfails for
buildok/fortyfour.stp and buildok/map_probe_cond.stp if we don't have
uprobes.
* testsuite/systemtap.pass1-4/buildok-interactive.exp: Ditto.
diff --git a/testsuite/buildok/thirtyone.stp b/testsuite/buildok/thirtyone.stp
index ccba660..e7e102d 100755
--- a/testsuite/buildok/thirtyone.stp
+++ b/testsuite/buildok/thirtyone.stp
@@ -1,5 +1,5 @@
#! stap -wp4
-probe kprobe.function("vfs_stat") {}
+probe kprobe.function("vfs_stat")!, kprobe.function("vfs_statx") ? {}
probe kprobe.function("do_sys_open") {}
probe kernel.function("filp_close") {}
diff --git a/testsuite/buildok/twentyseven.stp b/testsuite/buildok/twentyseven.stp
index 62900f3..a3cbfde 100755
--- a/testsuite/buildok/twentyseven.stp
+++ b/testsuite/buildok/twentyseven.stp
@@ -1,6 +1,6 @@
#! stap -p4
-probe kernel.function("do_execve")
+probe kernel.function("do_execve").call
{
print(@defined($__argv) ? $__argv[0] : $argv[0])
}
diff --git a/testsuite/systemtap.pass1-4/buildok-interactive.exp b/testsuite/systemtap.pass1-4/buildok-interactive.exp
index fc4a019..d15640f 100644
--- a/testsuite/systemtap.pass1-4/buildok-interactive.exp
+++ b/testsuite/systemtap.pass1-4/buildok-interactive.exp
@@ -188,6 +188,9 @@ foreach file [lsort [glob -nocomplain $srcdir/$self/*.stp]] {
# without utrace.
if {$rc == 1 && ![utrace_p]} { setup_kfail UTRACE *-*-*} }
+ buildok/fortyfour.stp -
+ buildok/map_probe_cond.stp -
+ buildok/pretty-uprobes.stp -
buildok/pretty-uprobes.stp -
buildok/ucontext-symbols-embedded.stp -
buildok/ucontext-unwind-embedded.stp {
diff --git a/testsuite/systemtap.pass1-4/buildok.exp b/testsuite/systemtap.pass1-4/buildok.exp
index 3926b7f..79f2217 100644
--- a/testsuite/systemtap.pass1-4/buildok.exp
+++ b/testsuite/systemtap.pass1-4/buildok.exp
@@ -40,6 +40,8 @@ foreach file [lsort [glob -nocomplain $srcdir/$self/*.stp]] {
# without utrace.
if {$rc != 0 && ![utrace_p]} { setup_kfail UTRACE *-*-*} }
+ buildok/fortyfour.stp -
+ buildok/map_probe_cond.stp -
buildok/pretty-uprobes.stp -
buildok/ucontext-symbols-embedded.stp -
buildok/ucontext-unwind-embedded.stp {

View File

@ -1 +1 @@
SHA512 (systemtap-4.3-0.20200211git91ffb97ad335.tar.gz) = 449959f46a89633f57c20cbeb0ded7031587e6df7cf19c30a237bb1886a7235e066c2878023385a7ec83e6045ab31bc8819991574a5840c8080d2ea066974eb5
SHA512 (systemtap-3.1.tar.gz) = 07b322d5745f570296e287db80f1e370da87eb65073815cf24d532827900453c1cb9ee74b5496b4f3919d176b960caad4479edc2dadf27b5c58898fb7398264d

View File

@ -1,24 +1,23 @@
%{!?with_sqlite: %global with_sqlite 0%{?fedora} >= 17 || 0%{?rhel} >= 7}
# prefer prebuilt docs
%{!?with_docs: %global with_docs 0}
%{!?with_sqlite: %global with_sqlite 1}
%{!?with_docs: %global with_docs 1}
%{!?with_htmldocs: %global with_htmldocs 0}
%{!?with_monitor: %global with_monitor 1}
# crash is not available
%ifarch ppc ppc64 %{sparc} %{mips}
%ifarch ppc ppc64 %{sparc} aarch64 ppc64le %{mips}
%{!?with_crash: %global with_crash 0}
%else
%{!?with_crash: %global with_crash 1}
%endif
%{!?with_rpm: %global with_rpm 1}
%{!?with_bundled_elfutils: %global with_bundled_elfutils 0}
%{!?elfutils_version: %global elfutils_version 0.142}
%{!?pie_supported: %global pie_supported 1}
%{!?with_boost: %global with_boost 0}
%ifarch %{ix86} x86_64 ppc ppc64 ppc64le aarch64
%ifarch %{ix86} x86_64 ppc ppc64
%{!?with_dyninst: %global with_dyninst 0%{?fedora} >= 18 || 0%{?rhel} >= 7}
%else
%{!?with_dyninst: %global with_dyninst 0}
%endif
%{!?with_bpf: %global with_bpf 0%{?fedora} >= 22 || 0%{?rhel} >= 8}
%{!?with_systemd: %global with_systemd 0%{?fedora} >= 19 || 0%{?rhel} >= 7}
%{!?with_emacsvim: %global with_emacsvim 0%{?fedora} >= 19 || 0%{?rhel} >= 7}
%{!?with_java: %global with_java 0%{?fedora} >= 19 || 0%{?rhel} >= 7}
@ -33,18 +32,13 @@
%{!?with_openssl: %global with_openssl 0}
%endif
%{!?with_pyparsing: %global with_pyparsing 0%{?fedora} >= 18 || 0%{?rhel} >= 7}
%{!?with_python3: %global with_python3 0%{?fedora} >= 23 || 0%{?rhel} > 7}
%{!?with_python2_probes: %global with_python2_probes (0%{?fedora} <= 28 && 0%{?rhel} <= 7)}
%{!?with_python3_probes: %global with_python3_probes (0%{?fedora} >= 23 || 0%{?rhel} > 7)}
%{!?with_httpd: %global with_httpd 0}
%{!?with_specific_python: %global with_specific_python 0%{?fedora} >= 31}
%{!?with_python3: %global with_python3 0%{?fedora} >= 23}
%{!?with_python2_probes: %global with_python2_probes 1}
%{!?with_python3_probes: %global with_python3_probes 0%{?fedora} >= 23}
# Virt is supported on these arches, even on el7, but it's not in core EL7
%if 0%{?rhel} <= 7
%ifarch ppc64le aarch64
%global with_virthost 0
%endif
%endif
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 6
%define initdir %{_initddir}
@ -70,24 +64,15 @@
%define dracutstap %{_prefix}/share/dracut/modules.d/99stap
%endif
%if 0%{?rhel} == 6 || 0%{?rhel} == 7
%if 0%{?rhel} >= 6
%define dracutbindir /sbin
%else
%define dracutbindir %{_bindir}
%endif
%if 0%{?rhel} == 6
%{!?_rpmmacrodir: %define _rpmmacrodir /etc/rpm/}
%else
%{!?_rpmmacrodir: %define _rpmmacrodir %{_rpmconfigdir}/macros.d}
%endif
# To avoid testsuite/*/*.stp has shebang which doesn't start with '/'
%define __brp_mangle_shebangs_exclude_from .stp$
Name: systemtap
Version: 4.3
Release: 0.20200212git91ffb97ad335%{?dist}
Version: 3.1
Release: 5%{?dist}
# for version, see also configure.ac
@ -119,22 +104,23 @@ Release: 0.20200212git91ffb97ad335%{?dist}
# intermediary stap-server for --use-server: systemtap-server (-devel unused)
Summary: Programmable system-wide instrumentation system
Group: Development/System
License: GPLv2+
URL: http://sourceware.org/systemtap/
Source: %{name}-%{version}-0.20200211git91ffb97ad335.tar.gz
Source: ftp://sourceware.org/pub/systemtap/releases/systemtap-%{version}.tar.gz
# Build*
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gcc-c++
BuildRequires: cpio
BuildRequires: gettext-devel
BuildRequires: pkgconfig(nss)
BuildRequires: pkgconfig(avahi-client)
%if %{with_dyninst}
BuildRequires: dyninst-devel >= 10.0
BuildRequires: dyninst-devel >= 8.0
BuildRequires: pkgconfig(libselinux)
%endif
%if %{with_sqlite}
BuildRequires: sqlite-devel > 3.7
BuildRequires: sqlite-devel
%endif
%if %{with_monitor}
BuildRequires: pkgconfig(json-c)
@ -153,7 +139,14 @@ BuildRequires: crash-devel zlib-devel
%if %{with_rpm}
BuildRequires: rpm-devel
%endif
%if %{with_bundled_elfutils}
Source1: elfutils-%{elfutils_version}.tar.gz
Patch1: elfutils-portability.patch
BuildRequires: m4
%global setup_elfutils -a1
%else
BuildRequires: elfutils-devel >= %{elfutils_version}
%endif
%if %{with_docs}
BuildRequires: /usr/bin/latex /usr/bin/dvips /usr/bin/ps2pdf
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
@ -185,25 +178,25 @@ BuildRequires: readline-devel
BuildRequires: pkgconfig(ncurses)
%endif
%if %{with_python2_probes}
BuildRequires: python2-devel
%if 0%{?fedora} >= 1
BuildRequires: python2-setuptools
%else
BuildRequires: python-devel
BuildRequires: python-setuptools
%endif
%endif
%if %{with_python3_probes}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%endif
%if %{with_specific_python}
BuildRequires: /usr/bin/pathfix.py
%endif
%if %{with_httpd}
BuildRequires: libmicrohttpd-devel
BuildRequires: libuuid-devel
%endif
Patch10: bz1439914.patch
Patch21: bz1448099.1.patch
Patch22: bz1448099.2.patch
Patch23: bz1448099.3.patch
Patch24: bz1448099.4.patch
Patch25: bz1448099.5.patch
Patch26: bz1448099.6.patch
Patch27: bz1448099.7.patch
Patch28: bz1448099.7.1.patch
Patch29: bz1448099.8.patch
# Install requirements
Requires: systemtap-client = %{version}-%{release}
@ -219,26 +212,26 @@ the components needed to locally develop and execute systemtap scripts.
%package server
Summary: Instrumentation System Server
Group: Development/System
License: GPLv2+
URL: http://sourceware.org/systemtap/
Requires: systemtap-devel = %{version}-%{release}
Conflicts: systemtap-devel < %{version}-%{release}
Conflicts: systemtap-runtime < %{version}-%{release}
Conflicts: systemtap-client < %{version}-%{release}
Requires: nss coreutils
# On RHEL[45], /bin/mktemp comes from the 'mktemp' package. On newer
# distributions, /bin/mktemp comes from the 'coreutils' package. To
# avoid a specific RHEL[45] Requires, we'll do a file-based require.
Requires: nss /bin/mktemp
Requires: zip unzip
Requires(pre): shadow-utils
Requires(post): chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts
Requires(postun): initscripts
BuildRequires: nss-devel avahi-devel
%if %{with_openssl}
Requires: openssl
%endif
%if %{with_systemd}
Requires: systemd
%else
Requires(post): chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts
Requires(postun): initscripts
%endif
%description server
@ -249,20 +242,15 @@ compiles systemtap scripts to kernel objects on their demand.
%package devel
Summary: Programmable system-wide instrumentation system - development headers, tools
Group: Development/System
License: GPLv2+
URL: http://sourceware.org/systemtap/
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 20
Recommends: (kernel-debug-devel if kernel-debug)
Recommends: (kernel-devel if kernel)
%else
# The virtual provide 'kernel-devel-uname-r' tries to get the right
# kernel variant (kernel-PAE, kernel-debug, etc.) devel package
# installed.
Requires: kernel-devel-uname-r
%endif
%{?fedora:Suggests: kernel-devel}
Requires: gcc make
Conflicts: systemtap-client < %{version}-%{release}
Conflicts: systemtap-server < %{version}-%{release}
Conflicts: systemtap-runtime < %{version}-%{release}
# Suggest: kernel-debuginfo
%description devel
@ -276,12 +264,10 @@ a copy of the standard tapset library and the runtime library C files.
%package runtime
Summary: Programmable system-wide instrumentation system - runtime
Group: Development/System
License: GPLv2+
URL: http://sourceware.org/systemtap/
Requires(pre): shadow-utils
Conflicts: systemtap-devel < %{version}-%{release}
Conflicts: systemtap-server < %{version}-%{release}
Conflicts: systemtap-client < %{version}-%{release}
%description runtime
SystemTap runtime contains the components needed to execute
@ -291,15 +277,13 @@ using a local or remote systemtap-devel installation.
%package client
Summary: Programmable system-wide instrumentation system - client
Group: Development/System
License: GPLv2+
URL: http://sourceware.org/systemtap/
Requires: zip unzip
Requires: systemtap-runtime = %{version}-%{release}
Requires: coreutils grep sed unzip zip
Requires: openssh-clients
Conflicts: systemtap-devel < %{version}-%{release}
Conflicts: systemtap-server < %{version}-%{release}
Conflicts: systemtap-runtime < %{version}-%{release}
%if %{with_mokutil}
Requires: mokutil
%endif
@ -314,17 +298,14 @@ documentation, and a copy of the tapset library for reference.
%package initscript
Summary: Systemtap Initscripts
Group: Development/System
License: GPLv2+
URL: http://sourceware.org/systemtap/
Requires: systemtap = %{version}-%{release}
%if %{with_systemd}
Requires: systemd
%else
Requires(post): chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts
Requires(postun): initscripts
%endif
%description initscript
This package includes a SysVinit script to launch selected systemtap
@ -334,17 +315,14 @@ boot-time probing if supported.
%package sdt-devel
Summary: Static probe support tools
Group: Development/System
License: GPLv2+ and Public Domain
URL: http://sourceware.org/systemtap/
%if %{with_pyparsing}
%if %{with_python3}
Requires: python3-pyparsing
%else
%if 0%{?rhel} >= 7
Requires: pyparsing
%else
Requires: python2-pyparsing
%endif
%endif
%endif
@ -357,6 +335,7 @@ with the optional dtrace-compatibility preprocessor to process related
%package testsuite
Summary: Instrumentation System Testsuite
Group: Development/System
License: GPLv2+
URL: http://sourceware.org/systemtap/
Requires: systemtap = %{version}-%{release}
@ -414,21 +393,23 @@ systemtap on the current system.
%if %{with_java}
%package runtime-java
Summary: Systemtap Java Runtime Support
Group: Development/System
License: GPLv2+
URL: http://sourceware.org/systemtap/
Requires: systemtap-runtime = %{version}-%{release}
Requires: byteman > 2.0
Requires: iproute
Requires: java-devel
Requires: net-tools
%description runtime-java
This package includes support files needed to run systemtap scripts
that probe Java processes running on the OpenJDK runtimes using Byteman.
that probe Java processes running on the OpenJDK 1.6 and OpenJDK 1.7
runtimes using Byteman.
%endif
%if %{with_python2_probes}
%package runtime-python2
Summary: Systemtap Python 2 Runtime Support
Group: Development/System
License: GPLv2+
URL: http://sourceware.org/systemtap/
Requires: systemtap-runtime = %{version}-%{release}
@ -441,36 +422,20 @@ that probe python 2 processes.
%if %{with_python3_probes}
%package runtime-python3
Summary: Systemtap Python 3 Runtime Support
Group: Development/System
License: GPLv2+
URL: http://sourceware.org/systemtap/
Requires: systemtap-runtime = %{version}-%{release}
%if ! (%{with_python2_probes})
# Provide an clean upgrade path when the python2 package is removed
Obsoletes: %{name}-runtime-python2 < %{version}-%{release}
%endif
%description runtime-python3
This package includes support files needed to run systemtap scripts
that probe python 3 processes.
%endif
%if %{with_python3}
%package exporter
Summary: Systemtap-prometheus interoperation mechanism
License: GPLv2+
URL: http://sourceware.org/systemtap/
Requires: systemtap-runtime = %{version}-%{release}
%description 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.
%endif
%if %{with_virthost}
%package runtime-virthost
Summary: Systemtap Cross-VM Instrumentation - host
Group: Development/System
License: GPLv2+
URL: http://sourceware.org/systemtap/
Requires: libvirt >= 1.0.2
@ -485,6 +450,7 @@ connection.
%if %{with_virtguest}
%package runtime-virtguest
Summary: Systemtap Cross-VM Instrumentation - guest
Group: Development/System
License: GPLv2+
URL: http://sourceware.org/systemtap/
Requires: systemtap-runtime = %{version}-%{release}
@ -506,10 +472,47 @@ systemtap-runtime-virthost machine to execute systemtap scripts.
# ------------------------------------------------------------------------
%prep
%setup -q
%setup -q %{?setup_elfutils}
%patch10 -p1
%if %{with_bundled_elfutils}
cd elfutils-%{elfutils_version}
%patch1 -p1
sleep 1
find . \( -name Makefile.in -o -name aclocal.m4 \) -print | xargs touch
sleep 1
find . \( -name configure -o -name config.h.in \) -print | xargs touch
cd ..
%endif
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch27 -p1
%patch28 -p1
%patch29 -p1
%build
%if %{with_bundled_elfutils}
# Build our own copy of elfutils.
%global elfutils_config --with-elfutils=elfutils-%{elfutils_version}
# We have to prevent the standard dependency generation from identifying
# our private elfutils libraries in our provides and requires.
%global _use_internal_dependency_generator 0
%global filter_eulibs() /bin/sh -c "%{1} | sed '/libelf/d;/libdw/d;/libebl/d'"
%global __find_provides %{filter_eulibs /usr/lib/rpm/find-provides}
%global __find_requires %{filter_eulibs /usr/lib/rpm/find-requires}
# This will be needed for running stap when not installed, for the test suite.
%global elfutils_mflags LD_LIBRARY_PATH=`pwd`/lib-elfutils
%endif
# Enable/disable the dyninst pure-userspace backend
%if %{with_dyninst}
%global dyninst_config --with-dyninst
@ -545,7 +548,7 @@ systemtap-runtime-virthost machine to execute systemtap scripts.
%global docs_config --enable-docs --disable-htmldocs
%endif
%else
%global docs_config --enable-docs=prebuilt
%global docs_config --disable-docs
%endif
# Enable pie as configure defaults to disabling it
@ -590,26 +593,18 @@ systemtap-runtime-virthost machine to execute systemtap scripts.
%global dracut_config %{nil}
%endif
%if %{with_httpd}
%global httpd_config --enable-httpd
%else
%global httpd_config --disable-httpd
%endif
%if %{with_bpf}
%global bpf_config --with-bpf
%else
%global bpf_config --without-bpf
%endif
# We don't ship compileworthy python code, just oddball samples
%global py_auto_byte_compile 0
%configure %{dyninst_config} %{sqlite_config} %{crash_config} %{docs_config} %{pie_config} %{rpm_config} %{java_config} %{virt_config} %{dracut_config} %{python3_config} %{python2_probes_config} %{python3_probes_config} %{httpd_config} %{bpf_config} --disable-silent-rules --with-extra-version="rpm %{version}-%{release}"
%configure %{?elfutils_config} %{dyninst_config} %{sqlite_config} %{crash_config} %{docs_config} %{pie_config} %{rpm_config} %{java_config} %{virt_config} %{dracut_config} %{python3_config} %{python2_probes_config} %{python3_probes_config} --disable-silent-rules --with-extra-version="rpm %{version}-%{release}"
make %{?_smp_mflags}
%if %{with_emacsvim}
%{_emacs_bytecompile} emacs/systemtap-mode.el
%endif
%install
rm -rf ${RPM_BUILD_ROOT}
make DESTDIR=$RPM_BUILD_ROOT install
%find_lang %{name}
for dir in $(ls -1d $RPM_BUILD_ROOT%{_mandir}/{??,??_??}) ; do
@ -638,21 +633,19 @@ install -c -m 755 stap-prep $RPM_BUILD_ROOT%{_bindir}/stap-prep
# Copy over the testsuite
cp -rp testsuite $RPM_BUILD_ROOT%{_datadir}/systemtap
%if %{with_docs}
# We want the manuals in the special doc dir, not the generic doc install dir.
# We build it in place and then move it away so it doesn't get installed
# twice. rpm can specify itself where the (versioned) docs go with the
# %doc directive.
mkdir docs.installed
mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/*.pdf docs.installed/
%if %{with_docs}
%if %{with_htmldocs}
mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/tapsets docs.installed/
mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/SystemTap_Beginners_Guide docs.installed/
%endif
%endif
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
@ -662,27 +655,12 @@ 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
# If using systemd systemtap.service file, retain the old init script in %{_libexecdir} as a helper.
%if %{with_systemd}
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
%else
mkdir -p $RPM_BUILD_ROOT%{initdir}
install -m 755 initscript/systemtap $RPM_BUILD_ROOT%{initdir}
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
ln -sf %{initdir}/systemtap $RPM_BUILD_ROOT%{_sbindir}/systemtap-service
# TODO CHECK CORRECTNESS: symlink %{_sbindir}/systemtap-service to %{initdir}/systemtap
%endif
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
%if %{with_systemd}
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
touch $RPM_BUILD_ROOT%{_unitdir}/stap-server.service
@ -735,32 +713,21 @@ done
touch $RPM_BUILD_ROOT%{dracutstap}/params.conf
%endif
%if %{with_specific_python}
# Some files got ambiguous python shebangs, we fix them after everything else is done
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{python3_sitearch} %{buildroot}%{_bindir}/*
%endif
%clean
rm -rf ${RPM_BUILD_ROOT}
%pre runtime
getent group stapusr >/dev/null || groupadd -f -g 156 -r stapusr
getent group stapsys >/dev/null || groupadd -f -g 157 -r stapsys
getent group stapdev >/dev/null || groupadd -f -g 158 -r stapdev
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
%pre server
getent group stap-server >/dev/null || groupadd -f -g 155 -r stap-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 || \
useradd -c "Systemtap 'stapusr' User" -g stapusr -r -s /sbin/nologin stapusr
getent passwd stapsys >/dev/null || \
useradd -c "Systemtap 'stapsys' User" -g stapsys -G stapusr -r -s /sbin/nologin stapsys
getent passwd stapdev >/dev/null || \
useradd -c "Systemtap 'stapdev' User" -g stapdev -G stapusr -r -s /sbin/nologin stapdev
exit 0
%post server
# We have some duplication between the %files listings for the
@ -915,24 +882,6 @@ if [ "$1" -ge "1" ]; then
fi
exit 0
%if %{with_python3}
%if %{with_systemd}
%preun exporter
if [ $1 = 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
%postun exporter
# Restart service if this is an upgrade rather than an uninstall
if [ "$1" -ge "1" ]; then
/bin/systemctl condrestart stap-exporter >/dev/null 2>&1 || :
fi
exit 0
%endif
%endif
%post
# Remove any previously-built uprobes.ko materials
(make -C %{_datadir}/systemtap/runtime/uprobes clean) >/dev/null 2>&1 || true
@ -997,10 +946,11 @@ done
# ------------------------------------------------------------------------
%files
%files -f systemtap.lang
# The master "systemtap" rpm doesn't include any files.
%files server -f systemtap.lang
%defattr(-,root,root)
%{_bindir}/stap-server
%dir %{_libexecdir}/systemtap
%{_libexecdir}/systemtap/stap-serverd
@ -1054,6 +1004,10 @@ done
%dir %{_libexecdir}/systemtap
%{_libexecdir}/systemtap/libHelperSDT_*.so
%endif
%if %{with_bundled_elfutils}
%dir %{_libdir}/systemtap
%{_libdir}/systemtap/lib*.so*
%endif
%if %{with_emacsvim}
%{_emacs_sitelispdir}/*.el*
%{_emacs_sitestartdir}/systemtap-init.el
@ -1069,6 +1023,7 @@ done
%files runtime -f systemtap.lang
%defattr(-,root,root)
%attr(4110,root,stapusr) %{_bindir}/staprun
%{_bindir}/stapsh
%{_bindir}/stap-merge
@ -1076,9 +1031,6 @@ done
%if %{with_dyninst}
%{_bindir}/stapdyn
%endif
%if %{with_bpf}
%{_bindir}/stapbpf
%endif
%dir %{_libexecdir}/systemtap
%{_libexecdir}/systemtap/stapio
%{_libexecdir}/systemtap/stap-authorize-cert
@ -1095,21 +1047,19 @@ done
%if %{with_dyninst}
%{_mandir}/man8/stapdyn.8*
%endif
%if %{with_bpf}
%{_mandir}/man8/stapbpf.8*
%endif
%doc README README.security AUTHORS NEWS
%{!?_licensedir:%global license %%doc}
%license COPYING
%files client -f systemtap.lang
%defattr(-,root,root)
%doc README README.unprivileged AUTHORS NEWS
%{_datadir}/systemtap/examples
%{!?_licensedir:%global license %%doc}
%license COPYING
%doc docs.installed/*.pdf
%if %{with_docs}
%doc docs.installed/*.pdf
%if %{with_htmldocs}
%doc docs.installed/tapsets/*.html
%doc docs.installed/SystemTap_Beginners_Guide
@ -1133,20 +1083,15 @@ done
%files initscript
%if %{with_systemd}
%{_unitdir}/systemtap.service
%{_sbindir}/systemtap-service
%else
%defattr(-,root,root)
%{initdir}/systemtap
%{_sbindir}/systemtap-service
%endif
%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
%{_mandir}/man8/systemtap-service.8*
%{_mandir}/man8/systemtap.8*
%if %{with_dracut}
%dir %{dracutstap}
%{dracutstap}/*
@ -1154,17 +1099,18 @@ done
%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
%{!?_licensedir:%global license %%doc}
%license COPYING
%files testsuite
%defattr(-,root,root)
%dir %{_datadir}/systemtap
%{_datadir}/systemtap/testsuite
@ -1208,15 +1154,6 @@ done
%endif
%endif
%if %{with_python3}
%files exporter
%{_sysconfdir}/stap-exporter
%{_sysconfdir}/sysconfig/stap-exporter
%{_unitdir}/stap-exporter.service
%{_mandir}/man8/stap-exporter.8*
%{_sbindir}/stap-exporter
%endif
# ------------------------------------------------------------------------
# Future new-release entries should be of the form
@ -1226,38 +1163,14 @@ done
# PRERELEASE
%changelog
* Tue Apr 21 2020 Björn Esser <besser82@fedoraproject.org> - 4.3-0.20200212git91ffb97ad335
- Rebuild (json-c)
* Mon May 15 2017 Frank Ch. Eigler <fche@redhat.com> - 3.1-5
- Build with dsmith's bz1448099 patches for support of kernel 4.11
* Tue Feb 11 2020 Frank Ch. Eigler <fche@redhat.com> - 4.3-0.20200211git91ffb97ad335
- Automated weekly rawhide release
- Applied spec changes from upstream git
* Thu Apr 06 2017 Frank Ch. Eigler <fche@redhat.com> - 3.1-3
- Backport bz1439914 (sys/sdt.h argument encoding)
* Mon Feb 03 2020 Frank Ch. Eigler <fche@redhat.com> - 4.3-0.20200203git6c0b74f5910a
- Automated weekly rawhide release
- Applied spec changes from upstream git
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.3-0.20200113gitb1e6a6645bba
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sun Jan 12 2020 Frank Ch. Eigler <fche@redhat.com> - 4.3-0.20200112gitb1e6a6645bba
- Automated weekly rawhide release
- Applied spec changes from upstream git
* Mon Nov 18 2019 Sagar Patel <sapatel@redhat.com> - 4.2-1
- Upstream release.
* Tue May 07 2019 Serguei Makarov <smakarov@redhat.com> - 4.1-1
- Upstream release.
* Sat Oct 13 2018 Frank Ch. Eigler <fche@redhat.com> - 4.0-1
- Upstream release.
* Thu Jun 07 2018 Frank Ch. Eigler <fche@redhat.com> - 3.3-1
- Upstream release.
* Wed Oct 18 2017 Frank Ch. Eigler <fche@redhat.com> - 3.2-1
- Upstream release.
* Thu Mar 16 2017 Stan Cox <scox@redhat.com> - 3.1-2
- Rebuild for dyninst 9.3
* Fri Feb 17 2017 Frank Ch. Eigler <fche@redhat.com> - 3.1-1
- Upstream release.
@ -1278,7 +1191,7 @@ done
- Upstream release.
* Mon Jul 07 2014 Josh Stone <jistone@redhat.com>
- Flip with_dyninst to an %%ifarch whitelist.
- Flip with_dyninst to an %ifarch whitelist.
* Wed Apr 30 2014 Jonathan Lebon <jlebon@redhat.com> - 2.5-1
- Upstream release.

View File

@ -1,38 +0,0 @@
TOPLEVEL_NAMESPACE=fedora
PACKAGE_NAME=systemtap
RELATIVE_PATH=Sanity/dejagnu-smoketest
export TESTVERSION=1.0
export TEST=/$(TOPLEVEL_NAMESPACE)/$(PACKAGE_NAME)/$(RELATIVE_PATH)
.PHONY: all install download clean
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
chmod a+x ./runtest.sh
clean:
rm -f *~ *.rpm $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
# Generate the testinfo.desc here:
$(METADATA): Makefile
@touch $(METADATA)
# Change to the test owner's name
@echo "Owner: Frank Ch. Eigler <fche@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Type: Sanity" >> $(METADATA)
@echo "Description: smoke test" >> $(METADATA)
@echo "TestTime: 10m" >> $(METADATA)
@echo "RunFor: $(PACKAGE_NAME)" >> $(METADATA)
@echo "Requires: $(PACKAGE_NAME)" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
# You may need other fields here; see the documentation
rhts-lint $(METADATA)

View File

@ -1,3 +0,0 @@
Test Name: dejagnu-smoketest
Author:
Short Description: Run a minimal systemtap testsuite

View File

@ -1,17 +0,0 @@
#!/bin/sh
set -e
set -x
dnf debuginfo-install -y kernel
# on Fedora CI, can only assume about 1GB RAM to run these tests
stap -L 'process("stap").mark("*")' | grep pass
# stap -L 'kernel.trace("sys_enter")'
stap -v --example helloworld.stp
stap -v -T 10 -p4 -e 'probe kernel.function("do_exit") {println($$vars)}'
# stap -v -T 10 -e 'probe syscall.* ? {println(argstr)}'
echo
echo RESULT: PASS

View File

@ -1,11 +0,0 @@
---
- hosts: localhost
roles:
- role: standard-test-beakerlib
tags:
- classic
tests:
- dejagnu-smoketest
required_packages:
- systemtap-testsuite
- kernel-devel