diff --git a/.fmf/version b/.fmf/version deleted file mode 100644 index d00491f..0000000 --- a/.fmf/version +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/.gitignore b/.gitignore index 702599e..9cde342 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +*~ /systemtap-3.1.tar.gz /systemtap-3.2-0.20170321git272146660f54.tar.gz /systemtap-3.2-0.20170406git83d186dc7f5c.tar.gz @@ -30,86 +31,3 @@ /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 -/systemtap-4.3-0.20200529git6d50a5cadb64.tar.gz -/systemtap-4.3.tar.gz -/systemtap-4.4-0.20200714git8212024da2ae.tar.gz -/systemtap-4.4-0.20200714gite5a63d9c000a.tar.gz -/systemtap-4.4-0.20200715gitce0fa621eb35.tar.gz -/systemtap-4.4-0.20200731git87344e948606.tar.gz -/systemtap-4.4-0.20200805git82b8e1a07.tar.gz -/systemtap-4.4-0.20200922git05179173e71c.tar.gz -/systemtap-4.4.tar.gz -/systemtap-4.4-0.20201203gitf02f08bc6eff.tar.gz -/systemtap-4.5-0.20201203git963c215e781e.tar.gz -/systemtap-4.5-0.20201204git0d80048e02ec.tar.gz -/systemtap-4.5-0.20201210gitd86b64029598.tar.gz -/systemtap-4.5-0.20210105git6cb54128e005.tar.gz -/systemtap-4.5-0.20210107gita4d01e48d435.tar.gz -/systemtap-4.5-0.20210128gita790dc64a9d8.tar.gz -/systemtap-4.5-0.20210129gitea81249b90b9.tar.gz -/systemtap-4.5-0.202101291559git9e1a0f5703ad.tar.gz -/systemtap-4.5-0.202102101544git8d5e0abc542c.tar.gz -/systemtap-4.5-0.202102191905git0f623095ee3e.tar.gz -/systemtap-4.5-0.202102231232git663a93e8b82b.tar.gz -/systemtap-4.5-0.202104140931gitad00fb87e.tar.gz -/systemtap-4.5-0.202104140933gitad00fb87e.tar.gz -/systemtap-4.5-0.202105041345git02b6be05fb76.tar.gz -/systemtap-4.5.tar.gz -/systemtap-4.6-16261989g7c2751e3.tar.gz -/systemtap-4.6~pre16262008gbff2b2ff.tar.gz -/systemtap-4.6~pre16262012gc7f1c12e.tar.gz -/systemtap-4.6~pre16262021g84ef6bd9.tar.gz -/systemtap-4.6~pre16291338gf2c14776.tar.gz -/systemtap-4.6.tar.gz -/systemtap-4.7~pre16378386g61a4c8f8.tar.gz -/systemtap-4.7~pre16383943gecab2afe.tar.gz -/systemtap-4.7~pre16388948g209b5a19.tar.gz -/systemtap-4.7~pre16395042gefae8a3d.tar.gz -/systemtap-4.7~pre16432070g1d2cb8b3.tar.gz -/systemtap-4.7~pre16433134g7d871ab5.tar.gz -/systemtap-4.7~pre16468670g9f253544.tar.gz -/systemtap-4.7.tar.gz -/systemtap-4.8~pre16557277g2882dcc9.tar.gz -/systemtap-4.8~pre16578235g069e109c.tar.gz -/systemtap-4.8~pre16594727g09f1b7bb.tar.gz -/systemtap-4.8~pre16594741g5bdc37b9.tar.gz -/systemtap-4.8~pre16650659g6a096a7d.tar.gz -/systemtap-4.8.tar.gz -/systemtap-4.9.tar.gz -/systemtap-5.0~pre16885197g6b17715f.tar.gz -/systemtap-5.0~pre16885234gd98d6c2d.tar.gz -/systemtap-5.0~pre16890184ge891a37e.tar.gz -/systemtap-5.0~pre16891249ge891a37e.tar.gz -/systemtap-5.0~pre16958465gca71442b.tar.gz -/systemtap-5.0.tar.gz -/systemtap-5.1~pre17056120g2ccc0c4c.tar.gz -/systemtap-5.1~pre17056139g6c0b92b3.tar.gz -/systemtap-5.1~pre17059382g67086c54.tar.gz -/systemtap-5.1~pre17060399gb6abf4bd.tar.gz -/systemtap-5.1~pre17062114g2604d135.tar.gz -/systemtap-5.1~pre17062192g5fd8daba.tar.gz -/systemtap-5.1.tar.gz -/systemtap-5.1~pre17206206ge48abca5.tar.gz -/systemtap-5.2~pre17206355g1a07290a.tar.gz -/systemtap-5.2~pre17224323g98d1ea34.tar.gz -/systemtap-5.2~pre17250223gd07e4284.tar.gz -/systemtap-5.2~pre17277956g0b7f6722.tar.gz -/systemtap-5.2~pre17283218gc5774e18.tar.gz -/systemtap-5.2.tar.gz -/systemtap-5.2~pre17373420g1e894ff0.tar.gz -/systemtap-5.3~pre17373422g9a48fbea.tar.gz -/systemtap-5.3~pre17373794g3efe129d.tar.gz -/systemtap-5.3~pre17373816g7a71d34b.tar.gz -/systemtap-5.3.tar.gz -/systemtap-5.4~pre17585473g1fe4178d.tar.gz -/systemtap-5.4~pre17585496g86ab88eb.tar.gz -/systemtap-5.4.tar.gz diff --git a/PR23879-PR24875.patch b/PR23879-PR24875.patch new file mode 100644 index 0000000..c024b7c --- /dev/null +++ b/PR23879-PR24875.patch @@ -0,0 +1,42 @@ +From 4ae4592f1106e941023a5768d34c2381cc869631 Mon Sep 17 00:00:00 2001 +From: "Frank Ch. Eigler" +Date: Wed, 21 Aug 2019 19:29:45 -0400 +Subject: [PATCH] PR23879, PR24875: fix task-finder-vma on f29+ + +It was reported & rediscovered that some vma-dependent runtime +facilities have been broken: @vma() and *ubacktrace(). It turns out +that modern gcc/ld.so links/loads binaries in slightly different ways +than older toolchains. Specifically, the first page of ELF files is +now loaded only r--p instead of r-xp protection flags. The +_stp_vma_mmap_cb() routine now accepts the r--p case too. It now +ignores the flags entirely. +--- + runtime/vma.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/runtime/vma.c b/runtime/vma.c +index 7021725d6..02f9bf849 100644 +--- a/runtime/vma.c ++++ b/runtime/vma.c +@@ -157,10 +157,15 @@ static int _stp_vma_mmap_cb(struct stap_task_finder_target *tgt, + dbug_task_vma(1, + "mmap_cb: tsk %d:%d path %s, addr 0x%08lx, length 0x%08lx, offset 0x%lx, flags 0x%lx\n", + tsk->pid, tsk->tgid, path, addr, length, offset, vm_flags); +- // We are only interested in the first load of the whole module that +- // is executable. We register whether or not we know the module, ++ ++ // We used to be only interested in the first load of the whole module that ++ // is executable. But with modern enough gcc/ld.so, executables are mapped ++ // in more small pieces (r--p,r-xp,rw-p, instead of r-xp, rw-p). To establish ++ // the virtual base address, we initially look for an offset=0 mapping. ++ // ++ // We register whether or not we know the module, + // so we can later lookup the name given an address for this task. +- if (path != NULL && offset == 0 && (vm_flags & VM_EXEC) ++ if (path != NULL && offset == 0 + && stap_find_vma_map_info(tsk, addr, NULL, NULL, NULL, NULL) != 0) { + for (i = 0; i < _stp_num_modules; i++) { + // PR20433: papering over possibility of NULL pointers +-- +2.21.0 + diff --git a/PR24904-changes-wit.patch b/PR24904-changes-wit.patch new file mode 100644 index 0000000..e2dc237 --- /dev/null +++ b/PR24904-changes-wit.patch @@ -0,0 +1,26 @@ +From f4f0da6db3be523472b25a219ea245fd6d3489f9 Mon Sep 17 00:00:00 2001 +From: "Frank Ch. Eigler" +Date: Tue, 20 Aug 2019 22:17:02 -0400 +Subject: [PATCH] PR24904: support linux 5.2's stacktrace.c changes with + -DDEBUG_UNWIND too + +--- + runtime/stack.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/runtime/stack.c b/runtime/stack.c +index bf59b2909..6ec7b2602 100644 +--- a/runtime/stack.c ++++ b/runtime/stack.c +@@ -56,7 +56,7 @@ _stp_init_stack(void) + { + stack_trace_save_regs_fn = (void*) kallsyms_lookup_name("stack_trace_save_regs"); + dbug_unwind(1, "stack_trace_saves_regs_fn=%lx for _stp_stack_print_fallback().\n", +- (unsigned long) save_trace_save_regs_fn); ++ (unsigned long) stack_trace_save_regs_fn); + return 0; + } + +-- +2.21.0 + diff --git a/PR24904-changes.patch b/PR24904-changes.patch new file mode 100644 index 0000000..5a9005d --- /dev/null +++ b/PR24904-changes.patch @@ -0,0 +1,130 @@ +From 49fa913a61e7f2941bb59c11d72a1aafa6930162 Mon Sep 17 00:00:00 2001 +From: "Frank Ch. Eigler" +Date: Tue, 20 Aug 2019 21:20:40 -0400 +Subject: [PATCH] PR24904: support linux 5.2's stacktrace.c changes + +The following kernel commit disabled the older struct stack_trace APIs +on architectures that support the newer stackwalk APIs. Provide an +adaptation layer to stack_trace_save_regs(). + +commit 214d8ca6ee854f696f75e75511fe66b409e656db +Author: Thomas Gleixner +Date: Thu Apr 25 11:45:21 2019 +0200 + + stacktrace: Provide common infrastructure +--- + buildrun.cxx | 2 + + .../linux/autoconf-stack-trace-save-regs.c | 8 ++++ + runtime/stack.c | 37 +++++++++++++++++-- + 3 files changed, 44 insertions(+), 3 deletions(-) + create mode 100644 runtime/linux/autoconf-stack-trace-save-regs.c + +diff --git a/buildrun.cxx b/buildrun.cxx +index 5e8d3b961..6ed744707 100644 +--- a/buildrun.cxx ++++ b/buildrun.cxx +@@ -485,6 +485,8 @@ compile_pass (systemtap_session& s) + output_autoconf(s, o, "autoconf-bio-bi_opf.c", "STAPCONF_BIO_BI_OPF", NULL); + output_autoconf(s, o, "autoconf-linux-sched_headers.c", + "STAPCONF_LINUX_SCHED_HEADERS", NULL); ++ output_autoconf(s, o, "autoconf-stack-trace-save-regs.c", ++ "STAPCONF_STACK_TRACE_SAVE_REGS", NULL); + + // used by runtime/linux/netfilter.c + output_exportconf(s, o, "nf_register_hook", "STAPCONF_NF_REGISTER_HOOK"); +diff --git a/runtime/linux/autoconf-stack-trace-save-regs.c b/runtime/linux/autoconf-stack-trace-save-regs.c +new file mode 100644 +index 000000000..8bf33391f +--- /dev/null ++++ b/runtime/linux/autoconf-stack-trace-save-regs.c +@@ -0,0 +1,8 @@ ++#include ++ ++unsigned int foo () ++{ ++ unsigned long e[10]; ++ struct pt_regs* r = 0; ++ return stack_trace_save_regs (r, & e[0], 10, 0); ++} +diff --git a/runtime/stack.c b/runtime/stack.c +index 0f649e8da..bf59b2909 100644 +--- a/runtime/stack.c ++++ b/runtime/stack.c +@@ -39,6 +39,7 @@ + #include "linux/uprobes-inc.h" + + #include ++ + #if defined(STAPCONF_KERNEL_STACKTRACE) || defined(STAPCONF_KERNEL_STACKTRACE_NO_BP) + #include + #endif +@@ -47,6 +48,20 @@ + #include + #endif + ++#if defined(STAPCONF_STACK_TRACE_SAVE_REGS) /* linux 5.2+ apprx. */ ++static __typeof__(stack_trace_save_regs) (*stack_trace_save_regs_fn); /* not exported */ ++ ++static int ++_stp_init_stack(void) ++{ ++ stack_trace_save_regs_fn = (void*) kallsyms_lookup_name("stack_trace_save_regs"); ++ dbug_unwind(1, "stack_trace_saves_regs_fn=%lx for _stp_stack_print_fallback().\n", ++ (unsigned long) save_trace_save_regs_fn); ++ return 0; ++} ++ ++#else /* ! STAPCONF_STACK_TRACE_SAVE_REGS */ ++ + static void (*(save_stack_trace_regs_fn))(struct pt_regs *regs, + struct stack_trace *trace); + +@@ -60,6 +75,10 @@ _stp_init_stack(void) + return 0; + } + ++#endif /* STAPCONF_STACK_TRACE_SAVE_REGS */ ++ ++ ++ + static void _stp_stack_print_fallback(unsigned long, struct pt_regs*, int, int, int); + + #ifdef STP_USE_DWARF_UNWINDER +@@ -168,9 +187,19 @@ static void _stp_stack_print_fallback(unsigned long sp, struct pt_regs *regs, + int sym_flags, + int levels, int skip) { + unsigned long entries[MAXBACKTRACE]; +- struct stack_trace trace; +- int i; ++ unsigned i; ++ unsigned num_entries; ++ ++#if defined(STAPCONF_STACK_TRACE_SAVE_REGS) /* linux 5.2+ apprx. */ ++ if (!stack_trace_save_regs_fn) { ++ dbug_unwind(1, "no fallback kernel stacktrace (giving up)\n"); ++ _stp_print_addr(0, sym_flags | _STP_SYM_INEXACT, NULL); ++ return; ++ } + ++ num_entries = (*stack_trace_save_regs_fn)(regs, &entries[0], MAXBACKTRACE, skip); ++#else ++ struct stack_trace trace; + /* If don't have save_stack_trace_regs unwinder, just give up. */ + if (!save_stack_trace_regs_fn) { + dbug_unwind(1, "no fallback kernel stacktrace (giving up)\n"); +@@ -189,9 +218,11 @@ static void _stp_stack_print_fallback(unsigned long sp, struct pt_regs *regs, + dbug_unwind(1, "trace.nr_entries: %d\n", trace.nr_entries); + dbug_unwind(1, "trace.max_entries: %d\n", trace.max_entries); + dbug_unwind(1, "trace.skip %d\n", trace.skip); ++ num_entries = trace.nr_entries; ++#endif + + /* save_stack_trace_reg() adds a ULONG_MAX after last valid entry. Ignore it. */ +- for (i=0; i= 17 || 0%{?rhel} >= 7} # 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} %{mips} %{riscv} +%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} -%{!?elfutils_version: %global elfutils_version 0.179} -%{!?with_boost: %global with_boost 1} -%ifarch x86_64 ppc ppc64 ppc64le aarch64 +%{!?with_bundled_elfutils: %global with_bundled_elfutils 0} +%{!?elfutils_version: %global elfutils_version 0.142} +%{!?pie_supported: %global pie_supported 1} +%{!?with_boost: %global with_boost 0} +%ifarch %{ix86} x86_64 ppc ppc64 %{!?with_dyninst: %global with_dyninst 0%{?fedora} >= 18 || 0%{?rhel} >= 7} %else %{!?with_dyninst: %global with_dyninst 0} @@ -22,12 +22,7 @@ %{!?with_bpf: %global with_bpf 0%{?fedora} >= 22 || 0%{?rhel} >= 8} %{!?with_systemd: %global with_systemd 0%{?fedora} >= 19 || 0%{?rhel} >= 7} %{!?with_emacsvim: %global with_emacsvim 0%{?fedora} >= 19 || 0%{?rhel} >= 7} -%ifarch %{ix86} -%{!?with_java: %global with_java 0} -%else %{!?with_java: %global with_java 0%{?fedora} >= 19 || 0%{?rhel} >= 7} -%endif -%{!?with_debuginfod: %global with_debuginfod 0%{?fedora} >= 25 || 0%{?rhel} >= 7} %{!?with_virthost: %global with_virthost 0%{?fedora} >= 19 || 0%{?rhel} >= 7} %{!?with_virtguest: %global with_virtguest 1} %{!?with_dracut: %global with_dracut 0%{?fedora} >= 19 || 0%{?rhel} >= 6} @@ -43,15 +38,9 @@ %{!?with_python2_probes: %global with_python2_probes (0%{?fedora} <= 28 && 0%{?rhel} <= 7)} %{!?with_python3_probes: %global with_python3_probes (0%{?fedora} >= 23 || 0%{?rhel} > 7)} %{!?with_httpd: %global with_httpd 0} -%{!?with_specific_python: %global with_specific_python 0%{?fedora} >= 31} -%{!?with_sysusers: %global with_sysusers 0%{?fedora} >= 32 || 0%{?rhel} >= 9} -# NB: can't turn this on by default on any distro version whose builder system -# may run kernels different than the distro version itself. -%{!?with_check: %global with_check 0} - # Virt is supported on these arches, even on el7, but it's not in core EL7 -%if 0%{?rhel} && 0%{?rhel} <= 7 +%if 0%{?rhel} <= 7 %ifarch ppc64le aarch64 %global with_virthost 0 %endif @@ -59,8 +48,7 @@ %if 0%{?fedora} >= 18 || 0%{?rhel} >= 6 %define initdir %{_initddir} -%else - # RHEL5 doesn't know _initddir +%else # RHEL5 doesn't know _initddir %define initdir %{_initrddir} %endif @@ -70,6 +58,8 @@ %else %if 0%{?rhel} >= 6 %define udevrulesdir /lib/udev/rules.d + %else # RHEL5 + %define udevrulesdir /etc/udev/rules.d %endif %endif %endif @@ -86,51 +76,17 @@ %define dracutbindir %{_bindir} %endif -%{!?_rpmmacrodir: %define _rpmmacrodir %{_rpmconfigdir}/macros.d} +%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$ -%define _systemtap_runtime_preinstall \ -# See systemd-sysusers(8) sysusers.d(5)\ -\ -g stapusr 156\ -g stapsys 157\ -g stapdev 158\ -g stapunpriv 159\ -u stapunpriv 159 "systemtap unprivileged user" /var/lib/stapunpriv /sbin/nologin\ -m stapunpriv stapunpriv - -%define _systemtap_server_preinstall \ -# See systemd-sysusers(8) sysusers.d(5)\ -\ -g stap-server -\ -u stap-server - "systemtap compiler server" /var/lib/stap-server /sbin/nologin\ -m stap-server stap-server - - -%define _systemtap_testsuite_preinstall \ -# See systemd-sysusers(8) sysusers.d(5)\ -\ -u stapusr - "systemtap testsuite user" / /sbin/nologin\ -u stapsys - "systemtap testsuite user" / /sbin/nologin\ -u stapdev - "systemtap testsuite user" / /sbin/nologin\ -m stapusr stapusr\ -m stapsys stapusr\ -m stapsys stapsys\ -m stapdev stapusr\ -m stapdev stapdev - -%define _systemtap_server_preinstall_tmpfiles \ -# See systemd-tmpfiles(8) tmpfiles.d(5)\ -d /var/lib/stap-server 0750 stap-server stap-server -\ -d /var/lib/stap-server/.systemtap 0700 stap-server stap-server -\ -d /var/log/stap-server 0755 stap-server stap-server -\ -f /var/log/stap-server/log 0644 stap-server stap-server - - Name: systemtap -# PRERELEASE -Version: 5.4 +Version: 4.1 Release: 2%{?release_override}%{?dist} # for version, see also configure.ac @@ -143,15 +99,13 @@ Release: 2%{?release_override}%{?dist} # 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 -# systemtap-sdt-dtrace /usr/bin/dtrace +# systemtap-sdt-devel /usr/include/sys/sdt.h /usr/bin/dtrace # systemtap-testsuite /usr/share/systemtap/testsuite*, req:systemtap, req:sdt-devel # systemtap-runtime-java libHelperSDT.so, HelperSDT.jar, stapbm, req:-runtime # systemtap-runtime-virthost /usr/bin/stapvirt, req:libvirt req:libxml2 # systemtap-runtime-virtguest udev rules, init scripts/systemd service, req:-runtime # systemtap-runtime-python2 HelperSDT python2 module, req:-runtime # systemtap-runtime-python3 HelperSDT python3 module, req:-runtime -# systemtap-jupyter /usr/bin/stap-jupyter-* interactive-notebook req:systemtap # # Typical scenarios: # @@ -165,24 +119,23 @@ Release: 2%{?release_override}%{?dist} # intermediary stap-server for --use-server: systemtap-server (-devel unused) Summary: Programmable system-wide instrumentation system -License: GPL-2.0-or-later -URL: https://sourceware.org/systemtap/ +License: GPLv2+ +URL: http://sourceware.org/systemtap/ Source: ftp://sourceware.org/pub/systemtap/releases/systemtap-%{version}.tar.gz -Patch0: systemtap-gcc16.patch + +Patch10: PR23879-PR24875.patch +Patch11: PR24904-changes.patch +Patch12: PR24904-changes-wit.patch + # Build* -BuildRequires: make BuildRequires: gcc-c++ BuildRequires: cpio BuildRequires: gettext-devel BuildRequires: pkgconfig(nss) BuildRequires: pkgconfig(avahi-client) -%if %{with_debuginfod} -BuildRequires: pkgconfig(libdebuginfod) -BuildRequires: pkgconfig(json-c) -%endif %if %{with_dyninst} -BuildRequires: dyninst-devel >= 10.0 +BuildRequires: dyninst-devel >= 8.0 BuildRequires: pkgconfig(libselinux) %endif %if %{with_sqlite} @@ -196,19 +149,31 @@ BuildRequires: pkgconfig(ncurses) BuildRequires: systemd %endif # Needed for libstd++ < 4.0, without +%if %{with_boost} BuildRequires: boost-devel +%endif %if %{with_crash} BuildRequires: crash-devel zlib-devel %endif %if %{with_rpm} BuildRequires: rpm-devel %endif +%if %{with_bundled_elfutils} +Source1: elfutils-%{elfutils_version}.tar.gz +Patch1: elfutils-portability.patch +BuildRequires: m4 +%global setup_elfutils -a1 +%else BuildRequires: elfutils-devel >= %{elfutils_version} +%endif %if %{with_docs} BuildRequires: /usr/bin/latex /usr/bin/dvips /usr/bin/ps2pdf %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 BuildRequires: tex(fullpage.sty) tex(fancybox.sty) tex(bchr7t.tfm) tex(graphicx.sty) %endif +# For the html.sty mentioned in the .tex files, even though latex2html is +# not run during the build, only during manual scripts/update-docs runs: +BuildRequires: latex2html %if %{with_htmldocs} # On F10, xmlto's pdf support was broken off into a sub-package, # called 'xmlto-tex'. To avoid a specific F10 BuildReq, we'll do a @@ -217,11 +182,10 @@ BuildRequires: xmlto /usr/share/xmlto/format/fo/pdf %endif %endif %if %{with_emacsvim} -# for _emacs_sitelispdir macros etc. -BuildRequires: emacs-common +BuildRequires: emacs %endif %if %{with_java} -BuildRequires: java-devel +BuildRequires: jpackage-utils java-devel %endif %if %{with_virthost} # BuildRequires: libvirt-devel >= 1.0.2 @@ -229,6 +193,9 @@ BuildRequires: pkgconfig(libvirt) BuildRequires: pkgconfig(libxml-2.0) %endif BuildRequires: readline-devel +%if 0%{?rhel} <= 5 +BuildRequires: pkgconfig(ncurses) +%endif %if %{with_python2_probes} BuildRequires: python2-devel %if 0%{?fedora} >= 1 @@ -237,9 +204,6 @@ BuildRequires: python2-setuptools BuildRequires: python-setuptools %endif %endif -%if %{with_python3} -BuildRequires: python3 -%endif %if %{with_python3_probes} BuildRequires: python3-devel BuildRequires: python3-setuptools @@ -249,16 +213,6 @@ BuildRequires: python3-setuptools BuildRequires: libmicrohttpd-devel BuildRequires: libuuid-devel %endif -%if %{with_sysusers} -BuildRequires: systemd-rpm-macros -%endif -%if %{with_check} -BuildRequires: kernel-devel -# and some of the same Requires: as below -BuildRequires: dejagnu gcc make -%endif - - # Install requirements Requires: systemtap-client = %{version}-%{release} @@ -274,8 +228,8 @@ the components needed to locally develop and execute systemtap scripts. %package server Summary: Instrumentation System Server -License: GPL-2.0-or-later -URL: https://sourceware.org/systemtap/ +License: GPLv2+ +URL: http://sourceware.org/systemtap/ Requires: systemtap-devel = %{version}-%{release} Conflicts: systemtap-devel < %{version}-%{release} Conflicts: systemtap-runtime < %{version}-%{release} @@ -304,8 +258,8 @@ compiles systemtap scripts to kernel objects on their demand. %package devel Summary: Programmable system-wide instrumentation system - development headers, tools -License: GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND BSD-2-Clause -URL: https://sourceware.org/systemtap/ +License: GPLv2+ +URL: http://sourceware.org/systemtap/ %if 0%{?rhel} >= 8 || 0%{?fedora} >= 20 Recommends: (kernel-debug-devel if kernel-debug) @@ -315,9 +269,6 @@ Requires: kernel-devel-uname-r %endif Requires: gcc make -# for compiling --runtime=dyninst sripts, need elfutils headers, bz1930973 -Requires: elfutils-devel >= %{elfutils_version} - Conflicts: systemtap-client < %{version}-%{release} Conflicts: systemtap-server < %{version}-%{release} Conflicts: systemtap-runtime < %{version}-%{release} @@ -334,8 +285,8 @@ a copy of the standard tapset library and the runtime library C files. %package runtime Summary: Programmable system-wide instrumentation system - runtime -License: GPL-2.0-or-later -URL: https://sourceware.org/systemtap/ +License: GPLv2+ +URL: http://sourceware.org/systemtap/ Requires(pre): shadow-utils Conflicts: systemtap-devel < %{version}-%{release} Conflicts: systemtap-server < %{version}-%{release} @@ -349,8 +300,8 @@ using a local or remote systemtap-devel installation. %package client Summary: Programmable system-wide instrumentation system - client -License: GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND GFDL-1.2-or-later AND BSD-2-Clause -URL: https://sourceware.org/systemtap/ +License: GPLv2+ +URL: http://sourceware.org/systemtap/ Requires: zip unzip Requires: systemtap-runtime = %{version}-%{release} Requires: coreutils grep sed unzip zip @@ -363,19 +314,17 @@ Requires: mokutil %endif %description client -This package contains/requires only the components needed to -use systemtap scripts by compiling them using a local or a remote -systemtap-server service, then run them using a local or -remote systemtap-runtime. It includes script samples and +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. -It does NOT include all the components for running a systemtap -script in a self-contained fashion; for that, use the -devel -subpackage instead. + %package initscript Summary: Systemtap Initscripts -License: GPL-2.0-or-later -URL: https://sourceware.org/systemtap/ +License: GPLv2+ +URL: http://sourceware.org/systemtap/ Requires: systemtap = %{version}-%{release} %if %{with_systemd} Requires: systemd @@ -393,24 +342,9 @@ boot-time probing if supported. %package sdt-devel -Summary: Static probe support header files -License: GPL-2.0-or-later AND CC0-1.0 -URL: https://sourceware.org/systemtap/ -%if 0%{?rhel} && 0%{?rhel} <= 10 -# for RHEL buildability compatibility, pull in sdt-dtrace at all times -Requires: systemtap-sdt-dtrace = %{version}-%{release} -%endif - -%description sdt-devel -This package includes the header file used for static -instrumentation compiled into userspace programs. - - -%package sdt-dtrace -Summary: Static probe support dtrace tool -License: GPL-2.0-or-later AND CC0-1.0 -URL: https://sourceware.org/systemtap/ -Provides: dtrace = %{version}-%{release} +Summary: Static probe support tools +License: GPLv2+ and Public Domain +URL: http://sourceware.org/systemtap/ %if %{with_pyparsing} %if %{with_python3} Requires: python3-pyparsing @@ -423,29 +357,21 @@ Requires: python2-pyparsing %endif %endif -%description sdt-dtrace -This package includes the dtrace-compatibility preprocessor -to process related .d files into tracing-macro-laden .h headers. +%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 -License: GPL-2.0-or-later AND GPL-2.0-only AND GPL-3.0-or-later AND MIT -URL: https://sourceware.org/systemtap/ +License: GPLv2+ +URL: http://sourceware.org/systemtap/ Requires: systemtap = %{version}-%{release} Requires: systemtap-sdt-devel = %{version}-%{release} Requires: systemtap-server = %{version}-%{release} -Requires: dejagnu which elfutils grep nc wget -%if %{with_debuginfod} -Requires: elfutils-debuginfod -%endif -# work around fedora ci gating kvetching about i686<->x86-64 conflicts -%ifarch x86_64 -Conflicts: systemtap-testsuite = %{version}-%{release}.i686 -%endif -%ifarch i686 -Conflicts: systemtap-testsuite = %{version}-%{release}.x86_64 -%endif +Requires: dejagnu which elfutils grep nc Requires: gcc gcc-c++ make glibc-devel # testsuite/systemtap.base/ptrace.exp needs strace Requires: strace @@ -476,12 +402,7 @@ Requires: systemtap-runtime-python2 = %{version}-%{release} Requires: systemtap-runtime-python3 = %{version}-%{release} %endif %ifarch x86_64 -%if 0%{?rhel} >= 8 || 0%{?fedora} >= 20 -# fweimer, personal correspondence -Recommends: glibc-devel(x86-32) -%else Requires: /usr/lib/libc.so -%endif # ... and /usr/lib/libgcc_s.so.* # ... and /usr/lib/libstdc++.so.* %endif @@ -502,19 +423,11 @@ systemtap on the current system. %if %{with_java} %package runtime-java Summary: Systemtap Java Runtime Support -License: GPL-2.0-or-later -URL: https://sourceware.org/systemtap/ +License: GPLv2+ +URL: http://sourceware.org/systemtap/ Requires: systemtap-runtime = %{version}-%{release} -# work around fedora ci gating kvetching about i686<->x86-64 conflicts -%ifarch x86_64 -Conflicts: systemtap-runtime = %{version}-%{release}.i686 -%endif -%ifarch i686 -Conflicts: systemtap-runtime = %{version}-%{release}.x86_64 -%endif Requires: byteman > 2.0 Requires: iproute -Requires: java-devel %description runtime-java This package includes support files needed to run systemtap scripts @@ -524,8 +437,8 @@ that probe Java processes running on the OpenJDK runtimes using Byteman. %if %{with_python2_probes} %package runtime-python2 Summary: Systemtap Python 2 Runtime Support -License: GPL-2.0-or-later -URL: https://sourceware.org/systemtap/ +License: GPLv2+ +URL: http://sourceware.org/systemtap/ Requires: systemtap-runtime = %{version}-%{release} %description runtime-python2 @@ -536,8 +449,8 @@ that probe python 2 processes. %if %{with_python3_probes} %package runtime-python3 Summary: Systemtap Python 3 Runtime Support -License: GPL-2.0-or-later -URL: https://sourceware.org/systemtap/ +License: GPLv2+ +URL: http://sourceware.org/systemtap/ Requires: systemtap-runtime = %{version}-%{release} %if ! (%{with_python2_probes}) @@ -550,11 +463,11 @@ This package includes support files needed to run systemtap scripts that probe python 3 processes. %endif -%if %{with_python3_probes} +%if %{with_python3} %package exporter Summary: Systemtap-prometheus interoperation mechanism -License: GPL-2.0-or-later -URL: https://sourceware.org/systemtap/ +License: GPLv2+ +URL: http://sourceware.org/systemtap/ Requires: systemtap-runtime = %{version}-%{release} %description exporter @@ -566,10 +479,9 @@ to remote requesters on demand. %if %{with_virthost} %package runtime-virthost Summary: Systemtap Cross-VM Instrumentation - host -License: GPL-2.0-or-later -URL: https://sourceware.org/systemtap/ -# only require libvirt-libs really -#Requires: libvirt >= 1.0.2 +License: GPLv2+ +URL: http://sourceware.org/systemtap/ +Requires: libvirt >= 1.0.2 Requires: libxml2 %description runtime-virthost @@ -581,8 +493,8 @@ connection. %if %{with_virtguest} %package runtime-virtguest Summary: Systemtap Cross-VM Instrumentation - guest -License: GPL-2.0-or-later -URL: https://sourceware.org/systemtap/ +License: GPLv2+ +URL: http://sourceware.org/systemtap/ Requires: systemtap-runtime = %{version}-%{release} %if %{with_systemd} Requires(post): findutils coreutils @@ -599,25 +511,42 @@ This package installs the services necessary on a virtual machine for a systemtap-runtime-virthost machine to execute systemtap scripts. %endif -%package jupyter -Summary: ISystemtap jupyter kernel and examples -License: GPL-2.0-or-later -URL: https://sourceware.org/systemtap/ -Requires: systemtap = %{version}-%{release} - -%description jupyter -This package includes files needed to build and run -the interactive systemtap Jupyter kernel, either locally -or within a container. - # ------------------------------------------------------------------------ %prep -%setup -q -%patch 0 -p1 +%setup -q %{?setup_elfutils} + +%if %{with_bundled_elfutils} +cd elfutils-%{elfutils_version} +%patch1 -p1 +sleep 1 +find . \( -name Makefile.in -o -name aclocal.m4 \) -print | xargs touch +sleep 1 +find . \( -name configure -o -name config.h.in \) -print | xargs touch +cd .. +%endif + +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 %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 @@ -625,13 +554,6 @@ or within a container. %global dyninst_config --without-dyninst %endif -# Enable/disable the dyninst pure-userspace backend -%if %{with_Werror} -%global Werror_config --enable-Werror -%else -%global Werror_config --disable-Werror -%endif - # Enable/disable the sqlite coverage testing support %if %{with_sqlite} %global sqlite_config --enable-sqlite @@ -639,13 +561,6 @@ or within a container. %global sqlite_config --disable-sqlite %endif -%if %{with_debuginfod} -%global debuginfod_config --with-debuginfod -%else -%global debuginfod_config --without-debuginfod -%endif - - # Enable/disable the crash extension %if %{with_crash} %global crash_config --enable-crash @@ -670,6 +585,14 @@ or within a container. %global docs_config --enable-docs=prebuilt %endif +# Enable pie as configure defaults to disabling it +%if %{pie_supported} +%global pie_config --enable-pie +%else +%global pie_config --disable-pie +%endif + + %if %{with_java} %global java_config --with-java=%{_jvmdir}/java %else @@ -719,17 +642,15 @@ or within a container. # We don't ship compileworthy python code, just oddball samples %global py_auto_byte_compile 0 -%configure %{Werror_config} %{dyninst_config} %{sqlite_config} %{crash_config} %{docs_config} %{rpm_config} %{java_config} %{virt_config} %{dracut_config} %{python3_config} %{python2_probes_config} %{python3_probes_config} %{httpd_config} %{bpf_config} %{debuginfod_config} --disable-silent-rules --with-extra-version="rpm %{version}-%{release}" -make %{?_smp_mflags} V=1 +%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} %{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 make DESTDIR=$RPM_BUILD_ROOT install - -%if ! (%{with_python3}) -rm -v $RPM_BUILD_ROOT%{_bindir}/stap-profile-annotate -%endif - %find_lang %{name} for dir in $(ls -1d $RPM_BUILD_ROOT%{_mandir}/{??,??_??}) ; do dir=$(echo $dir | sed -e "s|^$RPM_BUILD_ROOT||") @@ -737,16 +658,6 @@ for dir in $(ls -1d $RPM_BUILD_ROOT%{_mandir}/{??,??_??}) ; do echo "%%lang($lang) $dir/man*/*" >> %{name}.lang done -%if %{with_sysusers} -mkdir -p %{buildroot}%{_sysusersdir} -echo '%_systemtap_runtime_preinstall' > %{buildroot}%{_sysusersdir}/systemtap-runtime.conf -echo '%_systemtap_server_preinstall' > %{buildroot}%{_sysusersdir}/systemtap-server.conf -echo '%_systemtap_testsuite_preinstall' > %{buildroot}%{_sysusersdir}/systemtap-testsuite.conf -mkdir -p %{buildroot}%{_tmpfilesdir} -echo '%_systemtap_server_preinstall_tmpfiles' > %{buildroot}%{_tmpfilesdir}/systemtap-server.conf -%endif - - ln -s %{_datadir}/systemtap/examples # Fix paths in the example scripts. @@ -761,6 +672,9 @@ find testsuite -type f -name '.gitignore' -print0 | xargs -0 rm -f # 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 @@ -793,9 +707,6 @@ install -m 644 initscript/logrotate.stap-server $RPM_BUILD_ROOT%{_sysconfdir}/lo %if %{with_systemd} mkdir -p $RPM_BUILD_ROOT%{_unitdir} touch $RPM_BUILD_ROOT%{_unitdir}/systemtap.service -# RHBZ2070857 -mkdir -p $RPM_BUILD_ROOT%{_presetdir} -echo 'enable systemtap.service' > $RPM_BUILD_ROOT%{_presetdir}/42-systemtap.preset 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 @@ -864,55 +775,19 @@ done touch $RPM_BUILD_ROOT%{dracutstap}/params.conf %endif -%if %{with_specific_python} -# Some files got ambiguous python shebangs, we fix them after everything else is done -%py3_shebang_fix %{buildroot}%{python3_sitearch} %{buildroot}%{_bindir}/* -%endif - -%check -%if %{with_check} -make check RUNTESTFLAGS=environment_sanity.exp -%endif - - %pre runtime -%if %{with_sysusers} -%if (0%{?fedora} && 0%{?fedora} < 42) || (0%{?rhel} && 0%{?rhel} < 11) -echo '%_systemtap_runtime_preinstall' | systemd-sysusers --replace=%{_sysusersdir}/systemtap-runtime.conf - -exit 0 -%endif -%else getent group stapusr >/dev/null || groupadd -f -g 156 -r stapusr getent group stapsys >/dev/null || groupadd -f -g 157 -r stapsys getent group stapdev >/dev/null || groupadd -f -g 158 -r stapdev -getent passwd stapunpriv >/dev/null || \ - useradd -c "Systemtap Unprivileged User" -u 159 -g stapunpriv -d %{_localstatedir}/lib/stapunpriv -r -s /sbin/nologin stapunpriv 2>/dev/null || \ - useradd -c "Systemtap Unprivileged User" -g stapunpriv -d %{_localstatedir}/lib/stapunpriv -r -s /sbin/nologin stapunpriv exit 0 -%endif %pre server -%if %{with_sysusers} -%if (0%{?fedora} && 0%{?fedora} < 42) || (0%{?rhel} && 0%{?rhel} < 11) -echo '%_systemtap_server_preinstall' | systemd-sysusers --replace=%{_sysusersdir}/systemtap-server.conf - -echo '%_systemtap_server_preinstall_tmpfiles' | systemd-tmpfiles --replace=%{_tmpfilesdir}/systemtap-server.conf - -exit 0 -%endif -%else 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 -exit 0 -%endif %pre testsuite -%if %{with_sysusers} -%if (0%{?fedora} && 0%{?fedora} < 42) || (0%{?rhel} && 0%{?rhel} < 11) -echo '%_systemtap_testsuite_preinstall' | systemd-sysusers --replace=%{_sysusersdir}/systemtap-testsuite.conf - -exit 0 -%endif -%else getent passwd stapusr >/dev/null || \ useradd -c "Systemtap 'stapusr' User" -g stapusr -r -s /sbin/nologin stapusr getent passwd stapsys >/dev/null || \ @@ -920,7 +795,6 @@ getent passwd stapsys >/dev/null || \ getent passwd stapdev >/dev/null || \ useradd -c "Systemtap 'stapdev' User" -g stapdev -G stapusr -r -s /sbin/nologin stapdev exit 0 -%endif %post server @@ -940,8 +814,7 @@ if [ ! -f ~stap-server/.systemtap/rc ]; then numcpu=`/usr/bin/getconf _NPROCESSORS_ONLN` if [ -z "$numcpu" -o "$numcpu" -lt 1 ]; then numcpu=1; fi nproc=`expr $numcpu \* 30` - # PR29661 -> 4G - echo "--rlimit-as=4294967296 --rlimit-cpu=60 --rlimit-nproc=$nproc --rlimit-stack=1024000 --rlimit-fsize=51200000" > ~stap-server/.systemtap/rc + 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 @@ -997,8 +870,7 @@ exit 0 %post initscript %if %{with_systemd} - # RHBZ2070857 - use systemd presets instead - # /bin/systemctl enable systemtap.service >/dev/null 2>&1 || : + /bin/systemctl enable systemtap.service >/dev/null 2>&1 || : %else /sbin/chkconfig --add systemtap %endif @@ -1078,7 +950,7 @@ if [ "$1" -ge "1" ]; then fi exit 0 -%if %{with_python3_probes} +%if %{with_python3} %if %{with_systemd} %preun exporter if [ $1 = 0 ] ; then @@ -1108,8 +980,60 @@ exit 0 # ------------------------------------------------------------------------ +%if %{with_java} + +%triggerin runtime-java -- java-1.8.0-openjdk, java-1.7.0-openjdk, java-1.6.0-openjdk +for f in %{_libexecdir}/systemtap/libHelperSDT_*.so; do + %ifarch %{ix86} + arch=i386 + %else + arch=`basename $f | cut -f2 -d_ | cut -f1 -d.` + %endif + for archdir in %{_jvmdir}/*openjdk*/jre/lib/${arch}; do + if [ -d ${archdir} ]; then + ln -sf %{_libexecdir}/systemtap/libHelperSDT_${arch}.so ${archdir}/libHelperSDT_${arch}.so + ln -sf %{_libexecdir}/systemtap/HelperSDT.jar ${archdir}/../ext/HelperSDT.jar + fi + done +done + +%triggerun runtime-java -- java-1.8.0-openjdk, java-1.7.0-openjdk, java-1.6.0-openjdk +for f in %{_libexecdir}/systemtap/libHelperSDT_*.so; do + %ifarch %{ix86} + arch=i386 + %else + arch=`basename $f | cut -f2 -d_ | cut -f1 -d.` + %endif + for archdir in %{_jvmdir}/*openjdk*/jre/lib/${arch}; do + rm -f ${archdir}/libHelperSDT_${arch}.so + rm -f ${archdir}/../ext/HelperSDT.jar + done +done + +%triggerpostun runtime-java -- java-1.8.0-openjdk, java-1.7.0-openjdk, java-1.6.0-openjdk +# Restore links for any JDKs remaining after a package removal: +for f in %{_libexecdir}/systemtap/libHelperSDT_*.so; do + %ifarch %{ix86} + arch=i386 + %else + arch=`basename $f | cut -f2 -d_ | cut -f1 -d.` + %endif + for archdir in %{_jvmdir}/*openjdk*/jre/lib/${arch}; do + if [ -d ${archdir} ]; then + ln -sf %{_libexecdir}/systemtap/libHelperSDT_${arch}.so ${archdir}/libHelperSDT_${arch}.so + ln -sf %{_libexecdir}/systemtap/HelperSDT.jar ${archdir}/../ext/HelperSDT.jar + fi + done +done + +# XXX: analogous support for other types of JRE/JDK?? + +%endif + +# ------------------------------------------------------------------------ + %files -# The main "systemtap" rpm doesn't include any files. +# The master "systemtap" rpm doesn't include any files. %files server -f systemtap.lang %{_bindir}/stap-server @@ -1128,7 +1052,6 @@ exit 0 %if %{with_systemd} %{_unitdir}/stap-server.service %{_tmpfilesdir}/stap-server.conf -%{_tmpfilesdir}/systemtap-server.conf %else %{initdir}/stap-server %dir %{_sysconfdir}/stap-server/conf.d @@ -1144,17 +1067,11 @@ exit 0 %doc README README.unprivileged AUTHORS NEWS %{!?_licensedir:%global license %%doc} %license COPYING -%if %{with_sysusers} -%{_sysusersdir}/systemtap-server.conf -%endif %files devel -f systemtap.lang %{_bindir}/stap %{_bindir}/stap-prep -%if %{with_python3} -%{_bindir}/stap-profile-annotate -%endif %{_bindir}/stap-report %dir %{_datadir}/systemtap %{_datadir}/systemtap/runtime @@ -1170,19 +1087,22 @@ exit 0 %license COPYING %if %{with_java} %dir %{_libexecdir}/systemtap -%{_libexecdir}/systemtap/libHelperSDT.so +%{_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 +%{_datadir}/vim/vimfiles/*/*.vim %endif # Notice that the stap-resolve-module-function.py file is used by # *both* the python2 and python3 subrpms. Both subrpms use that same # python script to help list python probes. %if %{with_python3_probes} || %{with_python2_probes} %{_libexecdir}/systemtap/python/stap-resolve-module-function.py -%dir %{_libexecdir}/systemtap/python %exclude %{_libexecdir}/systemtap/python/stap-resolve-module-function.py? %endif @@ -1220,9 +1140,6 @@ exit 0 %doc README README.security AUTHORS NEWS %{!?_licensedir:%global license %%doc} %license COPYING -%if %{with_sysusers} -%{_sysusersdir}/systemtap-runtime.conf -%endif %files client -f systemtap.lang @@ -1256,7 +1173,6 @@ exit 0 %files initscript %if %{with_systemd} -%{_presetdir}/42-systemtap.preset %{_unitdir}/systemtap.service %{_sbindir}/systemtap-service %else @@ -1277,34 +1193,25 @@ exit 0 %files sdt-devel +%{_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 sdt-dtrace -%{_bindir}/dtrace -%doc README AUTHORS NEWS -%{!?_licensedir:%global license %%doc} -%license COPYING -%{_mandir}/man1/dtrace.1* - - %files testsuite %dir %{_datadir}/systemtap %{_datadir}/systemtap/testsuite -%if %{with_sysusers} -%{_sysusersdir}/systemtap-testsuite.conf -%endif %if %{with_java} %files runtime-java %dir %{_libexecdir}/systemtap -%{_libexecdir}/systemtap/libHelperSDT.so +%{_libexecdir}/systemtap/libHelperSDT_*.so %{_libexecdir}/systemtap/HelperSDT.jar %{_libexecdir}/systemtap/stapbm %endif @@ -1340,7 +1247,7 @@ exit 0 %endif %endif -%if %{with_python3_probes} +%if %{with_python3} %files exporter %{_sysconfdir}/stap-exporter %{_sysconfdir}/sysconfig/stap-exporter @@ -1349,134 +1256,19 @@ exit 0 %{_sbindir}/stap-exporter %endif -%files jupyter -%{_bindir}/stap-jupyter-container -%{_bindir}/stap-jupyter-install -%{_mandir}/man1/stap-jupyter.1* -%dir %{_datadir}/systemtap -%{_datadir}/systemtap/interactive-notebook - # ------------------------------------------------------------------------ # Future new-release entries should be of the form # * DDD MMM DD YYYY YOURNAME - V-R # - Upstream release, see wiki page below for detailed notes. -# https://sourceware.org/systemtap/wiki/SystemTapReleases +# http://sourceware.org/systemtap/wiki/SystemTapReleases # PRERELEASE %changelog -* Tue Jan 13 2026 Jonathan Wakely - 5.4-2 -- Patched to workaround Autoconf 2.72 incompatiblity with GCC 16 - -* Fri Oct 31 2025 Frank Ch. Eigler - 5.4-1 -- Upstream release, see wiki page below for detailed notes. - https://sourceware.org/systemtap/wiki/SystemTapReleases - -* Mon Sep 22 2025 Frank Ch. Eigler - 5.4-17585496g86ab88eb -- Automated weekly rawhide release -- Applied spec changes from upstream git - -* Mon Sep 22 2025 Frank Ch. Eigler - 5.4-17585473g1fe4178d -- Automated weekly rawhide release -- Applied spec changes from upstream git - -* Fri Sep 19 2025 Python Maint - 5.3-5 -- Rebuilt for Python 3.14.0rc3 bytecode - -* Fri Aug 15 2025 Python Maint - 5.3-4 -- Rebuilt for Python 3.14.0rc2 bytecode - -* Fri Jul 25 2025 Fedora Release Engineering - 5.3-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Tue Jun 03 2025 Python Maint - 5.3-2 -- Rebuilt for Python 3.14 - -* Fri May 02 2025 Frank Ch. Eigler - 5.3-1 -- Upstream release, see wiki page below for detailed notes. - https://sourceware.org/systemtap/wiki/SystemTapReleases - -* Thu Feb 06 2025 Frank Ch. Eigler - 5.3~pre17373816g7a71d34b.5 -- Respin against dyninst 13 redux - -* Fri Jan 24 2025 Frank Ch. Eigler - 5.3~pre17373816g7a71d34b.3 -- Respin against dyninst 13, sans dyninst on i686. - -* Mon Jan 20 2025 Frank Ch. Eigler - 5.3-17373816g7a71d34b -- Automated weekly rawhide release -- Applied spec changes from upstream git - -* Mon Jan 20 2025 Frank Ch. Eigler - 5.3-17373794g3efe129d -- Automated weekly rawhide release -- Applied spec changes from upstream git - -* Sun Jan 19 2025 Frank Ch. Eigler - 5.3-17373422g9a48fbea -- Automated weekly rawhide release -- Applied spec changes from upstream git - -* Sun Jan 19 2025 Frank Ch. Eigler - 5.2-17373420g1e894ff0 -- Automated weekly rawhide release -- Applied spec changes from upstream git - -* Sun Jan 19 2025 Fedora Release Engineering - 5.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Fri Nov 08 2024 Frank Ch. Eigler - 5.2-1 -- Upstream release, see wiki page below for detailed notes. - https://sourceware.org/systemtap/wiki/SystemTapReleases - -* Mon Oct 07 2024 William Cohen - 5.2-17283218gc5774e18 -- Automated weekly rawhide release -- Applied spec changes from upstream git - -* Tue Oct 01 2024 William Cohen - 5.2-17277956g0b7f6722 -- Automated weekly rawhide release -- Applied spec changes from upstream git - -* Fri Aug 30 2024 Frank Ch. Eigler - 5.2-17250223gd07e4284 -- Automated weekly rawhide release -- Applied spec changes from upstream git - -* Thu Aug 08 2024 Lumír Balhar - 5.2-pre -- Final split of sdt-dtrace and sdt-devel (rhbz#2296275) - https://fedoraproject.org/wiki/Changes/Separate_dtrace_package - -* Fri Apr 26 2024 Frank Ch. Eigler - 5.1-1 -- Upstream release, see wiki page below for detailed notes. - https://sourceware.org/systemtap/wiki/SystemTapReleases - -* Sat Nov 04 2023 Frank Ch. Eigler - 5.0-1 -- Upstream release, see wiki page below for detailed notes. - https://sourceware.org/systemtap/wiki/SystemTapReleases -- migrated to SPDX license - -* Fri Apr 28 2023 Frank Ch. Eigler - 4.9-1 -- Upstream release, see wiki page below for detailed notes. - https://sourceware.org/systemtap/wiki/SystemTapReleases - -* Thu Nov 03 2022 Serhei Makarov - 4.8-1 -- Upstream release, see wiki page below for detailed notes. - https://sourceware.org/systemtap/wiki/SystemTapReleases - -* Mon May 02 2022 Frank Ch. Eigler - 4.7-1 -- Upstream release, see wiki page below for detailed notes. - https://sourceware.org/systemtap/wiki/SystemTapReleases - -* Mon Nov 15 2021 Serhei Makarov - 4.6-1 -- Upstream release, see wiki page below for detailed notes. - https://sourceware.org/systemtap/wiki/SystemTapReleases - -* Fri May 07 2021 Serhei Makarov - 4.5-1 -- Upstream release. - -* Mon Nov 09 2020 Frank Ch. Eigler - 4.4-1 -- Upstream release. - -* Thu Jun 11 2020 Frank Ch. Eigler - 4.3-1 -- Upstream release. - -* Mon Nov 18 2019 Sagar Patel - 4.2-1 -- Upstream release. +* Tue Aug 27 2019 Aaron Merey - 4.2-0.20190827 +- PR23879,PR24875 - fix task finder vma on f29 +- PR24904 - support linux 5.2 stacktrace.c changes +- PR24904 - support linux 5.2 stacktrace.c changes with -DDEBUG_UNWIND too * Tue May 07 2019 Serguei Makarov - 4.1-1 - Upstream release. @@ -1509,7 +1301,7 @@ exit 0 - Upstream release. * Mon Jul 07 2014 Josh Stone -- Flip with_dyninst to an %%ifarch passlist. +- Flip with_dyninst to an %%ifarch whitelist. * Wed Apr 30 2014 Jonathan Lebon - 2.5-1 - Upstream release. diff --git a/tests/dejagnu-smoketest/Makefile b/tests/dejagnu-smoketest/Makefile new file mode 100644 index 0000000..e212345 --- /dev/null +++ b/tests/dejagnu-smoketest/Makefile @@ -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 " > $(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) diff --git a/tests/dejagnu-smoketest/PURPOSE b/tests/dejagnu-smoketest/PURPOSE new file mode 100644 index 0000000..5a6a058 --- /dev/null +++ b/tests/dejagnu-smoketest/PURPOSE @@ -0,0 +1,3 @@ +Test Name: dejagnu-smoketest +Author: +Short Description: Run a minimal systemtap testsuite diff --git a/tests/dejagnu-smoketest/runtest.sh b/tests/dejagnu-smoketest/runtest.sh new file mode 100755 index 0000000..d988142 --- /dev/null +++ b/tests/dejagnu-smoketest/runtest.sh @@ -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 diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..5d88e66 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,11 @@ +--- +- hosts: localhost + roles: + - role: standard-test-beakerlib + tags: + - classic + tests: + - dejagnu-smoketest + required_packages: + - systemtap-testsuite + - kernel-devel