Compare commits

..

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
7a811da76d
!37 Resolve stap-exporter.service chenge to disable when upgraded systemtap-stap-exporter package
From: @langfei295455 
Reviewed-by: @SuperSix173 
Signed-off-by: @SuperSix173
2022-12-20 08:57:00 +00:00
langfei
072eb3c0b6
Resolve stap-exporter.service chenge to disable when upgraded systemtap-stap-exporter package
Signed-off-by: langfei <langfei@huawei.com>
2022-12-20 08:20:15 +00:00
openeuler-ci-bot
082c2ca9eb
!33 [sync] PR-32: 添加sw架构
From: @openeuler-sync-bot 
Reviewed-by: @liqingqing_1229 
Signed-off-by: @liqingqing_1229
2022-11-03 11:42:23 +00:00
wzx
338fad7166 Add sw64 architecture
Signed-off-by: wzx <wuzx1226@qq.com>
(cherry picked from commit e19effe9cd690384130c15d540246247b4c68fff)
2022-11-03 19:41:14 +08:00
openeuler-ci-bot
21c9b0e27b
!30 Remove requires on gcc and systemtap-devel
From: @zhouwenpei 
Reviewed-by: @liqingqing_1229 
Signed-off-by: @liqingqing_1229
2022-06-20 12:17:24 +00:00
zhouwenpei
16a578054d Remove requires on gcc and systemtap-devel 2022-06-20 10:03:32 +08:00
openeuler-ci-bot
32cd76bd08
!27 【轻量级PR】修正changelog中的错误日期
From: @konglidong 
Reviewed-by: @liqingqing_1229 
Signed-off-by: @liqingqing_1229
2022-06-20 01:06:39 +00:00
konglidong
5c059dba34 modify bad date in changelog 2022-06-16 14:57:52 +08:00
openeuler-ci-bot
e9bcb6cefb
!24 [sync] PR-23: ncurses升级到6.3后,wprintw函数的调用处会报出关于Wformat=的错误
From: @openeuler-sync-bot 
Reviewed-by: @SuperSix173 
Signed-off-by: @SuperSix173
2022-04-08 02:25:27 +00:00
Qwei
774116cc1b 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: Qwei <qiang.wei@suse.com>
(cherry picked from commit 1525a2a51846ae9bfeb861cc4620e09059074f65)
2022-04-08 09:01:34 +08:00
3 changed files with 119 additions and 5 deletions

View File

@ -0,0 +1,53 @@
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));

31
systemtap-4.5-sw.patch Executable file
View File

@ -0,0 +1,31 @@
diff -Naur systemtap-4.5.org/m4/intdiv0.m4 systemtap-4.5.sw/m4/intdiv0.m4
--- systemtap-4.5.org/m4/intdiv0.m4 2022-02-26 07:18:18.530000000 +0000
+++ systemtap-4.5.sw/m4/intdiv0.m4 2022-02-26 07:21:23.240000000 +0000
@@ -69,7 +69,7 @@
# Guess based on the CPU.
changequote(,)dnl
case "$host_cpu" in
- alpha* | i[34567]86 | x86_64 | m68k | s390*)
+ sw_64* | alpha* | i[34567]86 | x86_64 | m68k | s390*)
gt_cv_int_divbyzero_sigfpe="guessing yes";;
*)
gt_cv_int_divbyzero_sigfpe="guessing no";;
diff -Naur systemtap-4.5.org/staplog.c systemtap-4.5.sw/staplog.c
--- systemtap-4.5.org/staplog.c 2022-02-26 07:18:18.510000000 +0000
+++ systemtap-4.5.sw/staplog.c 2022-02-26 07:22:44.880000000 +0000
@@ -22,12 +22,14 @@
/* crash/defs.h defines NR_CPUS based upon architecture macros
X86, X86_64, etc. See crash/configure.c (!). */
-#if !defined(X86) && !defined(X86_64) && !defined(ALPHA) && !defined(PPC) && \
+#if !defined(X86) && !defined(X86_64) && !defined(ALPHA) && !defined(SW_64) && !defined(PPC) && \
!defined(IA64) && !defined(PPC64) && !defined(S390) && !defined(S390X) && \
!defined(ARM) && !defined(ARM64)
#if defined(__alpha__)
#define ALPHA
+#elif defined(__sw_64__)
+#define SW_64
#elif defined(__x86_64__)
#define X86_64
#elif defined(__i386__)

View File

@ -22,12 +22,15 @@
Name: systemtap
Version: 4.5
Release: 1
Release: 5
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: systemtap-4.5-sw.patch
BuildRequires: gcc-c++ emacs systemd python3-setuptools
BuildRequires: gettext-devel rpm-devel readline-devel
BuildRequires: pkgconfig(nss) pkgconfig(avahi-client)
@ -44,7 +47,6 @@ BuildRequires: crash-devel zlib-devel
%endif
Requires: systemtap-client = %{version}-%{release}
Requires: systemtap-devel = %{version}-%{release}
%description
SystemTap is an instrumentation system for systems running Linux.
@ -55,7 +57,7 @@ the components needed to locally develop and execute systemtap scripts.
%package devel
Summary: Programmable system-wide instrumentation system - development headers, tools
License: GPLv2+
Requires: gcc make kernel-devel systemd
Requires: make kernel-devel systemd
%description devel
This package contains the components needed to compile a systemtap
@ -169,7 +171,7 @@ URL: http://sourceware.org/systemtap
This package include systemtap manual
%prep
%setup -q %{?setup_elfutils}
%autosetup -p1
%build
%configure \
@ -180,7 +182,9 @@ This package include systemtap manual
--with-dracutstap=%{dracutstap} \
--with-dracutbindir=%{dracutbindir} \
--with-python3 \
%ifnarch sw_64
--with-python3-probes \
%endif
--enable-pie \
--with-rpm \
--enable-sqlite \
@ -253,7 +257,9 @@ install -p -m 755 initscript/99stap/start-staprun.sh $RPM_BUILD_ROOT%{dracutstap
touch $RPM_BUILD_ROOT%{dracutstap}/params.conf
mkdir -p $RPM_BUILD_ROOT/stap-exporter
%ifnarch sw_64
install -p -m 755 stap-exporter/stap-exporter $RPM_BUILD_ROOT%{_bindir}
%endif
install -m 644 stap-exporter/stap-exporter.service $RPM_BUILD_ROOT%{_unitdir}
install -m 644 stap-exporter/stap-exporter.8* $RPM_BUILD_ROOT%{_mandir}/man8
@ -325,8 +331,11 @@ fi
exit 0
%preun stap-exporter
if [ "$1" -eq "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
%post
/bin/systemctl enable systemtap.service >/dev/null 2>&1 || :
@ -391,7 +400,9 @@ exit 0
%{_emacs_sitelispdir}/*.el*
%{_emacs_sitestartdir}/systemtap-init.el
%{_datadir}/vim/vimfiles/*/*.vim
%ifnarch sw_64
%{_libexecdir}/systemtap/python/stap-resolve-module-function.py
%endif
%files runtime -f systemtap.lang
%defattr(-,root,root)
@ -438,27 +449,46 @@ exit 0
%{_datadir}/systemtap/testsuite
%files runtime-python3
%ifnarch sw_64
%{python3_sitearch}/HelperSDT
%{python3_sitearch}/HelperSDT-*.egg-info
%endif
%files stap-exporter
%{_unitdir}/stap-exporter.service
%ifnarch sw_64
%{_bindir}/stap-exporter
/etc/stap-exporter/*
/usr/sbin/stap-exporter
/etc/sysconfig/stap-exporter
%endif
%files help
%{_mandir}/man[1378]/*
%changelog
* Mon Dec 5 2022 langfei<langfei@huawei.com> - 4.5-5
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:Resolve stap-exporter.service chenge to disable when upgraded systemtap-stap-exporter package
* Thu Oct 27 2022 wuzx<wuzx1226@qq.com> - 4.5-4
- Add sw64 architecture
* Mon Jun 20 2022 zhouwenpei <zhouwenpei1@h-partners.com> - 4.5-3
- Remove requires on gcc and systemtap-devel
* Wed Mar 9 2022 - Qiang Wei <qiang.wei@suse.com> - 4.5-2
- Add int type cast to resolve gcc issue for option Wformat=2
* Thu Dec 2 2021 zhouwenpei <zhouwenpei1@huawei.com> - 4.5-1
- upgrade to 4.5
* Mon Feb 1 2021 xinghe <xinghe1@huawei.com> - 4.4-1
- upgrade to 4.4
* Thu Jul 21 2020 jinzhimin <jinzhimin2@huawei.com> - 4.3-1
* Tue Jul 21 2020 jinzhimin <jinzhimin2@huawei.com> - 4.3-1
- upgrade to 4.3
* Fri Mar 13 2020 yuxiangyang <yuxiangyang4@huawei.com> - 4.1.3