diff --git a/.devtoolset-3-systemtap.metadata b/.devtoolset-3-systemtap.metadata index 4b2edd8..767f9d4 100644 --- a/.devtoolset-3-systemtap.metadata +++ b/.devtoolset-3-systemtap.metadata @@ -1 +1 @@ -3f6346bc37b47f590b16894e93b2ba5f45d2acd2 SOURCES/systemtap-2.5.tar.gz +87df285cfee508a8653eb7e161918327eb60479e SOURCES/systemtap-2.6.tar.gz diff --git a/.gitignore b/.gitignore index 3aa0460..cd27605 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/systemtap-2.5.tar.gz +SOURCES/systemtap-2.6.tar.gz diff --git a/SOURCES/BZ1095137.patch b/SOURCES/BZ1095137.patch deleted file mode 100644 index da53d48..0000000 --- a/SOURCES/BZ1095137.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit d2de228a13c5dc0c758a196e28a11ed3f8266dd5 -Author: David Smith -Date: Mon May 5 16:33:19 2014 -0500 - - Make syscall.sendfile optional. - -diff --git a/tapset/linux/syscalls2.stp b/tapset/linux/syscalls2.stp -index 90c3d6f..359c359 100644 ---- a/tapset/linux/syscalls2.stp -+++ b/tapset/linux/syscalls2.stp -@@ -1997,7 +1997,7 @@ probe syscall.send.return = kernel.function("sys_send").return ? - # COMPAT_SYSCALL_DEFINE4(sendfile64, int, out_fd, int, in_fd, - # compat_loff_t __user *, offset, compat_size_t, count) - # --probe syscall.sendfile = __syscall.sendfile, __syscall.compat_sendfile -+probe syscall.sendfile = __syscall.sendfile ?, __syscall.compat_sendfile ? - { - name = "sendfile" - out_fd = __int32($out_fd) diff --git a/SOURCES/BZ1099133.patch b/SOURCES/BZ1099133.patch deleted file mode 100644 index 00b7157..0000000 --- a/SOURCES/BZ1099133.patch +++ /dev/null @@ -1,36 +0,0 @@ -commit 1d50099a1a160f5cf212fcce22c25276bbd912c5 -Author: Jonathan Lebon -Date: Fri May 30 11:47:51 2014 -0400 - - BZ1099133: prologue searching: check previous line too - - We perform binary search to retrieve the line record matching the - entrypc. However, we may by chance fall on the second of two line - records for the same entrypc. Check for this after binary search is - done. - -diff --git a/dwflpp.cxx b/dwflpp.cxx -index 09407b4..ff3c1a6 100644 ---- a/dwflpp.cxx -+++ b/dwflpp.cxx -@@ -2271,6 +2271,20 @@ dwflpp::resolve_prologue_endings (func_info_map_t & funcs) - else if (addr < entrypc) { l = entrypc_srcline_idx; } - else { h = entrypc_srcline_idx; } - } -+ -+ // We may by chance have fallen on the second of two consecutive line -+ // records for the same addr. If the previous Dwarf_Line is indeed at -+ // the same address, pick that one instead. It means that there is no -+ // prologue, which the code that follows will soon find. (BZ1099133). -+ if (entrypc_srcline && entrypc_srcline_idx > 0) -+ { -+ Dwarf_Line* lr = dwarf_onesrcline(lines, entrypc_srcline_idx-1); -+ if (DWARF_LINEADDR(lr) == entrypc) -+ { -+ entrypc_srcline = lr; -+ entrypc_srcline_idx--; -+ } -+ } - } - if (!entrypc_srcline) - { diff --git a/SOURCES/BZ1099472.patch b/SOURCES/BZ1099472.patch deleted file mode 100644 index f509f98..0000000 --- a/SOURCES/BZ1099472.patch +++ /dev/null @@ -1,128 +0,0 @@ -commit 9267aefb7e7612c04eaf886683b204415e91d772 -Author: Jonathan Lebon -Date: Wed May 28 11:24:34 2014 -0400 - - BZ1099472: cast-scope.exp: adjust relative lineno - -diff --git a/testsuite/systemtap.base/cast-scope.cxx b/testsuite/systemtap.base/cast-scope.cxx -index 428124d..891bfbe 100644 ---- a/testsuite/systemtap.base/cast-scope.cxx -+++ b/testsuite/systemtap.base/cast-scope.cxx -@@ -8,7 +8,7 @@ length(const std::string& str) - int res, r; - STAP_PROBE1(cast-scope, length, &str); - r = str.length() * 2; -- STAP_PROBE(cast-scope, dummy); /* Just here to probe line +4. */ -+ STAP_PROBE(cast-scope, dummy); /* Just here to probe line +5. */ - res = r / 2; - STAP_PROBE(cast-scope, dummy2); /* Just here prevent line reordering. */ - return res; -diff --git a/testsuite/systemtap.base/cast-scope.stp b/testsuite/systemtap.base/cast-scope.stp -index aadb988..6cdd4ce 100644 ---- a/testsuite/systemtap.base/cast-scope.stp -+++ b/testsuite/systemtap.base/cast-scope.stp -@@ -6,7 +6,7 @@ probe process.function("length@cast-scope.cxx") - function_string .= sprintf("function cast: %s\n", @cast($str, "std::string")$$) - } - --probe process.statement("length@cast-scope.cxx+4") -+probe process.statement("length@cast-scope.cxx+5") - { - statement_string .= sprintf("statement direct: %s\n", $str$$) - statement_string .= sprintf("statement cast: %s\n", @cast($str, "std::string")$$) - -commit 10bada5493a4f19be9cf11c866aceda71782d63c -Author: Jonathan Lebon -Date: Tue Jun 10 13:41:28 2014 -0400 - - loc2c: make u_fetch_register() respect CONFIG_COMPAT - - If CONFIG_COMPAT is defined, then it is possible to be running 32/31-bit - tasks on a 64-bit kernel. In such cases, we need to ensure that the - values returned from u_fetch_register() are 32-bit friendly. - - Thus, we mask whatever pt_regs_fetch_register() returns. - -diff --git a/runtime/linux/loc2c-runtime.h b/runtime/linux/loc2c-runtime.h -index c847b47..a3bec58 100644 ---- a/runtime/linux/loc2c-runtime.h -+++ b/runtime/linux/loc2c-runtime.h -@@ -271,13 +271,25 @@ static void ursl_store64 (const struct usr_regset_lut* lut,unsigned lutsize, in - #endif - - #else /* ! STAPCONF_REGSET */ -+ - /* Downgrade to pt_dwarf_register access. */ --#define u_fetch_register(regno) \ -- pt_regs_fetch_register(c->uregs, regno) -+ - #define u_store_register(regno, value) \ - pt_regs_store_register(c->uregs, regno, value) -+ -+/* If we're in a 32/31-bit task in a 64-bit kernel, we need to emulate -+ * 32-bitness by masking the output of pt_regs_fetch_register() */ -+#ifndef CONFIG_COMPAT -+#define u_fetch_register(regno) \ -+ pt_regs_fetch_register(c->uregs, regno) -+#else -+#define u_fetch_register(regno) \ -+ (_stp_is_compat_task() ? (0xffffffff & pt_regs_fetch_register(c->uregs, regno)) \ -+ : pt_regs_fetch_register(c->uregs, regno)) - #endif - -+#endif /* STAPCONF_REGSET */ -+ - - /* The deref and store_deref macros are called to safely access addresses - in the probe context. These macros are used only for kernel addresses. - -commit 855c22e91e76e05a3b57df545fb9d28677dd2c10 -Author: Jonathan Lebon -Date: Tue Jun 10 14:57:39 2014 -0400 - - cast-scope.exp: KFAIL dyninst on ppc unoptimized - - The cast-scope.exp test fails on ppc64 for unoptimized code due to - stapdyn's inability to retrieve all registers (PR15614). So we KFAIL it. - -diff --git a/testsuite/lib/compile_flags.exp b/testsuite/lib/compile_flags.exp -index 2893978..f7e2ac5 100644 ---- a/testsuite/lib/compile_flags.exp -+++ b/testsuite/lib/compile_flags.exp -@@ -67,6 +67,11 @@ proc all_compile_flag_native_p { INDEX } { - return 0 - } - -+# Is INDEX a configuration with optimization turned on? -+proc all_compile_flag_optimized_p { INDEX } { -+ return [expr (($INDEX / 2) % 3) > 0] -+} -+ - # Additional compile flag to use for with target_compile. - # Given INDEX starts at zero and should be smaller than the number - # returned by all_compile_flags. -diff --git a/testsuite/systemtap.base/cast-scope.exp b/testsuite/systemtap.base/cast-scope.exp -index 8af0eaa..47f87a9 100644 ---- a/testsuite/systemtap.base/cast-scope.exp -+++ b/testsuite/systemtap.base/cast-scope.exp -@@ -9,11 +9,20 @@ set srcfile "$srcdir/$subdir/$test.cxx" - set stpfile "$srcdir/$subdir/$test.stp" - - proc dyninst_kfails {index} { -+ - # The dyninst runtime isn't multi-arch, it only works on the - # native architecture. PR14490. - if {! [all_compile_flag_native_p $index]} { - setup_kfail 14490 "*-*-*" - } -+ -+ # On ppc, stapdyn does not retrieve all registers, causing -+ # various failures (such as the inability to retrieve DWARF -+ # vars in unoptimized code). PR15614. -+ if {[string match ppc* $::tcl_platform(machine)] && \ -+ ![all_compile_flag_optimized_p $index]} { -+ setup_kfail 15614 "*-*-*" -+ } - } - - for {set i 0} {$i < [all_compile_flags]} {incr i} { diff --git a/SOURCES/BZ1099555.patch b/SOURCES/BZ1099555.patch deleted file mode 100644 index 9907856..0000000 --- a/SOURCES/BZ1099555.patch +++ /dev/null @@ -1,310 +0,0 @@ -commit e56d75e475905a0cbc5ec5c65289b8745ec3e39f -Author: David Smith -Date: Thu Jun 5 10:46:14 2014 -0500 - - Update gtod.exp for BZ1099555 to make output more clear. - - * testsuite/systemtap.base/gtod.exp: Split test into 3 sub tests so that - failures can be more easily identified. - -diff --git a/testsuite/systemtap.base/gtod.exp b/testsuite/systemtap.base/gtod.exp -index f872601..48bb414 100644 ---- a/testsuite/systemtap.base/gtod.exp -+++ b/testsuite/systemtap.base/gtod.exp -@@ -25,93 +25,52 @@ target_compile $filename $wd/gtod executable "" - # old multi-line matching (which once it got out of sync could never - # seem to get back into sync). - --# non interval (check timer drift in short range) --set state -1 --set count "XX" --spawn $srcdir/$subdir/gtod.sh $srcdir/$subdir/gtod.stp $wd/gtod --set ok 0 --expect { -- -timeout 120 -- -re {^[0-9]+ \:([0-9]+) appl\r\n} { -- set state 0 -- set count $expect_out(1,string) -- exp_continue -- } -- -re {^[0-9]+ \:([0-9]+) kern\r\n} { -- if {$state == 0 && $count == $expect_out(1,string)} { -- set state 1 -- } else { -- set state -1 -- } -- exp_continue -- } -- -re {^[0-9]+ \:([0-9]+) prog\r\n} { -- if {$state == 1 && $count == $expect_out(1,string)} { incr ok } -- set state -1 -- exp_continue -- } -- timeout { fail "$test (timeout)" } -- eof { } --} --wait -+for {set i 0} { $i < 3 } {incr i } { -+ if {$i == 0} { -+ # non interval (check timer drift in short range) -+ set test "gtod (short range)" -+ spawn $srcdir/$subdir/gtod.sh $srcdir/$subdir/gtod.stp $wd/gtod -+ } elseif {$i == 1} { -+ # 10ms interval (check timer drift in middle range) -+ set test "gtod (10ms interval)" -+ spawn $srcdir/$subdir/gtod.sh $srcdir/$subdir/gtod.stp $wd/gtod 10000 -+ } else { -+ # 100ms interval (calm down processors and CPU freq might be -+ # changed) -+ set test "gtod (100ms interval)" -+ spawn $srcdir/$subdir/gtod.sh $srcdir/$subdir/gtod.stp $wd/gtod 100000 -+ } - --#10ms interval (check timer drift in middle range) --set state -1 --set count "XX" --spawn $srcdir/$subdir/gtod.sh $srcdir/$subdir/gtod.stp $wd/gtod 10000 --expect { -+ set state -1 -+ set count "XX" -+ set ok 0 -+ expect { - -timeout 120 - -re {^[0-9]+ \:([0-9]+) appl\r\n} { -- set state 0 -- set count $expect_out(1,string) -- exp_continue -+ set state 0 -+ set count $expect_out(1,string) -+ exp_continue - } - -re {^[0-9]+ \:([0-9]+) kern\r\n} { -- if {$state == 0 && $count == $expect_out(1,string)} { -- set state 1 -- } else { -- set state -1 -- } -- exp_continue -- } -- -re {^[0-9]+ \:([0-9]+) prog\r\n} { -- if {$state == 1 && $count == $expect_out(1,string)} { incr ok } -+ if {$state == 0 && $count == $expect_out(1,string)} { -+ set state 1 -+ } else { - set state -1 -- exp_continue -- } -- timeout { fail "$test (timeout)" } -- eof { } --} --wait -- --#100ms interval (calm down processors and CPU freq might be changed) --set state -1 --set count "XX" --spawn $srcdir/$subdir/gtod.sh $srcdir/$subdir/gtod.stp $wd/gtod 100000 --expect { -- -timeout 120 -- -re {^[0-9]+ \:([0-9]+) appl\r\n} { -- set state 0 -- set count $expect_out(1,string) -- exp_continue -- } -- -re {^[0-9]+ \:([0-9]+) kern\r\n} { -- if {$state == 0 && $count == $expect_out(1,string)} { -- set state 1 -- } else { -- set state -1 -- } -- exp_continue -+ } -+ exp_continue - } - -re {^[0-9]+ \:([0-9]+) prog\r\n} { -- if {$state == 1 && $count == $expect_out(1,string)} { incr ok } -- set state -1 -- exp_continue -+ if {$state == 1 && $count == $expect_out(1,string)} { incr ok } -+ set state -1 -+ exp_continue - } - timeout { fail "$test (timeout)" } - eof { } -+ } -+ catch {close}; catch {wait} -+ if {$ok == 100} { pass "$test ($ok)" } { fail "$test ($ok)" } - } --wait -+ - exec rm -f $wd/gtod --if {$ok == 300} { pass "$test ($ok)" } { fail "$test ($ok)" } -+ - - -commit cc182e85769f59c897617bf93788a13f288e8a45 -Author: David Smith -Date: Mon Jun 9 09:11:13 2014 -0500 - - Fix BZ1099555 by reworking gtod.exp. - - * testsuite/systemtap.base/gtod.exp: Rework so that we don't care about - what order the output comes. All we care about now is the variance - between the kernel's time and systemtap's time. - * testsuite/systemtap.base/gtod.c (main): Print the iteration number first. - * testsuite/systemtap.base/gtod.stp: Ditto. - -diff --git a/testsuite/systemtap.base/gtod.c b/testsuite/systemtap.base/gtod.c -index 2005955..a45152e 100644 ---- a/testsuite/systemtap.base/gtod.c -+++ b/testsuite/systemtap.base/gtod.c -@@ -18,8 +18,10 @@ int main (int argc, char *argv[]) - for (i=0; i<100; i++) { - // change last 4 chars for correctly sorting even if the - // time stamps are completely same. -- printf("%8ld%06ld :%02d appl\n", tv[i][0].tv_sec, tv[i][0].tv_usec, i); -- printf("%8ld%06ld :%02d prog\n", tv[i][1].tv_sec, tv[i][1].tv_usec, i); -+ printf(":%02d %8ld%06ld appl\n", i, tv[i][0].tv_sec, -+ tv[i][0].tv_usec); -+ printf(":%02d %8ld%06ld prog\n", i, tv[i][1].tv_sec, -+ tv[i][1].tv_usec); - } - return 0; - } -diff --git a/testsuite/systemtap.base/gtod.exp b/testsuite/systemtap.base/gtod.exp -index 48bb414..0d35803 100644 ---- a/testsuite/systemtap.base/gtod.exp -+++ b/testsuite/systemtap.base/gtod.exp -@@ -7,23 +7,28 @@ set filename "$srcdir/$subdir/gtod.c" - - target_compile $filename $wd/gtod executable "" - --# Notice the state machine when checking output. We're looking for --# lines in the following format: -+# Return the absolute difference between num1 and num2 -+proc abs_diff { num1 num2 } { -+ if {$num1 > $num2} { -+ return [expr $num1 - $num2] -+ } -+ return [expr $num2 - $num1] -+} -+ -+# We're looking for lines in the following format: - # --# 1336494634008794 :00 appl --# 1336494634008971 :00 kern --# 1336494634009194 :00 prog --# 1336494634009196 :01 appl --# 1336494634009199 :01 kern --# 1336494634009203 :01 prog -+# :00 1336494634008794 appl -+# :00 1336494634008971 kern -+# :00 1336494634009194 prog -+# :01 1336494634009196 appl -+# :01 1336494634009199 kern -+# :01 1336494634009203 prog - # ... - # --# The lines must be in the order 'appl', 'kern', and 'prog'. The --# second number, the count, must match on each of the 3 lines. --# --# The state machine should hopefully give a better ok count than the --# old multi-line matching (which once it got out of sync could never --# seem to get back into sync). -+# The lines should be in the order 'appl', 'kern', and 'prog', but we -+# don't insist on it. If systemtap's time is a bit ahead of the -+# kernel's real time, the 'kern' line can appear first. The first -+# number, the count, must match on each of the 3 lines. - - for {set i 0} { $i < 3 } {incr i } { - if {$i == 0} { -@@ -41,33 +46,60 @@ for {set i 0} { $i < 3 } {incr i } { - spawn $srcdir/$subdir/gtod.sh $srcdir/$subdir/gtod.stp $wd/gtod 100000 - } - -- set state -1 -- set count "XX" -+ # 'ok' is the number of passes - set ok 0 -+ -+ # 'count' contains the current count (iteration number) for each -+ # of the 3 sets of lines -+ set count(appl) -1 -+ set count(kern) -1 -+ set count(prog) -1 -+ -+ # 'us_time' contains the reported time for each of the 3 sets of lines -+ set us_time(appl) 0 -+ set us_time(kern) 0 -+ set us_time(prog) 0 -+ -+ # 'max_diff' is used to remember the maximum difference between -+ # systemtap's time and the kernel's time -+ set max_diff 0 -+ -+ # 'variance' is the maximum number of microseconds difference -+ # between systemtap's time and the kernel's time that we'll accept -+ set variance 500 -+ - expect { - -timeout 120 -- -re {^[0-9]+ \:([0-9]+) appl\r\n} { -- set state 0 -- set count $expect_out(1,string) -- exp_continue -- } -- -re {^[0-9]+ \:([0-9]+) kern\r\n} { -- if {$state == 0 && $count == $expect_out(1,string)} { -- set state 1 -- } else { -- set state -1 -+ -+ # We found a 'appl|kern|prog' line -+ -re {^\:([0-9]+) ([0-9]+) (appl|kern|prog)\r\n} { -+ set type $expect_out(3,string) -+ set count($type) $expect_out(1,string) -+ set us_time($type) $expect_out(2,string) -+ -+ # If we've seen all the lines for this iteration, check -+ # the times. -+ if {$count(appl) == $count(kern) && $count(kern) == $count(prog)} { -+ set appl_diff [abs_diff $us_time(appl) $us_time(kern)] -+ set prog_diff [abs_diff $us_time(prog) $us_time(kern)] -+ if {$appl_diff < $variance && $prog_diff < $variance} { -+ incr ok -+ } else { -+ verbose -log "difference of ($appl_diff, $prog_diff) for count $count(kern) is too large" -+ } -+ if {$appl_diff > $max_diff} { set max_diff $appl_diff } -+ if {$prog_diff > $max_diff} { set max_diff $prog_diff } - } - exp_continue - } -- -re {^[0-9]+ \:([0-9]+) prog\r\n} { -- if {$state == 1 && $count == $expect_out(1,string)} { incr ok } -- set state -1 -- exp_continue -- } -+ - timeout { fail "$test (timeout)" } - eof { } - } - catch {close}; catch {wait} -+ if {$max_diff > 0} { -+ verbose -log "maximum time difference was $max_diff us" -+ } - if {$ok == 100} { pass "$test ($ok)" } { fail "$test ($ok)" } - } - -diff --git a/testsuite/systemtap.base/gtod.stp b/testsuite/systemtap.base/gtod.stp -index f252dc0..e90fefd 100644 ---- a/testsuite/systemtap.base/gtod.stp -+++ b/testsuite/systemtap.base/gtod.stp -@@ -2,7 +2,7 @@ global count = 0 - - probe syscall.setsid { - if (pid() == target()) { -- printf("%014d :%02d kern\n", gettimeofday_us(), count); -+ printf(":%02d %014d kern\n", count, gettimeofday_us()); - count ++; - } - } diff --git a/SOURCES/BZ1099757.patch b/SOURCES/BZ1099757.patch deleted file mode 100644 index de31fa6..0000000 --- a/SOURCES/BZ1099757.patch +++ /dev/null @@ -1,174 +0,0 @@ -commit 99e55de1653be8967cab9d8d8044d847a574e88f -Author: Jonathan Lebon -Date: Wed May 28 11:12:18 2014 -0400 - - BZ1099757: vars.exp: fix and strengthen - - Since PR16615 (merge commit 4636ca3), linenos in statement probes have - become more precise and stringent. As a result, vars.exp was failing - because it was trying to probe a statement at a lineno with no line - records. - - We fix this by first retrieving the first valid lineno using stap -l. - The test has also been refactored in general to be more robust. We can - now more easily add more functions to test (e.g. we now test both - bio_copy_user() and vfs_read()). - -diff --git a/testsuite/systemtap.base/vars.exp b/testsuite/systemtap.base/vars.exp -index f597c67..b07fcaa 100644 ---- a/testsuite/systemtap.base/vars.exp -+++ b/testsuite/systemtap.base/vars.exp -@@ -7,35 +7,105 @@ - # generated. However, there's still the ifdef'ed STP_LEGACY_PRINT code which - # has the format string we care about here. If that ever goes away, we'll - # probably have to fall back to comparing pass-2 output instead. -- -+# -+# NB2: We FAIL if any of the functions tested have no locals or no -+# params to ensure we're not testing a null hypothesis. -+ - set test "vars" - --# grab C statement that $$vars yields --set cmd [concat stap -p3 -e {"probe kernel.statement(\"bio_copy_user@fs/bio.c+1\") \{print (\$\$vars)\}"} | grep {"_stp_snprintf.*="} | sed -e {"s/^.*MAXSTRINGLEN, \"//"} -e {s/\".*$//}] --catch {eval exec $cmd} vars -+proc get_listings { probe_point } { -+ if {![catch {exec stap -l ${probe_point} 2>@1} output]} { -+ return [split $output "\n"] -+ } -+} -+ -+proc parse_lineno { function line } { -+ if {[regexp "$function:(\[0-9\]+)\"" $line dummy submatch]} { -+ return $submatch -+ } else { -+ verbose -log "can't parse lineno in $line" -+ return 0 -+ } -+} -+ -+proc get_first_valid_lineno { function } { -+ set linenos "" -+ set probe_point "kernel.statement\(\"$function:*\"\)" -+ set line [lindex [get_listings $probe_point] 0] -+ return [parse_lineno $function $line] -+} -+ -+proc grab_C_statements { probe_point type } { - --# grab C statement that $$parms yields --set cmd [regsub "vars" $cmd "parms"] --catch {eval exec $cmd} parms -+ set cmd [concat stap -p3 -e { "probe kernel.statement(\"$probe_point\") {print (\$\$$type)}" } \ -+ | grep {"_stp_snprintf.*="} \ -+ | sed -e {"s/^.*MAXSTRINGLEN, \"//"} -e "s/\".*$//"] -+ catch {eval exec $cmd} out - --# grab C statement that $$locals yields --set cmd [regsub "parms" $cmd "locals"] --catch {eval exec $cmd} locals -+ if {$out == ""} { -+ error "no output for $type" -+ } else { -+ verbose -log "output for $type: $out" -+ } - --# syntax check of $$vars C statement --set vars_ok [regexp "(\[a-z_\]+=%#llx *)+" $vars] --if {!$vars_ok} { -- fail "$test" --} else { -- pass "$test" -+ return $out - } - --# $$vars should be equivalent to $$parms + $$locals --if {![string equal $vars "$parms $locals"]} { -- fail "$test parms/locals" -- verbose -log "vars=$vars=" -- verbose -log "rest=$parms $locals=" --} else { -- pass "$test parms/locals" -+proc get_vars { probe_point } { -+ set vars [grab_C_statements $probe_point vars] -+ -+ # syntax check of $$vars c statement -+ set syntax_ok [regexp "(\[a-z_\]+=%#llx *)+" $vars] -+ if {!$syntax_ok} { -+ error "bad vars syntax" -+ verbose -log "vars is $vars" -+ } -+ -+ return $vars -+} -+ -+proc get_parms { probe_point } { -+ return [grab_C_statements $probe_point parms] -+} -+ -+proc get_locals { probe_point } { -+ return [grab_C_statements $probe_point locals] -+} -+ -+proc test_function { function } { -+ global test -+ set subtest "$test - $function" -+ -+ set lineno [get_first_valid_lineno $function] -+ if {$lineno == 0} { -+ fail "$subtest (no first lineno)" -+ return -+ } else { -+ pass "$subtest (first lineno is $lineno)" -+ } -+ -+ if {[catch { -+ set probe_point "$function:$lineno" -+ set vars [get_vars $probe_point] -+ set parms [get_parms $probe_point] -+ set locals [get_locals $probe_point] -+ } err]} { -+ fail "$subtest ($err)" -+ return -+ } else { -+ pass "$subtest" -+ } -+ -+ # $$vars should be equivalent to $$parms + $$locals -+ if {![string equal $vars "$parms $locals"]} { -+ fail "$subtest (parms/locals)" -+ verbose -log "vars=$vars=" -+ verbose -log "rest=$parms $locals=" -+ } else { -+ pass "$subtest (parms/locals)" -+ } - } - -+# Test a few different functions -+test_function {bio_copy_user@fs/bio.c} -+test_function {vfs_read@fs/read_write.c} - -commit ebe89ef77c8741f6654293a9f54a40057e20bab5 -Author: Jonathan Lebon -Date: Wed Jun 11 11:15:14 2014 -0400 - - vars.exp: only parse out from first line of grep - - There can be multiple _stp_snprintf lines, in which case, the resulting - values for vars and parms can hold the same variables multiple times, - thus throwing off the test (see RHBZ1099757#c4). - - Fix this by only using the first line output from grep. - -diff --git a/testsuite/systemtap.base/vars.exp b/testsuite/systemtap.base/vars.exp -index b07fcaa..fef58e2 100644 ---- a/testsuite/systemtap.base/vars.exp -+++ b/testsuite/systemtap.base/vars.exp -@@ -39,6 +39,7 @@ proc grab_C_statements { probe_point type } { - - set cmd [concat stap -p3 -e { "probe kernel.statement(\"$probe_point\") {print (\$\$$type)}" } \ - | grep {"_stp_snprintf.*="} \ -+ | head -n 1 \ - | sed -e {"s/^.*MAXSTRINGLEN, \"//"} -e "s/\".*$//"] - catch {eval exec $cmd} out - diff --git a/SOURCES/BZ1099791.patch b/SOURCES/BZ1099791.patch deleted file mode 100644 index 5a1bf44..0000000 --- a/SOURCES/BZ1099791.patch +++ /dev/null @@ -1,71 +0,0 @@ -commit b313171061101a2eef6b5c5541d91e45d561bfb1 -Author: David Smith -Date: Tue Jun 3 11:05:20 2014 -0500 - - Fixed BZ1099791 by updating the runtime to correctly find the vdso. - - * translate.cxx (find_vdso): Add comment mentioning the logic in - _stp_vma_match_vdso needs to match. - * runtime/vma.c (_stp_vma_match_vdso): Add logic from find_vdso() to parse - the path, looking for the vdso. - -diff --git a/runtime/vma.c b/runtime/vma.c -index a42d1cf..fbb3ef8 100644 ---- a/runtime/vma.c -+++ b/runtime/vma.c -@@ -39,11 +39,29 @@ static void _stp_vma_match_vdso(struct task_struct *tsk) - for (i = 0; i < _stp_num_modules && found == NULL; i++) { - struct _stp_module *m = _stp_modules[i]; - if (m->path[0] == '/' -- && m->num_sections == 1 -- && strncmp(m->name, "vdso", 4) == 0) -+ && m->num_sections == 1) - { - unsigned long notes_addr; - int all_ok = 1; -+ -+ /* Assume that if the path's basename starts with 'vdso' -+ * and ends with '.so', it is the vdso. -+ * -+ * Note that this logic should match up with the logic in -+ * the find_vdso() function in translate.cxx. */ -+ const char *name = strrchr(m->path, '/'); -+ if (name) -+ { -+ const char *ext; -+ -+ name++; -+ ext = strrchr(name, '.'); -+ if (!ext -+ || strncmp("vdso", name, 4) != 0 -+ || strcmp(".so", ext) != 0) -+ continue; -+ } -+ - notes_addr = vdso_addr + m->build_id_offset; - dbug_task_vma(1,"notes_addr %s: 0x%lx + 0x%lx = 0x%lx (len: %x)\n", m->path, - vdso_addr, m->build_id_offset, notes_addr, m->build_id_len); -diff --git a/translate.cxx b/translate.cxx -index d784a68..0dab0b1 100644 ---- a/translate.cxx -+++ b/translate.cxx -@@ -6448,11 +6448,18 @@ static int find_vdso(const char *path, const struct stat *, int type) - { - if (type == FTW_F) - { -+ /* Assume that if the path's basename starts with 'vdso' and -+ * ends with '.so', it is the vdso. -+ * -+ * Note that this logic should match up with the logic in the -+ * _stp_vma_match_vdso() function in runtime/vma.c. */ - const char *name = strrchr(path, '/'); - if (name) - { -+ const char *ext; -+ - name++; -- const char *ext = strrchr(name, '.'); -+ ext = strrchr(name, '.'); - if (ext - && strncmp("vdso", name, 4) == 0 - && strcmp(".so", ext) == 0) diff --git a/SOURCES/BZ1099825.patch b/SOURCES/BZ1099825.patch deleted file mode 100644 index c5ce6a7..0000000 --- a/SOURCES/BZ1099825.patch +++ /dev/null @@ -1,34 +0,0 @@ -commit dd3bc0db548ee60c01fda9509acb93d94eb663f3 -Author: Jonathan Lebon -Date: Fri May 30 10:26:01 2014 -0400 - - BZ1099825: probe_by_pid.exp: small tweak in C program - - Since PR6941 (commit 277a2b9), prologue-searching is skipped for - optimized code. However, we do not skip it for GCC < 4.5, which may - provide bad location info (see GDB's PR13777). - - On RHEL6, this testcase was failing because prologue-searching was not - skipped, and fell inside the loop in main(). To allow for a safe landing - zone, we slightly tweak the C program so that there is a safe - instruction to land on post-prologue that is not in the loop. - -diff --git a/testsuite/systemtap.clone/probe_by_pid.c b/testsuite/systemtap.clone/probe_by_pid.c -index 698053e..06942bb 100644 ---- a/testsuite/systemtap.clone/probe_by_pid.c -+++ b/testsuite/systemtap.clone/probe_by_pid.c -@@ -3,12 +3,13 @@ - - void test_function(void) - { -- sleep(1); - (void) getpid(); -+ sleep(1); - } - - int main(void) - { -+ sleep(1); // so that post-prologue doesn't fall inside loop - while (1) { - test_function(); - } diff --git a/SOURCES/BZ1100813.patch b/SOURCES/BZ1100813.patch deleted file mode 100644 index a91f720..0000000 --- a/SOURCES/BZ1100813.patch +++ /dev/null @@ -1,41 +0,0 @@ -commit 6230edef881b0e4ee5786640df6c0b773f44e0b1 -Author: David Smith -Date: Wed May 28 16:00:44 2014 -0500 - - Fixed BZ1100813 by fixing build errors in nfsd.stp. - - * tapset/linux/nfsd.stp (__rqstp_uid): Fix pointer casting, needed by - 32-bit platforms. - (__rqstp_gid): Ditto. - -diff --git a/tapset/linux/nfsd.stp b/tapset/linux/nfsd.stp -index f6eb650..701a81d 100644 ---- a/tapset/linux/nfsd.stp -+++ b/tapset/linux/nfsd.stp -@@ -40,7 +40,7 @@ - - /*Get file handler from struct svc_fh */ - function __svc_fh:string(fh :long) %{ /* pure */ -- struct svc_fh * fhp = (struct svc_fh *) (long)(STAP_ARG_fh); -+ struct svc_fh * fhp = (struct svc_fh *) (unsigned long)(STAP_ARG_fh); - struct knfsd_fh *fh = &fhp->fh_handle; - - snprintf(STAP_RETVALUE, MAXSTRINGLEN, -@@ -154,7 +154,7 @@ function __rqstp_uid:long(rqstp:long) - # net/sunrpc/auth_generic.c. - return %{ /* pure */ - from_kuid_munged(&init_user_ns, -- ((struct svc_rqst *)STAP_ARG_rqstp)->rq_cred.cr_uid) %} -+ ((struct svc_rqst *)(unsigned long)STAP_ARG_rqstp)->rq_cred.cr_uid) %} - %: - return @cast(rqstp, "svc_rqst", "kernel:nfsd")->rq_cred->cr_uid - %) -@@ -168,7 +168,7 @@ function __rqstp_gid:long(rqstp:long) - # net/sunrpc/auth_generic.c. - return %{ /* pure */ - from_kgid_munged(&init_user_ns, -- ((struct svc_rqst *)STAP_ARG_rqstp)->rq_cred.cr_gid) %} -+ ((struct svc_rqst *)(unsigned long)STAP_ARG_rqstp)->rq_cred.cr_gid) %} - %: - return @cast(rqstp, "svc_rqst", "kernel:nfsd")->rq_cred->cr_gid - %) diff --git a/SOURCES/BZ1109084.patch b/SOURCES/BZ1109084.patch deleted file mode 100644 index 5c34596..0000000 --- a/SOURCES/BZ1109084.patch +++ /dev/null @@ -1,131 +0,0 @@ -commit 4715f85e45264d813b8e6b368f29a4230d9a34c0 -Author: Jonathan Lebon -Date: Fri Jun 13 13:24:36 2014 -0400 - - initscript: check script names - - Because script names are the basis for some variable names (e.g. - script_name_REQ), they need to adhere to bash variable naming rules. - These are almost the same rules that we enforce for stap -m, so we just - fail 'earlier'. See also RHBZ1109084. - - This patch ensures that scripts with invalid names are skipped and - logged. - -diff --git a/initscript/systemtap.in b/initscript/systemtap.in -index 2d68469..14e3949 100755 ---- a/initscript/systemtap.in -+++ b/initscript/systemtap.in -@@ -242,18 +242,32 @@ ALLOW_CACHEONLY=$? - check_bool $LOG_BOOT_ERR - LOG_BOOT_ERR=$? - -+is_valid_script_name () { -+ # Same rules as stap -m with the addition of starting -+ # with a non-digit so that valid shell variables can be -+ # formed from it (for the config file). -+ if [[ $1 =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then -+ log "$1 is not a valid script name (must match [a-zA-Z_][a-zA-Z0-9_]*)" -+ return 1 -+ fi -+} -+ - __get_all_scripts () { - local s - if [ $ALLOW_CACHEONLY -eq 1 ]; then - for s in "$CACHE_PATH"/*.ko; do - if [ -f "$s" ]; then -- basename "$s" | sed s/\.ko$//g -+ script=`basename "$s" .ko` -+ is_valid_script_name $script -+ [ $? -eq 0 ] && echo $script - fi - done - fi - for s in "$SCRIPT_PATH"/*.stp; do - if [ -f "$s" ]; then -- basename "$s" | sed s/\.stp$//g -+ script=`basename "$s" .stp` -+ is_valid_script_name $script -+ [ $? -eq 0 ] && echo $script - fi - done - } -@@ -588,7 +602,12 @@ start () { - - start_scripts=$SCRIPTS - if [ -n "$DEFAULT_START" -a -z "$OPT_SCRIPTS" ]; then -- start_scripts="$DEFAULT_START" -+ -+ # Sanity check the names -+ for s in $DEFAULT_START; do -+ is_valid_script_name $s -+ [ $? -eq 0 ] && start_scripts="$start_scripts $s" -+ done - fi - - if [ -z "$start_scripts" ]; then - -commit fbcde985c22471e6c069512950f925911f2ad342 -Author: Jonathan Lebon -Date: Fri Jun 13 13:33:49 2014 -0400 - - man/systemtap.8: mention naming requirement - - Add blurb to clarify that script names must be alphanumeric and must not - start with a number. - -diff --git a/man/systemtap.8.in b/man/systemtap.8.in -index 798a278..037402e 100644 ---- a/man/systemtap.8.in -+++ b/man/systemtap.8.in -@@ -40,10 +40,11 @@ The configuration file of the initscript is located at - GLOBAL PARAMETERS section. - - Scripts must be placed in the \fB@sysconfdir@/systemtap/script.d\fR directory --and must have a \fB.stp\fR extension. When referring to them on the command-line --however, there in no need to include the \fB.stp\fR extension. The scripts --directory may be changed by setting the SCRIPT_PATH parameter in the --configuration file. -+and must have a \fB.stp\fR extension. When referring to them on the -+command-line however, there in no need to include the \fB.stp\fR extension. -+Script names can only contain alphanumeric characters (and '_') and must not -+start with a number. The scripts directory may be changed by setting the -+SCRIPT_PATH parameter in the configuration file. - - .SH COMMANDS - One of the commands below must be specified: -commit b995b67c225c77fd7b835c0d41b50c9372993b7d -Author: Jonathan Lebon -Date: Mon Jun 23 10:26:52 2014 -0400 - - initscript: invert logic and fix DEFAULT_START - - The logic of is_valid_script_name was inverted. Fix it. - - Also, we need to blank out the list of scripts to start before actually - collecting the valid ones from DEFAULT_START. - -diff --git a/initscript/systemtap.in b/initscript/systemtap.in -index 14e3949..7930b0f 100755 ---- a/initscript/systemtap.in -+++ b/initscript/systemtap.in -@@ -246,7 +246,7 @@ is_valid_script_name () { - # Same rules as stap -m with the addition of starting - # with a non-digit so that valid shell variables can be - # formed from it (for the config file). -- if [[ $1 =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then -+ if ! [[ $1 =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then - log "$1 is not a valid script name (must match [a-zA-Z_][a-zA-Z0-9_]*)" - return 1 - fi -@@ -603,7 +603,8 @@ start () { - start_scripts=$SCRIPTS - if [ -n "$DEFAULT_START" -a -z "$OPT_SCRIPTS" ]; then - -- # Sanity check the names -+ # Only pick the names in DEFAULT_START with valid names -+ start_scripts= - for s in $DEFAULT_START; do - is_valid_script_name $s - [ $? -eq 0 ] && start_scripts="$start_scripts $s" diff --git a/SOURCES/BZ1140952.patch b/SOURCES/BZ1140952.patch deleted file mode 100644 index 0fd41ce..0000000 --- a/SOURCES/BZ1140952.patch +++ /dev/null @@ -1,185 +0,0 @@ -From b8056bd23784a30ceac910a0ff14910bb9aee4c0 Mon Sep 17 00:00:00 2001 -From: Josh Stone -Date: Fri, 12 Sep 2014 15:51:10 -0700 -Subject: [PATCH] stapdyn: use process_vm_readv/writev when possible - -For script deref uses, we were using pread/pwrite on /proc/self/mem. -But thanks to CVE-2012-0056, some kernels have completely disabled -mem_write, so stapdyn guru scripts can't write memory at all. Our -testsuite failed on at_var_lvalue.exp and deref.exp in this case. - -When the process_vm_readv/writev syscalls are available, we can -accomplish the same thing, and don't even need an open fd for it. ---- - runtime/dyninst/copy.c | 106 +++++++++++++++++++++++++++++++++++++++------- - runtime/dyninst/runtime.h | 13 +----- - 2 files changed, 93 insertions(+), 26 deletions(-) - -diff --git a/runtime/dyninst/copy.c b/runtime/dyninst/copy.c -index 4b284542e827..24c17e075b85 100644 ---- a/runtime/dyninst/copy.c -+++ b/runtime/dyninst/copy.c -@@ -11,25 +11,95 @@ - #ifndef _STAPDYN_COPY_C_ - #define _STAPDYN_COPY_C_ - -+#include -+#include -+#include -+ - #include "stp_string.c" - - - static int _stp_mem_fd = -1; - -+ -+static inline __must_check ssize_t __self_readv(const struct iovec *lvec, -+ unsigned long liovcnt, -+ const struct iovec *rvec, -+ unsigned long riovcnt) -+{ -+#if !__GLIBC_PREREQ(2, 15) -+#ifdef __NR_process_vm_readv -+#define process_vm_readv(...) \ -+ syscall(__NR_process_vm_readv, __VA_ARGS__) -+#else -+#define process_vm_readv(...) \ -+ ({ (void)lvec; (void)liovcnt; \ -+ (void)rvec; (void)riovcnt; \ -+ errno = ENOSYS; -1 }) -+#endif -+#endif -+ return process_vm_readv(getpid(), lvec, liovcnt, rvec, riovcnt, 0UL); -+} -+ -+static inline __must_check ssize_t __self_writev(const struct iovec *lvec, -+ unsigned long liovcnt, -+ const struct iovec *rvec, -+ unsigned long riovcnt) -+{ -+#if !__GLIBC_PREREQ(2, 15) -+#ifdef __NR_process_vm_writev -+#define process_vm_writev(...) \ -+ syscall(__NR_process_vm_writev, __VA_ARGS__) -+#else -+#define process_vm_writev(...) \ -+ ({ (void)lvec; (void)liovcnt; \ -+ (void)rvec; (void)riovcnt; \ -+ errno = ENOSYS; -1 }) -+#endif -+#endif -+ return process_vm_writev(getpid(), lvec, liovcnt, rvec, riovcnt, 0UL); -+} -+ -+ -+static int _stp_copy_init(void) -+{ -+ /* Try a no-op process_vm_readv/writev to make sure they're available, -+ * esp. not ENOSYS, then we don't need to bother /proc/self/mem. */ -+ if ((__self_readv(NULL, 0, NULL, 0) == 0) && -+ (__self_writev(NULL, 0, NULL, 0) == 0)) -+ return 0; -+ -+ _stp_mem_fd = open("/proc/self/mem", O_RDWR /*| O_LARGEFILE*/); -+ if (_stp_mem_fd < 0) -+ return -errno; -+ fcntl(_stp_mem_fd, F_SETFD, FD_CLOEXEC); -+ return 0; -+} -+ -+static void _stp_copy_destroy(void) -+{ -+ if (_stp_mem_fd >= 0) { -+ close (_stp_mem_fd); -+ _stp_mem_fd = -1; -+ } -+} -+ -+ - static inline __must_check long __copy_from_user(void *to, - const void __user * from, unsigned long n) - { - int rc = 0; - -- /* -- * The pread syscall is faster than lseek()/read() (since it -- * is only one syscall). Also, if we used lseek()/read() we -- * couldn't use a cached fd - since 2 threads might hit this -- * code at the same time and the 2nd lseek() might finish -- * before the 1st read()... -- */ -- if (pread(_stp_mem_fd, to, n, (off_t)(uintptr_t)from) != n) -- rc = -EFAULT; -+ if (_stp_mem_fd >= 0) { -+ /* pread is like lseek+read, without racing other threads. */ -+ if (pread(_stp_mem_fd, to, n, (off_t)(uintptr_t)from) != n) -+ rc = -EFAULT; -+ } else { -+ struct iovec lvec = { .iov_base = to, .iov_len = n }; -+ struct iovec rvec = { .iov_base = (void *)from, .iov_len = n }; -+ if (__self_readv(&lvec, 1, &rvec, 1) != n) -+ rc = -EFAULT; -+ } -+ - return rc; - } - -@@ -38,12 +108,18 @@ static inline __must_check long __copy_to_user(void *to, const void *from, - { - int rc = 0; - -- /* -- * The pwrite syscall is faster than lseek()/write() (since it -- * is only one syscall). -- */ -- if (pwrite(_stp_mem_fd, from, n, (off_t)(uintptr_t)to) != n) -- rc = -EFAULT; -+ if (_stp_mem_fd >= 0) { -+ /* pwrite is like lseek+write, without racing other threads. */ -+ /* NB: some kernels will refuse to write /proc/self/mem */ -+ if (pwrite(_stp_mem_fd, from, n, (off_t)(uintptr_t)to) != n) -+ rc = -EFAULT; -+ } else { -+ struct iovec lvec = { .iov_base = (void *)from, .iov_len = n }; -+ struct iovec rvec = { .iov_base = to, .iov_len = n }; -+ if (__self_writev(&lvec, 1, &rvec, 1) != n) -+ rc = -EFAULT; -+ } -+ - return rc; - } - -diff --git a/runtime/dyninst/runtime.h b/runtime/dyninst/runtime.h -index 1ae95a8a2eff..55a5faecb258 100644 ---- a/runtime/dyninst/runtime.h -+++ b/runtime/dyninst/runtime.h -@@ -304,13 +304,7 @@ static void stp_dyninst_ctor(void) - { - int rc = 0; - -- _stp_mem_fd = open("/proc/self/mem", O_RDWR /*| O_LARGEFILE*/); -- if (_stp_mem_fd != -1) { -- fcntl(_stp_mem_fd, F_SETFD, FD_CLOEXEC); -- } -- else { -- rc = -errno; -- } -+ rc = _stp_copy_init(); - - if (rc == 0) - rc = _stp_runtime_contexts_init(); -@@ -386,10 +380,7 @@ static void stp_dyninst_dtor(void) - { - _stp_print_cleanup(); - _stp_shm_destroy(); -- -- if (_stp_mem_fd != -1) { -- close (_stp_mem_fd); -- } -+ _stp_copy_destroy(); - } - - #endif /* _STAPDYN_RUNTIME_H_ */ --- -1.9.3 - diff --git a/SOURCES/PR16894.patch b/SOURCES/PR16894.patch deleted file mode 100644 index e631c64..0000000 --- a/SOURCES/PR16894.patch +++ /dev/null @@ -1,234 +0,0 @@ -commit 1dfff0a792aa0e750094aa9642ae8f4991e7e292 -Author: Jonathan Lebon -Date: Thu May 1 16:31:59 2014 -0400 - - cmd_file(): only free words if succeeded - - Otherwise, we may accidentally summon Cthulhu. - -diff --git a/session.cxx b/session.cxx -index 3b968782cacd..f457829a6036 100644 ---- a/session.cxx -+++ b/session.cxx -@@ -1773,8 +1773,10 @@ systemtap_session::cmd_file () - int rc = wordexp (cmd.c_str (), &words, WRDE_NOCMD|WRDE_UNDEF); - string file; - if(rc == 0 && words.we_wordc > 0) -- file = words.we_wordv[0]; -- wordfree (& words); -+ { -+ file = words.we_wordv[0]; -+ wordfree (& words); -+ } - return file; - } - - -commit eb94071d6ed22ae8777f60e67ca5771bc5201093 -Author: Jonathan Lebon -Date: Thu May 1 16:43:09 2014 -0400 - - cmd_file(): properly free the words array - - We should free it regardless if rc > 0. - -diff --git a/session.cxx b/session.cxx -index f457829a6036..c51f3c9bfe45 100644 ---- a/session.cxx -+++ b/session.cxx -@@ -1772,9 +1772,10 @@ systemtap_session::cmd_file () - wordexp_t words; - int rc = wordexp (cmd.c_str (), &words, WRDE_NOCMD|WRDE_UNDEF); - string file; -- if(rc == 0 && words.we_wordc > 0) -+ if(rc == 0) - { -- file = words.we_wordv[0]; -+ if (words.we_wordc > 0) -+ file = words.we_wordv[0]; - wordfree (& words); - } - return file; - -commit fc18e6c49eb6b3c84075253b2935623d44f3cf71 -Author: Jonathan Lebon -Date: Fri May 2 09:43:07 2014 -0400 - - PR16894: give better errors re. -c commands - - This patch allows SystemTap to make the distinction when reporting an - error between no -c command given, and a given but invalid -c command. - - - man/stapprobes.3stap: introduce 'unspecified' verbiage and clear up - restrictions on unspecified process probes - - session.cxx: cmd_file() now throws errors upon wordexp() failures - - tapsets.cxx: (1) handle possibility of error from cmd_file() and chain - with own error if it occurs - (2) separately handle no -c command / empty file - (3) introduce 'unspecified' verbiage in error messages - and point to [man stapprobes] - - tapset-perfmon.cxx: ditto - -diff --git a/man/stapprobes.3stap b/man/stapprobes.3stap -index f2be450ff67c..36f059282514 100644 ---- a/man/stapprobes.3stap -+++ b/man/stapprobes.3stap -@@ -753,11 +753,14 @@ threads will be probed. However, if systemtap was invoked with the - .IR \-c " or " \-x - options, then process probes are restricted to the process - hierarchy associated with the target process. If a process probe is --specified without a PID or FULLPATH, but with the -+unspecified (i.e. without a PID or FULLPATH), but with the - .IR \-c " - option, the PATH of the - .IR \-c " --cmd will be heuristically filled into the process PATH. -+cmd will be heuristically filled into the process PATH. In that case, -+only command parameters are allowed in the \fI-c\fR command (i.e. no -+command substitution allowed and no occurrences of any of these -+characters: '|&;<>(){}'). - - .PP - Third, symbolic static instrumentation compiled into programs and -diff --git a/session.cxx b/session.cxx -index c51f3c9bfe45..3b797cde7b10 100644 ---- a/session.cxx -+++ b/session.cxx -@@ -1778,6 +1778,24 @@ systemtap_session::cmd_file () - file = words.we_wordv[0]; - wordfree (& words); - } -+ else -+ { -+ switch (rc) -+ { -+ case WRDE_BADCHAR: -+ throw SEMANTIC_ERROR(_("command contains illegal characters")); -+ case WRDE_BADVAL: -+ throw SEMANTIC_ERROR(_("command contains undefined shell variables")); -+ case WRDE_CMDSUB: -+ throw SEMANTIC_ERROR(_("command contains command substitutions")); -+ case WRDE_NOSPACE: -+ throw SEMANTIC_ERROR(_("out of memory")); -+ case WRDE_SYNTAX: -+ throw SEMANTIC_ERROR(_("command contains shell syntax errors")); -+ default: -+ throw SEMANTIC_ERROR(_("unspecified wordexp failure")); -+ } -+ } - return file; - } - -diff --git a/tapset-perfmon.cxx b/tapset-perfmon.cxx -index 2d9b6555be1a..f0880e80d356 100644 ---- a/tapset-perfmon.cxx -+++ b/tapset-perfmon.cxx -@@ -323,9 +323,18 @@ perf_builder::build(systemtap_session & sess, - string proc_n; - if ((proc_p = has_null_param(parameters, TOK_PROCESS))) - { -- proc_n = sess.cmd_file(); -+ try -+ { -+ proc_n = sess.cmd_file(); -+ } -+ catch (semantic_error& e) -+ { -+ throw SEMANTIC_ERROR(_("invalid -c command for unspecified process" -+ " probe [man stapprobes]"), NULL, NULL, &e); -+ } - if (proc_n.empty()) -- throw SEMANTIC_ERROR(_("process probe is invalid without a -c COMMAND")); -+ throw SEMANTIC_ERROR(_("unspecified process probe is invalid without a " -+ "-c COMMAND [man stapprobes]")); - } - else - proc_p = get_param(parameters, TOK_PROCESS, proc_n); -diff --git a/tapsets.cxx b/tapsets.cxx -index 8d074d15e15b..ec5047f53903 100644 ---- a/tapsets.cxx -+++ b/tapsets.cxx -@@ -7168,9 +7168,19 @@ dwarf_builder::build(systemtap_session & sess, - module_name = sess.sysroot + module_name; - if(has_null_param(filled_parameters, TOK_PROCESS)) - { -- const string &file = sess.cmd_file(); -+ string file; -+ try -+ { -+ file = sess.cmd_file(); -+ } -+ catch (const semantic_error& e) -+ { -+ throw SEMANTIC_ERROR(_("invalid -c command for unspecified process" -+ " probe [man stapprobes]"), NULL, NULL, &e); -+ } - if(file.empty()) -- throw SEMANTIC_ERROR(_("process probe is invalid without a -c COMMAND")); -+ throw SEMANTIC_ERROR(_("unspecified process probe is invalid without" -+ " a -c COMMAND [man stapprobes]")); - module_name = sess.sysroot + file; - filled_parameters[TOK_PROCESS] = new literal_string(module_name);// this needs to be used in place of the blank map - // in the case of TOK_MARK we need to modify locations as well - -commit 1922e1acf2c08afa8afd0f43c025fd880cbe66fd -Author: Jonathan Lebon -Date: Fri May 2 10:19:06 2014 -0400 - - PR16894: new wordexp.exp to check -c COMMAND handling - - This simple testcase checks that invalid -c COMMANDs for unspecified - process probes are properly handled (e.g. prior to commit eb94071, we - segfaulted). - -diff --git a/testsuite/systemtap.base/wordexp.exp b/testsuite/systemtap.base/wordexp.exp -new file mode 100644 -index 000000000000..0fcb22f2fb2c ---- /dev/null -+++ b/testsuite/systemtap.base/wordexp.exp -@@ -0,0 +1,45 @@ -+set test "wordexp" -+ -+# Makes sure SystemTap gracefully handles various -c failures. -+ -+proc expect_semerror { command experror } { -+ global test -+ set subtest "$test -c \"$command\"" -+ -+ set script "probe process.function(\"foo\") { next }" -+ if {[string length $command]} { -+ eval spawn stap -e {$script} -c {$command} -+ } else { -+ eval spawn stap -e {$script} -+ } -+ -+ set failed 1 -+ expect { -+ -timeout 20 -+ -re "$experror" { -+ set failed 0 -+ } -+ eof { -+ fail "$subtest (eof)" -+ } -+ timeout { -+ kill -INT -[exp_pid] 2 -+ fail "$subtest (timeout)" -+ } -+ } -+ catch {close}; catch {wait} -+ if {!$failed} { -+ pass "$subtest" -+ } -+} -+ -+expect_semerror "" \ -+ "semantic error: unspecified process probe is invalid without a -c COMMAND" -+expect_semerror "ls || true" \ -+ "semantic error: invalid -c command .* illegal characters" -+expect_semerror "ls \$HOPEFULLYTHISISNTACTUALLYDEFINED" \ -+ "semantic error: invalid -c command .* undefined shell variables" -+expect_semerror "ls `out`" \ -+ "semantic error: invalid -c command .* contains command substitutions" -+expect_semerror "ls \"string" \ -+ "semantic error: invalid -c command .* contains shell syntax errors" diff --git a/SOURCES/rhbz1119335.patch b/SOURCES/rhbz1119335.patch new file mode 100644 index 0000000..5b4f7c6 --- /dev/null +++ b/SOURCES/rhbz1119335.patch @@ -0,0 +1,35 @@ +commit 284416e904b3f405cb3ae4220aa79dc61c94236a +Author: Frank Ch. Eigler +Date: Wed Nov 12 11:04:39 2014 -0500 + + RHBZ1119336: document STAP_FIPS_OVERRIDE in man staprun.8 + +diff --git a/staprun/staprun.8 b/staprun/staprun.8 +index b6f014e..82e2e22 100644 +--- a/staprun/staprun.8 ++++ b/staprun/staprun.8 +@@ -279,6 +279,16 @@ Part of the privilege enforcement mechanism may require using a + stap-server and administrative trust in its cryptographic signer; see the + .IR stap\-server (8) + manual page for a for more information. ++ ++.PP ++On a kernel with FIPS mode enabled, staprun normally refuses to attempt to ++load systemtap-generated kernel modules. This is because on some kernels, ++this results in a panic. If your kernel includes corrections such as ++linux commit #002c77a48b47, then you can force staprun to attempt module ++loads anyway, by setting the ++.BR STAP\_FIPS\_OVERRIDE ++environment variable to any value. ++ + .SH FILES + .TP + /lib/modules/VERSION/systemtap +@@ -288,6 +298,7 @@ Users who are only in the + group can install modules + located in this directory. This directory must be owned by the root + user and not be world writable. ++ + .SH SEE ALSO + .IR stap (1), + .IR stapprobes (3stap), diff --git a/SOURCES/rhbz1127591.patch b/SOURCES/rhbz1127591.patch new file mode 100644 index 0000000..78e7400 --- /dev/null +++ b/SOURCES/rhbz1127591.patch @@ -0,0 +1,34 @@ +commit c4a048331603a3fe19c886498e957f5f2a577ed9 +Author: Frank Ch. Eigler +Date: Thu Nov 20 16:30:20 2014 -0500 + + PR17126: put hcall_* kernel tracepoints into blacklist for powerpc + + * tapsets.cxx (tracepoint_query::handle_query_func): Implement + baby blacklist. + +diff --git a/tapsets.cxx b/tapsets.cxx +index 6e2bae5..0b4e0d8 100644 +--- a/tapsets.cxx ++++ b/tapsets.cxx +@@ -10900,6 +10900,20 @@ tracepoint_query::handle_query_func(Dwarf_Die * func) + if (!probed_names.insert(tracepoint_instance).second) + return DWARF_CB_OK; + ++ // PR17126: blacklist ++ if (!sess.guru_mode) ++ { ++ if ((sess.architecture.substr(0,3) == "ppc" || ++ sess.architecture.substr(0,7) == "powerpc") && ++ (tracepoint_instance == "hcall_entry" || ++ tracepoint_instance == "hcall_exit")) ++ { ++ sess.print_warning(_F("tracepoint %s is blacklisted on architecture %s", ++ tracepoint_instance.c_str(), sess.architecture.c_str())); ++ return DWARF_CB_OK; ++ } ++ } ++ + derived_probe *dp = new tracepoint_derived_probe (dw.sess, dw, *func, + tracepoint_instance, + base_probe, base_loc); diff --git a/SOURCES/rhbz1128209.patch b/SOURCES/rhbz1128209.patch new file mode 100644 index 0000000..500cc57 --- /dev/null +++ b/SOURCES/rhbz1128209.patch @@ -0,0 +1,878 @@ +commit aadc1c78eea8969d453341b50baa958dfe18ffe8 +Author: Frank Ch. Eigler +Date: Fri Feb 13 14:39:03 2015 -0500 + + BZ1128209: add a configure --{enable,disable}-virt option + + It was desirable that a systemtap rpm be buildable in a predictable + manner (in this case, without virthost support), even if prerequisites + (libvirt etc.) were accidentally installed. + +diff --git a/Makefile.am b/Makefile.am +index 6699894..5adcca4 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -54,8 +54,7 @@ noinst_HEADERS = sdt_types.h + stap_LDADD = @stap_LIBS@ @sqlite3_LIBS@ @LIBINTL@ -lpthread + stap_DEPENDENCIES = + +-if HAVE_LIBVIRT +-if HAVE_LIBXML2 ++if BUILD_VIRT + bin_PROGRAMS += stapvirt + stapvirt_SOURCES = stapvirt.c + stapvirt_CFLAGS = $(AM_CFLAGS) +@@ -63,7 +62,6 @@ stapvirt_CFLAGS += $(libvirt_CFLAGS) $(libxml2_CFLAGS) + stapvirt_LDFLAGS = $(AM_LDFLAGS) + stapvirt_LDADD = $(libvirt_LIBS) $(libxml2_LIBS) + endif +-endif + + endif + +diff --git a/Makefile.in b/Makefile.in +index f1fe6d6..c59a5ca 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -91,7 +91,7 @@ bin_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) + @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_4 = stap-serverd stap-gen-cert + @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_5 = stap-server + @BUILD_SERVER_TRUE@@BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@am__append_6 = stap-start-server stap-stop-server +-@BUILD_TRANSLATOR_TRUE@@HAVE_LIBVIRT_TRUE@@HAVE_LIBXML2_TRUE@am__append_7 = stapvirt ++@BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@am__append_7 = stapvirt + @BUILD_TRANSLATOR_TRUE@@HAVE_AVAHI_TRUE@am__append_8 = $(avahi_CFLAGS) + @BUILD_TRANSLATOR_TRUE@@HAVE_AVAHI_TRUE@am__append_9 = $(avahi_CFLAGS) + @BUILD_TRANSLATOR_TRUE@@HAVE_AVAHI_TRUE@am__append_10 = $(avahi_LIBS) +@@ -147,7 +147,8 @@ CONFIG_CLEAN_FILES = includes/sys/sdt-config.h \ + staprun/guest/stapsh@.service + CONFIG_CLEAN_VPATH_FILES = + @BUILD_TRANSLATOR_TRUE@am__EXEEXT_1 = stap$(EXEEXT) +-@BUILD_TRANSLATOR_TRUE@@HAVE_LIBVIRT_TRUE@@HAVE_LIBXML2_TRUE@am__EXEEXT_2 = stapvirt$(EXEEXT) ++@BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@am__EXEEXT_2 = \ ++@BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@ stapvirt$(EXEEXT) + am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibexecdir)" \ + "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibexecdir)" \ + "$(DESTDIR)$(oldincludedir)" +@@ -250,10 +251,11 @@ stap_sign_module_OBJECTS = $(am_stap_sign_module_OBJECTS) + @BUILD_TRANSLATOR_TRUE@@HAVE_NSS_TRUE@ $(am__DEPENDENCIES_1) + stap_sign_module_LINK = $(CXXLD) $(stap_sign_module_CXXFLAGS) \ + $(CXXFLAGS) $(stap_sign_module_LDFLAGS) $(LDFLAGS) -o $@ +-@BUILD_TRANSLATOR_TRUE@@HAVE_LIBVIRT_TRUE@@HAVE_LIBXML2_TRUE@am_stapvirt_OBJECTS = stapvirt-stapvirt.$(OBJEXT) ++@BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@am_stapvirt_OBJECTS = stapvirt-stapvirt.$(OBJEXT) + stapvirt_OBJECTS = $(am_stapvirt_OBJECTS) +-@BUILD_TRANSLATOR_TRUE@@HAVE_LIBVIRT_TRUE@@HAVE_LIBXML2_TRUE@stapvirt_DEPENDENCIES = $(am__DEPENDENCIES_1) \ +-@BUILD_TRANSLATOR_TRUE@@HAVE_LIBVIRT_TRUE@@HAVE_LIBXML2_TRUE@ $(am__DEPENDENCIES_1) ++@BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@stapvirt_DEPENDENCIES = \ ++@BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@ $(am__DEPENDENCIES_1) \ ++@BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@ $(am__DEPENDENCIES_1) + stapvirt_LINK = $(CCLD) $(stapvirt_CFLAGS) $(CFLAGS) \ + $(stapvirt_LDFLAGS) $(LDFLAGS) -o $@ + am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +@@ -447,8 +449,6 @@ PIECFLAGS = @PIECFLAGS@ + PIECXXFLAGS = @PIECXXFLAGS@ + PIELDFLAGS = @PIELDFLAGS@ + PKG_CONFIG = @PKG_CONFIG@ +-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ + POSUB = @POSUB@ + PUBLICAN_BRAND = @PUBLICAN_BRAND@ + RANLIB = @RANLIB@ +@@ -580,12 +580,13 @@ oldinclude_HEADERS = includes/sys/sdt.h includes/sys/sdt-config.h + @BUILD_TRANSLATOR_TRUE@ @LIBINTL@ -lpthread $(am__append_10) \ + @BUILD_TRANSLATOR_TRUE@ $(am__append_15) + @BUILD_TRANSLATOR_TRUE@stap_DEPENDENCIES = $(am__append_21) +-@BUILD_TRANSLATOR_TRUE@@HAVE_LIBVIRT_TRUE@@HAVE_LIBXML2_TRUE@stapvirt_SOURCES = stapvirt.c +-@BUILD_TRANSLATOR_TRUE@@HAVE_LIBVIRT_TRUE@@HAVE_LIBXML2_TRUE@stapvirt_CFLAGS = $(AM_CFLAGS) \ +-@BUILD_TRANSLATOR_TRUE@@HAVE_LIBVIRT_TRUE@@HAVE_LIBXML2_TRUE@ $(libvirt_CFLAGS) \ +-@BUILD_TRANSLATOR_TRUE@@HAVE_LIBVIRT_TRUE@@HAVE_LIBXML2_TRUE@ $(libxml2_CFLAGS) +-@BUILD_TRANSLATOR_TRUE@@HAVE_LIBVIRT_TRUE@@HAVE_LIBXML2_TRUE@stapvirt_LDFLAGS = $(AM_LDFLAGS) +-@BUILD_TRANSLATOR_TRUE@@HAVE_LIBVIRT_TRUE@@HAVE_LIBXML2_TRUE@stapvirt_LDADD = $(libvirt_LIBS) $(libxml2_LIBS) ++@BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@stapvirt_SOURCES = stapvirt.c ++@BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@stapvirt_CFLAGS = \ ++@BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@ $(AM_CFLAGS) \ ++@BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@ $(libvirt_CFLAGS) \ ++@BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@ $(libxml2_CFLAGS) ++@BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@stapvirt_LDFLAGS = $(AM_LDFLAGS) ++@BUILD_TRANSLATOR_TRUE@@BUILD_VIRT_TRUE@stapvirt_LDADD = $(libvirt_LIBS) $(libxml2_LIBS) + + # Arrange for git_version.h to be regenerated at every "make". + # Code fragment is based upon RadeonHD.am. +diff --git a/aclocal.m4 b/aclocal.m4 +index be5bd31..c261205 100644 +--- a/aclocal.m4 ++++ b/aclocal.m4 +@@ -20,8 +20,8 @@ You have another version of autoconf. It may work, but is not guaranteed to. + If you have problems, you may need to regenerate the build system entirely. + To do so, use the procedure documented by the package, typically 'autoreconf'.])]) + +-# intlmacosx.m4 serial 5 (gettext-0.18.2) +-dnl Copyright (C) 2004-2013 Free Software Foundation, Inc. ++# intlmacosx.m4 serial 1 (gettext-0.17) ++dnl Copyright (C) 2004-2007 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. +@@ -35,40 +35,35 @@ dnl by the GNU Library General Public License, and the rest of the GNU + dnl gettext package package is covered by the GNU General Public License. + dnl They are *not* in the public domain. + +-dnl Checks for special options needed on Mac OS X. ++dnl Checks for special options needed on MacOS X. + dnl Defines INTL_MACOSX_LIBS. + AC_DEFUN([gt_INTL_MACOSX], + [ +- dnl Check for API introduced in Mac OS X 10.2. ++ dnl Check for API introduced in MacOS X 10.2. + AC_CACHE_CHECK([for CFPreferencesCopyAppValue], +- [gt_cv_func_CFPreferencesCopyAppValue], ++ gt_cv_func_CFPreferencesCopyAppValue, + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" +- AC_LINK_IFELSE( +- [AC_LANG_PROGRAM( +- [[#include ]], +- [[CFPreferencesCopyAppValue(NULL, NULL)]])], ++ AC_TRY_LINK([#include ], ++ [CFPreferencesCopyAppValue(NULL, NULL)], + [gt_cv_func_CFPreferencesCopyAppValue=yes], + [gt_cv_func_CFPreferencesCopyAppValue=no]) + LIBS="$gt_save_LIBS"]) + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then +- AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], +- [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) ++ AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1, ++ [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) + fi +- dnl Check for API introduced in Mac OS X 10.3. +- AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], ++ dnl Check for API introduced in MacOS X 10.3. ++ AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" +- AC_LINK_IFELSE( +- [AC_LANG_PROGRAM( +- [[#include ]], +- [[CFLocaleCopyCurrent();]])], ++ AC_TRY_LINK([#include ], [CFLocaleCopyCurrent();], + [gt_cv_func_CFLocaleCopyCurrent=yes], + [gt_cv_func_CFLocaleCopyCurrent=no]) + LIBS="$gt_save_LIBS"]) + if test $gt_cv_func_CFLocaleCopyCurrent = yes; then +- AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], +- [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) ++ AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1, ++ [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) + fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then +@@ -78,7 +73,6 @@ AC_DEFUN([gt_INTL_MACOSX], + ]) + + # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +-# serial 1 (pkg-config-0.24) + # + # Copyright © 2004 Scott James Remnant . + # +@@ -105,12 +99,8 @@ AC_DEFUN([gt_INTL_MACOSX], + # ---------------------------------- + AC_DEFUN([PKG_PROG_PKG_CONFIG], + [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +-m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +-m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) +-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) +-AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) +-AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) +- ++m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) ++AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) + fi +@@ -123,6 +113,7 @@ if test -n "$PKG_CONFIG"; then + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi ++ + fi[]dnl + ])# PKG_PROG_PKG_CONFIG + +@@ -131,20 +122,21 @@ fi[]dnl + # Check to see whether a particular set of modules exists. Similar + # to PKG_CHECK_MODULES(), but does not set variables or print errors. + # +-# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +-# only at the first occurence in configure.ac, so if the first place +-# it's called might be skipped (such as if it is within an "if", you +-# have to call PKG_CHECK_EXISTS manually ++# ++# Similar to PKG_CHECK_MODULES, make sure that the first instance of ++# this or PKG_CHECK_MODULES is called, or make sure to call ++# PKG_CHECK_EXISTS manually + # -------------------------------------------------------------- + AC_DEFUN([PKG_CHECK_EXISTS], + [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl + if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then +- m4_default([$2], [:]) ++ m4_ifval([$2], [$2], [:]) + m4_ifvaln([$3], [else + $3])dnl + fi]) + ++ + # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) + # --------------------------------------------- + m4_define([_PKG_CONFIG], +@@ -152,8 +144,7 @@ m4_define([_PKG_CONFIG], + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], +- [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes ], ++ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + else + pkg_failed=untried +@@ -198,17 +189,16 @@ and $1[]_LIBS to avoid the need to call pkg-config. + See the pkg-config man page for more details.]) + + if test $pkg_failed = yes; then +- AC_MSG_RESULT([no]) + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then +- $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` ++ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` + else +- $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` ++ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + +- m4_default([$4], [AC_MSG_ERROR( ++ ifelse([$4], , [AC_MSG_ERROR(dnl + [Package requirements ($2) were not met: + + $$1_PKG_ERRORS +@@ -216,67 +206,28 @@ $$1_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you + installed software in a non-standard prefix. + +-_PKG_TEXT])[]dnl +- ]) ++_PKG_TEXT ++])], ++ [AC_MSG_RESULT([no]) ++ $4]) + elif test $pkg_failed = untried; then +- AC_MSG_RESULT([no]) +- m4_default([$4], [AC_MSG_FAILURE( ++ ifelse([$4], , [AC_MSG_FAILURE(dnl + [The pkg-config script could not be found or is too old. Make sure it + is in your PATH or set the PKG_CONFIG environment variable to the full + path to pkg-config. + + _PKG_TEXT + +-To get pkg-config, see .])[]dnl +- ]) ++To get pkg-config, see .])], ++ [$4]) + else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) +- $3 ++ ifelse([$3], , :, [$3]) + fi[]dnl + ])# PKG_CHECK_MODULES + +- +-# PKG_INSTALLDIR(DIRECTORY) +-# ------------------------- +-# Substitutes the variable pkgconfigdir as the location where a module +-# should install pkg-config .pc files. By default the directory is +-# $libdir/pkgconfig, but the default can be changed by passing +-# DIRECTORY. The user can override through the --with-pkgconfigdir +-# parameter. +-AC_DEFUN([PKG_INSTALLDIR], +-[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) +-m4_pushdef([pkg_description], +- [pkg-config installation directory @<:@]pkg_default[@:>@]) +-AC_ARG_WITH([pkgconfigdir], +- [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, +- [with_pkgconfigdir=]pkg_default) +-AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) +-m4_popdef([pkg_default]) +-m4_popdef([pkg_description]) +-]) dnl PKG_INSTALLDIR +- +- +-# PKG_NOARCH_INSTALLDIR(DIRECTORY) +-# ------------------------- +-# Substitutes the variable noarch_pkgconfigdir as the location where a +-# module should install arch-independent pkg-config .pc files. By +-# default the directory is $datadir/pkgconfig, but the default can be +-# changed by passing DIRECTORY. The user can override through the +-# --with-noarch-pkgconfigdir parameter. +-AC_DEFUN([PKG_NOARCH_INSTALLDIR], +-[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) +-m4_pushdef([pkg_description], +- [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) +-AC_ARG_WITH([noarch-pkgconfigdir], +- [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, +- [with_noarch_pkgconfigdir=]pkg_default) +-AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) +-m4_popdef([pkg_default]) +-m4_popdef([pkg_description]) +-]) dnl PKG_NOARCH_INSTALLDIR +- + # Copyright (C) 2002-2013 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation +diff --git a/configure b/configure +index e6f0d2d..567a5d3 100755 +--- a/configure ++++ b/configure +@@ -642,6 +642,8 @@ HAVE_SELINUX_TRUE + selinux_LIBS + selinux_CFLAGS + support_section_question ++BUILD_VIRT_FALSE ++BUILD_VIRT_TRUE + HAVE_LIBXML2_FALSE + HAVE_LIBXML2_TRUE + libxml2_LIBS +@@ -671,8 +673,6 @@ HAVE_NSS_FALSE + HAVE_NSS_TRUE + nss_LIBS + nss_CFLAGS +-PKG_CONFIG_LIBDIR +-PKG_CONFIG_PATH + PKG_CONFIG + BUILD_PDFREFDOCS_FALSE + BUILD_PDFREFDOCS_TRUE +@@ -860,6 +860,7 @@ with_avahi + with_rpm + with_elfutils + with_dyninst ++enable_virt + with_selinux + with_java + with_extra_version +@@ -877,8 +878,6 @@ CXX + CXXFLAGS + CCC + PKG_CONFIG +-PKG_CONFIG_PATH +-PKG_CONFIG_LIBDIR + nss_CFLAGS + nss_LIBS + avahi_CFLAGS +@@ -1541,6 +1540,8 @@ Optional Features: + if xmlto etc. found and other documentation built). + --enable-server enable building of stap-server (default on if nss + etc. found). ++ --enable-virt enable building of stapvirt support (default on if ++ libvirt etc. found). + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -1578,10 +1579,6 @@ Some influential environment variables: + CXX C++ compiler command + CXXFLAGS C++ compiler flags + PKG_CONFIG path to pkg-config utility +- PKG_CONFIG_PATH +- directories to add to pkg-config's search path +- PKG_CONFIG_LIBDIR +- path overriding pkg-config's built-in search path + nss_CFLAGS C compiler flags for nss, overriding pkg-config + nss_LIBS linker flags for nss, overriding pkg-config + avahi_CFLAGS +@@ -9913,11 +9910,6 @@ fi + + + +- +- +- +- +- + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +@@ -10030,6 +10022,7 @@ $as_echo "yes" >&6; } + $as_echo "no" >&6; } + PKG_CONFIG="" + fi ++ + fi + if test "x$with_nss" != "xno"; then : + +@@ -10048,7 +10041,6 @@ if test -n "$nss_CFLAGS"; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_nss_CFLAGS=`$PKG_CONFIG --cflags "nss >= 3" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes + fi +@@ -10065,7 +10057,6 @@ if test -n "$nss_LIBS"; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_nss_LIBS=`$PKG_CONFIG --libs "nss >= 3" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes + fi +@@ -10076,8 +10067,6 @@ fi + + + if test $pkg_failed = yes; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } + + if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +@@ -10085,17 +10074,17 @@ else + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- nss_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "nss >= 3" 2>&1` ++ nss_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "nss >= 3" 2>&1` + else +- nss_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "nss >= 3" 2>&1` ++ nss_PKG_ERRORS=`$PKG_CONFIG --print-errors "nss >= 3" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$nss_PKG_ERRORS" >&5 + +- have_nss=no +-elif test $pkg_failed = untried; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } ++ have_nss=no ++elif test $pkg_failed = untried; then + have_nss=no + else + nss_CFLAGS=$pkg_cv_nss_CFLAGS +@@ -10174,7 +10163,6 @@ if test -n "$avahi_CFLAGS"; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_avahi_CFLAGS=`$PKG_CONFIG --cflags "avahi-client" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes + fi +@@ -10191,7 +10179,6 @@ if test -n "$avahi_LIBS"; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_avahi_LIBS=`$PKG_CONFIG --libs "avahi-client" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes + fi +@@ -10202,8 +10189,6 @@ fi + + + if test $pkg_failed = yes; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } + + if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +@@ -10211,17 +10196,17 @@ else + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- avahi_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "avahi-client" 2>&1` ++ avahi_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "avahi-client" 2>&1` + else +- avahi_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "avahi-client" 2>&1` ++ avahi_PKG_ERRORS=`$PKG_CONFIG --print-errors "avahi-client" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$avahi_PKG_ERRORS" >&5 + +- have_avahi=no +-elif test $pkg_failed = untried; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } ++ have_avahi=no ++elif test $pkg_failed = untried; then + have_avahi=no + else + avahi_CFLAGS=$pkg_cv_avahi_CFLAGS +@@ -10889,6 +10874,15 @@ fi + + + ++# Check whether --enable-virt was given. ++if test "${enable_virt+set}" = set; then : ++ enableval=$enable_virt; enable_virt=$enableval ++else ++ enable_virt="check" ++fi ++ ++ ++ + pkg_failed=no + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libvirt" >&5 + $as_echo_n "checking for libvirt... " >&6; } +@@ -10903,7 +10897,6 @@ if test -n "$libvirt_CFLAGS"; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_libvirt_CFLAGS=`$PKG_CONFIG --cflags "libvirt >= 1.0.2" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes + fi +@@ -10920,7 +10913,6 @@ if test -n "$libvirt_LIBS"; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_libvirt_LIBS=`$PKG_CONFIG --libs "libvirt >= 1.0.2" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes + fi +@@ -10931,8 +10923,6 @@ fi + + + if test $pkg_failed = yes; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } + + if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +@@ -10940,17 +10930,17 @@ else + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- libvirt_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libvirt >= 1.0.2" 2>&1` ++ libvirt_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libvirt >= 1.0.2" 2>&1` + else +- libvirt_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libvirt >= 1.0.2" 2>&1` ++ libvirt_PKG_ERRORS=`$PKG_CONFIG --print-errors "libvirt >= 1.0.2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$libvirt_PKG_ERRORS" >&5 + +- have_libvirt=no +-elif test $pkg_failed = untried; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } ++ have_libvirt=no ++elif test $pkg_failed = untried; then + have_libvirt=no + else + libvirt_CFLAGS=$pkg_cv_libvirt_CFLAGS +@@ -10987,7 +10977,6 @@ if test -n "$libxml2_CFLAGS"; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_libxml2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes + fi +@@ -11004,7 +10993,6 @@ if test -n "$libxml2_LIBS"; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_libxml2_LIBS=`$PKG_CONFIG --libs "libxml-2.0" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes + fi +@@ -11015,8 +11003,6 @@ fi + + + if test $pkg_failed = yes; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } + + if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +@@ -11024,17 +11010,17 @@ else + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- libxml2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0" 2>&1` ++ libxml2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libxml-2.0" 2>&1` + else +- libxml2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0" 2>&1` ++ libxml2_PKG_ERRORS=`$PKG_CONFIG --print-errors "libxml-2.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$libxml2_PKG_ERRORS" >&5 + +- have_libxml2=no +-elif test $pkg_failed = untried; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } ++ have_libxml2=no ++elif test $pkg_failed = untried; then + have_libxml2=no + else + libxml2_CFLAGS=$pkg_cv_libxml2_CFLAGS +@@ -11057,6 +11043,26 @@ else + fi + + ++if test "$enable_virt" != "no"; then ++ if test "x${have_libvirt}" != "xyes"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: will not build systemtap virt support, cannot find libvirt headers" >&5 ++$as_echo "$as_me: WARNING: will not build systemtap virt support, cannot find libvirt headers" >&2;} ++ fi ++ if test "x${have_libxml2}" != "xyes"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: will not build systemtap virt support, cannot find xml2 headers" >&5 ++$as_echo "$as_me: WARNING: will not build systemtap virt support, cannot find xml2 headers" >&2;} ++ fi ++fi ++ if test "${have_libvirt}" == "yes" -a "${have_libxml2}" == "yes" -a "$enable_virt" != "no"; then ++ BUILD_VIRT_TRUE= ++ BUILD_VIRT_FALSE='#' ++else ++ BUILD_VIRT_TRUE='#' ++ BUILD_VIRT_FALSE= ++fi ++ ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler .section \"?\" flags support" >&5 + $as_echo_n "checking for assembler .section \"?\" flags support... " >&6; } + if ${stap_cv_sectionq+:} false; then : +@@ -11188,7 +11194,6 @@ if test -n "$selinux_CFLAGS"; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_selinux_CFLAGS=`$PKG_CONFIG --cflags "libselinux" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes + fi +@@ -11205,7 +11210,6 @@ if test -n "$selinux_LIBS"; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_selinux_LIBS=`$PKG_CONFIG --libs "libselinux" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes + fi +@@ -11216,8 +11220,6 @@ fi + + + if test $pkg_failed = yes; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } + + if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +@@ -11225,17 +11227,17 @@ else + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- selinux_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libselinux" 2>&1` ++ selinux_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libselinux" 2>&1` + else +- selinux_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libselinux" 2>&1` ++ selinux_PKG_ERRORS=`$PKG_CONFIG --print-errors "libselinux" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$selinux_PKG_ERRORS" >&5 + +- have_selinux=no +-elif test $pkg_failed = untried; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } ++ have_selinux=no ++elif test $pkg_failed = untried; then + have_selinux=no + else + selinux_CFLAGS=$pkg_cv_selinux_CFLAGS +@@ -11678,6 +11680,10 @@ if test -z "${HAVE_LIBXML2_TRUE}" && test -z "${HAVE_LIBXML2_FALSE}"; then + as_fn_error $? "conditional \"HAVE_LIBXML2\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${BUILD_VIRT_TRUE}" && test -z "${BUILD_VIRT_FALSE}"; then ++ as_fn_error $? "conditional \"BUILD_VIRT\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${HAVE_SELINUX_TRUE}" && test -z "${HAVE_SELINUX_FALSE}"; then + as_fn_error $? "conditional \"HAVE_SELINUX\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +diff --git a/configure.ac b/configure.ac +index b540354..1778eff 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -526,8 +526,15 @@ if test "$with_dyninst" != "no"; then + fi + AM_CONDITIONAL([HAVE_DYNINST], [test "${have_dyninst}" = "yes"]) + ++ + dnl Check for the libvirt and libxml2 devel packages + ++AC_ARG_ENABLE([virt], ++ AS_HELP_STRING([--enable-virt], ++ [enable building of stapvirt support (default on if libvirt etc. found).]), ++ [enable_virt=$enableval], ++ [enable_virt="check"]) ++ + dnl We require libvirt >= 1.0.2 because stapvirt relies on the + dnl virDomainOpenChannel function, which was implemented in 1.0.2. + PKG_CHECK_MODULES([libvirt], [libvirt >= 1.0.2], [ +@@ -541,6 +548,18 @@ PKG_CHECK_MODULES([libxml2], [libxml-2.0], [ + ], [have_libxml2=no]) + AM_CONDITIONAL([HAVE_LIBXML2], [test "${have_libxml2}" = "yes"]) + ++if test "$enable_virt" != "no"; then ++dnl See if we have enough libraries and tools to build the virt server ++ if test "x${have_libvirt}" != "xyes"; then ++ AC_MSG_WARN([will not build systemtap virt support, cannot find libvirt headers]) ++ fi ++ if test "x${have_libxml2}" != "xyes"; then ++ AC_MSG_WARN([will not build systemtap virt support, cannot find xml2 headers]) ++ fi ++fi ++AM_CONDITIONAL([BUILD_VIRT], [test "${have_libvirt}" == "yes" -a "${have_libxml2}" == "yes" -a "$enable_virt" != "no"]) ++ ++ + AC_CACHE_CHECK([for assembler .section "?" flags support], stap_cv_sectionq, [ + old_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Wa,--fatal-warnings" +diff --git a/doc/Makefile.in b/doc/Makefile.in +index 45521e6..7a070ef 100644 +--- a/doc/Makefile.in ++++ b/doc/Makefile.in +@@ -216,8 +216,6 @@ PIECFLAGS = @PIECFLAGS@ + PIECXXFLAGS = @PIECXXFLAGS@ + PIELDFLAGS = @PIELDFLAGS@ + PKG_CONFIG = @PKG_CONFIG@ +-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ + POSUB = @POSUB@ + PUBLICAN_BRAND = @PUBLICAN_BRAND@ + RANLIB = @RANLIB@ +diff --git a/doc/SystemTap_Tapset_Reference/Makefile.in b/doc/SystemTap_Tapset_Reference/Makefile.in +index c2f515a..52b4978 100644 +--- a/doc/SystemTap_Tapset_Reference/Makefile.in ++++ b/doc/SystemTap_Tapset_Reference/Makefile.in +@@ -225,8 +225,6 @@ PIECFLAGS = @PIECFLAGS@ + PIECXXFLAGS = @PIECXXFLAGS@ + PIELDFLAGS = @PIELDFLAGS@ + PKG_CONFIG = @PKG_CONFIG@ +-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ + POSUB = @POSUB@ + PUBLICAN_BRAND = @PUBLICAN_BRAND@ + RANLIB = @RANLIB@ +diff --git a/doc/beginners/Makefile.in b/doc/beginners/Makefile.in +index 4eba062..bafb973 100644 +--- a/doc/beginners/Makefile.in ++++ b/doc/beginners/Makefile.in +@@ -188,8 +188,6 @@ PIECFLAGS = @PIECFLAGS@ + PIECXXFLAGS = @PIECXXFLAGS@ + PIELDFLAGS = @PIELDFLAGS@ + PKG_CONFIG = @PKG_CONFIG@ +-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ + POSUB = @POSUB@ + PUBLICAN_BRAND = @PUBLICAN_BRAND@ + RANLIB = @RANLIB@ +diff --git a/java/Makefile.in b/java/Makefile.in +index f5eec5a..a881a1e 100644 +--- a/java/Makefile.in ++++ b/java/Makefile.in +@@ -271,8 +271,6 @@ PIECFLAGS = @PIECFLAGS@ + PIECXXFLAGS = @PIECXXFLAGS@ + PIELDFLAGS = @PIELDFLAGS@ + PKG_CONFIG = @PKG_CONFIG@ +-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ + POSUB = @POSUB@ + PUBLICAN_BRAND = @PUBLICAN_BRAND@ + RANLIB = @RANLIB@ +diff --git a/man/Makefile.am b/man/Makefile.am +index ef0892e..4116ff5 100644 +--- a/man/Makefile.am ++++ b/man/Makefile.am +@@ -28,9 +28,7 @@ man_MANS += stap-server.8 + endif + endif + +-if HAVE_LIBVIRT +-if HAVE_LIBXML2 ++if BUILD_VIRT + man_MANS += stapvirt.1 + endif +-endif + +diff --git a/man/Makefile.in b/man/Makefile.in +index ae68814..2c7493f 100644 +--- a/man/Makefile.in ++++ b/man/Makefile.in +@@ -82,7 +82,7 @@ host_triplet = @host@ + target_triplet = @target@ + @BUILD_TRANSLATOR_TRUE@am__append_1 = stap.1 stap-prep.1 stap-report.1 + @BUILD_SERVER_TRUE@@HAVE_NSS_TRUE@am__append_2 = stap-server.8 +-@HAVE_LIBVIRT_TRUE@@HAVE_LIBXML2_TRUE@am__append_3 = stapvirt.1 ++@BUILD_VIRT_TRUE@am__append_3 = stapvirt.1 + subdir = man + DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/stappaths.7.in $(srcdir)/systemtap.8.in +@@ -221,8 +221,6 @@ PIECFLAGS = @PIECFLAGS@ + PIECXXFLAGS = @PIECXXFLAGS@ + PIELDFLAGS = @PIELDFLAGS@ + PKG_CONFIG = @PKG_CONFIG@ +-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ + POSUB = @POSUB@ + PUBLICAN_BRAND = @PUBLICAN_BRAND@ + RANLIB = @RANLIB@ +diff --git a/stapdyn/Makefile.in b/stapdyn/Makefile.in +index f384d0f..fe85082 100644 +--- a/stapdyn/Makefile.in ++++ b/stapdyn/Makefile.in +@@ -280,8 +280,6 @@ PIECFLAGS = @PIECFLAGS@ + PIECXXFLAGS = @PIECXXFLAGS@ + PIELDFLAGS = @PIELDFLAGS@ + PKG_CONFIG = @PKG_CONFIG@ +-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ + POSUB = @POSUB@ + PUBLICAN_BRAND = @PUBLICAN_BRAND@ + RANLIB = @RANLIB@ +diff --git a/staprun/Makefile.in b/staprun/Makefile.in +index 525b9e8..4596c96 100644 +--- a/staprun/Makefile.in ++++ b/staprun/Makefile.in +@@ -319,8 +319,6 @@ PIECFLAGS = @PIECFLAGS@ + PIECXXFLAGS = @PIECXXFLAGS@ + PIELDFLAGS = @PIELDFLAGS@ + PKG_CONFIG = @PKG_CONFIG@ +-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ + POSUB = @POSUB@ + PUBLICAN_BRAND = @PUBLICAN_BRAND@ + RANLIB = @RANLIB@ +diff --git a/systemtap.spec b/systemtap.spec +index f78783e..eded870 100644 +--- a/systemtap.spec ++++ b/systemtap.spec +@@ -470,7 +470,13 @@ cd .. + %global java_config --without-java + %endif + +-%configure %{?elfutils_config} %{dyninst_config} %{sqlite_config} %{crash_config} %{docs_config} %{pie_config} %{publican_config} %{rpm_config} %{java_config} --disable-silent-rules --with-extra-version="rpm %{version}-%{release}" ++%if %{with_virthost} ++%global virt_config --enable-virt ++%else ++%global virt_config --disable-virt ++%endif ++ ++%configure %{?elfutils_config} %{dyninst_config} %{sqlite_config} %{crash_config} %{docs_config} %{pie_config} %{publican_config} %{rpm_config} %{java_config} %{virt_config} --disable-silent-rules --with-extra-version="rpm %{version}-%{release}" + make %{?_smp_mflags} + + %if %{with_emacsvim} diff --git a/SOURCES/rhbz1139844.patch b/SOURCES/rhbz1139844.patch new file mode 100644 index 0000000..db919ee --- /dev/null +++ b/SOURCES/rhbz1139844.patch @@ -0,0 +1,58 @@ +From c486eff3f809b5ce544d5a032198e7680f2b7f2b Mon Sep 17 00:00:00 2001 +From: Stan Cox +Date: Tue, 9 Sep 2014 15:07:44 -0400 +Subject: [PATCH] Add -fpic -fPIC to the list of accepted but ignored dtrace + options. + +* dtrace.in (main): Add ignore_options. +--- + dtrace.in | 4 +++- + testsuite/systemtap.base/dtrace.exp | 8 ++++---- + 2 files changed, 7 insertions(+), 5 deletions(-) + +diff --git a/dtrace.in b/dtrace.in +index d5f189d4fc9e..2f9fb6307e28 100644 +--- a/dtrace.in ++++ b/dtrace.in +@@ -305,6 +305,8 @@ def main(): + s_filename = "" + includes = [] + defines = [] ++ ignore_options = ["-64", "-32", "-fpic", "-fPIC"] ++ + while i < len(sys.argv): + if sys.argv[i] == "-o": + i += 1 +@@ -330,7 +332,7 @@ def main(): + HAVE_PYP = False + elif sys.argv[i] == "--types": + print sys.argv[0] + ": note: obsolete option --types used" +- elif sys.argv[i] == "-64" or sys.argv[i] == "-32": ++ elif sys.argv[i] in ignore_options: + pass # dtrace users sometimes pass these flags + elif sys.argv[i] == "--help": + dtrace_help() +diff --git a/testsuite/systemtap.base/dtrace.exp b/testsuite/systemtap.base/dtrace.exp +index 252dad90ede5..e029748100d6 100644 +--- a/testsuite/systemtap.base/dtrace.exp ++++ b/testsuite/systemtap.base/dtrace.exp +@@ -53,12 +53,12 @@ set incpath "/tmp/dtrace_inc" + # ----------------------------------------------------------------- + # test command line option and file handling + +-verbose -log "$dtrace -G -s $dpath -o XXX.o" +-catch {exec $dtrace -G -s $dpath -o XXX.o} ++verbose -log "$dtrace -G -64 -fPIC -s $dpath -o XXX.o" ++catch {exec $dtrace -G -64 -fPIC -s $dpath -o XXX.o} + if {[file exists XXX.o]} then { +- pass "dtrace -G -o XXX.o" ++ pass "dtrace -G -64 -fPIC -o XXX.o" + } else { +- fail "dtrace -G -o XXX.o" ++ fail "dtrace -G -64 -fPIC -o XXX.o" + } + exec rm -f XXX.o + +-- +1.9.3 + diff --git a/SOURCES/rhbz1141919.patch b/SOURCES/rhbz1141919.patch new file mode 100644 index 0000000..a1db25a --- /dev/null +++ b/SOURCES/rhbz1141919.patch @@ -0,0 +1,41 @@ +commit f48e4f1c41b8d5e6fbee05500f59a5367b964193 (HEAD, master) +Author: Frank Ch. Eigler +Date: Fri Sep 19 15:58:00 2014 -0400 + + staplog.c: add some more per-arch macros w/ protection + + Some platforms define PPC etc. before staplog.c, so we must + not conflict. Some new platforms need to be listed. + +diff --git a/staplog.c b/staplog.c +index 809405305e63..18217b633e61 100644 +--- a/staplog.c ++++ b/staplog.c +@@ -22,6 +22,10 @@ + + /* crash/defs.h defines NR_CPUS based upon architecture macros + X86, X86_64, etc. See crash/configure.c (!). */ ++#if !defined(X86) && !defined(X86_64) && !defined(ALPHA) && !defined(PPC) && \ ++ !defined(IA64) && !defined(PPC64) && !defined(S390) && !defined(S390X) && \ ++ !defined(ARM) && !defined(ARM64) ++ + #if defined(__alpha__) + #define ALPHA + #elif defined(__x86_64__) +@@ -38,12 +42,16 @@ + #define S390X + #elif defined(__s390__) + #define S390 ++#elif defined(__aarch64__) ++#define ARM64 + #elif defined(__arm__) + #define ARM + #else + #warn "unknown architecture for crash/staplog support" + #endif + ++#endif ++ + #include + + struct rchan_offsets { diff --git a/SOURCES/rhbz1153673.patch b/SOURCES/rhbz1153673.patch new file mode 100644 index 0000000..662381a --- /dev/null +++ b/SOURCES/rhbz1153673.patch @@ -0,0 +1,28 @@ +commit a1a230af2ea557ed7a9fcd9485ac16278dbdf778 +Author: Frank Ch. Eigler +Date: Thu Oct 16 16:25:55 2014 -0400 + + RHBZ1153673: speculatively correct segv in dead_control_remover + + It was reported that ::visit_block was occasionally called with + a 0-size input vs[]. That leads to an array overflow, as the + for condition becomes apprx. (i < UINT_MAX). + + for (size_t i = 0; i < vs.size() - 1; ++i) + do_something_with (vs[i]); + + Let's reject 0-size vectors right away. + +diff --git a/elaborate.cxx b/elaborate.cxx +index fa90fe7..35109ab 100644 +--- a/elaborate.cxx ++++ b/elaborate.cxx +@@ -4041,6 +4041,8 @@ struct dead_control_remover: public traversing_visitor + void dead_control_remover::visit_block (block* b) + { + vector& vs = b->statements; ++ if (vs.size() == 0) /* else (size_t) size()-1 => very big */ ++ return; + for (size_t i = 0; i < vs.size() - 1; ++i) + { + vs[i]->visit (this); diff --git a/SOURCES/rhbz1164373.patch b/SOURCES/rhbz1164373.patch new file mode 100644 index 0000000..a46c244 --- /dev/null +++ b/SOURCES/rhbz1164373.patch @@ -0,0 +1,21 @@ +commit 69f0706dd69bd83dfa649246e695c682a6018790 +Author: Frank Ch. Eigler +Date: Fri Nov 14 15:04:53 2014 -0500 + + runtime: fix kernel relocation basis symbol on ppc64le + + It's _stext, not .__start (as on normal ppc64). + +diff --git a/runtime/k_syms.h b/runtime/k_syms.h +index 5e3db1d..ef80fbd 100644 +--- a/runtime/k_syms.h ++++ b/runtime/k_syms.h +@@ -1,7 +1,7 @@ + #ifndef _K_SYMS_H_ + #define _K_SYMS_H_ + +-#ifdef __powerpc64__ ++#if defined(__powerpc64__) && !_LITTLE_ENDIAN + #define KERNEL_RELOC_SYMBOL ".__start" + #else + #define KERNEL_RELOC_SYMBOL "_stext" diff --git a/SOURCES/rhbz1167652.patch b/SOURCES/rhbz1167652.patch new file mode 100644 index 0000000..a9843df --- /dev/null +++ b/SOURCES/rhbz1167652.patch @@ -0,0 +1,29 @@ +commit dab22a155b78731803058c6a746396de03220362 +Author: Martin Cermak +Date: Tue Nov 25 15:58:29 2014 +0100 + + RHBZ1167652: Boot time probing feature fix + + * initscript/systemtap.in: Fix regenerating initramfs image + without the stap module + +diff --git a/initscript/systemtap.in b/initscript/systemtap.in +index 9443384..cd65b3f 100755 +--- a/initscript/systemtap.in ++++ b/initscript/systemtap.in +@@ -906,8 +906,13 @@ onboot () { + do_failure "Failed to make temporary file in $dir" + return 1 + fi +- # Create the initramfs image with stap module enabled. +- out=$($DRACUT --add stap --force $TMPINITRAMFS $KRELEASE 2>&1) ++ if [ ! "$ss" ]; then ++ # Create the initramfs image without stap module enabled. ++ out=$($DRACUT --force $TMPINITRAMFS $KRELEASE 2>&1) ++ else ++ # Create the initramfs image with stap module enabled. ++ out=$($DRACUT --add stap --force $TMPINITRAMFS $KRELEASE 2>&1) ++ fi + # dracut will report success even if some modules (e.g. stap) failed + # to install some files, so we need to be a bit more involved in + # checking for errors diff --git a/SOURCES/rhbz1171823.patch b/SOURCES/rhbz1171823.patch new file mode 100644 index 0000000..6a48f82 --- /dev/null +++ b/SOURCES/rhbz1171823.patch @@ -0,0 +1,96 @@ +commit f73985072571f93684e7742733d8d06b477b02bf +Author: David Smith +Date: Mon Dec 8 14:04:19 2014 -0600 + + Fix BZ1171823 by updating the __svc_fh() nfsd tapset function. + + * tapset/linux/nfsd.stp: Rewrite __svc_fh() in systemtap script language + instead of embedded-C to get around the disappearance of struct svc_fh's + declaration from a public kernel header file. + +diff --git a/tapset/linux/nfsd.stp b/tapset/linux/nfsd.stp +index 701a81d..7ec2856 100644 +--- a/tapset/linux/nfsd.stp ++++ b/tapset/linux/nfsd.stp +@@ -38,22 +38,23 @@ + *15 :nfsd.proc3.rename.tfh + */ + +-/*Get file handler from struct svc_fh */ +-function __svc_fh:string(fh :long) %{ /* pure */ +- struct svc_fh * fhp = (struct svc_fh *) (unsigned long)(STAP_ARG_fh); +- struct knfsd_fh *fh = &fhp->fh_handle; +- +- snprintf(STAP_RETVALUE, MAXSTRINGLEN, +- "%d: %08x %08x %08x %08x %08x %08x", +- kread(&(fh->fh_size)), +- kread(&(fh->fh_base.fh_pad[0])), +- kread(&(fh->fh_base.fh_pad[1])), +- kread(&(fh->fh_base.fh_pad[2])), +- kread(&(fh->fh_base.fh_pad[3])), +- kread(&(fh->fh_base.fh_pad[4])), +- kread(&(fh->fh_base.fh_pad[5]))); +- CATCH_DEREF_FAULT(); +-%} ++@define __svc_fh_cast(fhp) ++%( ++ @cast(@fhp, "svc_fh", "kernel:nfsd")->fh_handle ++%) ++ ++/* Get file handler data from struct svc_fh */ ++function __svc_fh:string(fhp:long) ++{ ++ return sprintf("%d: %08x %08x %08x %08x %08x %08x", ++ @__svc_fh_cast(fhp)->fh_size, ++ @__svc_fh_cast(fhp)->fh_base->fh_pad[0], ++ @__svc_fh_cast(fhp)->fh_base->fh_pad[1], ++ @__svc_fh_cast(fhp)->fh_base->fh_pad[2], ++ @__svc_fh_cast(fhp)->fh_base->fh_pad[3], ++ @__svc_fh_cast(fhp)->fh_base->fh_pad[4], ++ @__svc_fh_cast(fhp)->fh_base->fh_pad[5]) ++} + + function nfs3_cmode:string(cmode:long) %{ /* pure */ + int cmode = (int)(long)STAP_ARG_cmode; + +commit 957812abcb03ad5eb2b544c7fff111b967deb211 +Author: David Smith +Date: Mon Dec 8 16:17:06 2014 -0600 + + BZ117823: Simplify fix using typed-integers. + + * tapset/linux/nfsd.stp: Simplify __svc_fh() fix which removes macro. + +diff --git a/tapset/linux/nfsd.stp b/tapset/linux/nfsd.stp +index 7ec2856..7aebb9c 100644 +--- a/tapset/linux/nfsd.stp ++++ b/tapset/linux/nfsd.stp +@@ -38,22 +38,14 @@ + *15 :nfsd.proc3.rename.tfh + */ + +-@define __svc_fh_cast(fhp) +-%( +- @cast(@fhp, "svc_fh", "kernel:nfsd")->fh_handle +-%) +- +-/* Get file handler data from struct svc_fh */ ++/* Get file handle data from struct svc_fh. */ + function __svc_fh:string(fhp:long) + { +- return sprintf("%d: %08x %08x %08x %08x %08x %08x", +- @__svc_fh_cast(fhp)->fh_size, +- @__svc_fh_cast(fhp)->fh_base->fh_pad[0], +- @__svc_fh_cast(fhp)->fh_base->fh_pad[1], +- @__svc_fh_cast(fhp)->fh_base->fh_pad[2], +- @__svc_fh_cast(fhp)->fh_base->fh_pad[3], +- @__svc_fh_cast(fhp)->fh_base->fh_pad[4], +- @__svc_fh_cast(fhp)->fh_base->fh_pad[5]) ++ svc_fh = &@cast(fhp, "svc_fh", "kernel:nfsd")->fh_handle ++ return sprintf("%d: %08x %08x %08x %08x %08x %08x", svc_fh->fh_size, ++ svc_fh->fh_base->fh_pad[0], svc_fh->fh_base->fh_pad[1], ++ svc_fh->fh_base->fh_pad[2], svc_fh->fh_base->fh_pad[3], ++ svc_fh->fh_base->fh_pad[4], svc_fh->fh_base->fh_pad[5]) + } + + function nfs3_cmode:string(cmode:long) %{ /* pure */ diff --git a/SOURCES/rhbz1172781.patch b/SOURCES/rhbz1172781.patch new file mode 100644 index 0000000..1c776a3 --- /dev/null +++ b/SOURCES/rhbz1172781.patch @@ -0,0 +1,656 @@ +commit 1b438c71d1349dfcbcd17cbf95e6c609a7c5ccac +Author: David Smith +Date: Fri Dec 12 13:06:14 2014 -0600 + + Fix PR17690 by adding support for asynchronous NFS rename operations. + + * tapset/linux/nfs_proc.stp (nfs.proc.rename_setup): Added to support + asynchronous NFS client rename operations. + (nfs.proc2.rename_setup): Ditto. + (nfs.proc3.rename_setup): Ditto. + (nfs.proc4.rename_setup): Ditto. + (nfs.proc.rename_done): Ditto. + (nfs.proc2.rename_done): Ditto. + (nfs.proc3.rename_done): Ditto. + (nfs.proc4.rename_done): Ditto. + (nfs.proc3.rename): Provide default values if the probe point doesn't + exist. + (nfs.proc4.rename): Ditto. + (nfs.proc3.read_setup): Update to handle new argument names. + (nfs.proc4.read_setup): Ditto. + (nfs.proc3.read_done): Ditto. + (nfs.proc4.read_done): Ditto. + (nfs.proc3.write_setup): Ditto. + (nfs.proc4.write_setup): Ditto. + (nfs.proc3.write_done): Ditto. + (nfs.proc4.write_done): Ditto. + * testsuite/buildok/nfs_proc-detailed.stp: Update to handle new probe + points. + +diff --git a/tapset/linux/nfs_proc.stp b/tapset/linux/nfs_proc.stp +index 42c328d..1339aee 100644 +--- a/tapset/linux/nfs_proc.stp ++++ b/tapset/linux/nfs_proc.stp +@@ -108,8 +108,9 @@ function __nfsv4_bitmask:long(dir:long, i:long) + { + %( CONFIG_NFS_V4 == "[ym]" %? + return @cast(NFS_SERVER(dir), "nfs_server", "kernel:nfs")->attr_bitmask[i] +-%) ++%: + return 0 ++%) + } + + %( systemtap_v < "2.3" %? +@@ -127,9 +128,11 @@ probe nfs.proc.entries = nfs.proc.lookup, + nfs.proc.read_setup, + nfs.proc.write_setup, + nfs.proc.commit_setup, ++ nfs.proc.rename_setup, + nfs.proc.read_done, + nfs.proc.write_done, + nfs.proc.commit_done, ++ nfs.proc.rename_done, + nfs.proc.open, + nfs.proc.create, + nfs.proc.rename, +@@ -146,9 +149,11 @@ probe nfs.proc.return = nfs.proc.lookup.return, + nfs.proc.read_setup.return, + nfs.proc.write_setup.return, + nfs.proc.commit_setup.return, ++ nfs.proc.rename_setup.return, + nfs.proc.read_done.return, + nfs.proc.write_done.return, + nfs.proc.commit_done.return, ++ nfs.proc.rename_done.return, + nfs.proc.open.return, + nfs.proc.create.return, + nfs.proc.rename.return, +@@ -744,22 +749,24 @@ probe nfs.proc2.read_setup.return = + { + version = 2 + name = "nfs.proc2.read_setup.return" +- retvalue = 0; ++ retvalue = 0 + } + + probe nfs.proc3.read_setup = kernel.function("nfs3_proc_read_setup") !, + module("nfs").function("nfs3_proc_read_setup") ?, + module("nfsv3").function("nfs3_proc_read_setup") ? + { +- inode = @defined($data->header) ? $data->header->inode : $data->inode ++ inode = @choose_defined($hdr->inode, ++ @choose_defined($data->header->inode, ++ $data->inode)) + client = NFS_CLIENT(inode) + server_ip = get_ip_from_client(client) + prot = get_prot_from_client(client) + version = 3 +- fh = ++ fh = 0 + +- count = @_nfs_data_args_count($data) +- offset = $data->args->offset ++ count = @_nfs_data_args_count(@choose_defined($hdr, $data)) ++ offset = @choose_defined($hdr->args->offset, $data->args->offset) + + name = "nfs.proc3.read_setup" + argstr = sprintf("%d,%d", count, offset) +@@ -775,21 +782,23 @@ probe nfs.proc3.read_setup.return = + { + version = 3 + name = "nfs.proc3.read_setup.return" +- retvalue = 0; ++ retvalue = 0 + } + + probe nfs.proc4.read_setup = kernel.function("nfs4_proc_read_setup") !, + module("nfs").function("nfs4_proc_read_setup") ?, + module("nfsv4").function("nfs4_proc_read_setup") ? + { +- inode = @defined($data->header) ? $data->header->inode : $data->inode ++ inode = @choose_defined($hdr->inode, ++ @choose_defined($data->header->inode, ++ $data->inode)) + client = NFS_CLIENT(inode) + server_ip = get_ip_from_client(client) + prot = get_prot_from_client(client) + version = 4 + +- count = @_nfs_data_args_count($data) +- offset = $data->args->offset ++ count = @_nfs_data_args_count(@choose_defined($hdr, $data)) ++ offset = @choose_defined($hdr->args->offset, $data->args->offset) + //timestamp = $jiffies + + name = "nfs.proc4.read_setup" +@@ -805,7 +814,7 @@ probe nfs.proc4.read_setup.return = + { + version = 4 + name = "nfs.proc4.read_setup.return" +- retvalue = 0; ++ retvalue = 0 + } + + /** +@@ -880,10 +889,10 @@ probe nfs.proc3.read_done = kernel.function("nfs3_read_done") !, + module("nfs").function("nfs3_read_done") ?, + module("nfsv3").function("nfs3_read_done") ? + { +- 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) ++ 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)) + } + else { + server_ip = @_nfs_data_server_ip($task->tk_calldata) +@@ -914,11 +923,11 @@ probe nfs.proc4.read_done = kernel.function("nfs4_read_done") !, + module("nfs").function("nfs4_read_done") ?, + module("nfsv4").function("nfs4_read_done") ? + { +- 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) ++ 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)) + } + else { + server_ip = @_nfs_data_server_ip($task->tk_calldata) +@@ -1031,15 +1040,18 @@ probe nfs.proc3.write_setup = + module("nfs").function("nfs3_proc_write_setup") ?, + module("nfsv3").function("nfs3_proc_write_setup") ? + { +- inode = @defined($data->header) ? $data->header->inode : $data->inode ++ inode = @choose_defined($hdr->inode, ++ @choose_defined($data->header->inode, ++ $data->inode)) + client = NFS_CLIENT(inode) + server_ip = get_ip_from_client(client) + prot = get_prot_from_client(client) + version = 3 + +- count = @_nfs_data_args_count($data) +- offset = $data->args->offset +- how = @choose_defined($how, $data->args->stable) ++ count = @_nfs_data_args_count(@choose_defined($hdr, $data)) ++ offset = @choose_defined($hdr->args->offset, $data->args->offset) ++ how = @choose_defined($hdr->args->stable, ++ @choose_defined($how, $data->args->stable)) + bitmask0 = 0 + bitmask1 = 0 + +@@ -1064,15 +1076,18 @@ probe nfs.proc4.write_setup = + module("nfs").function("nfs4_proc_write_setup") ?, + module("nfsv4").function("nfs4_proc_write_setup") ? + { +- inode = @defined($data->header) ? $data->header->inode : $data->inode ++ inode = @choose_defined($hdr->inode, ++ @choose_defined($data->header->inode, ++ $data->inode)) + client = NFS_CLIENT(inode) + server_ip = get_ip_from_client(client) + prot = get_prot_from_client(client) + version = 4 + +- count = @_nfs_data_args_count($data) +- offset = $data->args->offset +- how = @choose_defined($how, $data->args->stable) ++ count = @_nfs_data_args_count(@choose_defined($hdr, $data)) ++ offset = @choose_defined($hdr->args->offset, $data->args->offset) ++ how = @choose_defined($hdr->args->stable, ++ @choose_defined($how, $data->args->stable)) + bitmask0 = __nfsv4_bitmask(inode, 0) + bitmask1 = __nfsv4_bitmask(inode, 1) + //timestamp = $jiffies +@@ -1169,11 +1184,11 @@ probe nfs.proc3.write_done = kernel.function("nfs3_write_done") !, + module("nfs").function("nfs3_write_done") ?, + module("nfsv3").function("nfs3_write_done") ? + { +- 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) +- valid = @_nfs_data_valid($data) ++ 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)) ++ valid = @_nfs_data_valid(@choose_defined($hdr, $data)) + } + else { + server_ip = @_nfs_data_server_ip($task->tk_calldata) +@@ -1203,12 +1218,12 @@ probe nfs.proc4.write_done = kernel.function("nfs4_write_done") !, + module("nfs").function("nfs4_write_done") ?, + module("nfsv4").function("nfs4_write_done") ? + { +- 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) +- valid = @_nfs_data_valid($data) +- timestamp = @_nfs_data_timestamp($data) ++ 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)) ++ valid = @_nfs_data_valid(@choose_defined($hdr, $data)) ++ timestamp = @_nfs_data_timestamp(@choose_defined($hdr, $data)) + } + else { + server_ip = @_nfs_data_server_ip($task->tk_calldata) +@@ -1251,7 +1266,7 @@ probe nfs.proc4.write_done.return = + * + * The commit_setup function is used to setup a commit RPC task. + * Is is not doing the actual commit operation. +- * It is does not exist in NFSv2. ++ * It does not exist in NFSv2. + */ + + probe nfs.proc.commit_setup = nfs.proc3.commit_setup, +@@ -1423,6 +1438,207 @@ probe nfs.proc4.commit_done.return = + } + + /** ++ * probe nfs.proc.rename_setup - NFS client setting up a rename RPC task ++ * ++ * @server_ip: IP address of server ++ * @prot: transfer protocol ++ * @version: NFS version ++ * @fh: file handle of parent dir ++ * ++ * The rename_setup function is used to setup a rename RPC task. ++ * Is is not doing the actual rename operation. ++ */ ++ ++probe nfs.proc.rename_setup = nfs.proc2.rename_setup ?, ++ nfs.proc3.rename_setup, ++ nfs.proc4.rename_setup ++{} ++probe nfs.proc.rename_setup.return = nfs.proc2.rename_setup.return ?, ++ nfs.proc3.rename_setup.return, ++ nfs.proc4.rename_setup.return ++{} ++ ++probe nfs.proc2.rename_setup = ++ kernel.function("nfs_proc_rename_setup") !, ++ module("nfs").function("nfs_proc_rename_setup") ?, ++ module("nfsv2").function("nfs_proc_rename_setup") ? ++{ ++ client = NFS_CLIENT($dir) ++ server_ip = get_ip_from_client(client) ++ prot = get_prot_from_client(client) ++ version = 2 ++ fh = NFS_FH($dir) ++ ++ name = "nfs.proc2.rename_setup" ++ ++ argstr = sprintf("%d", fh) ++} ++probe nfs.proc2.rename_setup.return = ++ kernel.function("nfs2_proc_rename_setup").return !, ++ module("nfs").function("nfs_proc_rename_setup").return ?, ++ module("nfsv2").function("nfs_proc_rename_setup").return ? ++{ ++ version = 2 ++ name = "nfs.proc2.rename_setup.return" ++ retvalue = 0 ++} ++ ++probe nfs.proc3.rename_setup = ++ kernel.function("nfs3_proc_rename_setup") !, ++ module("nfs").function("nfs3_proc_rename_setup") ?, ++ module("nfsv3").function("nfs3_proc_rename_setup") ? ++{ ++ client = NFS_CLIENT($dir) ++ server_ip = get_ip_from_client(client) ++ prot = get_prot_from_client(client) ++ version = 3 ++ fh = NFS_FH($dir) ++ ++ name = "nfs.proc3.rename_setup" ++ argstr = sprintf("%d", fh) ++} ++probe nfs.proc3.rename_setup.return = ++ kernel.function("nfs3_proc_rename_setup").return !, ++ module("nfs").function("nfs3_proc_rename_setup").return ?, ++ module("nfsv3").function("nfs3_proc_rename_setup").return ? ++{ ++ version = 3 ++ name = "nfs.proc3.rename_setup.return" ++ retvalue = 0 ++} ++ ++probe nfs.proc4.rename_setup = ++ kernel.function("nfs4_proc_rename_setup") !, ++ module("nfs").function("nfs4_proc_rename_setup") ?, ++ module("nfsv4").function("nfs4_proc_rename_setup") ? ++{ ++ client = NFS_CLIENT($dir) ++ server_ip = get_ip_from_client(client) ++ prot = get_prot_from_client(client) ++ version = 4 ++ fh = NFS_FH($dir) ++ ++ name = "nfs.proc4.rename_setup" ++ argstr = sprintf("%d", fh) ++} ++probe nfs.proc4.rename_setup.return = ++ kernel.function("nfs4_proc_rename_setup").return !, ++ module("nfs").function("nfs4_proc_rename_setup").return ?, ++ module("nfsv4").function("nfs4_proc_rename_setup").return ? ++{ ++ version = 4 ++ name = "nfs.proc4.rename_setup.return" ++ retvalue = 0 ++} ++ ++/** ++ * probe nfs.proc.rename_done - NFS client response to a rename RPC task ++ * ++ * @server_ip: IP address of server ++ * @prot: transfer protocol ++ * @version: NFS version ++ * @status: result of last operation ++ * @timestamp : V4 timestamp, which is used for lease renewal ++ * @old_fh: file handle of old parent dir ++ * @new_fh: file handle of new parent dir ++ * ++ * Fires when a reply to a rename RPC task is received or some rename ++ * error occurs (timeout or socket shutdown). ++ */ ++probe nfs.proc.rename_done = nfs.proc2.rename_done ?, ++ nfs.proc3.rename_done, ++ nfs.proc4.rename_done ++{} ++ ++probe nfs.proc.rename_done.return = nfs.proc2.rename_done.return ?, ++ nfs.proc3.rename_done.return, ++ nfs.proc4.rename_done.return ++{} ++ ++probe nfs.proc2.rename_done = kernel.function("nfs_proc_rename_done") !, ++ module("nfs").function("nfs_proc_rename_done") ?, ++ module("nfsv2").function("nfs_proc_rename_done") ? ++{ ++ client = NFS_CLIENT($old_dir) ++ server_ip = get_ip_from_client(client) ++ prot = get_prot_from_client(client) ++ version = 2 ++ status = $task->tk_status ++ timestamp = 0 ++ ++ old_fh = NFS_FH($old_dir) ++ new_fh = NFS_FH($new_dir) ++ ++ name = "nfs.proc2.rename_done" ++ argstr = sprintf("%d", status) ++} ++probe nfs.proc2.rename_done.return = ++ kernel.function("nfs_rename_done").return !, ++ module("nfs").function("nfs_rename_done").return !, ++ module("nfsv2").function("nfs_rename_done").return ! ++{ ++ version = 2 ++ name = "nfs.proc2.rename_done.return" ++ retstr = sprintf("%d", $return) ++} ++ ++probe nfs.proc3.rename_done = ++ kernel.function("nfs3_proc_rename_done") !, ++ module("nfs").function("nfs3_proc_rename_done") ?, ++ module("nfsv3").function("nfs3_proc_rename_done") ? ++{ ++ client = NFS_CLIENT($old_dir) ++ server_ip = get_ip_from_client(client) ++ prot = get_prot_from_client(client) ++ version = 3 ++ status = $task->tk_status ++ timestamp = 0 ++ ++ old_fh = NFS_FH($old_dir) ++ new_fh = NFS_FH($new_dir) ++ ++ name = "nfs.proc3.rename_done" ++ argstr = sprintf("%d", status) ++} ++probe nfs.proc3.rename_done.return = ++ kernel.function("nfs3_proc_rename_done").return !, ++ module("nfs").function("nfs3_proc_rename_done").return ?, ++ module("nfsv3").function("nfs3_proc_rename_done").return ? ++{ ++ version = 3 ++ name = "nfs.proc3.rename_done.return" ++ retstr = sprintf("%d", $return) ++} ++ ++probe nfs.proc4.rename_done = ++ kernel.function("nfs4_proc_rename_done") !, ++ module("nfs").function("nfs4_proc_rename_done") ?, ++ module("nfsv4").function("nfs4_proc_rename_done") ? ++{ ++ client = NFS_CLIENT($old_dir) ++ server_ip = get_ip_from_client(client) ++ prot = get_prot_from_client(client) ++ version = 4 ++ timestamp = @_nfs_data_timestamp(@choose_defined($hdr, $data)) ++ status = $task->tk_status ++ ++ old_fh = NFS_FH($old_dir) ++ new_fh = NFS_FH($new_dir) ++ ++ name = "nfs.proc4.rename_done" ++ argstr = sprintf("%d", status) ++} ++probe nfs.proc4.rename_done.return = ++ kernel.function("nfs4_proc_rename_done").return !, ++ module("nfs").function("nfs4_proc_rename_done").return ?, ++ module("nfsv4").function("nfs4_proc_rename_done").return ? ++{ ++ version = 4 ++ name = "nfs.proc4.rename_done.return" ++ retstr = sprintf("%d", $return) ++} ++ ++/** + * probe nfs.proc.open - NFS client allocates file read/write context information + * + * @server_ip: IP address of server +@@ -1533,7 +1749,7 @@ probe nfs.proc4.handle_exception.return = + * @server_ip: IP address of server + * @prot: transfer protocol + * @version: NFS version (the function is used for all NFS version) +- * @fh: file handler of parent dir ++ * @fh: file handle of parent dir + * @filename: file name + * @filelen: length of file name + * @flag: indicates create mode (only for NFSv3 and NFSv4) +@@ -1655,7 +1871,7 @@ probe nfs.proc4.create.return = + * @server_ip: IP address of server + * @prot: transfer protocol + * @version: NFS version (the function is used for all NFS version) +- * @fh: file handler of parent dir ++ * @fh: file handle of parent dir + * @filename: file name + * @filelen: length of file name + */ +@@ -1770,8 +1986,8 @@ probe nfs.proc4.remove.return = + * @server_ip: IP address of server + * @prot: transfer protocol + * @version: NFS version (the function is used for all NFS version) +- * @old_fh: file handler of old parent dir +- * @new_fh: file handler of new parent dir ++ * @old_fh: file handle of old parent dir ++ * @new_fh: file handle of new parent dir + * @old_name: old file name + * @old_filelen: length of old file name + * @new_name: new file name +@@ -1834,14 +2050,20 @@ probe nfs.proc2.rename.return = + retstr = (@defined($return) ? sprintf("%d", $return) : "N/A") + } + +-probe nfs.proc3.rename = kernel.function("nfs3_proc_rename") !, ++probe nfs.proc3.rename = _nfs.proc3.rename !, _nfs.proc3.missing_rename ++{ ++ version = 3 ++ ++ name = "nfs.proc3.rename" ++ argstr = sprintf("%s,%s", old_name, new_name) ++} ++probe _nfs.proc3.rename = kernel.function("nfs3_proc_rename") !, + module("nfs").function("nfs3_proc_rename") ?, + module("nfsv3").function("nfs3_proc_rename") ? + { + client = NFS_CLIENT($old_dir) + server_ip = get_ip_from_client(client) + prot = get_prot_from_client(client) +- version = 3 + + old_fh = NFS_FH($old_dir) + old_filelen = $old_name->len +@@ -1849,29 +2071,46 @@ probe nfs.proc3.rename = kernel.function("nfs3_proc_rename") !, + new_fh = NFS_FH($new_dir) + new_filelen = $new_name->len + new_name = kernel_string_n($new_name->name, new_filelen) ++} ++probe _nfs.proc3.missing_rename = never ++{ ++ client = 0 ++ server_ip = 0 ++ prot = 0 + +- name = "nfs.proc3.rename" +- argstr = sprintf("%s,%s", old_name, new_name) ++ old_fh = 0 ++ old_filelen = 0 ++ old_name = "" ++ new_fh = 0 ++ new_filelen = 0 ++ new_name = "" + } + + probe nfs.proc3.rename.return = + kernel.function("nfs3_proc_rename").return !, + module("nfs").function("nfs3_proc_rename").return ?, +- module("nfsv3").function("nfs3_proc_rename").return ? ++ module("nfsv3").function("nfs3_proc_rename").return !, ++ never + { + name = "nfs.proc3.rename.return" + version = 3 +- retstr = sprintf("%d", $return) ++ retstr = (@defined($return) ? sprintf("%d", $return) : "N/A") + } + +-probe nfs.proc4.rename = kernel.function("nfs4_proc_rename") !, +- module("nfs").function("nfs4_proc_rename") ?, +- module("nfsv4").function("nfs4_proc_rename") ? ++probe nfs.proc4.rename = _nfs.proc4.rename !, _nfs.proc4.missing_rename ++{ ++ version = 4 ++ ++ name = "nfs.proc4.rename" ++ argstr = sprintf("%s,%s", old_name, new_name) ++} ++probe _nfs.proc4.rename = kernel.function("nfs4_proc_rename") !, ++ module("nfs").function("nfs4_proc_rename") ?, ++ module("nfsv4").function("nfs4_proc_rename") ? + { + client = NFS_CLIENT($old_dir) + server_ip = get_ip_from_client(client) + prot = get_prot_from_client(client) +- version = 4 + + old_fh = NFS_FH($old_dir) + old_filelen = $old_name->len +@@ -1879,17 +2118,28 @@ probe nfs.proc4.rename = kernel.function("nfs4_proc_rename") !, + new_fh = NFS_FH($new_dir) + new_filelen = $new_name->len + new_name = kernel_string_n($new_name->name, new_filelen) ++} ++probe _nfs.proc4.missing_rename = never ++{ ++ client = 0 ++ server_ip = 0 ++ prot = 0 + +- name = "nfs.proc4.rename" +- argstr = sprintf("%s,%s", old_name, new_name) ++ old_fh = 0 ++ old_filelen = 0 ++ old_name = "" ++ new_fh = 0 ++ new_filelen = 0 ++ new_name = "" + } + + probe nfs.proc4.rename.return = + kernel.function("nfs4_proc_rename").return !, + module("nfs").function("nfs4_proc_rename").return ?, +- module("nfsv4").function("nfs4_proc_rename").return ? ++ module("nfsv4").function("nfs4_proc_rename").return !, ++ never + { + name = "nfs.proc4.rename.return" + version = 4 +- retstr = sprintf("%d", $return) ++ retstr = (@defined($return) ? sprintf("%d", $return) : "N/A") + } +diff --git a/testsuite/buildok/nfs_proc-detailed.stp b/testsuite/buildok/nfs_proc-detailed.stp +index 273b20c..740d6bd 100755 +--- a/testsuite/buildok/nfs_proc-detailed.stp ++++ b/testsuite/buildok/nfs_proc-detailed.stp +@@ -1,5 +1,6 @@ + #! stap -p4 + ++ + probe nfs.proc.lookup { + printf("%s(%s)\n", name, argstr) + printf("%d %d %d %d\n", server_ip, prot, version, name_len) +@@ -96,6 +97,26 @@ probe nfs.proc.commit_done.return { + printf("%d: %s(%s)\n", version, name, retstr) + } + ++probe nfs.proc.rename_setup { ++ printf("%s(%s)\n", name, argstr) ++ printf("%d %d %d %d\n", client, server_ip, prot, ++ version) ++ printf("%d\n", fh) ++} ++probe nfs.proc.rename_setup.return { ++ printf("%d: %s(%d)\n", version, name, retvalue) ++} ++ ++probe nfs.proc.rename_done { ++ printf("%s(%s)\n", name, argstr) ++ printf("%d %d %d\n", server_ip, prot, version) ++ printf("%d %d\n", timestamp, status) ++ printf("%d %d\n", old_fh, new_fh) ++} ++probe nfs.proc.rename_done.return { ++ printf("%d: %s(%s)\n", version, name, retstr) ++} ++ + probe nfs.proc.open { + printf("%s(%s)\n", name, argstr) + printf("%d %d %d\n", server_ip, prot, version) +@@ -140,8 +161,9 @@ probe nfs.proc.remove.return { + + probe nfs.proc.rename { + printf("%s(%s)\n", name, argstr) +- printf("%d %d %d %d %d %d %d\n", server_ip, prot, version, old_fh, +- old_filelen, new_fh, new_filelen) ++ printf("%d %d %d\n", server_ip, prot, version) ++ printf("%d %d %s\n", old_fh, old_filelen, old_name) ++ printf("%d %d %s\n", new_fh, new_filelen, new_name) + } + probe nfs.proc.rename.return { + printf("%d: %s(%s)\n", version, name, retstr) diff --git a/SPECS/systemtap.spec b/SPECS/systemtap.spec index b8ac59f..ac5ee4e 100644 --- a/SPECS/systemtap.spec +++ b/SPECS/systemtap.spec @@ -32,6 +32,7 @@ %{!?with_mokutil: %global with_mokutil 0} %{!?with_openssl: %global with_openssl 0} %endif +%{!?with_pyparsing: %global with_pyparsing 0%{?fedora} >= 18 || 0%{?rhel} >= 7} %ifarch ppc64le %global with_virthost 0 @@ -44,26 +45,27 @@ %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 - -%define dracutlibdir %{_prefix}/lib/dracut -%define dracutstap %{dracutlibdir}/modules.d/99stap +# note not under /opt/rh... +%define dracutlibdir %{_root_prefix}/lib/dracut +%define dracutstap %{dracutlibdir}/modules.d/99%{scl_prefix}stap Name: %{?scl_prefix}systemtap -Version: 2.5 -Release: 8%{?dist} +Version: 2.6 +Release: 11%{?dist} # for version, see also configure.ac +#Patch1: reserved for elfutils (see below) +Patch2: rhbz1139844.patch +Patch3: rhbz1141919.patch +Patch4: rhbz1153673.patch +Patch5: rhbz1164373.patch +Patch6: rhbz1119335.patch +Patch7: rhbz1127591.patch +Patch8: rhbz1167652.patch +Patch9: rhbz1171823.patch +Patch10: rhbz1172781.patch +Patch11: rhbz1128209.patch + # Packaging abstract: # @@ -96,19 +98,6 @@ License: GPLv2+ URL: http://sourceware.org/systemtap/ Source: ftp://sourceware.org/pub/systemtap/releases/systemtap-%{version}.tar.gz -Patch10: PR16894.patch -Patch11: BZ1095137.patch -Patch12: BZ1099133.patch -Patch13: BZ1099472.patch -Patch14: BZ1099555.patch -Patch15: BZ1099757.patch -Patch16: BZ1099791.patch -Patch17: BZ1099825.patch -Patch18: BZ1100813.patch -Patch19: BZ1109084.patch -Patch20: BZ1140952.patch - - # Build* BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gcc-c++ @@ -162,14 +151,6 @@ BuildRequires: /usr/bin/xvfb-run BuildRequires: emacs %endif -%if %{with_java} -BuildRequires: jpackage-utils java-devel -%endif -%if %{with_virthost} -BuildRequires: libvirt-devel >= 1.0.2 -BuildRequires: libxml2-devel -%endif - # Install requirements Requires: %{?scl_prefix}systemtap-client = %{version}-%{release} Requires: %{?scl_prefix}systemtap-devel = %{version}-%{release} @@ -257,8 +238,8 @@ Requires: mokutil %endif %description client -This package contains/requires the components needed to develop -systemtap scripts, and compile them using a local systemtap-devel +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. @@ -286,6 +267,9 @@ Summary: Static probe support tools Group: Development/System License: GPLv2+ and Public Domain URL: http://sourceware.org/systemtap/ +%if %{with_pyparsing} +Requires: pyparsing +%endif %description sdt-devel This package includes the header file used for static @@ -311,7 +295,7 @@ Requires: strace # 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 +%ifnarch ia64 ppc64le aarch64 Requires: prelink %endif # testsuite/systemtap.server/client.exp needs avahi @@ -320,9 +304,6 @@ Requires: avahi # testsuite/systemtap.base/crash.exp needs crash Requires: crash %endif -%if %{with_java} -Requires: %{scl_prefix}systemtap-runtime-java = %{version}-%{release} -%endif %ifarch x86_64 Requires: /usr/lib/libc.so # ... and /usr/lib/libgcc_s.so.* @@ -337,60 +318,6 @@ 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_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 @@ -407,17 +334,16 @@ find . \( -name configure -o -name config.h.in \) -print | xargs touch cd .. %endif +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 %patch10 -p1 %patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch15 -p1 -%patch16 -p1 -%patch17 -p1 -%patch18 -p1 -%patch19 -p1 -%patch20 -p1 %build @@ -489,13 +415,20 @@ cd .. %global java_config --without-java %endif +%if %{with_virthost} +%global virt_config --enable-virt +%else +%global virt_config --disable-virt +%endif + #CPPFLAGS="-I%{_includedir}/dyninst %{optflags}" CPPFLAGS="-I%{_includedir} -I%{_includedir}/dyninst %{optflags}" export CPPFLAGS #LDFLAGS="-L%{_libdir}/dyninst" LDFLAGS="-L%{_libdir} -L%{_libdir}/dyninst -L%{_libdir}/elfutils" export LDFLAGS -%configure %{?elfutils_config} %{dyninst_config} %{sqlite_config} %{crash_config} %{docs_config} %{pie_config} %{publican_config} %{rpm_config} --disable-silent-rules --with-extra-version="%{scl} rpm %{version}-%{release}" %{java_config} have_fop=no + +%configure %{?elfutils_config} %{dyninst_config} %{sqlite_config} %{crash_config} %{docs_config} %{pie_config} %{publican_config} %{rpm_config} --disable-silent-rules --with-extra-version="%{scl} rpm %{version}-%{release}" %{java_config} %{virt_config} have_fop=no make %{?_smp_mflags} %if %{with_emacsvim} @@ -586,24 +519,6 @@ do 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} @@ -737,56 +652,6 @@ if [ "$1" -ge "1" ] ; then fi exit 0 -%if %{with_virtguest} -%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 -%endif - %post # Remove any previously-built uprobes.ko materials (make -C %{_datadir}/systemtap/runtime/uprobes clean) >/dev/null 2>&1 || true @@ -799,70 +664,6 @@ exit 0 # ------------------------------------------------------------------------ -%if %{with_java} - -%triggerin runtime-java -- java-1.7.0-openjdk, java-1.6.0-openjdk -for f in %{_libexecdir}/systemtap/libHelperSDT_*.so; do - %ifarch %{ix86} ppc64 - %ifarch ppc64 - arch=ppc64 - %else - arch=i386 - %endif - %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.7.0-openjdk, java-1.6.0-openjdk -for f in %{_libexecdir}/systemtap/libHelperSDT_*.so; do - %ifarch %{ix86} ppc64 - %ifarch ppc64 - arch=ppc64 - %else - arch=i386 - %endif - %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.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} ppc64 - %ifarch ppc64 - arch=ppc64 - %else - arch=i386 - %endif - %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. @@ -897,7 +698,9 @@ done %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 COPYING +%doc README README.unprivileged AUTHORS NEWS +%{!?_licensedir:%global license %%doc} +%license COPYING %files devel -f systemtap.lang @@ -913,11 +716,9 @@ done %{_mandir}/man7/error* %{_mandir}/man7/stappaths.7* %{_mandir}/man7/warning* -%doc README README.unprivileged AUTHORS NEWS COPYING -%if %{with_java} -%dir %{_libexecdir}/systemtap -%{_libexecdir}/systemtap/libHelperSDT_*.so -%endif +%doc README README.unprivileged AUTHORS NEWS +%{!?_licensedir:%global license %%doc} +%license COPYING %if %{with_bundled_elfutils} %dir %{_libdir}/systemtap %{_libdir}/systemtap/lib*.so* @@ -955,12 +756,16 @@ done %if %{with_dyninst} %{_mandir}/man8/stapdyn.8* %endif -%doc README README.security AUTHORS NEWS COPYING +%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 COPYING examples +%doc README README.unprivileged AUTHORS NEWS examples +%{!?_licensedir:%global license %%doc} +%license COPYING %if %{with_docs} %doc docs.installed/*.pdf %doc docs.installed/tapsets/*.html @@ -1005,7 +810,9 @@ done %{_includedir}/sys/sdt.h %{_includedir}/sys/sdt-config.h %{_mandir}/man1/dtrace.1* -%doc README AUTHORS NEWS COPYING +%doc README AUTHORS NEWS +%{!?_licensedir:%global license %%doc} +%license COPYING %files testsuite @@ -1013,99 +820,113 @@ done %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_virthost} -%files runtime-virthost -%{_mandir}/man1/stapvirt.1* -%{_bindir}/stapvirt -%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 -%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 +%changelog +* Wed Mar 25 2015 Frank Ch. Eigler - 2.6-11 +- rhbz1121363 (dracut support) +* Fri Feb 13 2015 Frank Ch. Eigler - 2.6-10 +- rhbz1172781 (nfs3_proc_read_setup tapset) +- rhbz1128209 (uninstalled stapvirt files found) -# ------------------------------------------------------------------------ +* Fri Jan 09 2015 Frank Ch. Eigler - 2.6-9 +- dts3.1 merge from rhel-7.1 +- remove bodies of with_java, with_virtguest, with_virthost conditionals -%changelog -* Tue Sep 16 2014 Josh Stone - 2.5-8 -- added BZ1140952.patch: use process_vm_readv/writev +* Wed Dec 10 2014 Frank Ch. Eigler - 2.6-8 +- rhbz1171823 (nfsd svc_fh access) -* Wed Aug 20 2014 Josh Stone - 2.5-7 -- rebuild for final dyninst 8.2 +* Wed Nov 26 2014 Frank Ch. Eigler - 2.6-7 +- rhbz1167652 (stap dracut empty) -* Fri Jul 18 2014 Frank Ch. Eigler - 2.5-6 -- merge in RHEL-6.6-bound patches +* 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) -* Mon Jun 23 2014 Frank Ch. Eigler - 2.5-5 -- refreshed BZ1109084.patch +* Fri Oct 17 2014 Frank Ch. Eigler - 2.6-5 +- RHBZ1153673 (stap segv during optimization) -* Fri Jun 20 2014 Frank Ch. Eigler - 2.5-4 -- added BZ1099133.patch: at_var_cu test -- added BZ1099472.patch: cast-scope.exp test -- added BZ1099555.patch: gtod.exp test -- added BZ1099757.patch: vars.exp test -- added BZ1099791.patch: vma_vdso test -- added BZ1099825.patch: probe_by_pid test -- added BZ1100813.patch: buildok tests -- added BZ1109084.patch: initscript name sensitivity +* 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 -* Mon May 12 2014 Frank Ch. Eigler - 2.5-3 -- Include fix for RHBZ1095137: semantic error ... syscall.sendfile -- Include fix for upstream http://sourceware.org/PR16894 +* Tue Sep 09 2014 Josh Stone - 2.6-2 +- Backport fix for 1139844 -* Tue May 21 2013 Frank Ch. Eigler - 2.1-8 -- bz965603 respin with newer elfutils +* Fri Sep 05 2014 Josh Stone - 2.6-1 +- Upstream release, rebased for 1107735 -* Fri Apr 19 2013 Frank Ch. Eigler - 2.1-7 -- bz855981 #c12 to improve stapdyn rhel5/6 compatibility +* Wed Aug 27 2014 Josh Stone - 2.4-16 +- Exclude ppc64le from with_crash (1125693) -* Wed Apr 17 2013 Frank Ch. Eigler - 2.1-6 -- bz855981 to improve stapdyn rhel5/6 compatibility +* Tue Aug 26 2014 Josh Stone - 2.4-15 +- Tighten arch lists for prelink and dyninst (1094349, 1125693) -* Fri Feb 22 2013 Frank Ch. Eigler - 2.1-4 -- Fix merge litter. +* Fri Mar 28 2014 Jonathan Lebon - 2.4-14 +- Small fix on latest backport fix for dyninst runtime -* Wed Feb 20 2013 Frank Ch. Eigler - 2.1-3 -- Merging upstream 2.1 spec changes, plus scl markup, plus scl-bound - elfutils & dyninst dependencies, minus with_systemd support, - disable crash-devel dep on ppc* +* Fri Mar 28 2014 Jonathan Lebon - 2.4-13 +- Backport fixes for 1051649 (see comments 4 and 5) -* Wed Feb 13 2013 Serguei Makarov - 2.1-1 +* 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 Jan 16 2013 Josh Stone 2.0-6 -- Set the docs override only for Fedora 18+ +* Wed Oct 09 2013 Jonathan Lebon +- Added runtime-virthost and runtime-virtguest packages. -* Wed Jan 16 2013 Josh Stone 2.0-5 -- Backport fixes to work with kernel 3.7 +* Thu Jul 25 2013 Frank Ch. Eigler - 2.3-1 +- Upstream release. -* Mon Nov 19 2012 Josh Stone 2.0-4 -- Rebuild for the final dyninst 8.0. -- As with rawhide, disable docs due to bz864730 +* Thu May 16 2013 Frank Ch. Eigler - 2.2.1-1 +- Upstream release. -* Mon Nov 19 2012 Karsten Hopp 2.0-3 -- systemtap got compiled with an old dyninst library on ppc, bump release and rebuild +* Tue May 14 2013 Frank Ch. Eigler - 2.2-1 +- Upstream release. -* Mon Oct 29 2012 Josh Stone - 2.0-2 -- Rebuild for the new ABI in the dyninst snapshot +* Wed Feb 13 2013 Serguei Makarov - 2.1-1 +- Upstream release. * Tue Oct 09 2012 Josh Stone - 2.0-1 - Upstream release. @@ -1155,3 +976,137 @@ done * 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.