Compare commits
85 Commits
Author | SHA1 | Date |
---|---|---|
Björn Esser | afaf045a8d | |
Frank Ch. Eigler | 7b7d0a4564 | |
Frank Ch. Eigler | f9cde08988 | |
Fedora Release Engineering | 0337e2205b | |
Frank Ch. Eigler | d2b504472b | |
Frank Ch. Eigler | 2b9b42f2d9 | |
Frank Ch. Eigler | cce194f7aa | |
Frank Ch. Eigler | 4580a15cda | |
Miro Hrončok | c7fcc864dd | |
Aaron Merey | 91091ed9d4 | |
Aaron Merey | 0b77a93612 | |
Miro Hrončok | 16ba7e1ae4 | |
Frank Ch. Eigler | 3a4041d93e | |
Fedora Release Engineering | 0ee54e3e30 | |
Frank Ch. Eigler | 49549bc90e | |
Frank Ch. Eigler | f2ca371421 | |
Igor Gnatenko | b2c2629c5d | |
Igor Gnatenko | 990fc26c0a | |
Stan Cox | bb12cb8ceb | |
Frank Ch. Eigler | 91921b7935 | |
Serhei Makarov | a6724f27dd | |
Serhei Makarov | af410607bf | |
Serhei Makarov | 1a31851092 | |
Frank Ch. Eigler | 34ba7d8158 | |
Frank Ch. Eigler | 840641a3c3 | |
Frank Ch. Eigler | aa6fc8f4c3 | |
Frank Ch. Eigler | 76a4cb15d7 | |
Igor Gnatenko | e85c4ec28f | |
Frank Ch. Eigler | 38eab87aa2 | |
Fedora Release Engineering | 360a94dd83 | |
Frank Ch. Eigler | 00a7eb9b22 | |
Frank Ch. Eigler | 64b52e0137 | |
Frank Ch. Eigler | e398a475bc | |
Frank Ch. Eigler | c27bf142be | |
Frank Ch. Eigler | 3f6623da51 | |
Frank Ch. Eigler | 8fa0dba5a2 | |
Frank Ch. Eigler | 5a071c9e48 | |
Frank Ch. Eigler | c0ec2425f3 | |
Peter Robinson | e6b0de4db8 | |
Frank Ch. Eigler | a612da876f | |
Frank Ch. Eigler | 227f3127ce | |
Frank Ch. Eigler | 864ecbdfc2 | |
Frank Ch. Eigler | e5251ded41 | |
Frank Ch. Eigler | b6ed2853aa | |
Frank Ch. Eigler | c985571b05 | |
Frank Ch. Eigler | 2bcf1a3045 | |
Frank Ch. Eigler | 4fb6cc1adf | |
Frank Ch. Eigler | 19d1385d28 | |
Frank Ch. Eigler | 645ca44195 | |
Frank Ch. Eigler | c730acbcfd | |
Frank Ch. Eigler | 33ac182b01 | |
Frank Ch. Eigler | 31f6729a4f | |
Frank Ch. Eigler | 534796bb5d | |
Frank Ch. Eigler | 85ce83bb04 | |
Frank Ch. Eigler | 40630c72c2 | |
Frank Ch. Eigler | 48bf308579 | |
Frank Ch. Eigler | d09f6eaf35 | |
Frank Ch. Eigler | ddcf2c9e17 | |
Frank Ch. Eigler | 8564a9f880 | |
Frank Ch. Eigler | d4c7fab7e0 | |
Igor Gnatenko | 6c9283129e | |
Fedora Release Engineering | fe71a913bf | |
Jason Tibbitts | b24274bf97 | |
Miro Hrončok | 4919b3de2d | |
Frank Ch. Eigler | 3df356ef9a | |
Frank Ch. Eigler | 45296db740 | |
Frank Ch. Eigler | c0bbf37078 | |
Mark Wielaard | 4283558d0b | |
Mark Wielaard | 3634436052 | |
Mark Wielaard | b67c63adc5 | |
Mark Wielaard | 0d3a3a4eee | |
Mark Wielaard | c6a588ad5d | |
Mark Wielaard | a1381b8649 | |
Frank Ch. Eigler | ebf8c2dba1 | |
Frank Ch. Eigler | 5a43746846 | |
Björn Esser | 220dc6f998 | |
Frank Ch. Eigler | e58b85846b | |
Iryna Shcherbina | 4f54dc0c80 | |
Stan Cox | d65c8777af | |
Stan Cox | f70df36055 | |
Igor Gnatenko | 75c387b28c | |
Igor Gnatenko | 2c11815ddb | |
Igor Gnatenko | 9be34952bf | |
Igor Gnatenko | ac3f11bfc6 | |
Björn Esser | 64e8afca44 |
|
@ -4,3 +4,38 @@
|
|||
/systemtap-3.2-0.20170410gitcbf2583808d6.tar.gz
|
||||
/systemtap-3.2-0.20170512gitc67d8f274b21.tar.gz
|
||||
/systemtap-3.2.tar.gz
|
||||
/systemtap-3.3-0.20180222git5ef0c24456e3.tar.gz
|
||||
/systemtap-3.3-0.20180315gitc2585f2b58cd.tar.gz
|
||||
/systemtap-3.3-0.20180420gitd4a446c.tar.gz
|
||||
/systemtap-3.3-0.20180508git9c6ac6cda49e.tar.gz
|
||||
/systemtap-3.3.tar.gz
|
||||
/systemtap-4.0-0.20180810git.tar.gz
|
||||
/systemtap-4.0-0.20180906git37598c4fee7c.tar.gz
|
||||
/systemtap-4.0-0.20180914gitc51d4e55d285.tar.gz
|
||||
/systemtap-4.0-0.20180914gitc1befcceae01.tar.gz
|
||||
/systemtap-4.0-0.20180914git11a0a7aea387.tar.gz
|
||||
/systemtap-4.0-0.20180914gitfe4e14f4af16.tar.gz
|
||||
/systemtap-4.0-0.20180914gitfe4e14f4af16.1.tar.gz
|
||||
/systemtap-4.0-0.20181003git4ad1e11de831.tar.gz
|
||||
/systemtap-4.0.tar.gz
|
||||
/systemtap-4.1-0.20181126gitf082df49dd91.tar.gz
|
||||
/systemtap-4.1-0.20181126git47ce37a149b6.tar.gz
|
||||
/systemtap-4.1-0.20181203gitec3b46eb9b19.tar.gz
|
||||
/systemtap-4.1-0.20181204git891810c246d6.tar.gz
|
||||
/systemtap-4.1-0.20190123gitc8084763b75f.tar.gz
|
||||
/systemtap-4.1-0.20190125git905865da1024.tar.gz
|
||||
/systemtap-4.1-0.20190207git4e76869512d2.tar.gz
|
||||
/systemtap-4.1-0.20190307gitf7fb9c9182dc.tar.gz
|
||||
/systemtap-4.1-0.20190308gitb3627d9aa037.tar.gz
|
||||
/systemtap-4.1-0.20190327git2ede4cecb20c.tar.gz
|
||||
/systemtap-4.1-0.20190502git446e7c358247.tar.gz
|
||||
/systemtap-4.1.tar.gz
|
||||
/systemtap-4.2-0.20190513git8b868f3dd030.tar.gz
|
||||
/systemtap-4.2-0.20190613git2d77f531a5d1.tar.gz
|
||||
/systemtap-4.2-0.20190618git47c3f6c60174.tar.gz
|
||||
/systemtap-4.2-0.20190807gitebfc300ec2ad.tar.gz
|
||||
/systemtap-4.2-0.20190827git8ffab23ff.tar.gz
|
||||
/systemtap-4.2.tar.gz
|
||||
/systemtap-4.3-0.20200112gitb1e6a6645bba.tar.gz
|
||||
/systemtap-4.3-0.20200203git6c0b74f5910a.tar.gz
|
||||
/systemtap-4.3-0.20200211git91ffb97ad335.tar.gz
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
commit 9f81f10b0caf6dfc49c4b7ceb7902f45d37b532a (HEAD -> master, origin/master, origin/HEAD)
|
||||
Author: Frank Ch. Eigler <fche@redhat.com>
|
||||
Date: Fri Oct 20 10:01:58 2017 -0400
|
||||
|
||||
rhbz1504009: let dtrace -G -o /dev/null run, as in autoconf
|
||||
|
||||
commit c245153ca193c471a8c broke the ability of dtrace to be tested in
|
||||
autoconf "-G -o /dev/null" usage, because its output file name was too
|
||||
simple a function of the input name, and normal users can't write to
|
||||
/dev/null.dtrace-temp.c . Now we back down to mkstemp, like before,
|
||||
upon a failure of the simple concatenated name.
|
||||
|
||||
diff --git a/dtrace.in b/dtrace.in
|
||||
index 2e2e002a5c56..25efc253b708 100644
|
||||
--- a/dtrace.in
|
||||
+++ b/dtrace.in
|
||||
@@ -410,8 +410,12 @@ from tempfile import mkstemp
|
||||
else:
|
||||
print("header: " + fname)
|
||||
|
||||
- fname = filename + ".dtrace-temp.c"
|
||||
- fdesc = open(fname, mode='w')
|
||||
+ try: # for reproducible-builds purposes, prefer a fixed path name pattern
|
||||
+ fname = filename + ".dtrace-temp.c"
|
||||
+ fdesc = open(fname, mode='w')
|
||||
+ except: # but that doesn't work for -o /dev/null - see rhbz1504009
|
||||
+ (ignore,fname) = mkstemp(suffix=".c")
|
||||
+ fdesc = open(fname, mode='w')
|
||||
providers.semaphore_write(fdesc)
|
||||
fdesc.close()
|
||||
cc1 = os.environ.get("CC", "gcc")
|
||||
diff --git a/testsuite/systemtap.base/dtrace.exp b/testsuite/systemtap.base/dtrace.exp
|
||||
index fa6b3ec3f6d3..7c60f09d70b8 100644
|
||||
--- a/testsuite/systemtap.base/dtrace.exp
|
||||
+++ b/testsuite/systemtap.base/dtrace.exp
|
||||
@@ -83,6 +83,13 @@ if {[file exists /tmp/XXX.o]} then {
|
||||
}
|
||||
exec rm -f /tmp/XXX.o
|
||||
|
||||
+verbose -log "$dtrace -G -s $dpath -o /dev/null"
|
||||
+if [as_non_root "$python $dtrace -G -s $dpath -o /dev/null"] {
|
||||
+ fail "$test -G -o /dev/null"
|
||||
+} else {
|
||||
+ pass "$test -G -o /dev/null"
|
||||
+}
|
||||
+
|
||||
verbose -log "$dtrace -G -s $dpath -o /tmp/XXX"
|
||||
catch {exec $python $dtrace -G -s $dpath -o /tmp/XXX} res
|
||||
if {[file exists /tmp/XXX]} then {
|
|
@ -1,273 +0,0 @@
|
|||
From fbb26e17a4c026f05a497fc5d584516bad3b6950 Mon Sep 17 00:00:00 2001
|
||||
From: David Smith <dsmith@redhat.com>
|
||||
Date: Wed, 6 Dec 2017 14:37:42 -0600
|
||||
Subject: [PATCH] Fix PR22551 by updating the use of timers for the 4.15
|
||||
kernel.
|
||||
|
||||
* runtime/linux/timer_compatibility.h: New file.
|
||||
* runtime/time.c: Update timer callback function parameter type. Update
|
||||
timer initialization.
|
||||
* runtime/transport/relay_v2.c: Ditto.
|
||||
* runtime/transport/transport.c: Ditto.
|
||||
* tapset-timers.cxx (timer_derived_probe_group::emit_module_decls):
|
||||
Ditto. Handle old and new timer callback interface.
|
||||
* runtime/linux/runtime.h: Include timer_compatibility.h instead of timer.h.
|
||||
* tapset/linux/scsi.stp: Ditto.
|
||||
---
|
||||
runtime/linux/runtime.h | 2 +-
|
||||
runtime/linux/timer_compatibility.h | 76 +++++++++++++++++++++++++++++++++++++
|
||||
runtime/time.c | 7 ++--
|
||||
runtime/transport/relay_v2.c | 8 ++--
|
||||
runtime/transport/transport.c | 13 +++----
|
||||
tapset-timers.cxx | 14 +++++--
|
||||
tapset/linux/scsi.stp | 2 +-
|
||||
7 files changed, 100 insertions(+), 22 deletions(-)
|
||||
create mode 100644 runtime/linux/timer_compatibility.h
|
||||
|
||||
diff --git a/runtime/linux/runtime.h b/runtime/linux/runtime.h
|
||||
index 9c585a2..df9b74c 100644
|
||||
--- a/runtime/linux/runtime.h
|
||||
+++ b/runtime/linux/runtime.h
|
||||
@@ -34,7 +34,7 @@
|
||||
#include <linux/compat.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/mm.h>
|
||||
-#include <linux/timer.h>
|
||||
+#include "timer_compatibility.h"
|
||||
#include <linux/delay.h>
|
||||
#include <linux/profile.h>
|
||||
#include <linux/rcupdate.h>
|
||||
diff --git a/runtime/linux/timer_compatibility.h b/runtime/linux/timer_compatibility.h
|
||||
new file mode 100644
|
||||
index 0000000..ac03de9
|
||||
--- /dev/null
|
||||
+++ b/runtime/linux/timer_compatibility.h
|
||||
@@ -0,0 +1,76 @@
|
||||
+/*
|
||||
+ * linux/timer.h compatibility defines and inlines
|
||||
+ * Copyright (C) 2017 Red Hat Inc.
|
||||
+ *
|
||||
+ * This file is part of systemtap, and is free software. You can
|
||||
+ * redistribute it and/or modify it under the terms of the GNU General
|
||||
+ * Public License (GPL); either version 2, or (at your option) any
|
||||
+ * later version.
|
||||
+ */
|
||||
+
|
||||
+#ifndef _TIMER_COMPATIBILITY_H_
|
||||
+#define _TIMER_COMPATIBILITY_H_
|
||||
+
|
||||
+#include <linux/timer.h>
|
||||
+
|
||||
+/*
|
||||
+ * Starting with the 4.15 kernel, the timer interface
|
||||
+ * changed. Originally, you'd do something like:
|
||||
+ *
|
||||
+ * static void timer_func(unsigned long val);
|
||||
+ *
|
||||
+ * init_timer(&timer);
|
||||
+ * timer.expires = jiffies + STP_RELAY_TIMER_INTERVAL;
|
||||
+ * timer.function = timer_func;
|
||||
+ * timer.data = 0;
|
||||
+ * add_timer(&timer);
|
||||
+ *
|
||||
+ * The 'data' parameter would get passed to the callback
|
||||
+ * function. Starting with 4.15, you'd do something like this:
|
||||
+ *
|
||||
+ * static void timer_func(struct timer_list *val);
|
||||
+ *
|
||||
+ * timer_setup(&timer, timer_func, 0);
|
||||
+ * timer.expires = jiffies + STP_RELAY_TIMER_INTERVAL;
|
||||
+ * add_timer(&timer);
|
||||
+ *
|
||||
+ * With the new code, the timer that caused the callback gets passed
|
||||
+ * to the timer callback function. The 'data' field has been removed.
|
||||
+ *
|
||||
+ * So, we're going to use the new interface. To hide the differences
|
||||
+ * between the callback function parameter type, we'll define a new
|
||||
+ * type, 'stp_timer_callback_parameter_t'.
|
||||
+ *
|
||||
+ * If code needs to figure out the difference between the old and new
|
||||
+ * interface, it should test the TIMER_TRACE_FLAGMASK define (which
|
||||
+ * only exists in the new interface).
|
||||
+ */
|
||||
+
|
||||
+#if defined(TIMER_TRACE_FLAGMASK)
|
||||
+/* This is the >= 4.15 kernel interface. */
|
||||
+
|
||||
+typedef struct timer_list * stp_timer_callback_parameter_t;
|
||||
+
|
||||
+#else
|
||||
+/* This is the < 4.15 kernel interface. */
|
||||
+
|
||||
+typedef unsigned long stp_timer_callback_parameter_t;
|
||||
+
|
||||
+/**
|
||||
+ * timer_setup - prepare a timer for first use
|
||||
+ * @timer: the timer in question
|
||||
+ * @callback: the function to call when timer expires
|
||||
+ * @flags: any TIMER_* flags (note that anything other than 0 is an
|
||||
+ * error, since this compatibility function can't support any
|
||||
+ * of the TIMER_* flags)
|
||||
+ */
|
||||
+#define timer_setup(timer, callback, flags) \
|
||||
+ { \
|
||||
+ init_timer((timer)); \
|
||||
+ (timer)->function = callback; \
|
||||
+ (timer)->data = 0; \
|
||||
+ BUILD_BUG_ON_ZERO((flags) != 0); \
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+#endif /* _TIMER_COMPATIBILITY_H_ */
|
||||
diff --git a/runtime/time.c b/runtime/time.c
|
||||
index 2e666d5..91ceafa 100644
|
||||
--- a/runtime/time.c
|
||||
+++ b/runtime/time.c
|
||||
@@ -168,10 +168,10 @@ __stp_time_smp_callback(void *val)
|
||||
|
||||
/* The timer callback is in a softIRQ -- interrupts enabled. */
|
||||
static void
|
||||
-__stp_time_timer_callback(unsigned long val)
|
||||
+__stp_time_timer_callback(stp_timer_callback_parameter_t unused)
|
||||
{
|
||||
stp_time_t *time =__stp_time_local_update();
|
||||
- (void) val;
|
||||
+ (void) unused;
|
||||
|
||||
/* PR6481: make sure IRQs are enabled before resetting the timer
|
||||
(IRQs are disabled and then reenabled in
|
||||
@@ -200,9 +200,8 @@ __stp_init_time(void *info)
|
||||
time->freq = __stp_get_freq();
|
||||
__stp_time_local_update();
|
||||
|
||||
- init_timer(&time->timer);
|
||||
+ timer_setup(&time->timer, __stp_time_timer_callback, 0);
|
||||
time->timer.expires = jiffies + STP_TIME_SYNC_INTERVAL;
|
||||
- time->timer.function = __stp_time_timer_callback;
|
||||
|
||||
#ifndef STAPCONF_ADD_TIMER_ON
|
||||
add_timer(&time->timer);
|
||||
diff --git a/runtime/transport/relay_v2.c b/runtime/transport/relay_v2.c
|
||||
index f81d75d..135951a 100644
|
||||
--- a/runtime/transport/relay_v2.c
|
||||
+++ b/runtime/transport/relay_v2.c
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/relay.h>
|
||||
-#include <linux/timer.h>
|
||||
+#include "../linux/timer_compatibility.h"
|
||||
#include "../uidgid_compatibility.h"
|
||||
#include "relay_compat.h"
|
||||
|
||||
@@ -120,7 +120,7 @@ static void __stp_relay_wakeup_readers(struct rchan_buf *buf)
|
||||
wake_up_interruptible(&buf->read_wait);
|
||||
}
|
||||
|
||||
-static void __stp_relay_wakeup_timer(unsigned long val)
|
||||
+static void __stp_relay_wakeup_timer(stp_timer_callback_parameter_t unused)
|
||||
{
|
||||
#ifdef STP_BULKMODE
|
||||
int i;
|
||||
@@ -151,10 +151,8 @@ static void __stp_relay_wakeup_timer(unsigned long val)
|
||||
static void __stp_relay_timer_init(void)
|
||||
{
|
||||
atomic_set(&_stp_relay_data.wakeup, 0);
|
||||
- init_timer(&_stp_relay_data.timer);
|
||||
+ timer_setup(&_stp_relay_data.timer, __stp_relay_wakeup_timer, 0);
|
||||
_stp_relay_data.timer.expires = jiffies + STP_RELAY_TIMER_INTERVAL;
|
||||
- _stp_relay_data.timer.function = __stp_relay_wakeup_timer;
|
||||
- _stp_relay_data.timer.data = 0;
|
||||
add_timer(&_stp_relay_data.timer);
|
||||
smp_mb();
|
||||
}
|
||||
diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c
|
||||
index 3400f22..320fd18 100644
|
||||
--- a/runtime/transport/transport.c
|
||||
+++ b/runtime/transport/transport.c
|
||||
@@ -311,7 +311,7 @@ static void _stp_detach(void)
|
||||
}
|
||||
|
||||
|
||||
-static void _stp_ctl_work_callback(unsigned long val);
|
||||
+static void _stp_ctl_work_callback(stp_timer_callback_parameter_t unused);
|
||||
|
||||
/*
|
||||
* Called when stapio opens the control channel.
|
||||
@@ -320,13 +320,12 @@ static void _stp_attach(void)
|
||||
{
|
||||
dbug_trans(1, "attach\n");
|
||||
_stp_pid = current->pid;
|
||||
- if (_stp_namespaces_pid < 1)
|
||||
- _stp_namespaces_pid = _stp_pid;
|
||||
+ if (_stp_namespaces_pid < 1)
|
||||
+ _stp_namespaces_pid = _stp_pid;
|
||||
_stp_transport_data_fs_overwrite(0);
|
||||
- init_timer(&_stp_ctl_work_timer);
|
||||
+
|
||||
+ timer_setup(&_stp_ctl_work_timer, _stp_ctl_work_callback, 0);
|
||||
_stp_ctl_work_timer.expires = jiffies + STP_CTL_TIMER_INTERVAL;
|
||||
- _stp_ctl_work_timer.function = _stp_ctl_work_callback;
|
||||
- _stp_ctl_work_timer.data= 0;
|
||||
add_timer(&_stp_ctl_work_timer);
|
||||
}
|
||||
|
||||
@@ -341,7 +340,7 @@ static void _stp_attach(void)
|
||||
* notified. Reschedules itself if someone is still attached
|
||||
* to the cmd channel.
|
||||
*/
|
||||
-static void _stp_ctl_work_callback(unsigned long val)
|
||||
+static void _stp_ctl_work_callback(stp_timer_callback_parameter_t unused)
|
||||
{
|
||||
int do_io = 0;
|
||||
unsigned long flags;
|
||||
diff --git a/tapset-timers.cxx b/tapset-timers.cxx
|
||||
index 1a40bcd..0ab4d69 100644
|
||||
--- a/tapset-timers.cxx
|
||||
+++ b/tapset-timers.cxx
|
||||
@@ -122,9 +122,13 @@ timer_derived_probe_group::emit_module_decls (systemtap_session& s)
|
||||
s.op->newline(-1) << "};";
|
||||
s.op->newline();
|
||||
|
||||
- s.op->newline() << "static void enter_timer_probe (unsigned long val) {";
|
||||
+ s.op->newline() << "static void enter_timer_probe (stp_timer_callback_parameter_t val) {";
|
||||
+ s.op->newline() << "#if defined(TIMER_TRACE_FLAGMASK)";
|
||||
+ s.op->newline(1) << "struct stap_timer_probe* stp = container_of(val, struct stap_timer_probe, timer_list);";
|
||||
+ s.op->newline(-1) << "#else";
|
||||
s.op->newline(1) << "struct stap_timer_probe* stp = & stap_timer_probes [val];";
|
||||
- s.op->newline() << "if ((atomic_read (session_state()) == STAP_SESSION_STARTING) ||";
|
||||
+ s.op->newline(-1) << "#endif";
|
||||
+ s.op->newline(1) << "if ((atomic_read (session_state()) == STAP_SESSION_STARTING) ||";
|
||||
s.op->newline() << " (atomic_read (session_state()) == STAP_SESSION_RUNNING))";
|
||||
s.op->newline(1) << "mod_timer (& stp->timer_list, jiffies + ";
|
||||
emit_interval (s.op);
|
||||
@@ -148,9 +152,11 @@ timer_derived_probe_group::emit_module_init (systemtap_session& s)
|
||||
s.op->newline() << "for (i=0; i<" << probes.size() << "; i++) {";
|
||||
s.op->newline(1) << "struct stap_timer_probe* stp = & stap_timer_probes [i];";
|
||||
s.op->newline() << "probe_point = stp->probe->pp;";
|
||||
- s.op->newline() << "init_timer (& stp->timer_list);";
|
||||
- s.op->newline() << "stp->timer_list.function = & enter_timer_probe;";
|
||||
+
|
||||
+ s.op->newline() << "timer_setup (& stp->timer_list, enter_timer_probe, 0);";
|
||||
+ s.op->newline() << "#if !defined(TIMER_TRACE_FLAGMASK)";
|
||||
s.op->newline() << "stp->timer_list.data = i;"; // NB: important!
|
||||
+ s.op->newline() << "#endif";
|
||||
// copy timer renew calculations from above :-(
|
||||
s.op->newline() << "stp->timer_list.expires = jiffies + ";
|
||||
emit_interval (s.op);
|
||||
diff --git a/tapset/linux/scsi.stp b/tapset/linux/scsi.stp
|
||||
index 44f686c..3577942 100644
|
||||
--- a/tapset/linux/scsi.stp
|
||||
+++ b/tapset/linux/scsi.stp
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <scsi/scsi_cmnd.h>
|
||||
#include <scsi/scsi_device.h>
|
||||
#include <scsi/scsi_host.h>
|
||||
-#include <linux/timer.h>
|
||||
+#include "linux/timer_compatibility.h"
|
||||
#include <linux/blkdev.h>
|
||||
%}
|
||||
|
||||
--
|
||||
2.9.3
|
||||
|
2
sources
2
sources
|
@ -1 +1 @@
|
|||
SHA512 (systemtap-3.2.tar.gz) = 6036ed1b5189fd3fcfdeeaa526a3539ac632d0b687a063b5e3424e8f613bfc2c8d079742b0262b547128e97e30e4beb61898b23761657aee519e61346ac92e94
|
||||
SHA512 (systemtap-4.3-0.20200211git91ffb97ad335.tar.gz) = 449959f46a89633f57c20cbeb0ded7031587e6df7cf19c30a237bb1886a7235e066c2878023385a7ec83e6045ab31bc8819991574a5840c8080d2ea066974eb5
|
||||
|
|
312
systemtap.spec
312
systemtap.spec
|
@ -1,19 +1,19 @@
|
|||
%{!?with_sqlite: %global with_sqlite 0%{?fedora} >= 17 || 0%{?rhel} >= 7}
|
||||
%{!?with_docs: %global with_docs 1}
|
||||
# prefer prebuilt docs
|
||||
%{!?with_docs: %global with_docs 0}
|
||||
%{!?with_htmldocs: %global with_htmldocs 0}
|
||||
%{!?with_monitor: %global with_monitor 1}
|
||||
# crash is not available
|
||||
%ifarch ppc ppc64 %{sparc} aarch64 ppc64le %{mips}
|
||||
%ifarch ppc ppc64 %{sparc} %{mips}
|
||||
%{!?with_crash: %global with_crash 0}
|
||||
%else
|
||||
%{!?with_crash: %global with_crash 1}
|
||||
%endif
|
||||
%{!?with_rpm: %global with_rpm 1}
|
||||
%{!?with_bundled_elfutils: %global with_bundled_elfutils 0}
|
||||
%{!?elfutils_version: %global elfutils_version 0.142}
|
||||
%{!?pie_supported: %global pie_supported 1}
|
||||
%{!?with_boost: %global with_boost 0}
|
||||
%ifarch %{ix86} x86_64 ppc ppc64
|
||||
%ifarch %{ix86} x86_64 ppc ppc64 ppc64le aarch64
|
||||
%{!?with_dyninst: %global with_dyninst 0%{?fedora} >= 18 || 0%{?rhel} >= 7}
|
||||
%else
|
||||
%{!?with_dyninst: %global with_dyninst 0}
|
||||
|
@ -33,14 +33,18 @@
|
|||
%{!?with_openssl: %global with_openssl 0}
|
||||
%endif
|
||||
%{!?with_pyparsing: %global with_pyparsing 0%{?fedora} >= 18 || 0%{?rhel} >= 7}
|
||||
%{!?with_python3: %global with_python3 0%{?fedora} >= 23}
|
||||
%{!?with_python2_probes: %global with_python2_probes 1}
|
||||
%{!?with_python3_probes: %global with_python3_probes 0%{?fedora} >= 23}
|
||||
%{!?with_python3: %global with_python3 0%{?fedora} >= 23 || 0%{?rhel} > 7}
|
||||
%{!?with_python2_probes: %global with_python2_probes (0%{?fedora} <= 28 && 0%{?rhel} <= 7)}
|
||||
%{!?with_python3_probes: %global with_python3_probes (0%{?fedora} >= 23 || 0%{?rhel} > 7)}
|
||||
%{!?with_httpd: %global with_httpd 0}
|
||||
%{!?with_specific_python: %global with_specific_python 0%{?fedora} >= 31}
|
||||
|
||||
# Virt is supported on these arches, even on el7, but it's not in core EL7
|
||||
%if 0%{?rhel} <= 7
|
||||
%ifarch ppc64le aarch64
|
||||
%global with_virthost 0
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 6
|
||||
%define initdir %{_initddir}
|
||||
|
@ -66,22 +70,26 @@
|
|||
%define dracutstap %{_prefix}/share/dracut/modules.d/99stap
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} >= 6
|
||||
%if 0%{?rhel} == 6 || 0%{?rhel} == 7
|
||||
%define dracutbindir /sbin
|
||||
%else
|
||||
%define dracutbindir %{_bindir}
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} == 6
|
||||
%{!?_rpmmacrodir: %define _rpmmacrodir /etc/rpm/}
|
||||
%else
|
||||
%{!?_rpmmacrodir: %define _rpmmacrodir %{_rpmconfigdir}/macros.d}
|
||||
%endif
|
||||
|
||||
# To avoid testsuite/*/*.stp has shebang which doesn't start with '/'
|
||||
%define __brp_mangle_shebangs_exclude_from .stp$
|
||||
|
||||
Name: systemtap
|
||||
Version: 3.2
|
||||
Release: 3%{?dist}
|
||||
Version: 4.3
|
||||
Release: 0.20200212git91ffb97ad335%{?dist}
|
||||
# for version, see also configure.ac
|
||||
|
||||
Patch10: rhbz1504009.patch
|
||||
|
||||
# redhat: https://bugzilla.redhat.com/show_bug.cgi?id=1546563
|
||||
# upstream: https://sourceware.org/bugzilla/show_bug.cgi?id=22551
|
||||
Patch11: rhbz1546563.patch
|
||||
|
||||
# Packaging abstract:
|
||||
#
|
||||
|
@ -111,19 +119,18 @@ Patch11: rhbz1546563.patch
|
|||
# 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
|
||||
Source: %{name}-%{version}-0.20200211git91ffb97ad335.tar.gz
|
||||
|
||||
# Build*
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: cpio
|
||||
BuildRequires: gettext-devel
|
||||
BuildRequires: pkgconfig(nss)
|
||||
BuildRequires: pkgconfig(avahi-client)
|
||||
%if %{with_dyninst}
|
||||
BuildRequires: dyninst-devel >= 8.0
|
||||
BuildRequires: dyninst-devel >= 10.0
|
||||
BuildRequires: pkgconfig(libselinux)
|
||||
%endif
|
||||
%if %{with_sqlite}
|
||||
|
@ -146,14 +153,7 @@ BuildRequires: crash-devel zlib-devel
|
|||
%if %{with_rpm}
|
||||
BuildRequires: rpm-devel
|
||||
%endif
|
||||
%if %{with_bundled_elfutils}
|
||||
Source1: elfutils-%{elfutils_version}.tar.gz
|
||||
Patch1: elfutils-portability.patch
|
||||
BuildRequires: m4
|
||||
%global setup_elfutils -a1
|
||||
%else
|
||||
BuildRequires: elfutils-devel >= %{elfutils_version}
|
||||
%endif
|
||||
%if %{with_docs}
|
||||
BuildRequires: /usr/bin/latex /usr/bin/dvips /usr/bin/ps2pdf
|
||||
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
|
||||
|
@ -185,13 +185,20 @@ BuildRequires: readline-devel
|
|||
BuildRequires: pkgconfig(ncurses)
|
||||
%endif
|
||||
%if %{with_python2_probes}
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python2-devel
|
||||
%if 0%{?fedora} >= 1
|
||||
BuildRequires: python2-setuptools
|
||||
%else
|
||||
BuildRequires: python-setuptools
|
||||
%endif
|
||||
%endif
|
||||
%if %{with_python3_probes}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
%endif
|
||||
%if %{with_specific_python}
|
||||
BuildRequires: /usr/bin/pathfix.py
|
||||
%endif
|
||||
|
||||
%if %{with_httpd}
|
||||
BuildRequires: libmicrohttpd-devel
|
||||
|
@ -212,26 +219,26 @@ the components needed to locally develop and execute systemtap scripts.
|
|||
|
||||
%package server
|
||||
Summary: Instrumentation System Server
|
||||
Group: Development/System
|
||||
License: GPLv2+
|
||||
URL: http://sourceware.org/systemtap/
|
||||
Requires: systemtap-devel = %{version}-%{release}
|
||||
# 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
|
||||
Conflicts: systemtap-devel < %{version}-%{release}
|
||||
Conflicts: systemtap-runtime < %{version}-%{release}
|
||||
Conflicts: systemtap-client < %{version}-%{release}
|
||||
Requires: nss coreutils
|
||||
Requires: zip unzip
|
||||
Requires(pre): shadow-utils
|
||||
Requires(post): chkconfig
|
||||
Requires(preun): chkconfig
|
||||
Requires(preun): initscripts
|
||||
Requires(postun): initscripts
|
||||
BuildRequires: nss-devel avahi-devel
|
||||
%if %{with_openssl}
|
||||
Requires: openssl
|
||||
%endif
|
||||
%if %{with_systemd}
|
||||
Requires: systemd
|
||||
%else
|
||||
Requires(post): chkconfig
|
||||
Requires(preun): chkconfig
|
||||
Requires(preun): initscripts
|
||||
Requires(postun): initscripts
|
||||
%endif
|
||||
|
||||
%description server
|
||||
|
@ -242,15 +249,20 @@ compiles systemtap scripts to kernel objects on their demand.
|
|||
|
||||
%package devel
|
||||
Summary: Programmable system-wide instrumentation system - development headers, tools
|
||||
Group: Development/System
|
||||
License: GPLv2+
|
||||
URL: http://sourceware.org/systemtap/
|
||||
# The virtual provide 'kernel-devel-uname-r' tries to get the right
|
||||
# kernel variant (kernel-PAE, kernel-debug, etc.) devel package
|
||||
# installed.
|
||||
|
||||
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 20
|
||||
Recommends: (kernel-debug-devel if kernel-debug)
|
||||
Recommends: (kernel-devel if kernel)
|
||||
%else
|
||||
Requires: kernel-devel-uname-r
|
||||
%{?fedora:Suggests: kernel-devel}
|
||||
%endif
|
||||
|
||||
Requires: gcc make
|
||||
Conflicts: systemtap-client < %{version}-%{release}
|
||||
Conflicts: systemtap-server < %{version}-%{release}
|
||||
Conflicts: systemtap-runtime < %{version}-%{release}
|
||||
# Suggest: kernel-debuginfo
|
||||
|
||||
%description devel
|
||||
|
@ -264,10 +276,12 @@ a copy of the standard tapset library and the runtime library C files.
|
|||
|
||||
%package runtime
|
||||
Summary: Programmable system-wide instrumentation system - runtime
|
||||
Group: Development/System
|
||||
License: GPLv2+
|
||||
URL: http://sourceware.org/systemtap/
|
||||
Requires(pre): shadow-utils
|
||||
Conflicts: systemtap-devel < %{version}-%{release}
|
||||
Conflicts: systemtap-server < %{version}-%{release}
|
||||
Conflicts: systemtap-client < %{version}-%{release}
|
||||
|
||||
%description runtime
|
||||
SystemTap runtime contains the components needed to execute
|
||||
|
@ -277,13 +291,15 @@ using a local or remote systemtap-devel installation.
|
|||
|
||||
%package client
|
||||
Summary: Programmable system-wide instrumentation system - client
|
||||
Group: Development/System
|
||||
License: GPLv2+
|
||||
URL: http://sourceware.org/systemtap/
|
||||
Requires: zip unzip
|
||||
Requires: systemtap-runtime = %{version}-%{release}
|
||||
Requires: coreutils grep sed unzip zip
|
||||
Requires: openssh-clients
|
||||
Conflicts: systemtap-devel < %{version}-%{release}
|
||||
Conflicts: systemtap-server < %{version}-%{release}
|
||||
Conflicts: systemtap-runtime < %{version}-%{release}
|
||||
%if %{with_mokutil}
|
||||
Requires: mokutil
|
||||
%endif
|
||||
|
@ -298,14 +314,17 @@ documentation, and a copy of the tapset library for reference.
|
|||
|
||||
%package initscript
|
||||
Summary: Systemtap Initscripts
|
||||
Group: Development/System
|
||||
License: GPLv2+
|
||||
URL: http://sourceware.org/systemtap/
|
||||
Requires: systemtap = %{version}-%{release}
|
||||
%if %{with_systemd}
|
||||
Requires: systemd
|
||||
%else
|
||||
Requires(post): chkconfig
|
||||
Requires(preun): chkconfig
|
||||
Requires(preun): initscripts
|
||||
Requires(postun): initscripts
|
||||
%endif
|
||||
|
||||
%description initscript
|
||||
This package includes a SysVinit script to launch selected systemtap
|
||||
|
@ -315,14 +334,17 @@ boot-time probing if supported.
|
|||
|
||||
%package sdt-devel
|
||||
Summary: Static probe support tools
|
||||
Group: Development/System
|
||||
License: GPLv2+ and Public Domain
|
||||
URL: http://sourceware.org/systemtap/
|
||||
%if %{with_pyparsing}
|
||||
%if %{with_python3}
|
||||
Requires: python3-pyparsing
|
||||
%else
|
||||
%if 0%{?rhel} >= 7
|
||||
Requires: pyparsing
|
||||
%else
|
||||
Requires: python2-pyparsing
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
|
||||
|
@ -335,7 +357,6 @@ with the optional dtrace-compatibility preprocessor to process related
|
|||
|
||||
%package testsuite
|
||||
Summary: Instrumentation System Testsuite
|
||||
Group: Development/System
|
||||
License: GPLv2+
|
||||
URL: http://sourceware.org/systemtap/
|
||||
Requires: systemtap = %{version}-%{release}
|
||||
|
@ -393,23 +414,21 @@ 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
|
||||
Requires: iproute
|
||||
Requires: java-devel
|
||||
|
||||
%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.
|
||||
that probe Java processes running on the OpenJDK runtimes using Byteman.
|
||||
%endif
|
||||
|
||||
%if %{with_python2_probes}
|
||||
%package runtime-python2
|
||||
Summary: Systemtap Python 2 Runtime Support
|
||||
Group: Development/System
|
||||
License: GPLv2+
|
||||
URL: http://sourceware.org/systemtap/
|
||||
Requires: systemtap-runtime = %{version}-%{release}
|
||||
|
@ -422,20 +441,36 @@ that probe python 2 processes.
|
|||
%if %{with_python3_probes}
|
||||
%package runtime-python3
|
||||
Summary: Systemtap Python 3 Runtime Support
|
||||
Group: Development/System
|
||||
License: GPLv2+
|
||||
URL: http://sourceware.org/systemtap/
|
||||
Requires: systemtap-runtime = %{version}-%{release}
|
||||
|
||||
%if ! (%{with_python2_probes})
|
||||
# Provide an clean upgrade path when the python2 package is removed
|
||||
Obsoletes: %{name}-runtime-python2 < %{version}-%{release}
|
||||
%endif
|
||||
|
||||
%description runtime-python3
|
||||
This package includes support files needed to run systemtap scripts
|
||||
that probe python 3 processes.
|
||||
%endif
|
||||
|
||||
%if %{with_python3}
|
||||
%package exporter
|
||||
Summary: Systemtap-prometheus interoperation mechanism
|
||||
License: GPLv2+
|
||||
URL: http://sourceware.org/systemtap/
|
||||
Requires: systemtap-runtime = %{version}-%{release}
|
||||
|
||||
%description exporter
|
||||
This package includes files for a systemd service that manages
|
||||
systemtap sessions and relays prometheus metrics from the sessions
|
||||
to remote requesters on demand.
|
||||
%endif
|
||||
|
||||
%if %{with_virthost}
|
||||
%package runtime-virthost
|
||||
Summary: Systemtap Cross-VM Instrumentation - host
|
||||
Group: Development/System
|
||||
License: GPLv2+
|
||||
URL: http://sourceware.org/systemtap/
|
||||
Requires: libvirt >= 1.0.2
|
||||
|
@ -450,7 +485,6 @@ connection.
|
|||
%if %{with_virtguest}
|
||||
%package runtime-virtguest
|
||||
Summary: Systemtap Cross-VM Instrumentation - guest
|
||||
Group: Development/System
|
||||
License: GPLv2+
|
||||
URL: http://sourceware.org/systemtap/
|
||||
Requires: systemtap-runtime = %{version}-%{release}
|
||||
|
@ -472,38 +506,10 @@ systemtap-runtime-virthost machine to execute systemtap scripts.
|
|||
# ------------------------------------------------------------------------
|
||||
|
||||
%prep
|
||||
%setup -q %{?setup_elfutils}
|
||||
|
||||
%if %{with_bundled_elfutils}
|
||||
cd elfutils-%{elfutils_version}
|
||||
%patch1 -p1
|
||||
sleep 1
|
||||
find . \( -name Makefile.in -o -name aclocal.m4 \) -print | xargs touch
|
||||
sleep 1
|
||||
find . \( -name configure -o -name config.h.in \) -print | xargs touch
|
||||
cd ..
|
||||
%endif
|
||||
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%setup -q
|
||||
|
||||
%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
|
||||
|
@ -539,7 +545,7 @@ cd ..
|
|||
%global docs_config --enable-docs --disable-htmldocs
|
||||
%endif
|
||||
%else
|
||||
%global docs_config --disable-docs
|
||||
%global docs_config --enable-docs=prebuilt
|
||||
%endif
|
||||
|
||||
# Enable pie as configure defaults to disabling it
|
||||
|
@ -590,18 +596,20 @@ cd ..
|
|||
%global httpd_config --disable-httpd
|
||||
%endif
|
||||
|
||||
%if %{with_bpf}
|
||||
%global bpf_config --with-bpf
|
||||
%else
|
||||
%global bpf_config --without-bpf
|
||||
%endif
|
||||
|
||||
# We don't ship compileworthy python code, just oddball samples
|
||||
%global py_auto_byte_compile 0
|
||||
|
||||
%configure %{?elfutils_config} %{dyninst_config} %{sqlite_config} %{crash_config} %{docs_config} %{pie_config} %{rpm_config} %{java_config} %{virt_config} %{dracut_config} %{python3_config} %{python2_probes_config} %{python3_probes_config} %{httpd_config} --disable-silent-rules --with-extra-version="rpm %{version}-%{release}"
|
||||
%configure %{dyninst_config} %{sqlite_config} %{crash_config} %{docs_config} %{pie_config} %{rpm_config} %{java_config} %{virt_config} %{dracut_config} %{python3_config} %{python2_probes_config} %{python3_probes_config} %{httpd_config} %{bpf_config} --disable-silent-rules --with-extra-version="rpm %{version}-%{release}"
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%if %{with_emacsvim}
|
||||
%{_emacs_bytecompile} emacs/systemtap-mode.el
|
||||
%endif
|
||||
|
||||
%install
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
%find_lang %{name}
|
||||
for dir in $(ls -1d $RPM_BUILD_ROOT%{_mandir}/{??,??_??}) ; do
|
||||
|
@ -630,19 +638,21 @@ install -c -m 755 stap-prep $RPM_BUILD_ROOT%{_bindir}/stap-prep
|
|||
# Copy over the testsuite
|
||||
cp -rp testsuite $RPM_BUILD_ROOT%{_datadir}/systemtap
|
||||
|
||||
%if %{with_docs}
|
||||
# We want the manuals in the special doc dir, not the generic doc install dir.
|
||||
# We build it in place and then move it away so it doesn't get installed
|
||||
# twice. rpm can specify itself where the (versioned) docs go with the
|
||||
# %doc directive.
|
||||
mkdir docs.installed
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/*.pdf docs.installed/
|
||||
%if %{with_docs}
|
||||
%if %{with_htmldocs}
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/tapsets docs.installed/
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/SystemTap_Beginners_Guide docs.installed/
|
||||
%endif
|
||||
%endif
|
||||
|
||||
install -D -m 644 macros.systemtap $RPM_BUILD_ROOT%{_rpmmacrodir}/macros.systemtap
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/stap-server
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/stap-server
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/stap-server/.systemtap
|
||||
|
@ -652,12 +662,27 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/systemtap
|
|||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/systemtap
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
|
||||
install -m 644 initscript/logrotate.stap-server $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/stap-server
|
||||
|
||||
# If using systemd systemtap.service file, retain the old init script in %{_libexecdir} as a helper.
|
||||
%if %{with_systemd}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
||||
touch $RPM_BUILD_ROOT%{_unitdir}/systemtap.service
|
||||
install -m 644 initscript/systemtap.service $RPM_BUILD_ROOT%{_unitdir}/systemtap.service
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
|
||||
install -m 755 initscript/systemtap $RPM_BUILD_ROOT%{_sbindir}/systemtap-service
|
||||
%else
|
||||
mkdir -p $RPM_BUILD_ROOT%{initdir}
|
||||
install -m 755 initscript/systemtap $RPM_BUILD_ROOT%{initdir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
|
||||
ln -sf %{initdir}/systemtap $RPM_BUILD_ROOT%{_sbindir}/systemtap-service
|
||||
# TODO CHECK CORRECTNESS: symlink %{_sbindir}/systemtap-service to %{initdir}/systemtap
|
||||
%endif
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/conf.d
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/script.d
|
||||
install -m 644 initscript/config.systemtap $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/config
|
||||
|
||||
%if %{with_systemd}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
||||
touch $RPM_BUILD_ROOT%{_unitdir}/stap-server.service
|
||||
|
@ -710,21 +735,32 @@ done
|
|||
touch $RPM_BUILD_ROOT%{dracutstap}/params.conf
|
||||
%endif
|
||||
|
||||
%clean
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
%if %{with_specific_python}
|
||||
# Some files got ambiguous python shebangs, we fix them after everything else is done
|
||||
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{python3_sitearch} %{buildroot}%{_bindir}/*
|
||||
%endif
|
||||
|
||||
%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
|
||||
getent group stapusr >/dev/null || groupadd -f -g 156 -r stapusr
|
||||
getent group stapsys >/dev/null || groupadd -f -g 157 -r stapsys
|
||||
getent group stapdev >/dev/null || groupadd -f -g 158 -r stapdev
|
||||
exit 0
|
||||
|
||||
%pre server
|
||||
getent group stap-server >/dev/null || groupadd -g 155 -r stap-server 2>/dev/null || groupadd -r stap-server
|
||||
getent group stap-server >/dev/null || groupadd -f -g 155 -r stap-server
|
||||
getent passwd stap-server >/dev/null || \
|
||||
useradd -c "Systemtap Compile Server" -u 155 -g stap-server -d %{_localstatedir}/lib/stap-server -r -s /sbin/nologin stap-server 2>/dev/null || \
|
||||
useradd -c "Systemtap Compile Server" -g stap-server -d %{_localstatedir}/lib/stap-server -r -s /sbin/nologin stap-server
|
||||
|
||||
%pre testsuite
|
||||
getent passwd stapusr >/dev/null || \
|
||||
useradd -c "Systemtap 'stapusr' User" -g stapusr -r -s /sbin/nologin stapusr
|
||||
getent passwd stapsys >/dev/null || \
|
||||
useradd -c "Systemtap 'stapsys' User" -g stapsys -G stapusr -r -s /sbin/nologin stapsys
|
||||
getent passwd stapdev >/dev/null || \
|
||||
useradd -c "Systemtap 'stapdev' User" -g stapdev -G stapusr -r -s /sbin/nologin stapdev
|
||||
exit 0
|
||||
|
||||
%post server
|
||||
|
||||
# We have some duplication between the %files listings for the
|
||||
|
@ -879,6 +915,24 @@ if [ "$1" -ge "1" ]; then
|
|||
fi
|
||||
exit 0
|
||||
|
||||
%if %{with_python3}
|
||||
%if %{with_systemd}
|
||||
%preun exporter
|
||||
if [ $1 = 0 ] ; then
|
||||
/bin/systemctl stop stap-exporter.service >/dev/null 2>&1 || :
|
||||
/bin/systemctl disable stap-exporter.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
exit 0
|
||||
|
||||
%postun exporter
|
||||
# Restart service if this is an upgrade rather than an uninstall
|
||||
if [ "$1" -ge "1" ]; then
|
||||
/bin/systemctl condrestart stap-exporter >/dev/null 2>&1 || :
|
||||
fi
|
||||
exit 0
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%post
|
||||
# Remove any previously-built uprobes.ko materials
|
||||
(make -C %{_datadir}/systemtap/runtime/uprobes clean) >/dev/null 2>&1 || true
|
||||
|
@ -943,11 +997,10 @@ done
|
|||
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
%files -f systemtap.lang
|
||||
%files
|
||||
# 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
|
||||
|
@ -1001,10 +1054,6 @@ done
|
|||
%dir %{_libexecdir}/systemtap
|
||||
%{_libexecdir}/systemtap/libHelperSDT_*.so
|
||||
%endif
|
||||
%if %{with_bundled_elfutils}
|
||||
%dir %{_libdir}/systemtap
|
||||
%{_libdir}/systemtap/lib*.so*
|
||||
%endif
|
||||
%if %{with_emacsvim}
|
||||
%{_emacs_sitelispdir}/*.el*
|
||||
%{_emacs_sitestartdir}/systemtap-init.el
|
||||
|
@ -1020,7 +1069,6 @@ done
|
|||
|
||||
|
||||
%files runtime -f systemtap.lang
|
||||
%defattr(-,root,root)
|
||||
%attr(4110,root,stapusr) %{_bindir}/staprun
|
||||
%{_bindir}/stapsh
|
||||
%{_bindir}/stap-merge
|
||||
|
@ -1056,13 +1104,12 @@ done
|
|||
|
||||
|
||||
%files client -f systemtap.lang
|
||||
%defattr(-,root,root)
|
||||
%doc README README.unprivileged AUTHORS NEWS
|
||||
%{_datadir}/systemtap/examples
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%license COPYING
|
||||
%if %{with_docs}
|
||||
%doc docs.installed/*.pdf
|
||||
%if %{with_docs}
|
||||
%if %{with_htmldocs}
|
||||
%doc docs.installed/tapsets/*.html
|
||||
%doc docs.installed/SystemTap_Beginners_Guide
|
||||
|
@ -1086,15 +1133,20 @@ done
|
|||
|
||||
|
||||
%files initscript
|
||||
%defattr(-,root,root)
|
||||
%if %{with_systemd}
|
||||
%{_unitdir}/systemtap.service
|
||||
%{_sbindir}/systemtap-service
|
||||
%else
|
||||
%{initdir}/systemtap
|
||||
%{_sbindir}/systemtap-service
|
||||
%endif
|
||||
%dir %{_sysconfdir}/systemtap
|
||||
%dir %{_sysconfdir}/systemtap/conf.d
|
||||
%dir %{_sysconfdir}/systemtap/script.d
|
||||
%config(noreplace) %{_sysconfdir}/systemtap/config
|
||||
%dir %{_localstatedir}/cache/systemtap
|
||||
%ghost %{_localstatedir}/run/systemtap
|
||||
%{_mandir}/man8/systemtap.8*
|
||||
%{_mandir}/man8/systemtap-service.8*
|
||||
%if %{with_dracut}
|
||||
%dir %{dracutstap}
|
||||
%{dracutstap}/*
|
||||
|
@ -1102,18 +1154,17 @@ done
|
|||
|
||||
|
||||
%files sdt-devel
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/dtrace
|
||||
%{_includedir}/sys/sdt.h
|
||||
%{_includedir}/sys/sdt-config.h
|
||||
%{_mandir}/man1/dtrace.1*
|
||||
%{_rpmmacrodir}/macros.systemtap
|
||||
%doc README AUTHORS NEWS
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%license COPYING
|
||||
|
||||
|
||||
%files testsuite
|
||||
%defattr(-,root,root)
|
||||
%dir %{_datadir}/systemtap
|
||||
%{_datadir}/systemtap/testsuite
|
||||
|
||||
|
@ -1157,6 +1208,15 @@ done
|
|||
%endif
|
||||
%endif
|
||||
|
||||
%if %{with_python3}
|
||||
%files exporter
|
||||
%{_sysconfdir}/stap-exporter
|
||||
%{_sysconfdir}/sysconfig/stap-exporter
|
||||
%{_unitdir}/stap-exporter.service
|
||||
%{_mandir}/man8/stap-exporter.8*
|
||||
%{_sbindir}/stap-exporter
|
||||
%endif
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Future new-release entries should be of the form
|
||||
|
@ -1166,11 +1226,35 @@ done
|
|||
|
||||
# PRERELEASE
|
||||
%changelog
|
||||
* Thu Feb 22 2018 Sergey Avseyev <sergey.avseyev@gmail.com> - 3.2-3
|
||||
- rhbz1546563 (backport fix for removed timers in kernel 4.15)
|
||||
* Tue Apr 21 2020 Björn Esser <besser82@fedoraproject.org> - 4.3-0.20200212git91ffb97ad335
|
||||
- Rebuild (json-c)
|
||||
|
||||
* Fri Oct 20 2017 Frank Ch. Eigler <fche@redhat.com> - 3.2-2
|
||||
- rhbz1504009 (dtrace -G -o /dev/null)
|
||||
* Tue Feb 11 2020 Frank Ch. Eigler <fche@redhat.com> - 4.3-0.20200211git91ffb97ad335
|
||||
- Automated weekly rawhide release
|
||||
- Applied spec changes from upstream git
|
||||
|
||||
* Mon Feb 03 2020 Frank Ch. Eigler <fche@redhat.com> - 4.3-0.20200203git6c0b74f5910a
|
||||
- Automated weekly rawhide release
|
||||
- Applied spec changes from upstream git
|
||||
|
||||
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.3-0.20200113gitb1e6a6645bba
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Sun Jan 12 2020 Frank Ch. Eigler <fche@redhat.com> - 4.3-0.20200112gitb1e6a6645bba
|
||||
- Automated weekly rawhide release
|
||||
- Applied spec changes from upstream git
|
||||
|
||||
* Mon Nov 18 2019 Sagar Patel <sapatel@redhat.com> - 4.2-1
|
||||
- Upstream release.
|
||||
|
||||
* Tue May 07 2019 Serguei Makarov <smakarov@redhat.com> - 4.1-1
|
||||
- Upstream release.
|
||||
|
||||
* Sat Oct 13 2018 Frank Ch. Eigler <fche@redhat.com> - 4.0-1
|
||||
- Upstream release.
|
||||
|
||||
* Thu Jun 07 2018 Frank Ch. Eigler <fche@redhat.com> - 3.3-1
|
||||
- Upstream release.
|
||||
|
||||
* Wed Oct 18 2017 Frank Ch. Eigler <fche@redhat.com> - 3.2-1
|
||||
- Upstream release.
|
||||
|
@ -1194,7 +1278,7 @@ done
|
|||
- Upstream release.
|
||||
|
||||
* Mon Jul 07 2014 Josh Stone <jistone@redhat.com>
|
||||
- Flip with_dyninst to an %ifarch whitelist.
|
||||
- Flip with_dyninst to an %%ifarch whitelist.
|
||||
|
||||
* Wed Apr 30 2014 Jonathan Lebon <jlebon@redhat.com> - 2.5-1
|
||||
- Upstream release.
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
TOPLEVEL_NAMESPACE=fedora
|
||||
PACKAGE_NAME=systemtap
|
||||
RELATIVE_PATH=Sanity/dejagnu-smoketest
|
||||
export TESTVERSION=1.0
|
||||
export TEST=/$(TOPLEVEL_NAMESPACE)/$(PACKAGE_NAME)/$(RELATIVE_PATH)
|
||||
|
||||
.PHONY: all install download clean
|
||||
BUILT_FILES=
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
chmod a+x ./runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ *.rpm $(BUILT_FILES)
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
# Generate the testinfo.desc here:
|
||||
$(METADATA): Makefile
|
||||
@touch $(METADATA)
|
||||
# Change to the test owner's name
|
||||
@echo "Owner: Frank Ch. Eigler <fche@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Type: Sanity" >> $(METADATA)
|
||||
@echo "Description: smoke test" >> $(METADATA)
|
||||
@echo "TestTime: 10m" >> $(METADATA)
|
||||
@echo "RunFor: $(PACKAGE_NAME)" >> $(METADATA)
|
||||
@echo "Requires: $(PACKAGE_NAME)" >> $(METADATA)
|
||||
@echo "License: GPLv2" >> $(METADATA)
|
||||
|
||||
# You may need other fields here; see the documentation
|
||||
rhts-lint $(METADATA)
|
|
@ -0,0 +1,3 @@
|
|||
Test Name: dejagnu-smoketest
|
||||
Author:
|
||||
Short Description: Run a minimal systemtap testsuite
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
dnf debuginfo-install -y kernel
|
||||
|
||||
# on Fedora CI, can only assume about 1GB RAM to run these tests
|
||||
|
||||
stap -L 'process("stap").mark("*")' | grep pass
|
||||
# stap -L 'kernel.trace("sys_enter")'
|
||||
stap -v --example helloworld.stp
|
||||
stap -v -T 10 -p4 -e 'probe kernel.function("do_exit") {println($$vars)}'
|
||||
# stap -v -T 10 -e 'probe syscall.* ? {println(argstr)}'
|
||||
|
||||
echo
|
||||
echo RESULT: PASS
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-beakerlib
|
||||
tags:
|
||||
- classic
|
||||
tests:
|
||||
- dejagnu-smoketest
|
||||
required_packages:
|
||||
- systemtap-testsuite
|
||||
- kernel-devel
|
Loading…
Reference in New Issue