diff --git a/.devtoolset-3-systemtap.metadata b/.devtoolset-3-systemtap.metadata new file mode 100644 index 0000000..4b2edd8 --- /dev/null +++ b/.devtoolset-3-systemtap.metadata @@ -0,0 +1 @@ +3f6346bc37b47f590b16894e93b2ba5f45d2acd2 SOURCES/systemtap-2.5.tar.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3aa0460 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/systemtap-2.5.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/BZ1095137.patch b/SOURCES/BZ1095137.patch new file mode 100644 index 0000000..da53d48 --- /dev/null +++ b/SOURCES/BZ1095137.patch @@ -0,0 +1,19 @@ +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 new file mode 100644 index 0000000..00b7157 --- /dev/null +++ b/SOURCES/BZ1099133.patch @@ -0,0 +1,36 @@ +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 new file mode 100644 index 0000000..f509f98 --- /dev/null +++ b/SOURCES/BZ1099472.patch @@ -0,0 +1,128 @@ +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 new file mode 100644 index 0000000..9907856 --- /dev/null +++ b/SOURCES/BZ1099555.patch @@ -0,0 +1,310 @@ +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 new file mode 100644 index 0000000..de31fa6 --- /dev/null +++ b/SOURCES/BZ1099757.patch @@ -0,0 +1,174 @@ +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 new file mode 100644 index 0000000..5a1bf44 --- /dev/null +++ b/SOURCES/BZ1099791.patch @@ -0,0 +1,71 @@ +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 new file mode 100644 index 0000000..c5ce6a7 --- /dev/null +++ b/SOURCES/BZ1099825.patch @@ -0,0 +1,34 @@ +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 new file mode 100644 index 0000000..a91f720 --- /dev/null +++ b/SOURCES/BZ1100813.patch @@ -0,0 +1,41 @@ +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 new file mode 100644 index 0000000..5c34596 --- /dev/null +++ b/SOURCES/BZ1109084.patch @@ -0,0 +1,131 @@ +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 new file mode 100644 index 0000000..0fd41ce --- /dev/null +++ b/SOURCES/BZ1140952.patch @@ -0,0 +1,185 @@ +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 new file mode 100644 index 0000000..e631c64 --- /dev/null +++ b/SOURCES/PR16894.patch @@ -0,0 +1,234 @@ +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/SPECS/systemtap.spec b/SPECS/systemtap.spec new file mode 100644 index 0000000..b8ac59f --- /dev/null +++ b/SPECS/systemtap.spec @@ -0,0 +1,1157 @@ +%{?scl:%scl_package systemtap} +%global sysconfdir %{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir} + +%{!?with_sqlite: %global with_sqlite 1} +%{!?with_docs: %global with_docs 1} +# crash is not available +%ifarch ppc ppc64 %{sparc} aarch64 ppc64le +%{!?with_crash: %global with_crash 0} +%else +%{!?with_crash: %global with_crash 1} +%endif +%{!?with_rpm: %global with_rpm 1} +%{!?with_bundled_elfutils: %global with_bundled_elfutils 0} +%{!?elfutils_version: %global elfutils_version 0.142} +%{!?pie_supported: %global pie_supported 1} +%{!?with_boost: %global with_boost 0} +%{!?with_publican: %global with_publican 0} +%{!?publican_brand: %global publican_brand RedHat} +%{!?with_dyninst: %global with_dyninst 1} +%{!?with_emacsvim: %global with_emacsvim 0} +%{!?with_systemd: %global with_systemd 0} # disable even on rhel7 +%{!?with_emacsvim: %global with_emacsvim 0} +%{!?with_java: %global with_java 0} +# don't want to build runtime-virthost for f18 or RHEL5/6 +%{!?with_virthost: %global with_virthost 0} +%{!?with_virtguest: %global with_virtguest 0} +%{!?with_dracut: %global with_dracut 0%{?fedora} >= 19 || 0%{?rhel} >= 7} +%ifarch x86_64 +%{!?with_mokutil: %global with_mokutil 0%{?fedora} >= 18 || 0%{?rhel} >= 7} +%{!?with_openssl: %global with_openssl 0%{?fedora} >= 18 || 0%{?rhel} >= 7} +%else +%{!?with_mokutil: %global with_mokutil 0} +%{!?with_openssl: %global with_openssl 0} +%endif + +%ifarch ppc64le +%global with_virthost 0 +%endif + +%if 0%{?fedora} >= 18 || 0%{?rhel} >= 6 + %define initdir %{sysconfdir}/rc.d/init.d +# not scl-wrapped %{_initdir} +%else # RHEL5 doesn't know _initddir + %define initdir %{_initrddir} +%endif + +%if %{with_virtguest} + %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 + %define udevrulesdir /usr/lib/udev/rules.d + %else + %if 0%{?rhel} >= 6 + %define udevrulesdir /lib/udev/rules.d + %else # RHEL5 + %define udevrulesdir /etc/udev/rules.d + %endif + %endif +%endif + +%define dracutlibdir %{_prefix}/lib/dracut +%define dracutstap %{dracutlibdir}/modules.d/99stap + +Name: %{?scl_prefix}systemtap +Version: 2.5 +Release: 8%{?dist} +# for version, see also configure.ac + + +# Packaging abstract: +# +# systemtap empty req:-client req:-devel +# systemtap-server /usr/bin/stap-server*, req:-devel +# systemtap-devel /usr/bin/stap, runtime, tapset, req:kernel-devel +# systemtap-runtime /usr/bin/staprun, /usr/bin/stapsh, /usr/bin/stapdyn +# systemtap-client /usr/bin/stap, samples, docs, tapset(bonus), req:-runtime +# systemtap-initscript /etc/init.d/systemtap, dracut module, req:systemtap +# systemtap-sdt-devel /usr/include/sys/sdt.h /usr/bin/dtrace +# systemtap-testsuite /usr/share/systemtap/testsuite*, req:systemtap, req:sdt-devel +# systemtap-runtime-java libHelperSDT.so, HelperSDT.jar, stapbm, req:-runtime +# systemtap-runtime-virthost /usr/bin/stapvirt, req:libvirt req:libxml2 +# systemtap-runtime-virtguest udev rules, init scripts/systemd service, req:-runtime +# +# Typical scenarios: +# +# stap-client: systemtap-client +# stap-server: systemtap-server +# local user: systemtap +# +# Unusual scenarios: +# +# intermediary stap-client for --remote: systemtap-client (-runtime unused) +# intermediary stap-server for --use-server: systemtap-server (-devel unused) + +Summary: Programmable system-wide instrumentation system +Group: Development/System +License: GPLv2+ +URL: http://sourceware.org/systemtap/ +Source: ftp://sourceware.org/pub/systemtap/releases/systemtap-%{version}.tar.gz + +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++ +BuildRequires: gettext-devel +BuildRequires: nss-devel avahi-devel pkgconfig +%if %{with_dyninst} +BuildRequires: %{?scl_prefix}dyninst-devel >= 8.0 +BuildRequires: libselinux-devel +%endif +%if %{with_sqlite} +BuildRequires: sqlite-devel +%endif +# Needed for libstd++ < 4.0, without +%if %{with_boost} +BuildRequires: boost-devel +%endif +%if %{with_crash} +BuildRequires: crash-devel zlib-devel +%endif +%if %{with_rpm} +BuildRequires: rpm-devel glibc-headers +%endif +%if %{with_bundled_elfutils} +Source1: elfutils-%{elfutils_version}.tar.gz +Patch1: elfutils-portability.patch +BuildRequires: m4 +%global setup_elfutils -a1 +%else +BuildRequires: %{?scl_prefix}elfutils-devel >= %{elfutils_version} +%endif +%if %{with_docs} +BuildRequires: /usr/bin/latex /usr/bin/dvips /usr/bin/ps2pdf latex2html +%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 +BuildRequires: tex(fullpage.sty) tex(fancybox.sty) tex(bchr7t.tfm) +%endif +# On F10, xmlto's pdf support was broken off into a sub-package, +# called 'xmlto-tex'. To avoid a specific F10 BuildReq, we'll do a +# file-based buildreq on '/usr/share/xmlto/format/fo/pdf'. +BuildRequires: xmlto /usr/share/xmlto/format/fo/pdf +%if %{with_publican} +BuildRequires: publican +BuildRequires: /usr/share/publican/Common_Content/%{publican_brand}/defaults.cfg +# A workaround for BZ920216 which requires an X server to build docs +# with publican. +BuildRequires: /usr/bin/xvfb-run +%endif +%endif +%{?scl:Requires:%scl_runtime} + +%if %{with_emacsvim} +BuildRequires: emacs +%endif + +%if %{with_java} +BuildRequires: jpackage-utils java-devel +%endif +%if %{with_virthost} +BuildRequires: libvirt-devel >= 1.0.2 +BuildRequires: libxml2-devel +%endif + +# Install requirements +Requires: %{?scl_prefix}systemtap-client = %{version}-%{release} +Requires: %{?scl_prefix}systemtap-devel = %{version}-%{release} + +%description +SystemTap is an instrumentation system for systems running Linux. +Developers can write instrumentation scripts to collect data on +the operation of the system. The base systemtap package contains/requires +the components needed to locally develop and execute systemtap scripts. + +# ------------------------------------------------------------------------ + +%package server +Summary: Instrumentation System Server +Group: Development/System +License: GPLv2+ +URL: http://sourceware.org/systemtap/ +Requires: %{?scl_prefix}systemtap-devel = %{version}-%{release} +# On RHEL[45], /bin/mktemp comes from the 'mktemp' package. On newer +# distributions, /bin/mktemp comes from the 'coreutils' package. To +# avoid a specific RHEL[45] Requires, we'll do a file-based require. +Requires: nss /bin/mktemp +Requires: zip unzip +Requires(pre): shadow-utils +Requires(post): chkconfig +Requires(preun): chkconfig +Requires(preun): initscripts +Requires(postun): initscripts +BuildRequires: nss-devel avahi-devel +%if %{with_openssl} +Requires: openssl +%endif + +%description server +This is the remote script compilation server component of systemtap. +It announces itself to nearby clients with avahi (if available), and +compiles systemtap scripts to kernel objects on their demand. + + +%package devel +Summary: Programmable system-wide instrumentation system - development headers, tools +Group: Development/System +License: GPLv2+ +URL: http://sourceware.org/systemtap/ +# Alternate kernel packages kernel-PAE-devel et al. have a virtual +# provide for kernel-devel, so this requirement does the right thing, +# at least past RHEL4. +Requires: kernel-devel +Requires: gcc make +# Suggest: kernel-debuginfo + +%description devel +This package contains the components needed to compile a systemtap +script from source form into executable (.ko) forms. It may be +installed on a self-contained developer workstation (along with the +systemtap-client and systemtap-runtime packages), or on a dedicated +remote server (alongside the systemtap-server package). It includes +a copy of the standard tapset library and the runtime library C files. + + +%package runtime +Summary: Programmable system-wide instrumentation system - runtime +Group: Development/System +License: GPLv2+ +URL: http://sourceware.org/systemtap/ +Requires(pre): shadow-utils + +%description runtime +SystemTap runtime contains the components needed to execute +a systemtap script that was already compiled into a module +using a local or remote systemtap-devel installation. + + +%package client +Summary: Programmable system-wide instrumentation system - client +Group: Development/System +License: GPLv2+ +URL: http://sourceware.org/systemtap/ +Requires: zip unzip +Requires: %{?scl_prefix}systemtap-runtime = %{version}-%{release} +Requires: coreutils grep sed unzip zip +Requires: openssh-clients +%if %{with_mokutil} +Requires: mokutil +%endif + +%description client +This package contains/requires the components needed to develop +systemtap scripts, and compile them using a local systemtap-devel +or a remote systemtap-server installation, then run them using a +local or remote systemtap-runtime. It includes script samples and +documentation, and a copy of the tapset library for reference. + + +%package initscript +Summary: Systemtap Initscripts +Group: Development/System +License: GPLv2+ +URL: http://sourceware.org/systemtap/ +Requires: %{?scl_prefix}systemtap = %{version}-%{release} +Requires(post): chkconfig +Requires(preun): chkconfig +Requires(preun): initscripts +Requires(postun): initscripts + +%description initscript +This package includes a SysVinit script to launch selected systemtap +scripts at system startup, along with a dracut module for early +boot-time probing if supported. + + +%package sdt-devel +Summary: Static probe support tools +Group: Development/System +License: GPLv2+ and Public Domain +URL: http://sourceware.org/systemtap/ + +%description sdt-devel +This package includes the header file used for static +instrumentation compiled into userspace programs and libraries, along +with the optional dtrace-compatibility preprocessor to process related +.d files into tracing-macro-laden .h headers. + + +%package testsuite +Summary: Instrumentation System Testsuite +Group: Development/System +License: GPLv2+ +URL: http://sourceware.org/systemtap/ +Requires: %{?scl_prefix}systemtap = %{version}-%{release} +Requires: %{?scl_prefix}systemtap-sdt-devel = %{version}-%{release} +Requires: %{?scl_prefix}systemtap-server = %{version}-%{release} +Requires: %{?scl_prefix}elfutils +Requires: dejagnu which prelink grep nc +Requires: gcc gcc-c++ make glibc-devel +# testsuite/systemtap.base/ptrace.exp needs strace +Requires: strace +# testsuite/systemtap.base/ipaddr.exp needs nc. Unfortunately, the rpm +# that provides nc has changed over time (from 'nc' to +# 'nmap-ncat'). So, we'll do a file-based require. +Requires: /usr/bin/nc +%ifnarch ia64 ppc64le +Requires: prelink +%endif +# testsuite/systemtap.server/client.exp needs avahi +Requires: avahi +%if %{with_crash} +# testsuite/systemtap.base/crash.exp needs crash +Requires: crash +%endif +%if %{with_java} +Requires: %{scl_prefix}systemtap-runtime-java = %{version}-%{release} +%endif +%ifarch x86_64 +Requires: /usr/lib/libc.so +# ... and /usr/lib/libgcc_s.so.* +# ... and /usr/lib/libstdc++.so.* +%endif +%if 0%{?fedora} >= 18 +Requires: stress +%endif + +%description testsuite +This package includes the dejagnu-based systemtap stress self-testing +suite. This may be used by system administrators to thoroughly check +systemtap on the current system. + + +%if %{with_java} +%package runtime-java +Summary: Systemtap Java Runtime Support +Group: Development/System +License: GPLv2+ +URL: http://sourceware.org/systemtap/ +Requires: systemtap-runtime = %{version}-%{release} +Requires: byteman > 2.0 +Requires: net-tools + +%description runtime-java +This package includes support files needed to run systemtap scripts +that probe Java processes running on the OpenJDK 1.6 and OpenJDK 1.7 +runtimes using Byteman. +%endif + +%if %{with_virthost} +%package runtime-virthost +Summary: Systemtap Cross-VM Instrumentation - host +Group: Development/System +License: GPLv2+ +URL: http://sourceware.org/systemtap/ +Requires: libvirt >= 1.0.2 +Requires: libxml2 + +%description runtime-virthost +This package includes the components required to run systemtap scripts +inside a libvirt-managed domain from the host without using a network +connection. +%endif + +%if %{with_virtguest} +%package runtime-virtguest +Summary: Systemtap Cross-VM Instrumentation - guest +Group: Development/System +License: GPLv2+ +URL: http://sourceware.org/systemtap/ +Requires: systemtap-runtime = %{version}-%{release} +%if %{with_systemd} +Requires(post): findutils coreutils +Requires(preun): grep coreutils +Requires(postun): grep coreutils +%else +Requires(post): chkconfig initscripts +Requires(preun): chkconfig initscripts +Requires(postun): initscripts +%endif + +%description runtime-virtguest +This package installs the services necessary on a virtual machine for a +systemtap-runtime-virthost machine to execute systemtap scripts. +%endif + +# ------------------------------------------------------------------------ + +%prep +%setup -q -n systemtap-%{version} %{?setup_elfutils} + +%if %{with_bundled_elfutils} +cd elfutils-%{elfutils_version} +%patch1 -p2 + +sleep 1 +find . \( -name Makefile.in -o -name aclocal.m4 \) -print | xargs touch +sleep 1 +find . \( -name configure -o -name config.h.in \) -print | xargs touch +cd .. +%endif + +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 +%patch18 -p1 +%patch19 -p1 +%patch20 -p1 + +%build + +%if %{with_bundled_elfutils} +# Build our own copy of elfutils. +%global elfutils_config --with-elfutils=elfutils-%{elfutils_version} + +# We have to prevent the standard dependency generation from identifying +# our private elfutils libraries in our provides and requires. +%global _use_internal_dependency_generator 0 +%global filter_eulibs() /bin/sh -c "%{1} | sed '/libelf/d;/libdw/d;/libebl/d'" +%global __find_provides %{filter_eulibs /usr/lib/rpm/find-provides} +%global __find_requires %{filter_eulibs /usr/lib/rpm/find-requires} + +# This will be needed for running stap when not installed, for the test suite. +%global elfutils_mflags LD_LIBRARY_PATH=`pwd`/lib-elfutils +%endif + +# Enable/disable the dyninst pure-userspace backend +%if %{with_dyninst} +%global dyninst_config --with-dyninst +%else +%global dyninst_config --without-dyninst +%endif + +# Enable/disable the sqlite coverage testing support +%if %{with_sqlite} +%global sqlite_config --enable-sqlite +%else +%global sqlite_config --disable-sqlite +%endif + +# Enable/disable the crash extension +%if %{with_crash} +%global crash_config --enable-crash +%else +%global crash_config --disable-crash +%endif + +# Enable/disable the code to find and suggest needed rpms +%if %{with_rpm} +%global rpm_config --with-rpm +%else +%global rpm_config --without-rpm +%endif + +%if %{with_docs} +%global docs_config --enable-docs +%else +%global docs_config --disable-docs +%endif + +# Enable pie as configure defaults to disabling it +%if %{pie_supported} +%global pie_config --enable-pie +%else +%global pie_config --disable-pie +%endif + +%if %{with_publican} +%global publican_config --enable-publican --with-publican-brand=%{publican_brand} +%else +%global publican_config --disable-publican +%endif + +%if %{with_java} +%global java_config --with-java=%{_jvmdir}/java +%else +%global java_config --without-java +%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 +make %{?_smp_mflags} + +%if %{with_emacsvim} +%{_emacs_bytecompile} emacs/systemtap-mode.el +%endif + +%install +rm -rf ${RPM_BUILD_ROOT} +make DESTDIR=$RPM_BUILD_ROOT install +%find_lang systemtap + +# We want the examples in the special doc dir, not the build install dir. +# We build it in place and then move it away so it doesn't get installed +# twice. rpm can specify itself where the (versioned) docs go with the +# %doc directive. +mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/examples examples + +# Fix paths in the example & testsuite scripts +find examples testsuite -type f -name '*.stp' -print0 | xargs -0 sed -i -r -e '1s@^#!.+stap@#!%{_bindir}/stap@' + +# To make rpmlint happy, remove any .gitignore files in the testsuite. +find testsuite -type f -name '.gitignore' -print0 | xargs -0 rm -f + +# Because "make install" may install staprun with whatever mode, the +# post-processing programs rpmbuild runs won't be able to read it. +# So, we change permissions so that they can read it. We'll set the +# permissions back to 04110 in the %files section below. +chmod 755 $RPM_BUILD_ROOT%{_bindir}/staprun + +#install the useful stap-prep script +install -c -m 755 stap-prep $RPM_BUILD_ROOT%{_bindir}/stap-prep + +# Copy over the testsuite +cp -rp testsuite $RPM_BUILD_ROOT%{_datadir}/systemtap + +%if %{with_docs} +# We want the manuals in the special doc dir, not the generic doc install dir. +# We build it in place and then move it away so it doesn't get installed +# twice. rpm can specify itself where the (versioned) docs go with the +# %doc directive. +mkdir docs.installed +mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/*.pdf docs.installed/ +mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/tapsets docs.installed/ +%if %{with_publican} +mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/SystemTap_Beginners_Guide docs.installed/ +%endif +%endif + +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/stap-server +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/stap-server +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/stap-server/.systemtap +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/stap-server +touch $RPM_BUILD_ROOT%{_localstatedir}/log/stap-server/log +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/systemtap +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/systemtap +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d +install -m 644 initscript/logrotate.stap-server $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/stap-server +mkdir -p $RPM_BUILD_ROOT%{sysconfdir}/rc.d/init.d/ +install -m 755 initscript/systemtap $RPM_BUILD_ROOT%{sysconfdir}/rc.d/init.d/%{?scl_prefix}systemtap +install -m 755 initscript/stap-server $RPM_BUILD_ROOT%{sysconfdir}/rc.d/init.d/%{?scl_prefix}stap-server +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/conf.d +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/script.d +install -m 644 initscript/config.systemtap $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/config + +%if %{with_systemd} +mkdir -p $RPM_BUILD_ROOT%{_unitdir} +touch $RPM_BUILD_ROOT%{_unitdir}/%{?scl_prefix}stap-server.service +install -m 644 stap-server.service $RPM_BUILD_ROOT%{_unitdir}/%{?scl_prefix}stap-server.service +mkdir -p $RPM_BUILD_ROOT%{_tmpfilesdir} +install -m 644 stap-server.conf $RPM_BUILD_ROOT%{_tmpfilesdir}/%{?scl_prefix}stap-server.conf +%else +install -m 755 initscript/stap-server $RPM_BUILD_ROOT%{initdir}/%{?scl_prefix}stap-server +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/stap-server/conf.d +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig +install -m 644 initscript/config.stap-server $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/stap-server +%endif + +%if %{with_emacsvim} +mkdir -p $RPM_BUILD_ROOT%{_emacs_sitelispdir} +install -p -m 644 emacs/systemtap-mode.el* $RPM_BUILD_ROOT%{_emacs_sitelispdir} +mkdir -p $RPM_BUILD_ROOT%{_emacs_sitestartdir} +install -p -m 644 emacs/systemtap-init.el $RPM_BUILD_ROOT%{_emacs_sitestartdir}/systemtap-init.el +for subdir in ftdetect ftplugin indent syntax +do + mkdir -p $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/$subdir + install -p -m 644 vim/$subdir/*.vim $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/$subdir +done +%endif + +%if %{with_virtguest} + mkdir -p $RPM_BUILD_ROOT%{udevrulesdir} + %if %{with_systemd} + install -p -m 644 staprun/guest/99-stapsh.rules $RPM_BUILD_ROOT%{udevrulesdir} + mkdir -p $RPM_BUILD_ROOT%{_unitdir} + install -p -m 644 staprun/guest/stapsh@.service $RPM_BUILD_ROOT%{_unitdir} + %else + install -p -m 644 staprun/guest/99-stapsh-init.rules $RPM_BUILD_ROOT%{udevrulesdir} + install -p -m 755 staprun/guest/stapshd $RPM_BUILD_ROOT%{initdir} + mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/systemtap + install -p -m 755 staprun/guest/stapsh-daemon $RPM_BUILD_ROOT%{_libexecdir}/systemtap + mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules + # Technically, this is only needed for RHEL5, in which the MODULE_ALIAS is missing, but + # it does no harm in RHEL6 as well + install -p -m 755 staprun/guest/virtio_console.modules $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules + %endif +%endif + +%if %{with_dracut} + mkdir -p $RPM_BUILD_ROOT%{dracutstap} + install -p -m 755 initscript/99stap/module-setup.sh $RPM_BUILD_ROOT%{dracutstap} + install -p -m 755 initscript/99stap/start-staprun.sh $RPM_BUILD_ROOT%{dracutstap} + touch $RPM_BUILD_ROOT%{dracutstap}/params.conf +%endif + +%clean +rm -rf ${RPM_BUILD_ROOT} + +%pre runtime +getent group stapusr >/dev/null || groupadd -g 156 -r stapusr 2>/dev/null || groupadd -r stapusr +getent group stapsys >/dev/null || groupadd -g 157 -r stapsys 2>/dev/null || groupadd -r stapsys +getent group stapdev >/dev/null || groupadd -g 158 -r stapdev 2>/dev/null || groupadd -r stapdev +exit 0 + +%pre server +getent group stap-server >/dev/null || groupadd -g 155 -r stap-server 2>/dev/null || groupadd -r stap-server +getent passwd stap-server >/dev/null || \ + useradd -c "Systemtap Compile Server" -u 155 -g stap-server -d %{_localstatedir}/lib/stap-server -r -s /sbin/nologin stap-server 2>/dev/null || \ + useradd -c "Systemtap Compile Server" -g stap-server -d %{_localstatedir}/lib/stap-server -r -s /sbin/nologin stap-server + +%post server + +# We have some duplication between the %files listings for the +# ~stap-server directories and the explicit mkdir/chown/chmod bits +# here. Part of the reason may be that a preexisting stap-server +# account may well be placed somewhere other than +# %{_localstatedir}/lib/stap-server, but we'd like their permissions +# set similarly. + +test -e ~stap-server && chmod 750 ~stap-server + +if [ ! -f ~stap-server/.systemtap/rc ]; then + mkdir -p ~stap-server/.systemtap + chown stap-server:stap-server ~stap-server/.systemtap + # PR16276: guess at a reasonable number for a default --rlimit-nproc + numcpu=`/usr/bin/getconf _NPROCESSORS_ONLN` + if [ -z "$numcpu" -o "$numcpu" -lt 1 ]; then numcpu=1; fi + nproc=`expr $numcpu \* 30` + echo "--rlimit-as=614400000 --rlimit-cpu=60 --rlimit-nproc=$nproc --rlimit-stack=1024000 --rlimit-fsize=51200000" > ~stap-server/.systemtap/rc + chown stap-server:stap-server ~stap-server/.systemtap/rc +fi + +test -e %{_localstatedir}/log/stap-server/log || { + touch %{_localstatedir}/log/stap-server/log + chmod 644 %{_localstatedir}/log/stap-server/log + chown stap-server:stap-server %{_localstatedir}/log/stap-server/log +} +# If it does not already exist, as stap-server, generate the certificate +# used for signing and for ssl. +if test ! -e ~stap-server/.systemtap/ssl/server/stap.cert; then + runuser -s /bin/sh - stap-server -c %{_libexecdir}/systemtap/stap-gen-cert >/dev/null +fi +# Prepare the service +%if %{with_systemd} + # Note, Fedora policy doesn't allow network services enabled by default + # /bin/systemctl enable stap-server.service >/dev/null 2>&1 || : + /bin/systemd-tmpfiles --create %{_tmpfilesdir}/stap-server.conf >/dev/null 2>&1 || : +%else + /sbin/chkconfig --add %{?scl_prefix}stap-server +%endif +exit 0 + +%triggerin client -- systemtap-server +if test -e ~stap-server/.systemtap/ssl/server/stap.cert; then + # echo Authorizing ssl-peer/trusted-signer certificate for local systemtap-server + %{_libexecdir}/systemtap/stap-authorize-cert ~stap-server/.systemtap/ssl/server/stap.cert %{_sysconfdir}/systemtap/ssl/client >/dev/null + %{_libexecdir}/systemtap/stap-authorize-cert ~stap-server/.systemtap/ssl/server/stap.cert %{_sysconfdir}/systemtap/staprun >/dev/null +fi +exit 0 +# XXX: corresponding %triggerun? + +%preun server +# Check that this is the actual deinstallation of the package, as opposed to +# just removing the old package on upgrade. +if [ $1 = 0 ] ; then + %if %{with_systemd} + /bin/systemctl --no-reload disable stap-server.service >/dev/null 2>&1 || : + /bin/systemctl stop stap-server.service >/dev/null 2>&1 || : + %else + /sbin/service %{?scl_prefix}stap-server stop >/dev/null 2>&1 + /sbin/chkconfig --del %{?scl_prefix}stap-server + %endif +fi +exit 0 + +%postun server +# Check whether this is an upgrade of the package. +# If so, restart the service if it's running +if [ "$1" -ge "1" ] ; then + %if %{with_systemd} + /bin/systemctl condrestart stap-server.service >/dev/null 2>&1 || : + %else + /sbin/service %{?scl_prefix}stap-server condrestart >/dev/null 2>&1 || : + %endif +fi +exit 0 + +%post initscript +%if %{with_systemd} + /bin/systemctl enable systemtap.service >/dev/null 2>&1 || : +%else + /sbin/chkconfig --add %{?scl_prefix}systemtap +%endif +exit 0 + +%preun initscript +# Check that this is the actual deinstallation of the package, as opposed to +# just removing the old package on upgrade. +if [ $1 = 0 ] ; then + %if %{with_systemd} + /bin/systemctl --no-reload disable systemtap.service >/dev/null 2>&1 || : + /bin/systemctl stop systemtap.service >/dev/null 2>&1 || : + %else + /sbin/service %{?scl_prefix}systemtap stop >/dev/null 2>&1 + /sbin/chkconfig --del %{?scl_prefix}systemtap + %endif +fi +exit 0 + +%postun initscript +# Check whether this is an upgrade of the package. +# If so, restart the service if it's running +if [ "$1" -ge "1" ] ; then + %if %{with_systemd} + /bin/systemctl condrestart systemtap.service >/dev/null 2>&1 || : + %else + /sbin/service %{?scl_prefix}systemtap condrestart >/dev/null 2>&1 || : + %endif +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 +(/sbin/rmmod uprobes) >/dev/null 2>&1 || true + +%preun +# Ditto +(make -C %{_datadir}/systemtap/runtime/uprobes clean) >/dev/null 2>&1 || true +(/sbin/rmmod uprobes) >/dev/null 2>&1 || true + +# ------------------------------------------------------------------------ + +%if %{with_java} + +%triggerin runtime-java -- java-1.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. + +%files server -f systemtap.lang +%defattr(-,root,root) +%{_bindir}/stap-server +%dir %{_libexecdir}/systemtap +%{_libexecdir}/systemtap/stap-serverd +%{_libexecdir}/systemtap/stap-start-server +%{_libexecdir}/systemtap/stap-stop-server +%{_libexecdir}/systemtap/stap-gen-cert +%{_libexecdir}/systemtap/stap-sign-module +%{_libexecdir}/systemtap/stap-authorize-cert +%{_libexecdir}/systemtap/stap-env +%{_mandir}/man7/stappaths.7* +%{_mandir}/man7/error* +%{_mandir}/man7/warning* +%{_mandir}/man8/stap-server.8* + +%if %{with_systemd} +%{_unitdir}/stap-server.service +%{_tmpfilesdir}/stap-server.conf +%else +%{initdir}/%{?scl_prefix}stap-server +%dir %{_sysconfdir}/stap-server/conf.d +%config(noreplace) %{_sysconfdir}/sysconfig/stap-server +%endif +%config(noreplace) %{_sysconfdir}/logrotate.d/stap-server +%dir %{_sysconfdir}/stap-server +%dir %attr(0750,stap-server,stap-server) %{_localstatedir}/lib/stap-server +%dir %attr(0700,stap-server,stap-server) %{_localstatedir}/lib/stap-server/.systemtap +%dir %attr(0755,stap-server,stap-server) %{_localstatedir}/log/stap-server +%ghost %config(noreplace) %attr(0644,stap-server,stap-server) %{_localstatedir}/log/stap-server/log +%ghost %attr(0755,stap-server,stap-server) %{_localstatedir}/run/stap-server +%doc README README.unprivileged AUTHORS NEWS COPYING + + +%files devel -f systemtap.lang +%{_bindir}/stap +%{_bindir}/stap-prep +%{_bindir}/stap-report +%dir %{_datadir}/systemtap +%{_datadir}/systemtap/runtime +%{_datadir}/systemtap/tapset +%{_mandir}/man1/stap.1* +%{_mandir}/man1/stap-prep.1* +%{_mandir}/man1/stap-report.1* +%{_mandir}/man7/error* +%{_mandir}/man7/stappaths.7* +%{_mandir}/man7/warning* +%doc README README.unprivileged AUTHORS NEWS COPYING +%if %{with_java} +%dir %{_libexecdir}/systemtap +%{_libexecdir}/systemtap/libHelperSDT_*.so +%endif +%if %{with_bundled_elfutils} +%dir %{_libdir}/systemtap +%{_libdir}/systemtap/lib*.so* +%endif + +%if %{with_emacsvim} +%{_emacs_sitelispdir}/*.el* +%{_emacs_sitestartdir}/systemtap-init.el +%{_datadir}/vim/vimfiles/*/*.vim +%endif + +%files runtime -f systemtap.lang +%defattr(-,root,root) +%attr(4110,root,stapusr) %{_bindir}/staprun +%{_bindir}/stapsh +%{_bindir}/stap-merge +%{_bindir}/stap-report +%if %{with_dyninst} +%{_bindir}/stapdyn +%endif +%dir %{_libexecdir}/systemtap +%{_libexecdir}/systemtap/stapio +%{_libexecdir}/systemtap/stap-env +%{_libexecdir}/systemtap/stap-authorize-cert +%if %{with_crash} +%dir %{_libdir}/systemtap +%{_libdir}/systemtap/staplog.so* +%endif +%{_mandir}/man1/stap-report.1* +%{_mandir}/man7/error* +%{_mandir}/man7/stappaths.7* +%{_mandir}/man7/warning* +%{_mandir}/man8/stapsh.8* +%{_mandir}/man8/staprun.8* +%if %{with_dyninst} +%{_mandir}/man8/stapdyn.8* +%endif +%doc README README.security AUTHORS NEWS COPYING + + +%files client -f systemtap.lang +%defattr(-,root,root) +%doc README README.unprivileged AUTHORS NEWS COPYING examples +%if %{with_docs} +%doc docs.installed/*.pdf +%doc docs.installed/tapsets/*.html +%if %{with_publican} +%doc docs.installed/SystemTap_Beginners_Guide +%endif +%endif +%{_bindir}/stap +%{_bindir}/stap-prep +%{_bindir}/stap-report +%{_mandir}/man1/stap.1* +%{_mandir}/man1/stap-prep.1* +%{_mandir}/man1/stap-merge.1* +%{_mandir}/man1/stap-report.1* +%{_mandir}/man3/* +%{_mandir}/man7/error* +%{_mandir}/man7/stappaths.7* +%{_mandir}/man7/warning* +%dir %{_datadir}/systemtap +%{_datadir}/systemtap/tapset + + +%files initscript +%defattr(-,root,root) +%{sysconfdir}/rc.d/init.d/%{?scl_prefix}systemtap +%dir %{_sysconfdir}/systemtap +%dir %{_sysconfdir}/systemtap/conf.d +%dir %{_sysconfdir}/systemtap/script.d +%config(noreplace) %{_sysconfdir}/systemtap/config +%dir %{_localstatedir}/cache/systemtap +%ghost %{_localstatedir}/run/systemtap +%{_mandir}/man8/systemtap.8* +%if %{with_dracut} + %dir %{dracutstap} + %{dracutstap}/* +%endif + + +%files sdt-devel -f systemtap.lang +%defattr(-,root,root) +%{_bindir}/dtrace +%{_includedir}/sys/sdt.h +%{_includedir}/sys/sdt-config.h +%{_mandir}/man1/dtrace.1* +%doc README AUTHORS NEWS COPYING + + +%files testsuite +%defattr(-,root,root) +%dir %{_datadir}/systemtap +%{_datadir}/systemtap/testsuite + +%if %{with_java} +%files runtime-java +%dir %{_libexecdir}/systemtap +%{_libexecdir}/systemtap/libHelperSDT_*.so +%{_libexecdir}/systemtap/HelperSDT.jar +%{_libexecdir}/systemtap/stapbm +%endif + +%if %{with_virthost} +%files runtime-virthost +%{_mandir}/man1/stapvirt.1* +%{_bindir}/stapvirt +%endif + +%if %{with_virtguest} +%files runtime-virtguest +%if %{with_systemd} + %{udevrulesdir}/99-stapsh.rules + %{_unitdir}/stapsh@.service +%else + %{udevrulesdir}/99-stapsh-init.rules + %dir %{_libexecdir}/systemtap + %{_libexecdir}/systemtap/stapsh-daemon + %{initdir}/stapshd + %{_sysconfdir}/sysconfig/modules/virtio_console.modules +%endif +%endif + + +# ------------------------------------------------------------------------ + +%changelog +* Tue Sep 16 2014 Josh Stone - 2.5-8 +- added BZ1140952.patch: use process_vm_readv/writev + +* Wed Aug 20 2014 Josh Stone - 2.5-7 +- rebuild for final dyninst 8.2 + +* Fri Jul 18 2014 Frank Ch. Eigler - 2.5-6 +- merge in RHEL-6.6-bound patches + +* Mon Jun 23 2014 Frank Ch. Eigler - 2.5-5 +- refreshed BZ1109084.patch + +* 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 + +* 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 May 21 2013 Frank Ch. Eigler - 2.1-8 +- bz965603 respin with newer elfutils + +* Fri Apr 19 2013 Frank Ch. Eigler - 2.1-7 +- bz855981 #c12 to improve stapdyn rhel5/6 compatibility + +* Wed Apr 17 2013 Frank Ch. Eigler - 2.1-6 +- bz855981 to improve stapdyn rhel5/6 compatibility + +* Fri Feb 22 2013 Frank Ch. Eigler - 2.1-4 +- Fix merge litter. + +* 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* + +* Wed Feb 13 2013 Serguei Makarov - 2.1-1 +- Upstream release. + +* Wed Jan 16 2013 Josh Stone 2.0-6 +- Set the docs override only for Fedora 18+ + +* Wed Jan 16 2013 Josh Stone 2.0-5 +- Backport fixes to work with kernel 3.7 + +* Mon Nov 19 2012 Josh Stone 2.0-4 +- Rebuild for the final dyninst 8.0. +- As with rawhide, disable docs due to bz864730 + +* Mon Nov 19 2012 Karsten Hopp 2.0-3 +- systemtap got compiled with an old dyninst library on ppc, bump release and rebuild + +* Mon Oct 29 2012 Josh Stone - 2.0-2 +- Rebuild for the new ABI in the dyninst snapshot + +* Tue Oct 09 2012 Josh Stone - 2.0-1 +- Upstream release. + +* Tue Sep 11 2012 William Cohen - 1.8-7 +- rhbz847919 need scl-compatible init scripts +- Backported fixes: +- rhbz848459 "groupadd: GID 156 is not unique" while installing systemtap-runtime-1.8-4.el5 +- rhbz848460 sdt.c on systemtap-testsuite cannot be compiled +- rhbz848461 /usr/libexec/systemtap/stap-authorize-cert: No such file or directory + +* Wed Sep 5 2012 William Cohen - 1.8-6 +- Backport fix for rhbz853357. + +* Thu Jul 5 2012 William Cohen - 1.8-5 +- Make compatible with software collections. + +* Wed Jun 27 2012 Stan Cox - 1.8-4 +- Backported fix for pr14325 + +* Wed Jun 27 2012 Stan Cox - 1.8-3 +- No publican in rhel 5. + +* Wed Jun 27 2012 Stan Cox - 1.8-2 +- Add s390 to the publican blacklist. + +* Sun Jun 17 2012 Frank Ch. Eigler - 1.8-1 +- Upstream release. + +* Wed Feb 01 2012 Frank Ch. Eigler - 1.7-1 +- Upstream release. + +* Fri Jan 13 2012 David Smith - 1.6-2 +- Fixed /bin/mktemp require. + +* Mon Jul 25 2011 Stan Cox - 1.6-1 +- Upstream release. + +* Mon May 23 2011 Stan Cox - 1.5-1 +- Upstream release. + +* Mon Jan 17 2011 Frank Ch. Eigler - 1.4-1 +- Upstream release. + +* Wed Jul 21 2010 Josh Stone - 1.3-1 +- Upstream release. + +* Mon Mar 22 2010 Frank Ch. Eigler - 1.2-1 +- Upstream release.