Merge remote-tracking branch 'up/f29' into f29-riscv64

Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
This commit is contained in:
David Abdurachmanov 2018-09-10 22:37:41 +02:00
commit 6005938e18
Signed by: davidlt
GPG Key ID: 7108702C938B13C1
5 changed files with 116 additions and 297 deletions

2
.gitignore vendored
View File

@ -8,3 +8,5 @@
/systemtap-3.3-0.20180315gitc2585f2b58cd.tar.gz /systemtap-3.3-0.20180315gitc2585f2b58cd.tar.gz
/systemtap-3.3-0.20180420gitd4a446c.tar.gz /systemtap-3.3-0.20180420gitd4a446c.tar.gz
/systemtap-3.3-0.20180508git9c6ac6cda49e.tar.gz /systemtap-3.3-0.20180508git9c6ac6cda49e.tar.gz
/systemtap-3.3.tar.gz
/systemtap-4.0-0.20180810git.tar.gz

View File

@ -1,49 +0,0 @@
commit 9f81f10b0caf6dfc49c4b7ceb7902f45d37b532a (HEAD -> master, origin/master, origin/HEAD)
Author: Frank Ch. Eigler <fche@redhat.com>
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 {

View File

@ -1,208 +0,0 @@
commit a8e317b60 (HEAD -> master, origin/master, origin/HEAD)
Author: Stan Cox <scox@redhat.com>
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 <wcohen.redhat.com>
* 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<T> { static const bool __sdt_signed = true; };
-#define __SDT_COND_SIGNED(T) \
-template<> struct __sdt_type<T> { static const bool __sdt_signed = ((T)(-1) < 1); };
+#define __SDT_COND_SIGNED(T,CT) \
+template<> struct __sdt_type<T> { 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<string> 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()));
}

View File

@ -1 +1 @@
SHA512 (systemtap-3.3-0.20180508git9c6ac6cda49e.tar.gz) = eeb254486ce991d2bdbbaed6b350fe28455a921134465b4a74c015c433e059d09bd945ae778da39989f12873365be54a8278e57ef6c12a3f406118b35f7738d8 SHA512 (systemtap-4.0-0.20180810git.tar.gz) = 39ec6621f9e8c768f2922f0ebd8fe074c19b09036f0744d2b64a30e44fe6be1d2f1181149d7c226d7b76c4fa95d0d31ba4ae899089dc3d578b2e78e7f28424e2

View File

@ -1,5 +1,6 @@
%{!?with_sqlite: %global with_sqlite 0%{?fedora} >= 17 || 0%{?rhel} >= 7} %{!?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_htmldocs: %global with_htmldocs 0}
%{!?with_monitor: %global with_monitor 1} %{!?with_monitor: %global with_monitor 1}
# crash is not available # crash is not available
@ -66,18 +67,24 @@
%define dracutstap %{_prefix}/share/dracut/modules.d/99stap %define dracutstap %{_prefix}/share/dracut/modules.d/99stap
%endif %endif
%if 0%{?rhel} >= 6 %if 0%{?rhel} == 6 || 0%{?rhel} == 7
%define dracutbindir /sbin %define dracutbindir /sbin
%else %else
%define dracutbindir %{_bindir} %define dracutbindir %{_bindir}
%endif %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 '/' # To avoid testsuite/*/*.stp has shebang which doesn't start with '/'
%undefine __brp_mangle_shebangs %undefine __brp_mangle_shebangs
Name: systemtap Name: systemtap
Version: 3.3 Version: 4.0
Release: 0.20180508git9c6ac6cda49e.0.riscv64%{?dist} Release: 0.20180810git.0.riscv64%{?dist}
# for version, see also configure.ac # for version, see also configure.ac
@ -112,7 +119,7 @@ Summary: Programmable system-wide instrumentation system
Group: Development/System Group: Development/System
License: GPLv2+ License: GPLv2+
URL: http://sourceware.org/systemtap/ URL: http://sourceware.org/systemtap/
Source: %{name}-%{version}-0.20180508git9c6ac6cda49e.tar.gz Source: %{name}-%{version}-0.20180810git.tar.gz
# Build* # Build*
BuildRequires: gcc-c++ BuildRequires: gcc-c++
@ -217,19 +224,23 @@ Group: Development/System
License: GPLv2+ License: GPLv2+
URL: http://sourceware.org/systemtap/ URL: http://sourceware.org/systemtap/
Requires: systemtap-devel = %{version}-%{release} Requires: systemtap-devel = %{version}-%{release}
Conflicts: systemtap-devel < %{version}-%{release}
Conflicts: systemtap-runtime < %{version}-%{release}
Conflicts: systemtap-client < %{version}-%{release}
Requires: nss coreutils Requires: nss coreutils
Requires: zip unzip Requires: zip unzip
Requires(pre): shadow-utils Requires(pre): shadow-utils
Requires(post): chkconfig Requires(post): chkconfig
Requires(preun): chkconfig Requires(preun): chkconfig
Requires(preun): initscripts
Requires(postun): initscripts
BuildRequires: nss-devel avahi-devel BuildRequires: nss-devel avahi-devel
%if %{with_openssl} %if %{with_openssl}
Requires: openssl Requires: openssl
%endif %endif
%if %{with_systemd} %if %{with_systemd}
Requires: systemd Requires: systemd
%else
Requires(preun): initscripts
Requires(postun): initscripts
%endif %endif
%description server %description server
@ -251,6 +262,9 @@ Requires: kernel-devel-uname-r
%endif %endif
%{?fedora:Suggests: kernel-devel} %{?fedora:Suggests: kernel-devel}
Requires: gcc make Requires: gcc make
Conflicts: systemtap-client < %{version}-%{release}
Conflicts: systemtap-server < %{version}-%{release}
Conflicts: systemtap-runtime < %{version}-%{release}
# Suggest: kernel-debuginfo # Suggest: kernel-debuginfo
%description devel %description devel
@ -268,6 +282,9 @@ Group: Development/System
License: GPLv2+ License: GPLv2+
URL: http://sourceware.org/systemtap/ URL: http://sourceware.org/systemtap/
Requires(pre): shadow-utils Requires(pre): shadow-utils
Conflicts: systemtap-devel < %{version}-%{release}
Conflicts: systemtap-server < %{version}-%{release}
Conflicts: systemtap-client < %{version}-%{release}
%description runtime %description runtime
SystemTap runtime contains the components needed to execute SystemTap runtime contains the components needed to execute
@ -284,6 +301,9 @@ Requires: zip unzip
Requires: systemtap-runtime = %{version}-%{release} Requires: systemtap-runtime = %{version}-%{release}
Requires: coreutils grep sed unzip zip Requires: coreutils grep sed unzip zip
Requires: openssh-clients Requires: openssh-clients
Conflicts: systemtap-devel < %{version}-%{release}
Conflicts: systemtap-server < %{version}-%{release}
Conflicts: systemtap-runtime < %{version}-%{release}
%if %{with_mokutil} %if %{with_mokutil}
Requires: mokutil Requires: mokutil
%endif %endif
@ -304,8 +324,12 @@ URL: http://sourceware.org/systemtap/
Requires: systemtap = %{version}-%{release} Requires: systemtap = %{version}-%{release}
Requires(post): chkconfig Requires(post): chkconfig
Requires(preun): chkconfig Requires(preun): chkconfig
%if %{with_systemd}
Requires: systemd
%else
Requires(preun): initscripts Requires(preun): initscripts
Requires(postun): initscripts Requires(postun): initscripts
%endif
%description initscript %description initscript
This package includes a SysVinit script to launch selected systemtap This package includes a SysVinit script to launch selected systemtap
@ -402,12 +426,11 @@ License: GPLv2+
URL: http://sourceware.org/systemtap/ URL: http://sourceware.org/systemtap/
Requires: systemtap-runtime = %{version}-%{release} Requires: systemtap-runtime = %{version}-%{release}
Requires: byteman > 2.0 Requires: byteman > 2.0
Requires: net-tools Requires: iproute
%description runtime-java %description runtime-java
This package includes support files needed to run systemtap scripts This package includes support files needed to run systemtap scripts
that probe Java processes running on the OpenJDK 1.6 and OpenJDK 1.7 that probe Java processes running on the OpenJDK runtimes using Byteman.
runtimes using Byteman.
%endif %endif
%if %{with_python2_probes} %if %{with_python2_probes}
@ -441,6 +464,20 @@ This package includes support files needed to run systemtap scripts
that probe python 3 processes. that probe python 3 processes.
%endif %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} %if %{with_virthost}
%package runtime-virthost %package runtime-virthost
Summary: Systemtap Cross-VM Instrumentation - host Summary: Systemtap Cross-VM Instrumentation - host
@ -545,7 +582,7 @@ cd ..
%global docs_config --enable-docs --disable-htmldocs %global docs_config --enable-docs --disable-htmldocs
%endif %endif
%else %else
%global docs_config --disable-docs %global docs_config --enable-docs=prebuilt
%endif %endif
# Enable pie as configure defaults to disabling it # Enable pie as configure defaults to disabling it
@ -596,10 +633,16 @@ cd ..
%global httpd_config --disable-httpd %global httpd_config --disable-httpd
%endif %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 # We don't ship compileworthy python code, just oddball samples
%global py_auto_byte_compile 0 %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} make %{?_smp_mflags}
%if %{with_emacsvim} %if %{with_emacsvim}
@ -636,19 +679,21 @@ install -c -m 755 stap-prep $RPM_BUILD_ROOT%{_bindir}/stap-prep
# Copy over the testsuite # Copy over the testsuite
cp -rp testsuite $RPM_BUILD_ROOT%{_datadir}/systemtap 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 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 # 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 # twice. rpm can specify itself where the (versioned) docs go with the
# %doc directive. # %doc directive.
mkdir docs.installed mkdir docs.installed
mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/*.pdf docs.installed/ mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/*.pdf docs.installed/
%if %{with_docs}
%if %{with_htmldocs} %if %{with_htmldocs}
mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/tapsets docs.installed/ mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/tapsets docs.installed/
mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/SystemTap_Beginners_Guide docs.installed/ mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/SystemTap_Beginners_Guide docs.installed/
%endif %endif
%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%{_sysconfdir}/stap-server
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/stap-server mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/stap-server
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/stap-server/.systemtap mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/stap-server/.systemtap
@ -658,12 +703,27 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/systemtap
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/systemtap mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/systemtap
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
install -m 644 initscript/logrotate.stap-server $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/stap-server 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} mkdir -p $RPM_BUILD_ROOT%{initdir}
install -m 755 initscript/systemtap $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
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/conf.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/conf.d
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/script.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/script.d
install -m 644 initscript/config.systemtap $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/config install -m 644 initscript/config.systemtap $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/config
%if %{with_systemd} %if %{with_systemd}
mkdir -p $RPM_BUILD_ROOT%{_unitdir} mkdir -p $RPM_BUILD_ROOT%{_unitdir}
touch $RPM_BUILD_ROOT%{_unitdir}/stap-server.service touch $RPM_BUILD_ROOT%{_unitdir}/stap-server.service
@ -716,6 +776,13 @@ done
touch $RPM_BUILD_ROOT%{dracutstap}/params.conf touch $RPM_BUILD_ROOT%{dracutstap}/params.conf
%endif %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 %pre runtime
getent group stapusr >/dev/null || groupadd -g 156 -r stapusr 2>/dev/null || groupadd -r stapusr getent group stapusr >/dev/null || groupadd -g 156 -r stapusr 2>/dev/null || groupadd -r stapusr
getent group stapsys >/dev/null || groupadd -g 157 -r stapsys 2>/dev/null || groupadd -r stapsys getent group stapsys >/dev/null || groupadd -g 157 -r stapsys 2>/dev/null || groupadd -r stapsys
@ -891,6 +958,13 @@ if [ "$1" -ge "1" ]; then
fi fi
exit 0 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 %post
# Remove any previously-built uprobes.ko materials # Remove any previously-built uprobes.ko materials
(make -C %{_datadir}/systemtap/runtime/uprobes clean) >/dev/null 2>&1 || true (make -C %{_datadir}/systemtap/runtime/uprobes clean) >/dev/null 2>&1 || true
@ -955,7 +1029,7 @@ done
# ------------------------------------------------------------------------ # ------------------------------------------------------------------------
%files -f systemtap.lang %files
# The master "systemtap" rpm doesn't include any files. # The master "systemtap" rpm doesn't include any files.
%files server -f systemtap.lang %files server -f systemtap.lang
@ -1073,8 +1147,8 @@ done
%{_datadir}/systemtap/examples %{_datadir}/systemtap/examples
%{!?_licensedir:%global license %%doc} %{!?_licensedir:%global license %%doc}
%license COPYING %license COPYING
%if %{with_docs}
%doc docs.installed/*.pdf %doc docs.installed/*.pdf
%if %{with_docs}
%if %{with_htmldocs} %if %{with_htmldocs}
%doc docs.installed/tapsets/*.html %doc docs.installed/tapsets/*.html
%doc docs.installed/SystemTap_Beginners_Guide %doc docs.installed/SystemTap_Beginners_Guide
@ -1099,14 +1173,20 @@ done
%files initscript %files initscript
%defattr(-,root,root) %defattr(-,root,root)
%if %{with_systemd}
%{_unitdir}/systemtap.service
%{_sbindir}/systemtap-service
%else
%{initdir}/systemtap %{initdir}/systemtap
%{_sbindir}/systemtap-service
%endif
%dir %{_sysconfdir}/systemtap %dir %{_sysconfdir}/systemtap
%dir %{_sysconfdir}/systemtap/conf.d %dir %{_sysconfdir}/systemtap/conf.d
%dir %{_sysconfdir}/systemtap/script.d %dir %{_sysconfdir}/systemtap/script.d
%config(noreplace) %{_sysconfdir}/systemtap/config %config(noreplace) %{_sysconfdir}/systemtap/config
%dir %{_localstatedir}/cache/systemtap %dir %{_localstatedir}/cache/systemtap
%ghost %{_localstatedir}/run/systemtap %ghost %{_localstatedir}/run/systemtap
%{_mandir}/man8/systemtap.8* %{_mandir}/man8/systemtap-service.8*
%if %{with_dracut} %if %{with_dracut}
%dir %{dracutstap} %dir %{dracutstap}
%{dracutstap}/* %{dracutstap}/*
@ -1119,6 +1199,7 @@ done
%{_includedir}/sys/sdt.h %{_includedir}/sys/sdt.h
%{_includedir}/sys/sdt-config.h %{_includedir}/sys/sdt-config.h
%{_mandir}/man1/dtrace.1* %{_mandir}/man1/dtrace.1*
%{_rpmmacrodir}/macros.systemtap
%doc README AUTHORS NEWS %doc README AUTHORS NEWS
%{!?_licensedir:%global license %%doc} %{!?_licensedir:%global license %%doc}
%license COPYING %license COPYING
@ -1169,6 +1250,13 @@ done
%endif %endif
%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 # Future new-release entries should be of the form
@ -1178,35 +1266,21 @@ done
# PRERELEASE # PRERELEASE
%changelog %changelog
* Thu May 10 2018 David Abdurachmanov <david.abdurachmanov@gmail.com> - 3.3-0.20180508git9c6ac6cda49e.0.riscv64 * Mon Sep 10 2018 David Abdurachmanov <david.abdurachmanov@gmail.com> - 4.0-0.20180810git.0.riscv64
- Add support for riscv64 - Add support for RISC-V (riscv64)
* Tue May 08 2018 Frank Ch. Eigler <fche@redhat.com> - 3.3-0.20180508git9c6ac6cda49e * Fri Aug 10 2018 Frank Ch. Eigler <fche@redhat.com> - 4.0-0.20180810git
- Automated weekly rawhide release - Automated weekly rawhide release
- Applied spec changes from upstream git - Applied spec changes from upstream git
* Fri Apr 20 2018 Mark Wielaard <mark@klomp.org> - 3.3-0.20180420gitd4a446c * Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-3
- Automated weekly rawhide release - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
- Applied spec changes from upstream git
* Fri Apr 20 2018 Mark Wielaard <mark@klomp.org> - 3.3-0.20180420gitd4a446c * Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 3.3-2
- Automated weekly rawhide release - Rebuilt for Python 3.7
- Applied spec changes from upstream git
* Thu Mar 15 2018 Frank Ch. Eigler <fche@redhat.com> - 3.3-0.20180315gitc2585f2b58cd * Thu Jun 07 2018 Frank Ch. Eigler <fche@redhat.com> - 3.3-1
- Automated weekly rawhide release - Upstream release.
- Applied spec changes from upstream git
* Thu Mar 15 2018 Frank Ch. Eigler <fche@redhat.com> - 3.3-0.20180315gitc2585f2b58cd
- Automated weekly rawhide release
- Applied spec changes from upstream git
* Tue Mar 06 2018 Björn Esser <besser82@fedoraproject.org> - 3.3-0.20180223git5ef0c24456e3
- Rebuilt for libjson-c.so.4 (json-c v0.13.1)
* Thu Feb 22 2018 Frank Ch. Eigler <fche@redhat.com> - 3.3-0.20180222git5ef0c24456e3
- Automated weekly rawhide release
- Applied spec changes from upstream git
* Wed Oct 18 2017 Frank Ch. Eigler <fche@redhat.com> - 3.2-1 * Wed Oct 18 2017 Frank Ch. Eigler <fche@redhat.com> - 3.2-1
- Upstream release. - Upstream release.