The package rpms/systemtap.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/systemtap.git/commit/?id=d739a4cf249....
Change: +%ifarch ppc ppc64 %{sparc} %{mips} %{riscv}
Thanks.
Full change: ============
commit d739a4cf24963f4ef4d62164d03af153ac7f712a Author: Serguei Makarov smakarov@redhat.com Date: Mon Nov 15 11:11:59 2021 -0500
upstream release 4.6
diff --git a/.gitignore b/.gitignore index fd712f5..177bc8d 100644 --- a/.gitignore +++ b/.gitignore @@ -69,3 +69,4 @@ /systemtap-4.6~pre16262012gc7f1c12e.tar.gz /systemtap-4.6~pre16262021g84ef6bd9.tar.gz /systemtap-4.6~pre16291338gf2c14776.tar.gz +/systemtap-4.6.tar.gz diff --git a/sources b/sources index bf1bb66..b4b4a67 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (systemtap-4.6~pre16291338gf2c14776.tar.gz) = 43740cf53b5ae57d7fa517c615359870178d4fde74f3e59a93d90ba16b5ba21d116bfb3764823e72bdda486468641f4f1d7726995e6b72510c8a2a14dabf0910 +SHA512 (systemtap-4.6.tar.gz) = 835b45597e9de0ea17857b47d542c87d155cb5c772f8595f41845a25ff06b862cb9c4b635292c3a6c66cb5255a07eee3af7cb7861110a4a05f545a4b35f11402 diff --git a/systemtap.spec b/systemtap.spec index c2299d1..281a594 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -4,7 +4,7 @@ %{!?with_htmldocs: %global with_htmldocs 0} %{!?with_monitor: %global with_monitor 1} # crash is not available -%ifarch ppc ppc64 %{sparc} %{mips} +%ifarch ppc ppc64 %{sparc} %{mips} %{riscv} %{!?with_crash: %global with_crash 0} %else %{!?with_crash: %global with_crash 1} @@ -38,6 +38,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}
# Virt is supported on these arches, even on el7, but it's not in core EL7 %if 0%{?rhel} <= 7 @@ -88,7 +89,7 @@ %define __brp_mangle_shebangs_exclude_from .stp$
Name: systemtap -Version: 4.6~pre16291338gf2c14776 +Version: 4.6 Release: 1%{?release_override}%{?dist} # for version, see also configure.ac
@@ -211,6 +212,10 @@ BuildRequires: /usr/bin/pathfix.py BuildRequires: libmicrohttpd-devel BuildRequires: libuuid-devel %endif +%if %{with_sysusers} +BuildRequires: systemd-rpm-macros +%endif +
# Install requirements Requires: systemtap-client = %{version}-%{release} @@ -650,6 +655,13 @@ for dir in $(ls -1d $RPM_BUILD_ROOT%{_mandir}/{??,??_??}) ; do echo "%%lang($lang) $dir/man*/*" >> %{name}.lang done
+%if %{with_sysusers} +install -p -D -m 0644 systemtap-runtime.sysusers %{buildroot}%{_sysusersdir}/systemtap-runtime.conf +install -p -D -m 0644 systemtap-server.sysusers %{buildroot}%{_sysusersdir}/systemtap-server.conf +install -p -D -m 0644 systemtap-testsuite.sysusers %{buildroot}%{_sysusersdir}/systemtap-testsuite.conf +%endif + + ln -s %{_datadir}/systemtap/examples
# Fix paths in the example scripts. @@ -773,24 +785,37 @@ pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{python3_sitearch %endif
%pre runtime +%if %{with_sysusers} +%sysusers_create_compat $RPM_BUILD_ROOT/systemtap-runtime.sysusers +%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 +%endif exit 0
%pre server +%if %{with_sysusers} +%sysusers_create_compat $RPM_BUILD_ROOT/systemtap-server.sysusers +%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 +%endif +exit 0
%pre testsuite +%if %{with_sysusers} +%sysusers_create_compat $RPM_BUILD_ROOT/systemtap-testsuite.sysusers +%else getent passwd stapusr >/dev/null || \ useradd -c "Systemtap 'stapusr' User" -g stapusr -r -s /sbin/nologin stapusr getent passwd stapsys >/dev/null || \ useradd -c "Systemtap 'stapsys' User" -g stapsys -G stapusr -r -s /sbin/nologin stapsys getent passwd stapdev >/dev/null || \ useradd -c "Systemtap 'stapdev' User" -g stapdev -G stapusr -r -s /sbin/nologin stapdev +%endif exit 0
%post server @@ -1012,6 +1037,9 @@ 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 @@ -1081,6 +1109,9 @@ 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 @@ -1147,6 +1178,9 @@ exit 0 %files testsuite %dir %{_datadir}/systemtap %{_datadir}/systemtap/testsuite +%if %{with_sysusers} +%{_sysusersdir}/systemtap-testsuite.conf +%endif
%if %{with_java} @@ -1206,37 +1240,9 @@ exit 0
# PRERELEASE %changelog -* Mon Aug 16 2021 Frank Ch. Eigler fche@redhat.com - 4.6-16291338gf2c14776 -- Automated weekly rawhide release -- Applied spec changes from upstream git - -* Sat Aug 07 2021 Jonathan Wakely jwakely@redhat.com - 4.6~pre16262021g84ef6bd9-3 -- Rebuilt for Boost 1.76 - -* Fri Jul 23 2021 Fedora Release Engineering releng@fedoraproject.org - 4.6~pre16262021g84ef6bd9-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Tue Jul 13 2021 Frank Ch. Eigler fche@redhat.com - 4.6-16262021g84ef6bd9 -- Automated weekly rawhide release -- Applied spec changes from upstream git - -* Tue Jul 13 2021 Frank Ch. Eigler fche@redhat.com - 4.6-16262012gc7f1c12e -- Automated weekly rawhide release -- Applied spec changes from upstream git - -* Tue Jul 13 2021 Frank Ch. Eigler fche@redhat.com - 4.6-16262008gbff2b2ff -- Automated weekly rawhide release -- Applied spec changes from upstream git - -* Tue Jul 13 2021 Frank Ch. Eigler fche@redhat.com - 4.6-16261989g7c2751e3 -- Automated weekly rawhide release -- Applied spec changes from upstream git - -* Sat Jul 10 2021 Björn Esser besser82@fedoraproject.org - 4.5-3 -- Rebuild for versioned symbols in json-c - -* Fri Jun 04 2021 Python Maint python-maint@redhat.com - 4.5-2 -- Rebuilt for Python 3.10 +* Mon Nov 15 2021 Serhei Makarov me@serhei.io - 4.6-1 +- Upstream release, see wiki page below for detailed notes. + https://sourceware.org/systemtap/wiki/SystemTapReleases
* Fri May 07 2021 Serhei Makarov me@serhei.io - 4.5-1 - Upstream release.
commit 0109644eeb37f58cb467752905ae8eb146e12feb Author: Frank Ch. Eigler fche@redhat.com Date: Mon Aug 16 13:12:18 2021 -0400
Automated weekly systemtap rawhide release: 4.6~pre16291338gf2c14776
diff --git a/.gitignore b/.gitignore index b743dac..fd712f5 100644 --- a/.gitignore +++ b/.gitignore @@ -68,3 +68,4 @@ /systemtap-4.6~pre16262008gbff2b2ff.tar.gz /systemtap-4.6~pre16262012gc7f1c12e.tar.gz /systemtap-4.6~pre16262021g84ef6bd9.tar.gz +/systemtap-4.6~pre16291338gf2c14776.tar.gz diff --git a/sources b/sources index adb3140..bf1bb66 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (systemtap-4.6~pre16262021g84ef6bd9.tar.gz) = b25138a985dbbbce23e36780721ed6c3abb6b78fa8ac5d9f9426830ae85085341022c2338d66638cd86c74cb95bcdda51f8ac8708f5b5b8406021999cd5a94f9 +SHA512 (systemtap-4.6~pre16291338gf2c14776.tar.gz) = 43740cf53b5ae57d7fa517c615359870178d4fde74f3e59a93d90ba16b5ba21d116bfb3764823e72bdda486468641f4f1d7726995e6b72510c8a2a14dabf0910 diff --git a/systemtap.spec b/systemtap.spec index d8045de..c2299d1 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -11,7 +11,6 @@ %endif %{!?with_rpm: %global with_rpm 1} %{!?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 %{!?with_dyninst: %global with_dyninst 0%{?fedora} >= 18 || 0%{?rhel} >= 7} @@ -89,8 +88,8 @@ %define __brp_mangle_shebangs_exclude_from .stp$
Name: systemtap -Version: 4.6~pre16262021g84ef6bd9 -Release: 3%{?release_override}%{?dist} +Version: 4.6~pre16291338gf2c14776 +Release: 1%{?release_override}%{?dist} # for version, see also configure.ac
@@ -589,14 +588,6 @@ systemtap-runtime-virthost machine to execute systemtap scripts. %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 @@ -646,8 +637,8 @@ 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} %{debuginfod_config} --disable-silent-rules --with-extra-version="rpm %{version}-%{release}" -make %{?_smp_mflags} +%configure %{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
%install @@ -1215,6 +1206,10 @@ exit 0
# PRERELEASE %changelog +* Mon Aug 16 2021 Frank Ch. Eigler fche@redhat.com - 4.6-16291338gf2c14776 +- Automated weekly rawhide release +- Applied spec changes from upstream git + * Sat Aug 07 2021 Jonathan Wakely jwakely@redhat.com - 4.6~pre16262021g84ef6bd9-3 - Rebuilt for Boost 1.76
commit d517681e27daff3eca564bf59c9082a6d1dfe673 Author: Jonathan Wakely jwakely@redhat.com Date: Sat Aug 7 03:57:30 2021 +0100
Rebuilt for Boost 1.76
diff --git a/systemtap.spec b/systemtap.spec index 82ccb02..d8045de 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -90,7 +90,7 @@
Name: systemtap Version: 4.6~pre16262021g84ef6bd9 -Release: 2%{?release_override}%{?dist} +Release: 3%{?release_override}%{?dist} # for version, see also configure.ac
@@ -1215,6 +1215,9 @@ exit 0
# PRERELEASE %changelog +* Sat Aug 07 2021 Jonathan Wakely jwakely@redhat.com - 4.6~pre16262021g84ef6bd9-3 +- Rebuilt for Boost 1.76 + * Fri Jul 23 2021 Fedora Release Engineering releng@fedoraproject.org - 4.6~pre16262021g84ef6bd9-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
commit 6710d16e67e2d1d11646373b85fd4783231a8d4d Author: Fedora Release Engineering releng@fedoraproject.org Date: Fri Jul 23 18:48:26 2021 +0000
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering releng@fedoraproject.org
diff --git a/systemtap.spec b/systemtap.spec index acd98d6..82ccb02 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -90,7 +90,7 @@
Name: systemtap Version: 4.6~pre16262021g84ef6bd9 -Release: 1%{?release_override}%{?dist} +Release: 2%{?release_override}%{?dist} # for version, see also configure.ac
@@ -1215,6 +1215,9 @@ exit 0
# PRERELEASE %changelog +* Fri Jul 23 2021 Fedora Release Engineering releng@fedoraproject.org - 4.6~pre16262021g84ef6bd9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Tue Jul 13 2021 Frank Ch. Eigler fche@redhat.com - 4.6-16262021g84ef6bd9 - Automated weekly rawhide release - Applied spec changes from upstream git
commit 01b865d267b6308e35a965b652edf508c84ca32d Author: Frank Ch. Eigler fche@redhat.com Date: Tue Jul 13 14:49:00 2021 -0400
Automated weekly systemtap rawhide release: 4.6~pre16262021g84ef6bd9
diff --git a/.gitignore b/.gitignore index b9fe434..b743dac 100644 --- a/.gitignore +++ b/.gitignore @@ -67,3 +67,4 @@ /systemtap-4.6-16261989g7c2751e3.tar.gz /systemtap-4.6~pre16262008gbff2b2ff.tar.gz /systemtap-4.6~pre16262012gc7f1c12e.tar.gz +/systemtap-4.6~pre16262021g84ef6bd9.tar.gz diff --git a/sources b/sources index 3c8895d..adb3140 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (systemtap-4.6~pre16262012gc7f1c12e.tar.gz) = d5f0b9a66bb578ceba75855cc8f6dcb8556f84c92452eba4872490afda5f491450dde46460df6226cf8f16426361550359b0ed578ccfe9b2a503506fb730d259 +SHA512 (systemtap-4.6~pre16262021g84ef6bd9.tar.gz) = b25138a985dbbbce23e36780721ed6c3abb6b78fa8ac5d9f9426830ae85085341022c2338d66638cd86c74cb95bcdda51f8ac8708f5b5b8406021999cd5a94f9 diff --git a/systemtap.spec b/systemtap.spec index c38ebb9..acd98d6 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -89,7 +89,7 @@ %define __brp_mangle_shebangs_exclude_from .stp$
Name: systemtap -Version: 4.6~pre16262012gc7f1c12e +Version: 4.6~pre16262021g84ef6bd9 Release: 1%{?release_override}%{?dist} # for version, see also configure.ac
@@ -174,7 +174,8 @@ BuildRequires: xmlto /usr/share/xmlto/format/fo/pdf %endif %endif %if %{with_emacsvim} -# no buildrequires, because just package the .el files +# for _emacs_sitelispdir macros etc. +BuildRequires: emacs %endif %if %{with_java} BuildRequires: java-devel @@ -1214,6 +1215,10 @@ exit 0
# PRERELEASE %changelog +* Tue Jul 13 2021 Frank Ch. Eigler fche@redhat.com - 4.6-16262021g84ef6bd9 +- Automated weekly rawhide release +- Applied spec changes from upstream git + * Tue Jul 13 2021 Frank Ch. Eigler fche@redhat.com - 4.6-16262012gc7f1c12e - Automated weekly rawhide release - Applied spec changes from upstream git
commit 2b1b4b504bc2ba832732860af64b64b078395316 Author: Frank Ch. Eigler fche@redhat.com Date: Tue Jul 13 14:35:08 2021 -0400
Automated weekly systemtap rawhide release: 4.6~pre16262012gc7f1c12e
diff --git a/.gitignore b/.gitignore index 6553d96..b9fe434 100644 --- a/.gitignore +++ b/.gitignore @@ -66,3 +66,4 @@ /systemtap-4.5.tar.gz /systemtap-4.6-16261989g7c2751e3.tar.gz /systemtap-4.6~pre16262008gbff2b2ff.tar.gz +/systemtap-4.6~pre16262012gc7f1c12e.tar.gz diff --git a/sources b/sources index eb5160e..3c8895d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (systemtap-4.6~pre16262008gbff2b2ff.tar.gz) = ceb1a801989d51a3fb5c9b97008c01a4b78d4567952b5624c3d89de070a184aeff4a26ad6abab66a00f89ad2dd50f5c7998ff4adc0f780338f3b363a54d8d6cf +SHA512 (systemtap-4.6~pre16262012gc7f1c12e.tar.gz) = d5f0b9a66bb578ceba75855cc8f6dcb8556f84c92452eba4872490afda5f491450dde46460df6226cf8f16426361550359b0ed578ccfe9b2a503506fb730d259 diff --git a/systemtap.spec b/systemtap.spec index 55b27e0..c38ebb9 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -89,7 +89,7 @@ %define __brp_mangle_shebangs_exclude_from .stp$
Name: systemtap -Version: 4.6~pre16262008gbff2b2ff +Version: 4.6~pre16262012gc7f1c12e Release: 1%{?release_override}%{?dist} # for version, see also configure.ac
@@ -1214,6 +1214,10 @@ exit 0
# PRERELEASE %changelog +* Tue Jul 13 2021 Frank Ch. Eigler fche@redhat.com - 4.6-16262012gc7f1c12e +- Automated weekly rawhide release +- Applied spec changes from upstream git + * Tue Jul 13 2021 Frank Ch. Eigler fche@redhat.com - 4.6-16262008gbff2b2ff - Automated weekly rawhide release - Applied spec changes from upstream git
commit 92c5f6ebace55f5bc20319879b0dea218a955a28 Author: Frank Ch. Eigler fche@redhat.com Date: Tue Jul 13 14:28:12 2021 -0400
Automated weekly systemtap rawhide release: 4.6~pre16262008gbff2b2ff
diff --git a/.gitignore b/.gitignore index cb3a8d6..6553d96 100644 --- a/.gitignore +++ b/.gitignore @@ -65,3 +65,4 @@ /systemtap-4.5-0.202105041345git02b6be05fb76.tar.gz /systemtap-4.5.tar.gz /systemtap-4.6-16261989g7c2751e3.tar.gz +/systemtap-4.6~pre16262008gbff2b2ff.tar.gz diff --git a/sources b/sources index 376f74f..eb5160e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (systemtap-4.6-16261989g7c2751e3.tar.gz) = fecca5ad2bcd5625c7da9cb550e14d2c8f30e68af7b5904e350f4940614a1a5a385e2e3d1b36438581cc79bd3669d13f102502cec86da43f7b70188fbd8fdfdd +SHA512 (systemtap-4.6~pre16262008gbff2b2ff.tar.gz) = ceb1a801989d51a3fb5c9b97008c01a4b78d4567952b5624c3d89de070a184aeff4a26ad6abab66a00f89ad2dd50f5c7998ff4adc0f780338f3b363a54d8d6cf diff --git a/systemtap.spec b/systemtap.spec index 7db566a..55b27e0 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -89,7 +89,7 @@ %define __brp_mangle_shebangs_exclude_from .stp$
Name: systemtap -Version: 4.6~pre16261989g7c2751e3 +Version: 4.6~pre16262008gbff2b2ff Release: 1%{?release_override}%{?dist} # for version, see also configure.ac
@@ -124,7 +124,7 @@ Release: 1%{?release_override}%{?dist} Summary: Programmable system-wide instrumentation system License: GPLv2+ URL: http://sourceware.org/systemtap/ -Source: %{name}-%{version}-16261989g7c2751e3.tar.gz +Source: %{name}-%{version}.tar.gz
# Build* BuildRequires: make @@ -1214,6 +1214,10 @@ exit 0
# PRERELEASE %changelog +* Tue Jul 13 2021 Frank Ch. Eigler fche@redhat.com - 4.6-16262008gbff2b2ff +- Automated weekly rawhide release +- Applied spec changes from upstream git + * Tue Jul 13 2021 Frank Ch. Eigler fche@redhat.com - 4.6-16261989g7c2751e3 - Automated weekly rawhide release - Applied spec changes from upstream git
commit 42e15d3c37269b3d09fe2a4b440711e9dad9f11a Author: Frank Ch. Eigler fche@redhat.com Date: Tue Jul 13 13:56:11 2021 -0400
Automated weekly systemtap rawhide release: 16261989g7c2751e3
diff --git a/.gitignore b/.gitignore index 720c02d..cb3a8d6 100644 --- a/.gitignore +++ b/.gitignore @@ -64,3 +64,4 @@ /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 diff --git a/sources b/sources index 9e90fe5..376f74f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (systemtap-4.5.tar.gz) = 8136779a9f5cb0fbaae565eab1ab6fa307f1024dfc2c6c3845acfadff0eecc684ba89aa5d442c7b90c2c73edaab41ca07bae2bad8361f80fe8e9928b40466cd3 +SHA512 (systemtap-4.6-16261989g7c2751e3.tar.gz) = fecca5ad2bcd5625c7da9cb550e14d2c8f30e68af7b5904e350f4940614a1a5a385e2e3d1b36438581cc79bd3669d13f102502cec86da43f7b70188fbd8fdfdd diff --git a/systemtap.spec b/systemtap.spec index 7997011..7db566a 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -89,8 +89,8 @@ %define __brp_mangle_shebangs_exclude_from .stp$
Name: systemtap -Version: 4.5 -Release: 3%{?release_override}%{?dist} +Version: 4.6~pre16261989g7c2751e3 +Release: 1%{?release_override}%{?dist} # for version, see also configure.ac
@@ -124,7 +124,7 @@ Release: 3%{?release_override}%{?dist} Summary: Programmable system-wide instrumentation system License: GPLv2+ URL: http://sourceware.org/systemtap/ -Source: ftp://sourceware.org/pub/systemtap/releases/systemtap-%{version}.tar.gz +Source: %{name}-%{version}-16261989g7c2751e3.tar.gz
# Build* BuildRequires: make @@ -174,7 +174,7 @@ BuildRequires: xmlto /usr/share/xmlto/format/fo/pdf %endif %endif %if %{with_emacsvim} -BuildRequires: emacs +# no buildrequires, because just package the .el files %endif %if %{with_java} BuildRequires: java-devel @@ -196,6 +196,9 @@ BuildRequires: python2-setuptools BuildRequires: python-setuptools %endif %endif +%if %{with_python3} +BuildRequires: python3 +%endif %if %{with_python3_probes} BuildRequires: python3-devel BuildRequires: python3-setuptools @@ -484,7 +487,7 @@ This package includes support files needed to run systemtap scripts that probe python 3 processes. %endif
-%if %{with_python3} +%if %{with_python3_probes} %package exporter Summary: Systemtap-prometheus interoperation mechanism License: GPLv2+ @@ -502,7 +505,8 @@ to remote requesters on demand. Summary: Systemtap Cross-VM Instrumentation - host License: GPLv2+ URL: http://sourceware.org/systemtap/ -Requires: libvirt >= 1.0.2 +# only require libvirt-libs really +#Requires: libvirt >= 1.0.2 Requires: libxml2
%description runtime-virthost @@ -951,7 +955,7 @@ if [ "$1" -ge "1" ]; then fi exit 0
-%if %{with_python3} +%if %{with_python3_probes} %if %{with_systemd} %preun exporter if [ $1 = 0 ] ; then @@ -1192,7 +1196,7 @@ exit 0 %endif %endif
-%if %{with_python3} +%if %{with_python3_probes} %files exporter %{_sysconfdir}/stap-exporter %{_sysconfdir}/sysconfig/stap-exporter @@ -1210,6 +1214,10 @@ exit 0
# PRERELEASE %changelog +* Tue Jul 13 2021 Frank Ch. Eigler fche@redhat.com - 4.6-16261989g7c2751e3 +- Automated weekly rawhide release +- Applied spec changes from upstream git + * Sat Jul 10 2021 Björn Esser besser82@fedoraproject.org - 4.5-3 - Rebuild for versioned symbols in json-c
commit 13394954082695b9529e26c68912f0e3e4f6b3df Author: Björn Esser besser82@fedoraproject.org Date: Sat Jul 10 11:58:40 2021 +0200
Rebuild for versioned symbols in json-c
diff --git a/systemtap.spec b/systemtap.spec index 27aaab4..7997011 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -90,7 +90,7 @@
Name: systemtap Version: 4.5 -Release: 2%{?release_override}%{?dist} +Release: 3%{?release_override}%{?dist} # for version, see also configure.ac
@@ -1210,6 +1210,9 @@ exit 0
# PRERELEASE %changelog +* Sat Jul 10 2021 Björn Esser besser82@fedoraproject.org - 4.5-3 +- Rebuild for versioned symbols in json-c + * Fri Jun 04 2021 Python Maint python-maint@redhat.com - 4.5-2 - Rebuilt for Python 3.10
commit 20a55c19f68d73ca33de6205c06f96565db7281d Author: Martin Cermak mcermak@redhat.com Date: Mon Jun 14 18:44:12 2021 +0200
CI tests: SELinux setup common for all the tests
Userspace probing needs custom SELinux setup so that systemtap can do userspace probing using dyninst. See check_dyninst_sebools() in stapdyn/dynutil.cxx for details.
This update moves such SELinux setup out from the userspace-probes testcase, and makes it common for all the systemtap CI tests.
diff --git a/plans/ci/prepare/prepare.fmf b/plans/ci/prepare/prepare.fmf index ecf6117..23e61d1 100755 --- a/plans/ci/prepare/prepare.fmf +++ b/plans/ci/prepare/prepare.fmf @@ -3,3 +3,5 @@ prepare: script: ./plans/ci/prepare/prepare.sh recommend: - koji +- bind-utils +- avahi-tools diff --git a/plans/ci/prepare/prepare.sh b/plans/ci/prepare/prepare.sh index 7c4e702..368ea84 100755 --- a/plans/ci/prepare/prepare.sh +++ b/plans/ci/prepare/prepare.sh @@ -20,10 +20,16 @@ __install_deps ()
set -xe
-rpm -qa | egrep '^(kernel|systemtap)' | sort -uname -r - +# Install needed packages stap-prep || __install_deps stap-prep
+# Report installed packages +stap-report + +# Set up SELinux so that it allows for userspace probing +setsebool allow_execmod on +setsebool allow_execstack on +setsebool deny_ptrace off + set +xe diff --git a/tests/Regression/small-tests/runtest.sh b/tests/Regression/small-tests/runtest.sh index 1f6d875..6f3e1c2 100755 --- a/tests/Regression/small-tests/runtest.sh +++ b/tests/Regression/small-tests/runtest.sh @@ -73,7 +73,12 @@ rlJournalStart ( perf_probe_failed "vfs_read" && exit rlPhaseStart FAIL "test 1 bz1162939" - rlRun "stap -vp4 -e 'probe vfs.read{println("hit")}'" + # At this point a weird problem shows up: sometimes the first + # systemtap invocation fails for some reason, but subsequent + # invocations succeed. Can't reproduce this manually: + rlRun "stap -vvvp4 -e 'probe vfs.read{println("hit")}'" 0,1 + sleep 30 + rlRun "stap -vvvp4 -e 'probe vfs.read{println("hit")}'" 0,1 sleep 30 rlRun "stap -e 'probe vfs.read{println("hit")}' -c 'head -1 /etc/hosts'" rlPhaseEnd diff --git a/tests/Sanity/userspace-probes/runtest.sh b/tests/Sanity/userspace-probes/runtest.sh index 8f85876..a25899b 100755 --- a/tests/Sanity/userspace-probes/runtest.sh +++ b/tests/Sanity/userspace-probes/runtest.sh @@ -52,15 +52,6 @@ rlJournalStart rlRun "rpm -qa | fgrep -e dyninst -e systemtap | sort" rlPhaseEnd
- rlPhaseStart FAIL "Set up SELinux" - rlRun "SEBOOL_ALLOW_EXECMOD=`getsebool allow_execmod | awk '{print $NF}'`" - rlRun "SEBOOL_ALLOW_EXECSTACK=`getsebool allow_execstack | awk '{print $NF}'`" - rlRun "SEBOOL_DENY_PTRACE=`getsebool deny_ptrace | awk '{print $NF}'`" - rlRun "setsebool allow_execmod on" - rlRun "setsebool allow_execstack on" - rlRun "setsebool deny_ptrace off" - rlPhaseEnd - rlPhaseStartSetup rlRun "cp hello.c testcase*.sh $WORKDIR" rlRun "chown -R $TESTUSER:$TESTUSER $WORKDIR" @@ -94,9 +85,6 @@ rlJournalStart rlPhaseStartCleanup rlRun "userdel $TESTUSER" 0-255 rlRun "rm -rf /home/$TESTUSER $WORKDIR" - rlRun "setsebool allow_execmod $SEBOOL_ALLOW_EXECMOD" - rlRun "setsebool allow_execstack $SEBOOL_ALLOW_EXECSTACK" - rlRun "setsebool deny_ptrace $SEBOOL_DENY_PTRACE" rlPhaseEnd rlJournalPrintText rlJournalEnd
commit 107122a4e8d5de40faf0637efb871cd6d24c3efe Author: Martin Cermak mcermak@redhat.com Date: Wed Jun 9 16:28:54 2021 +0200
CI tests: Add more tests
- Separate the "stap-prep" phase out to a separate phase - Add tests/Sanity/byteman-java-methods-probing - Add tests/Sanity/kernel-modules - Add tests/Sanity/userspace-probes - Add tests/Sanity/stap-server-basic-sanity - Add tests/Regression/small-tests
diff --git a/plans/ci/prepare/prepare.fmf b/plans/ci/prepare/prepare.fmf new file mode 100755 index 0000000..ecf6117 --- /dev/null +++ b/plans/ci/prepare/prepare.fmf @@ -0,0 +1,5 @@ +summary: Setup task +prepare: + script: ./plans/ci/prepare/prepare.sh +recommend: +- koji diff --git a/plans/ci/prepare/prepare.sh b/plans/ci/prepare/prepare.sh new file mode 100755 index 0000000..7c4e702 --- /dev/null +++ b/plans/ci/prepare/prepare.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +export DEBUGINFOD_URLS="https://debuginfod.fedoraproject.org/ $DEBUGINFOD_URLS" +export DEBUGINFOD_TIMEOUT=300 + +# On Rawhide, the running kernel packages won't probably be avail in +# configured repos. Debuginfo isn't a problem, we access that using +# the debuginfod. +__install_deps () +{ + TMPD=$(mktemp -d) + pushd $TMPD + koji download-build --rpm kernel-`uname -r` --arch `uname -i` + koji download-build --rpm kernel-devel-`uname -r` --arch `uname -i` + koji download-build --rpm kernel-modules-`uname -r` --arch `uname -i` + dnf -y install kernel{,-devel,-modules}-`uname -r`.rpm + popd + rm -rf $TMPD +} + +set -xe + +rpm -qa | egrep '^(kernel|systemtap)' | sort +uname -r + +stap-prep || __install_deps +stap-prep + +set +xe diff --git a/tests/Regression/small-tests/main.fmf b/tests/Regression/small-tests/main.fmf new file mode 100644 index 0000000..d659ce8 --- /dev/null +++ b/tests/Regression/small-tests/main.fmf @@ -0,0 +1,14 @@ +summary: suns small tests +description: '' +contact: Martin Cermak mcermak@redhat.com +component: +- systemtap +test: ./runtest.sh +framework: beakerlib +recommend: +- systemtap +- systemtap-testsuite +- perf +duration: 10m +extra-summary: /tools/systemtap/Regression/small-tests +extra-task: /tools/systemtap/Regression/small-tests diff --git a/tests/Regression/small-tests/runtest.sh b/tests/Regression/small-tests/runtest.sh new file mode 100755 index 0000000..1f6d875 --- /dev/null +++ b/tests/Regression/small-tests/runtest.sh @@ -0,0 +1,178 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/systemtap/Regression/small-tests +# Description: suns small tests +# Author: Martin Cermak mcermak@redhat.com +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2014 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="systemtap" + +export DEBUGINFOD_URLS="https://debuginfod.fedoraproject.org/ $DEBUGINFOD_URLS" +export DEBUGINFOD_TIMEOUT=300 + +_arch=$(arch) + +function perf_probe_failed () +{ + probe=$1 + perf probe -d $probe ||: + perf probe --add $probe + retval=$? + test $retval -eq 0 && \ + rlLogInfo "Running perf probe --add $probe PASSED" || \ + rlLogInfo "Running perf probe --add $probe FAILED" + perf probe -d $probe ||: + if test $retval -eq 0; then + return 1 + else + return 0 + fi +} + +function perf_found_none_of () +{ + ret=0 + for f in "$@"; do + perf_probe_failed $f || ret=1 + done + return $ret +} + +rlJournalStart + # Check the environment --------------------------------------- + rlPhaseStart WARN "Check the environment" + rlRun "rpm -qa | egrep '^(kernel|systemtap|perf)' | sort" + rlRun "uname -r" + rlRun "perf --version" + rlPhaseEnd + + # bz1162939 --------------------------------------------------- + ( + perf_probe_failed "vfs_read" && exit + rlPhaseStart FAIL "test 1 bz1162939" + rlRun "stap -vp4 -e 'probe vfs.read{println("hit")}'" + sleep 30 + rlRun "stap -e 'probe vfs.read{println("hit")}' -c 'head -1 /etc/hosts'" + rlPhaseEnd + ) + # bz1119335 --------------------------------------------------- + rlPhaseStart FAIL "test 2 bz1119335" + rlRun "man 8 staprun | grep 'STAP_FIPS_OVERRIDE'" + rlPhaseEnd + + # bz1153673 --------------------------------------------------- + rlPhaseStart FAIL "test 3 bz1153673" + _tested=0 + for _pkg in $( rpm -qa | grep systemtap-testsuite ); do + for _tc in $( rpm -ql $_pkg | grep 'alias_suffixes.stp$' ); do + stap -p4 $_tc && p="" || p="-P" + rlRun "stap $p -p4 $_tc" + _tested=1 + done + done + [[ $_tested -eq 0 ]] && rlFail "Not tested" + rlPhaseEnd + + # bz1160837 --------------------------------------------------- + ( + perf_probe_failed "sd_init_command" && exit + rlPhaseStart FAIL "test 4 bz1160837" + _tested=0 + _prologue_search='' + for _pkg in $( rpm -qa | grep systemtap-testsuite ); do + for _tc in $( rpm -ql $_pkg | grep 'iostat-scsi.stp$' ); do + test $_arch = ppc64le && _prologue_search='-P' + rlRun "stap -g $_prologue_search $_tc 1 -c 'sleep 1'" + _tested=1 + done + done + [[ $_tested -eq 0 ]] && rlFail "Not tested" + rlPhaseEnd + ) + + # bz1203808 --------------------------------------------------- + rlPhaseStart FAIL "test 5 bz1203808" + _tested=0 + for _pkg in $( rpm -qa | grep systemtap-testsuite ); do + for _tc in $( rpm -ql $_pkg | grep 'vfs-all-probes.stp$' ); do + stap -wp4 $_tc && p="" || p="-P" + rlRun "stap $p -w -p4 $_tc" + _tested=1 + done + done + [[ $_tested -eq 0 ]] && rlFail "Not tested" + rlPhaseEnd + + # bz1269062 --------------------------------------------------- + rlPhaseStart FAIL "test 6 bz1269062" + rlRun "stap -c sync --suppress-handler-errors -e 'probe ioscheduler.elv_add_request{println(elevator_name) exit()}'" + rlPhaseEnd + + # bz528792 --------------------------------------------------- + ( + # Not relevant on rhel-9 because of kernel commit cad6967ac10843a70842cd39c7b53412901dd21f that removes + # _do_fork() and replaces it with new kernel_clone() + perf_found_none_of "_do_fork" "do_fork" "sys_clone" && exit + + rlPhaseStart FAIL "test 7 bz528792" + if test $_arch = ppc64le; then + # https://bugzilla.redhat.com/show_bug.cgi?id=1652740#c4 - We can not reach any function parameters, namely $clone_flags + rlRun "stap -ve 'probe kernel.function("_do_fork")!, kernel.function("do_fork")!, kernel.function("sys_clone") { println(pp()) exit() }' -c "bash -c 'while sleep 1; do /bin/true; done'"" + else + rlRun "stap -ve 'probe kernel.function("_do_fork")!, kernel.function("do_fork")!, kernel.function("sys_clone") { printf("%x\n",$clone_flags) exit() }' -c "bash -c 'while sleep 1; do /bin/true; done'"" + fi + rlPhaseEnd + ) + + # bz1890702 --------------------------------------------------- + ( + perf_probe_failed "vfs_open" && exit + rlPhaseStart FAIL "test 8 bz1890702" + rlRun "stap -g --suppress-time-limits -e 'probe kernel.function("vfs_open") { printf("%s(path: %s)", ppfunc(), $path$) ; exit() }' -c 'cat /etc/hosts'" + rlPhaseEnd + ) + + # bz1904216 --------------------------------------------------- + rlPhaseStart FAIL "test 9 bz1904216" + rlRun "stap -p4 -DSTP_NO_OVERLOAD -t -c 'sleep 0.25' -e 'probe kernel.trace("bcache:bcache_btree_set_root") { if (pid() == 0) printf("probe hit\n"); }'" + rlPhaseEnd + + # bz1940804 --------------------------------------------------- + rlPhaseStart FAIL "test 10 bz1940804" + rlRun "stap -e 'probe process("/bin/bash").function("main") {println(pn()) }' -c '/bin/bash --help'" + rlPhaseEnd + + # bz1940945 --------------------------------------------------- + rlPhaseStart FAIL "test 11 bz1940945" + rlRun "stap -c sync --suppress-handler-errors -e 'probe ioscheduler.elv_add_request{println(elevator_name) exit()}'" + rlPhaseEnd + + # bz1940761 --------------------------------------------------- + rlPhaseStart FAIL "test 12 bz1940761" + rlRun "stap -v /usr/share/systemtap/examples/process/strace.stp -w -c "echo hello world"" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/Sanity/byteman-java-methods-probing/ThreadedExample.java b/tests/Sanity/byteman-java-methods-probing/ThreadedExample.java new file mode 100644 index 0000000..8aa0f83 --- /dev/null +++ b/tests/Sanity/byteman-java-methods-probing/ThreadedExample.java @@ -0,0 +1,60 @@ +package foo.bar; + +import java.lang.*; +import java.util.*; + +class ThreadedExample +{ + + public static void printMessage(int message) { + System.out.println("message: " + message); + } + + public static void printMessage(long message) { + System.out.println("message: " + message); + } + + public static void main(String[] args) { + + // sleep so that stap can start and byteman agent gets installed + try { + Thread.sleep(30000); + } catch(InterruptedException ex) { + Thread.currentThread().interrupt(); + } + + + try { + String[] inputs = new String[] {"int", "foo", "long"}; + for (String next : inputs) { + + final String arg = next; + final int i = 42; + final long j = 987234864; + Thread thread = new Thread(arg) { + public void run() { + if(arg.equals("int")) + printMessage(i); + else if(arg.equals("long")) + printMessage(j); + else + System.out.println("Neither of the types"); + } + }; + thread.start(); + try { + thread.join(); + } catch (Exception e){} + } + } catch (Exception e){} + + + // sleep so that stap can finish still while probed java program still runs + try { + Thread.sleep(80000); + } catch(InterruptedException ex) { + Thread.currentThread().interrupt(); + } + } +} + diff --git a/tests/Sanity/byteman-java-methods-probing/ThreadedExample.stp b/tests/Sanity/byteman-java-methods-probing/ThreadedExample.stp new file mode 100644 index 0000000..2aaa08c --- /dev/null +++ b/tests/Sanity/byteman-java-methods-probing/ThreadedExample.stp @@ -0,0 +1,18 @@ +probe java("foo.bar.ThreadedExample").class("ThreadedExample").method("printMessage(int)") +{ + printf("Hit printMessage(int): %s\n", arg1) +} + +probe java("foo.bar.ThreadedExample").class("ThreadedExample").method("printMessage(long)") +{ + printf("Hit printMessage(long): %s\n", arg1) + exit() +} + +probe timer.ms(100000) +{ + error("Exit on timeout") + exit() +} + + diff --git a/tests/Sanity/byteman-java-methods-probing/main.fmf b/tests/Sanity/byteman-java-methods-probing/main.fmf new file mode 100644 index 0000000..607b883 --- /dev/null +++ b/tests/Sanity/byteman-java-methods-probing/main.fmf @@ -0,0 +1,12 @@ +summary: byteman-java-methods-probing +description: '' +contact: Martin Cermak mcermak@redhat.com +test: ./runtest.sh +framework: beakerlib +recommend: +- java-devel +- systemtap +- systemtap-runtime-java +duration: 15m +extra-summary: /tools/systemtap/Sanity/byteman-java-methods-probing +extra-task: /tools/systemtap/Sanity/byteman-java-methods-probing diff --git a/tests/Sanity/byteman-java-methods-probing/runtest.sh b/tests/Sanity/byteman-java-methods-probing/runtest.sh new file mode 100755 index 0000000..f60f287 --- /dev/null +++ b/tests/Sanity/byteman-java-methods-probing/runtest.sh @@ -0,0 +1,83 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/systemtap/Sanity/byteman-java-methods-probing +# Description: byteman-java-methods-probing +# Author: Martin Cermak mcermak@redhat.com +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2013 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +export DEBUGINFOD_URLS="https://debuginfod.fedoraproject.org/ $DEBUGINFOD_URLS" +export DEBUGINFOD_TIMEOUT=300 + +rlJournalStart + rlPhaseStartSetup + # At this point we simply rely on that the %triggerin scriptlet from + # systemtap-runtime-java did it's job well. There was a hack to force + # trigger it here, but commit respective to this comment removes it. + # https://bugzilla.redhat.com/show_bug.cgi?id=1732514#c11 + + rlRun "rpm -qa | fgrep -e systemtap-runtime-java -e byteman -e openjdk | sort" + + rlRun "stap-prep" + + for BINARY in java javac; do + rlRun "alternatives --display $BINARY | grep -v slave" + rlRun "$BINARY -version" + done + + rlRun "TMPDIR=$( mktemp -d )" + rlRun "mkdir -p $TMPDIR/foo/bar" + rlRun "cp ThreadedExample.java $TMPDIR/foo/bar/" + rlRun "cp ThreadedExample.stp $TMPDIR/" + rlRun "pushd $TMPDIR" + rlPhaseEnd + + rlPhaseStart FAIL 'Prepare bytecode class' + rlRun "javac foo/bar/ThreadedExample.java" + rlPhaseEnd + + rlPhaseStart FAIL 'Prepare the LKML' + rlRun "stap -p4 -m ThreadedExample ThreadedExample.stp" + rlPhaseEnd + + rlPhaseStart FAIL 'Check the Feature' + java foo.bar.ThreadedExample & + rlRun "jps -l | grep 'foo.bar.ThreadedExample'" + export STAPBM_VERBOSE=yes + # rlRun "stap --poison-cache -vv ThreadedExample.stp 2>&1 | tee testout.log" + # Speed the stap startup up by pre-compiling the module within separate + # phase 'Prepare the LKML' above. + rlRun "staprun -v -R ThreadedExample.ko 2>&1 | tee testout.log" + rlRun "grep -q 'Hit printMessage(int): 42' testout.log" + rlRun "grep -q 'Hit printMessage(long): 987234864' testout.log" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TMPDIR" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/Sanity/kernel-modules/Makefile.template b/tests/Sanity/kernel-modules/Makefile.template new file mode 100644 index 0000000..a8bfffb --- /dev/null +++ b/tests/Sanity/kernel-modules/Makefile.template @@ -0,0 +1,3 @@ +obj-m := MODULENAME.o +module: + make -C /lib/modules/$(shell uname -r)/build KBUILD_EXTMOD=DIRECTORY SUBDIRS=DIRECTORY modules diff --git a/tests/Sanity/kernel-modules/main.fmf b/tests/Sanity/kernel-modules/main.fmf new file mode 100644 index 0000000..88e2d17 --- /dev/null +++ b/tests/Sanity/kernel-modules/main.fmf @@ -0,0 +1,17 @@ +summary: Tests systemtap working with kernel modules +description: '' +contact: Petr Muller pmuller@redhat.com +component: +- systemtap +test: ./runtest.sh +framework: beakerlib +recommend: +- systemtap +- kernel-devel +- bison +- flex +- openssl-devel +- elfutils-libelf-devel +duration: 10m +extra-summary: /tools/systemtap/Sanity/kernel-modules +extra-task: /tools/systemtap/Sanity/kernel-modules diff --git a/tests/Sanity/kernel-modules/module.c b/tests/Sanity/kernel-modules/module.c new file mode 100644 index 0000000..427ddbc --- /dev/null +++ b/tests/Sanity/kernel-modules/module.c @@ -0,0 +1,20 @@ +#include <linux/module.h> /* Needed by all modules */ +#include <linux/kernel.h> /* Needed for KERN_INFO */ + +int init_module(void) +{ + printk(KERN_INFO "Hello world 1.\n"); + return 0; +} + +int some_method(void){ + printk(KERN_INFO "Some method called\n"); + return 0; +} + +void cleanup_module(void) +{ + printk(KERN_INFO "Goodbye world 1.\n"); +} + +MODULE_LICENSE("GPL"); diff --git a/tests/Sanity/kernel-modules/runtest.sh b/tests/Sanity/kernel-modules/runtest.sh new file mode 100755 index 0000000..b8d32d8 --- /dev/null +++ b/tests/Sanity/kernel-modules/runtest.sh @@ -0,0 +1,123 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/systemtap/Sanity/kernel-modules +# Description: Tests systemtap working with kernel modules +# Author: Petr Muller pmuller@redhat.com +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2012 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh + +PACKAGE="systemtap" + +check_probes(){ + FAIL="" + rlAssertGrep init_module $1 || FAIL='yes' + rlAssertGrep cleanup_module $1 || FAIL='yes' + rlAssertGrep some_method $1 || FAIL='yes' + + if [ -n "$FAIL" ] + then + rlFileSubmit $1 $2.out + fi +} + +rlJournalStart + +rlPhaseStartSetup "Preparing modules" + rlRun "mkdir -p 'stap-underscore' 'stap-dash' 'stap-none'" + rlRun "cp module.c stap-underscore/test_module.c" + rlRun "cp module.c stap-dash/test-module.c" + rlRun "cp module.c stap-none/testmodule.c" + + cat Makefile.template | sed -e 's/MODULENAME/test_module/g' \ + | sed -e "s|DIRECTORY|$PWD/stap-underscore|g" > stap-underscore/Makefile + rlAssert0 "Creating Makefile for underscore variant" $? + cat Makefile.template | sed -e 's/MODULENAME/test-module/g' \ + | sed -e "s|DIRECTORY|$PWD/stap-dash|g" > stap-dash/Makefile + rlAssert0 "Creating Makefile for dash variant" $? + + cat Makefile.template | sed -e 's/MODULENAME/testmodule/g' \ + | sed -e "s|DIRECTORY|$PWD/stap-none|g" > stap-none/Makefile + rlAssert0 "Creating Makefile for no character variant" $? + + if [ -n "$ARCH" ] + then + rlLog "ARCH is set to: [$ARCH]" + rlLog "This interferes with 'make module', so it needs to be unset." + ARCHOLD="$ARCH" + unset ARCH + rlLog "ARCH is set to: [$ARCH]" + fi + rlRun "make -C stap-underscore module" + rlRun "make -C stap-dash module" + rlRun "make -C stap-none module" + if [ -n "$ARCHOLD" ] + then + rlLog "Restoring ARCH" + export ARCH="$ARCHOLD" + rlLog "ARCH is set to: [$ARCH]" + fi + +rlPhaseEnd + +rlPhaseStartTest "Testing underscore variant" + rlRun "cp stap-underscore/test_module.ko /lib/modules/$(uname -r)/" + rlRun "insmod stap-underscore/test_module.ko" + stap -L 'module("test_module").function("*")' -v > stap.out + check_probes stap.out "module-und-probe-und" + stap -L 'module("test-module").function("*")' -v > stap.out + check_probes stap.out "module-und-probe-dash" + sleep 1 + rlRun "rmmod test_module" + rlRun "rm -f /lib/modules/$(uname -r)/test_module.ko" +rlPhaseEnd + +rlPhaseStartTest "Testing dash variant" + rlRun "cp stap-dash/test-module.ko /lib/modules/$(uname -r)/" + rlRun "insmod stap-dash/test-module.ko" + stap -L 'module("test_module").function("*")' -v > stap.out + check_probes stap.out "module-dash-probe-und" + stap -L 'module("test-module").function("*")' -v > stap.out + check_probes stap.out "module-dash-probe-dash" + sleep 1 + rlRun "rmmod test-module" + rlRun "rm -f /lib/modules/$(uname -r)/test-module.ko" +rlPhaseEnd + +rlPhaseStartTest "Testing no separator variant" + rlRun "cp stap-none/testmodule.ko /lib/modules/$(uname -r)/" + rlRun "insmod stap-none/testmodule.ko" + stap -L 'module("testmodule").function("*")' -v > stap.out + check_probes stap.out "module-none-probe-none" + sleep 1 + rlRun "rmmod testmodule" + rlRun "rm -f /lib/modules/$(uname -r)/testmodule.ko" +rlPhaseEnd + +rlPhaseStartCleanup + rlRun "rm -rf stap-underscore stap-dash stap-none stap.out" +rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/Sanity/quick-smoke-test/runtest.sh b/tests/Sanity/quick-smoke-test/runtest.sh index 0bec058..f04c2f1 100755 --- a/tests/Sanity/quick-smoke-test/runtest.sh +++ b/tests/Sanity/quick-smoke-test/runtest.sh @@ -9,28 +9,10 @@ export DEBUGINFOD_TIMEOUT=300 # export DEBUGINFOD_PROGRESS=1
-# On Rawhide, the running kernel packages won't probably be avail in -# configured repos. Debuginfo isn't a problem, we access that using -# the debuginfod. -__install_deps () -{ - set -xe - TMPD=$(mktemp -d) - pushd $TMPD - koji download-build --rpm kernel-`uname -r` --arch `uname -i` - koji download-build --rpm kernel-devel-`uname -r` --arch `uname -i` - koji download-build --rpm kernel-modules-`uname -r` --arch `uname -i` - dnf -y install kernel{,-devel,-modules}-`uname -r`.rpm - popd - rm -rf $TMPD - set +xe -} - rlJournalStart rlPhaseStartTest rlRun "rpm -qa | egrep '^(kernel|systemtap)' | sort" rlRun "uname -r" - rlRun "stap-prep || __install_deps" rlRun "stap-prep" rlRun "stap -L 'process("stap").mark("*")' | grep pass" rlRun "stap -v --example helloworld.stp" diff --git a/tests/Sanity/stap-server-basic-sanity/main.fmf b/tests/Sanity/stap-server-basic-sanity/main.fmf new file mode 100644 index 0000000..248ecde --- /dev/null +++ b/tests/Sanity/stap-server-basic-sanity/main.fmf @@ -0,0 +1,17 @@ +summary: stap-server-basic-sanity +description: '' +contact: Martin Cermak mcermak@redhat.com +component: +- systemtap +test: ./runtest.sh +framework: beakerlib +recommend: +- systemtap +- kernel-debuginfo +- avahi +- systemtap-server +- dbus +- net-tools +duration: 45m +extra-summary: /tools/systemtap/Sanity/stap-server-basic-sanity +extra-task: /tools/systemtap/Sanity/stap-server-basic-sanity diff --git a/tests/Sanity/stap-server-basic-sanity/runtest.sh b/tests/Sanity/stap-server-basic-sanity/runtest.sh new file mode 100755 index 0000000..e121a51 --- /dev/null +++ b/tests/Sanity/stap-server-basic-sanity/runtest.sh @@ -0,0 +1,98 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/systemtap/Sanity/stap-server-basic-sanity +# Description: stap-server-basic-sanity +# Author: Martin Cermak mcermak@redhat.com +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2013 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +CMD='stap' +BIN=$(which --skip-alias $CMD) +PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' $BIN | head -1)}" + +export DEBUGINFOD_URLS="https://debuginfod.fedoraproject.org/ $DEBUGINFOD_URLS" +export DEBUGINFOD_TIMEOUT=300 + +function service_stap_server() { + action=$1 + retval=${2:-0} + sleep 5 + rlLogInfo "PACKAGE=$PACKAGE" + if echo $PACKAGE | grep -q devtoolset; then + __i=$(echo $PACKAGE | awk -F- '{print $2}') + rlRun "service devtoolset-$__i-stap-server $action" $retval + elif echo $PACKAGE | grep -q gcc-toolset; then + __i=$(echo $PACKAGE | awk -F- '{print $3}') + rlRun "service gcc-toolset-$__i-stap-server $action" $retval + else + rlRun "service stap-server $action" $retval + fi + sleep 5 +} + +_rhelmajor=$(rpm --eval '%{rhel}') + +rlJournalStart + rlPhaseStartSetup + rlRun "TMPDIR=$(mktemp -d)" + rlRun "pushd $TMPDIR" + rlAssertRpm dbus + rlAssertRpm avahi + rlAssertRpm net-tools # because of netstat + rlPhaseEnd + + rlPhaseStart FAIL "sanity check" + rlRun "stap -v -e 'probe begin { log("hello"); exit() }'" + rlPhaseEnd + + rlPhaseStartTest + rlRun "service iptables stop" 0-255 + rlRun "service firewalld stop" 0-255 + service_stap_server stop + test $_rhelmajor -le 8 && \ + rlRun "service messagebus restart" + rlRun "service avahi-daemon restart" + service_stap_server start + + rlRun "netstat -tlp | grep stap" + rlRun "SERVER_PORT=$( netstat -tlpn | awk '/stap/ {print $4}' | grep -o '[0-9]*$' )" + + for SERVER_IP in '127.0.0.1' '[::1]'; do + rlLogInfo "Testing SERVER_IP=$SERVER_IP" + rlRun "stap --trust-servers=ssl,signer,all-users,no-prompt --use-server=$SERVER_IP:$SERVER_PORT" + rlRun "stap --use-server=$SERVER_IP:$SERVER_PORT -v -e 'probe begin { log("hello"); exit() }' 2>&1 | tee output.log" + rlRun "grep 'Using a compile server' output.log" + rlRun "grep '^hello$' output.log" + done + rlPhaseEnd + + rlPhaseStartCleanup + service_stap_server stop + rlRun "popd" + rlRun "rm -r $TMPDIR" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/Sanity/userspace-probes/hello.c b/tests/Sanity/userspace-probes/hello.c new file mode 100644 index 0000000..60dac5b --- /dev/null +++ b/tests/Sanity/userspace-probes/hello.c @@ -0,0 +1,7 @@ +#include <stdio.h> + +int main(void) { + printf("Hello world!\n"); + return 0; +} + diff --git a/tests/Sanity/userspace-probes/main.fmf b/tests/Sanity/userspace-probes/main.fmf new file mode 100644 index 0000000..b509a17 --- /dev/null +++ b/tests/Sanity/userspace-probes/main.fmf @@ -0,0 +1,16 @@ +summary: userspace-probes +description: '' +contact: Martin Cermak mcermak@redhat.com +component: +- systemtap +test: ./runtest.sh +framework: beakerlib +recommend: +- systemtap +- dyninst-devel +- gawk +duration: 5m +link: +- relates: https://bugzilla.redhat.com/show_bug.cgi?id=855981 +extra-summary: /CoreOS/systemtap/Sanity/userspace-probes +extra-task: /CoreOS/systemtap/Sanity/userspace-probes diff --git a/tests/Sanity/userspace-probes/runtest.sh b/tests/Sanity/userspace-probes/runtest.sh new file mode 100755 index 0000000..8f85876 --- /dev/null +++ b/tests/Sanity/userspace-probes/runtest.sh @@ -0,0 +1,102 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/systemtap/Sanity/userspace-probes +# Description: userspace-probes +# Author: Martin Cermak mcermak@redhat.com +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2013 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +export DEBUGINFOD_URLS="https://debuginfod.fedoraproject.org/ $DEBUGINFOD_URLS" +export DEBUGINFOD_TIMEOUT=300 + +PACKAGE="$(rpm -qf $( which stap ) | head -n 1 )" +WORKDIR=$( mktemp -d ) +TESTUSER=mytestuser + + + +rlJournalStart + rlPhaseStart WARN "Check the environment" + if ! stap -V 2>&1 | grep -q 'enabled features:.*DYNINST'; then + rlLogWarning "No dyninst available in $PACKAGE" + rlPhaseEnd + rlJournalPrintText + rlJournalEnd + exit 0 + fi + rlRun "useradd $TESTUSER" 0,9 + rlRun "su $TESTUSER -c 'which stap'" + rlRun "rpm -qa | fgrep -e dyninst -e systemtap | sort" + rlPhaseEnd + + rlPhaseStart FAIL "Set up SELinux" + rlRun "SEBOOL_ALLOW_EXECMOD=`getsebool allow_execmod | awk '{print $NF}'`" + rlRun "SEBOOL_ALLOW_EXECSTACK=`getsebool allow_execstack | awk '{print $NF}'`" + rlRun "SEBOOL_DENY_PTRACE=`getsebool deny_ptrace | awk '{print $NF}'`" + rlRun "setsebool allow_execmod on" + rlRun "setsebool allow_execstack on" + rlRun "setsebool deny_ptrace off" + rlPhaseEnd + + rlPhaseStartSetup + rlRun "cp hello.c testcase*.sh $WORKDIR" + rlRun "chown -R $TESTUSER:$TESTUSER $WORKDIR" + rlPhaseEnd + + rlPhaseStart FAIL "Testcase 1" + rlRun "which gcc" + rlRun "su $TESTUSER -c 'gcc -g -o $WORKDIR/hello $WORKDIR/hello.c'" + rlRun "su $TESTUSER -c '$WORKDIR/hello'" + rlRun "chmod a+x $WORKDIR/testcase1.sh" + rlRun "su $TESTUSER -c '$WORKDIR/testcase1.sh $WORKDIR'" + + LOG="$WORKDIR/stapout.log" + + rlRun "cat $LOG" + rlRun "grep '^process("$WORKDIR/hello").function("main@$WORKDIR/hello.c:3")$' $LOG" + rlRun "grep -i error $LOG" 1 + rlPhaseEnd + + rlPhaseStart FAIL "Testcase 2" + rlRun "chmod a+x $WORKDIR/testcase2.sh" + rlRun "su $TESTUSER -c '$WORKDIR/testcase2.sh $WORKDIR'" + + LOG="$WORKDIR/stapout.log" + + rlRun "cat $LOG" + rlRun "grep '^***\ exiting\ ***$' $LOG" + rlRun "egrep -i 'error|warning' $LOG" 1 + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "userdel $TESTUSER" 0-255 + rlRun "rm -rf /home/$TESTUSER $WORKDIR" + rlRun "setsebool allow_execmod $SEBOOL_ALLOW_EXECMOD" + rlRun "setsebool allow_execstack $SEBOOL_ALLOW_EXECSTACK" + rlRun "setsebool deny_ptrace $SEBOOL_DENY_PTRACE" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/Sanity/userspace-probes/testcase1.sh b/tests/Sanity/userspace-probes/testcase1.sh new file mode 100755 index 0000000..818d2cd --- /dev/null +++ b/tests/Sanity/userspace-probes/testcase1.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +stap -e "probe process("$1/hello").function("main") { println(pn()) }" --runtime=dyninst -c "$1/hello" -o "$1/stapout.log" diff --git a/tests/Sanity/userspace-probes/testcase2.sh b/tests/Sanity/userspace-probes/testcase2.sh new file mode 100755 index 0000000..d270d09 --- /dev/null +++ b/tests/Sanity/userspace-probes/testcase2.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +stap --runtime=dyninst -e 'probe end { printf("*** exiting ***\n"); exit() }' -c "$1/hello" -o "$1/stapout.log" +
commit 7b59f81081a7ac63f4e3b43b39dfd35f14b68dec Author: Python Maint python-maint@redhat.com Date: Fri Jun 4 21:16:19 2021 +0200
Rebuilt for Python 3.10
diff --git a/systemtap.spec b/systemtap.spec index 3e933ea..27aaab4 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -90,7 +90,7 @@
Name: systemtap Version: 4.5 -Release: 1%{?release_override}%{?dist} +Release: 2%{?release_override}%{?dist} # for version, see also configure.ac
@@ -1210,6 +1210,9 @@ exit 0
# PRERELEASE %changelog +* Fri Jun 04 2021 Python Maint python-maint@redhat.com - 4.5-2 +- Rebuilt for Python 3.10 + * Fri May 07 2021 Serhei Makarov me@serhei.io - 4.5-1 - Upstream release.
commit 8c4334f134916a019b382dbab53cadd9872d8b3a Author: Frank Ch. Eigler fche@redhat.com Date: Sun May 9 15:32:49 2021 -0400
CI: prefer main fedora debuginfod server
diff --git a/tests/Sanity/quick-smoke-test/runtest.sh b/tests/Sanity/quick-smoke-test/runtest.sh index 1381587..0bec058 100755 --- a/tests/Sanity/quick-smoke-test/runtest.sh +++ b/tests/Sanity/quick-smoke-test/runtest.sh @@ -4,7 +4,7 @@
. /usr/share/beakerlib/beakerlib.sh || exit 1
-export DEBUGINFOD_URLS="https://debuginfod.stg.fedoraproject.org/ $DEBUGINFOD_URLS" +export DEBUGINFOD_URLS="https://debuginfod.fedoraproject.org/ $DEBUGINFOD_URLS" export DEBUGINFOD_TIMEOUT=300 # export DEBUGINFOD_PROGRESS=1
arch-excludes@lists.fedoraproject.org