trace-cmd: update to 3.1.4.

This commit is contained in:
classabbyamp 2022-08-23 02:39:52 -04:00 committed by classabbyamp
parent 66eebb462a
commit b698913769
10 changed files with 78 additions and 108 deletions

View File

@ -4204,3 +4204,4 @@ libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_1
libairspyhf.so.0 libairspyhf-1.6.8_1
libtraceevent.so.1 libtraceevent-1.6.2_1
libtracefs.so.1 libtracefs-1.4.2_1
libtracecmd.so.1 libtracecmd-3.1.2_1

1
srcpkgs/libtracecmd-devel Symbolic link
View File

@ -0,0 +1 @@
trace-cmd

View File

@ -1,23 +0,0 @@
--- a/kernel-shark/src/kernelshark.cpp 2019-07-05 18:23:00.000000000 +0200
+++ b/kernel-shark/src/kernelshark.cpp 2019-07-08 17:52:19.081010524 +0200
@@ -35,6 +35,11 @@
{
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication a(argc, argv);
+ const char* program_name = strrchr(argv[0], '/');
+ if (nullptr == program_name)
+ program_name = argv[0];
+ else
+ ++program_name;
KsMainWindow ks;
@@ -48,7 +51,7 @@
return 0;
case 'v':
- printf("%s - %s\n", basename(argv[0]), KS_VERSION_STRING);
+ printf("%s - %s\n", program_name, KS_VERSION_STRING);
return 0;
case 'i':

View File

@ -1,12 +0,0 @@
Index: trace-cmd-2.9.1/kernel-shark/CMakeLists.txt
===================================================================
--- trace-cmd-2.9.1.orig/kernel-shark/CMakeLists.txt
+++ trace-cmd-2.9.1/kernel-shark/CMakeLists.txt
@@ -29,6 +29,7 @@ find_package(Doxygen)
set(OpenGL_GL_PREFERENCE LEGACY)
find_package(OpenGL)
find_package(GLUT)
+link_libraries(${GLUT_LIBRARIES})
find_package(Qt5Widgets 5.7.1)
find_package(Qt5Network)

View File

@ -1,15 +1,5 @@
--- a/include/tracefs/tracefs.h 2020-07-17 17:14:20.000000000 +0200
+++ b/include/tracefs/tracefs.h 2020-07-18 16:27:27.559697340 +0200
@@ -6,6 +6,7 @@
#ifndef _TRACE_FS_H
#define _TRACE_FS_H
+#include <limits.h>
#include "traceevent/event-parse.h"
char *tracefs_get_tracing_file(const char *name);
--- a/lib/trace-cmd/trace-plugin.c 2020-07-17 17:14:20.000000000 +0200
+++ b/lib/trace-cmd/trace-plugin.c 2020-07-18 16:33:40.323675122 +0200
--- a/lib/trace-cmd/trace-plugin.c
+++ b/lib/trace-cmd/trace-plugin.c
@@ -6,6 +6,7 @@
#include <stdlib.h>
#include <unistd.h>
@ -18,18 +8,18 @@
#include <sys/stat.h>
#include <libgen.h>
#include "trace-cmd.h"
--- a/tracecmd/trace-agent.c 2020-07-17 17:14:20.000000000 +0200
+++ b/tracecmd/trace-agent.c 2020-07-18 16:35:53.882667161 +0200
--- a/tracecmd/trace-agent.c
+++ b/tracecmd/trace-agent.c
@@ -14,6 +14,7 @@
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
+#include <limits.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/wait.h>
--- a/tracecmd/trace-setup-guest.c 2020-07-17 17:14:20.000000000 +0200
+++ b/tracecmd/trace-setup-guest.c 2020-07-18 16:37:29.463661464 +0200
#include <unistd.h>
--- a/tracecmd/trace-setup-guest.c
+++ b/tracecmd/trace-setup-guest.c
@@ -13,6 +13,7 @@
#include <string.h>
#include <sys/stat.h>
@ -38,3 +28,23 @@
#include "trace-local.h"
#include "trace-msg.h"
--- a/lib/trace-cmd/trace-timesync-kvm.c
+++ b/lib/trace-cmd/trace-timesync-kvm.c
@@ -10,6 +10,7 @@
#include <sys/stat.h>
#include <dirent.h>
#include <ctype.h>
+#include <limits.h>
#include "trace-cmd.h"
#include "trace-cmd-private.h"
--- a/utest/tracecmd-utest.c
+++ b/utest/tracecmd-utest.c
@@ -13,6 +13,7 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/types.h>
+#include <limits.h>
#include <CUnit/CUnit.h>
#include <CUnit/Basic.h>

View File

@ -1,24 +0,0 @@
--- a/tracecmd/trace-tsync.c 2020-07-17 17:14:20.000000000 +0200
+++ b/tracecmd/trace-tsync.c 2020-07-18 16:41:53.175645746 +0200
@@ -104,8 +104,10 @@
pthread_attr_init(&attrib);
pthread_attr_setdetachstate(&attrib, PTHREAD_CREATE_JOINABLE);
+#if defined(__GLIBC__)
if (!get_first_cpu(&pin_mask, &mask_size))
pthread_attr_setaffinity_np(&attrib, mask_size, pin_mask);
+#endif
ret = pthread_create(&instance->tsync_thread, &attrib,
tsync_host_thread, &instance->tsync);
@@ -243,8 +245,10 @@
pthread_attr_init(&attrib);
tsync->sync_proto = proto;
pthread_attr_setdetachstate(&attrib, PTHREAD_CREATE_JOINABLE);
+#if defined(__GLIBC__)
if (!get_first_cpu(&pin_mask, &mask_size))
pthread_attr_setaffinity_np(&attrib, mask_size, pin_mask);
+#endif
ret = pthread_create(thr_id, &attrib, tsync_agent_thread, tsync);

View File

@ -1,10 +0,0 @@
--- a/include/trace-cmd/trace-cmd.h 2020-07-17 17:14:20.000000000 +0200
+++ b/include/trace-cmd/trace-cmd.h 2020-07-18 16:23:27.984711620 +0200
@@ -6,6 +6,7 @@
#ifndef _TRACE_CMD_H
#define _TRACE_CMD_H
+#include <pthread.h>
#include "traceevent/event-parse.h"
#define TRACECMD_MAGIC { 23, 8, 68 }

View File

@ -0,0 +1,20 @@
--- a/scripts/utils.mk
+++ b/scripts/utils.mk
@@ -64,7 +64,7 @@
do_app_build = \
($(print_app_build) \
- $(CC) $^ -rdynamic -Wl,-rpath=$(libdir) -o $@ $(LDFLAGS) $(CONFIG_LIBS) $(LIBS))
+ $(CC) $^ -rdynamic -o $@ $(LDFLAGS) $(CONFIG_LIBS) $(LIBS))
do_build_static_lib = \
($(print_static_lib_build) \
@@ -72,7 +72,7 @@
do_compile_shared_library = \
($(print_shared_lib_compile) \
- $(CC) --shared $^ '-Wl,-soname,$(1),-rpath=$$ORIGIN' -o $@ $(LDFLAGS) $(LIBS))
+ $(CC) --shared $^ '-Wl,-soname,$(1)' -o $@ $(LDFLAGS) $(LIBS))
do_compile_plugin_obj = \
($(print_plugin_obj_compile) \

View File

@ -1,36 +1,43 @@
# Template file for 'trace-cmd'
pkgname=trace-cmd
version=2.9.1
version=3.1.4
revision=1
build_style=gnu-makefile
make_build_args="prefix=/usr all gui doc"
make_install_args="prefix=/usr install install_gui install_doc"
make_use_env=1
hostmakedepends="git asciidoc pkg-config cmake qt5-qmake qt5-host-tools"
makedepends="json-c-devel libfreeglut-devel libxml2-devel qt5-devel"
make_build_args="libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
make_build_target="all libs doc"
make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
make_install_target="install install_libs install_doc"
make_use_env=yes
hostmakedepends="asciidoc xmlto source-highlight pkg-config"
makedepends="libzstd-devel libtracefs-devel libtraceevent-devel"
checkdepends="CUnit-devel"
short_desc="Tools to use ftrace Linux kernel internal tracer"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="GPL-2.0-or-later, LGPL-2.1-only"
homepage="http://git.kernel.org/cgit/linux/kernel/git/rostedt/trace-cmd.git/"
distfiles="http://git.kernel.org/cgit/linux/kernel/git/rostedt/${pkgname}.git/snapshot/${pkgname}-v${version}.tar.gz"
checksum=9404fc3cf540ea795304608068c9db6cdb38b90584c7f3c43249785913d54b38
disable_parallel_build=yes
homepage="https://trace-cmd.org"
distfiles="https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/trace-cmd-v${version}.tar.gz"
checksum=447e095dbdfb0d362ab8c2086d62d80c5a2ecf67aef09b8f6b0cc064c0e1bfb5
post_install() {
vmkdir usr/share/bash-completion/completions
mv ${DESTDIR}/usr/etc/bash_completion.d/* ${DESTDIR}/usr/share/bash-completion/completions
rm ${DESTDIR}/etc/bash_completion.d/*
vcompletion tracecmd/trace-cmd.bash bash
}
kernelshark_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc="GUI for ftrace Linux kernel internal tracer"
libtracecmd_package() {
short_desc+=" - library"
pkg_install() {
vmove usr/bin/kernelshark
vmove usr/bin/kshark-record
vmove usr/bin/kshark-su-record
vmove usr/lib/kernelshark
vmove usr/share/applications/kernelshark.desktop
vmove usr/share/icons/kernelshark
vmove usr/share/polkit-1/actions/org.freedesktop.kshark-record.policy
vmove "usr/lib/*.so.*"
}
}
libtracecmd-devel_package() {
depends="libtracecmd>=${version}_${revision} ${makedepends}"
short_desc+=" - development files"
pkg_install() {
vmove usr/share/man/man3
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
vmove usr/share/doc/libtracecmd-doc
}
}