Compare commits

...

12 Commits

Author SHA1 Message Date
openeuler-ci-bot cadc2b0389 !71 Upgrade to 5.2
From: @wangxiao65 
Reviewed-by: @SuperSix173 
Signed-off-by: @SuperSix173
2024-12-17 07:41:21 +00:00
wangxiao65 4821c98fab Upgrade to 5.2 2024-12-05 12:11:00 +00:00
openeuler-ci-bot f13998008c !66 [sync] PR-61: Make stp_task_work compatible with 6.11 kernels
From: @openeuler-sync-bot 
Reviewed-by: @liqingqing_1229 
Signed-off-by: @liqingqing_1229
2024-11-05 08:03:08 +00:00
wangxiao65 7431e24c5a Make stp task work compatable with 6.11 kernels
(cherry picked from commit 608e39de48)
2024-10-20 21:44:58 +08:00
openeuler-ci-bot 5e421e85fb !54 [sync] PR-53: add loongarch64 support
From: @openeuler-sync-bot 
Reviewed-by: @SuperSix173 
Signed-off-by: @SuperSix173
2024-08-15 07:30:16 +00:00
wangqiang 28733c94fe Add basic LoongArch64 support
(cherry picked from commit db9f088765)
2024-08-15 13:48:45 +08:00
openeuler-ci-bot 60ee7da866 !48 Upgrade to 5.0
From: @SuperSix173 
Reviewed-by: @wangbin224 
Signed-off-by: @wangbin224
2024-01-27 01:50:28 +00:00
SuperSix173 4c7d1732a4 Upgrade to 5.0
Signed-off-by: SuperSix173 <liuchao173@huawei.com>
2024-01-26 18:03:37 +08:00
openeuler-ci-bot 379b83b21b !46 Upgrade to 4.9
From: @langfei295455 
Reviewed-by: @SuperSix173 
Signed-off-by: @SuperSix173
2023-09-11 12:51:08 +00:00
langfei295455 f84d06efbd Upgrade to 4.9
Signed-off-by: langfei <langfei@huawei.com>
2023-09-11 16:42:25 +08:00
openeuler-ci-bot 3beaee92c6 !43 Adapts to gcc-12 and python-3.11
From: @langfei295455 
Reviewed-by: @SuperSix173 
Signed-off-by: @SuperSix173
2023-08-09 06:54:56 +00:00
langfei 89deba2dad Adapts to gcc-12 and python-3.11
Signed-off-by: langfei <langfei@huawei.com>
2023-08-08 14:40:34 +08:00
8 changed files with 2511 additions and 259 deletions
@@ -1,53 +0,0 @@
From: Qiang Wei <qiang.wei@suse.com>
Subject: [PATCH] Add int type cast to resolve gcc issue for option
Wformat=2.
In ncruses 6.3 version, there is type complain for function wprintw
when gcc has option -Wformat=2.
Signed-off-by: Qiang Wei <qiang.wei@suse.com>
--- a/staprun/monitor.c 2022-03-09 06:45:30.534000000 +0000
+++ b/staprun/monitor.c 2022-03-09 06:48:49.804000000 +0000
@@ -448,12 +448,12 @@
if (active_window == 0)
wattron(status, A_BOLD);
wprintw(status, "\n%*s\t%*s\t%*s\t%*s\t%*s\t%*s\t%s\n",
- width[p_index], HIGHLIGHT("index", p_index, comp_fn_index),
- width[p_state], HIGHLIGHT("state", p_state, comp_fn_index),
- width[p_hits], HIGHLIGHT("hits", p_hits, comp_fn_index),
- width[p_min], HIGHLIGHT("min", p_min, comp_fn_index),
- width[p_avg], HIGHLIGHT("avg", p_avg, comp_fn_index),
- width[p_max], HIGHLIGHT("max", p_max, comp_fn_index),
+ (int)width[p_index], HIGHLIGHT("index", p_index, comp_fn_index),
+ (int)width[p_state], HIGHLIGHT("state", p_state, comp_fn_index),
+ (int)width[p_hits], HIGHLIGHT("hits", p_hits, comp_fn_index),
+ (int)width[p_min], HIGHLIGHT("min", p_min, comp_fn_index),
+ (int)width[p_avg], HIGHLIGHT("avg", p_avg, comp_fn_index),
+ (int)width[p_max], HIGHLIGHT("max", p_max, comp_fn_index),
HIGHLIGHT("name", p_name, comp_fn_index));
if (active_window == 0)
wattroff(status, A_BOLD);
@@ -466,17 +466,17 @@
json_object *probe, *field;
probe = json_object_array_get_idx(jso_probe_list, i);
json_object_object_get_ex(probe, "index", &field);
- wprintw(status, "%*s\t", width[p_index], json_object_get_string(field));
+ wprintw(status, "%*s\t", (int)width[p_index], json_object_get_string(field));
json_object_object_get_ex(probe, "state", &field);
- wprintw(status, "%*s\t", width[p_state], json_object_get_string(field));
+ wprintw(status, "%*s\t", (int)width[p_state], json_object_get_string(field));
json_object_object_get_ex(probe, "hits", &field);
- wprintw(status, "%*s\t", width[p_hits], json_object_get_string(field));
+ wprintw(status, "%*s\t", (int)width[p_hits], json_object_get_string(field));
json_object_object_get_ex(probe, "min", &field);
- wprintw(status, "%*s\t", width[p_min], json_object_get_string(field));
+ wprintw(status, "%*s\t", (int)width[p_min], json_object_get_string(field));
json_object_object_get_ex(probe, "avg", &field);
- wprintw(status, "%*s\t", width[p_avg], json_object_get_string(field));
+ wprintw(status, "%*s\t", (int)width[p_avg], json_object_get_string(field));
json_object_object_get_ex(probe, "max", &field);
- wprintw(status, "%*s\t", width[p_max], json_object_get_string(field));
+ wprintw(status, "%*s\t", (int)width[p_max], json_object_get_string(field));
getyx(status, discard, cur_x);
json_object_object_get_ex(probe, "name", &field);
wprintw(status, "%.*s", max_cols-cur_x-1, json_object_get_string(field));
@@ -1,93 +0,0 @@
From d752cdd14eefd0dd0c81bb5b4d7787394335a49e Mon Sep 17 00:00:00 2001
From: William Cohen <wcohen@redhat.com>
Date: Wed, 27 Apr 2022 14:14:17 -0400
Subject: [PATCH] PR29094: Include rpm/rpmcrypto.h when required
rpm-4.18.0 moved the prototypes for rpmFreeCrypto() into a new header,
/usr/include/rpm/rpmcrypto.h. Have the configure check for it
and include it when required.
---
config.in | 3 +++
configure | 19 +++++++++++++++++++
configure.ac | 6 ++++++
rpm_finder.cxx | 3 +++
4 files changed, 31 insertions(+)
diff --git a/config.in b/config.in
index 64740c9..12cd394 100644
--- a/config.in
+++ b/config.in
@@ -88,6 +88,9 @@
/* have librpm */
#undef HAVE_LIBRPM
+/* have rpmcrypto.h */
+#undef HAVE_RPMCRYPTO_H
+
/* have librpmio */
#undef HAVE_LIBRPMIO
diff --git a/configure b/configure
index abc4e7f..3694dbb 100755
--- a/configure
+++ b/configure
@@ -11524,6 +11524,25 @@ $as_echo "$as_me: WARNING: cannot find librpmio" >&2;}
fi
fi
+for ac_header in rpm/rpmcrypto.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "rpm/rpmcrypto.h" "ac_cv_header_rpm_rpmcrypto_h" "$ac_includes_default"
+if test "x$ac_cv_header_rpm_rpmcrypto_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_RPM_RPMCRYPTO_H 1
+_ACEOF
+
+
+$as_echo "#define HAVE_RPMCRYPTO_H 1" >>confdefs.h
+
+ have_rpmcrypto_h=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: separate rpm/rpmcrypto.h" >&5
+$as_echo "$as_me: separate rpm/rpmcrypto.h" >&6;}
+fi
+
+done
+
+
LIBS_no_readline=$LIBS
have_libreadline="no"
diff --git a/configure.ac b/configure.ac
index 4ef80b7..ccb4fe0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -490,6 +490,12 @@ if test "$with_rpm" != "no"; then
fi
fi
+dnl Look for rpmcrypto.h
+AC_CHECK_HEADERS([rpm/rpmcrypto.h], [
+ AC_DEFINE([HAVE_RPMCRYPTO_H],[1],[have rpmcrypto_h])
+ have_rpmcrypto_h=yes
+ AC_MSG_NOTICE([separate rpm/rpmcrypto.h])])
+
dnl Look for readline.
dnl
dnl First save the orignal value of LIBS.
diff --git a/rpm_finder.cxx b/rpm_finder.cxx
index 206669b..052058a 100644
--- a/rpm_finder.cxx
+++ b/rpm_finder.cxx
@@ -26,6 +26,9 @@ extern "C" {
#include <rpm/rpmlib.h>
#include <rpm/rpmts.h>
#include <rpm/rpmdb.h>
+#ifdef HAVE_RPMCRYPTO_H
+#include <rpm/rpmcrypto.h>
+#endif
#include <rpm/header.h>
#ifndef xfree
--
1.8.3.1
File diff suppressed because it is too large Load Diff
@@ -1,59 +0,0 @@
From af456ec9eefd320b496ce54686ca2099c26ca301 Mon Sep 17 00:00:00 2001
From: langfei <langfei@huawei.com>
Date: Wed, 5 Jul 2023 10:32:14 +0800
Subject: [PATCH] fix py3example script run fail
Signed-off-by: langfei <langfei@huawei.com>
---
.../general/tapset/python_local.stpm | 37 ++++++++++++++++++-
1 file changed, 36 insertions(+), 1 deletion(-)
diff --git a/testsuite/systemtap.examples/general/tapset/python_local.stpm b/testsuite/systemtap.examples/general/tapset/python_local.stpm
index 84f9a55..f02ff7a 100644
--- a/testsuite/systemtap.examples/general/tapset/python_local.stpm
+++ b/testsuite/systemtap.examples/general/tapset/python_local.stpm
@@ -7,5 +7,40 @@
# Set this to the location of the python 3 .so
@define PYTHON3_LIBRARY
%(
- "/usr/lib64/libpython3.4m.so.1.0"
+ "/usr/lib64/libpython3.7m.so.1.0"
+%)
+
+@define Py3DictKeysObject(object) %(
+ @cast(@object, "PyDictKeysObject", @PYTHON3_LIBRARY)
+ %)
+@define Py3DictKeyEntry(object) %(
+ @cast(@object, "PyDictKeyEntry", @PYTHON3_LIBRARY)
+ %)
+
+@define DK_SIZE(dk) %(
+ @Py3DictKeysObject(@dk)->dk_size
+%)
+@define DK_IXSIZE(dk) %(
+ %( CONFIG_64BIT == "y" %?
+ %( CONFIG_COMPAT == "y" %?
+ (@__compat_task
+ ? (@DK_SIZE(@dk) <= 0xff ? 1 : (@DK_SIZE(@dk) <= 0xffff ? 2
+: 4))
+ : (@DK_SIZE(@dk) <= 0xff ?
+ 1 : (@DK_SIZE(@dk) <= 0xffff ?
+ 2 : (@DK_SIZE(@dk) <= 0xffffffff ? 4 : 8))))
+ %:
+ (@DK_SIZE(@dk) <= 0xff ?
+ 1 : (@DK_SIZE(@dk) <= 0xffff ?
+ 2 : (@DK_SIZE(@dk) <= 0xffffffff ? 4 : 8)))
+ %)
+ %:
+ (@DK_SIZE(@dk) <= 0xff ? 1 : (@DK_SIZE(@dk) <= 0xffff ? 2 : 4))
+ %)
+%)
+
+@define DK_ENTRIES(dk) %(
+ (@choose_defined(@Py3DictKeysObject(@dk)->dk_entries,
+(&@Py3DictKeyEntry(&@Py3DictKeysObject(@dk)->dk_indices[@DK_SIZE(@dk) *
+@DK_IXSIZE(@dk)]))))
%)
--
2.33.0
@@ -1,44 +0,0 @@
From ee556777a8f7d46ccfe0d53dd1088ab1724c9e42 Mon Sep 17 00:00:00 2001
From: langfei <langfei@huawei.com>
Date: Wed, 5 Jul 2023 10:40:41 +0800
Subject: [PATCH] fix py3example script run fail2
Signed-off-by: langfei <langfei@huawei.com>
---
.../systemtap.examples/general/tapset/python3_local.stp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/testsuite/systemtap.examples/general/tapset/python3_local.stp b/testsuite/systemtap.examples/general/tapset/python3_local.stp
index 4e26946..197be47 100644
--- a/testsuite/systemtap.examples/general/tapset/python3_local.stp
+++ b/testsuite/systemtap.examples/general/tapset/python3_local.stp
@@ -182,7 +182,7 @@ function p3_get_dict_hash (dict, i) {
n = @cast (dict, "PyDictObject", @PYTHON3_LIBRARY)->ma_used;
if (i > n || entries == 0)
return 0
- return @cast (entries, "PyDictKeysObject", @PYTHON3_LIBRARY)->dk_entries[i]->me_hash
+ return @cast (@DK_ENTRIES(entries), "PyDictKeyEntry", @PYTHON3_LIBRARY)[i]->me_hash
}
# FUNCTION P3_GET_DICT_KEY
@@ -195,7 +195,7 @@ function p3_get_dict_key (dict, i) {
n = @cast (dict, "PyDictObject", @PYTHON3_LIBRARY)->ma_used;
if (i > n || entries == 0)
return 0
- return @cast (entries, "PyDictKeysObject", @PYTHON3_LIBRARY)->dk_entries[i]->me_key
+ return @cast (@DK_ENTRIES(entries), "PyDictKeyEntry", @PYTHON3_LIBRARY)[i]->me_key
}
# FUNCTION P3_GET_DICT_VALUE
@@ -214,7 +214,7 @@ function p3_get_dict_value (dict, i) {
n = @cast (dict, "PyDictObject", @PYTHON3_LIBRARY)->ma_used;
if (i > n || entries == 0)
return 0
- return @cast (entries, "PyDictKeysObject", @PYTHON3_LIBRARY)->dk_entries[i]->me_value
+ return @cast (@DK_ENTRIES(entries), "PyDictKeyEntry", @PYTHON3_LIBRARY)[i]->me_value
}
}
--
2.33.0
Binary file not shown.
Binary file not shown.
+69 -10
View File
@@ -21,27 +21,23 @@
%undefine __brp_mangle_shebangs
Name: systemtap
Version: 4.5
Release: 6
Version: 5.2
Release: 1
Summary: Linux trace and probe tool
License: GPLv2+ and Public Domain
URL: http://sourceware.org/systemtap
Source: https://sourceware.org/systemtap/ftp/releases/%{name}-%{version}.tar.gz
Patch1: 0001-Add-init-type-cast-to-resolve-gcc-issue.patch
Patch2: 0001-PR29094-Include-rpm-rpmcrypto.h-when-required.patch
Patch9000: huawei-fix-py3example-script-run-fail.patch
Patch9001: huawei-fix-py3example-script-run-fail2.patch
Patch9002: huawei-fix-network-tcp-test-error.patch
Patch9003: huawei-local-is-only-valid-in-functions-for-shellche-sc2168.patch
Patch9000: huawei-fix-network-tcp-test-error.patch
Patch9001: huawei-local-is-only-valid-in-functions-for-shellche-sc2168.patch
Patch9002: Add-basic-LoongArch64-support.patch
BuildRequires: gcc-c++ emacs systemd python3-setuptools
BuildRequires: gettext-devel rpm-devel readline-devel
BuildRequires: pkgconfig(nss) pkgconfig(avahi-client)
BuildRequires: pkgconfig(ncurses) pkgconfig(json-c)
BuildRequires: jpackage-utils python3-devel
BuildRequires: elfutils-devel >= 0.142
BuildRequires: elfutils-devel >= 0.142 elfutils-debuginfod-client elfutils-debuginfod-client-devel
BuildRequires: sqlite-devel > 3.7
%if %{with_dyninst}
BuildRequires: dyninst-devel >= 8.0
@@ -137,6 +133,7 @@ Requires: dejagnu which elfutils grep nc
Requires: gcc gcc-c++ make glibc-devel
Requires: strace nc avahi perf
Requires: systemtap-runtime-python3 = %{version}-%{release}
Requires: elfutils-debuginfod
%if %{with_crash}
Requires: crash
%endif
@@ -167,6 +164,17 @@ This package includes files for a systemd service that manages
systemtap sessions and relays prometheus metrics from the sessions
to remote requesters on demand.
%package jupyter
Summary: ISystemtap jupyter kernel and examples
License: GPLv2+
URL: http://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.
%package help
Summary: systemtap manual
License: GPLv2+
@@ -268,6 +276,10 @@ install -m 644 stap-exporter/stap-exporter.8* $RPM_BUILD_ROOT%{_mandir}/man8
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 stapunpriv >/dev/null || groupadd -g 159 -r stapunpriv 2>/dev/null || groupadd -r stapunpriv
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
%pre server
@@ -392,6 +404,7 @@ exit 0
%files devel -f systemtap.lang
%{_bindir}/stap
%{_bindir}/stap-prep
%{_bindir}/stap-profile-annotate
%{_bindir}/stap-report
%dir %{_datadir}/systemtap
%{_datadir}/systemtap/runtime
@@ -458,10 +471,56 @@ exit 0
/usr/sbin/stap-exporter
/etc/sysconfig/stap-exporter
%files jupyter
%{_bindir}/stap-jupyter-container
%{_bindir}/stap-jupyter-install
%{_mandir}/man1/stap-jupyter.1*
%dir %{_datadir}/systemtap
%{_datadir}/systemtap/interactive-notebook
%files help
%{_mandir}/man[1378]/*
%changelog
* Thu Dec 05 2024 wangxiao <wangxiao184@h-partners.com> - 5.2-1
- Upgrade to 5.2
* Wed Sep 04 2024 wangxiao <wangxiao184@h-partners.com> - 5.0-3
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:Make stp_task_work compatible with 6.11 kernels
* Fri Jul 05 2024 wangqiang <wangqiang1@kylinos.cn> - 5.0-2
- Type:update
- CVE:NA
- SUG:NA
- DESC:Add basic loongarch64 support
* Wed Jan 24 2024 liuchao <liuchao173@huawei.com> - 5.0-1
- Upgrade to 5.0:
- Performance improvements in uprobe registration and module startup.
- More probe point process details are printed in "-L" list mode with more "-v".
- For the case where newer kernels may break systemtap runtime APIs, better pass-4 failure diagnostics are printed.
- Tapset function print_ubacktrace_fileline() now understands DWARF5.
- The target(s) of process probes may be specified by path name globs, as located selected debuginfod servers.
- The kernel-user message transport system added framing codes, making the transport more reliable, but becoming incompatible across pre-5.0 versions. Use matching versions of stap and staprun.
- The testsuite Makefile has been simplified to remove concurrency, so "parallel" and "resume" modes are gone.
- New runtime macro STP_TIMING_NSECS is now supported for reporting probe timing stats in nsecs instead of cycles. This may become default later.
- Add new runtime macro STP_FORCE_STDOUT_TTY to override STP_STDOUT_NOT_ATTY.
* Wed Sep 6 2023 langfei<langfei@huawei.com> - 4.9-1
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:Upgrade to 4.9
* Tue Aug 8 2023 langfei<langfei@huawei.com> - 4.5-7
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:Adapts to gcc 12 and python 3.11
* Wed Jul 5 2023 langfei<langfei@huawei.com> - 4.5-6
- Type:bugfix
- CVE:NA