Compare commits

..

No commits in common. "7a811da76df49a9dfadc159100161dedbfa08253" and "9f48cc21a965a231e8bf48eb2b59674582a91c62" have entirely different histories.

3 changed files with 5 additions and 119 deletions

View File

@ -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));

View File

@ -1,31 +0,0 @@
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,15 +22,12 @@
Name: systemtap
Version: 4.5
Release: 5
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: 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)
@ -47,6 +44,7 @@ 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.
@ -57,7 +55,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: make kernel-devel systemd
Requires: gcc make kernel-devel systemd
%description devel
This package contains the components needed to compile a systemtap
@ -171,7 +169,7 @@ URL: http://sourceware.org/systemtap
This package include systemtap manual
%prep
%autosetup -p1
%setup -q %{?setup_elfutils}
%build
%configure \
@ -182,9 +180,7 @@ 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 \
@ -257,9 +253,7 @@ 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
@ -331,11 +325,8 @@ 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 || :
@ -400,9 +391,7 @@ 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)
@ -449,46 +438,27 @@ 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
* Tue Jul 21 2020 jinzhimin <jinzhimin2@huawei.com> - 4.3-1
* Thu 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