From 12122b24ff15301009a2ba266e93002ada51e225 Mon Sep 17 00:00:00 2001 From: Serguei Makarov Date: May 08 2021 00:36:48 +0000 Subject: upstream release 4.5 --- diff --git a/.gitignore b/.gitignore index 71287ae..0844276 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,4 @@ /systemtap-4.4-0.20200715gitce0fa621eb35.tar.gz /systemtap-4.4-0.20200731git87344e948606.tar.gz /systemtap-4.4-0.20200805git82b8e1a07.tar.gz +/systemtap-4.5.tar.gz diff --git a/rhbz1941722.patch b/rhbz1941722.patch deleted file mode 100644 index 073afcf..0000000 --- a/rhbz1941722.patch +++ /dev/null @@ -1,447 +0,0 @@ -commit ea81249b90b92a589d304c051efbc5bbad7ce073 -Author: Frank Ch. Eigler -Date: Thu Jan 28 22:12:48 2021 -0500 - - PR27273: port to linux 5.11 - - Main change is removal/movement of TIF_IA32 in linux commit ff170cd05953 - and nearby. Now using single a central wrapper _stp_is_compat_task() and - _stp_is_compat_task2() functions, instead of sprinkling - test_tsk_thread_flag(...) around the code base. - - Also, suppressing CONFIG_DEBUG_INFO_BTF_MODULES generation for stap - modules, for diagnostic noise reduction. - -diff --git a/buildrun.cxx b/buildrun.cxx -index e36fd930fd14..05248078c44e 100644 ---- a/buildrun.cxx -+++ b/buildrun.cxx -@@ -116,6 +116,9 @@ make_any_make_cmd(systemtap_session& s, const string& dir, const string& target) - // PR13847: suppress debuginfo creation by default - "CONFIG_DEBUG_INFO=", - -+ // linux 5.11 wants btf but no, baby, no -+ "CONFIG_DEBUG_INFO_BTF_MODULES=", -+ - // RHBZ1321628: suppress stack validation; expected to be temporary - "CONFIG_STACK_VALIDATION=", - }; -diff --git a/runtime/compatdefs.h b/runtime/compatdefs.h -index ced68b1c8709..0bca4f67da5a 100644 ---- a/runtime/compatdefs.h -+++ b/runtime/compatdefs.h -@@ -10,47 +10,50 @@ - #ifndef _STP_COMPAT_H_ /* -*- linux-c -*- */ - #define _STP_COMPAT_H_ - --#ifdef CONFIG_COMPAT -- --/* x86_64 has a different flag name from all other arches and s390... */ -+#if defined(CONFIG_COMPAT) - #include --#if defined (__x86_64__) -- #define TIF_32BIT TIF_IA32 --#endif --#if defined(__s390__) || defined(__s390x__) -- #define TIF_32BIT TIF_31BIT --#endif --#if defined (__mips__) && !defined(TIF_32BIT) -- #ifdef CONFIG_MIPS32_O32 -- #define TIF_32BIT TIF_32BIT_REGS -- #elif defined(CONFIG_MIPS32_N32) -- #define TIF_32BIT TIF_32BIT_ADDR -- #endif --#endif - --#if !defined(TIF_32BIT) --#error architecture not supported, no TIF_32BIT flag --#endif - - /* _stp_is_compat_task - returns true if this is a 32-on-64 bit user task. - Note that some kernels/architectures define a function called - is_compat_task(), but that just tests for being inside a 32bit compat - syscall. We want to test whether the current task is a 32 bit compat - task itself.*/ --static inline int _stp_is_compat_task(void) -+static inline int _stp_is_compat_task2(struct task_struct* tsk) - { -- return test_thread_flag(TIF_32BIT); -+/* x86_64 has a different flag name from all other arches and s390... */ -+#if defined (__x86_64__) && defined(TIF_IA32) -+ return test_tsk_thread_flag(tsk, TIF_IA32); -+#elif defined (__x86_64__) /* post TIF_IA32 */ -+ return (tsk->mm && (tsk->mm->context.flags & MM_CONTEXT_UPROBE_IA32)); -+#elif defined(__s390__) || defined(__s390x__) -+ return test_tsk_thread_flag(tsk, TIF_31BIT); -+#elif defined (__mips__) && !defined(TIF_32BIT) -+ #ifdef CONFIG_MIPS32_O32 -+ return test_tsk_thread_flag(tsk, TIF_32BIT_REGS); -+ #elif defined(CONFIG_MIPS32_N32) -+ return test_tsk_thread_flag(tsk, TIF_32BIT_ADDR); -+ #endif -+#else -+#error architecture not supported, no TIF_32BIT flag? -+#endif - } -- - #else - --static inline int _stp_is_compat_task(void) -+static inline int _stp_is_compat_task2(struct task_struct* tsk) - { - return 0; - } - - #endif /* CONFIG_COMPAT */ - -+static inline int _stp_is_compat_task(void) -+{ -+ return _stp_is_compat_task2(current); -+} -+ -+ -+ - /* task_pt_regs is used in some core tapset functions, so try to make - * sure something sensible is defined. task_pt_regs is required for - * the tracehook interface api so is normally defined already. -diff --git a/runtime/linux/regs.c b/runtime/linux/regs.c -index 7d28e68f9c3b..5bcd1031c731 100644 ---- a/runtime/linux/regs.c -+++ b/runtime/linux/regs.c -@@ -346,7 +346,7 @@ static int _stp_probing_app_with_32bit_regs(struct pt_regs *regs) - if (!regs) - return 0; - return (user_mode(regs) && -- test_tsk_thread_flag(current, TIF_32BIT_REGS)); -+ _stp_is_compat_task()); - } - - void _stp_print_regs(struct pt_regs * regs) -diff --git a/runtime/linux/uprobes2/uprobes_x86.h b/runtime/linux/uprobes2/uprobes_x86.h -index f88a87daa763..21ddc25a7419 100644 ---- a/runtime/linux/uprobes2/uprobes_x86.h -+++ b/runtime/linux/uprobes2/uprobes_x86.h -@@ -38,7 +38,7 @@ typedef u8 uprobe_opcode_t; - #ifdef CONFIG_X86_32 - #define SLOT_IP(tsk) 12 - #else --#define SLOT_IP(tsk) (test_tsk_thread_flag(tsk, TIF_IA32) ? 12 : 16) -+#define SLOT_IP(tsk) (_stp_is_compat_task2(tsk) ? 12 : 16) - #endif - - #define BREAKPOINT_SIGNAL SIGTRAP -@@ -111,7 +111,7 @@ static inline unsigned long arch_get_cur_sp(struct pt_regs *regs) - static inline unsigned long arch_predict_sp_at_ret(struct pt_regs *regs, - struct task_struct *tsk) - { -- if (test_tsk_thread_flag(tsk, TIF_IA32)) -+ if (_stp_is_compat_task2(tsk)) - return (unsigned long) (regs->sp + 4 + STRUCT_RETURN_SLOP); - else - return (unsigned long) (regs->sp + 8); -diff --git a/runtime/sym.c b/runtime/sym.c -index 521aebe48eb8..1527a9a3dbdd 100644 ---- a/runtime/sym.c -+++ b/runtime/sym.c -@@ -142,7 +142,7 @@ static struct _stp_module *_stp_umod_lookup(unsigned long addr, - void *user = NULL; - #ifdef CONFIG_COMPAT - /* Handle 32bit signed values in 64bit longs, chop off top bits. */ -- if (test_tsk_thread_flag(task, TIF_32BIT)) -+ if (_stp_is_compat_task2(task)) - addr &= ((compat_ulong_t) ~0); - #endif - if (stap_find_vma_map_info(task->group_leader, addr, -@@ -181,8 +181,8 @@ static const char *_stp_kallsyms_lookup(unsigned long addr, - /* Handle 32bit signed values in 64bit longs, chop off top bits. - _stp_umod_lookup does the same, but we need it here for the - binary search on addr below. */ -- if (test_tsk_thread_flag(task, TIF_32BIT)) -- addr &= ((compat_ulong_t) ~0); -+ if (_stp_is_compat_task2(task)) -+ addr &= ((compat_ulong_t) ~0); - #endif - m = _stp_umod_lookup(addr, task, modname, &vm_start, &vm_end); - if (m) -@@ -376,8 +376,8 @@ unsigned long _stp_linenumber_lookup(unsigned long addr, struct task_struct *tas - unsigned long vm_end = 0; - #ifdef CONFIG_COMPAT - /* Handle 32bit signed values in 64bit longs, chop off top bits. */ -- if (test_tsk_thread_flag(task, TIF_32BIT)) -- addr &= ((compat_ulong_t) ~0); -+ if (_stp_is_compat_task2(task)) -+ addr &= ((compat_ulong_t) ~0); - #endif - m = _stp_umod_lookup(addr, task, &modname, &vm_start, &vm_end); - } -diff --git a/runtime/syscall.h b/runtime/syscall.h -index 8a1566afee4f..6b4b3071a724 100644 ---- a/runtime/syscall.h -+++ b/runtime/syscall.h -@@ -35,19 +35,19 @@ - #define __MUNMAP_SYSCALL_NO_X86_64 11 - #define __MREMAP_SYSCALL_NO_X86_64 25 - # if defined(CONFIG_IA32_EMULATION) --#define MMAP_SYSCALL_NO(tsk) ((test_tsk_thread_flag((tsk), TIF_IA32)) \ -+#define MMAP_SYSCALL_NO(tsk) (_stp_is_compat_task2(tsk) \ - ? __MMAP_SYSCALL_NO_IA32 \ - : __MMAP_SYSCALL_NO_X86_64) --#define MMAP2_SYSCALL_NO(tsk) ((test_tsk_thread_flag((tsk), TIF_IA32)) \ -+#define MMAP2_SYSCALL_NO(tsk) (_stp_is_compat_task2(tsk) \ - ? __MMAP2_SYSCALL_NO_IA32 \ - : __MMAP2_SYSCALL_NO_X86_64) --#define MPROTECT_SYSCALL_NO(tsk) ((test_tsk_thread_flag((tsk), TIF_IA32)) \ -+#define MPROTECT_SYSCALL_NO(tsk) (_stp_is_compat_task2(tsk) \ - ? __MPROTECT_SYSCALL_NO_IA32 \ - : __MPROTECT_SYSCALL_NO_X86_64) --#define MUNMAP_SYSCALL_NO(tsk) ((test_tsk_thread_flag((tsk), TIF_IA32)) \ -+#define MUNMAP_SYSCALL_NO(tsk) (_stp_is_compat_task2(tsk) \ - ? __MUNMAP_SYSCALL_NO_IA32 \ - : __MUNMAP_SYSCALL_NO_X86_64) --#define MREMAP_SYSCALL_NO(tsk) ((test_tsk_thread_flag((tsk), TIF_IA32)) \ -+#define MREMAP_SYSCALL_NO(tsk) (_stp_is_compat_task2(tsk) \ - ? __MREMAP_SYSCALL_NO_IA32 \ - : __MREMAP_SYSCALL_NO_X86_64) - # else -@@ -279,7 +279,7 @@ syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) - // an argument and then returned won't compare correctly anymore. So, - // for now, disable this code. - # if 0 -- if (test_tsk_thread_flag(task, TIF_IA32)) -+ if (_stp_is_compat_task2(task)) - // Sign-extend the value so (int)-EFOO becomes (long)-EFOO - // and will match correctly in comparisons. - regs->ax = (long) (int) regs->ax; -@@ -345,7 +345,7 @@ _stp_syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, - #endif - #elif defined(__x86_64__) - #ifdef CONFIG_IA32_EMULATION -- if (test_tsk_thread_flag(task, TIF_IA32)) { -+ if (_stp_is_compat_task2(task)) { - switch (i) { - #if defined(STAPCONF_X86_UNIREGS) - case 0: -diff --git a/session.cxx b/session.cxx -index 96719e5db79c..5d376380434f 100644 ---- a/session.cxx -+++ b/session.cxx -@@ -494,7 +494,7 @@ systemtap_session::version () - "Copyright (C) 2005-2020 Red Hat, Inc. and others\n" // PRERELEASE - "This is free software; see the source for copying conditions.\n", - version_string().c_str()); -- cout << _F("tested kernel versions: %s ... %s\n", "2.6.32", "5.10.0-rc"); // PRERELEASE -+ cout << _F("tested kernel versions: %s ... %s\n", "2.6.32", "5.11.0-rc"); // PRERELEASE - - cout << _("enabled features:") - #ifdef HAVE_AVAHI - -commit 65bed2e17ecd31ec9e061435a28059fe2b3e3e0c -Author: Frank Ch. Eigler -Date: Fri Jan 29 20:54:42 2021 +0000 - - PR27273: port to linux 5.11, kretprobes - - Linux commit d741bf41d7c changed how kretprobe_instances can - find their kretprobes. Adapt with an autoconf and wrapper - function. - -diff --git a/buildrun.cxx b/buildrun.cxx -index 05248078c44e..e0d69a5f730e 100644 ---- a/buildrun.cxx -+++ b/buildrun.cxx -@@ -378,6 +378,7 @@ compile_pass (systemtap_session& s) - output_autoconf(s, o, cs, "autoconf-utrace-regset.c", "STAPCONF_UTRACE_REGSET", NULL); - output_autoconf(s, o, cs, "autoconf-uprobe-get-pc.c", "STAPCONF_UPROBE_GET_PC", NULL); - output_autoconf(s, o, cs, "autoconf-hlist-4args.c", "STAPCONF_HLIST_4ARGS", NULL); -+ output_autoconf(s, o, cs, "autoconf-get-kretprobe.c", "STAPCONF_GET_KRETPROBE", NULL); - output_exportconf(s, o2, "tsc_khz", "STAPCONF_TSC_KHZ"); - output_exportconf(s, o2, "cpu_khz", "STAPCONF_CPU_KHZ"); - output_exportconf(s, o2, "__module_text_address", "STAPCONF_MODULE_TEXT_ADDRESS"); -diff --git a/runtime/compatdefs.h b/runtime/compatdefs.h -index 0bca4f67da5a..44807518f31d 100644 ---- a/runtime/compatdefs.h -+++ b/runtime/compatdefs.h -@@ -104,4 +104,14 @@ static inline int _stp_task_pt_regs_valid(struct task_struct *task, - return 0; - } - -+ -+#ifndef STAPCONF_GET_KRETPROBE -+/* prior to linux commit d741bf41d7c7db4898 */ -+static inline struct kretprobe* get_kretprobe(struct kretprobe_instance *inst) -+{ -+ return inst->rp; -+} -+#endif -+ -+ - #endif /* _STP_COMPAT_H_ */ -diff --git a/runtime/linux/autoconf-get-kretprobe.c b/runtime/linux/autoconf-get-kretprobe.c -new file mode 100644 -index 000000000000..ae5b4ab517b8 ---- /dev/null -+++ b/runtime/linux/autoconf-get-kretprobe.c -@@ -0,0 +1,6 @@ -+#include -+ -+void* foo(struct kretprobe_instance* ri) -+{ -+ return get_kretprobe(ri); -+} -diff --git a/tapsets.cxx b/tapsets.cxx -index b1a0e83d3d66..db75a4f62044 100644 ---- a/tapsets.cxx -+++ b/tapsets.cxx -@@ -6274,7 +6274,7 @@ generic_kprobe_derived_probe_group::emit_module_decls (systemtap_session& s) - s.op->newline(); - s.op->newline() << "static int enter_kretprobe_common (struct kretprobe_instance *inst,"; - s.op->line() << " struct pt_regs *regs, int entry) {"; -- s.op->newline(1) << "struct kretprobe *krp = inst->rp;"; -+ s.op->newline(1) << "struct kretprobe *krp = get_kretprobe(inst);"; - - // NB: as of PR5673, the kprobe|kretprobe union struct is in BSS - s.op->newline() << "int kprobe_idx = ((uintptr_t)krp-(uintptr_t)stap_kprobes)/sizeof(struct stap_kprobe);"; -@@ -6302,7 +6302,7 @@ generic_kprobe_derived_probe_group::emit_module_decls (systemtap_session& s) - s.op->newline() << "{"; - s.op->newline(1) << "unsigned long kprobes_ip = REG_IP(c->kregs);"; - s.op->newline() << "if (entry)"; -- s.op->newline(1) << "SET_REG_IP(regs, (unsigned long) inst->rp->kp.addr);"; -+ s.op->newline(1) << "SET_REG_IP(regs, (unsigned long) get_kretprobe(inst)->kp.addr);"; - s.op->newline(-1) << "else"; - s.op->newline(1) << "SET_REG_IP(regs, (unsigned long)inst->ret_addr);"; - s.op->newline(-1) << "(sp->ph) (c);"; - -commit 676c0b9096208edac2299f4c6d150fcb3959f678 -Author: Frank Ch. Eigler -Date: Fri Jan 29 20:54:42 2021 +0000 - - PR27273: port to linux 5.11, kretprobes - unwinding - - Missed one. - -diff --git a/runtime/linux/regs.c b/runtime/linux/regs.c -index 5bcd1031c731..26423164b78f 100644 ---- a/runtime/linux/regs.c -+++ b/runtime/linux/regs.c -@@ -36,7 +36,7 @@ - * @param ri Pointer to the struct kretprobe_instance. - * @return The function's address - */ --#define _stp_probe_addr_r(ri) (ri->rp->kp.addr) -+#define _stp_probe_addr_r(ri) (get_kretprobe(ri)->kp.addr) - - #if defined (__x86_64__) - - -commit 932d93c9be45c96ab818301d3cf6c0cf7b8cb157 -Author: William Cohen -Date: Sun Jan 31 22:16:49 2021 -0500 - - Add CONFIG_COMPAT 32-bit support for aarch64 and powerpc - - The aarch64 and powerpc kernels may be built with support for 32-bit - user-space applications. On Fedora 33 the aarch64 kernel is - configured with CONFIG_COMPAT enabled. Needed to provide some support - in _stp_is_compat_task2 for the aarch64. The Fedora 33 ppc64le - kernels by default do not have CONFIG_COMPAT enabled, but included - similar check in there for powerpc in case locally built kernels - enable it. - -diff --git a/runtime/compatdefs.h b/runtime/compatdefs.h -index 44807518f31d..fc099215fcbe 100644 ---- a/runtime/compatdefs.h -+++ b/runtime/compatdefs.h -@@ -34,6 +34,8 @@ static inline int _stp_is_compat_task2(struct task_struct* tsk) - #elif defined(CONFIG_MIPS32_N32) - return test_tsk_thread_flag(tsk, TIF_32BIT_ADDR); - #endif -+#elif defined (__aarch64__) || defined(__powerpc__) -+ return test_tsk_thread_flag(tsk, TIF_32BIT); - #else - #error architecture not supported, no TIF_32BIT flag? - #endif - -commit 799d26992ca6ef880b57e867896b20c1e602c76d -Author: Frank Ch. Eigler -Date: Sat Feb 6 21:09:24 2021 -0500 - - PR27361 part 1: enable typequery result memoization & operation on linux 5.11 - - Linux 5.11 rejects previous kmod_typequery .c files because they don't - have a MODULE_LICENSE bit. Here, stap tries and tries and tries - building kmod_typequery files, up to thousands (!). We solve the - first by adding the MODULE_LICENSE. We solve the second by memoizing - typequery build results (whether they succeed or fail) in the - systemtap_session object. - -diff --git a/buildrun.cxx b/buildrun.cxx -index 42f2908d3db2..9408dcb2c345 100644 ---- a/buildrun.cxx -+++ b/buildrun.cxx -@@ -1116,9 +1116,14 @@ make_typequery_kmod(systemtap_session& s, const vector& headers, string& - omf << "obj-m := " + basename + ".o" << endl; - omf.close(); - -- // create our empty source file -+ // create our -nearly- empty source file - string source(dir + "/" + basename + ".c"); - ofstream osrc(source.c_str()); -+ -+ // this is mandated by linux kbuild as of 5.11+ -+ osrc << "#include " << endl; -+ osrc << "MODULE_LICENSE(\"GPL\");" << endl; -+ - osrc.close(); - - // make the module -@@ -1165,6 +1170,13 @@ make_typequery_umod(systemtap_session& s, const vector& headers, string& - int - make_typequery(systemtap_session& s, string& module) - { -+ // check our memoized cache first -+ if (s.typequery_memo.find(module) != s.typequery_memo.end()) -+ { -+ module = s.typequery_memo.at(module); -+ return 0; -+ } -+ - int rc; - string new_module; - vector headers; -@@ -1192,6 +1204,10 @@ make_typequery(systemtap_session& s, string& module) - else - rc = make_typequery_umod(s, headers, new_module); - -+ // memoize the result --- even if it failed (rc != 0), so as to avoid -+ // repeated attempts to rebuild the same thing -+ s.typequery_memo[module] = new_module; -+ - if (!rc) - module = new_module; - -diff --git a/session.cxx b/session.cxx -index 5d376380434f..8ebac38ce2d7 100644 ---- a/session.cxx -+++ b/session.cxx -@@ -377,6 +377,7 @@ systemtap_session::systemtap_session (const systemtap_session& other, - no_global_var_display = other.no_global_var_display; - pass_1a_complete = other.pass_1a_complete; - timeout = other.timeout; -+ // don't bother copy typequery_memo - - include_path = other.include_path; - runtime_path = other.runtime_path; -diff --git a/session.h b/session.h -index 38f1d66def1a..c2c6fbaad7d2 100644 ---- a/session.h -+++ b/session.h -@@ -239,7 +239,8 @@ struct systemtap_session - bool monitor; - int monitor_interval; - int timeout; // in ms -- -+ std::map typequery_memo; -+ - enum - { dump_none, // no dumping requested - dump_probe_types, // dump standard tapset probes diff --git a/sources b/sources index e30f417..9e90fe5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (systemtap-4.4.tar.gz) = 8fb1fe5071ec99ce3c6bcf82afdc98a3e1abc0ea937f3019b225c3a1879ada30080740b1918a84c6db06fe1893e6d1e7dc84be26c7e597d7feda1efe11354e76 +SHA512 (systemtap-4.5.tar.gz) = 8136779a9f5cb0fbaae565eab1ab6fa307f1024dfc2c6c3845acfadff0eecc684ba89aa5d442c7b90c2c73edaab41ca07bae2bad8361f80fe8e9928b40466cd3 diff --git a/systemtap.spec b/systemtap.spec index 8cddd84..f9c99c5 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -10,7 +10,7 @@ %{!?with_crash: %global with_crash 1} %endif %{!?with_rpm: %global with_rpm 1} -%{!?elfutils_version: %global elfutils_version 0.142} +%{!?elfutils_version: %global elfutils_version 0.179} %{!?pie_supported: %global pie_supported 1} %{!?with_boost: %global with_boost 0} %ifarch %{ix86} x86_64 ppc ppc64 ppc64le aarch64 @@ -22,6 +22,7 @@ %{!?with_systemd: %global with_systemd 0%{?fedora} >= 19 || 0%{?rhel} >= 7} %{!?with_emacsvim: %global with_emacsvim 0%{?fedora} >= 19 || 0%{?rhel} >= 7} %{!?with_java: %global with_java 0%{?fedora} >= 19 || 0%{?rhel} >= 7} +%{!?with_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} @@ -88,8 +89,8 @@ %define __brp_mangle_shebangs_exclude_from .stp$ Name: systemtap -Version: 4.4 -Release: 4%{?release_override}%{?dist} +Version: 4.5 +Release: 1%{?release_override}%{?dist} # for version, see also configure.ac @@ -125,15 +126,16 @@ License: GPLv2+ URL: http://sourceware.org/systemtap/ Source: ftp://sourceware.org/pub/systemtap/releases/systemtap-%{version}.tar.gz -Patch0: rhbz1941722.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) +%endif %if %{with_dyninst} BuildRequires: dyninst-devel >= 10.0 BuildRequires: pkgconfig(libselinux) @@ -164,9 +166,6 @@ 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 @@ -178,7 +177,7 @@ BuildRequires: xmlto /usr/share/xmlto/format/fo/pdf BuildRequires: emacs %endif %if %{with_java} -BuildRequires: jpackage-utils java-devel +BuildRequires: java-devel %endif %if %{with_virthost} # BuildRequires: libvirt-devel >= 1.0.2 @@ -265,6 +264,9 @@ 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} @@ -368,7 +370,16 @@ Requires: systemtap = %{version}-%{release} Requires: systemtap-sdt-devel = %{version}-%{release} Requires: systemtap-server = %{version}-%{release} Requires: dejagnu which elfutils grep nc +%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: gcc gcc-c++ make glibc-devel # testsuite/systemtap.base/ptrace.exp needs strace Requires: strace @@ -399,7 +410,12 @@ 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 @@ -423,6 +439,13 @@ Summary: Systemtap Java Runtime Support 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 @@ -513,7 +536,6 @@ systemtap-runtime-virthost machine to execute systemtap scripts. %prep %setup -q -%patch0 -p1 %build @@ -531,6 +553,13 @@ systemtap-runtime-virthost machine to execute systemtap scripts. %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 @@ -612,7 +641,7 @@ systemtap-runtime-virthost machine to execute systemtap scripts. # We don't ship compileworthy python code, just oddball samples %global py_auto_byte_compile 0 -%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}" +%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} %{debuginfod_config} --disable-silent-rules --with-extra-version="rpm %{version}-%{release}" make %{?_smp_mflags} @@ -952,60 +981,8 @@ 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 master "systemtap" rpm doesn't include any files. +# The main "systemtap" rpm doesn't include any files. %files server -f systemtap.lang %{_bindir}/stap-server @@ -1059,7 +1036,7 @@ done %license COPYING %if %{with_java} %dir %{_libexecdir}/systemtap -%{_libexecdir}/systemtap/libHelperSDT_*.so +%{_libexecdir}/systemtap/libHelperSDT.so %endif %if %{with_emacsvim} %{_emacs_sitelispdir}/*.el* @@ -1179,7 +1156,7 @@ done %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 @@ -1233,7 +1210,9 @@ done # PRERELEASE %changelog -- Mon Mar 22 2021 Frank Ch. Eigler - 4.4-4 +* Fri May 07 2021 Serhei Makarov - 4.5-1 +- Upstream release. +* Mon Mar 22 2021 Frank Ch. Eigler - 4.4-4 - Add kernel 5.11 compatibility backports * Wed Feb 10 2021 Frank Ch. Eigler - 4.4-3 @@ -1282,7 +1261,7 @@ done - Upstream release. * Mon Jul 07 2014 Josh Stone -- Flip with_dyninst to an %%ifarch whitelist. +- Flip with_dyninst to an %%ifarch passlist. * Wed Apr 30 2014 Jonathan Lebon - 2.5-1 - Upstream release.