From 45296db740b9016f27b94b23165127c5ebf5c25c Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Fri, 8 Jun 2018 18:41:53 -0400 Subject: [PATCH 1/6] upstream release 3.3 --- .gitignore | 1 + rhbz1504009.patch | 49 ----------- rhbz1544711.patch | 208 ---------------------------------------------- sources | 2 +- systemtap.spec | 54 +++++------- 5 files changed, 22 insertions(+), 292 deletions(-) delete mode 100644 rhbz1504009.patch delete mode 100644 rhbz1544711.patch diff --git a/.gitignore b/.gitignore index f6ed169..f2cefbd 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /systemtap-3.3-0.20180315gitc2585f2b58cd.tar.gz /systemtap-3.3-0.20180420gitd4a446c.tar.gz /systemtap-3.3-0.20180508git9c6ac6cda49e.tar.gz +/systemtap-3.3.tar.gz diff --git a/rhbz1504009.patch b/rhbz1504009.patch deleted file mode 100644 index 7643891..0000000 --- a/rhbz1504009.patch +++ /dev/null @@ -1,49 +0,0 @@ -commit 9f81f10b0caf6dfc49c4b7ceb7902f45d37b532a (HEAD -> master, origin/master, origin/HEAD) -Author: Frank Ch. Eigler -Date: Fri Oct 20 10:01:58 2017 -0400 - - rhbz1504009: let dtrace -G -o /dev/null run, as in autoconf - - commit c245153ca193c471a8c broke the ability of dtrace to be tested in - autoconf "-G -o /dev/null" usage, because its output file name was too - simple a function of the input name, and normal users can't write to - /dev/null.dtrace-temp.c . Now we back down to mkstemp, like before, - upon a failure of the simple concatenated name. - -diff --git a/dtrace.in b/dtrace.in -index 2e2e002a5c56..25efc253b708 100644 ---- a/dtrace.in -+++ b/dtrace.in -@@ -410,8 +410,12 @@ from tempfile import mkstemp - else: - print("header: " + fname) - -- fname = filename + ".dtrace-temp.c" -- fdesc = open(fname, mode='w') -+ try: # for reproducible-builds purposes, prefer a fixed path name pattern -+ fname = filename + ".dtrace-temp.c" -+ fdesc = open(fname, mode='w') -+ except: # but that doesn't work for -o /dev/null - see rhbz1504009 -+ (ignore,fname) = mkstemp(suffix=".c") -+ fdesc = open(fname, mode='w') - providers.semaphore_write(fdesc) - fdesc.close() - cc1 = os.environ.get("CC", "gcc") -diff --git a/testsuite/systemtap.base/dtrace.exp b/testsuite/systemtap.base/dtrace.exp -index fa6b3ec3f6d3..7c60f09d70b8 100644 ---- a/testsuite/systemtap.base/dtrace.exp -+++ b/testsuite/systemtap.base/dtrace.exp -@@ -83,6 +83,13 @@ if {[file exists /tmp/XXX.o]} then { - } - exec rm -f /tmp/XXX.o - -+verbose -log "$dtrace -G -s $dpath -o /dev/null" -+if [as_non_root "$python $dtrace -G -s $dpath -o /dev/null"] { -+ fail "$test -G -o /dev/null" -+} else { -+ pass "$test -G -o /dev/null" -+} -+ - verbose -log "$dtrace -G -s $dpath -o /tmp/XXX" - catch {exec $python $dtrace -G -s $dpath -o /tmp/XXX} res - if {[file exists /tmp/XXX]} then { diff --git a/rhbz1544711.patch b/rhbz1544711.patch deleted file mode 100644 index 434fc53..0000000 --- a/rhbz1544711.patch +++ /dev/null @@ -1,208 +0,0 @@ -commit a8e317b60 (HEAD -> master, origin/master, origin/HEAD) -Author: Stan Cox -Date: Tue Feb 13 22:38:03 2018 -0500 - - Fixes for gcc 8 - - * includes/sys/sdt.h (__SDT_COND_SIGNED): Add CT, cast type argument - - Author: Will Cohen - - * stap-serverd.cxx (generate_mok, handleRequest, handle_connection): - Catch format overflow - - * translate.cxx (translate_pass): Use ref in catch. - -diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h -index 940f74483..c0c5a492c 100644 ---- a/includes/sys/sdt.h -+++ b/includes/sys/sdt.h -@@ -119,8 +119,8 @@ struct __sdt_type - - #define __SDT_ALWAYS_SIGNED(T) \ - template<> struct __sdt_type { static const bool __sdt_signed = true; }; --#define __SDT_COND_SIGNED(T) \ --template<> struct __sdt_type { static const bool __sdt_signed = ((T)(-1) < 1); }; -+#define __SDT_COND_SIGNED(T,CT) \ -+template<> struct __sdt_type { static const bool __sdt_signed = ((CT)(-1) < 1); }; - __SDT_ALWAYS_SIGNED(signed char) - __SDT_ALWAYS_SIGNED(short) - __SDT_ALWAYS_SIGNED(int) -@@ -141,14 +141,14 @@ __SDT_ALWAYS_SIGNED(const volatile short) - __SDT_ALWAYS_SIGNED(const volatile int) - __SDT_ALWAYS_SIGNED(const volatile long) - __SDT_ALWAYS_SIGNED(const volatile long long) --__SDT_COND_SIGNED(char) --__SDT_COND_SIGNED(wchar_t) --__SDT_COND_SIGNED(volatile char) --__SDT_COND_SIGNED(volatile wchar_t) --__SDT_COND_SIGNED(const char) --__SDT_COND_SIGNED(const wchar_t) --__SDT_COND_SIGNED(const volatile char) --__SDT_COND_SIGNED(const volatile wchar_t) -+__SDT_COND_SIGNED(char, char) -+__SDT_COND_SIGNED(wchar_t, wchar_t) -+__SDT_COND_SIGNED(volatile char, char) -+__SDT_COND_SIGNED(volatile wchar_t, wchar_t) -+__SDT_COND_SIGNED(const char, char) -+__SDT_COND_SIGNED(const wchar_t, wchar_t) -+__SDT_COND_SIGNED(const volatile char, char) -+__SDT_COND_SIGNED(const volatile wchar_t, wchar_t) - #if defined (__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) - /* __SDT_COND_SIGNED(char16_t) */ - /* __SDT_COND_SIGNED(char32_t) */ -diff --git a/stap-serverd.cxx b/stap-serverd.cxx -index b8f70114c..063c3c587 100644 ---- a/stap-serverd.cxx -+++ b/stap-serverd.cxx -@@ -1607,6 +1607,7 @@ generate_mok(string &mok_fingerprint) - char tmpdir[PATH_MAX] = { '\0' }; - string public_cert_path, private_cert_path, destdir; - mode_t old_umask; -+ int retlen; - - mok_fingerprint.clear (); - -@@ -1631,7 +1632,14 @@ generate_mok(string &mok_fingerprint) - } - - // Make a temporary directory to store results in. -- snprintf (tmpdir, PATH_MAX, "%s/stap-server.XXXXXX", mok_path.c_str ()); -+ retlen = snprintf (tmpdir, PATH_MAX, "%s/stap-server.XXXXXX", mok_path.c_str ()); -+ if (retlen < 0 || retlen >= PATH_MAX) -+ { -+ server_error (_F("Could not create %s name", "temporary directory")); -+ tmpdir[0] = '\0'; -+ goto cleanup; -+ } -+ - if (mkdtemp (tmpdir) == NULL) - { - server_error (_F("Could not create temporary directory %s: %s", tmpdir, -@@ -1704,6 +1712,7 @@ handleRequest (const string &requestDirName, const string &responseDirName, stri - unsigned u; - unsigned i; - FILE* f; -+ int retlen; - - // Save the server version. Do this early, so the client knows what version of the server - // it is dealing with, even if the request is not fully completed. -@@ -1782,7 +1791,12 @@ handleRequest (const string &requestDirName, const string &responseDirName, stri - struct stat st; - char *arg; - -- snprintf (stapargfile, PATH_MAX, "%s/argv%d", requestDirName.c_str (), i); -+ retlen = snprintf (stapargfile, PATH_MAX, "%s/argv%d", requestDirName.c_str (), i); -+ if (retlen < 0 || retlen >= PATH_MAX) -+ { -+ server_error (_F("Error creating %s name", "path")); -+ return; -+ } - - rc = stat(stapargfile, & st); - if (rc) break; -@@ -1888,7 +1902,15 @@ handleRequest (const string &requestDirName, const string &responseDirName, stri - { - glob_t globber; - char pattern[PATH_MAX]; -- snprintf (pattern, PATH_MAX, "%s/*.ko", new_staptmpdir.c_str()); -+ int retlen; -+ -+ retlen = snprintf (pattern, PATH_MAX, "%s/*.ko", new_staptmpdir.c_str()); -+ if (retlen < 0 || retlen >= PATH_MAX) -+ { -+ server_error (_F("Error creating %s name", "pattern")); -+ return; -+ } -+ - rc = glob (pattern, GLOB_ERR, NULL, &globber); - if (rc) - server_error (_F("Unable to find a module in %s", new_staptmpdir.c_str())); -@@ -2164,6 +2186,7 @@ handle_connection (void *arg) - copy for each connection.*/ - vector argv; - PRInt32 bytesRead; -+ int retlen; - - /* Detatch to avoid a memory leak */ - if(max_threads > 0) -@@ -2213,7 +2236,13 @@ handle_connection (void *arg) - #endif - - secStatus = SECFailure; -- snprintf(tmpdir, PATH_MAX, "%s/stap-server.XXXXXX", getenv("TMPDIR") ?: "/tmp"); -+ retlen = snprintf(tmpdir, PATH_MAX, "%s/stap-server.XXXXXX", getenv("TMPDIR") ?: "/tmp"); -+ if (retlen < 0 || retlen >= PATH_MAX) -+ { -+ server_error (_F("Error creating %s name", "temporary directory")); -+ tmpdir[0]=0; /* prevent /bin/rm */ -+ goto cleanup; -+ } - rc1 = mkdtemp(tmpdir); - if (! rc1) - { -@@ -2223,9 +2252,20 @@ handle_connection (void *arg) - } - - /* Create a temporary files names and directories. */ -- snprintf (requestFileName, PATH_MAX, "%s/request.zip", tmpdir); -+ retlen = snprintf (requestFileName, PATH_MAX, "%s/request.zip", tmpdir); -+ if (retlen < 0 || retlen >= PATH_MAX) -+ { -+ server_error (_F("Error creating %s name", "request.zip path")); -+ goto cleanup; -+ } -+ -+ retlen = snprintf (requestDirName, PATH_MAX, "%s/request", tmpdir); -+ if (retlen < 0 || retlen >= PATH_MAX) -+ { -+ server_error (_F("Error creating %s name", "request directory path")); -+ goto cleanup; -+ } - -- snprintf (requestDirName, PATH_MAX, "%s/request", tmpdir); - rc = mkdir(requestDirName, 0700); - if (rc) - { -@@ -2233,7 +2273,13 @@ handle_connection (void *arg) - goto cleanup; - } - -- snprintf (responseDirName, PATH_MAX, "%s/response", tmpdir); -+ retlen = snprintf (responseDirName, PATH_MAX, "%s/response", tmpdir); -+ if (retlen < 0 || retlen >= PATH_MAX) -+ { -+ server_error (_F("Error creating %s name", "response directory path")); -+ goto cleanup; -+ } -+ - rc = mkdir(responseDirName, 0700); - if (rc) - { -@@ -2243,7 +2289,12 @@ handle_connection (void *arg) - // Set this early, since it gets used for errors to be returned to the client. - stapstderr = string(responseDirName) + "/stderr"; - -- snprintf (responseFileName, PATH_MAX, "%s/response.zip", tmpdir); -+ retlen = snprintf (responseFileName, PATH_MAX, "%s/response.zip", tmpdir); -+ if (retlen < 0 || retlen >= PATH_MAX) -+ { -+ server_error (_F("Error creating %s name", "response.zip path")); -+ goto cleanup; -+ } - - /* Read data from the socket. - * If the user is requesting/requiring authentication, authenticate -diff --git a/translate.cxx b/translate.cxx -index 1240a80ec..4ade06fdd 100644 ---- a/translate.cxx -+++ b/translate.cxx -@@ -7860,7 +7860,7 @@ translate_pass (systemtap_session& s) - if (versions.size() >= 3 && s.verbose > 1) - clog << _F("ignoring extra parts of compat version: %s", s.compatible.c_str()) << endl; - } -- catch (const runtime_error) -+ catch (const runtime_error&) - { - throw SEMANTIC_ERROR(_F("parse error in compatibility version: %s", s.compatible.c_str())); - } diff --git a/sources b/sources index d9a9a8c..80e8943 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (systemtap-3.3-0.20180508git9c6ac6cda49e.tar.gz) = eeb254486ce991d2bdbbaed6b350fe28455a921134465b4a74c015c433e059d09bd945ae778da39989f12873365be54a8278e57ef6c12a3f406118b35f7738d8 +SHA512 (systemtap-3.3.tar.gz) = b75a4591bdc021645c15cb8f2b8991f46fdffb29b1d132745bafe4291aee5e1892ea9a63c8e98f011a4fee68decd99aa4401dc2f70e163e801cd140ad4cd6b6e diff --git a/systemtap.spec b/systemtap.spec index 869f4e9..94d8769 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -1,5 +1,6 @@ %{!?with_sqlite: %global with_sqlite 0%{?fedora} >= 17 || 0%{?rhel} >= 7} -%{!?with_docs: %global with_docs 1} +# prefer prebuilt docs +%{!?with_docs: %global with_docs 0} %{!?with_htmldocs: %global with_htmldocs 0} %{!?with_monitor: %global with_monitor 1} # crash is not available @@ -66,18 +67,24 @@ %define dracutstap %{_prefix}/share/dracut/modules.d/99stap %endif -%if 0%{?rhel} >= 6 +%if 0%{?rhel} == 6 || 0%{?rhel} == 7 %define dracutbindir /sbin %else %define dracutbindir %{_bindir} %endif +%if 0%{?rhel} == 6 + %{!?_rpmmacrodir: %define _rpmmacrodir /etc/rpm/} +%else + %{!?_rpmmacrodir: %define _rpmmacrodir %{_rpmconfigdir}/macros.d} +%endif + # To avoid testsuite/*/*.stp has shebang which doesn't start with '/' %undefine __brp_mangle_shebangs Name: systemtap Version: 3.3 -Release: 0.20180508git9c6ac6cda49e%{?dist} +Release: 1%{?dist} # for version, see also configure.ac @@ -112,7 +119,7 @@ Summary: Programmable system-wide instrumentation system Group: Development/System License: GPLv2+ URL: http://sourceware.org/systemtap/ -Source: %{name}-%{version}-0.20180508git9c6ac6cda49e.tar.gz +Source: ftp://sourceware.org/pub/systemtap/releases/systemtap-%{version}.tar.gz # Build* BuildRequires: gcc-c++ @@ -400,7 +407,7 @@ License: GPLv2+ URL: http://sourceware.org/systemtap/ Requires: systemtap-runtime = %{version}-%{release} Requires: byteman > 2.0 -Requires: net-tools +Requires: iproute %description runtime-java This package includes support files needed to run systemtap scripts @@ -543,7 +550,7 @@ cd .. %global docs_config --enable-docs --disable-htmldocs %endif %else -%global docs_config --disable-docs +%global docs_config --enable-docs=prebuilt %endif # Enable pie as configure defaults to disabling it @@ -634,19 +641,21 @@ install -c -m 755 stap-prep $RPM_BUILD_ROOT%{_bindir}/stap-prep # Copy over the testsuite cp -rp testsuite $RPM_BUILD_ROOT%{_datadir}/systemtap -%if %{with_docs} # We want the manuals in the special doc dir, not the generic doc install dir. # We build it in place and then move it away so it doesn't get installed # twice. rpm can specify itself where the (versioned) docs go with the # %doc directive. mkdir docs.installed mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/*.pdf docs.installed/ +%if %{with_docs} %if %{with_htmldocs} mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/tapsets docs.installed/ mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/SystemTap_Beginners_Guide docs.installed/ %endif %endif +install -D -m 644 macros.systemtap $RPM_BUILD_ROOT%{_rpmmacrodir}/macros.systemtap + mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/stap-server mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/stap-server mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/stap-server/.systemtap @@ -1071,8 +1080,8 @@ done %{_datadir}/systemtap/examples %{!?_licensedir:%global license %%doc} %license COPYING -%if %{with_docs} %doc docs.installed/*.pdf +%if %{with_docs} %if %{with_htmldocs} %doc docs.installed/tapsets/*.html %doc docs.installed/SystemTap_Beginners_Guide @@ -1117,6 +1126,7 @@ done %{_includedir}/sys/sdt.h %{_includedir}/sys/sdt-config.h %{_mandir}/man1/dtrace.1* +%{_rpmmacrodir}/macros.systemtap %doc README AUTHORS NEWS %{!?_licensedir:%global license %%doc} %license COPYING @@ -1176,32 +1186,8 @@ done # PRERELEASE %changelog -* Tue May 08 2018 Frank Ch. Eigler - 3.3-0.20180508git9c6ac6cda49e -- Automated weekly rawhide release -- Applied spec changes from upstream git - -* Fri Apr 20 2018 Mark Wielaard - 3.3-0.20180420gitd4a446c -- Automated weekly rawhide release -- Applied spec changes from upstream git - -* Fri Apr 20 2018 Mark Wielaard - 3.3-0.20180420gitd4a446c -- Automated weekly rawhide release -- Applied spec changes from upstream git - -* Thu Mar 15 2018 Frank Ch. Eigler - 3.3-0.20180315gitc2585f2b58cd -- Automated weekly rawhide release -- Applied spec changes from upstream git - -* Thu Mar 15 2018 Frank Ch. Eigler - 3.3-0.20180315gitc2585f2b58cd -- Automated weekly rawhide release -- Applied spec changes from upstream git - -* Tue Mar 06 2018 Björn Esser - 3.3-0.20180223git5ef0c24456e3 -- Rebuilt for libjson-c.so.4 (json-c v0.13.1) - -* Thu Feb 22 2018 Frank Ch. Eigler - 3.3-0.20180222git5ef0c24456e3 -- Automated weekly rawhide release -- Applied spec changes from upstream git +* Thu Jun 07 2018 Frank Ch. Eigler - 3.3-1 +- Upstream release. * Wed Oct 18 2017 Frank Ch. Eigler - 3.2-1 - Upstream release. From 4919b3de2d2e6cff16e058d70e70eccf6b462af6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 19 Jun 2018 11:28:14 +0200 Subject: [PATCH 2/6] Rebuilt for Python 3.7 --- systemtap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/systemtap.spec b/systemtap.spec index 94d8769..5c1c073 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -84,7 +84,7 @@ Name: systemtap Version: 3.3 -Release: 1%{?dist} +Release: 2%{?dist} # for version, see also configure.ac @@ -1186,6 +1186,9 @@ done # PRERELEASE %changelog +* Tue Jun 19 2018 Miro Hrončok - 3.3-2 +- Rebuilt for Python 3.7 + * Thu Jun 07 2018 Frank Ch. Eigler - 3.3-1 - Upstream release. From b24274bf9771ed60a5835fc16f899dd967a62033 Mon Sep 17 00:00:00 2001 From: Jason Tibbitts Date: Tue, 10 Jul 2018 01:33:29 -0500 Subject: [PATCH 3/6] Remove needless use of %defattr --- systemtap.spec | 6 ------ 1 file changed, 6 deletions(-) diff --git a/systemtap.spec b/systemtap.spec index 5c1c073..ed6572c 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -966,7 +966,6 @@ done # The master "systemtap" rpm doesn't include any files. %files server -f systemtap.lang -%defattr(-,root,root) %{_bindir}/stap-server %dir %{_libexecdir}/systemtap %{_libexecdir}/systemtap/stap-serverd @@ -1039,7 +1038,6 @@ done %files runtime -f systemtap.lang -%defattr(-,root,root) %attr(4110,root,stapusr) %{_bindir}/staprun %{_bindir}/stapsh %{_bindir}/stap-merge @@ -1075,7 +1073,6 @@ done %files client -f systemtap.lang -%defattr(-,root,root) %doc README README.unprivileged AUTHORS NEWS %{_datadir}/systemtap/examples %{!?_licensedir:%global license %%doc} @@ -1105,7 +1102,6 @@ done %files initscript -%defattr(-,root,root) %{initdir}/systemtap %dir %{_sysconfdir}/systemtap %dir %{_sysconfdir}/systemtap/conf.d @@ -1121,7 +1117,6 @@ done %files sdt-devel -%defattr(-,root,root) %{_bindir}/dtrace %{_includedir}/sys/sdt.h %{_includedir}/sys/sdt-config.h @@ -1133,7 +1128,6 @@ done %files testsuite -%defattr(-,root,root) %dir %{_datadir}/systemtap %{_datadir}/systemtap/testsuite From fe71a913bf92ad60910e26a3c2686a76d38b4442 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 14 Jul 2018 07:12:48 +0000 Subject: [PATCH 4/6] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- systemtap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/systemtap.spec b/systemtap.spec index ed6572c..a753b25 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -84,7 +84,7 @@ Name: systemtap Version: 3.3 -Release: 2%{?dist} +Release: 3%{?dist} # for version, see also configure.ac @@ -1180,6 +1180,9 @@ done # PRERELEASE %changelog +* Sat Jul 14 2018 Fedora Release Engineering - 3.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Tue Jun 19 2018 Miro Hrončok - 3.3-2 - Rebuilt for Python 3.7 From 6c9283129e5086d9cf02228961f75ccabdac7522 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 30 Jul 2018 00:22:25 +0200 Subject: [PATCH 5/6] =?UTF-8?q?%{python=5Fsitearch}=20=E2=86=92=20%{python?= =?UTF-8?q?2=5Fsitearch}?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Igor Gnatenko --- systemtap.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/systemtap.spec b/systemtap.spec index a753b25..8a1a2c3 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -1142,8 +1142,8 @@ done %if %{with_python2_probes} %files runtime-python2 -%{python_sitearch}/HelperSDT -%{python_sitearch}/HelperSDT-*.egg-info +%{python2_sitearch}/HelperSDT +%{python2_sitearch}/HelperSDT-*.egg-info %endif %if %{with_python3_probes} %files runtime-python3 From d4c7fab7e033c600682642d1a55b90ae05e6461b Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Fri, 10 Aug 2018 15:35:12 -0400 Subject: [PATCH 6/6] Automated weekly systemtap rawhide release: 0.20180810git --- .gitignore | 1 + sources | 2 +- systemtap.spec | 112 +++++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 102 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index f2cefbd..e371862 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /systemtap-3.3-0.20180420gitd4a446c.tar.gz /systemtap-3.3-0.20180508git9c6ac6cda49e.tar.gz /systemtap-3.3.tar.gz +/systemtap-4.0-0.20180810git.tar.gz diff --git a/sources b/sources index 80e8943..aea2955 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (systemtap-3.3.tar.gz) = b75a4591bdc021645c15cb8f2b8991f46fdffb29b1d132745bafe4291aee5e1892ea9a63c8e98f011a4fee68decd99aa4401dc2f70e163e801cd140ad4cd6b6e +SHA512 (systemtap-4.0-0.20180810git.tar.gz) = 39ec6621f9e8c768f2922f0ebd8fe074c19b09036f0744d2b64a30e44fe6be1d2f1181149d7c226d7b76c4fa95d0d31ba4ae899089dc3d578b2e78e7f28424e2 diff --git a/systemtap.spec b/systemtap.spec index 8a1a2c3..cb7385e 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -83,8 +83,8 @@ %undefine __brp_mangle_shebangs Name: systemtap -Version: 3.3 -Release: 3%{?dist} +Version: 4.0 +Release: 0.20180810git%{?dist} # for version, see also configure.ac @@ -119,7 +119,7 @@ Summary: Programmable system-wide instrumentation system Group: Development/System License: GPLv2+ URL: http://sourceware.org/systemtap/ -Source: ftp://sourceware.org/pub/systemtap/releases/systemtap-%{version}.tar.gz +Source: %{name}-%{version}-0.20180810git.tar.gz # Build* BuildRequires: gcc-c++ @@ -224,19 +224,23 @@ Group: Development/System License: GPLv2+ URL: http://sourceware.org/systemtap/ Requires: systemtap-devel = %{version}-%{release} +Conflicts: systemtap-devel < %{version}-%{release} +Conflicts: systemtap-runtime < %{version}-%{release} +Conflicts: systemtap-client < %{version}-%{release} Requires: nss coreutils Requires: zip unzip Requires(pre): shadow-utils Requires(post): chkconfig Requires(preun): chkconfig -Requires(preun): initscripts -Requires(postun): initscripts BuildRequires: nss-devel avahi-devel %if %{with_openssl} Requires: openssl %endif %if %{with_systemd} Requires: systemd +%else +Requires(preun): initscripts +Requires(postun): initscripts %endif %description server @@ -256,6 +260,9 @@ URL: http://sourceware.org/systemtap/ Requires: kernel-devel-uname-r %{?fedora:Suggests: kernel-devel} Requires: gcc make +Conflicts: systemtap-client < %{version}-%{release} +Conflicts: systemtap-server < %{version}-%{release} +Conflicts: systemtap-runtime < %{version}-%{release} # Suggest: kernel-debuginfo %description devel @@ -273,6 +280,9 @@ Group: Development/System License: GPLv2+ URL: http://sourceware.org/systemtap/ Requires(pre): shadow-utils +Conflicts: systemtap-devel < %{version}-%{release} +Conflicts: systemtap-server < %{version}-%{release} +Conflicts: systemtap-client < %{version}-%{release} %description runtime SystemTap runtime contains the components needed to execute @@ -289,6 +299,9 @@ Requires: zip unzip Requires: systemtap-runtime = %{version}-%{release} Requires: coreutils grep sed unzip zip Requires: openssh-clients +Conflicts: systemtap-devel < %{version}-%{release} +Conflicts: systemtap-server < %{version}-%{release} +Conflicts: systemtap-runtime < %{version}-%{release} %if %{with_mokutil} Requires: mokutil %endif @@ -309,8 +322,12 @@ URL: http://sourceware.org/systemtap/ Requires: systemtap = %{version}-%{release} Requires(post): chkconfig Requires(preun): chkconfig +%if %{with_systemd} +Requires: systemd +%else Requires(preun): initscripts Requires(postun): initscripts +%endif %description initscript This package includes a SysVinit script to launch selected systemtap @@ -411,8 +428,7 @@ Requires: iproute %description runtime-java This package includes support files needed to run systemtap scripts -that probe Java processes running on the OpenJDK 1.6 and OpenJDK 1.7 -runtimes using Byteman. +that probe Java processes running on the OpenJDK runtimes using Byteman. %endif %if %{with_python2_probes} @@ -446,6 +462,20 @@ This package includes support files needed to run systemtap scripts that probe python 3 processes. %endif +%if %{with_python3} +%package stap-exporter +Summary: Systemtap-prometheus interoperation mechanism +Group: Development/System +License: GPLv2+ +URL: http://sourceware.org/systemtap/ +Requires: systemtap-runtime = %{version}-%{release} + +%description stap-exporter +This package includes files for a systemd service that manages +systemtap sessions and relays prometheus metrics from the sessions +to remote requesters on demand. +%endif + %if %{with_virthost} %package runtime-virthost Summary: Systemtap Cross-VM Instrumentation - host @@ -601,10 +631,16 @@ cd .. %global httpd_config --disable-httpd %endif +%if %{with_bpf} +%global bpf_config --with-bpf +%else +%global bpf_config --without-bpf +%endif + # We don't ship compileworthy python code, just oddball samples %global py_auto_byte_compile 0 -%configure %{?elfutils_config} %{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} --disable-silent-rules --with-extra-version="rpm %{version}-%{release}" +%configure %{?elfutils_config} %{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}" make %{?_smp_mflags} %if %{with_emacsvim} @@ -665,12 +701,27 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/systemtap mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/systemtap mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d install -m 644 initscript/logrotate.stap-server $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/stap-server + +# If using systemd systemtap.service file, retain the old init script in %{_libexecdir} as a helper. +%if %{with_systemd} +mkdir -p $RPM_BUILD_ROOT%{_unitdir} +touch $RPM_BUILD_ROOT%{_unitdir}/systemtap.service +install -m 644 initscript/systemtap.service $RPM_BUILD_ROOT%{_unitdir}/systemtap.service +mkdir -p $RPM_BUILD_ROOT%{_sbindir} +install -m 755 initscript/systemtap $RPM_BUILD_ROOT%{_sbindir}/systemtap-service +%else mkdir -p $RPM_BUILD_ROOT%{initdir} install -m 755 initscript/systemtap $RPM_BUILD_ROOT%{initdir} +mkdir -p $RPM_BUILD_ROOT%{_sbindir} +ln -sf %{initdir}/systemtap $RPM_BUILD_ROOT%{_sbindir}/systemtap-service +# TODO CHECK CORRECTNESS: symlink %{_sbindir}/systemtap-service to %{initdir}/systemtap +%endif + mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/conf.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/script.d install -m 644 initscript/config.systemtap $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/config + %if %{with_systemd} mkdir -p $RPM_BUILD_ROOT%{_unitdir} touch $RPM_BUILD_ROOT%{_unitdir}/stap-server.service @@ -723,6 +774,13 @@ done touch $RPM_BUILD_ROOT%{dracutstap}/params.conf %endif +%if %{with_python3} + mkdir -p $RPM_BUILD_ROOT/stap-exporter + install -p -m 755 stap-exporter/stap-exporter $RPM_BUILD_ROOT%{_bindir} + 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 +%endif + %pre runtime 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 @@ -898,6 +956,13 @@ if [ "$1" -ge "1" ]; then fi exit 0 +%if %{with_python3} +%preun stap-exporter +/bin/systemctl stop stap-exporter.service >/dev/null 2>&1 || : +/bin/systemctl disable stap-exporter.service >/dev/null 2>&1 || : +%endif + + %post # Remove any previously-built uprobes.ko materials (make -C %{_datadir}/systemtap/runtime/uprobes clean) >/dev/null 2>&1 || true @@ -962,10 +1027,11 @@ done # ------------------------------------------------------------------------ -%files -f systemtap.lang +%files # The master "systemtap" rpm doesn't include any files. %files server -f systemtap.lang +%defattr(-,root,root) %{_bindir}/stap-server %dir %{_libexecdir}/systemtap %{_libexecdir}/systemtap/stap-serverd @@ -1038,6 +1104,7 @@ done %files runtime -f systemtap.lang +%defattr(-,root,root) %attr(4110,root,stapusr) %{_bindir}/staprun %{_bindir}/stapsh %{_bindir}/stap-merge @@ -1073,6 +1140,7 @@ done %files client -f systemtap.lang +%defattr(-,root,root) %doc README README.unprivileged AUTHORS NEWS %{_datadir}/systemtap/examples %{!?_licensedir:%global license %%doc} @@ -1102,14 +1170,21 @@ done %files initscript +%defattr(-,root,root) +%if %{with_systemd} +%{_unitdir}/systemtap.service +%{_sbindir}/systemtap-service +%else %{initdir}/systemtap +%{_sbindir}/systemtap-service +%endif %dir %{_sysconfdir}/systemtap %dir %{_sysconfdir}/systemtap/conf.d %dir %{_sysconfdir}/systemtap/script.d %config(noreplace) %{_sysconfdir}/systemtap/config %dir %{_localstatedir}/cache/systemtap %ghost %{_localstatedir}/run/systemtap -%{_mandir}/man8/systemtap.8* +%{_mandir}/man8/systemtap-service.8* %if %{with_dracut} %dir %{dracutstap} %{dracutstap}/* @@ -1117,6 +1192,7 @@ done %files sdt-devel +%defattr(-,root,root) %{_bindir}/dtrace %{_includedir}/sys/sdt.h %{_includedir}/sys/sdt-config.h @@ -1128,6 +1204,7 @@ done %files testsuite +%defattr(-,root,root) %dir %{_datadir}/systemtap %{_datadir}/systemtap/testsuite @@ -1142,8 +1219,8 @@ done %if %{with_python2_probes} %files runtime-python2 -%{python2_sitearch}/HelperSDT -%{python2_sitearch}/HelperSDT-*.egg-info +%{python_sitearch}/HelperSDT +%{python_sitearch}/HelperSDT-*.egg-info %endif %if %{with_python3_probes} %files runtime-python3 @@ -1171,6 +1248,13 @@ done %endif %endif +%if %{with_python3} +%files stap-exporter +%{_unitdir}/stap-exporter.service +%{_mandir}/man8/stap-exporter.8* +%{_bindir}/stap-exporter +%endif + # ------------------------------------------------------------------------ # Future new-release entries should be of the form @@ -1180,6 +1264,10 @@ done # PRERELEASE %changelog +* Fri Aug 10 2018 Frank Ch. Eigler - 4.0-0.20180810git +- Automated weekly rawhide release +- Applied spec changes from upstream git + * Sat Jul 14 2018 Fedora Release Engineering - 3.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild