systemtap: update to 4.9.
This commit is contained in:
parent
68b7a41def
commit
1b736b40a1
127
srcpkgs/systemtap/patches/fix-musl.patch
Normal file
127
srcpkgs/systemtap/patches/fix-musl.patch
Normal file
@ -0,0 +1,127 @@
|
||||
diff --git a/buildrun.cxx b/buildrun.cxx
|
||||
index 0048d07..904ce47 100644
|
||||
--- a/buildrun.cxx
|
||||
+++ b/buildrun.cxx
|
||||
@@ -29,6 +29,7 @@ extern "C" {
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <sys/resource.h>
|
||||
+#include "gnu_basename.h"
|
||||
}
|
||||
|
||||
// A bit of obfuscation for Gentoo's sake.
|
||||
@@ -943,7 +944,7 @@ make_kernel_run_command (systemtap_session& s, const string& remotedir,
|
||||
if (remotedir.empty())
|
||||
opt_u.append(s.uprobes_path);
|
||||
else
|
||||
- opt_u.append(remotedir + "/" + basename(s.uprobes_path.c_str()));
|
||||
+ opt_u.append(remotedir + "/" + gnu_basename(s.uprobes_path.c_str()));
|
||||
}
|
||||
cmd.push_back(opt_u);
|
||||
}
|
||||
diff --git a/client-http.cxx b/client-http.cxx
|
||||
index fca7362..d6096b9 100644
|
||||
--- a/client-http.cxx
|
||||
+++ b/client-http.cxx
|
||||
@@ -38,6 +38,7 @@ extern "C" {
|
||||
#include <elfutils/libdw.h>
|
||||
#include <fcntl.h>
|
||||
#include <nss3/nss.h>
|
||||
+#include <paths.h>
|
||||
|
||||
#ifdef HAVE_RPMCRYPTO_H
|
||||
#include <rpm/rpmcrypto.h>
|
||||
@@ -1016,7 +1017,7 @@ http_client_backend::include_file_or_directory (const string &subdir,
|
||||
|
||||
// Canonicalize the given path and remove the leading /.
|
||||
string rpath;
|
||||
- char *cpath = canonicalize_file_name (path.c_str ());
|
||||
+ char *cpath = realpath (path.c_str (), NULL);
|
||||
if (! cpath)
|
||||
{
|
||||
// It can not be canonicalized. Use the name relative to
|
||||
diff --git a/client-nss.cxx b/client-nss.cxx
|
||||
index 55266fe..a775ed1 100644
|
||||
--- a/client-nss.cxx
|
||||
+++ b/client-nss.cxx
|
||||
@@ -576,7 +576,7 @@ nss_client_backend::include_file_or_directory (const string &subdir,
|
||||
|
||||
// Canonicalize the given path and remove the leading /.
|
||||
string rpath;
|
||||
- char *cpath = canonicalize_file_name (path.c_str ());
|
||||
+ char *cpath = realpath (path.c_str (), NULL);
|
||||
if (! cpath)
|
||||
{
|
||||
// It can not be canonicalized. Use the name relative to
|
||||
diff --git a/gnu_basename.h b/gnu_basename.h
|
||||
new file mode 100644
|
||||
index 0000000..dce5f19
|
||||
--- /dev/null
|
||||
+++ b/gnu_basename.h
|
||||
@@ -0,0 +1,12 @@
|
||||
+#ifndef GNU_BASENAME_H
|
||||
+#define GNU_BASENAME_H
|
||||
+
|
||||
+#include <string.h>
|
||||
+
|
||||
+#if defined(__GLIBC__)
|
||||
+#define gnu_basename(src) basename(src)
|
||||
+#else
|
||||
+#define gnu_basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src)
|
||||
+#endif
|
||||
+
|
||||
+#endif
|
||||
diff --git a/remote.cxx b/remote.cxx
|
||||
index bffeaa9..bd6c7c4 100644
|
||||
--- a/remote.cxx
|
||||
+++ b/remote.cxx
|
||||
@@ -16,6 +16,7 @@ extern "C" {
|
||||
#include <unistd.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
+#include "gnu_basename.h"
|
||||
}
|
||||
|
||||
#include <cstdio>
|
||||
@@ -472,7 +473,7 @@ class stapsh : public remote {
|
||||
|
||||
if (!s->uprobes_path.empty())
|
||||
{
|
||||
- string remoteuprobes = basename(s->uprobes_path.c_str());
|
||||
+ string remoteuprobes = gnu_basename(s->uprobes_path.c_str());
|
||||
if ((rc = send_file(s->uprobes_path, remoteuprobes)))
|
||||
return rc;
|
||||
|
||||
diff --git a/session.cxx b/session.cxx
|
||||
index a22baab..77eedf9 100644
|
||||
--- a/session.cxx
|
||||
+++ b/session.cxx
|
||||
@@ -42,6 +42,7 @@ extern "C" {
|
||||
#include <unistd.h>
|
||||
#include <sys/wait.h>
|
||||
#include <wordexp.h>
|
||||
+#include <paths.h>
|
||||
}
|
||||
|
||||
#if HAVE_NSS
|
||||
@@ -1537,7 +1538,7 @@ systemtap_session::parse_cmdline (int argc, char * const argv [])
|
||||
} else {
|
||||
char *spath;
|
||||
assert(optarg);
|
||||
- spath = canonicalize_file_name (optarg);
|
||||
+ spath = realpath (optarg, NULL);
|
||||
if (spath == NULL) {
|
||||
cerr << _F("ERROR: %s is an invalid directory for --sysroot", optarg) << endl;
|
||||
return 1;
|
||||
diff --git a/util.h b/util.h
|
||||
index c708aa6..ef4a6fe 100644
|
||||
--- a/util.h
|
||||
+++ b/util.h
|
||||
@@ -27,6 +27,7 @@ extern "C" {
|
||||
#include <spawn.h>
|
||||
#include <assert.h>
|
||||
#include <poll.h>
|
||||
+#include <unistd.h>
|
||||
}
|
||||
|
||||
// Sanity check C++11 support. We're only requiring GCC 4.4's level of
|
@ -1,8 +1,7 @@
|
||||
# Template file for 'systemtap'
|
||||
pkgname=systemtap
|
||||
version=4.5
|
||||
version=4.9
|
||||
revision=1
|
||||
archs="i686 x86_64 armv6l armv7l aarch64 ppc64le"
|
||||
build_style=gnu-configure
|
||||
hostmakedepends="python3"
|
||||
makedepends="elfutils-devel"
|
||||
@ -12,10 +11,19 @@ maintainer="Orphaned <orphan@voidlinux.org>"
|
||||
license="GPL-3.0-or-later"
|
||||
homepage="https://sourceware.org/systemtap/"
|
||||
distfiles="https://sourceware.org/pub/systemtap/releases/systemtap-${version}.tar.gz"
|
||||
checksum=75078ed37e0dd2a769c9d1f9394170b2d9f4d7daa425f43ca80c13bad6cfc925
|
||||
checksum=d01033baea9d0af52a65e70167816931f4b856427a53ff2ab30e4b45f6ad3a98
|
||||
python_version=3
|
||||
CFLAGS=-Wno-error
|
||||
CXXFLAGS=-Wno-error
|
||||
|
||||
if [ "$XBPS_TARGET_LIBC" = musl ]; then
|
||||
makedepends+=" musl-obstack-devel"
|
||||
CFLAGS+=" -DFNM_EXTMATCH=0"
|
||||
CFLAGS+=" -DFTW_ACTIONRETVAL=16 -DFTW_CONTINUE=0 -DFTW_SKIP_SUBTREE=2"
|
||||
CFLAGS+=" -D__off_t=off_t -D__uint32_t=uint32_t -D__uint64_t=uint64_t"
|
||||
CXXFLAGS=-fpermissive
|
||||
fi
|
||||
|
||||
CXXFLAGS+=" $CFLAGS"
|
||||
|
||||
systemtap-devel_package() {
|
||||
depends="systemtap-${version}_${revision}"
|
||||
|
Loading…
Reference in New Issue
Block a user