From aea1799c391fe27a81011d0888998ef8a7e5845d Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 09 2017 13:18:39 +0000 Subject: import systemtap-3.1-5.el7a --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..24e112d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/systemtap-3.1.tar.gz diff --git a/.systemtap.metadata b/.systemtap.metadata new file mode 100644 index 0000000..be8f989 --- /dev/null +++ b/.systemtap.metadata @@ -0,0 +1 @@ +2927ee7e780b45e47d770798f80dfd5be62e095d SOURCES/systemtap-3.1.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/bz1425568.1.patch b/SOURCES/bz1425568.1.patch new file mode 100644 index 0000000..d90332b --- /dev/null +++ b/SOURCES/bz1425568.1.patch @@ -0,0 +1,50 @@ +commit d09defa86b31bd665a3a148ed15713aced8ae227 +Author: David Smith +Date: Thu Mar 9 11:11:49 2017 -0600 + + Add PR19021 test case to task_dentry_path.exp. + +diff --git a/testsuite/systemtap.base/task_dentry_path.exp b/testsuite/systemtap.base/task_dentry_path.exp +index 9bb7b9d..00b9e02 100644 +--- a/testsuite/systemtap.base/task_dentry_path.exp ++++ b/testsuite/systemtap.base/task_dentry_path.exp +@@ -3,7 +3,8 @@ + # unmounted synthentic filesystem, it would go into an infinite loop + # (until killed by MAXACTION). + +-set test "task_dentry_path" ++set test_base "task_dentry_path" ++set test "${test_base}" + + # Only run on make installcheck + if {! [installtest_p]} { untested "$test"; return } +@@ -18,3 +19,17 @@ expect { + } + catch {close}; catch {wait} + if {$ok == 1} { fail "$test ($ok)" } { pass "$test ($ok)" } ++ ++# Test the fix for PR19021 - the tapset function task_dentry_path() ++# should handle more than just files. ++set test "${test_base}2" ++spawn stap $srcdir/$subdir/$test.stp -c "echo hi | cat > /dev/null" ++set ok 0 ++expect { ++ -timeout 150 ++ -re {^pipe:\[[0-9]+\]\r\n} { incr ok; exp_continue } ++ timeout { fail "$test (timeout)" } ++ eof { } ++} ++catch {close}; catch {wait} ++if {$ok == 1} { pass "$test" } { fail "$test ($ok)" } +diff --git a/testsuite/systemtap.base/task_dentry_path2.stp b/testsuite/systemtap.base/task_dentry_path2.stp +new file mode 100644 +index 0000000..3fc9db4 +--- /dev/null ++++ b/testsuite/systemtap.base/task_dentry_path2.stp +@@ -0,0 +1,6 @@ ++probe kernel.function("pipe_read") { ++ t = task_current() ++ println(task_dentry_path(t, $iocb->ki_filp->f_path->dentry, ++ $iocb->ki_filp->f_path->mnt)) ++ exit() ++} diff --git a/SOURCES/bz1425568.2.patch b/SOURCES/bz1425568.2.patch new file mode 100644 index 0000000..c9893b8 --- /dev/null +++ b/SOURCES/bz1425568.2.patch @@ -0,0 +1,175 @@ +commit 6b4d1fcbfa2e9706749cd549ea30df2b67716a0f +Author: David Smith +Date: Fri Mar 10 10:15:48 2017 -0600 + + Fix BZ1425568 by updating task_dentry_path() to handle chroot(). + + * tapset/linux/dentry.stp (task_dentry_path): Fix task_dentry_path when + called on a target executable that has run chroot(). + * testsuite/systemtap.base/task_dentry_path.exp: Add test for chroot'ed + executable. + * testsuite/systemtap.base/task_dentry_path3.stp: New test. + +diff --git a/tapset/linux/dentry.stp b/tapset/linux/dentry.stp +index 589260e..0bc4753 100644 +--- a/tapset/linux/dentry.stp ++++ b/tapset/linux/dentry.stp +@@ -190,6 +190,10 @@ function real_mount:long(vfsmnt:long) + * @dentry: direntry pointer. + * @vfsmnt: vfsmnt pointer. + */ ++/* ++ * Note that this function is based on __d_path() in RHEL6-era kernels ++ * and prepend_path() in RHEL7+ kernels. ++ */ + function task_dentry_path:string(task:long,dentry:long,vfsmnt:long) + { + /* +@@ -207,6 +211,7 @@ function task_dentry_path:string(task:long,dentry:long,vfsmnt:long) + */ + dentry = & @cast(dentry, "dentry") + vfsmnt = & @cast(vfsmnt, "vfsmount") ++ + if (@type_member_defined("dentry", d_op->d_dname) + && dentry->d_op && dentry->d_op->d_dname + && (!__dentry_IS_ROOT(dentry) || dentry != vfsmnt->mnt_root)) { +@@ -242,26 +247,34 @@ function task_dentry_path:string(task:long,dentry:long,vfsmnt:long) + root_vfsmnt = @cast(task, "task_struct")->fs->root->mnt + } + +- while (1) { +- # If we've found the right dentry/vfsmnt, we're done. +- if (dentry == root_dentry && vfsmnt == root_vfsmnt) +- break; ++ if (@type_member_defined("mount", mnt_parent)) { ++ mnt = &@cast(real_mount(vfsmnt), "mount") ++ if (mnt == 0) ++ return "" ++ } + ++ # If we've found the right dentry/vfsmnt, we're done. ++ while (dentry != root_dentry || vfsmnt == root_vfsmnt) { + if (dentry == vfsmnt->mnt_root || __dentry_IS_ROOT(dentry)) { +- if (! @type_member_defined("vfsmount", mnt_parent)) { +- mnt = & @cast(real_mount(vfsmnt), "mount") +- if (mnt == 0) +- return "" ++ /* Escaped? */ ++ if (dentry != vfsmnt->mnt_root) { ++ return "" ++ } + ++ /* RHEL7+ kernels */ ++ if (! @type_member_defined("vfsmount", mnt_parent)) { + /* Global root? */ +- if (mnt->mnt_parent == vfsmnt) +- return sprintf("%s%s", +- d_name(mnt->mnt_mountpoint), +- name) +- +- dentry = mnt->mnt_mountpoint +- vfsmnt = & mnt->mnt_parent->mnt ++ if (mnt != mnt->mnt_parent) { ++ dentry = mnt->mnt_mountpoint ++ vfsmnt = & mnt->mnt_parent->mnt ++ mnt = mnt->mnt_parent ++ if (mnt == 0) ++ return "" ++ continue ++ } ++ break + } ++ /* RHEL6-era kernels */ + else { + /* Global root? */ + if (vfsmnt->mnt_parent == vfsmnt) +@@ -271,11 +284,11 @@ function task_dentry_path:string(task:long,dentry:long,vfsmnt:long) + + dentry = vfsmnt->mnt_mountpoint + vfsmnt = vfsmnt->mnt_parent ++ continue + } +- continue; + } +- name = __dentry_prepend(dentry, name); +- dentry = dentry->d_parent; ++ name = __dentry_prepend(dentry, name) ++ dentry = dentry->d_parent + } + + return sprintf("/%s", name); +diff --git a/testsuite/systemtap.base/task_dentry_path.exp b/testsuite/systemtap.base/task_dentry_path.exp +index 00b9e02..3630401 100644 +--- a/testsuite/systemtap.base/task_dentry_path.exp ++++ b/testsuite/systemtap.base/task_dentry_path.exp +@@ -5,6 +5,8 @@ + + set test_base "task_dentry_path" + set test "${test_base}" ++set test_name "$test_base (infinite loop)" ++set am_root [expr 0 == [exec id -u]] + + # Only run on make installcheck + if {! [installtest_p]} { untested "$test"; return } +@@ -14,22 +16,45 @@ set ok 0 + expect { + -timeout 150 + -re {ERROR.*MAXACTION} { incr ok; exp_continue } +- timeout { fail "$test (timeout)" } ++ timeout { fail "$test_name (timeout)" } + eof { } + } + catch {close}; catch {wait} +-if {$ok == 1} { fail "$test ($ok)" } { pass "$test ($ok)" } ++if {$ok == 1} { fail "$test_name ($ok)" } { pass "$test_name" } + + # Test the fix for PR19021 - the tapset function task_dentry_path() + # should handle more than just files. + set test "${test_base}2" ++set test_name "$test_base (synthetic files)" + spawn stap $srcdir/$subdir/$test.stp -c "echo hi | cat > /dev/null" + set ok 0 + expect { + -timeout 150 + -re {^pipe:\[[0-9]+\]\r\n} { incr ok; exp_continue } +- timeout { fail "$test (timeout)" } ++ timeout { fail "$test_name (timeout)" } + eof { } + } + catch {close}; catch {wait} +-if {$ok == 1} { pass "$test" } { fail "$test ($ok)" } ++if {$ok == 1} { pass "$test_name" } { fail "$test_name ($ok)" } ++ ++# Test the fix for BZ1425568 - systemtap task_dentry_path crashes ++# under chroot. ++set test "${test_base}3" ++set test_name "$test_base (chroot)" ++ ++# We've got to be root to successfully do a 'chroot'. ++if {!$am_root} { ++ untested "$test_name" ++} else { ++ set curdir [pwd] ++ spawn stap $srcdir/$subdir/$test.stp -c "perl -e 'chroot(qw(/tmp))'" ++ set ok 0 ++ expect { ++ -timeout 150 ++ -re "^${curdir}\r\n" { incr ok; exp_continue } ++ timeout { fail "$test_name (timeout)" } ++ eof { } ++ } ++ catch {close}; catch {wait} ++ if {$ok == 1} { pass "$test_name" } { fail "$test_name ($ok)" } ++} +diff --git a/testsuite/systemtap.base/task_dentry_path3.stp b/testsuite/systemtap.base/task_dentry_path3.stp +new file mode 100644 +index 0000000..b04eb6b +--- /dev/null ++++ b/testsuite/systemtap.base/task_dentry_path3.stp +@@ -0,0 +1,6 @@ ++probe kprocess.exit ++{ ++ t = task_current() ++ println(task_dentry_path(t, @cast(t, "task_struct")->fs->pwd->dentry, ++ @cast(t,"task_struct")->fs->pwd->mnt)) ++} diff --git a/SOURCES/bz1428120.patch b/SOURCES/bz1428120.patch new file mode 100644 index 0000000..080e3a0 --- /dev/null +++ b/SOURCES/bz1428120.patch @@ -0,0 +1,26 @@ +commit 237f3f9f43ecf4e8233836f16b0288ec6988414f +Author: David Smith +Date: Thu Mar 2 11:14:47 2017 -0600 + + Update lookup_bad_addr() for platforms where user_addr_max() doesn't exist. + + * runtime/linux/addr-map.c (lookup_bad_addr): Handle platforms (like + s390x) where in_task() exists, but user_addr_max() doesn't. + +diff --git a/runtime/linux/addr-map.c b/runtime/linux/addr-map.c +index b1b9bb0..c868604 100644 +--- a/runtime/linux/addr-map.c ++++ b/runtime/linux/addr-map.c +@@ -53,7 +53,11 @@ lookup_bad_addr(const int type, const unsigned long addr, const size_t size) + #else + if (size == 0 || ULONG_MAX - addr < size - 1 + || (in_task() && !access_ok(type, (void *)addr, size)) +- || (!in_task() && ((user_addr_max() - size) < addr))) ++ || (!in_task() ++#if defined(user_addr_max) ++ && ((user_addr_max() - size) < addr) ++#endif ++ )) + return 1; + #endif + diff --git a/SOURCES/bz1430828.patch b/SOURCES/bz1430828.patch new file mode 100644 index 0000000..b809be5 --- /dev/null +++ b/SOURCES/bz1430828.patch @@ -0,0 +1,268 @@ +commit 4ed3fbc366d168806f94a615f3339b4d2fbd5a75 +Author: David Smith +Date: Wed Mar 22 15:51:56 2017 -0500 + + Fixed BZ1430828 by replacing task_exe_file() with current_exe_file(). + + * tapset/linux/task.stp (current_exe_file): New function. + (task_exe_file): Deprecate and rewrite in terms of + current_exe_file(). This keeps us from potentially accessing task->mm in + an unsafe manner. + * testsuite/buildok/task-embedded.stp: Updated. + * testsuite/systemtap.base/task_paths.exp: Ditto. + * testsuite/systemtap.base/task_paths.stp: Ditto. + * doc/SystemTap_Tapset_Reference/man3/function::task_exe_file.3stap: + Ditto. + * doc/SystemTap_Tapset_Reference/man3/function::current_exe_file.3stap: + New file. + +diff --git a/doc/SystemTap_Tapset_Reference/man3/function::current_exe_file.3stap b/doc/SystemTap_Tapset_Reference/man3/function::current_exe_file.3stap +new file mode 100644 +index 0000000..60ab1fa +--- /dev/null ++++ b/doc/SystemTap_Tapset_Reference/man3/function::current_exe_file.3stap +@@ -0,0 +1,46 @@ ++'\" t ++.\" Title: function::current_exe_file ++.\" Author: ++.\" Generator: DocBook XSL Stylesheets v1.78.1 ++.\" Date: March 2017 ++.\" Manual: Context Functions ++.\" Source: SystemTap Tapset Reference ++.\" Language: English ++.\" ++.TH "FUNCTION::CURRENT_EX" "3stap" "March 2017" "SystemTap Tapset Reference" "Context Functions" ++.\" ----------------------------------------------------------------- ++.\" * Define some portability stuff ++.\" ----------------------------------------------------------------- ++.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++.\" http://bugs.debian.org/507673 ++.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html ++.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++.ie \n(.g .ds Aq \(aq ++.el .ds Aq ' ++.\" ----------------------------------------------------------------- ++.\" * set default formatting ++.\" ----------------------------------------------------------------- ++.\" disable hyphenation ++.nh ++.\" disable justification (adjust text to left margin only) ++.ad l ++.\" ----------------------------------------------------------------- ++.\" * MAIN CONTENT STARTS HERE * ++.\" ----------------------------------------------------------------- ++.SH "NAME" ++function::current_exe_file \- get the file struct pointer for the current task\*(Aqs executable file ++.SH "SYNOPSIS" ++.sp ++.nf ++ current_exe_file:long() ++.fi ++.SH "ARGUMENTS" ++.PP ++None ++.SH "DESCRIPTION" ++.PP ++This function returns the file struct pointer for the ++current task\*(Aqs executable file\&. Note that the file struct pointer ++isn\*(Aqt locked on return\&. The return value of this function can be passed to ++.IR function::fullpath_struct_file (3stap) ++to get the path from the file struct\&. +diff --git a/doc/SystemTap_Tapset_Reference/man3/function::task_exe_file.3stap b/doc/SystemTap_Tapset_Reference/man3/function::task_exe_file.3stap +index bcc648b..55fe5d7 100644 +--- a/doc/SystemTap_Tapset_Reference/man3/function::task_exe_file.3stap ++++ b/doc/SystemTap_Tapset_Reference/man3/function::task_exe_file.3stap +@@ -40,3 +40,8 @@ function::task_exe_file \- get the file struct pointer for a task\*(Aqs executab + .RS 4 + task_struct pointer\&. + .RE ++.SH "DESCRIPTION" ++.PP ++This function returns the file struct pointer for a task\*(Aqs executable file\&. Deprecated in SystemTap 3\&.2 and removed in SystemTap 3\&.3\&. ++.SH SEE ALSO\n ++.IR function::current_exe_file (3stap) +diff --git a/tapset/linux/task.stp b/tapset/linux/task.stp +index 12e2868..5467e05 100644 +--- a/tapset/linux/task.stp ++++ b/tapset/linux/task.stp +@@ -781,39 +781,46 @@ function task_cwd_path:long(task:long) + %} + + /** +- * sfunction task_cwd_path - get the file struct pointer for a task's executable file ++ * sfunction current_exe_file - get the file struct pointer for the current task's executable file + * +- * @task: task_struct pointer. ++ * Description: This function returns the file struct pointer for the ++ * current task's executable file. Note that the file struct pointer ++ * isn't locked on return. The return value of this function can be ++ * passed to fullpath_struct_file() to get the path from the file ++ * struct. + */ +-function task_exe_file:long(task:long) ++function current_exe_file:long() + %{ /* pure */ +- struct task_struct *task +- = (struct task_struct *)(unsigned long)STAP_ARG_task; +- struct mm_struct *mm = NULL; + struct file *exe_file = NULL; + +- // Before using the task_struct pointer, make sure it is valid +- // to read. +- (void)kderef_buffer(NULL, task, sizeof(struct task_struct)); +- +- // OK, we now know it is valid to read. But, is it really a +- // task struct? +- if (!_stp_task_struct_valid(task)) { +- STAP_ERROR ("invalid task struct pointer"); ++ if (current == NULL) { ++ STAP_ERROR ("No current task"); + } + +- // We'd like to call get_task_mm()/mmput() here, but they can +- // sleep. So, let's hope incrementing the task's usage (by +- // calling get_task_struct) is enough to keep the mm around. +- get_task_struct(task); +- mm = task->mm; +- if (mm) +- exe_file = stap_find_exe_file(mm); +- put_task_struct(task); +- +- if (exe_file) { +- STAP_RETURN((unsigned long)exe_file); +- fput(exe_file); ++ // Since we're stopped inside current, it isn't going away. So ++ // don't bother incrementing the task's usage count by calling ++ // get_task_struct()/put_task_struct(). We also don't need to ++ // bother to try to lock current->mm. ++ if (current->mm) { ++ exe_file = stap_find_exe_file(current->mm); ++ if (exe_file) { ++ STAP_RETVALUE = (unsigned long)exe_file; ++ fput(exe_file); ++ } + } +- CATCH_DEREF_FAULT(); + %} ++ ++%(systemtap_v <= "3.2" %? ++/** ++ * sfunction task_exe_file - get the file struct pointer for a task's executable file ++ * ++ * @task: task_struct pointer. ++ */ ++function task_exe_file:long(task:long) ++{ ++ if (task == task_current()) { ++ return current_exe_file() ++ } ++ error("Only the exe file for the current task can be returned") ++} ++%) +diff --git a/testsuite/buildok/task-embedded.stp b/testsuite/buildok/task-embedded.stp +index 6b7983f..c3264b5 100755 +--- a/testsuite/buildok/task-embedded.stp ++++ b/testsuite/buildok/task-embedded.stp +@@ -25,7 +25,10 @@ probe begin { + pid2task(0) + + task_fd_lookup(0, 0) + + task_cwd_path(0) + +- task_exe_file(0)) ++%(systemtap_v <= "3.2" %? ++ task_exe_file(0) + ++%) ++ current_exe_file()) + print (task_execname (0)) + print (pid2execname (0)) + } +diff --git a/testsuite/systemtap.base/task_paths.exp b/testsuite/systemtap.base/task_paths.exp +index 0d885ee..a803680 100644 +--- a/testsuite/systemtap.base/task_paths.exp ++++ b/testsuite/systemtap.base/task_paths.exp +@@ -36,7 +36,7 @@ if {$found_cwd == 0 && ![min_kernel_vers_p 2.6.25]} { + setup_kfail NO_CWD *-*-* + } + +-if {$found_cwd == 3 && $found_stapio == 2 && $found_error == 4 ++if {$found_cwd == 2 && $found_stapio == 1 && $found_error == 2 + && $found_whoami == 1} { + pass "$test" + } else { +diff --git a/testsuite/systemtap.base/task_paths.stp b/testsuite/systemtap.base/task_paths.stp +index be088a8..dfefa55 100644 +--- a/testsuite/systemtap.base/task_paths.stp ++++ b/testsuite/systemtap.base/task_paths.stp +@@ -12,29 +12,8 @@ probe begin + } + try + { +- file = task_exe_file(task) +- printf("current exe: %s\n", fullpath_struct_file(task, file)) +- } +- catch (msg) { +- printf("ERROR: %s\n", msg) +- } +- +- # Now print the value of cwd/exe for our target pid. Note that at +- # this point, the target exe path will still be stapio - the exec +- # hasn't happened yet. +- try +- { +- task = pid2task(target()) +- path = task_cwd_path(task) +- printf("target cwd: %s\n", fullpath_struct_path(path)) +- } +- catch (msg) { +- printf("ERROR: %s\n", msg) +- } +- try +- { +- file = task_exe_file(task) +- printf("target exe: %s\n", fullpath_struct_file(task, file)) ++ file = current_exe_file() ++ printf("current exe: %s\n", fullpath_struct_file(task_current(), file)) + } + catch (msg) { + printf("ERROR: %s\n", msg) +@@ -51,15 +30,6 @@ probe begin + catch (msg) { + printf("ERROR: %s\n", msg) + } +- try +- { +- file = task_exe_file(task) +- printf("file: %p\n", file) +- printf("%s\n", fullpath_struct_file(task, file)) +- } +- catch (msg) { +- printf("ERROR: %s\n", msg) +- } + + # Now let's try using a task pointer of -1, which should also + # fail. +@@ -72,14 +42,6 @@ probe begin + catch (msg) { + printf("ERROR: %s\n", msg) + } +- try +- { +- file = task_exe_file(task) +- printf("%s\n", fullpath_struct_file(task, file)) +- } +- catch (msg) { +- printf("ERROR: %s\n", msg) +- } + } + + probe syscall.geteuid, syscall.getuid +@@ -99,8 +61,8 @@ probe syscall.geteuid, syscall.getuid + } + try + { +- file = task_exe_file(task) +- printf("current exe: %s\n", fullpath_struct_file(task, file)) ++ file = current_exe_file() ++ printf("current exe: %s\n", fullpath_struct_file(task_current(), file)) + } + catch (msg) { + printf("ERROR: %s\n", msg) diff --git a/SOURCES/bz1431263.1.patch b/SOURCES/bz1431263.1.patch new file mode 100644 index 0000000..8fc9e60 --- /dev/null +++ b/SOURCES/bz1431263.1.patch @@ -0,0 +1,72 @@ +commit d0b322eddb2f0f248ced58df8e8448c6e557c81e +Author: David Smith +Date: Tue Mar 21 15:49:11 2017 -0500 + + BZ1431263: Fix hardware breakpoint probe handler return types. + + * tapsets.cxx (hwbkpt_derived_probe_group::emit_module_decls): Fix + hardware breakpoint probe handler return type - changed from 'int' to + 'void' to match the kernel. + (hwbkpt_derived_probe_group::emit_module_init): Ditto. + +diff --git a/tapsets.cxx b/tapsets.cxx +index 54793db..32dfde3 100644 +--- a/tapsets.cxx ++++ b/tapsets.cxx +@@ -10191,12 +10191,12 @@ hwbkpt_derived_probe_group::emit_module_decls (systemtap_session& s) + + // Forward declare the master entry functions + s.op->newline() << "#ifdef STAPCONF_PERF_HANDLER_NMI"; +- s.op->newline() << "static int enter_hwbkpt_probe (struct perf_event *bp,"; ++ s.op->newline() << "static void enter_hwbkpt_probe (struct perf_event *bp,"; + s.op->line() << " int nmi,"; + s.op->line() << " struct perf_sample_data *data,"; + s.op->line() << " struct pt_regs *regs);"; + s.op->newline() << "#else"; +- s.op->newline() << "static int enter_hwbkpt_probe (struct perf_event *bp,"; ++ s.op->newline() << "static void enter_hwbkpt_probe (struct perf_event *bp,"; + s.op->line() << " struct perf_sample_data *data,"; + s.op->line() << " struct pt_regs *regs);"; + s.op->newline() << "#endif"; +@@ -10253,17 +10253,17 @@ hwbkpt_derived_probe_group::emit_module_decls (systemtap_session& s) + // Emit the hwbkpt callback function + s.op->newline() ; + s.op->newline() << "#ifdef STAPCONF_PERF_HANDLER_NMI"; +- s.op->newline() << "static int enter_hwbkpt_probe (struct perf_event *bp,"; ++ s.op->newline() << "static void enter_hwbkpt_probe (struct perf_event *bp,"; + s.op->line() << " int nmi,"; + s.op->line() << " struct perf_sample_data *data,"; + s.op->line() << " struct pt_regs *regs) {"; + s.op->newline() << "#else"; +- s.op->newline() << "static int enter_hwbkpt_probe (struct perf_event *bp,"; ++ s.op->newline() << "static void enter_hwbkpt_probe (struct perf_event *bp,"; + s.op->line() << " struct perf_sample_data *data,"; + s.op->line() << " struct pt_regs *regs) {"; + s.op->newline() << "#endif"; + s.op->newline(1) << "unsigned int i;"; +- s.op->newline() << "if (bp->attr.type != PERF_TYPE_BREAKPOINT) return -1;"; ++ s.op->newline() << "if (bp->attr.type != PERF_TYPE_BREAKPOINT) return;"; + s.op->newline() << "for (i=0; i<" << hwbkpt_probes.size() << "; i++) {"; + s.op->newline(1) << "struct perf_event_attr *hp = & stap_hwbkpt_probe_array[i];"; + // XXX: why not match stap_hwbkpt_ret_array[i] against bp instead? +@@ -10281,7 +10281,7 @@ hwbkpt_derived_probe_group::emit_module_decls (systemtap_session& s) + common_probe_entryfn_epilogue (s, true, otf_safe_context(s)); + s.op->newline(-1) << "}"; + s.op->newline(-1) << "}"; +- s.op->newline() << "return 0;"; ++ s.op->newline() << "return;"; + s.op->newline(-1) << "}"; + } + +@@ -10333,9 +10333,9 @@ hwbkpt_derived_probe_group::emit_module_init (systemtap_session& s) + + s.op->newline() << "probe_point = skp->probe->pp;"; // for error messages + s.op->newline() << "#ifdef STAPCONF_HW_BREAKPOINT_CONTEXT"; +- s.op->newline() << "stap_hwbkpt_ret_array[i] = register_wide_hw_breakpoint(hp, (void *)&enter_hwbkpt_probe, NULL);"; ++ s.op->newline() << "stap_hwbkpt_ret_array[i] = register_wide_hw_breakpoint(hp, &enter_hwbkpt_probe, NULL);"; + s.op->newline() << "#else"; +- s.op->newline() << "stap_hwbkpt_ret_array[i] = register_wide_hw_breakpoint(hp, (void *)&enter_hwbkpt_probe);"; ++ s.op->newline() << "stap_hwbkpt_ret_array[i] = register_wide_hw_breakpoint(hp, &enter_hwbkpt_probe);"; + s.op->newline() << "#endif"; + s.op->newline() << "rc = 0;"; + s.op->newline() << "if (IS_ERR(stap_hwbkpt_ret_array[i])) {"; diff --git a/SOURCES/bz1431263.2.patch b/SOURCES/bz1431263.2.patch new file mode 100644 index 0000000..df18980 --- /dev/null +++ b/SOURCES/bz1431263.2.patch @@ -0,0 +1,26 @@ +commit 26f262a7b2712a98d12261b12a5729d9d5e7cb0b +Author: David Smith +Date: Thu Mar 23 16:21:37 2017 -0500 + + BZ1431263: Disable kernel.data probes on arm64. + + * tapsets.cxx (hwbkpt_builder::build): On arm64, hardware breakpoint + probes continually get triggered. So, disable them. + +diff --git a/tapsets.cxx b/tapsets.cxx +index 32dfde3..9be2d04 100644 +--- a/tapsets.cxx ++++ b/tapsets.cxx +@@ -10392,6 +10392,12 @@ hwbkpt_builder::build(systemtap_session & sess, + throw SEMANTIC_ERROR (_("CONFIG_HAVE_HW_BREAKPOINT not available on this kernel"), + location->components[0]->tok); + ++ // See BZ1431263 (on aarch64, running the hw_watch_addr.stp ++ // systemtap examples cause a stuck CPU). ++ if (sess.architecture == string("arm64")) ++ throw SEMANTIC_ERROR (_("kernel.data probes are not supported on arm64 kernels"), ++ location->components[0]->tok); ++ + has_addr = get_param (parameters, TOK_HWBKPT, hwbkpt_address); + has_symbol_str = get_param (parameters, TOK_HWBKPT, symbol_str_val); + has_len = get_param (parameters, TOK_LENGTH, len); diff --git a/SOURCES/bz1431263.3.patch b/SOURCES/bz1431263.3.patch new file mode 100644 index 0000000..90625bf --- /dev/null +++ b/SOURCES/bz1431263.3.patch @@ -0,0 +1,65 @@ +commit 5a540e9f35dd91d26ea342d5b53a1f2d52109f72 +Author: David Smith +Date: Mon Mar 27 10:32:50 2017 -0500 + + BZ1431263: Always use HW_BREAKPOINT_LEN_* macros. + + * tapsets.cxx (hwbkpt_derived_probe_group::emit_module_init): Always use + HW_BREAKPOINT_LEN_* macros, not just on x86_64. + +diff --git a/tapsets.cxx b/tapsets.cxx +index 9be2d04..ccd7cbb 100644 +--- a/tapsets.cxx ++++ b/tapsets.cxx +@@ -10305,31 +10305,26 @@ hwbkpt_derived_probe_group::emit_module_init (systemtap_session& s) + s.op->newline(-1) << "}"; + s.op->newline() << "hp->bp_type = skp->atype;"; + +- // On x86 & x86-64, hp->bp_len is not just a number but a macro/enum (!?!). +- if (s.architecture == "i386" || s.architecture == "x86_64" ) +- { +- s.op->newline() << "switch(skp->len) {"; +- s.op->newline() << "case 1:"; +- s.op->newline(1) << "hp->bp_len = HW_BREAKPOINT_LEN_1;"; +- s.op->newline() << "break;"; +- s.op->newline(-1) << "case 2:"; +- s.op->newline(1) << "hp->bp_len = HW_BREAKPOINT_LEN_2;"; +- s.op->newline() << "break;"; +- s.op->newline(-1) << "case 3:"; +- s.op->newline() << "case 4:"; +- s.op->newline(1) << "hp->bp_len = HW_BREAKPOINT_LEN_4;"; +- s.op->newline() << "break;"; +- s.op->newline(-1) << "case 5:"; +- s.op->newline() << "case 6:"; +- s.op->newline() << "case 7:"; +- s.op->newline() << "case 8:"; +- s.op->newline() << "default:"; // XXX: could instead reject +- s.op->newline(1) << "hp->bp_len = HW_BREAKPOINT_LEN_8;"; +- s.op->newline() << "break;"; +- s.op->newline(-1) << "}"; +- } +- else // other architectures presumed straightforward +- s.op->newline() << "hp->bp_len = skp->len;"; ++ // Convert actual len to bp len. ++ s.op->newline() << "switch(skp->len) {"; ++ s.op->newline() << "case 1:"; ++ s.op->newline(1) << "hp->bp_len = HW_BREAKPOINT_LEN_1;"; ++ s.op->newline() << "break;"; ++ s.op->newline(-1) << "case 2:"; ++ s.op->newline(1) << "hp->bp_len = HW_BREAKPOINT_LEN_2;"; ++ s.op->newline() << "break;"; ++ s.op->newline(-1) << "case 3:"; ++ s.op->newline() << "case 4:"; ++ s.op->newline(1) << "hp->bp_len = HW_BREAKPOINT_LEN_4;"; ++ s.op->newline() << "break;"; ++ s.op->newline(-1) << "case 5:"; ++ s.op->newline() << "case 6:"; ++ s.op->newline() << "case 7:"; ++ s.op->newline() << "case 8:"; ++ s.op->newline() << "default:"; // XXX: could instead reject ++ s.op->newline(1) << "hp->bp_len = HW_BREAKPOINT_LEN_8;"; ++ s.op->newline() << "break;"; ++ s.op->newline(-1) << "}"; + + s.op->newline() << "probe_point = skp->probe->pp;"; // for error messages + s.op->newline() << "#ifdef STAPCONF_HW_BREAKPOINT_CONTEXT"; diff --git a/SOURCES/bz1431263.4.patch b/SOURCES/bz1431263.4.patch new file mode 100644 index 0000000..504e1e7 --- /dev/null +++ b/SOURCES/bz1431263.4.patch @@ -0,0 +1,31 @@ +commit 77c4dcf7aa81f59532859783e4775143ebf17a23 +Author: David Smith +Date: Mon Mar 27 11:16:53 2017 -0500 + + BZ1431263: Remove "too many hardware breakpoint probes" warning. + + * tapsets.cxx (hwbkpt_derived_probe_group::enroll): Remove warning about + too many hardware breakpoint probes, since we can't really know how many + this system supports until we try to register them. + +diff --git a/tapsets.cxx b/tapsets.cxx +index ccd7cbb..c80e831 100644 +--- a/tapsets.cxx ++++ b/tapsets.cxx +@@ -10166,16 +10166,6 @@ void hwbkpt_derived_probe::join_group (systemtap_session& s) + void hwbkpt_derived_probe_group::enroll (hwbkpt_derived_probe* p, systemtap_session& s) + { + hwbkpt_probes.push_back (p); +- +- unsigned max_hwbkpt_probes_by_arch = 0; +- if (s.architecture == "i386" || s.architecture == "x86_64") +- max_hwbkpt_probes_by_arch = 4; +- else if (s.architecture == "s390") +- max_hwbkpt_probes_by_arch = 1; +- +- if (hwbkpt_probes.size() >= max_hwbkpt_probes_by_arch) +- s.print_warning (_F("Too many hardware breakpoint probes requested for %s (%zu vs. %u)", +- s.architecture.c_str(), hwbkpt_probes.size(), max_hwbkpt_probes_by_arch)); + } + + void diff --git a/SOURCES/bz1431263.5.patch b/SOURCES/bz1431263.5.patch new file mode 100644 index 0000000..bf02b0f --- /dev/null +++ b/SOURCES/bz1431263.5.patch @@ -0,0 +1,21 @@ +commit 5177a6c84d9378d705755844dc5f2b212de49a8c +Author: David Smith +Date: Mon Mar 27 11:36:42 2017 -0500 + + Fix BZ1431263 commit by removing unused arg. + + * tapsets.cxx (enroll): Remove unused systemtap_session argument. + +diff --git a/tapsets.cxx b/tapsets.cxx +index c80e831..2274ae6 100644 +--- a/tapsets.cxx ++++ b/tapsets.cxx +@@ -10163,7 +10163,7 @@ void hwbkpt_derived_probe::join_group (systemtap_session& s) + this->group = s.hwbkpt_derived_probes; + } + +-void hwbkpt_derived_probe_group::enroll (hwbkpt_derived_probe* p, systemtap_session& s) ++void hwbkpt_derived_probe_group::enroll (hwbkpt_derived_probe* p, systemtap_session&) + { + hwbkpt_probes.push_back (p); + } diff --git a/SOURCES/bz1433391.patch b/SOURCES/bz1433391.patch new file mode 100644 index 0000000..0a93018 --- /dev/null +++ b/SOURCES/bz1433391.patch @@ -0,0 +1,58 @@ +commit 9989c537437c3cfffae61e33bbe4fe60ac1c7eed +Author: David Smith +Date: Tue Mar 28 16:36:30 2017 -0500 + + Workaround parser issue in nfs_proc.stp. + + * tapset/linux/nfs_proc.stp (nfs.proc3.read_done): To avoid parser issues, + split up @choose_defined() code into two separate if statements. Note + that this is a workaround until we can fix the parser issue. + (nfs.proc4.read_done): Ditto. + +diff --git a/tapset/linux/nfs_proc.stp b/tapset/linux/nfs_proc.stp +index 2c0bd8d..140e643 100644 +--- a/tapset/linux/nfs_proc.stp ++++ b/tapset/linux/nfs_proc.stp +@@ -889,10 +889,15 @@ probe nfs.proc3.read_done = kernel.function("nfs3_read_done") !, + module("nfs").function("nfs3_read_done") ?, + module("nfsv3").function("nfs3_read_done") ? + { +- if (@defined($hdr) || @defined($data)) { # kernels >= 2.6.10 +- server_ip = @_nfs_data_server_ip(@choose_defined($hdr, $data)) +- prot = @_nfs_data_prot(@choose_defined($hdr, $data)) +- count = @_nfs_data_res_count(@choose_defined($hdr, $data)) ++ if (@defined($hdr)) { # kernels >= 3.17 ++ server_ip = @_nfs_data_server_ip($hdr) ++ prot = @_nfs_data_prot($hdr) ++ count = @_nfs_data_res_count($hdr) ++ } ++ else if (@defined($data)) { # kernels >= 2.6.10 ++ server_ip = @_nfs_data_server_ip($data) ++ prot = @_nfs_data_prot($data) ++ count = @_nfs_data_res_count($data) + } + else { + server_ip = @_nfs_data_server_ip($task->tk_calldata) +@@ -923,11 +928,17 @@ probe nfs.proc4.read_done = kernel.function("nfs4_read_done") !, + module("nfs").function("nfs4_read_done") ?, + module("nfsv4").function("nfs4_read_done") ? + { +- if (@defined($hdr) || @defined($data)) { # kernels >= 2.6.10 +- server_ip = @_nfs_data_server_ip(@choose_defined($hdr, $data)) +- prot = @_nfs_data_prot(@choose_defined($hdr, $data)) +- count = @_nfs_data_res_count(@choose_defined($hdr, $data)) +- timestamp = @_nfs_data_timestamp(@choose_defined($hdr, $data)) ++ if (@defined($hdr)) { # kernels >= 3.17 ++ server_ip = @_nfs_data_server_ip($hdr) ++ prot = @_nfs_data_prot($hdr) ++ count = @_nfs_data_res_count($hdr) ++ timestamp = @_nfs_data_timestamp($hdr) ++ } ++ else if (@defined($data)) { # kernels >= 2.6.10 ++ server_ip = @_nfs_data_server_ip($data) ++ prot = @_nfs_data_prot($data) ++ count = @_nfs_data_res_count($data) ++ timestamp = @_nfs_data_timestamp($data) + } + else { + server_ip = @_nfs_data_server_ip($task->tk_calldata) diff --git a/SOURCES/bz1436845.patch b/SOURCES/bz1436845.patch new file mode 100644 index 0000000..2c2f5f2 --- /dev/null +++ b/SOURCES/bz1436845.patch @@ -0,0 +1,95 @@ +commit 438b5a402b6a93dd426f8c18de6fe3708c265328 +Author: Stan Cox +Date: Tue Mar 28 14:39:14 2017 -0400 + + Adapt stapdyn to the dyninst 9.3.1 library search model. + + stapdyn/dynutil.cxx (check_dyninst_rt): Use DYNINST_REWRITER_PATHS + and appendenv + + util.c, util.h: New: appendenv. + +diff --git a/stapdyn/dynutil.cxx b/stapdyn/dynutil.cxx +index cd2ae11..47a1e91 100644 +--- a/stapdyn/dynutil.cxx ++++ b/stapdyn/dynutil.cxx +@@ -61,17 +61,28 @@ guess_dyninst_rt(void) + return libdyninstAPI_RT; + } + ++ + // Check that environment DYNINSTAPI_RT_LIB exists and is a valid file. + // If not, try to guess a good value and set it. + bool + check_dyninst_rt(void) + { + static const char rt_env_name[] = "DYNINSTAPI_RT_LIB"; +- const char* rt_env = getenv(rt_env_name); ++ static const char dyn_rw_env_name[] = "DYNINST_REWRITER_PATHS"; ++ ++ char* rt_env = getenv(rt_env_name); + if (rt_env) + { + if (file_exists(rt_env)) +- return true; ++ { ++ if (appendenv(dyn_rw_env_name, rt_env) != 0) ++ { ++ int olderrno = errno; ++ staperror() << "Can't set " << dyn_rw_env_name << ": " << strerror(olderrno); ++ return false; ++ } ++ return true; ++ } + staperror() << "Invalid " << rt_env_name << ": \"" << rt_env << "\"" << endl; + } + +@@ -82,7 +93,7 @@ check_dyninst_rt(void) + return false; + } + +- if (setenv(rt_env_name, rt.c_str(), 1) != 0) ++ if (appendenv(dyn_rw_env_name, rt) != 0) + { + int olderrno = errno; + staperror() << "Can't set " << rt_env_name << ": " << strerror(olderrno); +diff --git a/util.cxx b/util.cxx +index a1c8363..9157fb9 100644 +--- a/util.cxx ++++ b/util.cxx +@@ -228,6 +228,23 @@ remove_file_or_dir (const char *name) + return 0; + } + ++ ++int ++appendenv (const char *env_name, const string source) ++{ ++ string dirname = source.substr(0, source.rfind("/")); ++ char *env = getenv(env_name); ++ string new_env; ++ ++ if (env) ++ new_env = string (env) + ":" + dirname; ++ else ++ new_env = dirname; ++ ++ return setenv(env_name, new_env.c_str(), 1); ++} ++ ++ + /* Obtain the gid of the given group. */ + gid_t get_gid (const char *group_name) + { +diff --git a/util.h b/util.h +index d7e0cfb..482f719 100644 +--- a/util.h ++++ b/util.h +@@ -77,6 +77,7 @@ bool copy_file(const std::string& src, const std::string& dest, + int create_dir(const char *dir, int mode = 0777); + int remove_file_or_dir(const char *dir); + extern "C" gid_t get_gid (const char *group_name); ++int appendenv (const char *env_name, const std::string source); + bool in_group_id (gid_t target_gid); + std::string getmemusage (); + void tokenize(const std::string& str, std::vector& tokens, diff --git a/SOURCES/bz1448099.1.patch b/SOURCES/bz1448099.1.patch new file mode 100644 index 0000000..79c6f13 --- /dev/null +++ b/SOURCES/bz1448099.1.patch @@ -0,0 +1,55 @@ +commit 62640f2ed0deef9355970d216136ad4c49afa3d0 +Author: David Smith +Date: Fri Mar 17 09:36:42 2017 -0500 + + PR21255: Fix missing get_task_mm() declaration. + + * buildrun.cxx (compile_pass): Add autoconf test. This + was caused by the following kernel commit: + + commit 6e84f31522f931027bf695752087ece278c10d3f + Author: Ingo Molnar + Date: Wed Feb 8 18:51:29 2017 +0100 + + sched/headers: Prepare for new header dependencies before moving + code to + * runtime/linux/access_process_vm.h: Include and, if it + exists, . + * 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 ++#ifdef STAPCONF_SCHED_MM_H ++#include ++#endif + #include + #include + +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 ++#include ++ diff --git a/SOURCES/bz1448099.2.patch b/SOURCES/bz1448099.2.patch new file mode 100644 index 0000000..03f203f --- /dev/null +++ b/SOURCES/bz1448099.2.patch @@ -0,0 +1,37 @@ +commit a477a43122609691ce6ef24f71114cfaa9790392 +Author: David Smith +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; diff --git a/SOURCES/bz1448099.3.patch b/SOURCES/bz1448099.3.patch new file mode 100644 index 0000000..acf2f3d --- /dev/null +++ b/SOURCES/bz1448099.3.patch @@ -0,0 +1,42 @@ +commit 030e9465eadf7d3b3a278951264dac83b2f4b4f7 +Author: David Smith +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) diff --git a/SOURCES/bz1448099.4.patch b/SOURCES/bz1448099.4.patch new file mode 100644 index 0000000..158f309 --- /dev/null +++ b/SOURCES/bz1448099.4.patch @@ -0,0 +1,43 @@ +commit 5ab0c875df5011725f9cd2f0804c00bf9e63d492 +Author: David Smith +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 + } diff --git a/SOURCES/bz1448099.5.patch b/SOURCES/bz1448099.5.patch new file mode 100644 index 0000000..72a57ed --- /dev/null +++ b/SOURCES/bz1448099.5.patch @@ -0,0 +1,72 @@ +commit 386b8596d721e93ad618e682ecddb323d2bee446 +Author: David Smith +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) + } diff --git a/SOURCES/bz1448099.6.patch b/SOURCES/bz1448099.6.patch new file mode 100644 index 0000000..a781eba --- /dev/null +++ b/SOURCES/bz1448099.6.patch @@ -0,0 +1,48 @@ +commit 9f1c7a872e7a13d1ee29b692d0f1f4dd18a07baa +Author: David Smith +Date: Tue May 9 16:20:41 2017 -0500 + + Avoid missing "task_stack()" definition on 4.11 kernels. + + * runtime/compatdefs.h: If exists, include + it. This avoids a missing task_stack() definition. + * buildrun.cxx (compile_pass): Add autoconf test for + . + * 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 + #include ++#include ++#ifdef STAPCONF_SCHED_TASK_STACK_H ++#include ++#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 ++#include ++ diff --git a/SOURCES/bz1448099.7.1.patch b/SOURCES/bz1448099.7.1.patch new file mode 100644 index 0000000..96d1db5 --- /dev/null +++ b/SOURCES/bz1448099.7.1.patch @@ -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 diff --git a/SOURCES/bz1448099.7.patch b/SOURCES/bz1448099.7.patch new file mode 100644 index 0000000..c2757a8 --- /dev/null +++ b/SOURCES/bz1448099.7.patch @@ -0,0 +1,142 @@ +commit c7029a89f5f1ff6d6a7008e8bccb797046f8af50 +Author: David Smith +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 + * 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") ++ %: + @cast(@ptr, "mm_struct", "kernel") ++ %) + %) diff --git a/SOURCES/bz1448099.8.patch b/SOURCES/bz1448099.8.patch new file mode 100644 index 0000000..45c8a72 --- /dev/null +++ b/SOURCES/bz1448099.8.patch @@ -0,0 +1,65 @@ +commit 35ea394c93d3c296c0c809d21bc397b531b7e965 +Author: David Smith +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 { diff --git a/SPECS/systemtap.spec b/SPECS/systemtap.spec new file mode 100644 index 0000000..21b4696 --- /dev/null +++ b/SPECS/systemtap.spec @@ -0,0 +1,1514 @@ +%{!?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} 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 +%{!?with_dyninst: %global with_dyninst 0%{?fedora} >= 18 || 0%{?rhel} >= 7} +%else +%{!?with_dyninst: %global with_dyninst 0} +%endif +%{!?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} +%{!?with_virthost: %global with_virthost 0%{?fedora} >= 19 || 0%{?rhel} >= 7} +%{!?with_virtguest: %global with_virtguest 1} +%{!?with_dracut: %global with_dracut 0%{?fedora} >= 19 || 0%{?rhel} >= 6} +%ifarch x86_64 +%{!?with_mokutil: %global with_mokutil 0%{?fedora} >= 18 || 0%{?rhel} >= 7} +%{!?with_openssl: %global with_openssl 0%{?fedora} >= 18 || 0%{?rhel} >= 7} +%else +%{!?with_mokutil: %global with_mokutil 0} +%{!?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} +%{!?with_python2_probes: %global with_python2_probes 1} +%{!?with_python3_probes: %global with_python3_probes 0%{?fedora} >= 23} + +%ifarch ppc64le aarch64 +%global with_virthost 0 +%endif + +%if 0%{?fedora} >= 18 || 0%{?rhel} >= 6 + %define initdir %{_initddir} +%else # RHEL5 doesn't know _initddir + %define initdir %{_initrddir} +%endif + +%if %{with_virtguest} + %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 + %define udevrulesdir /usr/lib/udev/rules.d + %else + %if 0%{?rhel} >= 6 + %define udevrulesdir /lib/udev/rules.d + %else # RHEL5 + %define udevrulesdir /etc/udev/rules.d + %endif + %endif +%endif + +%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 + %define dracutstap %{_prefix}/lib/dracut/modules.d/99stap +%else + %define dracutstap %{_prefix}/share/dracut/modules.d/99stap +%endif + +%if 0%{?rhel} >= 6 + %define dracutbindir /sbin +%else + %define dracutbindir %{_bindir} +%endif + +Name: systemtap +Version: 3.1 +Release: 5%{?dist} +# for version, see also configure.ac + + +# Packaging abstract: +# +# systemtap empty req:-client req:-devel +# systemtap-server /usr/bin/stap-server*, req:-devel +# systemtap-devel /usr/bin/stap, runtime, tapset, req:kernel-devel +# systemtap-runtime /usr/bin/staprun, /usr/bin/stapsh, /usr/bin/stapdyn +# systemtap-client /usr/bin/stap, samples, docs, tapset(bonus), req:-runtime +# systemtap-initscript /etc/init.d/systemtap, dracut module, req:systemtap +# systemtap-sdt-devel /usr/include/sys/sdt.h /usr/bin/dtrace +# systemtap-testsuite /usr/share/systemtap/testsuite*, req:systemtap, req:sdt-devel +# systemtap-runtime-java libHelperSDT.so, HelperSDT.jar, stapbm, req:-runtime +# systemtap-runtime-virthost /usr/bin/stapvirt, req:libvirt req:libxml2 +# systemtap-runtime-virtguest udev rules, init scripts/systemd service, req:-runtime +# systemtap-runtime-python2 HelperSDT python2 module, req:-runtime +# systemtap-runtime-python3 HelperSDT python3 module, req:-runtime +# +# Typical scenarios: +# +# stap-client: systemtap-client +# stap-server: systemtap-server +# local user: systemtap +# +# Unusual scenarios: +# +# intermediary stap-client for --remote: systemtap-client (-runtime unused) +# 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: ftp://sourceware.org/pub/systemtap/releases/systemtap-%{version}.tar.gz + +# Build* +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: gcc-c++ +BuildRequires: gettext-devel +BuildRequires: pkgconfig(nss) +BuildRequires: pkgconfig(avahi-client) +%if %{with_dyninst} +BuildRequires: dyninst-devel >= 8.0 +BuildRequires: pkgconfig(libselinux) +%endif +%if %{with_sqlite} +BuildRequires: sqlite-devel +%endif +%if %{with_monitor} +BuildRequires: pkgconfig(json-c) +BuildRequires: pkgconfig(ncurses) +%endif +%if %{with_systemd} +BuildRequires: systemd +%endif +# Needed for libstd++ < 4.0, without +%if %{with_boost} +BuildRequires: boost-devel +%endif +%if %{with_crash} +BuildRequires: crash-devel zlib-devel +%endif +%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 +BuildRequires: tex(fullpage.sty) tex(fancybox.sty) tex(bchr7t.tfm) tex(graphicx.sty) +%endif +# For the html.sty mentioned in the .tex files, even though latex2html is +# not run during the build, only during manual scripts/update-docs runs: +BuildRequires: latex2html +%if %{with_htmldocs} +# On F10, xmlto's pdf support was broken off into a sub-package, +# called 'xmlto-tex'. To avoid a specific F10 BuildReq, we'll do a +# file-based buildreq on '/usr/share/xmlto/format/fo/pdf'. +BuildRequires: xmlto /usr/share/xmlto/format/fo/pdf +%endif +%endif +%if %{with_emacsvim} +BuildRequires: emacs +%endif +%if %{with_java} +BuildRequires: jpackage-utils java-devel +%endif +%if %{with_virthost} +# BuildRequires: libvirt-devel >= 1.0.2 +BuildRequires: pkgconfig(libvirt) +BuildRequires: pkgconfig(libxml-2.0) +%endif +BuildRequires: readline-devel +%if 0%{?rhel} <= 5 +BuildRequires: pkgconfig(ncurses) +%endif +%if %{with_python2_probes} +BuildRequires: python-devel +BuildRequires: python-setuptools +%endif +%if %{with_python3_probes} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +%endif + +Patch10: bz1428120.patch +Patch11: bz1425568.1.patch +Patch12: bz1425568.2.patch +Patch13: bz1431263.1.patch +Patch14: bz1431263.2.patch +Patch15: bz1431263.3.patch +Patch16: bz1431263.4.patch +Patch17: bz1431263.5.patch +Patch18: bz1430828.patch +Patch19: bz1433391.patch +Patch20: bz1436845.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} +Requires: systemtap-devel = %{version}-%{release} + +%description +SystemTap is an instrumentation system for systems running Linux. +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 server +Summary: Instrumentation System Server +Group: Development/System +License: GPLv2+ +URL: http://sourceware.org/systemtap/ +Requires: systemtap-devel = %{version}-%{release} +# 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 +%endif + +%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 devel +Summary: Programmable system-wide instrumentation system - development headers, tools +Group: Development/System +License: GPLv2+ +URL: http://sourceware.org/systemtap/ +# 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 +%{?fedora:Suggests: kernel-devel} +Requires: gcc make +# Suggest: kernel-debuginfo + +%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 +Summary: Programmable system-wide instrumentation system - runtime +Group: Development/System +License: GPLv2+ +URL: http://sourceware.org/systemtap/ +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 +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 +%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 initscript +Summary: Systemtap Initscripts +Group: Development/System +License: GPLv2+ +URL: http://sourceware.org/systemtap/ +Requires: systemtap = %{version}-%{release} +Requires(post): chkconfig +Requires(preun): chkconfig +Requires(preun): initscripts +Requires(postun): initscripts + +%description initscript +This package includes a SysVinit script to launch selected systemtap +scripts at system startup, along with a dracut module for early +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 +Requires: pyparsing +%endif +%endif + +%description sdt-devel +This package includes the 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 +Group: Development/System +License: GPLv2+ +URL: http://sourceware.org/systemtap/ +Requires: systemtap = %{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 +# testsuite/systemtap.base/ptrace.exp needs strace +Requires: strace +# testsuite/systemtap.base/ipaddr.exp needs nc. Unfortunately, the rpm +# that provides nc has changed over time (from 'nc' to +# 'nmap-ncat'). So, we'll do a file-based require. +Requires: /usr/bin/nc +%ifnarch ia64 ppc64le aarch64 +%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8 +# no prelink +%else +Requires: prelink +%endif +%endif +# testsuite/systemtap.server/client.exp needs avahi +Requires: avahi +%if %{with_crash} +# testsuite/systemtap.base/crash.exp needs crash +Requires: crash +%endif +%if %{with_java} +Requires: systemtap-runtime-java = %{version}-%{release} +%endif +%if %{with_python2_probes} +Requires: systemtap-runtime-python2 = %{version}-%{release} +%endif +%if %{with_python3_probes} +Requires: systemtap-runtime-python3 = %{version}-%{release} +%endif +%ifarch x86_64 +Requires: /usr/lib/libc.so +# ... and /usr/lib/libgcc_s.so.* +# ... and /usr/lib/libstdc++.so.* +%endif +%if 0%{?fedora} >= 18 +Requires: stress +%endif +# The following "meta" files for the systemtap examples run "perf": +# testsuite/systemtap.examples/hw_watch_addr.meta +# testsuite/systemtap.examples/memory/hw_watch_sym.meta +Requires: perf + +%description testsuite +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. + + +%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: net-tools + +%description runtime-java +This package includes support files needed to run systemtap scripts +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} + +%description runtime-python2 +This package includes support files needed to run systemtap scripts +that probe python 2 processes. +%endif + +%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} + +%description runtime-python3 +This package includes support files needed to run systemtap scripts +that probe python 3 processes. +%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 +Requires: libxml2 + +%description runtime-virthost +This package includes the components required to run systemtap scripts +inside a libvirt-managed domain from the host without using a network +connection. +%endif + +%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} +%if %{with_systemd} +Requires(post): findutils coreutils +Requires(preun): grep coreutils +Requires(postun): grep coreutils +%else +Requires(post): chkconfig initscripts +Requires(preun): chkconfig initscripts +Requires(postun): initscripts +%endif + +%description runtime-virtguest +This package installs the services necessary on a virtual machine for a +systemtap-runtime-virthost machine to execute systemtap scripts. +%endif + +# ------------------------------------------------------------------------ + +%prep +%setup -q %{?setup_elfutils} + +%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 + +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 +%patch18 -p1 +%patch19 -p1 +%patch20 -p1 +%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 +%else +%global dyninst_config --without-dyninst +%endif + +# Enable/disable the sqlite coverage testing support +%if %{with_sqlite} +%global sqlite_config --enable-sqlite +%else +%global sqlite_config --disable-sqlite +%endif + +# Enable/disable the crash extension +%if %{with_crash} +%global crash_config --enable-crash +%else +%global crash_config --disable-crash +%endif + +# Enable/disable the code to find and suggest needed rpms +%if %{with_rpm} +%global rpm_config --with-rpm +%else +%global rpm_config --without-rpm +%endif + +%if %{with_docs} +%if %{with_htmldocs} +%global docs_config --enable-docs --enable-htmldocs +%else +%global docs_config --enable-docs --disable-htmldocs +%endif +%else +%global docs_config --disable-docs +%endif + +# Enable pie as configure defaults to disabling it +%if %{pie_supported} +%global pie_config --enable-pie +%else +%global pie_config --disable-pie +%endif + + +%if %{with_java} +%global java_config --with-java=%{_jvmdir}/java +%else +%global java_config --without-java +%endif + +%if %{with_python3} +%global python3_config --with-python3 +%else +%global python3_config --without-python3 +%endif +%if %{with_python2_probes} +%global python2_probes_config --with-python2-probes +%else +%global python2_probes_config --without-python2-probes +%endif +%if %{with_python3_probes} +%global python3_probes_config --with-python3-probes +%else +%global python3_probes_config --without-python3-probes +%endif + +%if %{with_virthost} +%global virt_config --enable-virt +%else +%global virt_config --disable-virt +%endif + +%if %{with_dracut} +%global dracut_config --with-dracutstap=%{dracutstap} --with-dracutbindir=%{dracutbindir} +%else +%global dracut_config %{nil} +%endif + +# We don't ship compileworthy python code, just oddball samples +%global py_auto_byte_compile 0 + +%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 + dir=$(echo $dir | sed -e "s|^$RPM_BUILD_ROOT||") + lang=$(basename $dir) + echo "%%lang($lang) $dir/man*/*" >> %{name}.lang +done + +ln -s %{_datadir}/systemtap/examples + +# Fix paths in the example scripts. +find $RPM_BUILD_ROOT%{_datadir}/systemtap/examples -type f -name '*.stp' -print0 | xargs -0 sed -i -r -e '1s@^#!.+stap@#!%{_bindir}/stap@' + +# To make rpmlint happy, remove any .gitignore files in the testsuite. +find testsuite -type f -name '.gitignore' -print0 | xargs -0 rm -f + +# Because "make install" may install staprun with whatever mode, the +# post-processing programs rpmbuild runs won't be able to read it. +# So, we change permissions so that they can read it. We'll set the +# permissions back to 04110 in the %files section below. +chmod 755 $RPM_BUILD_ROOT%{_bindir}/staprun + +#install the useful stap-prep script +install -c -m 755 stap-prep $RPM_BUILD_ROOT%{_bindir}/stap-prep + +# Copy over the testsuite +cp -rp testsuite $RPM_BUILD_ROOT%{_datadir}/systemtap + +%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_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 + +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%{initdir} +install -m 755 initscript/systemtap $RPM_BUILD_ROOT%{initdir} +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 +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 +%else +install -m 755 initscript/stap-server $RPM_BUILD_ROOT%{initdir} +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/stap-server/conf.d +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig +install -m 644 initscript/config.stap-server $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/stap-server +%endif + +%if %{with_emacsvim} +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 +%endif + +%if %{with_virtguest} + mkdir -p $RPM_BUILD_ROOT%{udevrulesdir} + %if %{with_systemd} + install -p -m 644 staprun/guest/99-stapsh.rules $RPM_BUILD_ROOT%{udevrulesdir} + mkdir -p $RPM_BUILD_ROOT%{_unitdir} + install -p -m 644 staprun/guest/stapsh@.service $RPM_BUILD_ROOT%{_unitdir} + %else + install -p -m 644 staprun/guest/99-stapsh-init.rules $RPM_BUILD_ROOT%{udevrulesdir} + install -p -m 755 staprun/guest/stapshd $RPM_BUILD_ROOT%{initdir} + mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/systemtap + install -p -m 755 staprun/guest/stapsh-daemon $RPM_BUILD_ROOT%{_libexecdir}/systemtap + mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules + # Technically, this is only needed for RHEL5, in which the MODULE_ALIAS is missing, but + # it does no harm in RHEL6 as well + install -p -m 755 staprun/guest/virtio_console.modules $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules + %endif +%endif + +%if %{with_dracut} + mkdir -p $RPM_BUILD_ROOT%{dracutstap} + 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 +%endif + +%clean +rm -rf ${RPM_BUILD_ROOT} + +%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 + +%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 + +%post server + +# We have some duplication between the %files listings for the +# ~stap-server directories and the explicit mkdir/chown/chmod bits +# here. Part of the reason may be that a preexisting stap-server +# account may well be placed somewhere other than +# %{_localstatedir}/lib/stap-server, but we'd like their permissions +# set similarly. + +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 + # PR16276: guess at a reasonable number for a default --rlimit-nproc + 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 %{_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 +} +# Prepare the service +%if %{with_systemd} + # Note, Fedora policy doesn't allow network services enabled by default + # /bin/systemctl enable stap-server.service >/dev/null 2>&1 || : + /bin/systemd-tmpfiles --create %{_tmpfilesdir}/stap-server.conf >/dev/null 2>&1 || : +%else + /sbin/chkconfig --add stap-server +%endif +exit 0 + +%triggerin client -- systemtap-server +if test -e ~stap-server/.systemtap/ssl/server/stap.cert; then + # echo Authorizing ssl-peer/trusted-signer certificate for local systemtap-server + %{_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 +# XXX: corresponding %triggerun? + +%preun server +# Check that this is the actual deinstallation of the package, as opposed to +# just removing the old package on upgrade. +if [ $1 = 0 ] ; then + %if %{with_systemd} + /bin/systemctl --no-reload disable stap-server.service >/dev/null 2>&1 || : + /bin/systemctl stop stap-server.service >/dev/null 2>&1 || : + %else + /sbin/service stap-server stop >/dev/null 2>&1 + /sbin/chkconfig --del stap-server + %endif +fi +exit 0 + +%postun server +# Check whether this is an upgrade of the package. +# If so, restart the service if it's running +if [ "$1" -ge "1" ] ; then + %if %{with_systemd} + /bin/systemctl condrestart stap-server.service >/dev/null 2>&1 || : + %else + /sbin/service stap-server condrestart >/dev/null 2>&1 || : + %endif +fi +exit 0 + +%post initscript +%if %{with_systemd} + /bin/systemctl enable systemtap.service >/dev/null 2>&1 || : +%else + /sbin/chkconfig --add systemtap +%endif +exit 0 + +%preun initscript +# Check that this is the actual deinstallation of the package, as opposed to +# just removing the old package on upgrade. +if [ $1 = 0 ] ; then + %if %{with_systemd} + /bin/systemctl --no-reload disable systemtap.service >/dev/null 2>&1 || : + /bin/systemctl stop systemtap.service >/dev/null 2>&1 || : + %else + /sbin/service systemtap stop >/dev/null 2>&1 + /sbin/chkconfig --del systemtap + %endif +fi +exit 0 + +%postun initscript +# Check whether this is an upgrade of the package. +# If so, restart the service if it's running +if [ "$1" -ge "1" ] ; then + %if %{with_systemd} + /bin/systemctl condrestart systemtap.service >/dev/null 2>&1 || : + %else + /sbin/service systemtap condrestart >/dev/null 2>&1 || : + %endif +fi +exit 0 + +%post runtime-virtguest +%if %{with_systemd} + # Start services if there are ports present + 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 +%else + /sbin/chkconfig --add stapshd + /sbin/chkconfig stapshd on + /sbin/service stapshd start >/dev/null 2>&1 || : +%endif +exit 0 + +%preun runtime-virtguest +# Stop service if this is an uninstall rather than an upgrade +if [ $1 = 0 ]; then + %if %{with_systemd} + # We need to stop all stapsh services. Because they are instantiated from + # a template service file, we can't simply call disable. We need to find + # all the running ones and stop them all individually + for service in `/bin/systemctl --full | grep stapsh@ | cut -d ' ' -f 1`; do + /bin/systemctl stop $service >/dev/null 2>&1 || : + done + %else + /sbin/service stapshd stop >/dev/null 2>&1 + /sbin/chkconfig --del stapshd + %endif +fi +exit 0 + +%postun runtime-virtguest +# Restart service if this is an upgrade rather than an uninstall +if [ "$1" -ge "1" ]; then + %if %{with_systemd} + # We need to restart all stapsh services. Because they are instantiated from + # a template service file, we can't simply call restart. We need to find + # all the running ones and restart them all individually + for service in `/bin/systemctl --full | grep stapsh@ | cut -d ' ' -f 1`; do + /bin/systemctl condrestart $service >/dev/null 2>&1 || : + done + %else + /sbin/service stapshd condrestart >/dev/null 2>&1 + %endif +fi +exit 0 + +%post +# Remove any previously-built uprobes.ko materials +(make -C %{_datadir}/systemtap/runtime/uprobes clean) >/dev/null 2>&1 || true +(/sbin/rmmod uprobes) >/dev/null 2>&1 || true + +%preun +# Ditto +(make -C %{_datadir}/systemtap/runtime/uprobes clean) >/dev/null 2>&1 || true +(/sbin/rmmod uprobes) >/dev/null 2>&1 || true + +# ------------------------------------------------------------------------ + +%if %{with_java} + +%triggerin runtime-java -- java-1.8.0-openjdk, java-1.7.0-openjdk, java-1.6.0-openjdk +for f in %{_libexecdir}/systemtap/libHelperSDT_*.so; do + %ifarch %{ix86} + arch=i386 + %else + arch=`basename $f | cut -f2 -d_ | cut -f1 -d.` + %endif + 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 + +%triggerun runtime-java -- java-1.8.0-openjdk, java-1.7.0-openjdk, java-1.6.0-openjdk +for f in %{_libexecdir}/systemtap/libHelperSDT_*.so; do + %ifarch %{ix86} + arch=i386 + %else + arch=`basename $f | cut -f2 -d_ | cut -f1 -d.` + %endif + for archdir in %{_jvmdir}/*openjdk*/jre/lib/${arch}; do + rm -f ${archdir}/libHelperSDT_${arch}.so + rm -f ${archdir}/../ext/HelperSDT.jar + done +done + +%triggerpostun runtime-java -- java-1.8.0-openjdk, java-1.7.0-openjdk, java-1.6.0-openjdk +# Restore links for any JDKs remaining after a package removal: +for f in %{_libexecdir}/systemtap/libHelperSDT_*.so; do + %ifarch %{ix86} + arch=i386 + %else + arch=`basename $f | cut -f2 -d_ | cut -f1 -d.` + %endif + 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 + +# XXX: analogous support for other types of JRE/JDK?? + +%endif + +# ------------------------------------------------------------------------ + +%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 +%{_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 +%{_mandir}/man7/error* +%{_mandir}/man7/stappaths.7* +%{_mandir}/man7/warning* +%{_mandir}/man8/stap-server.8* +%if %{with_systemd} +%{_unitdir}/stap-server.service +%{_tmpfilesdir}/stap-server.conf +%else +%{initdir}/stap-server +%dir %{_sysconfdir}/stap-server/conf.d +%config(noreplace) %{_sysconfdir}/sysconfig/stap-server +%endif +%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 +%doc README README.unprivileged AUTHORS NEWS +%{!?_licensedir:%global license %%doc} +%license COPYING + + +%files devel -f systemtap.lang +%{_bindir}/stap +%{_bindir}/stap-prep +%{_bindir}/stap-report +%dir %{_datadir}/systemtap +%{_datadir}/systemtap/runtime +%{_datadir}/systemtap/tapset +%{_mandir}/man1/stap.1* +%{_mandir}/man1/stap-prep.1* +%{_mandir}/man1/stap-report.1* +%{_mandir}/man7/error* +%{_mandir}/man7/stappaths.7* +%{_mandir}/man7/warning* +%doc README README.unprivileged AUTHORS NEWS +%{!?_licensedir:%global license %%doc} +%license COPYING +%if %{with_java} +%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 +%{_datadir}/vim/vimfiles/*/*.vim +%endif +# Notice that the stap-resolve-module-function.py file is used by +# *both* the python2 and python3 subrpms. Both subrpms use that same +# python script to help list python probes. +%if %{with_python3_probes} || %{with_python2_probes} +%{_libexecdir}/systemtap/python/stap-resolve-module-function.py +%exclude %{_libexecdir}/systemtap/python/stap-resolve-module-function.py? +%endif + + +%files runtime -f systemtap.lang +%defattr(-,root,root) +%attr(4110,root,stapusr) %{_bindir}/staprun +%{_bindir}/stapsh +%{_bindir}/stap-merge +%{_bindir}/stap-report +%if %{with_dyninst} +%{_bindir}/stapdyn +%endif +%dir %{_libexecdir}/systemtap +%{_libexecdir}/systemtap/stapio +%{_libexecdir}/systemtap/stap-authorize-cert +%if %{with_crash} +%dir %{_libdir}/systemtap +%{_libdir}/systemtap/staplog.so* +%endif +%{_mandir}/man1/stap-report.1* +%{_mandir}/man7/error* +%{_mandir}/man7/stappaths.7* +%{_mandir}/man7/warning* +%{_mandir}/man8/stapsh.8* +%{_mandir}/man8/staprun.8* +%if %{with_dyninst} +%{_mandir}/man8/stapdyn.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 +%if %{with_docs} +%doc docs.installed/*.pdf +%if %{with_htmldocs} +%doc docs.installed/tapsets/*.html +%doc docs.installed/SystemTap_Beginners_Guide +%endif +%endif +%{_bindir}/stap +%{_bindir}/stap-prep +%{_bindir}/stap-report +%{_mandir}/man1/stap.1* +%{_mandir}/man1/stap-prep.1* +%{_mandir}/man1/stap-merge.1* +%{_mandir}/man1/stap-report.1* +%{_mandir}/man1/stapref.1* +%{_mandir}/man3/* +%{_mandir}/man7/error* +%{_mandir}/man7/stappaths.7* +%{_mandir}/man7/warning* +%dir %{_datadir}/systemtap +%{_datadir}/systemtap/tapset + + + +%files initscript +%defattr(-,root,root) +%{initdir}/systemtap +%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.8* +%if %{with_dracut} + %dir %{dracutstap} + %{dracutstap}/* +%endif + + +%files sdt-devel +%defattr(-,root,root) +%{_bindir}/dtrace +%{_includedir}/sys/sdt.h +%{_includedir}/sys/sdt-config.h +%{_mandir}/man1/dtrace.1* +%doc README AUTHORS NEWS +%{!?_licensedir:%global license %%doc} +%license COPYING + + +%files testsuite +%defattr(-,root,root) +%dir %{_datadir}/systemtap +%{_datadir}/systemtap/testsuite + + +%if %{with_java} +%files runtime-java +%dir %{_libexecdir}/systemtap +%{_libexecdir}/systemtap/libHelperSDT_*.so +%{_libexecdir}/systemtap/HelperSDT.jar +%{_libexecdir}/systemtap/stapbm +%endif + +%if %{with_python2_probes} +%files runtime-python2 +%{python_sitearch}/HelperSDT +%{python_sitearch}/HelperSDT-*.egg-info +%endif +%if %{with_python3_probes} +%files runtime-python3 +%{python3_sitearch}/HelperSDT +%{python3_sitearch}/HelperSDT-*.egg-info +%endif + +%if %{with_virthost} +%files runtime-virthost +%{_mandir}/man1/stapvirt.1* +%{_bindir}/stapvirt +%endif + +%if %{with_virtguest} +%files runtime-virtguest +%if %{with_systemd} + %{udevrulesdir}/99-stapsh.rules + %{_unitdir}/stapsh@.service +%else + %{udevrulesdir}/99-stapsh-init.rules + %dir %{_libexecdir}/systemtap + %{_libexecdir}/systemtap/stapsh-daemon + %{initdir}/stapshd + %{_sysconfdir}/sysconfig/modules/virtio_console.modules +%endif +%endif + +# ------------------------------------------------------------------------ + +# Future new-release entries should be of the form +# * DDD MMM DD YYYY YOURNAME - V-R +# - Upstream release, see wiki page below for detailed notes. +# http://sourceware.org/systemtap/wiki/SystemTapReleases + +# PRERELEASE +%changelog +* Thu May 11 2017 David Smith - 3.1-5 +- Fixed bz1448099.7.1.patch + +* Thu May 11 2017 David Smith - 3.1-4 +- Added patches for: +- rhbz1448099 4.11.0-1.el7 fixes + +* Thu Mar 30 2017 David Smith - 3.1-3 +- Added patches for: +- rhbz1425568 task_dentry_path() fix +- rhbz1431263 arm64 hardware breakpoint crash fix +- rhbz1430828 replace task_exe_file() with current_exe_file() +- rhbz1436845 adapt stapdyn to the dyninst 9.3.1 library search model +- rhbz1433391 workaround parser issue in nfs_proc.stp +- rhbz1428120 update lookup_bad_addr() + +* Wed Mar 15 2017 Stan Cox - 3.1-2 +- rebuilt + +* Fri Feb 17 2017 Frank Ch. Eigler - 3.1-1 +- Upstream release. + +* Mon Sep 19 2016 Frank Ch. Eigler - 3.0-7 +- rhbz1376515 ppc64le probe point / parameter value fix + +* Wed Aug 24 2016 Frank Ch. Eigler - 3.0-6 +- rhbz1346112 delay tls cert creation redux + +* Thu Aug 11 2016 Frank Ch. Eigler - 3.0-5 +- rhbz1312169 stap-prep debuginfo-install improvement + +* Tue Aug 09 2016 Frank Ch. Eigler - 3.0-4 +- rhbz1365550 PR19874 alarm(60) in staprun system() + +* Thu Jul 21 2016 Frank Ch. Eigler - 3.0-3 +- rhbz1346112 delay tls cert creation +- rhbz1269062 null elevator +- rhbz1337416 'count' tapset variable - autocast/@defined + +* Wed May 04 2016 Frank Ch. Eigler - 3.0-2 +- 4 upstream patches for kernel lockdep hygiene, bz1242368 + +* Tue May 03 2016 Frank Ch. Eigler - 3.0-1 +- Upstream release. + +* Wed Sep 02 2015 Frank Ch. Eigler - 2.8-10 +- rhbz1257399: module-init probes + +* Tue Aug 11 2015 Frank Ch. Eigler - 2.8-9 +- rhbz1254856: nfsd tapset fix for kernel functions that went away + +* Tue Aug 11 2015 Frank Ch. Eigler - 2.8-8 +- rhbz1252436: timer probes build fix + +* Mon Aug 10 2015 Frank Ch. Eigler - 2.8-7 +- rhbz1248159: netfilter probes build fix +- disabling docs on ppc64le for bz1252103 + +* Wed Jul 22 2015 Frank Ch. Eigler - 2.8-6 +- rhbz1242992: cont'd: applying .spec hunk here + +* Tue Jul 21 2015 Frank Ch. Eigler - 2.8-5 +- rhbz1242992: java / ppc64 + +* Mon Jul 6 2015 Frank Ch. Eigler - 2.8-3 +- rhbz1237098: handle symbol-table vs. linkage-name mismatches better +- some runtime robustification fixes backported from upstream + +* Wed Jun 17 2015 Frank Ch. Eigler - 2.8-1 +- Upstream release + +* Mon May 11 2015 Frank Ch. Eigler - 2.7-2 +- Upstream release, incl. rhel6.7 post-release xmltohtml patch +- pre-rebase-rebase for aarch64 mass-rebuild + +* Wed Dec 10 2014 Frank Ch. Eigler - 2.6-9 +- rhbz1212658 (xfs & signing) + +* Wed Dec 10 2014 Frank Ch. Eigler - 2.6-8 +- rhbz1171823 (nfsd svc_fh access) + +* Wed Nov 26 2014 Frank Ch. Eigler - 2.6-7 +- rhbz1167652 (stap dracut empty) + +* Thu Nov 20 2014 Frank Ch. Eigler - 2.6-6 +- rhbz1164373 (fix ppc64 kprobes via KERNEL_RELOC_SYMBOL) +- rhbz1119335 (document STAP_FIPS_OVERRIDE in staprun.8) +- rhbz1127591 (ppc64 hcall_* tracepoint blacklisting) + +* Fri Oct 17 2014 Frank Ch. Eigler - 2.6-5 +- RHBZ1153673 (stap segv during optimization) + +* Fri Sep 19 2014 Frank Ch. Eigler - 2.6-3 +- Added probinson's patch BZ1141919 for enabling more ppc64/aarch64 facilities, + with some staplog.c followup + +* Tue Sep 09 2014 Josh Stone - 2.6-2 +- Backport fix for 1139844 + +* Fri Sep 05 2014 Josh Stone - 2.6-1 +- Upstream release, rebased for 1107735 + +* Wed Aug 27 2014 Josh Stone - 2.4-16 +- Exclude ppc64le from with_crash (1125693) + +* Tue Aug 26 2014 Josh Stone - 2.4-15 +- Tighten arch lists for prelink and dyninst (1094349, 1125693) + +* Fri Mar 28 2014 Jonathan Lebon - 2.4-14 +- Small fix on latest backport fix for dyninst runtime + +* Fri Mar 28 2014 Jonathan Lebon - 2.4-13 +- Backport fixes for 1051649 (see comments 4 and 5) + +* Thu Mar 06 2014 Jonathan Lebon - 2.4-12 +- Backport fix for 1073640 + +* Wed Feb 12 2014 Jonathan Lebon - 2.4-11 +- Backport fix for 847285 + +* Wed Feb 12 2014 Jonathan Lebon - 2.4-10 +- Apply spec file patches to this one, not the tarred one +- Add missing autoreconf patch for backport feature (1051649) + +* Tue Feb 11 2014 Jonathan Lebon - 2.4-9 +- Backport fixes for: 1062076, 1020207 + +* Tue Jan 28 2014 Daniel Mach - 2.4-8 +- Mass rebuild 2014-01-24 + +* Fri Jan 24 2014 Jonathan Lebon - 2.4-7 +- Backport fix for 1057773 + +* Wed Jan 22 2014 Frank Ch. Subbackportmeister Eigler - 2.4-6 +- Backport fixes for: 1056687 + +* Wed Jan 22 2014 Jonathan Lebon - 2.4-5 +- Backport fixes for: 1035752, 1035850 + +* Tue Jan 21 2014 Jonathan Lebon - 2.4-4 +- Backport fix for 1055778 + +* Fri Jan 17 2014 Jonathan Lebon - 2.4-3 +- Backport fixes for: 1054962, 1054956, 1054954, 1044429 +- Backport boot-time probing feature (1051649) + +* Fri Dec 27 2013 Daniel Mach - 2.4-2 +- Mass rebuild 2013-12-27 + +* Wed Nov 06 2013 Frank Ch. Eigler - 2.4-1 +- Upstream release. + +* Wed Oct 09 2013 Jonathan Lebon +- Added runtime-virthost and runtime-virtguest packages. + +* Thu Jul 25 2013 Frank Ch. Eigler - 2.3-1 +- Upstream release. + +* Thu May 16 2013 Frank Ch. Eigler - 2.2.1-1 +- Upstream release. + +* Tue May 14 2013 Frank Ch. Eigler - 2.2-1 +- Upstream release. + +* Wed Feb 13 2013 Serguei Makarov - 2.1-1 +- Upstream release. + +* Tue Oct 09 2012 Josh Stone - 2.0-1 +- Upstream release. + +* Fri Jul 13 2012 Peter Robinson +- Fix ifarch statement +- use file based requires for glibc-devel on x86_64 so that we work in koji + +* Sun Jun 17 2012 Frank Ch. Eigler - 1.8-1 +- Upstream release. + +* Wed Feb 01 2012 Frank Ch. Eigler - 1.7-1 +- Upstream release. + +* Fri Jan 13 2012 David Smith - 1.6-2 +- Fixed /bin/mktemp require. + +* Mon Jul 25 2011 Stan Cox - 1.6-1 +- Upstream release. + +* Mon May 23 2011 Stan Cox - 1.5-1 +- Upstream release. + +* Mon Jan 17 2011 Frank Ch. Eigler - 1.4-1 +- Upstream release. + +* Wed Jul 21 2010 Josh Stone - 1.3-1 +- Upstream release. + +* Mon Mar 22 2010 Frank Ch. Eigler - 1.2-1 +- Upstream release. + +* Mon Dec 21 2009 David Smith - 1.1-1 +- Upstream release. + +* Tue Sep 22 2009 Josh Stone - 1.0-1 +- Upstream release. + +* Tue Aug 4 2009 Josh Stone - 0.9.9-1 +- Upstream release. + +* Thu Jun 11 2009 Josh Stone - 0.9.8-1 +- Upstream release. + +* Thu Apr 23 2009 Josh Stone - 0.9.7-1 +- Upstream release. + +* Fri Mar 27 2009 Josh Stone - 0.9.5-1 +- Upstream release. + +* Wed Mar 18 2009 Will Cohen - 0.9-2 +- Add location of man pages. + +* Tue Feb 17 2009 Frank Ch. Eigler - 0.9-1 +- Upstream release. + +* Thu Nov 13 2008 Frank Ch. Eigler - 0.8-1 +- Upstream release. + +* Tue Jul 15 2008 Frank Ch. Eigler - 0.7-1 +- Upstream release. + +* Fri Feb 1 2008 Frank Ch. Eigler - 0.6.1-3 +- Add zlib-devel to buildreq; missing from crash-devel +- Process testsuite .stp files for #!stap->#!/usr/bin/stap + +* Fri Jan 18 2008 Frank Ch. Eigler - 0.6.1-1 +- Add crash-devel buildreq to build staplog.so crash(8) module. +- Many robustness & functionality improvements: + +* Wed Dec 5 2007 Will Cohen - 0.6-2 +- Correct Source to point to location contain code. + +* Thu Aug 9 2007 David Smith - 0.6-1 +- Bumped version, added libcap-devel BuildRequires. + +* Wed Jul 11 2007 Will Cohen - 0.5.14-2 +- Fix Requires and BuildRequires for sqlite. + +* Mon Jul 2 2007 Frank Ch. Eigler - 0.5.14-1 +- Many robustness improvements: 1117, 1134, 1305, 1307, 1570, 1806, + 2033, 2116, 2224, 2339, 2341, 2406, 2426, 2438, 2583, 3037, + 3261, 3282, 3331, 3428 3519, 3545, 3625, 3648, 3880, 3888, 3911, + 3952, 3965, 4066, 4071, 4075, 4078, 4081, 4096, 4119, 4122, 4127, + 4146, 4171, 4179, 4183, 4221, 4224, 4254, 4281, 4319, 4323, 4326, + 4329, 4332, 4337, 4415, 4432, 4444, 4445, 4458, 4467, 4470, 4471, + 4518, 4567, 4570, 4579, 4589, 4609, 4664 + +* Mon Mar 26 2007 Frank Ch. Eigler - 0.5.13-1 +- An emergency / preliminary refresh, mainly for compatibility + with 2.6.21-pre kernels. + +* Mon Jan 1 2007 Frank Ch. Eigler - 0.5.12-1 +- Many changes, see NEWS file. + +* Tue Sep 26 2006 David Smith - 0.5.10-1 +- Added 'systemtap-runtime' subpackage. + +* Wed Jul 19 2006 Roland McGrath - 0.5.9-1 +- PRs 2669, 2913 + +* Fri Jun 16 2006 Roland McGrath - 0.5.8-1 +- PRs 2627, 2520, 2228, 2645 + +* Fri May 5 2006 Frank Ch. Eigler - 0.5.7-1 +- PRs 2511 2453 2307 1813 1944 2497 2538 2476 2568 1341 2058 2220 2437 + 1326 2014 2599 2427 2438 2465 1930 2149 2610 2293 2634 2506 2433 + +* Tue Apr 4 2006 Roland McGrath - 0.5.5-1 +- Many changes, affected PRs include: 2068, 2293, 1989, 2334, + 1304, 2390, 2425, 953. + +* Wed Feb 1 2006 Frank Ch. Eigler - 0.5.4-1 +- PRs 1916, 2205, 2142, 2060, 1379 + +* Mon Jan 16 2006 Roland McGrath - 0.5.3-1 +- Many changes, affected PRs include: 2056, 1144, 1379, 2057, + 2060, 1972, 2140, 2148 + +* Mon Dec 19 2005 Roland McGrath - 0.5.2-1 +- Fixed build with gcc 4.1, various tapset changes. + +* Wed Dec 7 2005 Roland McGrath - 0.5.1-1 +- elfutils update, build changes + +* Fri Dec 02 2005 Frank Ch. Eigler - 0.5-1 +- Many fixes and improvements: 1425, 1536, 1505, 1380, 1329, 1828, 1271, + 1339, 1340, 1345, 1837, 1917, 1903, 1336, 1868, 1594, 1564, 1276, 1295 + +* Mon Oct 31 2005 Roland McGrath - 0.4.2-1 +- Many fixes and improvements: PRs 1344, 1260, 1330, 1295, 1311, 1368, + 1182, 1131, 1332, 1366, 1456, 1271, 1338, 1482, 1477, 1194. + +* Wed Sep 14 2005 Roland McGrath - 0.4.1-1 +- Many fixes and improvements since 0.2.2; relevant PRs include: + 1122, 1134, 1155, 1172, 1174, 1175, 1180, 1186, 1187, 1191, 1193, 1195, + 1197, 1205, 1206, 1209, 1213, 1244, 1257, 1258, 1260, 1265, 1268, 1270, + 1289, 1292, 1306, 1335, 1257 + +* Wed Sep 7 2005 Frank Ch. Eigler +- Bump version. + +* Tue Aug 16 2005 Frank Ch. Eigler +- Bump version. + +* Wed Aug 3 2005 Martin Hunt - 0.2.2-1 +- Add directory /var/cache/systemtap +- Add stp_check to /usr/libexec/systemtap + +* Wed Aug 3 2005 Roland McGrath - 0.2.1-1 +- New version 0.2.1, various fixes. + +* Fri Jul 29 2005 Roland McGrath - 0.2-1 +- New version 0.2, requires elfutils 0.111 + +* Mon Jul 25 2005 Roland McGrath +- Clean up spec file, build bundled elfutils. + +* Thu Jul 21 2005 Martin Hunt +- Set Version to use version from autoconf. +- Fix up some of the path names. +- Add Requires and BuildRequires. + +* Tue Jul 19 2005 Will Cohen +- Initial creation of RPM.