* Re: [PR PATCH] [Updated] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
@ 2022-08-23 8:14 ` classabbyamp
2022-08-23 8:22 ` classabbyamp
` (53 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-23 8:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages update/trace-cmd-3.1.2
https://github.com/void-linux/void-packages/pull/38851
trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
- New package: libtraceevent-1.6.2
- New package: libtracefs-1.4.2
- trace-cmd: update to 3.1.2.
- kernelshark: split from trace-cmd, update to 2.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (builds & runs, but I'm not sure how to use this so I can't test further)
A patch file from https://github.com/void-linux/void-packages/pull/38851.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update/trace-cmd-3.1.2-38851.patch --]
[-- Type: text/x-diff, Size: 17392 bytes --]
From ddeaffea16fe5984fb867193bfa74ce3a070b9c3 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:37:06 -0400
Subject: [PATCH 1/4] New package: libtraceevent-1.6.2
---
common/shlibs | 1 +
srcpkgs/libtraceevent-devel | 1 +
srcpkgs/libtraceevent/template | 35 ++++++++++++++++++++++++++++++++++
3 files changed, 37 insertions(+)
create mode 120000 srcpkgs/libtraceevent-devel
create mode 100644 srcpkgs/libtraceevent/template
diff --git a/common/shlibs b/common/shlibs
index f829ee12e80f..9bd26c6c36c9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4176,3 +4176,4 @@ libsyncthingmodel.so.1.2.2 syncthingtray-1.2.2_1
libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
+libtraceevent.so.1 libtraceevent-1.6.2_1
diff --git a/srcpkgs/libtraceevent-devel b/srcpkgs/libtraceevent-devel
new file mode 120000
index 000000000000..9ca91c55529f
--- /dev/null
+++ b/srcpkgs/libtraceevent-devel
@@ -0,0 +1 @@
+libtraceevent
\ No newline at end of file
diff --git a/srcpkgs/libtraceevent/template b/srcpkgs/libtraceevent/template
new file mode 100644
index 000000000000..f96bca13999e
--- /dev/null
+++ b/srcpkgs/libtraceevent/template
@@ -0,0 +1,35 @@
+# Template file for 'libtraceevent'
+pkgname=libtraceevent
+version=1.6.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr LP64=0"
+make_build_target="all doc"
+make_install_args="prefix=/usr"
+make_install_target="install doc-install"
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace event library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-${version}.tar.gz"
+checksum=1aaeb12f5842a843a06b733e3f4230b0937ba9c2ecd39345edf6f66cc8cbe795
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+libtraceevent-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc
+ }
+}
From 6e36302f7c44ea34b37875bbc784ac9be797b4ba Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:41:02 -0400
Subject: [PATCH 2/4] New package: libtracefs-1.4.2
---
common/shlibs | 1 +
srcpkgs/libtracefs-devel | 1 +
.../libtracefs/patches/musl-limits_h.patch | 10 +++++
srcpkgs/libtracefs/template | 41 +++++++++++++++++++
4 files changed, 53 insertions(+)
create mode 120000 srcpkgs/libtracefs-devel
create mode 100644 srcpkgs/libtracefs/patches/musl-limits_h.patch
create mode 100644 srcpkgs/libtracefs/template
diff --git a/common/shlibs b/common/shlibs
index 9bd26c6c36c9..cc3a69af2a2b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4177,3 +4177,4 @@ libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
libtraceevent.so.1 libtraceevent-1.6.2_1
+libtracefs.so.1 libtracefs-1.4.2_1
diff --git a/srcpkgs/libtracefs-devel b/srcpkgs/libtracefs-devel
new file mode 120000
index 000000000000..23466cce7993
--- /dev/null
+++ b/srcpkgs/libtracefs-devel
@@ -0,0 +1 @@
+libtracefs
\ No newline at end of file
diff --git a/srcpkgs/libtracefs/patches/musl-limits_h.patch b/srcpkgs/libtracefs/patches/musl-limits_h.patch
new file mode 100644
index 000000000000..b499fdceb66d
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl-limits_h.patch
@@ -0,0 +1,10 @@
+--- a/utest/tracefs-utest.c
++++ b/utest/tracefs-utest.c
+@@ -11,6 +11,7 @@
+ #include <time.h>
+ #include <dirent.h>
+ #include <ftw.h>
++#include <limits.h>
+
+ #include <CUnit/CUnit.h>
+ #include <CUnit/Basic.h>
diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template
new file mode 100644
index 000000000000..fac3d5cfefcd
--- /dev/null
+++ b/srcpkgs/libtracefs/template
@@ -0,0 +1,41 @@
+# Template file for 'libtracefs'
+pkgname=libtracefs
+version=1.4.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr LP64=0"
+make_build_target="all doc"
+make_install_args="prefix=/usr"
+make_install_target="install install_doc"
+make_use_env=yes
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+makedepends="libtraceevent-devel"
+checkdepends="CUnit-devel CUnit"
+short_desc="Linux kernel trace file system library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-${version}.tar.gz"
+checksum=8ad03e6d2a6227f6eb11692d9f04614d3da60ac6c5e4fe436e59b2bed90f031b
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ # manpage for sample program
+ rm ${DESTDIR}/usr/share/man/man1/sqlhist.1
+}
+
+libtracefs-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From 1ef8525192f48873acc30b393261ef534d2696aa Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 02:39:52 -0400
Subject: [PATCH 3/4] trace-cmd: update to 3.1.2.
---
common/shlibs | 1 +
srcpkgs/{kernelshark => libtracecmd} | 0
srcpkgs/libtracecmd-devel | 1 +
.../trace-cmd/patches/fix-program-name.patch | 23 --------
srcpkgs/trace-cmd/patches/musl-limits_h.patch | 34 ++++++------
.../musl-no_pthread_attr_setaffinity_np.patch | 24 ---------
.../trace-cmd/patches/musl-pthread_h.patch | 10 ----
srcpkgs/trace-cmd/template | 54 +++++++++++--------
8 files changed, 52 insertions(+), 95 deletions(-)
rename srcpkgs/{kernelshark => libtracecmd} (100%)
create mode 120000 srcpkgs/libtracecmd-devel
delete mode 100644 srcpkgs/trace-cmd/patches/fix-program-name.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-pthread_h.patch
diff --git a/common/shlibs b/common/shlibs
index cc3a69af2a2b..d0efac27f360 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4178,3 +4178,4 @@ libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_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
diff --git a/srcpkgs/kernelshark b/srcpkgs/libtracecmd
similarity index 100%
rename from srcpkgs/kernelshark
rename to srcpkgs/libtracecmd
diff --git a/srcpkgs/libtracecmd-devel b/srcpkgs/libtracecmd-devel
new file mode 120000
index 000000000000..77b3407d0913
--- /dev/null
+++ b/srcpkgs/libtracecmd-devel
@@ -0,0 +1 @@
+trace-cmd
\ No newline at end of file
diff --git a/srcpkgs/trace-cmd/patches/fix-program-name.patch b/srcpkgs/trace-cmd/patches/fix-program-name.patch
deleted file mode 100644
index 970122246115..000000000000
--- a/srcpkgs/trace-cmd/patches/fix-program-name.patch
+++ /dev/null
@@ -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':
diff --git a/srcpkgs/trace-cmd/patches/musl-limits_h.patch b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
index 83e278c8ab9e..6410da027e1f 100644
--- a/srcpkgs/trace-cmd/patches/musl-limits_h.patch
+++ b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
@@ -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,13 @@
#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"
diff --git a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch b/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
deleted file mode 100644
index 5203d3335c2b..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
+++ /dev/null
@@ -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);
-
diff --git a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch b/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
deleted file mode 100644
index 367588391845..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
+++ /dev/null
@@ -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 }
diff --git a/srcpkgs/trace-cmd/template b/srcpkgs/trace-cmd/template
index 34f9bcb40d42..e6297264bbb2 100644
--- a/srcpkgs/trace-cmd/template
+++ b/srcpkgs/trace-cmd/template
@@ -1,37 +1,49 @@
# Template file for 'trace-cmd'
pkgname=trace-cmd
-version=2.9.1
+version=3.1.2
revision=1
wrksrc="${pkgname}-v${version}"
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="prefix=/usr"
+make_build_target="all libs doc"
+make_install_args="$make_build_args"
+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=206672af60aa0bc35cfc44a4be746efa575bac729060e54b6453f7d5dfbcd979
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
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
+}
+
+libtracecmd_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/*.so.*"
+ }
}
-kernelshark_package() {
+libtracecmd-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
- short_desc="GUI for ftrace Linux kernel internal tracer"
+ short_desc+=" - development files"
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/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc/libtracecmd-doc
}
}
From 1d1cea71456d8fd59dcdf3735053f3259536c1f2 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 03:07:55 -0400
Subject: [PATCH 4/4] kernelshark: split from trace-cmd, update to 2.1.1
---
common/shlibs | 1 +
srcpkgs/kernelshark/template | 38 ++++++++++++++++++++++++++++++++++++
srcpkgs/libkshark | 1 +
srcpkgs/libkshark-devel | 1 +
4 files changed, 41 insertions(+)
create mode 100644 srcpkgs/kernelshark/template
create mode 120000 srcpkgs/libkshark
create mode 120000 srcpkgs/libkshark-devel
diff --git a/common/shlibs b/common/shlibs
index d0efac27f360..9387807c0574 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4179,3 +4179,4 @@ libgbinder.so.1 libgbinder-1.1.20_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
+libkshark.so.2 libkshark-2.1.1_1
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
new file mode 100644
index 000000000000..18d5b9d7430c
--- /dev/null
+++ b/srcpkgs/kernelshark/template
@@ -0,0 +1,38 @@
+# Template file for 'kernelshark'
+pkgname=kernelshark
+reverts="2.9.1_1 2.9_1 2.8.3_2 2.8.3_1 2.8.2_1 2.8.1_1 2.7_2 2.7_1 2.6.2_1 2.6.1_1
+ 2.6_1 2.5.3_3 2.5.3_2 2.5.3_1 2.5.1_1 2.5_1 2.4_1"
+version=2.1.1
+revision=1
+wrksrc="kernel-shark-kernelshark-v${version}"
+build_style=cmake
+configure_args="-D_INSTALL_PREFIX=/usr"
+hostmakedepends="qt5-qmake qt5-host-tools pkg-config freefont-ttf"
+makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
+ libtraceevent-devel libtracefs-devel libtracecmd-devel"
+depends="freefont-ttf"
+short_desc="Front end reader of trace-cmd(1) output"
+maintainer="Leah Neukirchen <leah@vuxu.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.kernelshark.org"
+distfiles="https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/snapshot/kernel-shark-kernelshark-v${version}.tar.gz"
+checksum=78a0cf28bc06d0e43cd5a2512f83c02b7b5c969a26a0d4b56338154d6cf6f7be
+# requires externally-downloaded data and segfaults on some gui tests
+make_check=no
+
+libkshark_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/libkshark.so.*"
+ }
+}
+
+libkshark-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/libkshark b/srcpkgs/libkshark
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
diff --git a/srcpkgs/libkshark-devel b/srcpkgs/libkshark-devel
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark-devel
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR PATCH] [Updated] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
2022-08-23 8:14 ` [PR PATCH] [Updated] " classabbyamp
@ 2022-08-23 8:22 ` classabbyamp
2022-08-23 8:28 ` classabbyamp
` (52 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-23 8:22 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages update/trace-cmd-3.1.2
https://github.com/void-linux/void-packages/pull/38851
trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
- New package: libtraceevent-1.6.2
- New package: libtracefs-1.4.2
- trace-cmd: update to 3.1.2.
- kernelshark: split from trace-cmd, update to 2.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (builds & runs, but I'm not sure how to use this so I can't test further)
A patch file from https://github.com/void-linux/void-packages/pull/38851.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update/trace-cmd-3.1.2-38851.patch --]
[-- Type: text/x-diff, Size: 17626 bytes --]
From ddeaffea16fe5984fb867193bfa74ce3a070b9c3 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:37:06 -0400
Subject: [PATCH 1/4] New package: libtraceevent-1.6.2
---
common/shlibs | 1 +
srcpkgs/libtraceevent-devel | 1 +
srcpkgs/libtraceevent/template | 35 ++++++++++++++++++++++++++++++++++
3 files changed, 37 insertions(+)
create mode 120000 srcpkgs/libtraceevent-devel
create mode 100644 srcpkgs/libtraceevent/template
diff --git a/common/shlibs b/common/shlibs
index f829ee12e80f..9bd26c6c36c9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4176,3 +4176,4 @@ libsyncthingmodel.so.1.2.2 syncthingtray-1.2.2_1
libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
+libtraceevent.so.1 libtraceevent-1.6.2_1
diff --git a/srcpkgs/libtraceevent-devel b/srcpkgs/libtraceevent-devel
new file mode 120000
index 000000000000..9ca91c55529f
--- /dev/null
+++ b/srcpkgs/libtraceevent-devel
@@ -0,0 +1 @@
+libtraceevent
\ No newline at end of file
diff --git a/srcpkgs/libtraceevent/template b/srcpkgs/libtraceevent/template
new file mode 100644
index 000000000000..f96bca13999e
--- /dev/null
+++ b/srcpkgs/libtraceevent/template
@@ -0,0 +1,35 @@
+# Template file for 'libtraceevent'
+pkgname=libtraceevent
+version=1.6.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr LP64=0"
+make_build_target="all doc"
+make_install_args="prefix=/usr"
+make_install_target="install doc-install"
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace event library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-${version}.tar.gz"
+checksum=1aaeb12f5842a843a06b733e3f4230b0937ba9c2ecd39345edf6f66cc8cbe795
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+libtraceevent-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc
+ }
+}
From 6e36302f7c44ea34b37875bbc784ac9be797b4ba Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:41:02 -0400
Subject: [PATCH 2/4] New package: libtracefs-1.4.2
---
common/shlibs | 1 +
srcpkgs/libtracefs-devel | 1 +
.../libtracefs/patches/musl-limits_h.patch | 10 +++++
srcpkgs/libtracefs/template | 41 +++++++++++++++++++
4 files changed, 53 insertions(+)
create mode 120000 srcpkgs/libtracefs-devel
create mode 100644 srcpkgs/libtracefs/patches/musl-limits_h.patch
create mode 100644 srcpkgs/libtracefs/template
diff --git a/common/shlibs b/common/shlibs
index 9bd26c6c36c9..cc3a69af2a2b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4177,3 +4177,4 @@ libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
libtraceevent.so.1 libtraceevent-1.6.2_1
+libtracefs.so.1 libtracefs-1.4.2_1
diff --git a/srcpkgs/libtracefs-devel b/srcpkgs/libtracefs-devel
new file mode 120000
index 000000000000..23466cce7993
--- /dev/null
+++ b/srcpkgs/libtracefs-devel
@@ -0,0 +1 @@
+libtracefs
\ No newline at end of file
diff --git a/srcpkgs/libtracefs/patches/musl-limits_h.patch b/srcpkgs/libtracefs/patches/musl-limits_h.patch
new file mode 100644
index 000000000000..b499fdceb66d
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl-limits_h.patch
@@ -0,0 +1,10 @@
+--- a/utest/tracefs-utest.c
++++ b/utest/tracefs-utest.c
+@@ -11,6 +11,7 @@
+ #include <time.h>
+ #include <dirent.h>
+ #include <ftw.h>
++#include <limits.h>
+
+ #include <CUnit/CUnit.h>
+ #include <CUnit/Basic.h>
diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template
new file mode 100644
index 000000000000..fac3d5cfefcd
--- /dev/null
+++ b/srcpkgs/libtracefs/template
@@ -0,0 +1,41 @@
+# Template file for 'libtracefs'
+pkgname=libtracefs
+version=1.4.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr LP64=0"
+make_build_target="all doc"
+make_install_args="prefix=/usr"
+make_install_target="install install_doc"
+make_use_env=yes
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+makedepends="libtraceevent-devel"
+checkdepends="CUnit-devel CUnit"
+short_desc="Linux kernel trace file system library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-${version}.tar.gz"
+checksum=8ad03e6d2a6227f6eb11692d9f04614d3da60ac6c5e4fe436e59b2bed90f031b
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ # manpage for sample program
+ rm ${DESTDIR}/usr/share/man/man1/sqlhist.1
+}
+
+libtracefs-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From 286f458a0b306f62e5131346ab14543515d7ccc1 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 02:39:52 -0400
Subject: [PATCH 3/4] trace-cmd: update to 3.1.2.
---
common/shlibs | 1 +
srcpkgs/{kernelshark => libtracecmd} | 0
srcpkgs/libtracecmd-devel | 1 +
.../trace-cmd/patches/fix-program-name.patch | 23 --------
srcpkgs/trace-cmd/patches/musl-limits_h.patch | 44 +++++++++------
.../musl-no_pthread_attr_setaffinity_np.patch | 24 ---------
.../trace-cmd/patches/musl-pthread_h.patch | 10 ----
srcpkgs/trace-cmd/template | 54 +++++++++++--------
8 files changed, 62 insertions(+), 95 deletions(-)
rename srcpkgs/{kernelshark => libtracecmd} (100%)
create mode 120000 srcpkgs/libtracecmd-devel
delete mode 100644 srcpkgs/trace-cmd/patches/fix-program-name.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-pthread_h.patch
diff --git a/common/shlibs b/common/shlibs
index cc3a69af2a2b..d0efac27f360 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4178,3 +4178,4 @@ libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_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
diff --git a/srcpkgs/kernelshark b/srcpkgs/libtracecmd
similarity index 100%
rename from srcpkgs/kernelshark
rename to srcpkgs/libtracecmd
diff --git a/srcpkgs/libtracecmd-devel b/srcpkgs/libtracecmd-devel
new file mode 120000
index 000000000000..77b3407d0913
--- /dev/null
+++ b/srcpkgs/libtracecmd-devel
@@ -0,0 +1 @@
+trace-cmd
\ No newline at end of file
diff --git a/srcpkgs/trace-cmd/patches/fix-program-name.patch b/srcpkgs/trace-cmd/patches/fix-program-name.patch
deleted file mode 100644
index 970122246115..000000000000
--- a/srcpkgs/trace-cmd/patches/fix-program-name.patch
+++ /dev/null
@@ -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':
diff --git a/srcpkgs/trace-cmd/patches/musl-limits_h.patch b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
index 83e278c8ab9e..af90e89b8d75 100644
--- a/srcpkgs/trace-cmd/patches/musl-limits_h.patch
+++ b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
@@ -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>
diff --git a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch b/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
deleted file mode 100644
index 5203d3335c2b..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
+++ /dev/null
@@ -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);
-
diff --git a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch b/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
deleted file mode 100644
index 367588391845..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
+++ /dev/null
@@ -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 }
diff --git a/srcpkgs/trace-cmd/template b/srcpkgs/trace-cmd/template
index 34f9bcb40d42..e6297264bbb2 100644
--- a/srcpkgs/trace-cmd/template
+++ b/srcpkgs/trace-cmd/template
@@ -1,37 +1,49 @@
# Template file for 'trace-cmd'
pkgname=trace-cmd
-version=2.9.1
+version=3.1.2
revision=1
wrksrc="${pkgname}-v${version}"
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="prefix=/usr"
+make_build_target="all libs doc"
+make_install_args="$make_build_args"
+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=206672af60aa0bc35cfc44a4be746efa575bac729060e54b6453f7d5dfbcd979
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
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
+}
+
+libtracecmd_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/*.so.*"
+ }
}
-kernelshark_package() {
+libtracecmd-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
- short_desc="GUI for ftrace Linux kernel internal tracer"
+ short_desc+=" - development files"
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/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc/libtracecmd-doc
}
}
From 07dc873305b7f6401539ee238b2790891342e9d2 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 03:07:55 -0400
Subject: [PATCH 4/4] kernelshark: split from trace-cmd, update to 2.1.1
---
common/shlibs | 1 +
srcpkgs/kernelshark/template | 38 ++++++++++++++++++++++++++++++++++++
srcpkgs/libkshark | 1 +
srcpkgs/libkshark-devel | 1 +
4 files changed, 41 insertions(+)
create mode 100644 srcpkgs/kernelshark/template
create mode 120000 srcpkgs/libkshark
create mode 120000 srcpkgs/libkshark-devel
diff --git a/common/shlibs b/common/shlibs
index d0efac27f360..9387807c0574 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4179,3 +4179,4 @@ libgbinder.so.1 libgbinder-1.1.20_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
+libkshark.so.2 libkshark-2.1.1_1
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
new file mode 100644
index 000000000000..18d5b9d7430c
--- /dev/null
+++ b/srcpkgs/kernelshark/template
@@ -0,0 +1,38 @@
+# Template file for 'kernelshark'
+pkgname=kernelshark
+reverts="2.9.1_1 2.9_1 2.8.3_2 2.8.3_1 2.8.2_1 2.8.1_1 2.7_2 2.7_1 2.6.2_1 2.6.1_1
+ 2.6_1 2.5.3_3 2.5.3_2 2.5.3_1 2.5.1_1 2.5_1 2.4_1"
+version=2.1.1
+revision=1
+wrksrc="kernel-shark-kernelshark-v${version}"
+build_style=cmake
+configure_args="-D_INSTALL_PREFIX=/usr"
+hostmakedepends="qt5-qmake qt5-host-tools pkg-config freefont-ttf"
+makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
+ libtraceevent-devel libtracefs-devel libtracecmd-devel"
+depends="freefont-ttf"
+short_desc="Front end reader of trace-cmd(1) output"
+maintainer="Leah Neukirchen <leah@vuxu.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.kernelshark.org"
+distfiles="https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/snapshot/kernel-shark-kernelshark-v${version}.tar.gz"
+checksum=78a0cf28bc06d0e43cd5a2512f83c02b7b5c969a26a0d4b56338154d6cf6f7be
+# requires externally-downloaded data and segfaults on some gui tests
+make_check=no
+
+libkshark_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/libkshark.so.*"
+ }
+}
+
+libkshark-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/libkshark b/srcpkgs/libkshark
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
diff --git a/srcpkgs/libkshark-devel b/srcpkgs/libkshark-devel
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark-devel
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
2022-08-23 8:14 ` [PR PATCH] [Updated] " classabbyamp
2022-08-23 8:22 ` classabbyamp
@ 2022-08-23 8:28 ` classabbyamp
2022-08-23 8:31 ` classabbyamp
` (51 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-23 8:28 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 307 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#issuecomment-1223735153
Comment:
hm, weird combo of errors:
- 32bit cross: doesn't generate the pkgconfig file?
- all: can't find library it depends on
both are not reproducible locally.
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (2 preceding siblings ...)
2022-08-23 8:28 ` classabbyamp
@ 2022-08-23 8:31 ` classabbyamp
2022-08-23 8:47 ` [PR PATCH] [Updated] " classabbyamp
` (50 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-23 8:31 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 296 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#issuecomment-1223735153
Comment:
hm, weird combo of errors:
- 32bit cross: doesn't generate the pkgconfig file?
- all: can't find library it depends on (can't repro this locally)
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR PATCH] [Updated] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (3 preceding siblings ...)
2022-08-23 8:31 ` classabbyamp
@ 2022-08-23 8:47 ` classabbyamp
2022-08-23 8:54 ` classabbyamp
` (49 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-23 8:47 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages update/trace-cmd-3.1.2
https://github.com/void-linux/void-packages/pull/38851
trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
- New package: libtraceevent-1.6.2
- New package: libtracefs-1.4.2
- trace-cmd: update to 3.1.2.
- kernelshark: split from trace-cmd, update to 2.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (builds & runs, but I'm not sure how to use this so I can't test further)
A patch file from https://github.com/void-linux/void-packages/pull/38851.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update/trace-cmd-3.1.2-38851.patch --]
[-- Type: text/x-diff, Size: 17871 bytes --]
From 20bccb352c8512fe0600c435fcc3f02cc77108d0 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:37:06 -0400
Subject: [PATCH 1/4] New package: libtraceevent-1.6.2
---
common/shlibs | 1 +
srcpkgs/libtraceevent-devel | 1 +
srcpkgs/libtraceevent/template | 41 ++++++++++++++++++++++++++++++++++
3 files changed, 43 insertions(+)
create mode 120000 srcpkgs/libtraceevent-devel
create mode 100644 srcpkgs/libtraceevent/template
diff --git a/common/shlibs b/common/shlibs
index f829ee12e80f..9bd26c6c36c9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4176,3 +4176,4 @@ libsyncthingmodel.so.1.2.2 syncthingtray-1.2.2_1
libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
+libtraceevent.so.1 libtraceevent-1.6.2_1
diff --git a/srcpkgs/libtraceevent-devel b/srcpkgs/libtraceevent-devel
new file mode 120000
index 000000000000..9ca91c55529f
--- /dev/null
+++ b/srcpkgs/libtraceevent-devel
@@ -0,0 +1 @@
+libtraceevent
\ No newline at end of file
diff --git a/srcpkgs/libtraceevent/template b/srcpkgs/libtraceevent/template
new file mode 100644
index 000000000000..ccc6f950a5de
--- /dev/null
+++ b/srcpkgs/libtraceevent/template
@@ -0,0 +1,41 @@
+# Template file for 'libtraceevent'
+pkgname=libtraceevent
+version=1.6.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr"
+make_build_target="all doc"
+make_install_args="$make_build_args"
+make_install_target="install doc-install"
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace event library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-${version}.tar.gz"
+checksum=1aaeb12f5842a843a06b733e3f4230b0937ba9c2ecd39345edf6f66cc8cbe795
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
+ mv ${DESTDIR}/usr/lib64/pkgconfig ${DESTDIR}/usr/lib/pkgconfig
+ fi
+}
+
+libtraceevent-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc
+ }
+}
From c830daa7ab03514f0bf49482006b37c1bb3755b6 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:41:02 -0400
Subject: [PATCH 2/4] New package: libtracefs-1.4.2
---
common/shlibs | 1 +
srcpkgs/libtracefs-devel | 1 +
.../libtracefs/patches/musl-limits_h.patch | 10 +++++
srcpkgs/libtracefs/template | 45 +++++++++++++++++++
4 files changed, 57 insertions(+)
create mode 120000 srcpkgs/libtracefs-devel
create mode 100644 srcpkgs/libtracefs/patches/musl-limits_h.patch
create mode 100644 srcpkgs/libtracefs/template
diff --git a/common/shlibs b/common/shlibs
index 9bd26c6c36c9..cc3a69af2a2b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4177,3 +4177,4 @@ libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
libtraceevent.so.1 libtraceevent-1.6.2_1
+libtracefs.so.1 libtracefs-1.4.2_1
diff --git a/srcpkgs/libtracefs-devel b/srcpkgs/libtracefs-devel
new file mode 120000
index 000000000000..23466cce7993
--- /dev/null
+++ b/srcpkgs/libtracefs-devel
@@ -0,0 +1 @@
+libtracefs
\ No newline at end of file
diff --git a/srcpkgs/libtracefs/patches/musl-limits_h.patch b/srcpkgs/libtracefs/patches/musl-limits_h.patch
new file mode 100644
index 000000000000..b499fdceb66d
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl-limits_h.patch
@@ -0,0 +1,10 @@
+--- a/utest/tracefs-utest.c
++++ b/utest/tracefs-utest.c
+@@ -11,6 +11,7 @@
+ #include <time.h>
+ #include <dirent.h>
+ #include <ftw.h>
++#include <limits.h>
+
+ #include <CUnit/CUnit.h>
+ #include <CUnit/Basic.h>
diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template
new file mode 100644
index 000000000000..c69642fb27e6
--- /dev/null
+++ b/srcpkgs/libtracefs/template
@@ -0,0 +1,45 @@
+# Template file for 'libtracefs'
+pkgname=libtracefs
+version=1.4.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr"
+make_build_target="all doc"
+make_install_args="$make_build_args"
+make_install_target="install install_doc"
+make_use_env=yes
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+makedepends="libtraceevent-devel"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace file system library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-${version}.tar.gz"
+checksum=8ad03e6d2a6227f6eb11692d9f04614d3da60ac6c5e4fe436e59b2bed90f031b
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ # manpage for sample program
+ rm ${DESTDIR}/usr/share/man/man1/sqlhist.1
+
+ if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
+ mv ${DESTDIR}/usr/lib64/pkgconfig ${DESTDIR}/usr/lib/pkgconfig
+ fi
+}
+
+libtracefs-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From 93220b7679b9a750c7ca5b5b4f7046545a7578df Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 02:39:52 -0400
Subject: [PATCH 3/4] trace-cmd: update to 3.1.2.
---
common/shlibs | 1 +
srcpkgs/{kernelshark => libtracecmd} | 0
srcpkgs/libtracecmd-devel | 1 +
.../trace-cmd/patches/fix-program-name.patch | 23 --------
srcpkgs/trace-cmd/patches/musl-limits_h.patch | 44 +++++++++------
.../musl-no_pthread_attr_setaffinity_np.patch | 24 ---------
.../trace-cmd/patches/musl-pthread_h.patch | 10 ----
srcpkgs/trace-cmd/template | 54 +++++++++++--------
8 files changed, 62 insertions(+), 95 deletions(-)
rename srcpkgs/{kernelshark => libtracecmd} (100%)
create mode 120000 srcpkgs/libtracecmd-devel
delete mode 100644 srcpkgs/trace-cmd/patches/fix-program-name.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-pthread_h.patch
diff --git a/common/shlibs b/common/shlibs
index cc3a69af2a2b..d0efac27f360 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4178,3 +4178,4 @@ libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_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
diff --git a/srcpkgs/kernelshark b/srcpkgs/libtracecmd
similarity index 100%
rename from srcpkgs/kernelshark
rename to srcpkgs/libtracecmd
diff --git a/srcpkgs/libtracecmd-devel b/srcpkgs/libtracecmd-devel
new file mode 120000
index 000000000000..77b3407d0913
--- /dev/null
+++ b/srcpkgs/libtracecmd-devel
@@ -0,0 +1 @@
+trace-cmd
\ No newline at end of file
diff --git a/srcpkgs/trace-cmd/patches/fix-program-name.patch b/srcpkgs/trace-cmd/patches/fix-program-name.patch
deleted file mode 100644
index 970122246115..000000000000
--- a/srcpkgs/trace-cmd/patches/fix-program-name.patch
+++ /dev/null
@@ -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':
diff --git a/srcpkgs/trace-cmd/patches/musl-limits_h.patch b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
index 83e278c8ab9e..af90e89b8d75 100644
--- a/srcpkgs/trace-cmd/patches/musl-limits_h.patch
+++ b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
@@ -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>
diff --git a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch b/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
deleted file mode 100644
index 5203d3335c2b..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
+++ /dev/null
@@ -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);
-
diff --git a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch b/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
deleted file mode 100644
index 367588391845..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
+++ /dev/null
@@ -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 }
diff --git a/srcpkgs/trace-cmd/template b/srcpkgs/trace-cmd/template
index 34f9bcb40d42..e6297264bbb2 100644
--- a/srcpkgs/trace-cmd/template
+++ b/srcpkgs/trace-cmd/template
@@ -1,37 +1,49 @@
# Template file for 'trace-cmd'
pkgname=trace-cmd
-version=2.9.1
+version=3.1.2
revision=1
wrksrc="${pkgname}-v${version}"
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="prefix=/usr"
+make_build_target="all libs doc"
+make_install_args="$make_build_args"
+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=206672af60aa0bc35cfc44a4be746efa575bac729060e54b6453f7d5dfbcd979
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
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
+}
+
+libtracecmd_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/*.so.*"
+ }
}
-kernelshark_package() {
+libtracecmd-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
- short_desc="GUI for ftrace Linux kernel internal tracer"
+ short_desc+=" - development files"
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/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc/libtracecmd-doc
}
}
From 212cd3c3b6fbf98fef6484677a8eaef4bb2a6761 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 03:07:55 -0400
Subject: [PATCH 4/4] kernelshark: split from trace-cmd, update to 2.1.1
---
common/shlibs | 1 +
srcpkgs/kernelshark/template | 38 ++++++++++++++++++++++++++++++++++++
srcpkgs/libkshark | 1 +
srcpkgs/libkshark-devel | 1 +
4 files changed, 41 insertions(+)
create mode 100644 srcpkgs/kernelshark/template
create mode 120000 srcpkgs/libkshark
create mode 120000 srcpkgs/libkshark-devel
diff --git a/common/shlibs b/common/shlibs
index d0efac27f360..9387807c0574 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4179,3 +4179,4 @@ libgbinder.so.1 libgbinder-1.1.20_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
+libkshark.so.2 libkshark-2.1.1_1
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
new file mode 100644
index 000000000000..18d5b9d7430c
--- /dev/null
+++ b/srcpkgs/kernelshark/template
@@ -0,0 +1,38 @@
+# Template file for 'kernelshark'
+pkgname=kernelshark
+reverts="2.9.1_1 2.9_1 2.8.3_2 2.8.3_1 2.8.2_1 2.8.1_1 2.7_2 2.7_1 2.6.2_1 2.6.1_1
+ 2.6_1 2.5.3_3 2.5.3_2 2.5.3_1 2.5.1_1 2.5_1 2.4_1"
+version=2.1.1
+revision=1
+wrksrc="kernel-shark-kernelshark-v${version}"
+build_style=cmake
+configure_args="-D_INSTALL_PREFIX=/usr"
+hostmakedepends="qt5-qmake qt5-host-tools pkg-config freefont-ttf"
+makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
+ libtraceevent-devel libtracefs-devel libtracecmd-devel"
+depends="freefont-ttf"
+short_desc="Front end reader of trace-cmd(1) output"
+maintainer="Leah Neukirchen <leah@vuxu.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.kernelshark.org"
+distfiles="https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/snapshot/kernel-shark-kernelshark-v${version}.tar.gz"
+checksum=78a0cf28bc06d0e43cd5a2512f83c02b7b5c969a26a0d4b56338154d6cf6f7be
+# requires externally-downloaded data and segfaults on some gui tests
+make_check=no
+
+libkshark_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/libkshark.so.*"
+ }
+}
+
+libkshark-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/libkshark b/srcpkgs/libkshark
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
diff --git a/srcpkgs/libkshark-devel b/srcpkgs/libkshark-devel
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark-devel
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR PATCH] [Updated] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (4 preceding siblings ...)
2022-08-23 8:47 ` [PR PATCH] [Updated] " classabbyamp
@ 2022-08-23 8:54 ` classabbyamp
2022-08-23 8:56 ` classabbyamp
` (48 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-23 8:54 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages update/trace-cmd-3.1.2
https://github.com/void-linux/void-packages/pull/38851
trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
- New package: libtraceevent-1.6.2
- New package: libtracefs-1.4.2
- trace-cmd: update to 3.1.2.
- kernelshark: split from trace-cmd, update to 2.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (builds & runs, but I'm not sure how to use this so I can't test further)
A patch file from https://github.com/void-linux/void-packages/pull/38851.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update/trace-cmd-3.1.2-38851.patch --]
[-- Type: text/x-diff, Size: 17891 bytes --]
From 20bccb352c8512fe0600c435fcc3f02cc77108d0 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:37:06 -0400
Subject: [PATCH 1/4] New package: libtraceevent-1.6.2
---
common/shlibs | 1 +
srcpkgs/libtraceevent-devel | 1 +
srcpkgs/libtraceevent/template | 41 ++++++++++++++++++++++++++++++++++
3 files changed, 43 insertions(+)
create mode 120000 srcpkgs/libtraceevent-devel
create mode 100644 srcpkgs/libtraceevent/template
diff --git a/common/shlibs b/common/shlibs
index f829ee12e80f..9bd26c6c36c9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4176,3 +4176,4 @@ libsyncthingmodel.so.1.2.2 syncthingtray-1.2.2_1
libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
+libtraceevent.so.1 libtraceevent-1.6.2_1
diff --git a/srcpkgs/libtraceevent-devel b/srcpkgs/libtraceevent-devel
new file mode 120000
index 000000000000..9ca91c55529f
--- /dev/null
+++ b/srcpkgs/libtraceevent-devel
@@ -0,0 +1 @@
+libtraceevent
\ No newline at end of file
diff --git a/srcpkgs/libtraceevent/template b/srcpkgs/libtraceevent/template
new file mode 100644
index 000000000000..ccc6f950a5de
--- /dev/null
+++ b/srcpkgs/libtraceevent/template
@@ -0,0 +1,41 @@
+# Template file for 'libtraceevent'
+pkgname=libtraceevent
+version=1.6.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr"
+make_build_target="all doc"
+make_install_args="$make_build_args"
+make_install_target="install doc-install"
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace event library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-${version}.tar.gz"
+checksum=1aaeb12f5842a843a06b733e3f4230b0937ba9c2ecd39345edf6f66cc8cbe795
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
+ mv ${DESTDIR}/usr/lib64/pkgconfig ${DESTDIR}/usr/lib/pkgconfig
+ fi
+}
+
+libtraceevent-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc
+ }
+}
From c830daa7ab03514f0bf49482006b37c1bb3755b6 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:41:02 -0400
Subject: [PATCH 2/4] New package: libtracefs-1.4.2
---
common/shlibs | 1 +
srcpkgs/libtracefs-devel | 1 +
.../libtracefs/patches/musl-limits_h.patch | 10 +++++
srcpkgs/libtracefs/template | 45 +++++++++++++++++++
4 files changed, 57 insertions(+)
create mode 120000 srcpkgs/libtracefs-devel
create mode 100644 srcpkgs/libtracefs/patches/musl-limits_h.patch
create mode 100644 srcpkgs/libtracefs/template
diff --git a/common/shlibs b/common/shlibs
index 9bd26c6c36c9..cc3a69af2a2b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4177,3 +4177,4 @@ libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
libtraceevent.so.1 libtraceevent-1.6.2_1
+libtracefs.so.1 libtracefs-1.4.2_1
diff --git a/srcpkgs/libtracefs-devel b/srcpkgs/libtracefs-devel
new file mode 120000
index 000000000000..23466cce7993
--- /dev/null
+++ b/srcpkgs/libtracefs-devel
@@ -0,0 +1 @@
+libtracefs
\ No newline at end of file
diff --git a/srcpkgs/libtracefs/patches/musl-limits_h.patch b/srcpkgs/libtracefs/patches/musl-limits_h.patch
new file mode 100644
index 000000000000..b499fdceb66d
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl-limits_h.patch
@@ -0,0 +1,10 @@
+--- a/utest/tracefs-utest.c
++++ b/utest/tracefs-utest.c
+@@ -11,6 +11,7 @@
+ #include <time.h>
+ #include <dirent.h>
+ #include <ftw.h>
++#include <limits.h>
+
+ #include <CUnit/CUnit.h>
+ #include <CUnit/Basic.h>
diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template
new file mode 100644
index 000000000000..c69642fb27e6
--- /dev/null
+++ b/srcpkgs/libtracefs/template
@@ -0,0 +1,45 @@
+# Template file for 'libtracefs'
+pkgname=libtracefs
+version=1.4.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr"
+make_build_target="all doc"
+make_install_args="$make_build_args"
+make_install_target="install install_doc"
+make_use_env=yes
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+makedepends="libtraceevent-devel"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace file system library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-${version}.tar.gz"
+checksum=8ad03e6d2a6227f6eb11692d9f04614d3da60ac6c5e4fe436e59b2bed90f031b
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ # manpage for sample program
+ rm ${DESTDIR}/usr/share/man/man1/sqlhist.1
+
+ if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
+ mv ${DESTDIR}/usr/lib64/pkgconfig ${DESTDIR}/usr/lib/pkgconfig
+ fi
+}
+
+libtracefs-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From ba72320233b11778cd63027fd0978c08d75a0259 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 02:39:52 -0400
Subject: [PATCH 3/4] trace-cmd: update to 3.1.2.
---
common/shlibs | 1 +
srcpkgs/{kernelshark => libtracecmd} | 0
srcpkgs/libtracecmd-devel | 1 +
.../trace-cmd/patches/fix-program-name.patch | 23 --------
srcpkgs/trace-cmd/patches/musl-limits_h.patch | 44 +++++++++------
.../musl-no_pthread_attr_setaffinity_np.patch | 24 ---------
.../trace-cmd/patches/musl-pthread_h.patch | 10 ----
srcpkgs/trace-cmd/template | 54 +++++++++++--------
8 files changed, 62 insertions(+), 95 deletions(-)
rename srcpkgs/{kernelshark => libtracecmd} (100%)
create mode 120000 srcpkgs/libtracecmd-devel
delete mode 100644 srcpkgs/trace-cmd/patches/fix-program-name.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-pthread_h.patch
diff --git a/common/shlibs b/common/shlibs
index cc3a69af2a2b..d0efac27f360 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4178,3 +4178,4 @@ libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_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
diff --git a/srcpkgs/kernelshark b/srcpkgs/libtracecmd
similarity index 100%
rename from srcpkgs/kernelshark
rename to srcpkgs/libtracecmd
diff --git a/srcpkgs/libtracecmd-devel b/srcpkgs/libtracecmd-devel
new file mode 120000
index 000000000000..77b3407d0913
--- /dev/null
+++ b/srcpkgs/libtracecmd-devel
@@ -0,0 +1 @@
+trace-cmd
\ No newline at end of file
diff --git a/srcpkgs/trace-cmd/patches/fix-program-name.patch b/srcpkgs/trace-cmd/patches/fix-program-name.patch
deleted file mode 100644
index 970122246115..000000000000
--- a/srcpkgs/trace-cmd/patches/fix-program-name.patch
+++ /dev/null
@@ -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':
diff --git a/srcpkgs/trace-cmd/patches/musl-limits_h.patch b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
index 83e278c8ab9e..af90e89b8d75 100644
--- a/srcpkgs/trace-cmd/patches/musl-limits_h.patch
+++ b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
@@ -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>
diff --git a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch b/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
deleted file mode 100644
index 5203d3335c2b..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
+++ /dev/null
@@ -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);
-
diff --git a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch b/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
deleted file mode 100644
index 367588391845..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
+++ /dev/null
@@ -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 }
diff --git a/srcpkgs/trace-cmd/template b/srcpkgs/trace-cmd/template
index 34f9bcb40d42..929415723076 100644
--- a/srcpkgs/trace-cmd/template
+++ b/srcpkgs/trace-cmd/template
@@ -1,37 +1,49 @@
# Template file for 'trace-cmd'
pkgname=trace-cmd
-version=2.9.1
+version=3.1.2
revision=1
wrksrc="${pkgname}-v${version}"
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="prefix=/usr libdir_relative=lib"
+make_build_target="all libs doc"
+make_install_args="$make_build_args"
+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=206672af60aa0bc35cfc44a4be746efa575bac729060e54b6453f7d5dfbcd979
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
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
+}
+
+libtracecmd_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/*.so.*"
+ }
}
-kernelshark_package() {
+libtracecmd-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
- short_desc="GUI for ftrace Linux kernel internal tracer"
+ short_desc+=" - development files"
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/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc/libtracecmd-doc
}
}
From b2b895fe7a522b281b7a45f1e433842f485f4d33 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 03:07:55 -0400
Subject: [PATCH 4/4] kernelshark: split from trace-cmd, update to 2.1.1
---
common/shlibs | 1 +
srcpkgs/kernelshark/template | 38 ++++++++++++++++++++++++++++++++++++
srcpkgs/libkshark | 1 +
srcpkgs/libkshark-devel | 1 +
4 files changed, 41 insertions(+)
create mode 100644 srcpkgs/kernelshark/template
create mode 120000 srcpkgs/libkshark
create mode 120000 srcpkgs/libkshark-devel
diff --git a/common/shlibs b/common/shlibs
index d0efac27f360..9387807c0574 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4179,3 +4179,4 @@ libgbinder.so.1 libgbinder-1.1.20_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
+libkshark.so.2 libkshark-2.1.1_1
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
new file mode 100644
index 000000000000..18d5b9d7430c
--- /dev/null
+++ b/srcpkgs/kernelshark/template
@@ -0,0 +1,38 @@
+# Template file for 'kernelshark'
+pkgname=kernelshark
+reverts="2.9.1_1 2.9_1 2.8.3_2 2.8.3_1 2.8.2_1 2.8.1_1 2.7_2 2.7_1 2.6.2_1 2.6.1_1
+ 2.6_1 2.5.3_3 2.5.3_2 2.5.3_1 2.5.1_1 2.5_1 2.4_1"
+version=2.1.1
+revision=1
+wrksrc="kernel-shark-kernelshark-v${version}"
+build_style=cmake
+configure_args="-D_INSTALL_PREFIX=/usr"
+hostmakedepends="qt5-qmake qt5-host-tools pkg-config freefont-ttf"
+makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
+ libtraceevent-devel libtracefs-devel libtracecmd-devel"
+depends="freefont-ttf"
+short_desc="Front end reader of trace-cmd(1) output"
+maintainer="Leah Neukirchen <leah@vuxu.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.kernelshark.org"
+distfiles="https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/snapshot/kernel-shark-kernelshark-v${version}.tar.gz"
+checksum=78a0cf28bc06d0e43cd5a2512f83c02b7b5c969a26a0d4b56338154d6cf6f7be
+# requires externally-downloaded data and segfaults on some gui tests
+make_check=no
+
+libkshark_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/libkshark.so.*"
+ }
+}
+
+libkshark-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/libkshark b/srcpkgs/libkshark
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
diff --git a/srcpkgs/libkshark-devel b/srcpkgs/libkshark-devel
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark-devel
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (5 preceding siblings ...)
2022-08-23 8:54 ` classabbyamp
@ 2022-08-23 8:56 ` classabbyamp
2022-08-23 8:57 ` [PR PATCH] [Updated] " classabbyamp
` (47 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-23 8:56 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 296 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#issuecomment-1223735153
Comment:
hm, weird combo of errors:
- 32bit cross: doesn't generate the pkgconfig file?
- all: can't find library it depends on (can't repro this locally)
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR PATCH] [Updated] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (6 preceding siblings ...)
2022-08-23 8:56 ` classabbyamp
@ 2022-08-23 8:57 ` classabbyamp
2022-08-23 9:11 ` classabbyamp
` (46 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-23 8:57 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages update/trace-cmd-3.1.2
https://github.com/void-linux/void-packages/pull/38851
trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
- New package: libtraceevent-1.6.2
- New package: libtracefs-1.4.2
- trace-cmd: update to 3.1.2.
- kernelshark: split from trace-cmd, update to 2.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (builds & runs, but I'm not sure how to use this so I can't test further)
A patch file from https://github.com/void-linux/void-packages/pull/38851.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update/trace-cmd-3.1.2-38851.patch --]
[-- Type: text/x-diff, Size: 18006 bytes --]
From 20bccb352c8512fe0600c435fcc3f02cc77108d0 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:37:06 -0400
Subject: [PATCH 1/4] New package: libtraceevent-1.6.2
---
common/shlibs | 1 +
srcpkgs/libtraceevent-devel | 1 +
srcpkgs/libtraceevent/template | 41 ++++++++++++++++++++++++++++++++++
3 files changed, 43 insertions(+)
create mode 120000 srcpkgs/libtraceevent-devel
create mode 100644 srcpkgs/libtraceevent/template
diff --git a/common/shlibs b/common/shlibs
index f829ee12e80f..9bd26c6c36c9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4176,3 +4176,4 @@ libsyncthingmodel.so.1.2.2 syncthingtray-1.2.2_1
libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
+libtraceevent.so.1 libtraceevent-1.6.2_1
diff --git a/srcpkgs/libtraceevent-devel b/srcpkgs/libtraceevent-devel
new file mode 120000
index 000000000000..9ca91c55529f
--- /dev/null
+++ b/srcpkgs/libtraceevent-devel
@@ -0,0 +1 @@
+libtraceevent
\ No newline at end of file
diff --git a/srcpkgs/libtraceevent/template b/srcpkgs/libtraceevent/template
new file mode 100644
index 000000000000..ccc6f950a5de
--- /dev/null
+++ b/srcpkgs/libtraceevent/template
@@ -0,0 +1,41 @@
+# Template file for 'libtraceevent'
+pkgname=libtraceevent
+version=1.6.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr"
+make_build_target="all doc"
+make_install_args="$make_build_args"
+make_install_target="install doc-install"
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace event library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-${version}.tar.gz"
+checksum=1aaeb12f5842a843a06b733e3f4230b0937ba9c2ecd39345edf6f66cc8cbe795
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
+ mv ${DESTDIR}/usr/lib64/pkgconfig ${DESTDIR}/usr/lib/pkgconfig
+ fi
+}
+
+libtraceevent-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc
+ }
+}
From c830daa7ab03514f0bf49482006b37c1bb3755b6 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:41:02 -0400
Subject: [PATCH 2/4] New package: libtracefs-1.4.2
---
common/shlibs | 1 +
srcpkgs/libtracefs-devel | 1 +
.../libtracefs/patches/musl-limits_h.patch | 10 +++++
srcpkgs/libtracefs/template | 45 +++++++++++++++++++
4 files changed, 57 insertions(+)
create mode 120000 srcpkgs/libtracefs-devel
create mode 100644 srcpkgs/libtracefs/patches/musl-limits_h.patch
create mode 100644 srcpkgs/libtracefs/template
diff --git a/common/shlibs b/common/shlibs
index 9bd26c6c36c9..cc3a69af2a2b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4177,3 +4177,4 @@ libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
libtraceevent.so.1 libtraceevent-1.6.2_1
+libtracefs.so.1 libtracefs-1.4.2_1
diff --git a/srcpkgs/libtracefs-devel b/srcpkgs/libtracefs-devel
new file mode 120000
index 000000000000..23466cce7993
--- /dev/null
+++ b/srcpkgs/libtracefs-devel
@@ -0,0 +1 @@
+libtracefs
\ No newline at end of file
diff --git a/srcpkgs/libtracefs/patches/musl-limits_h.patch b/srcpkgs/libtracefs/patches/musl-limits_h.patch
new file mode 100644
index 000000000000..b499fdceb66d
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl-limits_h.patch
@@ -0,0 +1,10 @@
+--- a/utest/tracefs-utest.c
++++ b/utest/tracefs-utest.c
+@@ -11,6 +11,7 @@
+ #include <time.h>
+ #include <dirent.h>
+ #include <ftw.h>
++#include <limits.h>
+
+ #include <CUnit/CUnit.h>
+ #include <CUnit/Basic.h>
diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template
new file mode 100644
index 000000000000..c69642fb27e6
--- /dev/null
+++ b/srcpkgs/libtracefs/template
@@ -0,0 +1,45 @@
+# Template file for 'libtracefs'
+pkgname=libtracefs
+version=1.4.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr"
+make_build_target="all doc"
+make_install_args="$make_build_args"
+make_install_target="install install_doc"
+make_use_env=yes
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+makedepends="libtraceevent-devel"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace file system library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-${version}.tar.gz"
+checksum=8ad03e6d2a6227f6eb11692d9f04614d3da60ac6c5e4fe436e59b2bed90f031b
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ # manpage for sample program
+ rm ${DESTDIR}/usr/share/man/man1/sqlhist.1
+
+ if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
+ mv ${DESTDIR}/usr/lib64/pkgconfig ${DESTDIR}/usr/lib/pkgconfig
+ fi
+}
+
+libtracefs-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From fbe7eabf42b05e25b5a93531131077dc66e6977d Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 02:39:52 -0400
Subject: [PATCH 3/4] trace-cmd: update to 3.1.2.
---
common/shlibs | 1 +
srcpkgs/{kernelshark => libtracecmd} | 0
srcpkgs/libtracecmd-devel | 1 +
.../trace-cmd/patches/fix-program-name.patch | 23 --------
srcpkgs/trace-cmd/patches/musl-limits_h.patch | 44 ++++++++------
.../musl-no_pthread_attr_setaffinity_np.patch | 24 --------
.../trace-cmd/patches/musl-pthread_h.patch | 10 ----
srcpkgs/trace-cmd/template | 58 ++++++++++++-------
8 files changed, 66 insertions(+), 95 deletions(-)
rename srcpkgs/{kernelshark => libtracecmd} (100%)
create mode 120000 srcpkgs/libtracecmd-devel
delete mode 100644 srcpkgs/trace-cmd/patches/fix-program-name.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-pthread_h.patch
diff --git a/common/shlibs b/common/shlibs
index cc3a69af2a2b..d0efac27f360 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4178,3 +4178,4 @@ libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_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
diff --git a/srcpkgs/kernelshark b/srcpkgs/libtracecmd
similarity index 100%
rename from srcpkgs/kernelshark
rename to srcpkgs/libtracecmd
diff --git a/srcpkgs/libtracecmd-devel b/srcpkgs/libtracecmd-devel
new file mode 120000
index 000000000000..77b3407d0913
--- /dev/null
+++ b/srcpkgs/libtracecmd-devel
@@ -0,0 +1 @@
+trace-cmd
\ No newline at end of file
diff --git a/srcpkgs/trace-cmd/patches/fix-program-name.patch b/srcpkgs/trace-cmd/patches/fix-program-name.patch
deleted file mode 100644
index 970122246115..000000000000
--- a/srcpkgs/trace-cmd/patches/fix-program-name.patch
+++ /dev/null
@@ -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':
diff --git a/srcpkgs/trace-cmd/patches/musl-limits_h.patch b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
index 83e278c8ab9e..af90e89b8d75 100644
--- a/srcpkgs/trace-cmd/patches/musl-limits_h.patch
+++ b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
@@ -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>
diff --git a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch b/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
deleted file mode 100644
index 5203d3335c2b..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
+++ /dev/null
@@ -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);
-
diff --git a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch b/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
deleted file mode 100644
index 367588391845..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
+++ /dev/null
@@ -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 }
diff --git a/srcpkgs/trace-cmd/template b/srcpkgs/trace-cmd/template
index 34f9bcb40d42..3b06287a3542 100644
--- a/srcpkgs/trace-cmd/template
+++ b/srcpkgs/trace-cmd/template
@@ -1,37 +1,53 @@
# Template file for 'trace-cmd'
pkgname=trace-cmd
-version=2.9.1
+version=3.1.2
revision=1
wrksrc="${pkgname}-v${version}"
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="prefix=/usr libdir_relative=lib"
+make_build_target="all libs doc"
+make_install_args="$make_build_args"
+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=206672af60aa0bc35cfc44a4be746efa575bac729060e54b6453f7d5dfbcd979
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
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
+
+ if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
+ mv ${DESTDIR}/usr/lib64/pkgconfig ${DESTDIR}/usr/lib/pkgconfig
+ fi
+}
+
+libtracecmd_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/*.so.*"
+ }
}
-kernelshark_package() {
+libtracecmd-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
- short_desc="GUI for ftrace Linux kernel internal tracer"
+ short_desc+=" - development files"
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/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc/libtracecmd-doc
}
}
From 9f66612817a78a78ca07e5a3689c002195b1383f Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 03:07:55 -0400
Subject: [PATCH 4/4] kernelshark: split from trace-cmd, update to 2.1.1
---
common/shlibs | 1 +
srcpkgs/kernelshark/template | 38 ++++++++++++++++++++++++++++++++++++
srcpkgs/libkshark | 1 +
srcpkgs/libkshark-devel | 1 +
4 files changed, 41 insertions(+)
create mode 100644 srcpkgs/kernelshark/template
create mode 120000 srcpkgs/libkshark
create mode 120000 srcpkgs/libkshark-devel
diff --git a/common/shlibs b/common/shlibs
index d0efac27f360..9387807c0574 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4179,3 +4179,4 @@ libgbinder.so.1 libgbinder-1.1.20_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
+libkshark.so.2 libkshark-2.1.1_1
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
new file mode 100644
index 000000000000..18d5b9d7430c
--- /dev/null
+++ b/srcpkgs/kernelshark/template
@@ -0,0 +1,38 @@
+# Template file for 'kernelshark'
+pkgname=kernelshark
+reverts="2.9.1_1 2.9_1 2.8.3_2 2.8.3_1 2.8.2_1 2.8.1_1 2.7_2 2.7_1 2.6.2_1 2.6.1_1
+ 2.6_1 2.5.3_3 2.5.3_2 2.5.3_1 2.5.1_1 2.5_1 2.4_1"
+version=2.1.1
+revision=1
+wrksrc="kernel-shark-kernelshark-v${version}"
+build_style=cmake
+configure_args="-D_INSTALL_PREFIX=/usr"
+hostmakedepends="qt5-qmake qt5-host-tools pkg-config freefont-ttf"
+makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
+ libtraceevent-devel libtracefs-devel libtracecmd-devel"
+depends="freefont-ttf"
+short_desc="Front end reader of trace-cmd(1) output"
+maintainer="Leah Neukirchen <leah@vuxu.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.kernelshark.org"
+distfiles="https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/snapshot/kernel-shark-kernelshark-v${version}.tar.gz"
+checksum=78a0cf28bc06d0e43cd5a2512f83c02b7b5c969a26a0d4b56338154d6cf6f7be
+# requires externally-downloaded data and segfaults on some gui tests
+make_check=no
+
+libkshark_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/libkshark.so.*"
+ }
+}
+
+libkshark-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/libkshark b/srcpkgs/libkshark
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
diff --git a/srcpkgs/libkshark-devel b/srcpkgs/libkshark-devel
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark-devel
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR PATCH] [Updated] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (7 preceding siblings ...)
2022-08-23 8:57 ` [PR PATCH] [Updated] " classabbyamp
@ 2022-08-23 9:11 ` classabbyamp
2022-08-23 9:13 ` classabbyamp
` (45 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-23 9:11 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages update/trace-cmd-3.1.2
https://github.com/void-linux/void-packages/pull/38851
trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
- New package: libtraceevent-1.6.2
- New package: libtracefs-1.4.2
- trace-cmd: update to 3.1.2.
- kernelshark: split from trace-cmd, update to 2.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (builds & runs, but I'm not sure how to use this so I can't test further)
A patch file from https://github.com/void-linux/void-packages/pull/38851.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update/trace-cmd-3.1.2-38851.patch --]
[-- Type: text/x-diff, Size: 18072 bytes --]
From 35ab49325771e8476ab812505afad3c2bd949fce Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:37:06 -0400
Subject: [PATCH 1/4] New package: libtraceevent-1.6.2
---
common/shlibs | 1 +
srcpkgs/libtraceevent-devel | 1 +
srcpkgs/libtraceevent/template | 41 ++++++++++++++++++++++++++++++++++
3 files changed, 43 insertions(+)
create mode 120000 srcpkgs/libtraceevent-devel
create mode 100644 srcpkgs/libtraceevent/template
diff --git a/common/shlibs b/common/shlibs
index f829ee12e80f..9bd26c6c36c9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4176,3 +4176,4 @@ libsyncthingmodel.so.1.2.2 syncthingtray-1.2.2_1
libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
+libtraceevent.so.1 libtraceevent-1.6.2_1
diff --git a/srcpkgs/libtraceevent-devel b/srcpkgs/libtraceevent-devel
new file mode 120000
index 000000000000..9ca91c55529f
--- /dev/null
+++ b/srcpkgs/libtraceevent-devel
@@ -0,0 +1 @@
+libtraceevent
\ No newline at end of file
diff --git a/srcpkgs/libtraceevent/template b/srcpkgs/libtraceevent/template
new file mode 100644
index 000000000000..fbb5bec450c5
--- /dev/null
+++ b/srcpkgs/libtraceevent/template
@@ -0,0 +1,41 @@
+# Template file for 'libtraceevent'
+pkgname=libtraceevent
+version=1.6.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr"
+make_build_target="all doc"
+make_install_args="$make_build_args"
+make_install_target="install doc-install"
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace event library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-${version}.tar.gz"
+checksum=1aaeb12f5842a843a06b733e3f4230b0937ba9c2ecd39345edf6f66cc8cbe795
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ if [ "$CROSS_BUILD" ] && [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
+ mv ${DESTDIR}/usr/lib64/pkgconfig ${DESTDIR}/usr/lib/pkgconfig
+ fi
+}
+
+libtraceevent-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc
+ }
+}
From 0826f09bf8efd39475d2e0455baf1c0de46dba14 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:41:02 -0400
Subject: [PATCH 2/4] New package: libtracefs-1.4.2
---
common/shlibs | 1 +
srcpkgs/libtracefs-devel | 1 +
.../libtracefs/patches/musl-limits_h.patch | 10 +++++
srcpkgs/libtracefs/template | 45 +++++++++++++++++++
4 files changed, 57 insertions(+)
create mode 120000 srcpkgs/libtracefs-devel
create mode 100644 srcpkgs/libtracefs/patches/musl-limits_h.patch
create mode 100644 srcpkgs/libtracefs/template
diff --git a/common/shlibs b/common/shlibs
index 9bd26c6c36c9..cc3a69af2a2b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4177,3 +4177,4 @@ libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
libtraceevent.so.1 libtraceevent-1.6.2_1
+libtracefs.so.1 libtracefs-1.4.2_1
diff --git a/srcpkgs/libtracefs-devel b/srcpkgs/libtracefs-devel
new file mode 120000
index 000000000000..23466cce7993
--- /dev/null
+++ b/srcpkgs/libtracefs-devel
@@ -0,0 +1 @@
+libtracefs
\ No newline at end of file
diff --git a/srcpkgs/libtracefs/patches/musl-limits_h.patch b/srcpkgs/libtracefs/patches/musl-limits_h.patch
new file mode 100644
index 000000000000..b499fdceb66d
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl-limits_h.patch
@@ -0,0 +1,10 @@
+--- a/utest/tracefs-utest.c
++++ b/utest/tracefs-utest.c
+@@ -11,6 +11,7 @@
+ #include <time.h>
+ #include <dirent.h>
+ #include <ftw.h>
++#include <limits.h>
+
+ #include <CUnit/CUnit.h>
+ #include <CUnit/Basic.h>
diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template
new file mode 100644
index 000000000000..3d7be3ba7e65
--- /dev/null
+++ b/srcpkgs/libtracefs/template
@@ -0,0 +1,45 @@
+# Template file for 'libtracefs'
+pkgname=libtracefs
+version=1.4.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr"
+make_build_target="all doc"
+make_install_args="$make_build_args"
+make_install_target="install install_doc"
+make_use_env=yes
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+makedepends="libtraceevent-devel"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace file system library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-${version}.tar.gz"
+checksum=8ad03e6d2a6227f6eb11692d9f04614d3da60ac6c5e4fe436e59b2bed90f031b
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ # manpage for sample program
+ rm ${DESTDIR}/usr/share/man/man1/sqlhist.1
+
+ if [ "$CROSS_BUILD" ] && [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
+ mv ${DESTDIR}/usr/lib64/pkgconfig ${DESTDIR}/usr/lib/pkgconfig
+ fi
+}
+
+libtracefs-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From db1b4e345b9646bbb3539831e150d555b3434f1e Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 02:39:52 -0400
Subject: [PATCH 3/4] trace-cmd: update to 3.1.2.
---
common/shlibs | 1 +
srcpkgs/{kernelshark => libtracecmd} | 0
srcpkgs/libtracecmd-devel | 1 +
.../trace-cmd/patches/fix-program-name.patch | 23 --------
srcpkgs/trace-cmd/patches/musl-limits_h.patch | 44 ++++++++------
.../musl-no_pthread_attr_setaffinity_np.patch | 24 --------
.../trace-cmd/patches/musl-pthread_h.patch | 10 ----
srcpkgs/trace-cmd/template | 58 ++++++++++++-------
8 files changed, 66 insertions(+), 95 deletions(-)
rename srcpkgs/{kernelshark => libtracecmd} (100%)
create mode 120000 srcpkgs/libtracecmd-devel
delete mode 100644 srcpkgs/trace-cmd/patches/fix-program-name.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-pthread_h.patch
diff --git a/common/shlibs b/common/shlibs
index cc3a69af2a2b..d0efac27f360 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4178,3 +4178,4 @@ libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_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
diff --git a/srcpkgs/kernelshark b/srcpkgs/libtracecmd
similarity index 100%
rename from srcpkgs/kernelshark
rename to srcpkgs/libtracecmd
diff --git a/srcpkgs/libtracecmd-devel b/srcpkgs/libtracecmd-devel
new file mode 120000
index 000000000000..77b3407d0913
--- /dev/null
+++ b/srcpkgs/libtracecmd-devel
@@ -0,0 +1 @@
+trace-cmd
\ No newline at end of file
diff --git a/srcpkgs/trace-cmd/patches/fix-program-name.patch b/srcpkgs/trace-cmd/patches/fix-program-name.patch
deleted file mode 100644
index 970122246115..000000000000
--- a/srcpkgs/trace-cmd/patches/fix-program-name.patch
+++ /dev/null
@@ -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':
diff --git a/srcpkgs/trace-cmd/patches/musl-limits_h.patch b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
index 83e278c8ab9e..af90e89b8d75 100644
--- a/srcpkgs/trace-cmd/patches/musl-limits_h.patch
+++ b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
@@ -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>
diff --git a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch b/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
deleted file mode 100644
index 5203d3335c2b..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
+++ /dev/null
@@ -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);
-
diff --git a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch b/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
deleted file mode 100644
index 367588391845..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
+++ /dev/null
@@ -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 }
diff --git a/srcpkgs/trace-cmd/template b/srcpkgs/trace-cmd/template
index 34f9bcb40d42..70a94b1f7e7a 100644
--- a/srcpkgs/trace-cmd/template
+++ b/srcpkgs/trace-cmd/template
@@ -1,37 +1,53 @@
# Template file for 'trace-cmd'
pkgname=trace-cmd
-version=2.9.1
+version=3.1.2
revision=1
wrksrc="${pkgname}-v${version}"
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="prefix=/usr libdir_relative=lib"
+make_build_target="all libs doc"
+make_install_args="$make_build_args"
+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=206672af60aa0bc35cfc44a4be746efa575bac729060e54b6453f7d5dfbcd979
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
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
+
+ if [ "$CROSS_BUILD" ] && [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
+ mv ${DESTDIR}/usr/lib64/pkgconfig ${DESTDIR}/usr/lib/pkgconfig
+ fi
+}
+
+libtracecmd_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/*.so.*"
+ }
}
-kernelshark_package() {
+libtracecmd-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
- short_desc="GUI for ftrace Linux kernel internal tracer"
+ short_desc+=" - development files"
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/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc/libtracecmd-doc
}
}
From bf6c7b103bbdcf5769c1ece8ab91ccde1f9cb204 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 03:07:55 -0400
Subject: [PATCH 4/4] kernelshark: split from trace-cmd, update to 2.1.1
---
common/shlibs | 1 +
srcpkgs/kernelshark/template | 38 ++++++++++++++++++++++++++++++++++++
srcpkgs/libkshark | 1 +
srcpkgs/libkshark-devel | 1 +
4 files changed, 41 insertions(+)
create mode 100644 srcpkgs/kernelshark/template
create mode 120000 srcpkgs/libkshark
create mode 120000 srcpkgs/libkshark-devel
diff --git a/common/shlibs b/common/shlibs
index d0efac27f360..9387807c0574 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4179,3 +4179,4 @@ libgbinder.so.1 libgbinder-1.1.20_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
+libkshark.so.2 libkshark-2.1.1_1
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
new file mode 100644
index 000000000000..18d5b9d7430c
--- /dev/null
+++ b/srcpkgs/kernelshark/template
@@ -0,0 +1,38 @@
+# Template file for 'kernelshark'
+pkgname=kernelshark
+reverts="2.9.1_1 2.9_1 2.8.3_2 2.8.3_1 2.8.2_1 2.8.1_1 2.7_2 2.7_1 2.6.2_1 2.6.1_1
+ 2.6_1 2.5.3_3 2.5.3_2 2.5.3_1 2.5.1_1 2.5_1 2.4_1"
+version=2.1.1
+revision=1
+wrksrc="kernel-shark-kernelshark-v${version}"
+build_style=cmake
+configure_args="-D_INSTALL_PREFIX=/usr"
+hostmakedepends="qt5-qmake qt5-host-tools pkg-config freefont-ttf"
+makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
+ libtraceevent-devel libtracefs-devel libtracecmd-devel"
+depends="freefont-ttf"
+short_desc="Front end reader of trace-cmd(1) output"
+maintainer="Leah Neukirchen <leah@vuxu.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.kernelshark.org"
+distfiles="https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/snapshot/kernel-shark-kernelshark-v${version}.tar.gz"
+checksum=78a0cf28bc06d0e43cd5a2512f83c02b7b5c969a26a0d4b56338154d6cf6f7be
+# requires externally-downloaded data and segfaults on some gui tests
+make_check=no
+
+libkshark_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/libkshark.so.*"
+ }
+}
+
+libkshark-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/libkshark b/srcpkgs/libkshark
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
diff --git a/srcpkgs/libkshark-devel b/srcpkgs/libkshark-devel
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark-devel
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (8 preceding siblings ...)
2022-08-23 9:11 ` classabbyamp
@ 2022-08-23 9:13 ` classabbyamp
2022-08-23 14:37 ` sgn
` (44 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-23 9:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2292 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#issuecomment-1223788017
Comment:
no clue why it's not finding libtracecmd:
```
CMake Debug Log at build/FindTraceCmd.cmake:49 (find_library):
find_library called with the following settings:
VAR: TraceCmd_LIBRARY
NAMES: "tracecmd"
"libtracecmd"
Documentation: Path to a library.
Framework
Only Search Frameworks: 0
Search Frameworks Last: 0
Search Frameworks First: 0
AppBundle
Only Search AppBundle: 0
Search AppBundle Last: 0
Search AppBundle First: 0
CMAKE_FIND_USE_CMAKE_PATH: 1
CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: 1
CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: 1
CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: 1
find_library considered the following locations:
/usr/lib/(lib)tracecmd(\.so|\.a)
/builddir/.xbps-kernelshark/wrappers/(lib)tracecmd(\.so|\.a)
/usr/lib/ccache/bin/(lib)tracecmd(\.so|\.a)
/usr/bin/(lib)tracecmd(\.so|\.a)
/usr/local/bin/(lib)tracecmd(\.so|\.a)
/bin/(lib)tracecmd(\.so|\.a)
/usr/local/sbin/(lib)tracecmd(\.so|\.a)
/usr/sbin/(lib)tracecmd(\.so|\.a)
/sbin/(lib)tracecmd(\.so|\.a)
/usr/local/lib/(lib)tracecmd(\.so|\.a)
/usr/local/(lib)tracecmd(\.so|\.a)
/usr/(lib)tracecmd(\.so|\.a)
/lib/(lib)tracecmd(\.so|\.a)
/opt/(lib)tracecmd(\.so|\.a)
/usr/lib/(lib)libtracecmd(\.so|\.a)
/builddir/.xbps-kernelshark/wrappers/(lib)libtracecmd(\.so|\.a)
/usr/lib/ccache/bin/(lib)libtracecmd(\.so|\.a)
/usr/bin/(lib)libtracecmd(\.so|\.a)
/usr/local/bin/(lib)libtracecmd(\.so|\.a)
/bin/(lib)libtracecmd(\.so|\.a)
/usr/local/sbin/(lib)libtracecmd(\.so|\.a)
/usr/sbin/(lib)libtracecmd(\.so|\.a)
/sbin/(lib)libtracecmd(\.so|\.a)
/usr/local/lib/(lib)libtracecmd(\.so|\.a)
/usr/local/(lib)libtracecmd(\.so|\.a)
/usr/(lib)libtracecmd(\.so|\.a)
/lib/(lib)libtracecmd(\.so|\.a)
/opt/(lib)libtracecmd(\.so|\.a)
The item was not found.
```
because the pkgconfig file for that library lists `libdir=/usr/lib` and the file exists in libtracecmd-devel:
```
/usr/lib/libtracecmd.so -> /usr/lib/libtracecmd.so.1
```
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (9 preceding siblings ...)
2022-08-23 9:13 ` classabbyamp
@ 2022-08-23 14:37 ` sgn
2022-08-23 14:38 ` [PR REVIEW] " sgn
` (43 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: sgn @ 2022-08-23 14:37 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 697 bytes --]
New comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#issuecomment-1224167966
Comment:
```diff
srcpkgs/trace-cmd/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/trace-cmd/template b/srcpkgs/trace-cmd/template
index 70a94b1f7e..d5dab1af67 100644
--- a/srcpkgs/trace-cmd/template
+++ b/srcpkgs/trace-cmd/template
@@ -41,7 +41,7 @@ libtracecmd_package() {
}
libtracecmd-devel_package() {
- depends="${sourcepkg}>=${version}_${revision}"
+ depends="libtracecmd>=${version}_${revision} libtracefs-devel"
short_desc+=" - development files"
pkg_install() {
vmove usr/share/man/man3
```
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR REVIEW] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (10 preceding siblings ...)
2022-08-23 14:37 ` sgn
@ 2022-08-23 14:38 ` sgn
2022-08-23 14:39 ` sgn
` (42 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: sgn @ 2022-08-23 14:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 226 bytes --]
New review comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#discussion_r952714989
Comment:
```suggestion
depends="libtracecmd>=${version}_${revision} libtracefs-devel"
```
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR REVIEW] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (11 preceding siblings ...)
2022-08-23 14:38 ` [PR REVIEW] " sgn
@ 2022-08-23 14:39 ` sgn
2022-08-23 16:00 ` [PR PATCH] [Updated] " sgn
` (41 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: sgn @ 2022-08-23 14:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 230 bytes --]
New review comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#discussion_r952715946
Comment:
```suggestion
depends="${sourcepkg}>=${version}_${revision} libtraceevent-devel"
```
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR PATCH] [Updated] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (12 preceding siblings ...)
2022-08-23 14:39 ` sgn
@ 2022-08-23 16:00 ` sgn
2022-08-23 16:16 ` sgn
` (40 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: sgn @ 2022-08-23 16:00 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 753 bytes --]
There is an updated pull request by sgn against master on the void-packages repository
https://github.com/classabbyamp/void-packages update/trace-cmd-3.1.2
https://github.com/void-linux/void-packages/pull/38851
trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
- New package: libtraceevent-1.6.2
- New package: libtracefs-1.4.2
- trace-cmd: update to 3.1.2.
- kernelshark: split from trace-cmd, update to 2.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (builds & runs, but I'm not sure how to use this so I can't test further)
A patch file from https://github.com/void-linux/void-packages/pull/38851.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update/trace-cmd-3.1.2-38851.patch --]
[-- Type: text/x-diff, Size: 23610 bytes --]
From 35ab49325771e8476ab812505afad3c2bd949fce Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:37:06 -0400
Subject: [PATCH 1/7] New package: libtraceevent-1.6.2
---
common/shlibs | 1 +
srcpkgs/libtraceevent-devel | 1 +
srcpkgs/libtraceevent/template | 41 ++++++++++++++++++++++++++++++++++
3 files changed, 43 insertions(+)
create mode 120000 srcpkgs/libtraceevent-devel
create mode 100644 srcpkgs/libtraceevent/template
diff --git a/common/shlibs b/common/shlibs
index f829ee12e80f..9bd26c6c36c9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4176,3 +4176,4 @@ libsyncthingmodel.so.1.2.2 syncthingtray-1.2.2_1
libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
+libtraceevent.so.1 libtraceevent-1.6.2_1
diff --git a/srcpkgs/libtraceevent-devel b/srcpkgs/libtraceevent-devel
new file mode 120000
index 000000000000..9ca91c55529f
--- /dev/null
+++ b/srcpkgs/libtraceevent-devel
@@ -0,0 +1 @@
+libtraceevent
\ No newline at end of file
diff --git a/srcpkgs/libtraceevent/template b/srcpkgs/libtraceevent/template
new file mode 100644
index 000000000000..fbb5bec450c5
--- /dev/null
+++ b/srcpkgs/libtraceevent/template
@@ -0,0 +1,41 @@
+# Template file for 'libtraceevent'
+pkgname=libtraceevent
+version=1.6.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr"
+make_build_target="all doc"
+make_install_args="$make_build_args"
+make_install_target="install doc-install"
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace event library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-${version}.tar.gz"
+checksum=1aaeb12f5842a843a06b733e3f4230b0937ba9c2ecd39345edf6f66cc8cbe795
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ if [ "$CROSS_BUILD" ] && [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
+ mv ${DESTDIR}/usr/lib64/pkgconfig ${DESTDIR}/usr/lib/pkgconfig
+ fi
+}
+
+libtraceevent-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc
+ }
+}
From 0826f09bf8efd39475d2e0455baf1c0de46dba14 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:41:02 -0400
Subject: [PATCH 2/7] New package: libtracefs-1.4.2
---
common/shlibs | 1 +
srcpkgs/libtracefs-devel | 1 +
.../libtracefs/patches/musl-limits_h.patch | 10 +++++
srcpkgs/libtracefs/template | 45 +++++++++++++++++++
4 files changed, 57 insertions(+)
create mode 120000 srcpkgs/libtracefs-devel
create mode 100644 srcpkgs/libtracefs/patches/musl-limits_h.patch
create mode 100644 srcpkgs/libtracefs/template
diff --git a/common/shlibs b/common/shlibs
index 9bd26c6c36c9..cc3a69af2a2b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4177,3 +4177,4 @@ libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
libtraceevent.so.1 libtraceevent-1.6.2_1
+libtracefs.so.1 libtracefs-1.4.2_1
diff --git a/srcpkgs/libtracefs-devel b/srcpkgs/libtracefs-devel
new file mode 120000
index 000000000000..23466cce7993
--- /dev/null
+++ b/srcpkgs/libtracefs-devel
@@ -0,0 +1 @@
+libtracefs
\ No newline at end of file
diff --git a/srcpkgs/libtracefs/patches/musl-limits_h.patch b/srcpkgs/libtracefs/patches/musl-limits_h.patch
new file mode 100644
index 000000000000..b499fdceb66d
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl-limits_h.patch
@@ -0,0 +1,10 @@
+--- a/utest/tracefs-utest.c
++++ b/utest/tracefs-utest.c
+@@ -11,6 +11,7 @@
+ #include <time.h>
+ #include <dirent.h>
+ #include <ftw.h>
++#include <limits.h>
+
+ #include <CUnit/CUnit.h>
+ #include <CUnit/Basic.h>
diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template
new file mode 100644
index 000000000000..3d7be3ba7e65
--- /dev/null
+++ b/srcpkgs/libtracefs/template
@@ -0,0 +1,45 @@
+# Template file for 'libtracefs'
+pkgname=libtracefs
+version=1.4.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr"
+make_build_target="all doc"
+make_install_args="$make_build_args"
+make_install_target="install install_doc"
+make_use_env=yes
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+makedepends="libtraceevent-devel"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace file system library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-${version}.tar.gz"
+checksum=8ad03e6d2a6227f6eb11692d9f04614d3da60ac6c5e4fe436e59b2bed90f031b
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ # manpage for sample program
+ rm ${DESTDIR}/usr/share/man/man1/sqlhist.1
+
+ if [ "$CROSS_BUILD" ] && [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
+ mv ${DESTDIR}/usr/lib64/pkgconfig ${DESTDIR}/usr/lib/pkgconfig
+ fi
+}
+
+libtracefs-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From db1b4e345b9646bbb3539831e150d555b3434f1e Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 02:39:52 -0400
Subject: [PATCH 3/7] trace-cmd: update to 3.1.2.
---
common/shlibs | 1 +
srcpkgs/{kernelshark => libtracecmd} | 0
srcpkgs/libtracecmd-devel | 1 +
.../trace-cmd/patches/fix-program-name.patch | 23 --------
srcpkgs/trace-cmd/patches/musl-limits_h.patch | 44 ++++++++------
.../musl-no_pthread_attr_setaffinity_np.patch | 24 --------
.../trace-cmd/patches/musl-pthread_h.patch | 10 ----
srcpkgs/trace-cmd/template | 58 ++++++++++++-------
8 files changed, 66 insertions(+), 95 deletions(-)
rename srcpkgs/{kernelshark => libtracecmd} (100%)
create mode 120000 srcpkgs/libtracecmd-devel
delete mode 100644 srcpkgs/trace-cmd/patches/fix-program-name.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-pthread_h.patch
diff --git a/common/shlibs b/common/shlibs
index cc3a69af2a2b..d0efac27f360 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4178,3 +4178,4 @@ libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_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
diff --git a/srcpkgs/kernelshark b/srcpkgs/libtracecmd
similarity index 100%
rename from srcpkgs/kernelshark
rename to srcpkgs/libtracecmd
diff --git a/srcpkgs/libtracecmd-devel b/srcpkgs/libtracecmd-devel
new file mode 120000
index 000000000000..77b3407d0913
--- /dev/null
+++ b/srcpkgs/libtracecmd-devel
@@ -0,0 +1 @@
+trace-cmd
\ No newline at end of file
diff --git a/srcpkgs/trace-cmd/patches/fix-program-name.patch b/srcpkgs/trace-cmd/patches/fix-program-name.patch
deleted file mode 100644
index 970122246115..000000000000
--- a/srcpkgs/trace-cmd/patches/fix-program-name.patch
+++ /dev/null
@@ -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':
diff --git a/srcpkgs/trace-cmd/patches/musl-limits_h.patch b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
index 83e278c8ab9e..af90e89b8d75 100644
--- a/srcpkgs/trace-cmd/patches/musl-limits_h.patch
+++ b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
@@ -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>
diff --git a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch b/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
deleted file mode 100644
index 5203d3335c2b..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
+++ /dev/null
@@ -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);
-
diff --git a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch b/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
deleted file mode 100644
index 367588391845..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
+++ /dev/null
@@ -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 }
diff --git a/srcpkgs/trace-cmd/template b/srcpkgs/trace-cmd/template
index 34f9bcb40d42..70a94b1f7e7a 100644
--- a/srcpkgs/trace-cmd/template
+++ b/srcpkgs/trace-cmd/template
@@ -1,37 +1,53 @@
# Template file for 'trace-cmd'
pkgname=trace-cmd
-version=2.9.1
+version=3.1.2
revision=1
wrksrc="${pkgname}-v${version}"
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="prefix=/usr libdir_relative=lib"
+make_build_target="all libs doc"
+make_install_args="$make_build_args"
+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=206672af60aa0bc35cfc44a4be746efa575bac729060e54b6453f7d5dfbcd979
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
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
+
+ if [ "$CROSS_BUILD" ] && [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
+ mv ${DESTDIR}/usr/lib64/pkgconfig ${DESTDIR}/usr/lib/pkgconfig
+ fi
+}
+
+libtracecmd_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/*.so.*"
+ }
}
-kernelshark_package() {
+libtracecmd-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
- short_desc="GUI for ftrace Linux kernel internal tracer"
+ short_desc+=" - development files"
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/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc/libtracecmd-doc
}
}
From bf6c7b103bbdcf5769c1ece8ab91ccde1f9cb204 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 03:07:55 -0400
Subject: [PATCH 4/7] kernelshark: split from trace-cmd, update to 2.1.1
---
common/shlibs | 1 +
srcpkgs/kernelshark/template | 38 ++++++++++++++++++++++++++++++++++++
srcpkgs/libkshark | 1 +
srcpkgs/libkshark-devel | 1 +
4 files changed, 41 insertions(+)
create mode 100644 srcpkgs/kernelshark/template
create mode 120000 srcpkgs/libkshark
create mode 120000 srcpkgs/libkshark-devel
diff --git a/common/shlibs b/common/shlibs
index d0efac27f360..9387807c0574 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4179,3 +4179,4 @@ libgbinder.so.1 libgbinder-1.1.20_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
+libkshark.so.2 libkshark-2.1.1_1
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
new file mode 100644
index 000000000000..18d5b9d7430c
--- /dev/null
+++ b/srcpkgs/kernelshark/template
@@ -0,0 +1,38 @@
+# Template file for 'kernelshark'
+pkgname=kernelshark
+reverts="2.9.1_1 2.9_1 2.8.3_2 2.8.3_1 2.8.2_1 2.8.1_1 2.7_2 2.7_1 2.6.2_1 2.6.1_1
+ 2.6_1 2.5.3_3 2.5.3_2 2.5.3_1 2.5.1_1 2.5_1 2.4_1"
+version=2.1.1
+revision=1
+wrksrc="kernel-shark-kernelshark-v${version}"
+build_style=cmake
+configure_args="-D_INSTALL_PREFIX=/usr"
+hostmakedepends="qt5-qmake qt5-host-tools pkg-config freefont-ttf"
+makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
+ libtraceevent-devel libtracefs-devel libtracecmd-devel"
+depends="freefont-ttf"
+short_desc="Front end reader of trace-cmd(1) output"
+maintainer="Leah Neukirchen <leah@vuxu.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.kernelshark.org"
+distfiles="https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/snapshot/kernel-shark-kernelshark-v${version}.tar.gz"
+checksum=78a0cf28bc06d0e43cd5a2512f83c02b7b5c969a26a0d4b56338154d6cf6f7be
+# requires externally-downloaded data and segfaults on some gui tests
+make_check=no
+
+libkshark_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/libkshark.so.*"
+ }
+}
+
+libkshark-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/libkshark b/srcpkgs/libkshark
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
diff --git a/srcpkgs/libkshark-devel b/srcpkgs/libkshark-devel
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark-devel
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
From 855079028903c7d90456b73d8dd470edd83a21c6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Tue, 23 Aug 2022 22:33:22 +0700
Subject: [PATCH 5/7] fixup! New package: libtraceevent-1.6.2
---
srcpkgs/libtraceevent/template | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/srcpkgs/libtraceevent/template b/srcpkgs/libtraceevent/template
index fbb5bec450c5..c472a5002337 100644
--- a/srcpkgs/libtraceevent/template
+++ b/srcpkgs/libtraceevent/template
@@ -3,9 +3,9 @@ pkgname=libtraceevent
version=1.6.2
revision=1
build_style=gnu-makefile
-make_build_args="prefix=/usr"
+make_build_args="prefix=/usr libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
make_build_target="all doc"
-make_install_args="$make_build_args"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
make_install_target="install doc-install"
hostmakedepends="asciidoc xmlto source-highlight pkg-config"
checkdepends="CUnit-devel"
@@ -21,12 +21,6 @@ do_check() {
utest/trace-utest
}
-post_install() {
- if [ "$CROSS_BUILD" ] && [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
- mv ${DESTDIR}/usr/lib64/pkgconfig ${DESTDIR}/usr/lib/pkgconfig
- fi
-}
-
libtraceevent-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
From aad6ddf37b298c9bd692c5da79c4267150953d4e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Tue, 23 Aug 2022 22:52:42 +0700
Subject: [PATCH 6/7] fixup! New package: libtracefs-1.4.2
---
srcpkgs/libtracefs/patches/musl.patch | 15 +++++++++++++++
srcpkgs/libtracefs/template | 11 ++++-------
2 files changed, 19 insertions(+), 7 deletions(-)
create mode 100644 srcpkgs/libtracefs/patches/musl.patch
diff --git a/srcpkgs/libtracefs/patches/musl.patch b/srcpkgs/libtracefs/patches/musl.patch
new file mode 100644
index 000000000000..b30126ce5736
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl.patch
@@ -0,0 +1,15 @@
+--- a/include/tracefs.h
++++ b/include/tracefs.h
+@@ -10,6 +10,12 @@
+ #include <sched.h>
+ #include <event-parse.h>
+
++#ifndef _GNU_SOURCE
++/* See CPU_SET(3) */
++struct cpu_set_t;
++typedef struct cpu_set_t cpu_set_t;
++#endif
++
+ char *tracefs_get_tracing_file(const char *name);
+ void tracefs_put_tracing_file(char *name);
+
diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template
index 3d7be3ba7e65..424e7bb72843 100644
--- a/srcpkgs/libtracefs/template
+++ b/srcpkgs/libtracefs/template
@@ -3,9 +3,9 @@ pkgname=libtracefs
version=1.4.2
revision=1
build_style=gnu-makefile
-make_build_args="prefix=/usr"
+make_build_args="prefix=/usr libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
make_build_target="all doc"
-make_install_args="$make_build_args"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
make_install_target="install install_doc"
make_use_env=yes
hostmakedepends="asciidoc xmlto source-highlight pkg-config"
@@ -26,16 +26,13 @@ do_check() {
post_install() {
# manpage for sample program
rm ${DESTDIR}/usr/share/man/man1/sqlhist.1
-
- if [ "$CROSS_BUILD" ] && [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
- mv ${DESTDIR}/usr/lib64/pkgconfig ${DESTDIR}/usr/lib/pkgconfig
- fi
}
libtracefs-devel_package() {
- depends="${sourcepkg}>=${version}_${revision}"
+ depends="${sourcepkg}>=${version}_${revision} libtraceevent-devel"
short_desc+=" - development files"
pkg_install() {
+ vmove usr/share/doc
vmove usr/share/man/man3
vmove usr/include
vmove usr/lib/pkgconfig
From cb48deb4a72b3b0f79c417359b4b80a7e60efba4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Tue, 23 Aug 2022 22:56:47 +0700
Subject: [PATCH 7/7] fixup! kernelshark: split from trace-cmd, update to 2.1.1
---
srcpkgs/kernelshark/patches/musl.patch | 20 ++++++++++++++++++++
srcpkgs/kernelshark/template | 5 +++--
2 files changed, 23 insertions(+), 2 deletions(-)
create mode 100644 srcpkgs/kernelshark/patches/musl.patch
diff --git a/srcpkgs/kernelshark/patches/musl.patch b/srcpkgs/kernelshark/patches/musl.patch
new file mode 100644
index 000000000000..e02fddb486c7
--- /dev/null
+++ b/srcpkgs/kernelshark/patches/musl.patch
@@ -0,0 +1,20 @@
+--- a/src/libkshark.h
++++ b/src/libkshark.h
+@@ -17,6 +17,7 @@
+ #include <string.h>
+ #include <pthread.h>
+ #include <errno.h>
++#include <sys/types.h>
+
+ // Json-C
+ #include <json-c/json.h>
+--- a/src/kernelshark.cpp
++++ b/src/kernelshark.cpp
+@@ -7,6 +7,7 @@
+ // C
+ #include <sys/stat.h>
+ #include <getopt.h>
++#include <libgen.h>
+
+ // Qt
+ #include <QApplication>
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
index 18d5b9d7430c..966359c725b0 100644
--- a/srcpkgs/kernelshark/template
+++ b/srcpkgs/kernelshark/template
@@ -6,11 +6,12 @@ version=2.1.1
revision=1
wrksrc="kernel-shark-kernelshark-v${version}"
build_style=cmake
-configure_args="-D_INSTALL_PREFIX=/usr"
+configure_args="-D_INSTALL_PREFIX=/usr
+ -DTRACECMD_EXECUTABLE=/usr/bin/trace-cmd"
hostmakedepends="qt5-qmake qt5-host-tools pkg-config freefont-ttf"
makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
libtraceevent-devel libtracefs-devel libtracecmd-devel"
-depends="freefont-ttf"
+depends="freefont-ttf trace-cmd"
short_desc="Front end reader of trace-cmd(1) output"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="GPL-3.0-or-later"
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR PATCH] [Updated] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (13 preceding siblings ...)
2022-08-23 16:00 ` [PR PATCH] [Updated] " sgn
@ 2022-08-23 16:16 ` sgn
2022-08-23 16:18 ` sgn
` (39 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: sgn @ 2022-08-23 16:16 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 753 bytes --]
There is an updated pull request by sgn against master on the void-packages repository
https://github.com/classabbyamp/void-packages update/trace-cmd-3.1.2
https://github.com/void-linux/void-packages/pull/38851
trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
- New package: libtraceevent-1.6.2
- New package: libtracefs-1.4.2
- trace-cmd: update to 3.1.2.
- kernelshark: split from trace-cmd, update to 2.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (builds & runs, but I'm not sure how to use this so I can't test further)
A patch file from https://github.com/void-linux/void-packages/pull/38851.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update/trace-cmd-3.1.2-38851.patch --]
[-- Type: text/x-diff, Size: 24837 bytes --]
From 35ab49325771e8476ab812505afad3c2bd949fce Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:37:06 -0400
Subject: [PATCH 1/8] New package: libtraceevent-1.6.2
---
common/shlibs | 1 +
srcpkgs/libtraceevent-devel | 1 +
srcpkgs/libtraceevent/template | 41 ++++++++++++++++++++++++++++++++++
3 files changed, 43 insertions(+)
create mode 120000 srcpkgs/libtraceevent-devel
create mode 100644 srcpkgs/libtraceevent/template
diff --git a/common/shlibs b/common/shlibs
index f829ee12e80f..9bd26c6c36c9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4176,3 +4176,4 @@ libsyncthingmodel.so.1.2.2 syncthingtray-1.2.2_1
libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
+libtraceevent.so.1 libtraceevent-1.6.2_1
diff --git a/srcpkgs/libtraceevent-devel b/srcpkgs/libtraceevent-devel
new file mode 120000
index 000000000000..9ca91c55529f
--- /dev/null
+++ b/srcpkgs/libtraceevent-devel
@@ -0,0 +1 @@
+libtraceevent
\ No newline at end of file
diff --git a/srcpkgs/libtraceevent/template b/srcpkgs/libtraceevent/template
new file mode 100644
index 000000000000..fbb5bec450c5
--- /dev/null
+++ b/srcpkgs/libtraceevent/template
@@ -0,0 +1,41 @@
+# Template file for 'libtraceevent'
+pkgname=libtraceevent
+version=1.6.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr"
+make_build_target="all doc"
+make_install_args="$make_build_args"
+make_install_target="install doc-install"
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace event library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-${version}.tar.gz"
+checksum=1aaeb12f5842a843a06b733e3f4230b0937ba9c2ecd39345edf6f66cc8cbe795
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ if [ "$CROSS_BUILD" ] && [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
+ mv ${DESTDIR}/usr/lib64/pkgconfig ${DESTDIR}/usr/lib/pkgconfig
+ fi
+}
+
+libtraceevent-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc
+ }
+}
From 0826f09bf8efd39475d2e0455baf1c0de46dba14 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:41:02 -0400
Subject: [PATCH 2/8] New package: libtracefs-1.4.2
---
common/shlibs | 1 +
srcpkgs/libtracefs-devel | 1 +
.../libtracefs/patches/musl-limits_h.patch | 10 +++++
srcpkgs/libtracefs/template | 45 +++++++++++++++++++
4 files changed, 57 insertions(+)
create mode 120000 srcpkgs/libtracefs-devel
create mode 100644 srcpkgs/libtracefs/patches/musl-limits_h.patch
create mode 100644 srcpkgs/libtracefs/template
diff --git a/common/shlibs b/common/shlibs
index 9bd26c6c36c9..cc3a69af2a2b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4177,3 +4177,4 @@ libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
libtraceevent.so.1 libtraceevent-1.6.2_1
+libtracefs.so.1 libtracefs-1.4.2_1
diff --git a/srcpkgs/libtracefs-devel b/srcpkgs/libtracefs-devel
new file mode 120000
index 000000000000..23466cce7993
--- /dev/null
+++ b/srcpkgs/libtracefs-devel
@@ -0,0 +1 @@
+libtracefs
\ No newline at end of file
diff --git a/srcpkgs/libtracefs/patches/musl-limits_h.patch b/srcpkgs/libtracefs/patches/musl-limits_h.patch
new file mode 100644
index 000000000000..b499fdceb66d
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl-limits_h.patch
@@ -0,0 +1,10 @@
+--- a/utest/tracefs-utest.c
++++ b/utest/tracefs-utest.c
+@@ -11,6 +11,7 @@
+ #include <time.h>
+ #include <dirent.h>
+ #include <ftw.h>
++#include <limits.h>
+
+ #include <CUnit/CUnit.h>
+ #include <CUnit/Basic.h>
diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template
new file mode 100644
index 000000000000..3d7be3ba7e65
--- /dev/null
+++ b/srcpkgs/libtracefs/template
@@ -0,0 +1,45 @@
+# Template file for 'libtracefs'
+pkgname=libtracefs
+version=1.4.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr"
+make_build_target="all doc"
+make_install_args="$make_build_args"
+make_install_target="install install_doc"
+make_use_env=yes
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+makedepends="libtraceevent-devel"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace file system library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-${version}.tar.gz"
+checksum=8ad03e6d2a6227f6eb11692d9f04614d3da60ac6c5e4fe436e59b2bed90f031b
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ # manpage for sample program
+ rm ${DESTDIR}/usr/share/man/man1/sqlhist.1
+
+ if [ "$CROSS_BUILD" ] && [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
+ mv ${DESTDIR}/usr/lib64/pkgconfig ${DESTDIR}/usr/lib/pkgconfig
+ fi
+}
+
+libtracefs-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From db1b4e345b9646bbb3539831e150d555b3434f1e Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 02:39:52 -0400
Subject: [PATCH 3/8] trace-cmd: update to 3.1.2.
---
common/shlibs | 1 +
srcpkgs/{kernelshark => libtracecmd} | 0
srcpkgs/libtracecmd-devel | 1 +
.../trace-cmd/patches/fix-program-name.patch | 23 --------
srcpkgs/trace-cmd/patches/musl-limits_h.patch | 44 ++++++++------
.../musl-no_pthread_attr_setaffinity_np.patch | 24 --------
.../trace-cmd/patches/musl-pthread_h.patch | 10 ----
srcpkgs/trace-cmd/template | 58 ++++++++++++-------
8 files changed, 66 insertions(+), 95 deletions(-)
rename srcpkgs/{kernelshark => libtracecmd} (100%)
create mode 120000 srcpkgs/libtracecmd-devel
delete mode 100644 srcpkgs/trace-cmd/patches/fix-program-name.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-pthread_h.patch
diff --git a/common/shlibs b/common/shlibs
index cc3a69af2a2b..d0efac27f360 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4178,3 +4178,4 @@ libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_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
diff --git a/srcpkgs/kernelshark b/srcpkgs/libtracecmd
similarity index 100%
rename from srcpkgs/kernelshark
rename to srcpkgs/libtracecmd
diff --git a/srcpkgs/libtracecmd-devel b/srcpkgs/libtracecmd-devel
new file mode 120000
index 000000000000..77b3407d0913
--- /dev/null
+++ b/srcpkgs/libtracecmd-devel
@@ -0,0 +1 @@
+trace-cmd
\ No newline at end of file
diff --git a/srcpkgs/trace-cmd/patches/fix-program-name.patch b/srcpkgs/trace-cmd/patches/fix-program-name.patch
deleted file mode 100644
index 970122246115..000000000000
--- a/srcpkgs/trace-cmd/patches/fix-program-name.patch
+++ /dev/null
@@ -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':
diff --git a/srcpkgs/trace-cmd/patches/musl-limits_h.patch b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
index 83e278c8ab9e..af90e89b8d75 100644
--- a/srcpkgs/trace-cmd/patches/musl-limits_h.patch
+++ b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
@@ -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>
diff --git a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch b/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
deleted file mode 100644
index 5203d3335c2b..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
+++ /dev/null
@@ -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);
-
diff --git a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch b/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
deleted file mode 100644
index 367588391845..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
+++ /dev/null
@@ -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 }
diff --git a/srcpkgs/trace-cmd/template b/srcpkgs/trace-cmd/template
index 34f9bcb40d42..70a94b1f7e7a 100644
--- a/srcpkgs/trace-cmd/template
+++ b/srcpkgs/trace-cmd/template
@@ -1,37 +1,53 @@
# Template file for 'trace-cmd'
pkgname=trace-cmd
-version=2.9.1
+version=3.1.2
revision=1
wrksrc="${pkgname}-v${version}"
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="prefix=/usr libdir_relative=lib"
+make_build_target="all libs doc"
+make_install_args="$make_build_args"
+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=206672af60aa0bc35cfc44a4be746efa575bac729060e54b6453f7d5dfbcd979
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
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
+
+ if [ "$CROSS_BUILD" ] && [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
+ mv ${DESTDIR}/usr/lib64/pkgconfig ${DESTDIR}/usr/lib/pkgconfig
+ fi
+}
+
+libtracecmd_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/*.so.*"
+ }
}
-kernelshark_package() {
+libtracecmd-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
- short_desc="GUI for ftrace Linux kernel internal tracer"
+ short_desc+=" - development files"
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/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc/libtracecmd-doc
}
}
From bf6c7b103bbdcf5769c1ece8ab91ccde1f9cb204 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 03:07:55 -0400
Subject: [PATCH 4/8] kernelshark: split from trace-cmd, update to 2.1.1
---
common/shlibs | 1 +
srcpkgs/kernelshark/template | 38 ++++++++++++++++++++++++++++++++++++
srcpkgs/libkshark | 1 +
srcpkgs/libkshark-devel | 1 +
4 files changed, 41 insertions(+)
create mode 100644 srcpkgs/kernelshark/template
create mode 120000 srcpkgs/libkshark
create mode 120000 srcpkgs/libkshark-devel
diff --git a/common/shlibs b/common/shlibs
index d0efac27f360..9387807c0574 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4179,3 +4179,4 @@ libgbinder.so.1 libgbinder-1.1.20_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
+libkshark.so.2 libkshark-2.1.1_1
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
new file mode 100644
index 000000000000..18d5b9d7430c
--- /dev/null
+++ b/srcpkgs/kernelshark/template
@@ -0,0 +1,38 @@
+# Template file for 'kernelshark'
+pkgname=kernelshark
+reverts="2.9.1_1 2.9_1 2.8.3_2 2.8.3_1 2.8.2_1 2.8.1_1 2.7_2 2.7_1 2.6.2_1 2.6.1_1
+ 2.6_1 2.5.3_3 2.5.3_2 2.5.3_1 2.5.1_1 2.5_1 2.4_1"
+version=2.1.1
+revision=1
+wrksrc="kernel-shark-kernelshark-v${version}"
+build_style=cmake
+configure_args="-D_INSTALL_PREFIX=/usr"
+hostmakedepends="qt5-qmake qt5-host-tools pkg-config freefont-ttf"
+makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
+ libtraceevent-devel libtracefs-devel libtracecmd-devel"
+depends="freefont-ttf"
+short_desc="Front end reader of trace-cmd(1) output"
+maintainer="Leah Neukirchen <leah@vuxu.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.kernelshark.org"
+distfiles="https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/snapshot/kernel-shark-kernelshark-v${version}.tar.gz"
+checksum=78a0cf28bc06d0e43cd5a2512f83c02b7b5c969a26a0d4b56338154d6cf6f7be
+# requires externally-downloaded data and segfaults on some gui tests
+make_check=no
+
+libkshark_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/libkshark.so.*"
+ }
+}
+
+libkshark-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/libkshark b/srcpkgs/libkshark
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
diff --git a/srcpkgs/libkshark-devel b/srcpkgs/libkshark-devel
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark-devel
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
From 855079028903c7d90456b73d8dd470edd83a21c6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Tue, 23 Aug 2022 22:33:22 +0700
Subject: [PATCH 5/8] fixup! New package: libtraceevent-1.6.2
---
srcpkgs/libtraceevent/template | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/srcpkgs/libtraceevent/template b/srcpkgs/libtraceevent/template
index fbb5bec450c5..c472a5002337 100644
--- a/srcpkgs/libtraceevent/template
+++ b/srcpkgs/libtraceevent/template
@@ -3,9 +3,9 @@ pkgname=libtraceevent
version=1.6.2
revision=1
build_style=gnu-makefile
-make_build_args="prefix=/usr"
+make_build_args="prefix=/usr libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
make_build_target="all doc"
-make_install_args="$make_build_args"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
make_install_target="install doc-install"
hostmakedepends="asciidoc xmlto source-highlight pkg-config"
checkdepends="CUnit-devel"
@@ -21,12 +21,6 @@ do_check() {
utest/trace-utest
}
-post_install() {
- if [ "$CROSS_BUILD" ] && [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
- mv ${DESTDIR}/usr/lib64/pkgconfig ${DESTDIR}/usr/lib/pkgconfig
- fi
-}
-
libtraceevent-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
From aad6ddf37b298c9bd692c5da79c4267150953d4e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Tue, 23 Aug 2022 22:52:42 +0700
Subject: [PATCH 6/8] fixup! New package: libtracefs-1.4.2
---
srcpkgs/libtracefs/patches/musl.patch | 15 +++++++++++++++
srcpkgs/libtracefs/template | 11 ++++-------
2 files changed, 19 insertions(+), 7 deletions(-)
create mode 100644 srcpkgs/libtracefs/patches/musl.patch
diff --git a/srcpkgs/libtracefs/patches/musl.patch b/srcpkgs/libtracefs/patches/musl.patch
new file mode 100644
index 000000000000..b30126ce5736
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl.patch
@@ -0,0 +1,15 @@
+--- a/include/tracefs.h
++++ b/include/tracefs.h
+@@ -10,6 +10,12 @@
+ #include <sched.h>
+ #include <event-parse.h>
+
++#ifndef _GNU_SOURCE
++/* See CPU_SET(3) */
++struct cpu_set_t;
++typedef struct cpu_set_t cpu_set_t;
++#endif
++
+ char *tracefs_get_tracing_file(const char *name);
+ void tracefs_put_tracing_file(char *name);
+
diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template
index 3d7be3ba7e65..424e7bb72843 100644
--- a/srcpkgs/libtracefs/template
+++ b/srcpkgs/libtracefs/template
@@ -3,9 +3,9 @@ pkgname=libtracefs
version=1.4.2
revision=1
build_style=gnu-makefile
-make_build_args="prefix=/usr"
+make_build_args="prefix=/usr libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
make_build_target="all doc"
-make_install_args="$make_build_args"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
make_install_target="install install_doc"
make_use_env=yes
hostmakedepends="asciidoc xmlto source-highlight pkg-config"
@@ -26,16 +26,13 @@ do_check() {
post_install() {
# manpage for sample program
rm ${DESTDIR}/usr/share/man/man1/sqlhist.1
-
- if [ "$CROSS_BUILD" ] && [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
- mv ${DESTDIR}/usr/lib64/pkgconfig ${DESTDIR}/usr/lib/pkgconfig
- fi
}
libtracefs-devel_package() {
- depends="${sourcepkg}>=${version}_${revision}"
+ depends="${sourcepkg}>=${version}_${revision} libtraceevent-devel"
short_desc+=" - development files"
pkg_install() {
+ vmove usr/share/doc
vmove usr/share/man/man3
vmove usr/include
vmove usr/lib/pkgconfig
From cb48deb4a72b3b0f79c417359b4b80a7e60efba4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Tue, 23 Aug 2022 22:56:47 +0700
Subject: [PATCH 7/8] fixup! kernelshark: split from trace-cmd, update to 2.1.1
---
srcpkgs/kernelshark/patches/musl.patch | 20 ++++++++++++++++++++
srcpkgs/kernelshark/template | 5 +++--
2 files changed, 23 insertions(+), 2 deletions(-)
create mode 100644 srcpkgs/kernelshark/patches/musl.patch
diff --git a/srcpkgs/kernelshark/patches/musl.patch b/srcpkgs/kernelshark/patches/musl.patch
new file mode 100644
index 000000000000..e02fddb486c7
--- /dev/null
+++ b/srcpkgs/kernelshark/patches/musl.patch
@@ -0,0 +1,20 @@
+--- a/src/libkshark.h
++++ b/src/libkshark.h
+@@ -17,6 +17,7 @@
+ #include <string.h>
+ #include <pthread.h>
+ #include <errno.h>
++#include <sys/types.h>
+
+ // Json-C
+ #include <json-c/json.h>
+--- a/src/kernelshark.cpp
++++ b/src/kernelshark.cpp
+@@ -7,6 +7,7 @@
+ // C
+ #include <sys/stat.h>
+ #include <getopt.h>
++#include <libgen.h>
+
+ // Qt
+ #include <QApplication>
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
index 18d5b9d7430c..966359c725b0 100644
--- a/srcpkgs/kernelshark/template
+++ b/srcpkgs/kernelshark/template
@@ -6,11 +6,12 @@ version=2.1.1
revision=1
wrksrc="kernel-shark-kernelshark-v${version}"
build_style=cmake
-configure_args="-D_INSTALL_PREFIX=/usr"
+configure_args="-D_INSTALL_PREFIX=/usr
+ -DTRACECMD_EXECUTABLE=/usr/bin/trace-cmd"
hostmakedepends="qt5-qmake qt5-host-tools pkg-config freefont-ttf"
makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
libtraceevent-devel libtracefs-devel libtracecmd-devel"
-depends="freefont-ttf"
+depends="freefont-ttf trace-cmd"
short_desc="Front end reader of trace-cmd(1) output"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="GPL-3.0-or-later"
From b5e49e7275ccb929a3fd5a6c8be730aeed52504a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Tue, 23 Aug 2022 23:16:44 +0700
Subject: [PATCH 8/8] fixup! fixup! kernelshark: split from trace-cmd, update
to 2.1.1
---
srcpkgs/kernelshark/template | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
index 966359c725b0..f1c92cbe4c43 100644
--- a/srcpkgs/kernelshark/template
+++ b/srcpkgs/kernelshark/template
@@ -6,9 +6,13 @@ version=2.1.1
revision=1
wrksrc="kernel-shark-kernelshark-v${version}"
build_style=cmake
+# It's PKG_CONGIG_DIR not PKG_CONFIG_DIR
configure_args="-D_INSTALL_PREFIX=/usr
+ -D_LIBDIR=/usr/lib$XBPS_TARGET_WORDSIZE
+ -DPKG_CONGIG_DIR=/usr/lib/pkgconfig
+ -DTT_FONT_FILE=/usr/share/fonts/TTF/FreeSans.ttf
-DTRACECMD_EXECUTABLE=/usr/bin/trace-cmd"
-hostmakedepends="qt5-qmake qt5-host-tools pkg-config freefont-ttf"
+hostmakedepends="qt5-qmake qt5-host-tools pkg-config"
makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
libtraceevent-devel libtracefs-devel libtracecmd-devel"
depends="freefont-ttf trace-cmd"
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (14 preceding siblings ...)
2022-08-23 16:16 ` sgn
@ 2022-08-23 16:18 ` sgn
2022-08-23 16:19 ` sgn
` (38 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: sgn @ 2022-08-23 16:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 188 bytes --]
New comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#issuecomment-1224298134
Comment:
The package can be built now. I have never tested.
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (15 preceding siblings ...)
2022-08-23 16:18 ` sgn
@ 2022-08-23 16:19 ` sgn
2022-08-23 17:53 ` [PR PATCH] [Updated] " classabbyamp
` (37 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: sgn @ 2022-08-23 16:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 223 bytes --]
New comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#issuecomment-1224299538
Comment:
`RPATH` is still with binaries, we may want to change something. I'm not in the mood.
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR PATCH] [Updated] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (16 preceding siblings ...)
2022-08-23 16:19 ` sgn
@ 2022-08-23 17:53 ` classabbyamp
2022-08-23 17:57 ` classabbyamp
` (36 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-23 17:53 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages update/trace-cmd-3.1.2
https://github.com/void-linux/void-packages/pull/38851
trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
- New package: libtraceevent-1.6.2
- New package: libtracefs-1.4.2
- trace-cmd: update to 3.1.2.
- kernelshark: split from trace-cmd, update to 2.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (builds & runs, but I'm not sure how to use this so I can't test further)
A patch file from https://github.com/void-linux/void-packages/pull/38851.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update/trace-cmd-3.1.2-38851.patch --]
[-- Type: text/x-diff, Size: 19676 bytes --]
From 731f91ff4606e2bff770b943c47728ccb6d72c25 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:37:06 -0400
Subject: [PATCH 1/4] New package: libtraceevent-1.6.2
---
common/shlibs | 1 +
srcpkgs/libtraceevent-devel | 1 +
srcpkgs/libtraceevent/template | 35 ++++++++++++++++++++++++++++++++++
3 files changed, 37 insertions(+)
create mode 120000 srcpkgs/libtraceevent-devel
create mode 100644 srcpkgs/libtraceevent/template
diff --git a/common/shlibs b/common/shlibs
index f829ee12e80f..9bd26c6c36c9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4176,3 +4176,4 @@ libsyncthingmodel.so.1.2.2 syncthingtray-1.2.2_1
libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
+libtraceevent.so.1 libtraceevent-1.6.2_1
diff --git a/srcpkgs/libtraceevent-devel b/srcpkgs/libtraceevent-devel
new file mode 120000
index 000000000000..9ca91c55529f
--- /dev/null
+++ b/srcpkgs/libtraceevent-devel
@@ -0,0 +1 @@
+libtraceevent
\ No newline at end of file
diff --git a/srcpkgs/libtraceevent/template b/srcpkgs/libtraceevent/template
new file mode 100644
index 000000000000..c472a5002337
--- /dev/null
+++ b/srcpkgs/libtraceevent/template
@@ -0,0 +1,35 @@
+# Template file for 'libtraceevent'
+pkgname=libtraceevent
+version=1.6.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install doc-install"
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace event library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-${version}.tar.gz"
+checksum=1aaeb12f5842a843a06b733e3f4230b0937ba9c2ecd39345edf6f66cc8cbe795
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+libtraceevent-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc
+ }
+}
From c343c4143a727a7cf2d5a6811e4dc4052baf8119 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:41:02 -0400
Subject: [PATCH 2/4] New package: libtracefs-1.4.2
---
common/shlibs | 1 +
srcpkgs/libtracefs-devel | 1 +
.../libtracefs/patches/musl-limits_h.patch | 10 +++++
srcpkgs/libtracefs/patches/musl.patch | 15 +++++++
srcpkgs/libtracefs/template | 42 +++++++++++++++++++
5 files changed, 69 insertions(+)
create mode 120000 srcpkgs/libtracefs-devel
create mode 100644 srcpkgs/libtracefs/patches/musl-limits_h.patch
create mode 100644 srcpkgs/libtracefs/patches/musl.patch
create mode 100644 srcpkgs/libtracefs/template
diff --git a/common/shlibs b/common/shlibs
index 9bd26c6c36c9..cc3a69af2a2b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4177,3 +4177,4 @@ libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
libtraceevent.so.1 libtraceevent-1.6.2_1
+libtracefs.so.1 libtracefs-1.4.2_1
diff --git a/srcpkgs/libtracefs-devel b/srcpkgs/libtracefs-devel
new file mode 120000
index 000000000000..23466cce7993
--- /dev/null
+++ b/srcpkgs/libtracefs-devel
@@ -0,0 +1 @@
+libtracefs
\ No newline at end of file
diff --git a/srcpkgs/libtracefs/patches/musl-limits_h.patch b/srcpkgs/libtracefs/patches/musl-limits_h.patch
new file mode 100644
index 000000000000..b499fdceb66d
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl-limits_h.patch
@@ -0,0 +1,10 @@
+--- a/utest/tracefs-utest.c
++++ b/utest/tracefs-utest.c
+@@ -11,6 +11,7 @@
+ #include <time.h>
+ #include <dirent.h>
+ #include <ftw.h>
++#include <limits.h>
+
+ #include <CUnit/CUnit.h>
+ #include <CUnit/Basic.h>
diff --git a/srcpkgs/libtracefs/patches/musl.patch b/srcpkgs/libtracefs/patches/musl.patch
new file mode 100644
index 000000000000..0191cc04ff0b
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl.patch
@@ -0,0 +1,15 @@
+--- a/include/tracefs.h
++++ b/include/tracefs.h
+@@ -10,6 +10,12 @@
+ #include <sched.h>
+ #include <event-parse.h>
+
++#ifndef __GLIBC__
++/* See CPU_SET(3) */
++struct cpu_set_t;
++typedef struct cpu_set_t cpu_set_t;
++#endif
++
+ char *tracefs_get_tracing_file(const char *name);
+ void tracefs_put_tracing_file(char *name);
+
diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template
new file mode 100644
index 000000000000..424e7bb72843
--- /dev/null
+++ b/srcpkgs/libtracefs/template
@@ -0,0 +1,42 @@
+# Template file for 'libtracefs'
+pkgname=libtracefs
+version=1.4.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install install_doc"
+make_use_env=yes
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+makedepends="libtraceevent-devel"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace file system library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-${version}.tar.gz"
+checksum=8ad03e6d2a6227f6eb11692d9f04614d3da60ac6c5e4fe436e59b2bed90f031b
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ # manpage for sample program
+ rm ${DESTDIR}/usr/share/man/man1/sqlhist.1
+}
+
+libtracefs-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} libtraceevent-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/doc
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From 12dfc5d92590f868b0fd12fa007e0f3cd2f1a3b9 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 02:39:52 -0400
Subject: [PATCH 3/4] trace-cmd: update to 3.1.2.
---
common/shlibs | 1 +
srcpkgs/{kernelshark => libtracecmd} | 0
srcpkgs/libtracecmd-devel | 1 +
.../trace-cmd/patches/fix-program-name.patch | 23 -------
srcpkgs/trace-cmd/patches/musl-limits_h.patch | 44 ++++++++------
.../musl-no_pthread_attr_setaffinity_np.patch | 24 --------
.../trace-cmd/patches/musl-pthread_h.patch | 10 ----
srcpkgs/trace-cmd/template | 60 ++++++++++++-------
8 files changed, 67 insertions(+), 96 deletions(-)
rename srcpkgs/{kernelshark => libtracecmd} (100%)
create mode 120000 srcpkgs/libtracecmd-devel
delete mode 100644 srcpkgs/trace-cmd/patches/fix-program-name.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-pthread_h.patch
diff --git a/common/shlibs b/common/shlibs
index cc3a69af2a2b..d0efac27f360 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4178,3 +4178,4 @@ libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_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
diff --git a/srcpkgs/kernelshark b/srcpkgs/libtracecmd
similarity index 100%
rename from srcpkgs/kernelshark
rename to srcpkgs/libtracecmd
diff --git a/srcpkgs/libtracecmd-devel b/srcpkgs/libtracecmd-devel
new file mode 120000
index 000000000000..77b3407d0913
--- /dev/null
+++ b/srcpkgs/libtracecmd-devel
@@ -0,0 +1 @@
+trace-cmd
\ No newline at end of file
diff --git a/srcpkgs/trace-cmd/patches/fix-program-name.patch b/srcpkgs/trace-cmd/patches/fix-program-name.patch
deleted file mode 100644
index 970122246115..000000000000
--- a/srcpkgs/trace-cmd/patches/fix-program-name.patch
+++ /dev/null
@@ -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':
diff --git a/srcpkgs/trace-cmd/patches/musl-limits_h.patch b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
index 83e278c8ab9e..af90e89b8d75 100644
--- a/srcpkgs/trace-cmd/patches/musl-limits_h.patch
+++ b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
@@ -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>
diff --git a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch b/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
deleted file mode 100644
index 5203d3335c2b..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
+++ /dev/null
@@ -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);
-
diff --git a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch b/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
deleted file mode 100644
index 367588391845..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
+++ /dev/null
@@ -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 }
diff --git a/srcpkgs/trace-cmd/template b/srcpkgs/trace-cmd/template
index 34f9bcb40d42..e40c1501550b 100644
--- a/srcpkgs/trace-cmd/template
+++ b/srcpkgs/trace-cmd/template
@@ -1,37 +1,53 @@
# Template file for 'trace-cmd'
pkgname=trace-cmd
-version=2.9.1
+version=3.1.2
revision=1
wrksrc="${pkgname}-v${version}"
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="prefix=/usr libdir_relative=lib"
+make_build_target="all libs doc"
+make_install_args="$make_build_args"
+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=206672af60aa0bc35cfc44a4be746efa575bac729060e54b6453f7d5dfbcd979
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
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
+
+ if [ "$CROSS_BUILD" ] && [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
+ mv ${DESTDIR}/usr/lib64/pkgconfig ${DESTDIR}/usr/lib/pkgconfig
+ fi
+}
+
+libtracecmd_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/*.so.*"
+ }
}
-kernelshark_package() {
- depends="${sourcepkg}>=${version}_${revision}"
- short_desc="GUI for ftrace Linux kernel internal tracer"
+libtracecmd-devel_package() {
+ depends="libtracecmd>=${version}_${revision}"
+ short_desc+=" - development files"
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/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc/libtracecmd-doc
}
}
From aef40731dd43f9cbde536ad364a1e74f54125d1c Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 03:07:55 -0400
Subject: [PATCH 4/4] kernelshark: split from trace-cmd, update to 2.1.1
---
common/shlibs | 1 +
srcpkgs/kernelshark/patches/musl.patch | 20 +++++++++++++
srcpkgs/kernelshark/template | 41 ++++++++++++++++++++++++++
srcpkgs/libkshark | 1 +
srcpkgs/libkshark-devel | 1 +
5 files changed, 64 insertions(+)
create mode 100644 srcpkgs/kernelshark/patches/musl.patch
create mode 100644 srcpkgs/kernelshark/template
create mode 120000 srcpkgs/libkshark
create mode 120000 srcpkgs/libkshark-devel
diff --git a/common/shlibs b/common/shlibs
index d0efac27f360..9387807c0574 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4179,3 +4179,4 @@ libgbinder.so.1 libgbinder-1.1.20_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
+libkshark.so.2 libkshark-2.1.1_1
diff --git a/srcpkgs/kernelshark/patches/musl.patch b/srcpkgs/kernelshark/patches/musl.patch
new file mode 100644
index 000000000000..e02fddb486c7
--- /dev/null
+++ b/srcpkgs/kernelshark/patches/musl.patch
@@ -0,0 +1,20 @@
+--- a/src/libkshark.h
++++ b/src/libkshark.h
+@@ -17,6 +17,7 @@
+ #include <string.h>
+ #include <pthread.h>
+ #include <errno.h>
++#include <sys/types.h>
+
+ // Json-C
+ #include <json-c/json.h>
+--- a/src/kernelshark.cpp
++++ b/src/kernelshark.cpp
+@@ -7,6 +7,7 @@
+ // C
+ #include <sys/stat.h>
+ #include <getopt.h>
++#include <libgen.h>
+
+ // Qt
+ #include <QApplication>
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
new file mode 100644
index 000000000000..976f8ee48e97
--- /dev/null
+++ b/srcpkgs/kernelshark/template
@@ -0,0 +1,41 @@
+# Template file for 'kernelshark'
+pkgname=kernelshark
+reverts="2.9.1_1 2.9_1 2.8.3_2 2.8.3_1 2.8.2_1 2.8.1_1 2.7_2 2.7_1 2.6.2_1 2.6.1_1
+ 2.6_1 2.5.3_3 2.5.3_2 2.5.3_1 2.5.1_1 2.5_1 2.4_1"
+version=2.1.1
+revision=1
+wrksrc="kernel-shark-kernelshark-v${version}"
+build_style=cmake
+# It's PKG_CONGIG_DIR not PKG_CONFIG_DIR
+configure_args="-D_INSTALL_PREFIX=/usr -D_LIBDIR=/usr/lib$XBPS_TARGET_WORDSIZE
+ -DPKG_CONGIG_DIR=/usr/lib/pkgconfig -DTT_FONT_FILE=/usr/share/fonts/TTF/FreeSans.ttf
+ -DTRACECMD_EXECUTABLE=/usr/bin/trace-cmd -DCMAKE_SKIP_BUILD_RPATH=ON"
+hostmakedepends="qt5-qmake qt5-host-tools pkg-config"
+makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
+ libtraceevent-devel libtracefs-devel libtracecmd-devel"
+depends="freefont-ttf trace-cmd"
+short_desc="Front end reader of trace-cmd(1) output"
+maintainer="Leah Neukirchen <leah@vuxu.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.kernelshark.org"
+distfiles="https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/snapshot/kernel-shark-kernelshark-v${version}.tar.gz"
+checksum=78a0cf28bc06d0e43cd5a2512f83c02b7b5c969a26a0d4b56338154d6cf6f7be
+# requires externally-downloaded data and segfaults on some gui tests
+make_check=no
+
+libkshark_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/libkshark.so.*"
+ }
+}
+
+libkshark-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/libkshark b/srcpkgs/libkshark
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
diff --git a/srcpkgs/libkshark-devel b/srcpkgs/libkshark-devel
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark-devel
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (17 preceding siblings ...)
2022-08-23 17:53 ` [PR PATCH] [Updated] " classabbyamp
@ 2022-08-23 17:57 ` classabbyamp
2022-08-23 18:22 ` [PR PATCH] [Updated] " classabbyamp
` (35 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-23 17:57 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1031 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#issuecomment-1224478968
Comment:
`kernelshark` and `kshark-record` still have rpath but it's close, I think
```
File: masterdir/builddir/kernel-shark-kernelshark-v2.1.1/bin/kernelshark
Dynamic section at offset 0x7ba8 contains 34 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libkshark-gui.so.2.1.1]
0x0000000000000001 (NEEDED) Shared library: [libQt5Widgets.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5Gui.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5Core.so.5]
0x0000000000000001 (NEEDED) Shared library: [libstdc++.so.6]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000f (RPATH) Library rpath: [::::::::::::::::::]
...
```
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR PATCH] [Updated] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (18 preceding siblings ...)
2022-08-23 17:57 ` classabbyamp
@ 2022-08-23 18:22 ` classabbyamp
2022-08-23 19:25 ` classabbyamp
` (34 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-23 18:22 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages update/trace-cmd-3.1.2
https://github.com/void-linux/void-packages/pull/38851
trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
- New package: libtraceevent-1.6.2
- New package: libtracefs-1.4.2
- trace-cmd: update to 3.1.2.
- kernelshark: split from trace-cmd, update to 2.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (builds & runs, but I'm not sure how to use this so I can't test further)
A patch file from https://github.com/void-linux/void-packages/pull/38851.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update/trace-cmd-3.1.2-38851.patch --]
[-- Type: text/x-diff, Size: 19589 bytes --]
From 731f91ff4606e2bff770b943c47728ccb6d72c25 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:37:06 -0400
Subject: [PATCH 1/4] New package: libtraceevent-1.6.2
---
common/shlibs | 1 +
srcpkgs/libtraceevent-devel | 1 +
srcpkgs/libtraceevent/template | 35 ++++++++++++++++++++++++++++++++++
3 files changed, 37 insertions(+)
create mode 120000 srcpkgs/libtraceevent-devel
create mode 100644 srcpkgs/libtraceevent/template
diff --git a/common/shlibs b/common/shlibs
index f829ee12e80f..9bd26c6c36c9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4176,3 +4176,4 @@ libsyncthingmodel.so.1.2.2 syncthingtray-1.2.2_1
libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
+libtraceevent.so.1 libtraceevent-1.6.2_1
diff --git a/srcpkgs/libtraceevent-devel b/srcpkgs/libtraceevent-devel
new file mode 120000
index 000000000000..9ca91c55529f
--- /dev/null
+++ b/srcpkgs/libtraceevent-devel
@@ -0,0 +1 @@
+libtraceevent
\ No newline at end of file
diff --git a/srcpkgs/libtraceevent/template b/srcpkgs/libtraceevent/template
new file mode 100644
index 000000000000..c472a5002337
--- /dev/null
+++ b/srcpkgs/libtraceevent/template
@@ -0,0 +1,35 @@
+# Template file for 'libtraceevent'
+pkgname=libtraceevent
+version=1.6.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install doc-install"
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace event library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-${version}.tar.gz"
+checksum=1aaeb12f5842a843a06b733e3f4230b0937ba9c2ecd39345edf6f66cc8cbe795
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+libtraceevent-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc
+ }
+}
From c343c4143a727a7cf2d5a6811e4dc4052baf8119 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:41:02 -0400
Subject: [PATCH 2/4] New package: libtracefs-1.4.2
---
common/shlibs | 1 +
srcpkgs/libtracefs-devel | 1 +
.../libtracefs/patches/musl-limits_h.patch | 10 +++++
srcpkgs/libtracefs/patches/musl.patch | 15 +++++++
srcpkgs/libtracefs/template | 42 +++++++++++++++++++
5 files changed, 69 insertions(+)
create mode 120000 srcpkgs/libtracefs-devel
create mode 100644 srcpkgs/libtracefs/patches/musl-limits_h.patch
create mode 100644 srcpkgs/libtracefs/patches/musl.patch
create mode 100644 srcpkgs/libtracefs/template
diff --git a/common/shlibs b/common/shlibs
index 9bd26c6c36c9..cc3a69af2a2b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4177,3 +4177,4 @@ libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
libtraceevent.so.1 libtraceevent-1.6.2_1
+libtracefs.so.1 libtracefs-1.4.2_1
diff --git a/srcpkgs/libtracefs-devel b/srcpkgs/libtracefs-devel
new file mode 120000
index 000000000000..23466cce7993
--- /dev/null
+++ b/srcpkgs/libtracefs-devel
@@ -0,0 +1 @@
+libtracefs
\ No newline at end of file
diff --git a/srcpkgs/libtracefs/patches/musl-limits_h.patch b/srcpkgs/libtracefs/patches/musl-limits_h.patch
new file mode 100644
index 000000000000..b499fdceb66d
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl-limits_h.patch
@@ -0,0 +1,10 @@
+--- a/utest/tracefs-utest.c
++++ b/utest/tracefs-utest.c
+@@ -11,6 +11,7 @@
+ #include <time.h>
+ #include <dirent.h>
+ #include <ftw.h>
++#include <limits.h>
+
+ #include <CUnit/CUnit.h>
+ #include <CUnit/Basic.h>
diff --git a/srcpkgs/libtracefs/patches/musl.patch b/srcpkgs/libtracefs/patches/musl.patch
new file mode 100644
index 000000000000..0191cc04ff0b
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl.patch
@@ -0,0 +1,15 @@
+--- a/include/tracefs.h
++++ b/include/tracefs.h
+@@ -10,6 +10,12 @@
+ #include <sched.h>
+ #include <event-parse.h>
+
++#ifndef __GLIBC__
++/* See CPU_SET(3) */
++struct cpu_set_t;
++typedef struct cpu_set_t cpu_set_t;
++#endif
++
+ char *tracefs_get_tracing_file(const char *name);
+ void tracefs_put_tracing_file(char *name);
+
diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template
new file mode 100644
index 000000000000..424e7bb72843
--- /dev/null
+++ b/srcpkgs/libtracefs/template
@@ -0,0 +1,42 @@
+# Template file for 'libtracefs'
+pkgname=libtracefs
+version=1.4.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install install_doc"
+make_use_env=yes
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+makedepends="libtraceevent-devel"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace file system library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-${version}.tar.gz"
+checksum=8ad03e6d2a6227f6eb11692d9f04614d3da60ac6c5e4fe436e59b2bed90f031b
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ # manpage for sample program
+ rm ${DESTDIR}/usr/share/man/man1/sqlhist.1
+}
+
+libtracefs-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} libtraceevent-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/doc
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From 979ccc56a9353c4b657c1b27ccb1c536a4514f82 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 02:39:52 -0400
Subject: [PATCH 3/4] trace-cmd: update to 3.1.2.
---
common/shlibs | 1 +
srcpkgs/{kernelshark => libtracecmd} | 0
srcpkgs/libtracecmd-devel | 1 +
.../trace-cmd/patches/fix-program-name.patch | 23 --------
srcpkgs/trace-cmd/patches/musl-limits_h.patch | 44 +++++++++------
.../musl-no_pthread_attr_setaffinity_np.patch | 24 --------
.../trace-cmd/patches/musl-pthread_h.patch | 10 ----
srcpkgs/trace-cmd/template | 56 +++++++++++--------
8 files changed, 63 insertions(+), 96 deletions(-)
rename srcpkgs/{kernelshark => libtracecmd} (100%)
create mode 120000 srcpkgs/libtracecmd-devel
delete mode 100644 srcpkgs/trace-cmd/patches/fix-program-name.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-pthread_h.patch
diff --git a/common/shlibs b/common/shlibs
index cc3a69af2a2b..d0efac27f360 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4178,3 +4178,4 @@ libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_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
diff --git a/srcpkgs/kernelshark b/srcpkgs/libtracecmd
similarity index 100%
rename from srcpkgs/kernelshark
rename to srcpkgs/libtracecmd
diff --git a/srcpkgs/libtracecmd-devel b/srcpkgs/libtracecmd-devel
new file mode 120000
index 000000000000..77b3407d0913
--- /dev/null
+++ b/srcpkgs/libtracecmd-devel
@@ -0,0 +1 @@
+trace-cmd
\ No newline at end of file
diff --git a/srcpkgs/trace-cmd/patches/fix-program-name.patch b/srcpkgs/trace-cmd/patches/fix-program-name.patch
deleted file mode 100644
index 970122246115..000000000000
--- a/srcpkgs/trace-cmd/patches/fix-program-name.patch
+++ /dev/null
@@ -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':
diff --git a/srcpkgs/trace-cmd/patches/musl-limits_h.patch b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
index 83e278c8ab9e..af90e89b8d75 100644
--- a/srcpkgs/trace-cmd/patches/musl-limits_h.patch
+++ b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
@@ -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>
diff --git a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch b/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
deleted file mode 100644
index 5203d3335c2b..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
+++ /dev/null
@@ -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);
-
diff --git a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch b/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
deleted file mode 100644
index 367588391845..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
+++ /dev/null
@@ -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 }
diff --git a/srcpkgs/trace-cmd/template b/srcpkgs/trace-cmd/template
index 34f9bcb40d42..e4643142e379 100644
--- a/srcpkgs/trace-cmd/template
+++ b/srcpkgs/trace-cmd/template
@@ -1,37 +1,49 @@
# Template file for 'trace-cmd'
pkgname=trace-cmd
-version=2.9.1
+version=3.1.2
revision=1
wrksrc="${pkgname}-v${version}"
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="prefix=/usr 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=206672af60aa0bc35cfc44a4be746efa575bac729060e54b6453f7d5dfbcd979
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
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
+}
+
+libtracecmd_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/*.so.*"
+ }
}
-kernelshark_package() {
- depends="${sourcepkg}>=${version}_${revision}"
- short_desc="GUI for ftrace Linux kernel internal tracer"
+libtracecmd-devel_package() {
+ depends="libtracecmd>=${version}_${revision}"
+ short_desc+=" - development files"
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/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc/libtracecmd-doc
}
}
From 112fc8474da2f006d4e61dba3f369778870b21f2 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 03:07:55 -0400
Subject: [PATCH 4/4] kernelshark: split from trace-cmd, update to 2.1.1
---
common/shlibs | 1 +
srcpkgs/kernelshark/patches/musl.patch | 20 +++++++++++++
srcpkgs/kernelshark/template | 41 ++++++++++++++++++++++++++
srcpkgs/libkshark | 1 +
srcpkgs/libkshark-devel | 1 +
5 files changed, 64 insertions(+)
create mode 100644 srcpkgs/kernelshark/patches/musl.patch
create mode 100644 srcpkgs/kernelshark/template
create mode 120000 srcpkgs/libkshark
create mode 120000 srcpkgs/libkshark-devel
diff --git a/common/shlibs b/common/shlibs
index d0efac27f360..9387807c0574 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4179,3 +4179,4 @@ libgbinder.so.1 libgbinder-1.1.20_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
+libkshark.so.2 libkshark-2.1.1_1
diff --git a/srcpkgs/kernelshark/patches/musl.patch b/srcpkgs/kernelshark/patches/musl.patch
new file mode 100644
index 000000000000..e02fddb486c7
--- /dev/null
+++ b/srcpkgs/kernelshark/patches/musl.patch
@@ -0,0 +1,20 @@
+--- a/src/libkshark.h
++++ b/src/libkshark.h
+@@ -17,6 +17,7 @@
+ #include <string.h>
+ #include <pthread.h>
+ #include <errno.h>
++#include <sys/types.h>
+
+ // Json-C
+ #include <json-c/json.h>
+--- a/src/kernelshark.cpp
++++ b/src/kernelshark.cpp
+@@ -7,6 +7,7 @@
+ // C
+ #include <sys/stat.h>
+ #include <getopt.h>
++#include <libgen.h>
+
+ // Qt
+ #include <QApplication>
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
new file mode 100644
index 000000000000..f3f4ba8faec8
--- /dev/null
+++ b/srcpkgs/kernelshark/template
@@ -0,0 +1,41 @@
+# Template file for 'kernelshark'
+pkgname=kernelshark
+reverts="2.9.1_1 2.9_1 2.8.3_2 2.8.3_1 2.8.2_1 2.8.1_1 2.7_2 2.7_1 2.6.2_1 2.6.1_1
+ 2.6_1 2.5.3_3 2.5.3_2 2.5.3_1 2.5.1_1 2.5_1 2.4_1"
+version=2.1.1
+revision=1
+wrksrc="kernel-shark-kernelshark-v${version}"
+build_style=cmake
+# It's PKG_CONGIG_DIR not PKG_CONFIG_DIR
+configure_args="-D_INSTALL_PREFIX=/usr -D_LIBDIR=/usr/lib$XBPS_TARGET_WORDSIZE
+ -DPKG_CONGIG_DIR=/usr/lib/pkgconfig -DTT_FONT_FILE=/usr/share/fonts/TTF/FreeSans.ttf
+ -DTRACECMD_EXECUTABLE=/usr/bin/trace-cmd -DCMAKE_SKIP_RPATH=ON"
+hostmakedepends="qt5-qmake qt5-host-tools pkg-config"
+makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
+ libtraceevent-devel libtracefs-devel libtracecmd-devel"
+depends="freefont-ttf trace-cmd"
+short_desc="Front end reader of trace-cmd(1) output"
+maintainer="Leah Neukirchen <leah@vuxu.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.kernelshark.org"
+distfiles="https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/snapshot/kernel-shark-kernelshark-v${version}.tar.gz"
+checksum=78a0cf28bc06d0e43cd5a2512f83c02b7b5c969a26a0d4b56338154d6cf6f7be
+# requires externally-downloaded data and segfaults on some gui tests
+make_check=no
+
+libkshark_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/libkshark.so.*"
+ }
+}
+
+libkshark-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/libkshark b/srcpkgs/libkshark
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
diff --git a/srcpkgs/libkshark-devel b/srcpkgs/libkshark-devel
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark-devel
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR PATCH] [Updated] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (19 preceding siblings ...)
2022-08-23 18:22 ` [PR PATCH] [Updated] " classabbyamp
@ 2022-08-23 19:25 ` classabbyamp
2022-08-23 19:25 ` classabbyamp
` (33 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-23 19:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages update/trace-cmd-3.1.2
https://github.com/void-linux/void-packages/pull/38851
trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
- New package: libtraceevent-1.6.2
- New package: libtracefs-1.4.2
- trace-cmd: update to 3.1.2.
- kernelshark: split from trace-cmd, update to 2.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (builds & runs, but I'm not sure how to use this so I can't test further)
A patch file from https://github.com/void-linux/void-packages/pull/38851.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update/trace-cmd-3.1.2-38851.patch --]
[-- Type: text/x-diff, Size: 20581 bytes --]
From 731f91ff4606e2bff770b943c47728ccb6d72c25 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:37:06 -0400
Subject: [PATCH 1/4] New package: libtraceevent-1.6.2
---
common/shlibs | 1 +
srcpkgs/libtraceevent-devel | 1 +
srcpkgs/libtraceevent/template | 35 ++++++++++++++++++++++++++++++++++
3 files changed, 37 insertions(+)
create mode 120000 srcpkgs/libtraceevent-devel
create mode 100644 srcpkgs/libtraceevent/template
diff --git a/common/shlibs b/common/shlibs
index f829ee12e80f..9bd26c6c36c9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4176,3 +4176,4 @@ libsyncthingmodel.so.1.2.2 syncthingtray-1.2.2_1
libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
+libtraceevent.so.1 libtraceevent-1.6.2_1
diff --git a/srcpkgs/libtraceevent-devel b/srcpkgs/libtraceevent-devel
new file mode 120000
index 000000000000..9ca91c55529f
--- /dev/null
+++ b/srcpkgs/libtraceevent-devel
@@ -0,0 +1 @@
+libtraceevent
\ No newline at end of file
diff --git a/srcpkgs/libtraceevent/template b/srcpkgs/libtraceevent/template
new file mode 100644
index 000000000000..c472a5002337
--- /dev/null
+++ b/srcpkgs/libtraceevent/template
@@ -0,0 +1,35 @@
+# Template file for 'libtraceevent'
+pkgname=libtraceevent
+version=1.6.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install doc-install"
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace event library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-${version}.tar.gz"
+checksum=1aaeb12f5842a843a06b733e3f4230b0937ba9c2ecd39345edf6f66cc8cbe795
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+libtraceevent-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc
+ }
+}
From c343c4143a727a7cf2d5a6811e4dc4052baf8119 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:41:02 -0400
Subject: [PATCH 2/4] New package: libtracefs-1.4.2
---
common/shlibs | 1 +
srcpkgs/libtracefs-devel | 1 +
.../libtracefs/patches/musl-limits_h.patch | 10 +++++
srcpkgs/libtracefs/patches/musl.patch | 15 +++++++
srcpkgs/libtracefs/template | 42 +++++++++++++++++++
5 files changed, 69 insertions(+)
create mode 120000 srcpkgs/libtracefs-devel
create mode 100644 srcpkgs/libtracefs/patches/musl-limits_h.patch
create mode 100644 srcpkgs/libtracefs/patches/musl.patch
create mode 100644 srcpkgs/libtracefs/template
diff --git a/common/shlibs b/common/shlibs
index 9bd26c6c36c9..cc3a69af2a2b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4177,3 +4177,4 @@ libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
libtraceevent.so.1 libtraceevent-1.6.2_1
+libtracefs.so.1 libtracefs-1.4.2_1
diff --git a/srcpkgs/libtracefs-devel b/srcpkgs/libtracefs-devel
new file mode 120000
index 000000000000..23466cce7993
--- /dev/null
+++ b/srcpkgs/libtracefs-devel
@@ -0,0 +1 @@
+libtracefs
\ No newline at end of file
diff --git a/srcpkgs/libtracefs/patches/musl-limits_h.patch b/srcpkgs/libtracefs/patches/musl-limits_h.patch
new file mode 100644
index 000000000000..b499fdceb66d
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl-limits_h.patch
@@ -0,0 +1,10 @@
+--- a/utest/tracefs-utest.c
++++ b/utest/tracefs-utest.c
+@@ -11,6 +11,7 @@
+ #include <time.h>
+ #include <dirent.h>
+ #include <ftw.h>
++#include <limits.h>
+
+ #include <CUnit/CUnit.h>
+ #include <CUnit/Basic.h>
diff --git a/srcpkgs/libtracefs/patches/musl.patch b/srcpkgs/libtracefs/patches/musl.patch
new file mode 100644
index 000000000000..0191cc04ff0b
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl.patch
@@ -0,0 +1,15 @@
+--- a/include/tracefs.h
++++ b/include/tracefs.h
+@@ -10,6 +10,12 @@
+ #include <sched.h>
+ #include <event-parse.h>
+
++#ifndef __GLIBC__
++/* See CPU_SET(3) */
++struct cpu_set_t;
++typedef struct cpu_set_t cpu_set_t;
++#endif
++
+ char *tracefs_get_tracing_file(const char *name);
+ void tracefs_put_tracing_file(char *name);
+
diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template
new file mode 100644
index 000000000000..424e7bb72843
--- /dev/null
+++ b/srcpkgs/libtracefs/template
@@ -0,0 +1,42 @@
+# Template file for 'libtracefs'
+pkgname=libtracefs
+version=1.4.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install install_doc"
+make_use_env=yes
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+makedepends="libtraceevent-devel"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace file system library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-${version}.tar.gz"
+checksum=8ad03e6d2a6227f6eb11692d9f04614d3da60ac6c5e4fe436e59b2bed90f031b
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ # manpage for sample program
+ rm ${DESTDIR}/usr/share/man/man1/sqlhist.1
+}
+
+libtracefs-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} libtraceevent-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/doc
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From dd828ffc175343419e9581bce94c79def9e15b9d Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 02:39:52 -0400
Subject: [PATCH 3/4] trace-cmd: update to 3.1.2.
---
common/shlibs | 1 +
srcpkgs/{kernelshark => libtracecmd} | 0
srcpkgs/libtracecmd-devel | 1 +
.../trace-cmd/patches/fix-program-name.patch | 23 --------
srcpkgs/trace-cmd/patches/musl-limits_h.patch | 44 +++++++++------
.../musl-no_pthread_attr_setaffinity_np.patch | 24 --------
.../trace-cmd/patches/musl-pthread_h.patch | 10 ----
srcpkgs/trace-cmd/patches/no-rpath.patch | 20 +++++++
srcpkgs/trace-cmd/template | 56 +++++++++++--------
9 files changed, 83 insertions(+), 96 deletions(-)
rename srcpkgs/{kernelshark => libtracecmd} (100%)
create mode 120000 srcpkgs/libtracecmd-devel
delete mode 100644 srcpkgs/trace-cmd/patches/fix-program-name.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-pthread_h.patch
create mode 100644 srcpkgs/trace-cmd/patches/no-rpath.patch
diff --git a/common/shlibs b/common/shlibs
index cc3a69af2a2b..d0efac27f360 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4178,3 +4178,4 @@ libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_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
diff --git a/srcpkgs/kernelshark b/srcpkgs/libtracecmd
similarity index 100%
rename from srcpkgs/kernelshark
rename to srcpkgs/libtracecmd
diff --git a/srcpkgs/libtracecmd-devel b/srcpkgs/libtracecmd-devel
new file mode 120000
index 000000000000..77b3407d0913
--- /dev/null
+++ b/srcpkgs/libtracecmd-devel
@@ -0,0 +1 @@
+trace-cmd
\ No newline at end of file
diff --git a/srcpkgs/trace-cmd/patches/fix-program-name.patch b/srcpkgs/trace-cmd/patches/fix-program-name.patch
deleted file mode 100644
index 970122246115..000000000000
--- a/srcpkgs/trace-cmd/patches/fix-program-name.patch
+++ /dev/null
@@ -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':
diff --git a/srcpkgs/trace-cmd/patches/musl-limits_h.patch b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
index 83e278c8ab9e..af90e89b8d75 100644
--- a/srcpkgs/trace-cmd/patches/musl-limits_h.patch
+++ b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
@@ -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>
diff --git a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch b/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
deleted file mode 100644
index 5203d3335c2b..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
+++ /dev/null
@@ -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);
-
diff --git a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch b/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
deleted file mode 100644
index 367588391845..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
+++ /dev/null
@@ -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 }
diff --git a/srcpkgs/trace-cmd/patches/no-rpath.patch b/srcpkgs/trace-cmd/patches/no-rpath.patch
new file mode 100644
index 000000000000..ff2fd9fe864e
--- /dev/null
+++ b/srcpkgs/trace-cmd/patches/no-rpath.patch
@@ -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) \
diff --git a/srcpkgs/trace-cmd/template b/srcpkgs/trace-cmd/template
index 34f9bcb40d42..e4643142e379 100644
--- a/srcpkgs/trace-cmd/template
+++ b/srcpkgs/trace-cmd/template
@@ -1,37 +1,49 @@
# Template file for 'trace-cmd'
pkgname=trace-cmd
-version=2.9.1
+version=3.1.2
revision=1
wrksrc="${pkgname}-v${version}"
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="prefix=/usr 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=206672af60aa0bc35cfc44a4be746efa575bac729060e54b6453f7d5dfbcd979
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
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
+}
+
+libtracecmd_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/*.so.*"
+ }
}
-kernelshark_package() {
- depends="${sourcepkg}>=${version}_${revision}"
- short_desc="GUI for ftrace Linux kernel internal tracer"
+libtracecmd-devel_package() {
+ depends="libtracecmd>=${version}_${revision}"
+ short_desc+=" - development files"
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/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc/libtracecmd-doc
}
}
From 44eb1273c29c58a2e4b7319423a63e7d138fedda Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 03:07:55 -0400
Subject: [PATCH 4/4] kernelshark: split from trace-cmd, update to 2.1.1
---
common/shlibs | 1 +
srcpkgs/kernelshark/patches/musl.patch | 20 +++++++++++++
srcpkgs/kernelshark/template | 41 ++++++++++++++++++++++++++
srcpkgs/libkshark | 1 +
srcpkgs/libkshark-devel | 1 +
5 files changed, 64 insertions(+)
create mode 100644 srcpkgs/kernelshark/patches/musl.patch
create mode 100644 srcpkgs/kernelshark/template
create mode 120000 srcpkgs/libkshark
create mode 120000 srcpkgs/libkshark-devel
diff --git a/common/shlibs b/common/shlibs
index d0efac27f360..9387807c0574 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4179,3 +4179,4 @@ libgbinder.so.1 libgbinder-1.1.20_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
+libkshark.so.2 libkshark-2.1.1_1
diff --git a/srcpkgs/kernelshark/patches/musl.patch b/srcpkgs/kernelshark/patches/musl.patch
new file mode 100644
index 000000000000..e02fddb486c7
--- /dev/null
+++ b/srcpkgs/kernelshark/patches/musl.patch
@@ -0,0 +1,20 @@
+--- a/src/libkshark.h
++++ b/src/libkshark.h
+@@ -17,6 +17,7 @@
+ #include <string.h>
+ #include <pthread.h>
+ #include <errno.h>
++#include <sys/types.h>
+
+ // Json-C
+ #include <json-c/json.h>
+--- a/src/kernelshark.cpp
++++ b/src/kernelshark.cpp
+@@ -7,6 +7,7 @@
+ // C
+ #include <sys/stat.h>
+ #include <getopt.h>
++#include <libgen.h>
+
+ // Qt
+ #include <QApplication>
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
new file mode 100644
index 000000000000..f3f4ba8faec8
--- /dev/null
+++ b/srcpkgs/kernelshark/template
@@ -0,0 +1,41 @@
+# Template file for 'kernelshark'
+pkgname=kernelshark
+reverts="2.9.1_1 2.9_1 2.8.3_2 2.8.3_1 2.8.2_1 2.8.1_1 2.7_2 2.7_1 2.6.2_1 2.6.1_1
+ 2.6_1 2.5.3_3 2.5.3_2 2.5.3_1 2.5.1_1 2.5_1 2.4_1"
+version=2.1.1
+revision=1
+wrksrc="kernel-shark-kernelshark-v${version}"
+build_style=cmake
+# It's PKG_CONGIG_DIR not PKG_CONFIG_DIR
+configure_args="-D_INSTALL_PREFIX=/usr -D_LIBDIR=/usr/lib$XBPS_TARGET_WORDSIZE
+ -DPKG_CONGIG_DIR=/usr/lib/pkgconfig -DTT_FONT_FILE=/usr/share/fonts/TTF/FreeSans.ttf
+ -DTRACECMD_EXECUTABLE=/usr/bin/trace-cmd -DCMAKE_SKIP_RPATH=ON"
+hostmakedepends="qt5-qmake qt5-host-tools pkg-config"
+makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
+ libtraceevent-devel libtracefs-devel libtracecmd-devel"
+depends="freefont-ttf trace-cmd"
+short_desc="Front end reader of trace-cmd(1) output"
+maintainer="Leah Neukirchen <leah@vuxu.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.kernelshark.org"
+distfiles="https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/snapshot/kernel-shark-kernelshark-v${version}.tar.gz"
+checksum=78a0cf28bc06d0e43cd5a2512f83c02b7b5c969a26a0d4b56338154d6cf6f7be
+# requires externally-downloaded data and segfaults on some gui tests
+make_check=no
+
+libkshark_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/libkshark.so.*"
+ }
+}
+
+libkshark-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/libkshark b/srcpkgs/libkshark
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
diff --git a/srcpkgs/libkshark-devel b/srcpkgs/libkshark-devel
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark-devel
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (20 preceding siblings ...)
2022-08-23 19:25 ` classabbyamp
@ 2022-08-23 19:25 ` classabbyamp
2022-08-23 19:25 ` classabbyamp
` (32 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-23 19:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 179 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#issuecomment-1224687913
Comment:
ok, all rpath should be gone now
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (21 preceding siblings ...)
2022-08-23 19:25 ` classabbyamp
@ 2022-08-23 19:25 ` classabbyamp
2022-08-23 19:26 ` classabbyamp
` (31 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-23 19:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1031 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#issuecomment-1224478968
Comment:
`kernelshark` and `kshark-record` still have rpath but it's close, I think
```
File: masterdir/builddir/kernel-shark-kernelshark-v2.1.1/bin/kernelshark
Dynamic section at offset 0x7ba8 contains 34 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libkshark-gui.so.2.1.1]
0x0000000000000001 (NEEDED) Shared library: [libQt5Widgets.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5Gui.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5Core.so.5]
0x0000000000000001 (NEEDED) Shared library: [libstdc++.so.6]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000f (RPATH) Library rpath: [::::::::::::::::::]
...
```
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (22 preceding siblings ...)
2022-08-23 19:25 ` classabbyamp
@ 2022-08-23 19:26 ` classabbyamp
2022-08-23 19:26 ` classabbyamp
` (30 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-23 19:26 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 293 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#issuecomment-1224687913
Comment:
ok, all rpath should be gone now, confirmed with `find masterdir/destdir -exec file {} \; |grep ELF | cut -f1 -d: | xargs readelf -d | grep RPATH`
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (23 preceding siblings ...)
2022-08-23 19:26 ` classabbyamp
@ 2022-08-23 19:26 ` classabbyamp
2022-08-23 20:40 ` [PR PATCH] [Updated] " classabbyamp
` (29 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-23 19:26 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 294 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#issuecomment-1224687913
Comment:
ok, all rpath should be gone now, confirmed with `find masterdir/destdir -exec file {} \; | grep ELF | cut -f1 -d: | xargs readelf -d | grep RPATH`
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR PATCH] [Updated] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (24 preceding siblings ...)
2022-08-23 19:26 ` classabbyamp
@ 2022-08-23 20:40 ` classabbyamp
2022-08-23 21:15 ` classabbyamp
` (28 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-23 20:40 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages update/trace-cmd-3.1.2
https://github.com/void-linux/void-packages/pull/38851
trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
- New package: libtraceevent-1.6.2
- New package: libtracefs-1.4.2
- trace-cmd: update to 3.1.2.
- kernelshark: split from trace-cmd, update to 2.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (builds & runs, but I'm not sure how to use this so I can't test further)
A patch file from https://github.com/void-linux/void-packages/pull/38851.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update/trace-cmd-3.1.2-38851.patch --]
[-- Type: text/x-diff, Size: 20893 bytes --]
From 731f91ff4606e2bff770b943c47728ccb6d72c25 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:37:06 -0400
Subject: [PATCH 1/4] New package: libtraceevent-1.6.2
---
common/shlibs | 1 +
srcpkgs/libtraceevent-devel | 1 +
srcpkgs/libtraceevent/template | 35 ++++++++++++++++++++++++++++++++++
3 files changed, 37 insertions(+)
create mode 120000 srcpkgs/libtraceevent-devel
create mode 100644 srcpkgs/libtraceevent/template
diff --git a/common/shlibs b/common/shlibs
index f829ee12e80f..9bd26c6c36c9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4176,3 +4176,4 @@ libsyncthingmodel.so.1.2.2 syncthingtray-1.2.2_1
libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
+libtraceevent.so.1 libtraceevent-1.6.2_1
diff --git a/srcpkgs/libtraceevent-devel b/srcpkgs/libtraceevent-devel
new file mode 120000
index 000000000000..9ca91c55529f
--- /dev/null
+++ b/srcpkgs/libtraceevent-devel
@@ -0,0 +1 @@
+libtraceevent
\ No newline at end of file
diff --git a/srcpkgs/libtraceevent/template b/srcpkgs/libtraceevent/template
new file mode 100644
index 000000000000..c472a5002337
--- /dev/null
+++ b/srcpkgs/libtraceevent/template
@@ -0,0 +1,35 @@
+# Template file for 'libtraceevent'
+pkgname=libtraceevent
+version=1.6.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install doc-install"
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace event library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-${version}.tar.gz"
+checksum=1aaeb12f5842a843a06b733e3f4230b0937ba9c2ecd39345edf6f66cc8cbe795
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+libtraceevent-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc
+ }
+}
From c343c4143a727a7cf2d5a6811e4dc4052baf8119 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:41:02 -0400
Subject: [PATCH 2/4] New package: libtracefs-1.4.2
---
common/shlibs | 1 +
srcpkgs/libtracefs-devel | 1 +
.../libtracefs/patches/musl-limits_h.patch | 10 +++++
srcpkgs/libtracefs/patches/musl.patch | 15 +++++++
srcpkgs/libtracefs/template | 42 +++++++++++++++++++
5 files changed, 69 insertions(+)
create mode 120000 srcpkgs/libtracefs-devel
create mode 100644 srcpkgs/libtracefs/patches/musl-limits_h.patch
create mode 100644 srcpkgs/libtracefs/patches/musl.patch
create mode 100644 srcpkgs/libtracefs/template
diff --git a/common/shlibs b/common/shlibs
index 9bd26c6c36c9..cc3a69af2a2b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4177,3 +4177,4 @@ libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
libtraceevent.so.1 libtraceevent-1.6.2_1
+libtracefs.so.1 libtracefs-1.4.2_1
diff --git a/srcpkgs/libtracefs-devel b/srcpkgs/libtracefs-devel
new file mode 120000
index 000000000000..23466cce7993
--- /dev/null
+++ b/srcpkgs/libtracefs-devel
@@ -0,0 +1 @@
+libtracefs
\ No newline at end of file
diff --git a/srcpkgs/libtracefs/patches/musl-limits_h.patch b/srcpkgs/libtracefs/patches/musl-limits_h.patch
new file mode 100644
index 000000000000..b499fdceb66d
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl-limits_h.patch
@@ -0,0 +1,10 @@
+--- a/utest/tracefs-utest.c
++++ b/utest/tracefs-utest.c
+@@ -11,6 +11,7 @@
+ #include <time.h>
+ #include <dirent.h>
+ #include <ftw.h>
++#include <limits.h>
+
+ #include <CUnit/CUnit.h>
+ #include <CUnit/Basic.h>
diff --git a/srcpkgs/libtracefs/patches/musl.patch b/srcpkgs/libtracefs/patches/musl.patch
new file mode 100644
index 000000000000..0191cc04ff0b
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl.patch
@@ -0,0 +1,15 @@
+--- a/include/tracefs.h
++++ b/include/tracefs.h
+@@ -10,6 +10,12 @@
+ #include <sched.h>
+ #include <event-parse.h>
+
++#ifndef __GLIBC__
++/* See CPU_SET(3) */
++struct cpu_set_t;
++typedef struct cpu_set_t cpu_set_t;
++#endif
++
+ char *tracefs_get_tracing_file(const char *name);
+ void tracefs_put_tracing_file(char *name);
+
diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template
new file mode 100644
index 000000000000..424e7bb72843
--- /dev/null
+++ b/srcpkgs/libtracefs/template
@@ -0,0 +1,42 @@
+# Template file for 'libtracefs'
+pkgname=libtracefs
+version=1.4.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install install_doc"
+make_use_env=yes
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+makedepends="libtraceevent-devel"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace file system library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-${version}.tar.gz"
+checksum=8ad03e6d2a6227f6eb11692d9f04614d3da60ac6c5e4fe436e59b2bed90f031b
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ # manpage for sample program
+ rm ${DESTDIR}/usr/share/man/man1/sqlhist.1
+}
+
+libtracefs-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} libtraceevent-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/doc
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From dd828ffc175343419e9581bce94c79def9e15b9d Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 02:39:52 -0400
Subject: [PATCH 3/4] trace-cmd: update to 3.1.2.
---
common/shlibs | 1 +
srcpkgs/{kernelshark => libtracecmd} | 0
srcpkgs/libtracecmd-devel | 1 +
.../trace-cmd/patches/fix-program-name.patch | 23 --------
srcpkgs/trace-cmd/patches/musl-limits_h.patch | 44 +++++++++------
.../musl-no_pthread_attr_setaffinity_np.patch | 24 --------
.../trace-cmd/patches/musl-pthread_h.patch | 10 ----
srcpkgs/trace-cmd/patches/no-rpath.patch | 20 +++++++
srcpkgs/trace-cmd/template | 56 +++++++++++--------
9 files changed, 83 insertions(+), 96 deletions(-)
rename srcpkgs/{kernelshark => libtracecmd} (100%)
create mode 120000 srcpkgs/libtracecmd-devel
delete mode 100644 srcpkgs/trace-cmd/patches/fix-program-name.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-pthread_h.patch
create mode 100644 srcpkgs/trace-cmd/patches/no-rpath.patch
diff --git a/common/shlibs b/common/shlibs
index cc3a69af2a2b..d0efac27f360 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4178,3 +4178,4 @@ libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_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
diff --git a/srcpkgs/kernelshark b/srcpkgs/libtracecmd
similarity index 100%
rename from srcpkgs/kernelshark
rename to srcpkgs/libtracecmd
diff --git a/srcpkgs/libtracecmd-devel b/srcpkgs/libtracecmd-devel
new file mode 120000
index 000000000000..77b3407d0913
--- /dev/null
+++ b/srcpkgs/libtracecmd-devel
@@ -0,0 +1 @@
+trace-cmd
\ No newline at end of file
diff --git a/srcpkgs/trace-cmd/patches/fix-program-name.patch b/srcpkgs/trace-cmd/patches/fix-program-name.patch
deleted file mode 100644
index 970122246115..000000000000
--- a/srcpkgs/trace-cmd/patches/fix-program-name.patch
+++ /dev/null
@@ -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':
diff --git a/srcpkgs/trace-cmd/patches/musl-limits_h.patch b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
index 83e278c8ab9e..af90e89b8d75 100644
--- a/srcpkgs/trace-cmd/patches/musl-limits_h.patch
+++ b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
@@ -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>
diff --git a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch b/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
deleted file mode 100644
index 5203d3335c2b..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
+++ /dev/null
@@ -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);
-
diff --git a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch b/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
deleted file mode 100644
index 367588391845..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
+++ /dev/null
@@ -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 }
diff --git a/srcpkgs/trace-cmd/patches/no-rpath.patch b/srcpkgs/trace-cmd/patches/no-rpath.patch
new file mode 100644
index 000000000000..ff2fd9fe864e
--- /dev/null
+++ b/srcpkgs/trace-cmd/patches/no-rpath.patch
@@ -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) \
diff --git a/srcpkgs/trace-cmd/template b/srcpkgs/trace-cmd/template
index 34f9bcb40d42..e4643142e379 100644
--- a/srcpkgs/trace-cmd/template
+++ b/srcpkgs/trace-cmd/template
@@ -1,37 +1,49 @@
# Template file for 'trace-cmd'
pkgname=trace-cmd
-version=2.9.1
+version=3.1.2
revision=1
wrksrc="${pkgname}-v${version}"
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="prefix=/usr 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=206672af60aa0bc35cfc44a4be746efa575bac729060e54b6453f7d5dfbcd979
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
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
+}
+
+libtracecmd_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/*.so.*"
+ }
}
-kernelshark_package() {
- depends="${sourcepkg}>=${version}_${revision}"
- short_desc="GUI for ftrace Linux kernel internal tracer"
+libtracecmd-devel_package() {
+ depends="libtracecmd>=${version}_${revision}"
+ short_desc+=" - development files"
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/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc/libtracecmd-doc
}
}
From c790bd85eb79d71e50325f71dc441e004bc47949 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 03:07:55 -0400
Subject: [PATCH 4/4] kernelshark: split from trace-cmd, update to 2.1.1
---
common/shlibs | 1 +
srcpkgs/kernelshark/patches/musl.patch | 20 +++++++++++++
srcpkgs/kernelshark/template | 41 ++++++++++++++++++++++++++
srcpkgs/kernelshark/update | 1 +
srcpkgs/libkshark | 1 +
srcpkgs/libkshark-devel | 1 +
6 files changed, 65 insertions(+)
create mode 100644 srcpkgs/kernelshark/patches/musl.patch
create mode 100644 srcpkgs/kernelshark/template
create mode 100644 srcpkgs/kernelshark/update
create mode 120000 srcpkgs/libkshark
create mode 120000 srcpkgs/libkshark-devel
diff --git a/common/shlibs b/common/shlibs
index d0efac27f360..9387807c0574 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4179,3 +4179,4 @@ libgbinder.so.1 libgbinder-1.1.20_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
+libkshark.so.2 libkshark-2.1.1_1
diff --git a/srcpkgs/kernelshark/patches/musl.patch b/srcpkgs/kernelshark/patches/musl.patch
new file mode 100644
index 000000000000..e02fddb486c7
--- /dev/null
+++ b/srcpkgs/kernelshark/patches/musl.patch
@@ -0,0 +1,20 @@
+--- a/src/libkshark.h
++++ b/src/libkshark.h
+@@ -17,6 +17,7 @@
+ #include <string.h>
+ #include <pthread.h>
+ #include <errno.h>
++#include <sys/types.h>
+
+ // Json-C
+ #include <json-c/json.h>
+--- a/src/kernelshark.cpp
++++ b/src/kernelshark.cpp
+@@ -7,6 +7,7 @@
+ // C
+ #include <sys/stat.h>
+ #include <getopt.h>
++#include <libgen.h>
+
+ // Qt
+ #include <QApplication>
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
new file mode 100644
index 000000000000..f3f4ba8faec8
--- /dev/null
+++ b/srcpkgs/kernelshark/template
@@ -0,0 +1,41 @@
+# Template file for 'kernelshark'
+pkgname=kernelshark
+reverts="2.9.1_1 2.9_1 2.8.3_2 2.8.3_1 2.8.2_1 2.8.1_1 2.7_2 2.7_1 2.6.2_1 2.6.1_1
+ 2.6_1 2.5.3_3 2.5.3_2 2.5.3_1 2.5.1_1 2.5_1 2.4_1"
+version=2.1.1
+revision=1
+wrksrc="kernel-shark-kernelshark-v${version}"
+build_style=cmake
+# It's PKG_CONGIG_DIR not PKG_CONFIG_DIR
+configure_args="-D_INSTALL_PREFIX=/usr -D_LIBDIR=/usr/lib$XBPS_TARGET_WORDSIZE
+ -DPKG_CONGIG_DIR=/usr/lib/pkgconfig -DTT_FONT_FILE=/usr/share/fonts/TTF/FreeSans.ttf
+ -DTRACECMD_EXECUTABLE=/usr/bin/trace-cmd -DCMAKE_SKIP_RPATH=ON"
+hostmakedepends="qt5-qmake qt5-host-tools pkg-config"
+makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
+ libtraceevent-devel libtracefs-devel libtracecmd-devel"
+depends="freefont-ttf trace-cmd"
+short_desc="Front end reader of trace-cmd(1) output"
+maintainer="Leah Neukirchen <leah@vuxu.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.kernelshark.org"
+distfiles="https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/snapshot/kernel-shark-kernelshark-v${version}.tar.gz"
+checksum=78a0cf28bc06d0e43cd5a2512f83c02b7b5c969a26a0d4b56338154d6cf6f7be
+# requires externally-downloaded data and segfaults on some gui tests
+make_check=no
+
+libkshark_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/libkshark.so.*"
+ }
+}
+
+libkshark-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/kernelshark/update b/srcpkgs/kernelshark/update
new file mode 100644
index 000000000000..8b5f28fc01ca
--- /dev/null
+++ b/srcpkgs/kernelshark/update
@@ -0,0 +1 @@
+pkgname=kernel-shark-kernelshark
diff --git a/srcpkgs/libkshark b/srcpkgs/libkshark
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
diff --git a/srcpkgs/libkshark-devel b/srcpkgs/libkshark-devel
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark-devel
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (25 preceding siblings ...)
2022-08-23 20:40 ` [PR PATCH] [Updated] " classabbyamp
@ 2022-08-23 21:15 ` classabbyamp
2022-08-23 21:27 ` classabbyamp
` (27 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-23 21:15 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2292 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#issuecomment-1223788017
Comment:
no clue why it's not finding libtracecmd:
```
CMake Debug Log at build/FindTraceCmd.cmake:49 (find_library):
find_library called with the following settings:
VAR: TraceCmd_LIBRARY
NAMES: "tracecmd"
"libtracecmd"
Documentation: Path to a library.
Framework
Only Search Frameworks: 0
Search Frameworks Last: 0
Search Frameworks First: 0
AppBundle
Only Search AppBundle: 0
Search AppBundle Last: 0
Search AppBundle First: 0
CMAKE_FIND_USE_CMAKE_PATH: 1
CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: 1
CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: 1
CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: 1
find_library considered the following locations:
/usr/lib/(lib)tracecmd(\.so|\.a)
/builddir/.xbps-kernelshark/wrappers/(lib)tracecmd(\.so|\.a)
/usr/lib/ccache/bin/(lib)tracecmd(\.so|\.a)
/usr/bin/(lib)tracecmd(\.so|\.a)
/usr/local/bin/(lib)tracecmd(\.so|\.a)
/bin/(lib)tracecmd(\.so|\.a)
/usr/local/sbin/(lib)tracecmd(\.so|\.a)
/usr/sbin/(lib)tracecmd(\.so|\.a)
/sbin/(lib)tracecmd(\.so|\.a)
/usr/local/lib/(lib)tracecmd(\.so|\.a)
/usr/local/(lib)tracecmd(\.so|\.a)
/usr/(lib)tracecmd(\.so|\.a)
/lib/(lib)tracecmd(\.so|\.a)
/opt/(lib)tracecmd(\.so|\.a)
/usr/lib/(lib)libtracecmd(\.so|\.a)
/builddir/.xbps-kernelshark/wrappers/(lib)libtracecmd(\.so|\.a)
/usr/lib/ccache/bin/(lib)libtracecmd(\.so|\.a)
/usr/bin/(lib)libtracecmd(\.so|\.a)
/usr/local/bin/(lib)libtracecmd(\.so|\.a)
/bin/(lib)libtracecmd(\.so|\.a)
/usr/local/sbin/(lib)libtracecmd(\.so|\.a)
/usr/sbin/(lib)libtracecmd(\.so|\.a)
/sbin/(lib)libtracecmd(\.so|\.a)
/usr/local/lib/(lib)libtracecmd(\.so|\.a)
/usr/local/(lib)libtracecmd(\.so|\.a)
/usr/(lib)libtracecmd(\.so|\.a)
/lib/(lib)libtracecmd(\.so|\.a)
/opt/(lib)libtracecmd(\.so|\.a)
The item was not found.
```
because the pkgconfig file for that library lists `libdir=/usr/lib` and the file exists in libtracecmd-devel:
```
/usr/lib/libtracecmd.so -> /usr/lib/libtracecmd.so.1
```
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (26 preceding siblings ...)
2022-08-23 21:15 ` classabbyamp
@ 2022-08-23 21:27 ` classabbyamp
2022-08-23 22:25 ` [PR PATCH] [Updated] " classabbyamp
` (26 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-23 21:27 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 186 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#issuecomment-1224904996
Comment:
marking as draft until #38823 is merged
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR PATCH] [Updated] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (27 preceding siblings ...)
2022-08-23 21:27 ` classabbyamp
@ 2022-08-23 22:25 ` classabbyamp
2022-08-24 0:19 ` [PR REVIEW] " sgn
` (25 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-23 22:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages update/trace-cmd-3.1.2
https://github.com/void-linux/void-packages/pull/38851
trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
- New package: libtraceevent-1.6.2
- New package: libtracefs-1.4.2
- trace-cmd: update to 3.1.2.
- kernelshark: split from trace-cmd, update to 2.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (builds & runs, but I'm not sure how to use this so I can't test further)
A patch file from https://github.com/void-linux/void-packages/pull/38851.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update/trace-cmd-3.1.2-38851.patch --]
[-- Type: text/x-diff, Size: 20930 bytes --]
From b557470cce76bab63fb4b845abf62f6fac40f2fd Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:37:06 -0400
Subject: [PATCH 1/4] New package: libtraceevent-1.6.2
---
common/shlibs | 1 +
srcpkgs/libtraceevent-devel | 1 +
srcpkgs/libtraceevent/template | 35 ++++++++++++++++++++++++++++++++++
3 files changed, 37 insertions(+)
create mode 120000 srcpkgs/libtraceevent-devel
create mode 100644 srcpkgs/libtraceevent/template
diff --git a/common/shlibs b/common/shlibs
index f829ee12e80f..9bd26c6c36c9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4176,3 +4176,4 @@ libsyncthingmodel.so.1.2.2 syncthingtray-1.2.2_1
libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
+libtraceevent.so.1 libtraceevent-1.6.2_1
diff --git a/srcpkgs/libtraceevent-devel b/srcpkgs/libtraceevent-devel
new file mode 120000
index 000000000000..9ca91c55529f
--- /dev/null
+++ b/srcpkgs/libtraceevent-devel
@@ -0,0 +1 @@
+libtraceevent
\ No newline at end of file
diff --git a/srcpkgs/libtraceevent/template b/srcpkgs/libtraceevent/template
new file mode 100644
index 000000000000..b340408252cd
--- /dev/null
+++ b/srcpkgs/libtraceevent/template
@@ -0,0 +1,35 @@
+# Template file for 'libtraceevent'
+pkgname=libtraceevent
+version=1.6.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install doc-install"
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace event library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-${version}.tar.gz"
+checksum=1aaeb12f5842a843a06b733e3f4230b0937ba9c2ecd39345edf6f66cc8cbe795
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+libtraceevent-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc
+ }
+}
From 0dc670c580fb248e6f4ad12937964d935fede15e Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:41:02 -0400
Subject: [PATCH 2/4] New package: libtracefs-1.4.2
---
common/shlibs | 1 +
srcpkgs/libtracefs-devel | 1 +
.../libtracefs/patches/musl-limits_h.patch | 10 +++++
srcpkgs/libtracefs/patches/musl.patch | 15 +++++++
srcpkgs/libtracefs/template | 42 +++++++++++++++++++
5 files changed, 69 insertions(+)
create mode 120000 srcpkgs/libtracefs-devel
create mode 100644 srcpkgs/libtracefs/patches/musl-limits_h.patch
create mode 100644 srcpkgs/libtracefs/patches/musl.patch
create mode 100644 srcpkgs/libtracefs/template
diff --git a/common/shlibs b/common/shlibs
index 9bd26c6c36c9..cc3a69af2a2b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4177,3 +4177,4 @@ libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
libtraceevent.so.1 libtraceevent-1.6.2_1
+libtracefs.so.1 libtracefs-1.4.2_1
diff --git a/srcpkgs/libtracefs-devel b/srcpkgs/libtracefs-devel
new file mode 120000
index 000000000000..23466cce7993
--- /dev/null
+++ b/srcpkgs/libtracefs-devel
@@ -0,0 +1 @@
+libtracefs
\ No newline at end of file
diff --git a/srcpkgs/libtracefs/patches/musl-limits_h.patch b/srcpkgs/libtracefs/patches/musl-limits_h.patch
new file mode 100644
index 000000000000..b499fdceb66d
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl-limits_h.patch
@@ -0,0 +1,10 @@
+--- a/utest/tracefs-utest.c
++++ b/utest/tracefs-utest.c
+@@ -11,6 +11,7 @@
+ #include <time.h>
+ #include <dirent.h>
+ #include <ftw.h>
++#include <limits.h>
+
+ #include <CUnit/CUnit.h>
+ #include <CUnit/Basic.h>
diff --git a/srcpkgs/libtracefs/patches/musl.patch b/srcpkgs/libtracefs/patches/musl.patch
new file mode 100644
index 000000000000..0191cc04ff0b
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl.patch
@@ -0,0 +1,15 @@
+--- a/include/tracefs.h
++++ b/include/tracefs.h
+@@ -10,6 +10,12 @@
+ #include <sched.h>
+ #include <event-parse.h>
+
++#ifndef __GLIBC__
++/* See CPU_SET(3) */
++struct cpu_set_t;
++typedef struct cpu_set_t cpu_set_t;
++#endif
++
+ char *tracefs_get_tracing_file(const char *name);
+ void tracefs_put_tracing_file(char *name);
+
diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template
new file mode 100644
index 000000000000..0a2ab38bd50a
--- /dev/null
+++ b/srcpkgs/libtracefs/template
@@ -0,0 +1,42 @@
+# Template file for 'libtracefs'
+pkgname=libtracefs
+version=1.4.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install install_doc"
+make_use_env=yes
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+makedepends="libtraceevent-devel"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace file system library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-${version}.tar.gz"
+checksum=8ad03e6d2a6227f6eb11692d9f04614d3da60ac6c5e4fe436e59b2bed90f031b
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ # manpage for sample program
+ rm ${DESTDIR}/usr/share/man/man1/sqlhist.1
+}
+
+libtracefs-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/doc
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From d910ed0518ddf367ecd5e97e8895be839397b03b Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 02:39:52 -0400
Subject: [PATCH 3/4] trace-cmd: update to 3.1.2.
---
common/shlibs | 1 +
srcpkgs/{kernelshark => libtracecmd} | 0
srcpkgs/libtracecmd-devel | 1 +
.../trace-cmd/patches/fix-program-name.patch | 23 --------
srcpkgs/trace-cmd/patches/musl-limits_h.patch | 44 +++++++++------
.../musl-no_pthread_attr_setaffinity_np.patch | 24 --------
.../trace-cmd/patches/musl-pthread_h.patch | 10 ----
srcpkgs/trace-cmd/patches/no-rpath.patch | 20 +++++++
srcpkgs/trace-cmd/template | 56 +++++++++++--------
9 files changed, 83 insertions(+), 96 deletions(-)
rename srcpkgs/{kernelshark => libtracecmd} (100%)
create mode 120000 srcpkgs/libtracecmd-devel
delete mode 100644 srcpkgs/trace-cmd/patches/fix-program-name.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-pthread_h.patch
create mode 100644 srcpkgs/trace-cmd/patches/no-rpath.patch
diff --git a/common/shlibs b/common/shlibs
index cc3a69af2a2b..d0efac27f360 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4178,3 +4178,4 @@ libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_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
diff --git a/srcpkgs/kernelshark b/srcpkgs/libtracecmd
similarity index 100%
rename from srcpkgs/kernelshark
rename to srcpkgs/libtracecmd
diff --git a/srcpkgs/libtracecmd-devel b/srcpkgs/libtracecmd-devel
new file mode 120000
index 000000000000..77b3407d0913
--- /dev/null
+++ b/srcpkgs/libtracecmd-devel
@@ -0,0 +1 @@
+trace-cmd
\ No newline at end of file
diff --git a/srcpkgs/trace-cmd/patches/fix-program-name.patch b/srcpkgs/trace-cmd/patches/fix-program-name.patch
deleted file mode 100644
index 970122246115..000000000000
--- a/srcpkgs/trace-cmd/patches/fix-program-name.patch
+++ /dev/null
@@ -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':
diff --git a/srcpkgs/trace-cmd/patches/musl-limits_h.patch b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
index 83e278c8ab9e..af90e89b8d75 100644
--- a/srcpkgs/trace-cmd/patches/musl-limits_h.patch
+++ b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
@@ -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>
diff --git a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch b/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
deleted file mode 100644
index 5203d3335c2b..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
+++ /dev/null
@@ -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);
-
diff --git a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch b/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
deleted file mode 100644
index 367588391845..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
+++ /dev/null
@@ -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 }
diff --git a/srcpkgs/trace-cmd/patches/no-rpath.patch b/srcpkgs/trace-cmd/patches/no-rpath.patch
new file mode 100644
index 000000000000..ff2fd9fe864e
--- /dev/null
+++ b/srcpkgs/trace-cmd/patches/no-rpath.patch
@@ -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) \
diff --git a/srcpkgs/trace-cmd/template b/srcpkgs/trace-cmd/template
index 34f9bcb40d42..86691a37b502 100644
--- a/srcpkgs/trace-cmd/template
+++ b/srcpkgs/trace-cmd/template
@@ -1,37 +1,49 @@
# Template file for 'trace-cmd'
pkgname=trace-cmd
-version=2.9.1
+version=3.1.2
revision=1
wrksrc="${pkgname}-v${version}"
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="prefix=/usr 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=206672af60aa0bc35cfc44a4be746efa575bac729060e54b6453f7d5dfbcd979
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
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
+}
+
+libtracecmd_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/*.so.*"
+ }
}
-kernelshark_package() {
- depends="${sourcepkg}>=${version}_${revision}"
- short_desc="GUI for ftrace Linux kernel internal tracer"
+libtracecmd-devel_package() {
+ depends="libtracecmd>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
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/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc/libtracecmd-doc
}
}
From 1acceda93a1c8521d2fc008c95939170f830e9f3 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 03:07:55 -0400
Subject: [PATCH 4/4] kernelshark: split from trace-cmd, update to 2.1.1
---
common/shlibs | 1 +
srcpkgs/kernelshark/patches/musl.patch | 20 +++++++++++++
srcpkgs/kernelshark/template | 41 ++++++++++++++++++++++++++
srcpkgs/kernelshark/update | 1 +
srcpkgs/libkshark | 1 +
srcpkgs/libkshark-devel | 1 +
6 files changed, 65 insertions(+)
create mode 100644 srcpkgs/kernelshark/patches/musl.patch
create mode 100644 srcpkgs/kernelshark/template
create mode 100644 srcpkgs/kernelshark/update
create mode 120000 srcpkgs/libkshark
create mode 120000 srcpkgs/libkshark-devel
diff --git a/common/shlibs b/common/shlibs
index d0efac27f360..9387807c0574 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4179,3 +4179,4 @@ libgbinder.so.1 libgbinder-1.1.20_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
+libkshark.so.2 libkshark-2.1.1_1
diff --git a/srcpkgs/kernelshark/patches/musl.patch b/srcpkgs/kernelshark/patches/musl.patch
new file mode 100644
index 000000000000..e02fddb486c7
--- /dev/null
+++ b/srcpkgs/kernelshark/patches/musl.patch
@@ -0,0 +1,20 @@
+--- a/src/libkshark.h
++++ b/src/libkshark.h
+@@ -17,6 +17,7 @@
+ #include <string.h>
+ #include <pthread.h>
+ #include <errno.h>
++#include <sys/types.h>
+
+ // Json-C
+ #include <json-c/json.h>
+--- a/src/kernelshark.cpp
++++ b/src/kernelshark.cpp
+@@ -7,6 +7,7 @@
+ // C
+ #include <sys/stat.h>
+ #include <getopt.h>
++#include <libgen.h>
+
+ // Qt
+ #include <QApplication>
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
new file mode 100644
index 000000000000..fc41212df5ef
--- /dev/null
+++ b/srcpkgs/kernelshark/template
@@ -0,0 +1,41 @@
+# Template file for 'kernelshark'
+pkgname=kernelshark
+reverts="2.9.1_1 2.9_1 2.8.3_2 2.8.3_1 2.8.2_1 2.8.1_1 2.7_2 2.7_1 2.6.2_1 2.6.1_1
+ 2.6_1 2.5.3_3 2.5.3_2 2.5.3_1 2.5.1_1 2.5_1 2.4_1"
+version=2.1.1
+revision=1
+wrksrc="kernel-shark-kernelshark-v${version}"
+build_style=cmake
+# It's PKG_CONGIG_DIR not PKG_CONFIG_DIR
+configure_args="-D_INSTALL_PREFIX=/usr -D_LIBDIR=/usr/lib$XBPS_TARGET_WORDSIZE
+ -DPKG_CONGIG_DIR=/usr/lib/pkgconfig -DTT_FONT_FILE=/usr/share/fonts/TTF/FreeSans.ttf
+ -DTRACECMD_EXECUTABLE=/usr/bin/trace-cmd -DCMAKE_SKIP_RPATH=ON"
+hostmakedepends="qt5-qmake qt5-host-tools pkg-config"
+makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
+ libtraceevent-devel libtracefs-devel libtracecmd-devel"
+depends="freefont-ttf trace-cmd"
+short_desc="Front end reader of trace-cmd(1) output"
+maintainer="Leah Neukirchen <leah@vuxu.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.kernelshark.org"
+distfiles="https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/snapshot/kernel-shark-kernelshark-v${version}.tar.gz"
+checksum=78a0cf28bc06d0e43cd5a2512f83c02b7b5c969a26a0d4b56338154d6cf6f7be
+# requires externally-downloaded data and segfaults on some gui tests
+make_check=no
+
+libkshark_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/libkshark.so.*"
+ }
+}
+
+libkshark-devel_package() {
+ depends="libkshark>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/kernelshark/update b/srcpkgs/kernelshark/update
new file mode 100644
index 000000000000..8b5f28fc01ca
--- /dev/null
+++ b/srcpkgs/kernelshark/update
@@ -0,0 +1 @@
+pkgname=kernel-shark-kernelshark
diff --git a/srcpkgs/libkshark b/srcpkgs/libkshark
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
diff --git a/srcpkgs/libkshark-devel b/srcpkgs/libkshark-devel
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark-devel
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR REVIEW] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (28 preceding siblings ...)
2022-08-23 22:25 ` [PR PATCH] [Updated] " classabbyamp
@ 2022-08-24 0:19 ` sgn
2022-08-24 0:20 ` classabbyamp
` (24 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: sgn @ 2022-08-24 0:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 279 bytes --]
New review comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#discussion_r953206874
Comment:
I don't think `__GLIBC__` is correct choice, even glibc put `cpu_set_t` under `#ifdef _GNU_SOURCE`, someone on glibc may `-U_GNU_SOURCE`
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR REVIEW] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (29 preceding siblings ...)
2022-08-24 0:19 ` [PR REVIEW] " sgn
@ 2022-08-24 0:20 ` classabbyamp
2022-08-24 0:22 ` [PR PATCH] [Updated] " classabbyamp
` (23 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-24 0:20 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 208 bytes --]
New review comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#discussion_r953207323
Comment:
it didn't work for me on musl with the _GNU_SOURCE guard
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR PATCH] [Updated] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (30 preceding siblings ...)
2022-08-24 0:20 ` classabbyamp
@ 2022-08-24 0:22 ` classabbyamp
2022-08-24 0:23 ` [PR REVIEW] " sgn
` (22 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-24 0:22 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages update/trace-cmd-3.1.2
https://github.com/void-linux/void-packages/pull/38851
trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
- New package: libtraceevent-1.6.2
- New package: libtracefs-1.4.2
- trace-cmd: update to 3.1.2.
- kernelshark: split from trace-cmd, update to 2.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (builds & runs, but I'm not sure how to use this so I can't test further)
A patch file from https://github.com/void-linux/void-packages/pull/38851.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update/trace-cmd-3.1.2-38851.patch --]
[-- Type: text/x-diff, Size: 20932 bytes --]
From b557470cce76bab63fb4b845abf62f6fac40f2fd Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:37:06 -0400
Subject: [PATCH 1/4] New package: libtraceevent-1.6.2
---
common/shlibs | 1 +
srcpkgs/libtraceevent-devel | 1 +
srcpkgs/libtraceevent/template | 35 ++++++++++++++++++++++++++++++++++
3 files changed, 37 insertions(+)
create mode 120000 srcpkgs/libtraceevent-devel
create mode 100644 srcpkgs/libtraceevent/template
diff --git a/common/shlibs b/common/shlibs
index f829ee12e80f..9bd26c6c36c9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4176,3 +4176,4 @@ libsyncthingmodel.so.1.2.2 syncthingtray-1.2.2_1
libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
+libtraceevent.so.1 libtraceevent-1.6.2_1
diff --git a/srcpkgs/libtraceevent-devel b/srcpkgs/libtraceevent-devel
new file mode 120000
index 000000000000..9ca91c55529f
--- /dev/null
+++ b/srcpkgs/libtraceevent-devel
@@ -0,0 +1 @@
+libtraceevent
\ No newline at end of file
diff --git a/srcpkgs/libtraceevent/template b/srcpkgs/libtraceevent/template
new file mode 100644
index 000000000000..b340408252cd
--- /dev/null
+++ b/srcpkgs/libtraceevent/template
@@ -0,0 +1,35 @@
+# Template file for 'libtraceevent'
+pkgname=libtraceevent
+version=1.6.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install doc-install"
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace event library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-${version}.tar.gz"
+checksum=1aaeb12f5842a843a06b733e3f4230b0937ba9c2ecd39345edf6f66cc8cbe795
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+libtraceevent-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc
+ }
+}
From 59d0d3e39b8640e04eb8248687d91e96f3bdf68b Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:41:02 -0400
Subject: [PATCH 2/4] New package: libtracefs-1.4.2
---
common/shlibs | 1 +
srcpkgs/libtracefs-devel | 1 +
.../libtracefs/patches/musl-limits_h.patch | 10 +++++
srcpkgs/libtracefs/patches/musl.patch | 15 +++++++
srcpkgs/libtracefs/template | 42 +++++++++++++++++++
5 files changed, 69 insertions(+)
create mode 120000 srcpkgs/libtracefs-devel
create mode 100644 srcpkgs/libtracefs/patches/musl-limits_h.patch
create mode 100644 srcpkgs/libtracefs/patches/musl.patch
create mode 100644 srcpkgs/libtracefs/template
diff --git a/common/shlibs b/common/shlibs
index 9bd26c6c36c9..cc3a69af2a2b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4177,3 +4177,4 @@ libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
libtraceevent.so.1 libtraceevent-1.6.2_1
+libtracefs.so.1 libtracefs-1.4.2_1
diff --git a/srcpkgs/libtracefs-devel b/srcpkgs/libtracefs-devel
new file mode 120000
index 000000000000..23466cce7993
--- /dev/null
+++ b/srcpkgs/libtracefs-devel
@@ -0,0 +1 @@
+libtracefs
\ No newline at end of file
diff --git a/srcpkgs/libtracefs/patches/musl-limits_h.patch b/srcpkgs/libtracefs/patches/musl-limits_h.patch
new file mode 100644
index 000000000000..b499fdceb66d
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl-limits_h.patch
@@ -0,0 +1,10 @@
+--- a/utest/tracefs-utest.c
++++ b/utest/tracefs-utest.c
+@@ -11,6 +11,7 @@
+ #include <time.h>
+ #include <dirent.h>
+ #include <ftw.h>
++#include <limits.h>
+
+ #include <CUnit/CUnit.h>
+ #include <CUnit/Basic.h>
diff --git a/srcpkgs/libtracefs/patches/musl.patch b/srcpkgs/libtracefs/patches/musl.patch
new file mode 100644
index 000000000000..b30126ce5736
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl.patch
@@ -0,0 +1,15 @@
+--- a/include/tracefs.h
++++ b/include/tracefs.h
+@@ -10,6 +10,12 @@
+ #include <sched.h>
+ #include <event-parse.h>
+
++#ifndef _GNU_SOURCE
++/* See CPU_SET(3) */
++struct cpu_set_t;
++typedef struct cpu_set_t cpu_set_t;
++#endif
++
+ char *tracefs_get_tracing_file(const char *name);
+ void tracefs_put_tracing_file(char *name);
+
diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template
new file mode 100644
index 000000000000..0a2ab38bd50a
--- /dev/null
+++ b/srcpkgs/libtracefs/template
@@ -0,0 +1,42 @@
+# Template file for 'libtracefs'
+pkgname=libtracefs
+version=1.4.2
+revision=1
+build_style=gnu-makefile
+make_build_args="prefix=/usr libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install install_doc"
+make_use_env=yes
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+makedepends="libtraceevent-devel"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace file system library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-${version}.tar.gz"
+checksum=8ad03e6d2a6227f6eb11692d9f04614d3da60ac6c5e4fe436e59b2bed90f031b
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ # manpage for sample program
+ rm ${DESTDIR}/usr/share/man/man1/sqlhist.1
+}
+
+libtracefs-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/doc
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From 9adf2c3208be42a968f4b97993aaa5bed021e2cb Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 02:39:52 -0400
Subject: [PATCH 3/4] trace-cmd: update to 3.1.2.
---
common/shlibs | 1 +
srcpkgs/{kernelshark => libtracecmd} | 0
srcpkgs/libtracecmd-devel | 1 +
.../trace-cmd/patches/fix-program-name.patch | 23 --------
srcpkgs/trace-cmd/patches/musl-limits_h.patch | 44 +++++++++------
.../musl-no_pthread_attr_setaffinity_np.patch | 24 --------
.../trace-cmd/patches/musl-pthread_h.patch | 10 ----
srcpkgs/trace-cmd/patches/no-rpath.patch | 20 +++++++
srcpkgs/trace-cmd/template | 56 +++++++++++--------
9 files changed, 83 insertions(+), 96 deletions(-)
rename srcpkgs/{kernelshark => libtracecmd} (100%)
create mode 120000 srcpkgs/libtracecmd-devel
delete mode 100644 srcpkgs/trace-cmd/patches/fix-program-name.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-pthread_h.patch
create mode 100644 srcpkgs/trace-cmd/patches/no-rpath.patch
diff --git a/common/shlibs b/common/shlibs
index cc3a69af2a2b..d0efac27f360 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4178,3 +4178,4 @@ libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_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
diff --git a/srcpkgs/kernelshark b/srcpkgs/libtracecmd
similarity index 100%
rename from srcpkgs/kernelshark
rename to srcpkgs/libtracecmd
diff --git a/srcpkgs/libtracecmd-devel b/srcpkgs/libtracecmd-devel
new file mode 120000
index 000000000000..77b3407d0913
--- /dev/null
+++ b/srcpkgs/libtracecmd-devel
@@ -0,0 +1 @@
+trace-cmd
\ No newline at end of file
diff --git a/srcpkgs/trace-cmd/patches/fix-program-name.patch b/srcpkgs/trace-cmd/patches/fix-program-name.patch
deleted file mode 100644
index 970122246115..000000000000
--- a/srcpkgs/trace-cmd/patches/fix-program-name.patch
+++ /dev/null
@@ -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':
diff --git a/srcpkgs/trace-cmd/patches/musl-limits_h.patch b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
index 83e278c8ab9e..af90e89b8d75 100644
--- a/srcpkgs/trace-cmd/patches/musl-limits_h.patch
+++ b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
@@ -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>
diff --git a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch b/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
deleted file mode 100644
index 5203d3335c2b..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
+++ /dev/null
@@ -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);
-
diff --git a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch b/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
deleted file mode 100644
index 367588391845..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
+++ /dev/null
@@ -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 }
diff --git a/srcpkgs/trace-cmd/patches/no-rpath.patch b/srcpkgs/trace-cmd/patches/no-rpath.patch
new file mode 100644
index 000000000000..ff2fd9fe864e
--- /dev/null
+++ b/srcpkgs/trace-cmd/patches/no-rpath.patch
@@ -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) \
diff --git a/srcpkgs/trace-cmd/template b/srcpkgs/trace-cmd/template
index 34f9bcb40d42..86691a37b502 100644
--- a/srcpkgs/trace-cmd/template
+++ b/srcpkgs/trace-cmd/template
@@ -1,37 +1,49 @@
# Template file for 'trace-cmd'
pkgname=trace-cmd
-version=2.9.1
+version=3.1.2
revision=1
wrksrc="${pkgname}-v${version}"
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="prefix=/usr 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=206672af60aa0bc35cfc44a4be746efa575bac729060e54b6453f7d5dfbcd979
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
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
+}
+
+libtracecmd_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/*.so.*"
+ }
}
-kernelshark_package() {
- depends="${sourcepkg}>=${version}_${revision}"
- short_desc="GUI for ftrace Linux kernel internal tracer"
+libtracecmd-devel_package() {
+ depends="libtracecmd>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
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/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc/libtracecmd-doc
}
}
From 4a706352c9e7ce918c3b5ae548956558959fa69c Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 03:07:55 -0400
Subject: [PATCH 4/4] kernelshark: split from trace-cmd, update to 2.1.1
---
common/shlibs | 1 +
srcpkgs/kernelshark/patches/musl.patch | 20 +++++++++++++
srcpkgs/kernelshark/template | 41 ++++++++++++++++++++++++++
srcpkgs/kernelshark/update | 1 +
srcpkgs/libkshark | 1 +
srcpkgs/libkshark-devel | 1 +
6 files changed, 65 insertions(+)
create mode 100644 srcpkgs/kernelshark/patches/musl.patch
create mode 100644 srcpkgs/kernelshark/template
create mode 100644 srcpkgs/kernelshark/update
create mode 120000 srcpkgs/libkshark
create mode 120000 srcpkgs/libkshark-devel
diff --git a/common/shlibs b/common/shlibs
index d0efac27f360..9387807c0574 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4179,3 +4179,4 @@ libgbinder.so.1 libgbinder-1.1.20_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
+libkshark.so.2 libkshark-2.1.1_1
diff --git a/srcpkgs/kernelshark/patches/musl.patch b/srcpkgs/kernelshark/patches/musl.patch
new file mode 100644
index 000000000000..e02fddb486c7
--- /dev/null
+++ b/srcpkgs/kernelshark/patches/musl.patch
@@ -0,0 +1,20 @@
+--- a/src/libkshark.h
++++ b/src/libkshark.h
+@@ -17,6 +17,7 @@
+ #include <string.h>
+ #include <pthread.h>
+ #include <errno.h>
++#include <sys/types.h>
+
+ // Json-C
+ #include <json-c/json.h>
+--- a/src/kernelshark.cpp
++++ b/src/kernelshark.cpp
+@@ -7,6 +7,7 @@
+ // C
+ #include <sys/stat.h>
+ #include <getopt.h>
++#include <libgen.h>
+
+ // Qt
+ #include <QApplication>
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
new file mode 100644
index 000000000000..fc41212df5ef
--- /dev/null
+++ b/srcpkgs/kernelshark/template
@@ -0,0 +1,41 @@
+# Template file for 'kernelshark'
+pkgname=kernelshark
+reverts="2.9.1_1 2.9_1 2.8.3_2 2.8.3_1 2.8.2_1 2.8.1_1 2.7_2 2.7_1 2.6.2_1 2.6.1_1
+ 2.6_1 2.5.3_3 2.5.3_2 2.5.3_1 2.5.1_1 2.5_1 2.4_1"
+version=2.1.1
+revision=1
+wrksrc="kernel-shark-kernelshark-v${version}"
+build_style=cmake
+# It's PKG_CONGIG_DIR not PKG_CONFIG_DIR
+configure_args="-D_INSTALL_PREFIX=/usr -D_LIBDIR=/usr/lib$XBPS_TARGET_WORDSIZE
+ -DPKG_CONGIG_DIR=/usr/lib/pkgconfig -DTT_FONT_FILE=/usr/share/fonts/TTF/FreeSans.ttf
+ -DTRACECMD_EXECUTABLE=/usr/bin/trace-cmd -DCMAKE_SKIP_RPATH=ON"
+hostmakedepends="qt5-qmake qt5-host-tools pkg-config"
+makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
+ libtraceevent-devel libtracefs-devel libtracecmd-devel"
+depends="freefont-ttf trace-cmd"
+short_desc="Front end reader of trace-cmd(1) output"
+maintainer="Leah Neukirchen <leah@vuxu.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.kernelshark.org"
+distfiles="https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/snapshot/kernel-shark-kernelshark-v${version}.tar.gz"
+checksum=78a0cf28bc06d0e43cd5a2512f83c02b7b5c969a26a0d4b56338154d6cf6f7be
+# requires externally-downloaded data and segfaults on some gui tests
+make_check=no
+
+libkshark_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/libkshark.so.*"
+ }
+}
+
+libkshark-devel_package() {
+ depends="libkshark>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/kernelshark/update b/srcpkgs/kernelshark/update
new file mode 100644
index 000000000000..8b5f28fc01ca
--- /dev/null
+++ b/srcpkgs/kernelshark/update
@@ -0,0 +1 @@
+pkgname=kernel-shark-kernelshark
diff --git a/srcpkgs/libkshark b/srcpkgs/libkshark
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
diff --git a/srcpkgs/libkshark-devel b/srcpkgs/libkshark-devel
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark-devel
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR REVIEW] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (31 preceding siblings ...)
2022-08-24 0:22 ` [PR PATCH] [Updated] " classabbyamp
@ 2022-08-24 0:23 ` sgn
2022-08-24 0:27 ` classabbyamp
` (21 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: sgn @ 2022-08-24 0:23 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 230 bytes --]
New review comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#discussion_r953208333
Comment:
Which arch are you talking about? I did the change with `x86_64-musl` and `armv6l-musl`
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR REVIEW] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (32 preceding siblings ...)
2022-08-24 0:23 ` [PR REVIEW] " sgn
@ 2022-08-24 0:27 ` classabbyamp
2022-08-24 19:22 ` classabbyamp
` (20 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-24 0:27 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 214 bytes --]
New review comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#discussion_r953209963
Comment:
i don't remember, maybe it was a side effect of something else
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR REVIEW] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (33 preceding siblings ...)
2022-08-24 0:27 ` classabbyamp
@ 2022-08-24 19:22 ` classabbyamp
2022-08-24 19:22 ` classabbyamp
` (19 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-24 19:22 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 336 bytes --]
New review comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#discussion_r954212154
Comment:
where is `cpu_set_t` put under `#ifdef _GNU_SOURCE`? `_GNU_SOURCE` does not exist anywhere in neither `sched.h` nor `cpu-set.h`. Because of this, I think `__GLIBC__` is the correct way
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR REVIEW] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (34 preceding siblings ...)
2022-08-24 19:22 ` classabbyamp
@ 2022-08-24 19:22 ` classabbyamp
2022-08-24 19:25 ` [PR PATCH] [Updated] " classabbyamp
` (18 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-24 19:22 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 335 bytes --]
New review comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#discussion_r954212154
Comment:
where is `cpu_set_t` put under `#ifdef _GNU_SOURCE`? `_GNU_SOURCE` does not exist anywhere in either `sched.h` nor `cpu-set.h`. Because of this, I think `__GLIBC__` is the correct way
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR PATCH] [Updated] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (35 preceding siblings ...)
2022-08-24 19:22 ` classabbyamp
@ 2022-08-24 19:25 ` classabbyamp
2022-08-25 0:57 ` [PR REVIEW] " sgn
` (17 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-24 19:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages update/trace-cmd-3.1.2
https://github.com/void-linux/void-packages/pull/38851
trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
- New package: libtraceevent-1.6.2
- New package: libtracefs-1.4.2
- trace-cmd: update to 3.1.2.
- kernelshark: split from trace-cmd, update to 2.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (builds & runs, but I'm not sure how to use this so I can't test further)
A patch file from https://github.com/void-linux/void-packages/pull/38851.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update/trace-cmd-3.1.2-38851.patch --]
[-- Type: text/x-diff, Size: 20894 bytes --]
From d84ed57798b2657bfadf5310abb4d9dc59991208 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:37:06 -0400
Subject: [PATCH 1/4] New package: libtraceevent-1.6.2
---
common/shlibs | 1 +
srcpkgs/libtraceevent-devel | 1 +
srcpkgs/libtraceevent/template | 35 ++++++++++++++++++++++++++++++++++
3 files changed, 37 insertions(+)
create mode 120000 srcpkgs/libtraceevent-devel
create mode 100644 srcpkgs/libtraceevent/template
diff --git a/common/shlibs b/common/shlibs
index f829ee12e80f..9bd26c6c36c9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4176,3 +4176,4 @@ libsyncthingmodel.so.1.2.2 syncthingtray-1.2.2_1
libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
+libtraceevent.so.1 libtraceevent-1.6.2_1
diff --git a/srcpkgs/libtraceevent-devel b/srcpkgs/libtraceevent-devel
new file mode 120000
index 000000000000..9ca91c55529f
--- /dev/null
+++ b/srcpkgs/libtraceevent-devel
@@ -0,0 +1 @@
+libtraceevent
\ No newline at end of file
diff --git a/srcpkgs/libtraceevent/template b/srcpkgs/libtraceevent/template
new file mode 100644
index 000000000000..45c707a12679
--- /dev/null
+++ b/srcpkgs/libtraceevent/template
@@ -0,0 +1,35 @@
+# Template file for 'libtraceevent'
+pkgname=libtraceevent
+version=1.6.2
+revision=1
+build_style=gnu-makefile
+make_build_args="libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install doc-install"
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace event library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-${version}.tar.gz"
+checksum=1aaeb12f5842a843a06b733e3f4230b0937ba9c2ecd39345edf6f66cc8cbe795
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+libtraceevent-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc
+ }
+}
From faf5981481989e3231bf70ba5d69e85f6c9ed80d Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:41:02 -0400
Subject: [PATCH 2/4] New package: libtracefs-1.4.2
---
common/shlibs | 1 +
srcpkgs/libtracefs-devel | 1 +
.../libtracefs/patches/musl-limits_h.patch | 10 +++++
srcpkgs/libtracefs/patches/musl.patch | 15 +++++++
srcpkgs/libtracefs/template | 42 +++++++++++++++++++
5 files changed, 69 insertions(+)
create mode 120000 srcpkgs/libtracefs-devel
create mode 100644 srcpkgs/libtracefs/patches/musl-limits_h.patch
create mode 100644 srcpkgs/libtracefs/patches/musl.patch
create mode 100644 srcpkgs/libtracefs/template
diff --git a/common/shlibs b/common/shlibs
index 9bd26c6c36c9..cc3a69af2a2b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4177,3 +4177,4 @@ libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
libtraceevent.so.1 libtraceevent-1.6.2_1
+libtracefs.so.1 libtracefs-1.4.2_1
diff --git a/srcpkgs/libtracefs-devel b/srcpkgs/libtracefs-devel
new file mode 120000
index 000000000000..23466cce7993
--- /dev/null
+++ b/srcpkgs/libtracefs-devel
@@ -0,0 +1 @@
+libtracefs
\ No newline at end of file
diff --git a/srcpkgs/libtracefs/patches/musl-limits_h.patch b/srcpkgs/libtracefs/patches/musl-limits_h.patch
new file mode 100644
index 000000000000..b499fdceb66d
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl-limits_h.patch
@@ -0,0 +1,10 @@
+--- a/utest/tracefs-utest.c
++++ b/utest/tracefs-utest.c
+@@ -11,6 +11,7 @@
+ #include <time.h>
+ #include <dirent.h>
+ #include <ftw.h>
++#include <limits.h>
+
+ #include <CUnit/CUnit.h>
+ #include <CUnit/Basic.h>
diff --git a/srcpkgs/libtracefs/patches/musl.patch b/srcpkgs/libtracefs/patches/musl.patch
new file mode 100644
index 000000000000..0191cc04ff0b
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl.patch
@@ -0,0 +1,15 @@
+--- a/include/tracefs.h
++++ b/include/tracefs.h
+@@ -10,6 +10,12 @@
+ #include <sched.h>
+ #include <event-parse.h>
+
++#ifndef __GLIBC__
++/* See CPU_SET(3) */
++struct cpu_set_t;
++typedef struct cpu_set_t cpu_set_t;
++#endif
++
+ char *tracefs_get_tracing_file(const char *name);
+ void tracefs_put_tracing_file(char *name);
+
diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template
new file mode 100644
index 000000000000..143f14444cbe
--- /dev/null
+++ b/srcpkgs/libtracefs/template
@@ -0,0 +1,42 @@
+# Template file for 'libtracefs'
+pkgname=libtracefs
+version=1.4.2
+revision=1
+build_style=gnu-makefile
+make_build_args="libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install install_doc"
+make_use_env=yes
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+makedepends="libtraceevent-devel"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace file system library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-${version}.tar.gz"
+checksum=8ad03e6d2a6227f6eb11692d9f04614d3da60ac6c5e4fe436e59b2bed90f031b
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ # manpage for sample program
+ rm ${DESTDIR}/usr/share/man/man1/sqlhist.1
+}
+
+libtracefs-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/doc
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From 46565898f5e49700a55b1f75f1d30b2001ba96fb Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 02:39:52 -0400
Subject: [PATCH 3/4] trace-cmd: update to 3.1.2.
---
common/shlibs | 1 +
srcpkgs/{kernelshark => libtracecmd} | 0
srcpkgs/libtracecmd-devel | 1 +
.../trace-cmd/patches/fix-program-name.patch | 23 --------
srcpkgs/trace-cmd/patches/musl-limits_h.patch | 44 +++++++++------
.../musl-no_pthread_attr_setaffinity_np.patch | 24 --------
.../trace-cmd/patches/musl-pthread_h.patch | 10 ----
srcpkgs/trace-cmd/patches/no-rpath.patch | 20 +++++++
srcpkgs/trace-cmd/template | 56 +++++++++++--------
9 files changed, 83 insertions(+), 96 deletions(-)
rename srcpkgs/{kernelshark => libtracecmd} (100%)
create mode 120000 srcpkgs/libtracecmd-devel
delete mode 100644 srcpkgs/trace-cmd/patches/fix-program-name.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-pthread_h.patch
create mode 100644 srcpkgs/trace-cmd/patches/no-rpath.patch
diff --git a/common/shlibs b/common/shlibs
index cc3a69af2a2b..d0efac27f360 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4178,3 +4178,4 @@ libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_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
diff --git a/srcpkgs/kernelshark b/srcpkgs/libtracecmd
similarity index 100%
rename from srcpkgs/kernelshark
rename to srcpkgs/libtracecmd
diff --git a/srcpkgs/libtracecmd-devel b/srcpkgs/libtracecmd-devel
new file mode 120000
index 000000000000..77b3407d0913
--- /dev/null
+++ b/srcpkgs/libtracecmd-devel
@@ -0,0 +1 @@
+trace-cmd
\ No newline at end of file
diff --git a/srcpkgs/trace-cmd/patches/fix-program-name.patch b/srcpkgs/trace-cmd/patches/fix-program-name.patch
deleted file mode 100644
index 970122246115..000000000000
--- a/srcpkgs/trace-cmd/patches/fix-program-name.patch
+++ /dev/null
@@ -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':
diff --git a/srcpkgs/trace-cmd/patches/musl-limits_h.patch b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
index 83e278c8ab9e..af90e89b8d75 100644
--- a/srcpkgs/trace-cmd/patches/musl-limits_h.patch
+++ b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
@@ -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>
diff --git a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch b/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
deleted file mode 100644
index 5203d3335c2b..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
+++ /dev/null
@@ -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);
-
diff --git a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch b/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
deleted file mode 100644
index 367588391845..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
+++ /dev/null
@@ -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 }
diff --git a/srcpkgs/trace-cmd/patches/no-rpath.patch b/srcpkgs/trace-cmd/patches/no-rpath.patch
new file mode 100644
index 000000000000..ff2fd9fe864e
--- /dev/null
+++ b/srcpkgs/trace-cmd/patches/no-rpath.patch
@@ -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) \
diff --git a/srcpkgs/trace-cmd/template b/srcpkgs/trace-cmd/template
index 34f9bcb40d42..389737c23751 100644
--- a/srcpkgs/trace-cmd/template
+++ b/srcpkgs/trace-cmd/template
@@ -1,37 +1,49 @@
# Template file for 'trace-cmd'
pkgname=trace-cmd
-version=2.9.1
+version=3.1.2
revision=1
wrksrc="${pkgname}-v${version}"
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=206672af60aa0bc35cfc44a4be746efa575bac729060e54b6453f7d5dfbcd979
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
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
+}
+
+libtracecmd_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/*.so.*"
+ }
}
-kernelshark_package() {
- depends="${sourcepkg}>=${version}_${revision}"
- short_desc="GUI for ftrace Linux kernel internal tracer"
+libtracecmd-devel_package() {
+ depends="libtracecmd>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
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/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc/libtracecmd-doc
}
}
From 1009ea6f1920117386cf4f0b7eeed00cfe6d335d Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 03:07:55 -0400
Subject: [PATCH 4/4] kernelshark: split from trace-cmd, update to 2.1.1
---
common/shlibs | 1 +
srcpkgs/kernelshark/patches/musl.patch | 20 +++++++++++++
srcpkgs/kernelshark/template | 41 ++++++++++++++++++++++++++
srcpkgs/kernelshark/update | 1 +
srcpkgs/libkshark | 1 +
srcpkgs/libkshark-devel | 1 +
6 files changed, 65 insertions(+)
create mode 100644 srcpkgs/kernelshark/patches/musl.patch
create mode 100644 srcpkgs/kernelshark/template
create mode 100644 srcpkgs/kernelshark/update
create mode 120000 srcpkgs/libkshark
create mode 120000 srcpkgs/libkshark-devel
diff --git a/common/shlibs b/common/shlibs
index d0efac27f360..9387807c0574 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4179,3 +4179,4 @@ libgbinder.so.1 libgbinder-1.1.20_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
+libkshark.so.2 libkshark-2.1.1_1
diff --git a/srcpkgs/kernelshark/patches/musl.patch b/srcpkgs/kernelshark/patches/musl.patch
new file mode 100644
index 000000000000..e02fddb486c7
--- /dev/null
+++ b/srcpkgs/kernelshark/patches/musl.patch
@@ -0,0 +1,20 @@
+--- a/src/libkshark.h
++++ b/src/libkshark.h
+@@ -17,6 +17,7 @@
+ #include <string.h>
+ #include <pthread.h>
+ #include <errno.h>
++#include <sys/types.h>
+
+ // Json-C
+ #include <json-c/json.h>
+--- a/src/kernelshark.cpp
++++ b/src/kernelshark.cpp
+@@ -7,6 +7,7 @@
+ // C
+ #include <sys/stat.h>
+ #include <getopt.h>
++#include <libgen.h>
+
+ // Qt
+ #include <QApplication>
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
new file mode 100644
index 000000000000..fc41212df5ef
--- /dev/null
+++ b/srcpkgs/kernelshark/template
@@ -0,0 +1,41 @@
+# Template file for 'kernelshark'
+pkgname=kernelshark
+reverts="2.9.1_1 2.9_1 2.8.3_2 2.8.3_1 2.8.2_1 2.8.1_1 2.7_2 2.7_1 2.6.2_1 2.6.1_1
+ 2.6_1 2.5.3_3 2.5.3_2 2.5.3_1 2.5.1_1 2.5_1 2.4_1"
+version=2.1.1
+revision=1
+wrksrc="kernel-shark-kernelshark-v${version}"
+build_style=cmake
+# It's PKG_CONGIG_DIR not PKG_CONFIG_DIR
+configure_args="-D_INSTALL_PREFIX=/usr -D_LIBDIR=/usr/lib$XBPS_TARGET_WORDSIZE
+ -DPKG_CONGIG_DIR=/usr/lib/pkgconfig -DTT_FONT_FILE=/usr/share/fonts/TTF/FreeSans.ttf
+ -DTRACECMD_EXECUTABLE=/usr/bin/trace-cmd -DCMAKE_SKIP_RPATH=ON"
+hostmakedepends="qt5-qmake qt5-host-tools pkg-config"
+makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
+ libtraceevent-devel libtracefs-devel libtracecmd-devel"
+depends="freefont-ttf trace-cmd"
+short_desc="Front end reader of trace-cmd(1) output"
+maintainer="Leah Neukirchen <leah@vuxu.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.kernelshark.org"
+distfiles="https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/snapshot/kernel-shark-kernelshark-v${version}.tar.gz"
+checksum=78a0cf28bc06d0e43cd5a2512f83c02b7b5c969a26a0d4b56338154d6cf6f7be
+# requires externally-downloaded data and segfaults on some gui tests
+make_check=no
+
+libkshark_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/libkshark.so.*"
+ }
+}
+
+libkshark-devel_package() {
+ depends="libkshark>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/kernelshark/update b/srcpkgs/kernelshark/update
new file mode 100644
index 000000000000..8b5f28fc01ca
--- /dev/null
+++ b/srcpkgs/kernelshark/update
@@ -0,0 +1 @@
+pkgname=kernel-shark-kernelshark
diff --git a/srcpkgs/libkshark b/srcpkgs/libkshark
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
diff --git a/srcpkgs/libkshark-devel b/srcpkgs/libkshark-devel
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark-devel
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR REVIEW] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (36 preceding siblings ...)
2022-08-24 19:25 ` [PR PATCH] [Updated] " classabbyamp
@ 2022-08-25 0:57 ` sgn
2022-08-25 0:59 ` sgn
` (16 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: sgn @ 2022-08-25 0:57 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 258 bytes --]
New review comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#discussion_r954410595
Comment:
`man 3 CPU_SET` It's documented in the next line ;) All `cpu_set_t` related information was put into this man-page.
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR REVIEW] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (37 preceding siblings ...)
2022-08-25 0:57 ` [PR REVIEW] " sgn
@ 2022-08-25 0:59 ` sgn
2022-08-25 0:59 ` sgn
` (15 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: sgn @ 2022-08-25 0:59 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 209 bytes --]
New review comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#discussion_r954410989
Comment:
https://man7.org/linux/man-pages/man3/CPU_COUNT.3.html#DESCRIPTION
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR REVIEW] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (38 preceding siblings ...)
2022-08-25 0:59 ` sgn
@ 2022-08-25 0:59 ` sgn
2022-08-25 1:00 ` sgn
` (14 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: sgn @ 2022-08-25 0:59 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 330 bytes --]
New review comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#discussion_r954411219
Comment:
`man 3 CPU_SET` It's documented in the next line ;) All `cpu_set_t` related information was put into this man-page.
https://man7.org/linux/man-pages/man3/CPU_COUNT.3.html#DESCRIPTION
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR REVIEW] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (39 preceding siblings ...)
2022-08-25 0:59 ` sgn
@ 2022-08-25 1:00 ` sgn
2022-08-25 1:43 ` [PR PATCH] [Updated] " classabbyamp
` (13 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: sgn @ 2022-08-25 1:00 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 217 bytes --]
New review comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#discussion_r954411474
Comment:
It's GNU Extension, GLIBC puts it under `_GNU_SOURCE`, musl follows suite.
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR PATCH] [Updated] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (40 preceding siblings ...)
2022-08-25 1:00 ` sgn
@ 2022-08-25 1:43 ` classabbyamp
2022-08-25 1:55 ` [PR REVIEW] " classabbyamp
` (12 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-25 1:43 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages update/trace-cmd-3.1.2
https://github.com/void-linux/void-packages/pull/38851
trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
- New package: libtraceevent-1.6.2
- New package: libtracefs-1.4.2
- trace-cmd: update to 3.1.2.
- kernelshark: split from trace-cmd, update to 2.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (builds & runs, but I'm not sure how to use this so I can't test further)
A patch file from https://github.com/void-linux/void-packages/pull/38851.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update/trace-cmd-3.1.2-38851.patch --]
[-- Type: text/x-diff, Size: 20896 bytes --]
From d84ed57798b2657bfadf5310abb4d9dc59991208 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:37:06 -0400
Subject: [PATCH 1/4] New package: libtraceevent-1.6.2
---
common/shlibs | 1 +
srcpkgs/libtraceevent-devel | 1 +
srcpkgs/libtraceevent/template | 35 ++++++++++++++++++++++++++++++++++
3 files changed, 37 insertions(+)
create mode 120000 srcpkgs/libtraceevent-devel
create mode 100644 srcpkgs/libtraceevent/template
diff --git a/common/shlibs b/common/shlibs
index f829ee12e80f..9bd26c6c36c9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4176,3 +4176,4 @@ libsyncthingmodel.so.1.2.2 syncthingtray-1.2.2_1
libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
+libtraceevent.so.1 libtraceevent-1.6.2_1
diff --git a/srcpkgs/libtraceevent-devel b/srcpkgs/libtraceevent-devel
new file mode 120000
index 000000000000..9ca91c55529f
--- /dev/null
+++ b/srcpkgs/libtraceevent-devel
@@ -0,0 +1 @@
+libtraceevent
\ No newline at end of file
diff --git a/srcpkgs/libtraceevent/template b/srcpkgs/libtraceevent/template
new file mode 100644
index 000000000000..45c707a12679
--- /dev/null
+++ b/srcpkgs/libtraceevent/template
@@ -0,0 +1,35 @@
+# Template file for 'libtraceevent'
+pkgname=libtraceevent
+version=1.6.2
+revision=1
+build_style=gnu-makefile
+make_build_args="libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install doc-install"
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace event library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-${version}.tar.gz"
+checksum=1aaeb12f5842a843a06b733e3f4230b0937ba9c2ecd39345edf6f66cc8cbe795
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+libtraceevent-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc
+ }
+}
From 0e20c8f4cbf21ccb171ac27e927ae914fb4b80e1 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:41:02 -0400
Subject: [PATCH 2/4] New package: libtracefs-1.4.2
---
common/shlibs | 1 +
srcpkgs/libtracefs-devel | 1 +
.../libtracefs/patches/musl-limits_h.patch | 10 +++++
srcpkgs/libtracefs/patches/musl.patch | 15 +++++++
srcpkgs/libtracefs/template | 42 +++++++++++++++++++
5 files changed, 69 insertions(+)
create mode 120000 srcpkgs/libtracefs-devel
create mode 100644 srcpkgs/libtracefs/patches/musl-limits_h.patch
create mode 100644 srcpkgs/libtracefs/patches/musl.patch
create mode 100644 srcpkgs/libtracefs/template
diff --git a/common/shlibs b/common/shlibs
index 9bd26c6c36c9..cc3a69af2a2b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4177,3 +4177,4 @@ libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_1
libtraceevent.so.1 libtraceevent-1.6.2_1
+libtracefs.so.1 libtracefs-1.4.2_1
diff --git a/srcpkgs/libtracefs-devel b/srcpkgs/libtracefs-devel
new file mode 120000
index 000000000000..23466cce7993
--- /dev/null
+++ b/srcpkgs/libtracefs-devel
@@ -0,0 +1 @@
+libtracefs
\ No newline at end of file
diff --git a/srcpkgs/libtracefs/patches/musl-limits_h.patch b/srcpkgs/libtracefs/patches/musl-limits_h.patch
new file mode 100644
index 000000000000..b499fdceb66d
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl-limits_h.patch
@@ -0,0 +1,10 @@
+--- a/utest/tracefs-utest.c
++++ b/utest/tracefs-utest.c
+@@ -11,6 +11,7 @@
+ #include <time.h>
+ #include <dirent.h>
+ #include <ftw.h>
++#include <limits.h>
+
+ #include <CUnit/CUnit.h>
+ #include <CUnit/Basic.h>
diff --git a/srcpkgs/libtracefs/patches/musl.patch b/srcpkgs/libtracefs/patches/musl.patch
new file mode 100644
index 000000000000..b30126ce5736
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl.patch
@@ -0,0 +1,15 @@
+--- a/include/tracefs.h
++++ b/include/tracefs.h
+@@ -10,6 +10,12 @@
+ #include <sched.h>
+ #include <event-parse.h>
+
++#ifndef _GNU_SOURCE
++/* See CPU_SET(3) */
++struct cpu_set_t;
++typedef struct cpu_set_t cpu_set_t;
++#endif
++
+ char *tracefs_get_tracing_file(const char *name);
+ void tracefs_put_tracing_file(char *name);
+
diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template
new file mode 100644
index 000000000000..143f14444cbe
--- /dev/null
+++ b/srcpkgs/libtracefs/template
@@ -0,0 +1,42 @@
+# Template file for 'libtracefs'
+pkgname=libtracefs
+version=1.4.2
+revision=1
+build_style=gnu-makefile
+make_build_args="libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install install_doc"
+make_use_env=yes
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+makedepends="libtraceevent-devel"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace file system library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-${version}.tar.gz"
+checksum=8ad03e6d2a6227f6eb11692d9f04614d3da60ac6c5e4fe436e59b2bed90f031b
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ # manpage for sample program
+ rm ${DESTDIR}/usr/share/man/man1/sqlhist.1
+}
+
+libtracefs-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/doc
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From fac346a8e19f30b6bc1d8f0e084f1ab9aa9a5194 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 02:39:52 -0400
Subject: [PATCH 3/4] trace-cmd: update to 3.1.2.
---
common/shlibs | 1 +
srcpkgs/{kernelshark => libtracecmd} | 0
srcpkgs/libtracecmd-devel | 1 +
.../trace-cmd/patches/fix-program-name.patch | 23 --------
srcpkgs/trace-cmd/patches/musl-limits_h.patch | 44 +++++++++------
.../musl-no_pthread_attr_setaffinity_np.patch | 24 --------
.../trace-cmd/patches/musl-pthread_h.patch | 10 ----
srcpkgs/trace-cmd/patches/no-rpath.patch | 20 +++++++
srcpkgs/trace-cmd/template | 56 +++++++++++--------
9 files changed, 83 insertions(+), 96 deletions(-)
rename srcpkgs/{kernelshark => libtracecmd} (100%)
create mode 120000 srcpkgs/libtracecmd-devel
delete mode 100644 srcpkgs/trace-cmd/patches/fix-program-name.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-pthread_h.patch
create mode 100644 srcpkgs/trace-cmd/patches/no-rpath.patch
diff --git a/common/shlibs b/common/shlibs
index cc3a69af2a2b..d0efac27f360 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4178,3 +4178,4 @@ libglibutil.so.1 libglibutil-1.0.64_1
libgbinder.so.1 libgbinder-1.1.20_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
diff --git a/srcpkgs/kernelshark b/srcpkgs/libtracecmd
similarity index 100%
rename from srcpkgs/kernelshark
rename to srcpkgs/libtracecmd
diff --git a/srcpkgs/libtracecmd-devel b/srcpkgs/libtracecmd-devel
new file mode 120000
index 000000000000..77b3407d0913
--- /dev/null
+++ b/srcpkgs/libtracecmd-devel
@@ -0,0 +1 @@
+trace-cmd
\ No newline at end of file
diff --git a/srcpkgs/trace-cmd/patches/fix-program-name.patch b/srcpkgs/trace-cmd/patches/fix-program-name.patch
deleted file mode 100644
index 970122246115..000000000000
--- a/srcpkgs/trace-cmd/patches/fix-program-name.patch
+++ /dev/null
@@ -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':
diff --git a/srcpkgs/trace-cmd/patches/musl-limits_h.patch b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
index 83e278c8ab9e..af90e89b8d75 100644
--- a/srcpkgs/trace-cmd/patches/musl-limits_h.patch
+++ b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
@@ -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>
diff --git a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch b/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
deleted file mode 100644
index 5203d3335c2b..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
+++ /dev/null
@@ -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);
-
diff --git a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch b/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
deleted file mode 100644
index 367588391845..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
+++ /dev/null
@@ -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 }
diff --git a/srcpkgs/trace-cmd/patches/no-rpath.patch b/srcpkgs/trace-cmd/patches/no-rpath.patch
new file mode 100644
index 000000000000..ff2fd9fe864e
--- /dev/null
+++ b/srcpkgs/trace-cmd/patches/no-rpath.patch
@@ -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) \
diff --git a/srcpkgs/trace-cmd/template b/srcpkgs/trace-cmd/template
index 34f9bcb40d42..389737c23751 100644
--- a/srcpkgs/trace-cmd/template
+++ b/srcpkgs/trace-cmd/template
@@ -1,37 +1,49 @@
# Template file for 'trace-cmd'
pkgname=trace-cmd
-version=2.9.1
+version=3.1.2
revision=1
wrksrc="${pkgname}-v${version}"
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=206672af60aa0bc35cfc44a4be746efa575bac729060e54b6453f7d5dfbcd979
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
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
+}
+
+libtracecmd_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/*.so.*"
+ }
}
-kernelshark_package() {
- depends="${sourcepkg}>=${version}_${revision}"
- short_desc="GUI for ftrace Linux kernel internal tracer"
+libtracecmd-devel_package() {
+ depends="libtracecmd>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
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/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc/libtracecmd-doc
}
}
From eb0bb4882a3c5816514be7347c6aa0491a68cfac Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 03:07:55 -0400
Subject: [PATCH 4/4] kernelshark: split from trace-cmd, update to 2.1.1
---
common/shlibs | 1 +
srcpkgs/kernelshark/patches/musl.patch | 20 +++++++++++++
srcpkgs/kernelshark/template | 41 ++++++++++++++++++++++++++
srcpkgs/kernelshark/update | 1 +
srcpkgs/libkshark | 1 +
srcpkgs/libkshark-devel | 1 +
6 files changed, 65 insertions(+)
create mode 100644 srcpkgs/kernelshark/patches/musl.patch
create mode 100644 srcpkgs/kernelshark/template
create mode 100644 srcpkgs/kernelshark/update
create mode 120000 srcpkgs/libkshark
create mode 120000 srcpkgs/libkshark-devel
diff --git a/common/shlibs b/common/shlibs
index d0efac27f360..9387807c0574 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4179,3 +4179,4 @@ libgbinder.so.1 libgbinder-1.1.20_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
+libkshark.so.2 libkshark-2.1.1_1
diff --git a/srcpkgs/kernelshark/patches/musl.patch b/srcpkgs/kernelshark/patches/musl.patch
new file mode 100644
index 000000000000..e02fddb486c7
--- /dev/null
+++ b/srcpkgs/kernelshark/patches/musl.patch
@@ -0,0 +1,20 @@
+--- a/src/libkshark.h
++++ b/src/libkshark.h
+@@ -17,6 +17,7 @@
+ #include <string.h>
+ #include <pthread.h>
+ #include <errno.h>
++#include <sys/types.h>
+
+ // Json-C
+ #include <json-c/json.h>
+--- a/src/kernelshark.cpp
++++ b/src/kernelshark.cpp
+@@ -7,6 +7,7 @@
+ // C
+ #include <sys/stat.h>
+ #include <getopt.h>
++#include <libgen.h>
+
+ // Qt
+ #include <QApplication>
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
new file mode 100644
index 000000000000..fc41212df5ef
--- /dev/null
+++ b/srcpkgs/kernelshark/template
@@ -0,0 +1,41 @@
+# Template file for 'kernelshark'
+pkgname=kernelshark
+reverts="2.9.1_1 2.9_1 2.8.3_2 2.8.3_1 2.8.2_1 2.8.1_1 2.7_2 2.7_1 2.6.2_1 2.6.1_1
+ 2.6_1 2.5.3_3 2.5.3_2 2.5.3_1 2.5.1_1 2.5_1 2.4_1"
+version=2.1.1
+revision=1
+wrksrc="kernel-shark-kernelshark-v${version}"
+build_style=cmake
+# It's PKG_CONGIG_DIR not PKG_CONFIG_DIR
+configure_args="-D_INSTALL_PREFIX=/usr -D_LIBDIR=/usr/lib$XBPS_TARGET_WORDSIZE
+ -DPKG_CONGIG_DIR=/usr/lib/pkgconfig -DTT_FONT_FILE=/usr/share/fonts/TTF/FreeSans.ttf
+ -DTRACECMD_EXECUTABLE=/usr/bin/trace-cmd -DCMAKE_SKIP_RPATH=ON"
+hostmakedepends="qt5-qmake qt5-host-tools pkg-config"
+makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
+ libtraceevent-devel libtracefs-devel libtracecmd-devel"
+depends="freefont-ttf trace-cmd"
+short_desc="Front end reader of trace-cmd(1) output"
+maintainer="Leah Neukirchen <leah@vuxu.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.kernelshark.org"
+distfiles="https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/snapshot/kernel-shark-kernelshark-v${version}.tar.gz"
+checksum=78a0cf28bc06d0e43cd5a2512f83c02b7b5c969a26a0d4b56338154d6cf6f7be
+# requires externally-downloaded data and segfaults on some gui tests
+make_check=no
+
+libkshark_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/libkshark.so.*"
+ }
+}
+
+libkshark-devel_package() {
+ depends="libkshark>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/kernelshark/update b/srcpkgs/kernelshark/update
new file mode 100644
index 000000000000..8b5f28fc01ca
--- /dev/null
+++ b/srcpkgs/kernelshark/update
@@ -0,0 +1 @@
+pkgname=kernel-shark-kernelshark
diff --git a/srcpkgs/libkshark b/srcpkgs/libkshark
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
diff --git a/srcpkgs/libkshark-devel b/srcpkgs/libkshark-devel
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark-devel
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR REVIEW] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (41 preceding siblings ...)
2022-08-25 1:43 ` [PR PATCH] [Updated] " classabbyamp
@ 2022-08-25 1:55 ` classabbyamp
2022-11-23 2:06 ` github-actions
` (11 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-08-25 1:55 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 203 bytes --]
New review comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#discussion_r954432477
Comment:
well it fails on glibc with `ifndef _GNU_SOURCE`...
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (42 preceding siblings ...)
2022-08-25 1:55 ` [PR REVIEW] " classabbyamp
@ 2022-11-23 2:06 ` github-actions
2022-11-24 8:16 ` [PR PATCH] [Updated] " classabbyamp
` (10 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: github-actions @ 2022-11-23 2:06 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#issuecomment-1324457790
Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR PATCH] [Updated] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (43 preceding siblings ...)
2022-11-23 2:06 ` github-actions
@ 2022-11-24 8:16 ` classabbyamp
2022-11-24 8:26 ` classabbyamp
` (9 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-11-24 8:16 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages update/trace-cmd-3.1.2
https://github.com/void-linux/void-packages/pull/38851
trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
- New package: libtraceevent-1.6.2
- New package: libtracefs-1.4.2
- trace-cmd: update to 3.1.2.
- kernelshark: split from trace-cmd, update to 2.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (builds & runs, but I'm not sure how to use this so I can't test further)
A patch file from https://github.com/void-linux/void-packages/pull/38851.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update/trace-cmd-3.1.2-38851.patch --]
[-- Type: text/x-diff, Size: 20967 bytes --]
From 377e2294af5c036e38eccdeef6e4554f9f413028 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:37:06 -0400
Subject: [PATCH 1/4] New package: libtraceevent-1.6.2
---
common/shlibs | 1 +
srcpkgs/libtraceevent-devel | 1 +
srcpkgs/libtraceevent/template | 35 ++++++++++++++++++++++++++++++++++
3 files changed, 37 insertions(+)
create mode 120000 srcpkgs/libtraceevent-devel
create mode 100644 srcpkgs/libtraceevent/template
diff --git a/common/shlibs b/common/shlibs
index 6acbb4097f0b..0d0b04d72fee 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4201,3 +4201,4 @@ libabsl_strings.so.2206.0.0 abseil-cpp-20220623.1_1
libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1
libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_1
+libtraceevent.so.1 libtraceevent-1.6.2_1
diff --git a/srcpkgs/libtraceevent-devel b/srcpkgs/libtraceevent-devel
new file mode 120000
index 000000000000..9ca91c55529f
--- /dev/null
+++ b/srcpkgs/libtraceevent-devel
@@ -0,0 +1 @@
+libtraceevent
\ No newline at end of file
diff --git a/srcpkgs/libtraceevent/template b/srcpkgs/libtraceevent/template
new file mode 100644
index 000000000000..45c707a12679
--- /dev/null
+++ b/srcpkgs/libtraceevent/template
@@ -0,0 +1,35 @@
+# Template file for 'libtraceevent'
+pkgname=libtraceevent
+version=1.6.2
+revision=1
+build_style=gnu-makefile
+make_build_args="libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install doc-install"
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace event library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-${version}.tar.gz"
+checksum=1aaeb12f5842a843a06b733e3f4230b0937ba9c2ecd39345edf6f66cc8cbe795
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+libtraceevent-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc
+ }
+}
From f4c4557945d1c3ed0502c18fe050deacd6976c8f Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:41:02 -0400
Subject: [PATCH 2/4] New package: libtracefs-1.4.2
---
common/shlibs | 1 +
srcpkgs/libtracefs-devel | 1 +
.../libtracefs/patches/musl-limits_h.patch | 10 +++++
srcpkgs/libtracefs/patches/musl.patch | 15 +++++++
srcpkgs/libtracefs/template | 42 +++++++++++++++++++
5 files changed, 69 insertions(+)
create mode 120000 srcpkgs/libtracefs-devel
create mode 100644 srcpkgs/libtracefs/patches/musl-limits_h.patch
create mode 100644 srcpkgs/libtracefs/patches/musl.patch
create mode 100644 srcpkgs/libtracefs/template
diff --git a/common/shlibs b/common/shlibs
index 0d0b04d72fee..61171eb2d7fb 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4202,3 +4202,4 @@ libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1
libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_1
libtraceevent.so.1 libtraceevent-1.6.2_1
+libtracefs.so.1 libtracefs-1.4.2_1
diff --git a/srcpkgs/libtracefs-devel b/srcpkgs/libtracefs-devel
new file mode 120000
index 000000000000..23466cce7993
--- /dev/null
+++ b/srcpkgs/libtracefs-devel
@@ -0,0 +1 @@
+libtracefs
\ No newline at end of file
diff --git a/srcpkgs/libtracefs/patches/musl-limits_h.patch b/srcpkgs/libtracefs/patches/musl-limits_h.patch
new file mode 100644
index 000000000000..b499fdceb66d
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl-limits_h.patch
@@ -0,0 +1,10 @@
+--- a/utest/tracefs-utest.c
++++ b/utest/tracefs-utest.c
+@@ -11,6 +11,7 @@
+ #include <time.h>
+ #include <dirent.h>
+ #include <ftw.h>
++#include <limits.h>
+
+ #include <CUnit/CUnit.h>
+ #include <CUnit/Basic.h>
diff --git a/srcpkgs/libtracefs/patches/musl.patch b/srcpkgs/libtracefs/patches/musl.patch
new file mode 100644
index 000000000000..b30126ce5736
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl.patch
@@ -0,0 +1,15 @@
+--- a/include/tracefs.h
++++ b/include/tracefs.h
+@@ -10,6 +10,12 @@
+ #include <sched.h>
+ #include <event-parse.h>
+
++#ifndef _GNU_SOURCE
++/* See CPU_SET(3) */
++struct cpu_set_t;
++typedef struct cpu_set_t cpu_set_t;
++#endif
++
+ char *tracefs_get_tracing_file(const char *name);
+ void tracefs_put_tracing_file(char *name);
+
diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template
new file mode 100644
index 000000000000..143f14444cbe
--- /dev/null
+++ b/srcpkgs/libtracefs/template
@@ -0,0 +1,42 @@
+# Template file for 'libtracefs'
+pkgname=libtracefs
+version=1.4.2
+revision=1
+build_style=gnu-makefile
+make_build_args="libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install install_doc"
+make_use_env=yes
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+makedepends="libtraceevent-devel"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace file system library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-${version}.tar.gz"
+checksum=8ad03e6d2a6227f6eb11692d9f04614d3da60ac6c5e4fe436e59b2bed90f031b
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ # manpage for sample program
+ rm ${DESTDIR}/usr/share/man/man1/sqlhist.1
+}
+
+libtracefs-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/doc
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From 2216570d52cf80c115e49f08c26df299874b18e7 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 02:39:52 -0400
Subject: [PATCH 3/4] trace-cmd: update to 3.1.2.
---
common/shlibs | 1 +
srcpkgs/{kernelshark => libtracecmd} | 0
srcpkgs/libtracecmd-devel | 1 +
.../trace-cmd/patches/fix-program-name.patch | 23 --------
srcpkgs/trace-cmd/patches/musl-limits_h.patch | 44 +++++++++------
.../musl-no_pthread_attr_setaffinity_np.patch | 24 --------
.../trace-cmd/patches/musl-pthread_h.patch | 10 ----
srcpkgs/trace-cmd/patches/no-rpath.patch | 20 +++++++
srcpkgs/trace-cmd/template | 56 +++++++++++--------
9 files changed, 83 insertions(+), 96 deletions(-)
rename srcpkgs/{kernelshark => libtracecmd} (100%)
create mode 120000 srcpkgs/libtracecmd-devel
delete mode 100644 srcpkgs/trace-cmd/patches/fix-program-name.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-pthread_h.patch
create mode 100644 srcpkgs/trace-cmd/patches/no-rpath.patch
diff --git a/common/shlibs b/common/shlibs
index 61171eb2d7fb..4b32de4075b1 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4203,3 +4203,4 @@ libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_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
diff --git a/srcpkgs/kernelshark b/srcpkgs/libtracecmd
similarity index 100%
rename from srcpkgs/kernelshark
rename to srcpkgs/libtracecmd
diff --git a/srcpkgs/libtracecmd-devel b/srcpkgs/libtracecmd-devel
new file mode 120000
index 000000000000..77b3407d0913
--- /dev/null
+++ b/srcpkgs/libtracecmd-devel
@@ -0,0 +1 @@
+trace-cmd
\ No newline at end of file
diff --git a/srcpkgs/trace-cmd/patches/fix-program-name.patch b/srcpkgs/trace-cmd/patches/fix-program-name.patch
deleted file mode 100644
index 970122246115..000000000000
--- a/srcpkgs/trace-cmd/patches/fix-program-name.patch
+++ /dev/null
@@ -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':
diff --git a/srcpkgs/trace-cmd/patches/musl-limits_h.patch b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
index 83e278c8ab9e..af90e89b8d75 100644
--- a/srcpkgs/trace-cmd/patches/musl-limits_h.patch
+++ b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
@@ -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>
diff --git a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch b/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
deleted file mode 100644
index 5203d3335c2b..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
+++ /dev/null
@@ -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);
-
diff --git a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch b/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
deleted file mode 100644
index 367588391845..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
+++ /dev/null
@@ -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 }
diff --git a/srcpkgs/trace-cmd/patches/no-rpath.patch b/srcpkgs/trace-cmd/patches/no-rpath.patch
new file mode 100644
index 000000000000..ff2fd9fe864e
--- /dev/null
+++ b/srcpkgs/trace-cmd/patches/no-rpath.patch
@@ -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) \
diff --git a/srcpkgs/trace-cmd/template b/srcpkgs/trace-cmd/template
index ecef9dad32e4..c1cedcddf859 100644
--- a/srcpkgs/trace-cmd/template
+++ b/srcpkgs/trace-cmd/template
@@ -1,36 +1,48 @@
# Template file for 'trace-cmd'
pkgname=trace-cmd
-version=2.9.1
+version=3.1.2
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=206672af60aa0bc35cfc44a4be746efa575bac729060e54b6453f7d5dfbcd979
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
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
+}
+
+libtracecmd_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/*.so.*"
+ }
}
-kernelshark_package() {
- depends="${sourcepkg}>=${version}_${revision}"
- short_desc="GUI for ftrace Linux kernel internal tracer"
+libtracecmd-devel_package() {
+ depends="libtracecmd>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
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/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc/libtracecmd-doc
}
}
From c0a07db0ec5c08084c667ac23907dc6bbafb0dcf Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 03:07:55 -0400
Subject: [PATCH 4/4] kernelshark: split from trace-cmd, update to 2.1.1
---
common/shlibs | 1 +
srcpkgs/kernelshark/patches/musl.patch | 20 +++++++++++++
srcpkgs/kernelshark/template | 40 ++++++++++++++++++++++++++
srcpkgs/kernelshark/update | 1 +
srcpkgs/libkshark | 1 +
srcpkgs/libkshark-devel | 1 +
6 files changed, 64 insertions(+)
create mode 100644 srcpkgs/kernelshark/patches/musl.patch
create mode 100644 srcpkgs/kernelshark/template
create mode 100644 srcpkgs/kernelshark/update
create mode 120000 srcpkgs/libkshark
create mode 120000 srcpkgs/libkshark-devel
diff --git a/common/shlibs b/common/shlibs
index 4b32de4075b1..9cbab570daea 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4204,3 +4204,4 @@ libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_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
+libkshark.so.2 libkshark-2.1.1_1
diff --git a/srcpkgs/kernelshark/patches/musl.patch b/srcpkgs/kernelshark/patches/musl.patch
new file mode 100644
index 000000000000..e02fddb486c7
--- /dev/null
+++ b/srcpkgs/kernelshark/patches/musl.patch
@@ -0,0 +1,20 @@
+--- a/src/libkshark.h
++++ b/src/libkshark.h
+@@ -17,6 +17,7 @@
+ #include <string.h>
+ #include <pthread.h>
+ #include <errno.h>
++#include <sys/types.h>
+
+ // Json-C
+ #include <json-c/json.h>
+--- a/src/kernelshark.cpp
++++ b/src/kernelshark.cpp
+@@ -7,6 +7,7 @@
+ // C
+ #include <sys/stat.h>
+ #include <getopt.h>
++#include <libgen.h>
+
+ // Qt
+ #include <QApplication>
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
new file mode 100644
index 000000000000..91ebad4dea7c
--- /dev/null
+++ b/srcpkgs/kernelshark/template
@@ -0,0 +1,40 @@
+# Template file for 'kernelshark'
+pkgname=kernelshark
+reverts="2.9.1_1 2.9_1 2.8.3_2 2.8.3_1 2.8.2_1 2.8.1_1 2.7_2 2.7_1 2.6.2_1 2.6.1_1
+ 2.6_1 2.5.3_3 2.5.3_2 2.5.3_1 2.5.1_1 2.5_1 2.4_1"
+version=2.1.1
+revision=1
+build_style=cmake
+# It's PKG_CONGIG_DIR not PKG_CONFIG_DIR
+configure_args="-D_INSTALL_PREFIX=/usr -D_LIBDIR=/usr/lib$XBPS_TARGET_WORDSIZE
+ -DPKG_CONGIG_DIR=/usr/lib/pkgconfig -DTT_FONT_FILE=/usr/share/fonts/TTF/FreeSans.ttf
+ -DTRACECMD_EXECUTABLE=/usr/bin/trace-cmd -DCMAKE_SKIP_RPATH=ON"
+hostmakedepends="qt5-qmake qt5-host-tools pkg-config"
+makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
+ libtraceevent-devel libtracefs-devel libtracecmd-devel"
+depends="freefont-ttf trace-cmd"
+short_desc="Front end reader of trace-cmd(1) output"
+maintainer="Leah Neukirchen <leah@vuxu.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.kernelshark.org"
+distfiles="https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/snapshot/kernel-shark-kernelshark-v${version}.tar.gz"
+checksum=78a0cf28bc06d0e43cd5a2512f83c02b7b5c969a26a0d4b56338154d6cf6f7be
+# requires externally-downloaded data and segfaults on some gui tests
+make_check=no
+
+libkshark_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/libkshark.so.*"
+ }
+}
+
+libkshark-devel_package() {
+ depends="libkshark>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/kernelshark/update b/srcpkgs/kernelshark/update
new file mode 100644
index 000000000000..8b5f28fc01ca
--- /dev/null
+++ b/srcpkgs/kernelshark/update
@@ -0,0 +1 @@
+pkgname=kernel-shark-kernelshark
diff --git a/srcpkgs/libkshark b/srcpkgs/libkshark
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
diff --git a/srcpkgs/libkshark-devel b/srcpkgs/libkshark-devel
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark-devel
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR PATCH] [Updated] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (44 preceding siblings ...)
2022-11-24 8:16 ` [PR PATCH] [Updated] " classabbyamp
@ 2022-11-24 8:26 ` classabbyamp
2022-11-24 8:38 ` classabbyamp
` (8 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-11-24 8:26 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages update/trace-cmd-3.1.2
https://github.com/void-linux/void-packages/pull/38851
trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
- New package: libtraceevent-1.6.2
- New package: libtracefs-1.4.2
- trace-cmd: update to 3.1.2.
- kernelshark: split from trace-cmd, update to 2.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (builds & runs, but I'm not sure how to use this so I can't test further)
A patch file from https://github.com/void-linux/void-packages/pull/38851.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update/trace-cmd-3.1.2-38851.patch --]
[-- Type: text/x-diff, Size: 21747 bytes --]
From 377e2294af5c036e38eccdeef6e4554f9f413028 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:37:06 -0400
Subject: [PATCH 1/4] New package: libtraceevent-1.6.2
---
common/shlibs | 1 +
srcpkgs/libtraceevent-devel | 1 +
srcpkgs/libtraceevent/template | 35 ++++++++++++++++++++++++++++++++++
3 files changed, 37 insertions(+)
create mode 120000 srcpkgs/libtraceevent-devel
create mode 100644 srcpkgs/libtraceevent/template
diff --git a/common/shlibs b/common/shlibs
index 6acbb4097f0b..0d0b04d72fee 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4201,3 +4201,4 @@ libabsl_strings.so.2206.0.0 abseil-cpp-20220623.1_1
libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1
libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_1
+libtraceevent.so.1 libtraceevent-1.6.2_1
diff --git a/srcpkgs/libtraceevent-devel b/srcpkgs/libtraceevent-devel
new file mode 120000
index 000000000000..9ca91c55529f
--- /dev/null
+++ b/srcpkgs/libtraceevent-devel
@@ -0,0 +1 @@
+libtraceevent
\ No newline at end of file
diff --git a/srcpkgs/libtraceevent/template b/srcpkgs/libtraceevent/template
new file mode 100644
index 000000000000..45c707a12679
--- /dev/null
+++ b/srcpkgs/libtraceevent/template
@@ -0,0 +1,35 @@
+# Template file for 'libtraceevent'
+pkgname=libtraceevent
+version=1.6.2
+revision=1
+build_style=gnu-makefile
+make_build_args="libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install doc-install"
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace event library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-${version}.tar.gz"
+checksum=1aaeb12f5842a843a06b733e3f4230b0937ba9c2ecd39345edf6f66cc8cbe795
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+libtraceevent-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc
+ }
+}
From f4c4557945d1c3ed0502c18fe050deacd6976c8f Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:41:02 -0400
Subject: [PATCH 2/4] New package: libtracefs-1.4.2
---
common/shlibs | 1 +
srcpkgs/libtracefs-devel | 1 +
.../libtracefs/patches/musl-limits_h.patch | 10 +++++
srcpkgs/libtracefs/patches/musl.patch | 15 +++++++
srcpkgs/libtracefs/template | 42 +++++++++++++++++++
5 files changed, 69 insertions(+)
create mode 120000 srcpkgs/libtracefs-devel
create mode 100644 srcpkgs/libtracefs/patches/musl-limits_h.patch
create mode 100644 srcpkgs/libtracefs/patches/musl.patch
create mode 100644 srcpkgs/libtracefs/template
diff --git a/common/shlibs b/common/shlibs
index 0d0b04d72fee..61171eb2d7fb 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4202,3 +4202,4 @@ libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1
libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_1
libtraceevent.so.1 libtraceevent-1.6.2_1
+libtracefs.so.1 libtracefs-1.4.2_1
diff --git a/srcpkgs/libtracefs-devel b/srcpkgs/libtracefs-devel
new file mode 120000
index 000000000000..23466cce7993
--- /dev/null
+++ b/srcpkgs/libtracefs-devel
@@ -0,0 +1 @@
+libtracefs
\ No newline at end of file
diff --git a/srcpkgs/libtracefs/patches/musl-limits_h.patch b/srcpkgs/libtracefs/patches/musl-limits_h.patch
new file mode 100644
index 000000000000..b499fdceb66d
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl-limits_h.patch
@@ -0,0 +1,10 @@
+--- a/utest/tracefs-utest.c
++++ b/utest/tracefs-utest.c
+@@ -11,6 +11,7 @@
+ #include <time.h>
+ #include <dirent.h>
+ #include <ftw.h>
++#include <limits.h>
+
+ #include <CUnit/CUnit.h>
+ #include <CUnit/Basic.h>
diff --git a/srcpkgs/libtracefs/patches/musl.patch b/srcpkgs/libtracefs/patches/musl.patch
new file mode 100644
index 000000000000..b30126ce5736
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl.patch
@@ -0,0 +1,15 @@
+--- a/include/tracefs.h
++++ b/include/tracefs.h
+@@ -10,6 +10,12 @@
+ #include <sched.h>
+ #include <event-parse.h>
+
++#ifndef _GNU_SOURCE
++/* See CPU_SET(3) */
++struct cpu_set_t;
++typedef struct cpu_set_t cpu_set_t;
++#endif
++
+ char *tracefs_get_tracing_file(const char *name);
+ void tracefs_put_tracing_file(char *name);
+
diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template
new file mode 100644
index 000000000000..143f14444cbe
--- /dev/null
+++ b/srcpkgs/libtracefs/template
@@ -0,0 +1,42 @@
+# Template file for 'libtracefs'
+pkgname=libtracefs
+version=1.4.2
+revision=1
+build_style=gnu-makefile
+make_build_args="libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install install_doc"
+make_use_env=yes
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+makedepends="libtraceevent-devel"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace file system library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-${version}.tar.gz"
+checksum=8ad03e6d2a6227f6eb11692d9f04614d3da60ac6c5e4fe436e59b2bed90f031b
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ # manpage for sample program
+ rm ${DESTDIR}/usr/share/man/man1/sqlhist.1
+}
+
+libtracefs-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/doc
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From 0abc65d56c7a69217421555a3fb0f43c86277e96 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 02:39:52 -0400
Subject: [PATCH 3/4] trace-cmd: update to 3.1.2.
---
common/shlibs | 1 +
srcpkgs/{kernelshark => libtracecmd} | 0
srcpkgs/libtracecmd-devel | 1 +
.../trace-cmd/patches/fix-program-name.patch | 23 --------
srcpkgs/trace-cmd/patches/glut.patch | 12 ----
srcpkgs/trace-cmd/patches/musl-limits_h.patch | 44 +++++++++------
.../musl-no_pthread_attr_setaffinity_np.patch | 24 --------
.../trace-cmd/patches/musl-pthread_h.patch | 10 ----
srcpkgs/trace-cmd/patches/no-rpath.patch | 20 +++++++
srcpkgs/trace-cmd/template | 56 +++++++++++--------
10 files changed, 83 insertions(+), 108 deletions(-)
rename srcpkgs/{kernelshark => libtracecmd} (100%)
create mode 120000 srcpkgs/libtracecmd-devel
delete mode 100644 srcpkgs/trace-cmd/patches/fix-program-name.patch
delete mode 100644 srcpkgs/trace-cmd/patches/glut.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-pthread_h.patch
create mode 100644 srcpkgs/trace-cmd/patches/no-rpath.patch
diff --git a/common/shlibs b/common/shlibs
index 61171eb2d7fb..4b32de4075b1 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4203,3 +4203,4 @@ libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_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
diff --git a/srcpkgs/kernelshark b/srcpkgs/libtracecmd
similarity index 100%
rename from srcpkgs/kernelshark
rename to srcpkgs/libtracecmd
diff --git a/srcpkgs/libtracecmd-devel b/srcpkgs/libtracecmd-devel
new file mode 120000
index 000000000000..77b3407d0913
--- /dev/null
+++ b/srcpkgs/libtracecmd-devel
@@ -0,0 +1 @@
+trace-cmd
\ No newline at end of file
diff --git a/srcpkgs/trace-cmd/patches/fix-program-name.patch b/srcpkgs/trace-cmd/patches/fix-program-name.patch
deleted file mode 100644
index 970122246115..000000000000
--- a/srcpkgs/trace-cmd/patches/fix-program-name.patch
+++ /dev/null
@@ -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':
diff --git a/srcpkgs/trace-cmd/patches/glut.patch b/srcpkgs/trace-cmd/patches/glut.patch
deleted file mode 100644
index 5db232a21b38..000000000000
--- a/srcpkgs/trace-cmd/patches/glut.patch
+++ /dev/null
@@ -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)
diff --git a/srcpkgs/trace-cmd/patches/musl-limits_h.patch b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
index 83e278c8ab9e..af90e89b8d75 100644
--- a/srcpkgs/trace-cmd/patches/musl-limits_h.patch
+++ b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
@@ -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>
diff --git a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch b/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
deleted file mode 100644
index 5203d3335c2b..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
+++ /dev/null
@@ -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);
-
diff --git a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch b/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
deleted file mode 100644
index 367588391845..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
+++ /dev/null
@@ -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 }
diff --git a/srcpkgs/trace-cmd/patches/no-rpath.patch b/srcpkgs/trace-cmd/patches/no-rpath.patch
new file mode 100644
index 000000000000..ff2fd9fe864e
--- /dev/null
+++ b/srcpkgs/trace-cmd/patches/no-rpath.patch
@@ -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) \
diff --git a/srcpkgs/trace-cmd/template b/srcpkgs/trace-cmd/template
index ecef9dad32e4..c1cedcddf859 100644
--- a/srcpkgs/trace-cmd/template
+++ b/srcpkgs/trace-cmd/template
@@ -1,36 +1,48 @@
# Template file for 'trace-cmd'
pkgname=trace-cmd
-version=2.9.1
+version=3.1.2
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=206672af60aa0bc35cfc44a4be746efa575bac729060e54b6453f7d5dfbcd979
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
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
+}
+
+libtracecmd_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/*.so.*"
+ }
}
-kernelshark_package() {
- depends="${sourcepkg}>=${version}_${revision}"
- short_desc="GUI for ftrace Linux kernel internal tracer"
+libtracecmd-devel_package() {
+ depends="libtracecmd>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
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/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc/libtracecmd-doc
}
}
From f624266017217911792d3a1641ea4f021ce74404 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 03:07:55 -0400
Subject: [PATCH 4/4] kernelshark: split from trace-cmd, update to 2.1.1
---
common/shlibs | 1 +
srcpkgs/kernelshark/patches/musl.patch | 20 +++++++++++++
srcpkgs/kernelshark/template | 40 ++++++++++++++++++++++++++
srcpkgs/kernelshark/update | 1 +
srcpkgs/libkshark | 1 +
srcpkgs/libkshark-devel | 1 +
6 files changed, 64 insertions(+)
create mode 100644 srcpkgs/kernelshark/patches/musl.patch
create mode 100644 srcpkgs/kernelshark/template
create mode 100644 srcpkgs/kernelshark/update
create mode 120000 srcpkgs/libkshark
create mode 120000 srcpkgs/libkshark-devel
diff --git a/common/shlibs b/common/shlibs
index 4b32de4075b1..9cbab570daea 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4204,3 +4204,4 @@ libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_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
+libkshark.so.2 libkshark-2.1.1_1
diff --git a/srcpkgs/kernelshark/patches/musl.patch b/srcpkgs/kernelshark/patches/musl.patch
new file mode 100644
index 000000000000..e02fddb486c7
--- /dev/null
+++ b/srcpkgs/kernelshark/patches/musl.patch
@@ -0,0 +1,20 @@
+--- a/src/libkshark.h
++++ b/src/libkshark.h
+@@ -17,6 +17,7 @@
+ #include <string.h>
+ #include <pthread.h>
+ #include <errno.h>
++#include <sys/types.h>
+
+ // Json-C
+ #include <json-c/json.h>
+--- a/src/kernelshark.cpp
++++ b/src/kernelshark.cpp
+@@ -7,6 +7,7 @@
+ // C
+ #include <sys/stat.h>
+ #include <getopt.h>
++#include <libgen.h>
+
+ // Qt
+ #include <QApplication>
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
new file mode 100644
index 000000000000..91ebad4dea7c
--- /dev/null
+++ b/srcpkgs/kernelshark/template
@@ -0,0 +1,40 @@
+# Template file for 'kernelshark'
+pkgname=kernelshark
+reverts="2.9.1_1 2.9_1 2.8.3_2 2.8.3_1 2.8.2_1 2.8.1_1 2.7_2 2.7_1 2.6.2_1 2.6.1_1
+ 2.6_1 2.5.3_3 2.5.3_2 2.5.3_1 2.5.1_1 2.5_1 2.4_1"
+version=2.1.1
+revision=1
+build_style=cmake
+# It's PKG_CONGIG_DIR not PKG_CONFIG_DIR
+configure_args="-D_INSTALL_PREFIX=/usr -D_LIBDIR=/usr/lib$XBPS_TARGET_WORDSIZE
+ -DPKG_CONGIG_DIR=/usr/lib/pkgconfig -DTT_FONT_FILE=/usr/share/fonts/TTF/FreeSans.ttf
+ -DTRACECMD_EXECUTABLE=/usr/bin/trace-cmd -DCMAKE_SKIP_RPATH=ON"
+hostmakedepends="qt5-qmake qt5-host-tools pkg-config"
+makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
+ libtraceevent-devel libtracefs-devel libtracecmd-devel"
+depends="freefont-ttf trace-cmd"
+short_desc="Front end reader of trace-cmd(1) output"
+maintainer="Leah Neukirchen <leah@vuxu.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.kernelshark.org"
+distfiles="https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/snapshot/kernel-shark-kernelshark-v${version}.tar.gz"
+checksum=78a0cf28bc06d0e43cd5a2512f83c02b7b5c969a26a0d4b56338154d6cf6f7be
+# requires externally-downloaded data and segfaults on some gui tests
+make_check=no
+
+libkshark_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/libkshark.so.*"
+ }
+}
+
+libkshark-devel_package() {
+ depends="libkshark>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/kernelshark/update b/srcpkgs/kernelshark/update
new file mode 100644
index 000000000000..8b5f28fc01ca
--- /dev/null
+++ b/srcpkgs/kernelshark/update
@@ -0,0 +1 @@
+pkgname=kernel-shark-kernelshark
diff --git a/srcpkgs/libkshark b/srcpkgs/libkshark
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
diff --git a/srcpkgs/libkshark-devel b/srcpkgs/libkshark-devel
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark-devel
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR PATCH] [Updated] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (45 preceding siblings ...)
2022-11-24 8:26 ` classabbyamp
@ 2022-11-24 8:38 ` classabbyamp
2022-11-24 10:49 ` classabbyamp
` (7 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-11-24 8:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages update/trace-cmd-3.1.2
https://github.com/void-linux/void-packages/pull/38851
trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
- New package: libtraceevent-1.6.2
- New package: libtracefs-1.4.2
- trace-cmd: update to 3.1.2.
- kernelshark: split from trace-cmd, update to 2.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (builds & runs, but I'm not sure how to use this so I can't test further)
A patch file from https://github.com/void-linux/void-packages/pull/38851.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update/trace-cmd-3.1.2-38851.patch --]
[-- Type: text/x-diff, Size: 21754 bytes --]
From 2a1aad763477217a563fcc1c5b97ce0e4cbbf4e9 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:37:06 -0400
Subject: [PATCH 1/4] New package: libtraceevent-1.6.3
---
common/shlibs | 1 +
srcpkgs/libtraceevent-devel | 1 +
srcpkgs/libtraceevent/template | 35 ++++++++++++++++++++++++++++++++++
3 files changed, 37 insertions(+)
create mode 120000 srcpkgs/libtraceevent-devel
create mode 100644 srcpkgs/libtraceevent/template
diff --git a/common/shlibs b/common/shlibs
index 6acbb4097f0b..0d0b04d72fee 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4201,3 +4201,4 @@ libabsl_strings.so.2206.0.0 abseil-cpp-20220623.1_1
libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1
libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_1
+libtraceevent.so.1 libtraceevent-1.6.2_1
diff --git a/srcpkgs/libtraceevent-devel b/srcpkgs/libtraceevent-devel
new file mode 120000
index 000000000000..9ca91c55529f
--- /dev/null
+++ b/srcpkgs/libtraceevent-devel
@@ -0,0 +1 @@
+libtraceevent
\ No newline at end of file
diff --git a/srcpkgs/libtraceevent/template b/srcpkgs/libtraceevent/template
new file mode 100644
index 000000000000..62446037c09b
--- /dev/null
+++ b/srcpkgs/libtraceevent/template
@@ -0,0 +1,35 @@
+# Template file for 'libtraceevent'
+pkgname=libtraceevent
+version=1.6.3
+revision=1
+build_style=gnu-makefile
+make_build_args="libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install doc-install"
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace event library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-${version}.tar.gz"
+checksum=031e4428586788bb835d894f7f11c54e482764063d96ead303c7f208fb59e353
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+libtraceevent-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc
+ }
+}
From 5c255a4fa28283178ae7438d884d4c56f8672752 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:41:02 -0400
Subject: [PATCH 2/4] New package: libtracefs-1.6.1
---
common/shlibs | 1 +
srcpkgs/libtracefs-devel | 1 +
.../libtracefs/patches/musl-limits_h.patch | 10 +++++
srcpkgs/libtracefs/patches/musl.patch | 15 +++++++
srcpkgs/libtracefs/template | 42 +++++++++++++++++++
5 files changed, 69 insertions(+)
create mode 120000 srcpkgs/libtracefs-devel
create mode 100644 srcpkgs/libtracefs/patches/musl-limits_h.patch
create mode 100644 srcpkgs/libtracefs/patches/musl.patch
create mode 100644 srcpkgs/libtracefs/template
diff --git a/common/shlibs b/common/shlibs
index 0d0b04d72fee..61171eb2d7fb 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4202,3 +4202,4 @@ libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1
libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_1
libtraceevent.so.1 libtraceevent-1.6.2_1
+libtracefs.so.1 libtracefs-1.4.2_1
diff --git a/srcpkgs/libtracefs-devel b/srcpkgs/libtracefs-devel
new file mode 120000
index 000000000000..23466cce7993
--- /dev/null
+++ b/srcpkgs/libtracefs-devel
@@ -0,0 +1 @@
+libtracefs
\ No newline at end of file
diff --git a/srcpkgs/libtracefs/patches/musl-limits_h.patch b/srcpkgs/libtracefs/patches/musl-limits_h.patch
new file mode 100644
index 000000000000..e0cd38d5a7d8
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl-limits_h.patch
@@ -0,0 +1,10 @@
+--- a/utest/tracefs-utest.c
++++ b/utest/tracefs-utest.c
+@@ -11,6 +11,7 @@
+ #include <libgen.h>
+ #include <kbuffer.h>
+ #include <pthread.h>
++#include <limits.h>
+
+ #include <CUnit/CUnit.h>
+ #include <CUnit/Basic.h>
diff --git a/srcpkgs/libtracefs/patches/musl.patch b/srcpkgs/libtracefs/patches/musl.patch
new file mode 100644
index 000000000000..b30126ce5736
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl.patch
@@ -0,0 +1,15 @@
+--- a/include/tracefs.h
++++ b/include/tracefs.h
+@@ -10,6 +10,12 @@
+ #include <sched.h>
+ #include <event-parse.h>
+
++#ifndef _GNU_SOURCE
++/* See CPU_SET(3) */
++struct cpu_set_t;
++typedef struct cpu_set_t cpu_set_t;
++#endif
++
+ char *tracefs_get_tracing_file(const char *name);
+ void tracefs_put_tracing_file(char *name);
+
diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template
new file mode 100644
index 000000000000..f7c1cb68f62f
--- /dev/null
+++ b/srcpkgs/libtracefs/template
@@ -0,0 +1,42 @@
+# Template file for 'libtracefs'
+pkgname=libtracefs
+version=1.6.1
+revision=1
+build_style=gnu-makefile
+make_build_args="libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install install_doc"
+make_use_env=yes
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+makedepends="libtraceevent-devel"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace file system library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-${version}.tar.gz"
+checksum=215a5182ee7d5a813ff84d290bb8988aa4c04cc16bb837780f61b0f5bf7494ab
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ # manpage for sample program
+ rm ${DESTDIR}/usr/share/man/man1/sqlhist.1
+}
+
+libtracefs-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/doc
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From 2ea297c75e457cc895ad31ad472990392af854b3 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 02:39:52 -0400
Subject: [PATCH 3/4] trace-cmd: update to 3.1.4.
---
common/shlibs | 1 +
srcpkgs/{kernelshark => libtracecmd} | 0
srcpkgs/libtracecmd-devel | 1 +
.../trace-cmd/patches/fix-program-name.patch | 23 --------
srcpkgs/trace-cmd/patches/glut.patch | 12 ----
srcpkgs/trace-cmd/patches/musl-limits_h.patch | 44 +++++++++------
.../musl-no_pthread_attr_setaffinity_np.patch | 24 --------
.../trace-cmd/patches/musl-pthread_h.patch | 10 ----
srcpkgs/trace-cmd/patches/no-rpath.patch | 20 +++++++
srcpkgs/trace-cmd/template | 56 +++++++++++--------
10 files changed, 83 insertions(+), 108 deletions(-)
rename srcpkgs/{kernelshark => libtracecmd} (100%)
create mode 120000 srcpkgs/libtracecmd-devel
delete mode 100644 srcpkgs/trace-cmd/patches/fix-program-name.patch
delete mode 100644 srcpkgs/trace-cmd/patches/glut.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-pthread_h.patch
create mode 100644 srcpkgs/trace-cmd/patches/no-rpath.patch
diff --git a/common/shlibs b/common/shlibs
index 61171eb2d7fb..4b32de4075b1 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4203,3 +4203,4 @@ libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_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
diff --git a/srcpkgs/kernelshark b/srcpkgs/libtracecmd
similarity index 100%
rename from srcpkgs/kernelshark
rename to srcpkgs/libtracecmd
diff --git a/srcpkgs/libtracecmd-devel b/srcpkgs/libtracecmd-devel
new file mode 120000
index 000000000000..77b3407d0913
--- /dev/null
+++ b/srcpkgs/libtracecmd-devel
@@ -0,0 +1 @@
+trace-cmd
\ No newline at end of file
diff --git a/srcpkgs/trace-cmd/patches/fix-program-name.patch b/srcpkgs/trace-cmd/patches/fix-program-name.patch
deleted file mode 100644
index 970122246115..000000000000
--- a/srcpkgs/trace-cmd/patches/fix-program-name.patch
+++ /dev/null
@@ -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':
diff --git a/srcpkgs/trace-cmd/patches/glut.patch b/srcpkgs/trace-cmd/patches/glut.patch
deleted file mode 100644
index 5db232a21b38..000000000000
--- a/srcpkgs/trace-cmd/patches/glut.patch
+++ /dev/null
@@ -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)
diff --git a/srcpkgs/trace-cmd/patches/musl-limits_h.patch b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
index 83e278c8ab9e..af90e89b8d75 100644
--- a/srcpkgs/trace-cmd/patches/musl-limits_h.patch
+++ b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
@@ -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>
diff --git a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch b/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
deleted file mode 100644
index 5203d3335c2b..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
+++ /dev/null
@@ -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);
-
diff --git a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch b/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
deleted file mode 100644
index 367588391845..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
+++ /dev/null
@@ -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 }
diff --git a/srcpkgs/trace-cmd/patches/no-rpath.patch b/srcpkgs/trace-cmd/patches/no-rpath.patch
new file mode 100644
index 000000000000..ff2fd9fe864e
--- /dev/null
+++ b/srcpkgs/trace-cmd/patches/no-rpath.patch
@@ -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) \
diff --git a/srcpkgs/trace-cmd/template b/srcpkgs/trace-cmd/template
index ecef9dad32e4..055b59dfb7cf 100644
--- a/srcpkgs/trace-cmd/template
+++ b/srcpkgs/trace-cmd/template
@@ -1,36 +1,48 @@
# 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
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
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
+}
+
+libtracecmd_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/*.so.*"
+ }
}
-kernelshark_package() {
- depends="${sourcepkg}>=${version}_${revision}"
- short_desc="GUI for ftrace Linux kernel internal tracer"
+libtracecmd-devel_package() {
+ depends="libtracecmd>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
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/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc/libtracecmd-doc
}
}
From e32ff8747fafe1e3a09a7768dbc4cb229fe4021a Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 03:07:55 -0400
Subject: [PATCH 4/4] kernelshark: split from trace-cmd, update to 2.1.1
---
common/shlibs | 1 +
srcpkgs/kernelshark/patches/musl.patch | 20 +++++++++++++
srcpkgs/kernelshark/template | 40 ++++++++++++++++++++++++++
srcpkgs/kernelshark/update | 1 +
srcpkgs/libkshark | 1 +
srcpkgs/libkshark-devel | 1 +
6 files changed, 64 insertions(+)
create mode 100644 srcpkgs/kernelshark/patches/musl.patch
create mode 100644 srcpkgs/kernelshark/template
create mode 100644 srcpkgs/kernelshark/update
create mode 120000 srcpkgs/libkshark
create mode 120000 srcpkgs/libkshark-devel
diff --git a/common/shlibs b/common/shlibs
index 4b32de4075b1..9cbab570daea 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4204,3 +4204,4 @@ libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_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
+libkshark.so.2 libkshark-2.1.1_1
diff --git a/srcpkgs/kernelshark/patches/musl.patch b/srcpkgs/kernelshark/patches/musl.patch
new file mode 100644
index 000000000000..e02fddb486c7
--- /dev/null
+++ b/srcpkgs/kernelshark/patches/musl.patch
@@ -0,0 +1,20 @@
+--- a/src/libkshark.h
++++ b/src/libkshark.h
+@@ -17,6 +17,7 @@
+ #include <string.h>
+ #include <pthread.h>
+ #include <errno.h>
++#include <sys/types.h>
+
+ // Json-C
+ #include <json-c/json.h>
+--- a/src/kernelshark.cpp
++++ b/src/kernelshark.cpp
+@@ -7,6 +7,7 @@
+ // C
+ #include <sys/stat.h>
+ #include <getopt.h>
++#include <libgen.h>
+
+ // Qt
+ #include <QApplication>
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
new file mode 100644
index 000000000000..91ebad4dea7c
--- /dev/null
+++ b/srcpkgs/kernelshark/template
@@ -0,0 +1,40 @@
+# Template file for 'kernelshark'
+pkgname=kernelshark
+reverts="2.9.1_1 2.9_1 2.8.3_2 2.8.3_1 2.8.2_1 2.8.1_1 2.7_2 2.7_1 2.6.2_1 2.6.1_1
+ 2.6_1 2.5.3_3 2.5.3_2 2.5.3_1 2.5.1_1 2.5_1 2.4_1"
+version=2.1.1
+revision=1
+build_style=cmake
+# It's PKG_CONGIG_DIR not PKG_CONFIG_DIR
+configure_args="-D_INSTALL_PREFIX=/usr -D_LIBDIR=/usr/lib$XBPS_TARGET_WORDSIZE
+ -DPKG_CONGIG_DIR=/usr/lib/pkgconfig -DTT_FONT_FILE=/usr/share/fonts/TTF/FreeSans.ttf
+ -DTRACECMD_EXECUTABLE=/usr/bin/trace-cmd -DCMAKE_SKIP_RPATH=ON"
+hostmakedepends="qt5-qmake qt5-host-tools pkg-config"
+makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
+ libtraceevent-devel libtracefs-devel libtracecmd-devel"
+depends="freefont-ttf trace-cmd"
+short_desc="Front end reader of trace-cmd(1) output"
+maintainer="Leah Neukirchen <leah@vuxu.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.kernelshark.org"
+distfiles="https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/snapshot/kernel-shark-kernelshark-v${version}.tar.gz"
+checksum=78a0cf28bc06d0e43cd5a2512f83c02b7b5c969a26a0d4b56338154d6cf6f7be
+# requires externally-downloaded data and segfaults on some gui tests
+make_check=no
+
+libkshark_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/libkshark.so.*"
+ }
+}
+
+libkshark-devel_package() {
+ depends="libkshark>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/kernelshark/update b/srcpkgs/kernelshark/update
new file mode 100644
index 000000000000..8b5f28fc01ca
--- /dev/null
+++ b/srcpkgs/kernelshark/update
@@ -0,0 +1 @@
+pkgname=kernel-shark-kernelshark
diff --git a/srcpkgs/libkshark b/srcpkgs/libkshark
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
diff --git a/srcpkgs/libkshark-devel b/srcpkgs/libkshark-devel
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark-devel
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR PATCH] [Updated] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (46 preceding siblings ...)
2022-11-24 8:38 ` classabbyamp
@ 2022-11-24 10:49 ` classabbyamp
2022-11-24 19:54 ` classabbyamp
` (6 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-11-24 10:49 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages update/trace-cmd-3.1.2
https://github.com/void-linux/void-packages/pull/38851
trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
- New package: libtraceevent-1.6.2
- New package: libtracefs-1.4.2
- trace-cmd: update to 3.1.2.
- kernelshark: split from trace-cmd, update to 2.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (builds & runs, but I'm not sure how to use this so I can't test further)
A patch file from https://github.com/void-linux/void-packages/pull/38851.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update/trace-cmd-3.1.2-38851.patch --]
[-- Type: text/x-diff, Size: 21679 bytes --]
From a89345b0bd2595fa9983769a0ce344551e362cff Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:37:06 -0400
Subject: [PATCH 1/4] New package: libtraceevent-1.6.3
---
common/shlibs | 1 +
srcpkgs/libtraceevent-devel | 1 +
srcpkgs/libtraceevent/template | 35 ++++++++++++++++++++++++++++++++++
3 files changed, 37 insertions(+)
create mode 120000 srcpkgs/libtraceevent-devel
create mode 100644 srcpkgs/libtraceevent/template
diff --git a/common/shlibs b/common/shlibs
index 61f21bc3b94e..f51bb7749dda 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4202,3 +4202,4 @@ libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1
libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
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
diff --git a/srcpkgs/libtraceevent-devel b/srcpkgs/libtraceevent-devel
new file mode 120000
index 000000000000..9ca91c55529f
--- /dev/null
+++ b/srcpkgs/libtraceevent-devel
@@ -0,0 +1 @@
+libtraceevent
\ No newline at end of file
diff --git a/srcpkgs/libtraceevent/template b/srcpkgs/libtraceevent/template
new file mode 100644
index 000000000000..62446037c09b
--- /dev/null
+++ b/srcpkgs/libtraceevent/template
@@ -0,0 +1,35 @@
+# Template file for 'libtraceevent'
+pkgname=libtraceevent
+version=1.6.3
+revision=1
+build_style=gnu-makefile
+make_build_args="libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install doc-install"
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace event library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-${version}.tar.gz"
+checksum=031e4428586788bb835d894f7f11c54e482764063d96ead303c7f208fb59e353
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+libtraceevent-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc
+ }
+}
From 4549d7c7b0187e0be9669bb2c06a484b36059231 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:41:02 -0400
Subject: [PATCH 2/4] New package: libtracefs-1.6.1
---
common/shlibs | 1 +
srcpkgs/libtracefs-devel | 1 +
.../libtracefs/patches/musl-limits_h.patch | 10 +++++
srcpkgs/libtracefs/patches/musl.patch | 15 +++++++
srcpkgs/libtracefs/template | 42 +++++++++++++++++++
5 files changed, 69 insertions(+)
create mode 120000 srcpkgs/libtracefs-devel
create mode 100644 srcpkgs/libtracefs/patches/musl-limits_h.patch
create mode 100644 srcpkgs/libtracefs/patches/musl.patch
create mode 100644 srcpkgs/libtracefs/template
diff --git a/common/shlibs b/common/shlibs
index f51bb7749dda..332e24e45a5c 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4203,3 +4203,4 @@ libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
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
diff --git a/srcpkgs/libtracefs-devel b/srcpkgs/libtracefs-devel
new file mode 120000
index 000000000000..23466cce7993
--- /dev/null
+++ b/srcpkgs/libtracefs-devel
@@ -0,0 +1 @@
+libtracefs
\ No newline at end of file
diff --git a/srcpkgs/libtracefs/patches/musl-limits_h.patch b/srcpkgs/libtracefs/patches/musl-limits_h.patch
new file mode 100644
index 000000000000..e0cd38d5a7d8
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl-limits_h.patch
@@ -0,0 +1,10 @@
+--- a/utest/tracefs-utest.c
++++ b/utest/tracefs-utest.c
+@@ -11,6 +11,7 @@
+ #include <libgen.h>
+ #include <kbuffer.h>
+ #include <pthread.h>
++#include <limits.h>
+
+ #include <CUnit/CUnit.h>
+ #include <CUnit/Basic.h>
diff --git a/srcpkgs/libtracefs/patches/musl.patch b/srcpkgs/libtracefs/patches/musl.patch
new file mode 100644
index 000000000000..b30126ce5736
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl.patch
@@ -0,0 +1,15 @@
+--- a/include/tracefs.h
++++ b/include/tracefs.h
+@@ -10,6 +10,12 @@
+ #include <sched.h>
+ #include <event-parse.h>
+
++#ifndef _GNU_SOURCE
++/* See CPU_SET(3) */
++struct cpu_set_t;
++typedef struct cpu_set_t cpu_set_t;
++#endif
++
+ char *tracefs_get_tracing_file(const char *name);
+ void tracefs_put_tracing_file(char *name);
+
diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template
new file mode 100644
index 000000000000..f7c1cb68f62f
--- /dev/null
+++ b/srcpkgs/libtracefs/template
@@ -0,0 +1,42 @@
+# Template file for 'libtracefs'
+pkgname=libtracefs
+version=1.6.1
+revision=1
+build_style=gnu-makefile
+make_build_args="libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install install_doc"
+make_use_env=yes
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+makedepends="libtraceevent-devel"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace file system library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-${version}.tar.gz"
+checksum=215a5182ee7d5a813ff84d290bb8988aa4c04cc16bb837780f61b0f5bf7494ab
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ # manpage for sample program
+ rm ${DESTDIR}/usr/share/man/man1/sqlhist.1
+}
+
+libtracefs-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/doc
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From 35beb2946c10e2694ad1f8e644ade29227654ebe Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 02:39:52 -0400
Subject: [PATCH 3/4] trace-cmd: update to 3.1.4.
---
common/shlibs | 1 +
srcpkgs/{kernelshark => libtracecmd} | 0
srcpkgs/libtracecmd-devel | 1 +
.../trace-cmd/patches/fix-program-name.patch | 23 --------
srcpkgs/trace-cmd/patches/glut.patch | 12 ----
srcpkgs/trace-cmd/patches/musl-limits_h.patch | 44 +++++++++------
.../musl-no_pthread_attr_setaffinity_np.patch | 24 --------
.../trace-cmd/patches/musl-pthread_h.patch | 10 ----
srcpkgs/trace-cmd/patches/no-rpath.patch | 20 +++++++
srcpkgs/trace-cmd/template | 56 +++++++++++--------
10 files changed, 83 insertions(+), 108 deletions(-)
rename srcpkgs/{kernelshark => libtracecmd} (100%)
create mode 120000 srcpkgs/libtracecmd-devel
delete mode 100644 srcpkgs/trace-cmd/patches/fix-program-name.patch
delete mode 100644 srcpkgs/trace-cmd/patches/glut.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-pthread_h.patch
create mode 100644 srcpkgs/trace-cmd/patches/no-rpath.patch
diff --git a/common/shlibs b/common/shlibs
index 332e24e45a5c..ddf961520ef5 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -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
diff --git a/srcpkgs/kernelshark b/srcpkgs/libtracecmd
similarity index 100%
rename from srcpkgs/kernelshark
rename to srcpkgs/libtracecmd
diff --git a/srcpkgs/libtracecmd-devel b/srcpkgs/libtracecmd-devel
new file mode 120000
index 000000000000..77b3407d0913
--- /dev/null
+++ b/srcpkgs/libtracecmd-devel
@@ -0,0 +1 @@
+trace-cmd
\ No newline at end of file
diff --git a/srcpkgs/trace-cmd/patches/fix-program-name.patch b/srcpkgs/trace-cmd/patches/fix-program-name.patch
deleted file mode 100644
index 970122246115..000000000000
--- a/srcpkgs/trace-cmd/patches/fix-program-name.patch
+++ /dev/null
@@ -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':
diff --git a/srcpkgs/trace-cmd/patches/glut.patch b/srcpkgs/trace-cmd/patches/glut.patch
deleted file mode 100644
index 5db232a21b38..000000000000
--- a/srcpkgs/trace-cmd/patches/glut.patch
+++ /dev/null
@@ -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)
diff --git a/srcpkgs/trace-cmd/patches/musl-limits_h.patch b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
index 83e278c8ab9e..af90e89b8d75 100644
--- a/srcpkgs/trace-cmd/patches/musl-limits_h.patch
+++ b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
@@ -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>
diff --git a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch b/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
deleted file mode 100644
index 5203d3335c2b..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
+++ /dev/null
@@ -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);
-
diff --git a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch b/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
deleted file mode 100644
index 367588391845..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
+++ /dev/null
@@ -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 }
diff --git a/srcpkgs/trace-cmd/patches/no-rpath.patch b/srcpkgs/trace-cmd/patches/no-rpath.patch
new file mode 100644
index 000000000000..ff2fd9fe864e
--- /dev/null
+++ b/srcpkgs/trace-cmd/patches/no-rpath.patch
@@ -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) \
diff --git a/srcpkgs/trace-cmd/template b/srcpkgs/trace-cmd/template
index ecef9dad32e4..055b59dfb7cf 100644
--- a/srcpkgs/trace-cmd/template
+++ b/srcpkgs/trace-cmd/template
@@ -1,36 +1,48 @@
# 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
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
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
+}
+
+libtracecmd_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/*.so.*"
+ }
}
-kernelshark_package() {
- depends="${sourcepkg}>=${version}_${revision}"
- short_desc="GUI for ftrace Linux kernel internal tracer"
+libtracecmd-devel_package() {
+ depends="libtracecmd>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
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/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc/libtracecmd-doc
}
}
From 4aa0e6b5b8816d60f991b0ee7e7803030deb4830 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 03:07:55 -0400
Subject: [PATCH 4/4] kernelshark: split from trace-cmd, update to 2.1.1
---
common/shlibs | 1 +
srcpkgs/kernelshark/patches/musl.patch | 20 +++++++++++++
srcpkgs/kernelshark/template | 40 ++++++++++++++++++++++++++
srcpkgs/kernelshark/update | 1 +
srcpkgs/libkshark | 1 +
srcpkgs/libkshark-devel | 1 +
6 files changed, 64 insertions(+)
create mode 100644 srcpkgs/kernelshark/patches/musl.patch
create mode 100644 srcpkgs/kernelshark/template
create mode 100644 srcpkgs/kernelshark/update
create mode 120000 srcpkgs/libkshark
create mode 120000 srcpkgs/libkshark-devel
diff --git a/common/shlibs b/common/shlibs
index ddf961520ef5..5ca12d1a391f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4205,3 +4205,4 @@ 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
+libkshark.so.2 libkshark-2.1.1_1
diff --git a/srcpkgs/kernelshark/patches/musl.patch b/srcpkgs/kernelshark/patches/musl.patch
new file mode 100644
index 000000000000..e02fddb486c7
--- /dev/null
+++ b/srcpkgs/kernelshark/patches/musl.patch
@@ -0,0 +1,20 @@
+--- a/src/libkshark.h
++++ b/src/libkshark.h
+@@ -17,6 +17,7 @@
+ #include <string.h>
+ #include <pthread.h>
+ #include <errno.h>
++#include <sys/types.h>
+
+ // Json-C
+ #include <json-c/json.h>
+--- a/src/kernelshark.cpp
++++ b/src/kernelshark.cpp
+@@ -7,6 +7,7 @@
+ // C
+ #include <sys/stat.h>
+ #include <getopt.h>
++#include <libgen.h>
+
+ // Qt
+ #include <QApplication>
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
new file mode 100644
index 000000000000..91ebad4dea7c
--- /dev/null
+++ b/srcpkgs/kernelshark/template
@@ -0,0 +1,40 @@
+# Template file for 'kernelshark'
+pkgname=kernelshark
+reverts="2.9.1_1 2.9_1 2.8.3_2 2.8.3_1 2.8.2_1 2.8.1_1 2.7_2 2.7_1 2.6.2_1 2.6.1_1
+ 2.6_1 2.5.3_3 2.5.3_2 2.5.3_1 2.5.1_1 2.5_1 2.4_1"
+version=2.1.1
+revision=1
+build_style=cmake
+# It's PKG_CONGIG_DIR not PKG_CONFIG_DIR
+configure_args="-D_INSTALL_PREFIX=/usr -D_LIBDIR=/usr/lib$XBPS_TARGET_WORDSIZE
+ -DPKG_CONGIG_DIR=/usr/lib/pkgconfig -DTT_FONT_FILE=/usr/share/fonts/TTF/FreeSans.ttf
+ -DTRACECMD_EXECUTABLE=/usr/bin/trace-cmd -DCMAKE_SKIP_RPATH=ON"
+hostmakedepends="qt5-qmake qt5-host-tools pkg-config"
+makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
+ libtraceevent-devel libtracefs-devel libtracecmd-devel"
+depends="freefont-ttf trace-cmd"
+short_desc="Front end reader of trace-cmd(1) output"
+maintainer="Leah Neukirchen <leah@vuxu.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.kernelshark.org"
+distfiles="https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/snapshot/kernel-shark-kernelshark-v${version}.tar.gz"
+checksum=78a0cf28bc06d0e43cd5a2512f83c02b7b5c969a26a0d4b56338154d6cf6f7be
+# requires externally-downloaded data and segfaults on some gui tests
+make_check=no
+
+libkshark_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/libkshark.so.*"
+ }
+}
+
+libkshark-devel_package() {
+ depends="libkshark>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/kernelshark/update b/srcpkgs/kernelshark/update
new file mode 100644
index 000000000000..8b5f28fc01ca
--- /dev/null
+++ b/srcpkgs/kernelshark/update
@@ -0,0 +1 @@
+pkgname=kernel-shark-kernelshark
diff --git a/srcpkgs/libkshark b/srcpkgs/libkshark
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
diff --git a/srcpkgs/libkshark-devel b/srcpkgs/libkshark-devel
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark-devel
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR PATCH] [Updated] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (47 preceding siblings ...)
2022-11-24 10:49 ` classabbyamp
@ 2022-11-24 19:54 ` classabbyamp
2022-11-24 20:08 ` classabbyamp
` (5 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-11-24 19:54 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages update/trace-cmd-3.1.2
https://github.com/void-linux/void-packages/pull/38851
trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
- New package: libtraceevent-1.6.2
- New package: libtracefs-1.4.2
- trace-cmd: update to 3.1.2.
- kernelshark: split from trace-cmd, update to 2.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (builds & runs, but I'm not sure how to use this so I can't test further)
A patch file from https://github.com/void-linux/void-packages/pull/38851.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update/trace-cmd-3.1.2-38851.patch --]
[-- Type: text/x-diff, Size: 21679 bytes --]
From c079bedc7c7f7622f081b63dc855f7e1acc82878 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:37:06 -0400
Subject: [PATCH 1/4] New package: libtraceevent-1.6.3
---
common/shlibs | 1 +
srcpkgs/libtraceevent-devel | 1 +
srcpkgs/libtraceevent/template | 35 ++++++++++++++++++++++++++++++++++
3 files changed, 37 insertions(+)
create mode 120000 srcpkgs/libtraceevent-devel
create mode 100644 srcpkgs/libtraceevent/template
diff --git a/common/shlibs b/common/shlibs
index 61f21bc3b94e..f51bb7749dda 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4202,3 +4202,4 @@ libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1
libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
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
diff --git a/srcpkgs/libtraceevent-devel b/srcpkgs/libtraceevent-devel
new file mode 120000
index 000000000000..9ca91c55529f
--- /dev/null
+++ b/srcpkgs/libtraceevent-devel
@@ -0,0 +1 @@
+libtraceevent
\ No newline at end of file
diff --git a/srcpkgs/libtraceevent/template b/srcpkgs/libtraceevent/template
new file mode 100644
index 000000000000..62446037c09b
--- /dev/null
+++ b/srcpkgs/libtraceevent/template
@@ -0,0 +1,35 @@
+# Template file for 'libtraceevent'
+pkgname=libtraceevent
+version=1.6.3
+revision=1
+build_style=gnu-makefile
+make_build_args="libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install doc-install"
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace event library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-${version}.tar.gz"
+checksum=031e4428586788bb835d894f7f11c54e482764063d96ead303c7f208fb59e353
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+libtraceevent-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc
+ }
+}
From 3c32737f211cc27e3fee01f98674b4fbca26c538 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:41:02 -0400
Subject: [PATCH 2/4] New package: libtracefs-1.6.1
---
common/shlibs | 1 +
srcpkgs/libtracefs-devel | 1 +
.../libtracefs/patches/musl-limits_h.patch | 10 +++++
srcpkgs/libtracefs/patches/musl.patch | 15 +++++++
srcpkgs/libtracefs/template | 42 +++++++++++++++++++
5 files changed, 69 insertions(+)
create mode 120000 srcpkgs/libtracefs-devel
create mode 100644 srcpkgs/libtracefs/patches/musl-limits_h.patch
create mode 100644 srcpkgs/libtracefs/patches/musl.patch
create mode 100644 srcpkgs/libtracefs/template
diff --git a/common/shlibs b/common/shlibs
index f51bb7749dda..332e24e45a5c 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4203,3 +4203,4 @@ libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
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
diff --git a/srcpkgs/libtracefs-devel b/srcpkgs/libtracefs-devel
new file mode 120000
index 000000000000..23466cce7993
--- /dev/null
+++ b/srcpkgs/libtracefs-devel
@@ -0,0 +1 @@
+libtracefs
\ No newline at end of file
diff --git a/srcpkgs/libtracefs/patches/musl-limits_h.patch b/srcpkgs/libtracefs/patches/musl-limits_h.patch
new file mode 100644
index 000000000000..e0cd38d5a7d8
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl-limits_h.patch
@@ -0,0 +1,10 @@
+--- a/utest/tracefs-utest.c
++++ b/utest/tracefs-utest.c
+@@ -11,6 +11,7 @@
+ #include <libgen.h>
+ #include <kbuffer.h>
+ #include <pthread.h>
++#include <limits.h>
+
+ #include <CUnit/CUnit.h>
+ #include <CUnit/Basic.h>
diff --git a/srcpkgs/libtracefs/patches/musl.patch b/srcpkgs/libtracefs/patches/musl.patch
new file mode 100644
index 000000000000..b30126ce5736
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl.patch
@@ -0,0 +1,15 @@
+--- a/include/tracefs.h
++++ b/include/tracefs.h
+@@ -10,6 +10,12 @@
+ #include <sched.h>
+ #include <event-parse.h>
+
++#ifndef _GNU_SOURCE
++/* See CPU_SET(3) */
++struct cpu_set_t;
++typedef struct cpu_set_t cpu_set_t;
++#endif
++
+ char *tracefs_get_tracing_file(const char *name);
+ void tracefs_put_tracing_file(char *name);
+
diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template
new file mode 100644
index 000000000000..f7c1cb68f62f
--- /dev/null
+++ b/srcpkgs/libtracefs/template
@@ -0,0 +1,42 @@
+# Template file for 'libtracefs'
+pkgname=libtracefs
+version=1.6.1
+revision=1
+build_style=gnu-makefile
+make_build_args="libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install install_doc"
+make_use_env=yes
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+makedepends="libtraceevent-devel"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace file system library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-${version}.tar.gz"
+checksum=215a5182ee7d5a813ff84d290bb8988aa4c04cc16bb837780f61b0f5bf7494ab
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ # manpage for sample program
+ rm ${DESTDIR}/usr/share/man/man1/sqlhist.1
+}
+
+libtracefs-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/doc
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From 790a0ceedf70cbfd4d3e88d50c792ad1a27ec39f Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 02:39:52 -0400
Subject: [PATCH 3/4] trace-cmd: update to 3.1.4.
---
common/shlibs | 1 +
srcpkgs/{kernelshark => libtracecmd} | 0
srcpkgs/libtracecmd-devel | 1 +
.../trace-cmd/patches/fix-program-name.patch | 23 --------
srcpkgs/trace-cmd/patches/glut.patch | 12 ----
srcpkgs/trace-cmd/patches/musl-limits_h.patch | 44 +++++++++------
.../musl-no_pthread_attr_setaffinity_np.patch | 24 --------
.../trace-cmd/patches/musl-pthread_h.patch | 10 ----
srcpkgs/trace-cmd/patches/no-rpath.patch | 20 +++++++
srcpkgs/trace-cmd/template | 56 +++++++++++--------
10 files changed, 83 insertions(+), 108 deletions(-)
rename srcpkgs/{kernelshark => libtracecmd} (100%)
create mode 120000 srcpkgs/libtracecmd-devel
delete mode 100644 srcpkgs/trace-cmd/patches/fix-program-name.patch
delete mode 100644 srcpkgs/trace-cmd/patches/glut.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-pthread_h.patch
create mode 100644 srcpkgs/trace-cmd/patches/no-rpath.patch
diff --git a/common/shlibs b/common/shlibs
index 332e24e45a5c..ddf961520ef5 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -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
diff --git a/srcpkgs/kernelshark b/srcpkgs/libtracecmd
similarity index 100%
rename from srcpkgs/kernelshark
rename to srcpkgs/libtracecmd
diff --git a/srcpkgs/libtracecmd-devel b/srcpkgs/libtracecmd-devel
new file mode 120000
index 000000000000..77b3407d0913
--- /dev/null
+++ b/srcpkgs/libtracecmd-devel
@@ -0,0 +1 @@
+trace-cmd
\ No newline at end of file
diff --git a/srcpkgs/trace-cmd/patches/fix-program-name.patch b/srcpkgs/trace-cmd/patches/fix-program-name.patch
deleted file mode 100644
index 970122246115..000000000000
--- a/srcpkgs/trace-cmd/patches/fix-program-name.patch
+++ /dev/null
@@ -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':
diff --git a/srcpkgs/trace-cmd/patches/glut.patch b/srcpkgs/trace-cmd/patches/glut.patch
deleted file mode 100644
index 5db232a21b38..000000000000
--- a/srcpkgs/trace-cmd/patches/glut.patch
+++ /dev/null
@@ -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)
diff --git a/srcpkgs/trace-cmd/patches/musl-limits_h.patch b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
index 83e278c8ab9e..af90e89b8d75 100644
--- a/srcpkgs/trace-cmd/patches/musl-limits_h.patch
+++ b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
@@ -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>
diff --git a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch b/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
deleted file mode 100644
index 5203d3335c2b..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
+++ /dev/null
@@ -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);
-
diff --git a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch b/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
deleted file mode 100644
index 367588391845..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
+++ /dev/null
@@ -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 }
diff --git a/srcpkgs/trace-cmd/patches/no-rpath.patch b/srcpkgs/trace-cmd/patches/no-rpath.patch
new file mode 100644
index 000000000000..ff2fd9fe864e
--- /dev/null
+++ b/srcpkgs/trace-cmd/patches/no-rpath.patch
@@ -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) \
diff --git a/srcpkgs/trace-cmd/template b/srcpkgs/trace-cmd/template
index ecef9dad32e4..055b59dfb7cf 100644
--- a/srcpkgs/trace-cmd/template
+++ b/srcpkgs/trace-cmd/template
@@ -1,36 +1,48 @@
# 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
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
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
+}
+
+libtracecmd_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/*.so.*"
+ }
}
-kernelshark_package() {
- depends="${sourcepkg}>=${version}_${revision}"
- short_desc="GUI for ftrace Linux kernel internal tracer"
+libtracecmd-devel_package() {
+ depends="libtracecmd>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
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/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc/libtracecmd-doc
}
}
From 17c22a47db412fc31ac0490c9fa761bd0fe476fb Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 03:07:55 -0400
Subject: [PATCH 4/4] kernelshark: split from trace-cmd, update to 2.1.1
---
common/shlibs | 1 +
srcpkgs/kernelshark/patches/musl.patch | 20 +++++++++++++
srcpkgs/kernelshark/template | 40 ++++++++++++++++++++++++++
srcpkgs/kernelshark/update | 1 +
srcpkgs/libkshark | 1 +
srcpkgs/libkshark-devel | 1 +
6 files changed, 64 insertions(+)
create mode 100644 srcpkgs/kernelshark/patches/musl.patch
create mode 100644 srcpkgs/kernelshark/template
create mode 100644 srcpkgs/kernelshark/update
create mode 120000 srcpkgs/libkshark
create mode 120000 srcpkgs/libkshark-devel
diff --git a/common/shlibs b/common/shlibs
index ddf961520ef5..5ca12d1a391f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4205,3 +4205,4 @@ 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
+libkshark.so.2 libkshark-2.1.1_1
diff --git a/srcpkgs/kernelshark/patches/musl.patch b/srcpkgs/kernelshark/patches/musl.patch
new file mode 100644
index 000000000000..e02fddb486c7
--- /dev/null
+++ b/srcpkgs/kernelshark/patches/musl.patch
@@ -0,0 +1,20 @@
+--- a/src/libkshark.h
++++ b/src/libkshark.h
+@@ -17,6 +17,7 @@
+ #include <string.h>
+ #include <pthread.h>
+ #include <errno.h>
++#include <sys/types.h>
+
+ // Json-C
+ #include <json-c/json.h>
+--- a/src/kernelshark.cpp
++++ b/src/kernelshark.cpp
+@@ -7,6 +7,7 @@
+ // C
+ #include <sys/stat.h>
+ #include <getopt.h>
++#include <libgen.h>
+
+ // Qt
+ #include <QApplication>
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
new file mode 100644
index 000000000000..91ebad4dea7c
--- /dev/null
+++ b/srcpkgs/kernelshark/template
@@ -0,0 +1,40 @@
+# Template file for 'kernelshark'
+pkgname=kernelshark
+reverts="2.9.1_1 2.9_1 2.8.3_2 2.8.3_1 2.8.2_1 2.8.1_1 2.7_2 2.7_1 2.6.2_1 2.6.1_1
+ 2.6_1 2.5.3_3 2.5.3_2 2.5.3_1 2.5.1_1 2.5_1 2.4_1"
+version=2.1.1
+revision=1
+build_style=cmake
+# It's PKG_CONGIG_DIR not PKG_CONFIG_DIR
+configure_args="-D_INSTALL_PREFIX=/usr -D_LIBDIR=/usr/lib$XBPS_TARGET_WORDSIZE
+ -DPKG_CONGIG_DIR=/usr/lib/pkgconfig -DTT_FONT_FILE=/usr/share/fonts/TTF/FreeSans.ttf
+ -DTRACECMD_EXECUTABLE=/usr/bin/trace-cmd -DCMAKE_SKIP_RPATH=ON"
+hostmakedepends="qt5-qmake qt5-host-tools pkg-config"
+makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
+ libtraceevent-devel libtracefs-devel libtracecmd-devel"
+depends="freefont-ttf trace-cmd"
+short_desc="Front end reader of trace-cmd(1) output"
+maintainer="Leah Neukirchen <leah@vuxu.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.kernelshark.org"
+distfiles="https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/snapshot/kernel-shark-kernelshark-v${version}.tar.gz"
+checksum=78a0cf28bc06d0e43cd5a2512f83c02b7b5c969a26a0d4b56338154d6cf6f7be
+# requires externally-downloaded data and segfaults on some gui tests
+make_check=no
+
+libkshark_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/libkshark.so.*"
+ }
+}
+
+libkshark-devel_package() {
+ depends="libkshark>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/kernelshark/update b/srcpkgs/kernelshark/update
new file mode 100644
index 000000000000..8b5f28fc01ca
--- /dev/null
+++ b/srcpkgs/kernelshark/update
@@ -0,0 +1 @@
+pkgname=kernel-shark-kernelshark
diff --git a/srcpkgs/libkshark b/srcpkgs/libkshark
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
diff --git a/srcpkgs/libkshark-devel b/srcpkgs/libkshark-devel
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark-devel
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR PATCH] [Updated] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (48 preceding siblings ...)
2022-11-24 19:54 ` classabbyamp
@ 2022-11-24 20:08 ` classabbyamp
2022-11-24 20:10 ` classabbyamp
` (4 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-11-24 20:08 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages update/trace-cmd-3.1.2
https://github.com/void-linux/void-packages/pull/38851
trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
- New package: libtraceevent-1.6.2
- New package: libtracefs-1.4.2
- trace-cmd: update to 3.1.2.
- kernelshark: split from trace-cmd, update to 2.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (builds & runs, but I'm not sure how to use this so I can't test further)
A patch file from https://github.com/void-linux/void-packages/pull/38851.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update/trace-cmd-3.1.2-38851.patch --]
[-- Type: text/x-diff, Size: 21706 bytes --]
From c079bedc7c7f7622f081b63dc855f7e1acc82878 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:37:06 -0400
Subject: [PATCH 1/4] New package: libtraceevent-1.6.3
---
common/shlibs | 1 +
srcpkgs/libtraceevent-devel | 1 +
srcpkgs/libtraceevent/template | 35 ++++++++++++++++++++++++++++++++++
3 files changed, 37 insertions(+)
create mode 120000 srcpkgs/libtraceevent-devel
create mode 100644 srcpkgs/libtraceevent/template
diff --git a/common/shlibs b/common/shlibs
index 61f21bc3b94e..f51bb7749dda 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4202,3 +4202,4 @@ libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1
libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
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
diff --git a/srcpkgs/libtraceevent-devel b/srcpkgs/libtraceevent-devel
new file mode 120000
index 000000000000..9ca91c55529f
--- /dev/null
+++ b/srcpkgs/libtraceevent-devel
@@ -0,0 +1 @@
+libtraceevent
\ No newline at end of file
diff --git a/srcpkgs/libtraceevent/template b/srcpkgs/libtraceevent/template
new file mode 100644
index 000000000000..62446037c09b
--- /dev/null
+++ b/srcpkgs/libtraceevent/template
@@ -0,0 +1,35 @@
+# Template file for 'libtraceevent'
+pkgname=libtraceevent
+version=1.6.3
+revision=1
+build_style=gnu-makefile
+make_build_args="libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install doc-install"
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace event library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-${version}.tar.gz"
+checksum=031e4428586788bb835d894f7f11c54e482764063d96ead303c7f208fb59e353
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+libtraceevent-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc
+ }
+}
From edaf1c0b3435bf365ab1621106ce3778b36ff10d Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:41:02 -0400
Subject: [PATCH 2/4] New package: libtracefs-1.6.1
---
common/shlibs | 1 +
srcpkgs/libtracefs-devel | 1 +
.../libtracefs/patches/musl-limits_h.patch | 10 +++++
srcpkgs/libtracefs/patches/musl.patch | 17 ++++++++
srcpkgs/libtracefs/template | 42 +++++++++++++++++++
5 files changed, 71 insertions(+)
create mode 120000 srcpkgs/libtracefs-devel
create mode 100644 srcpkgs/libtracefs/patches/musl-limits_h.patch
create mode 100644 srcpkgs/libtracefs/patches/musl.patch
create mode 100644 srcpkgs/libtracefs/template
diff --git a/common/shlibs b/common/shlibs
index f51bb7749dda..332e24e45a5c 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4203,3 +4203,4 @@ libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
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
diff --git a/srcpkgs/libtracefs-devel b/srcpkgs/libtracefs-devel
new file mode 120000
index 000000000000..23466cce7993
--- /dev/null
+++ b/srcpkgs/libtracefs-devel
@@ -0,0 +1 @@
+libtracefs
\ No newline at end of file
diff --git a/srcpkgs/libtracefs/patches/musl-limits_h.patch b/srcpkgs/libtracefs/patches/musl-limits_h.patch
new file mode 100644
index 000000000000..e0cd38d5a7d8
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl-limits_h.patch
@@ -0,0 +1,10 @@
+--- a/utest/tracefs-utest.c
++++ b/utest/tracefs-utest.c
+@@ -11,6 +11,7 @@
+ #include <libgen.h>
+ #include <kbuffer.h>
+ #include <pthread.h>
++#include <limits.h>
+
+ #include <CUnit/CUnit.h>
+ #include <CUnit/Basic.h>
diff --git a/srcpkgs/libtracefs/patches/musl.patch b/srcpkgs/libtracefs/patches/musl.patch
new file mode 100644
index 000000000000..50ba010fe210
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl.patch
@@ -0,0 +1,17 @@
+--- a/include/tracefs.h
++++ b/include/tracefs.h
+@@ -10,6 +10,14 @@
+ #include <sched.h>
+ #include <event-parse.h>
+
++#ifndef _GNU_SOURCE
++#if !__GLIBC__
++/* See CPU_SET(3) */
++struct cpu_set_t;
++typedef struct cpu_set_t cpu_set_t;
++#endif
++#endif
++
+ char *tracefs_get_tracing_file(const char *name);
+ void tracefs_put_tracing_file(char *name);
+
diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template
new file mode 100644
index 000000000000..f7c1cb68f62f
--- /dev/null
+++ b/srcpkgs/libtracefs/template
@@ -0,0 +1,42 @@
+# Template file for 'libtracefs'
+pkgname=libtracefs
+version=1.6.1
+revision=1
+build_style=gnu-makefile
+make_build_args="libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install install_doc"
+make_use_env=yes
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+makedepends="libtraceevent-devel"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace file system library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-${version}.tar.gz"
+checksum=215a5182ee7d5a813ff84d290bb8988aa4c04cc16bb837780f61b0f5bf7494ab
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ # manpage for sample program
+ rm ${DESTDIR}/usr/share/man/man1/sqlhist.1
+}
+
+libtracefs-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/doc
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From 62d94564272e0cbc9f79c1c579c237340cc961f7 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 02:39:52 -0400
Subject: [PATCH 3/4] trace-cmd: update to 3.1.4.
---
common/shlibs | 1 +
srcpkgs/{kernelshark => libtracecmd} | 0
srcpkgs/libtracecmd-devel | 1 +
.../trace-cmd/patches/fix-program-name.patch | 23 --------
srcpkgs/trace-cmd/patches/glut.patch | 12 ----
srcpkgs/trace-cmd/patches/musl-limits_h.patch | 44 +++++++++------
.../musl-no_pthread_attr_setaffinity_np.patch | 24 --------
.../trace-cmd/patches/musl-pthread_h.patch | 10 ----
srcpkgs/trace-cmd/patches/no-rpath.patch | 20 +++++++
srcpkgs/trace-cmd/template | 56 +++++++++++--------
10 files changed, 83 insertions(+), 108 deletions(-)
rename srcpkgs/{kernelshark => libtracecmd} (100%)
create mode 120000 srcpkgs/libtracecmd-devel
delete mode 100644 srcpkgs/trace-cmd/patches/fix-program-name.patch
delete mode 100644 srcpkgs/trace-cmd/patches/glut.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-pthread_h.patch
create mode 100644 srcpkgs/trace-cmd/patches/no-rpath.patch
diff --git a/common/shlibs b/common/shlibs
index 332e24e45a5c..ddf961520ef5 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -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
diff --git a/srcpkgs/kernelshark b/srcpkgs/libtracecmd
similarity index 100%
rename from srcpkgs/kernelshark
rename to srcpkgs/libtracecmd
diff --git a/srcpkgs/libtracecmd-devel b/srcpkgs/libtracecmd-devel
new file mode 120000
index 000000000000..77b3407d0913
--- /dev/null
+++ b/srcpkgs/libtracecmd-devel
@@ -0,0 +1 @@
+trace-cmd
\ No newline at end of file
diff --git a/srcpkgs/trace-cmd/patches/fix-program-name.patch b/srcpkgs/trace-cmd/patches/fix-program-name.patch
deleted file mode 100644
index 970122246115..000000000000
--- a/srcpkgs/trace-cmd/patches/fix-program-name.patch
+++ /dev/null
@@ -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':
diff --git a/srcpkgs/trace-cmd/patches/glut.patch b/srcpkgs/trace-cmd/patches/glut.patch
deleted file mode 100644
index 5db232a21b38..000000000000
--- a/srcpkgs/trace-cmd/patches/glut.patch
+++ /dev/null
@@ -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)
diff --git a/srcpkgs/trace-cmd/patches/musl-limits_h.patch b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
index 83e278c8ab9e..af90e89b8d75 100644
--- a/srcpkgs/trace-cmd/patches/musl-limits_h.patch
+++ b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
@@ -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>
diff --git a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch b/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
deleted file mode 100644
index 5203d3335c2b..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
+++ /dev/null
@@ -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);
-
diff --git a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch b/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
deleted file mode 100644
index 367588391845..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
+++ /dev/null
@@ -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 }
diff --git a/srcpkgs/trace-cmd/patches/no-rpath.patch b/srcpkgs/trace-cmd/patches/no-rpath.patch
new file mode 100644
index 000000000000..ff2fd9fe864e
--- /dev/null
+++ b/srcpkgs/trace-cmd/patches/no-rpath.patch
@@ -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) \
diff --git a/srcpkgs/trace-cmd/template b/srcpkgs/trace-cmd/template
index ecef9dad32e4..055b59dfb7cf 100644
--- a/srcpkgs/trace-cmd/template
+++ b/srcpkgs/trace-cmd/template
@@ -1,36 +1,48 @@
# 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
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
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
+}
+
+libtracecmd_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/*.so.*"
+ }
}
-kernelshark_package() {
- depends="${sourcepkg}>=${version}_${revision}"
- short_desc="GUI for ftrace Linux kernel internal tracer"
+libtracecmd-devel_package() {
+ depends="libtracecmd>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
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/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc/libtracecmd-doc
}
}
From f590090b885fe8d83a3850fa9e0883562b9ef21a Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 03:07:55 -0400
Subject: [PATCH 4/4] kernelshark: split from trace-cmd, update to 2.1.1
---
common/shlibs | 1 +
srcpkgs/kernelshark/patches/musl.patch | 20 +++++++++++++
srcpkgs/kernelshark/template | 40 ++++++++++++++++++++++++++
srcpkgs/kernelshark/update | 1 +
srcpkgs/libkshark | 1 +
srcpkgs/libkshark-devel | 1 +
6 files changed, 64 insertions(+)
create mode 100644 srcpkgs/kernelshark/patches/musl.patch
create mode 100644 srcpkgs/kernelshark/template
create mode 100644 srcpkgs/kernelshark/update
create mode 120000 srcpkgs/libkshark
create mode 120000 srcpkgs/libkshark-devel
diff --git a/common/shlibs b/common/shlibs
index ddf961520ef5..5ca12d1a391f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4205,3 +4205,4 @@ 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
+libkshark.so.2 libkshark-2.1.1_1
diff --git a/srcpkgs/kernelshark/patches/musl.patch b/srcpkgs/kernelshark/patches/musl.patch
new file mode 100644
index 000000000000..e02fddb486c7
--- /dev/null
+++ b/srcpkgs/kernelshark/patches/musl.patch
@@ -0,0 +1,20 @@
+--- a/src/libkshark.h
++++ b/src/libkshark.h
+@@ -17,6 +17,7 @@
+ #include <string.h>
+ #include <pthread.h>
+ #include <errno.h>
++#include <sys/types.h>
+
+ // Json-C
+ #include <json-c/json.h>
+--- a/src/kernelshark.cpp
++++ b/src/kernelshark.cpp
+@@ -7,6 +7,7 @@
+ // C
+ #include <sys/stat.h>
+ #include <getopt.h>
++#include <libgen.h>
+
+ // Qt
+ #include <QApplication>
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
new file mode 100644
index 000000000000..91ebad4dea7c
--- /dev/null
+++ b/srcpkgs/kernelshark/template
@@ -0,0 +1,40 @@
+# Template file for 'kernelshark'
+pkgname=kernelshark
+reverts="2.9.1_1 2.9_1 2.8.3_2 2.8.3_1 2.8.2_1 2.8.1_1 2.7_2 2.7_1 2.6.2_1 2.6.1_1
+ 2.6_1 2.5.3_3 2.5.3_2 2.5.3_1 2.5.1_1 2.5_1 2.4_1"
+version=2.1.1
+revision=1
+build_style=cmake
+# It's PKG_CONGIG_DIR not PKG_CONFIG_DIR
+configure_args="-D_INSTALL_PREFIX=/usr -D_LIBDIR=/usr/lib$XBPS_TARGET_WORDSIZE
+ -DPKG_CONGIG_DIR=/usr/lib/pkgconfig -DTT_FONT_FILE=/usr/share/fonts/TTF/FreeSans.ttf
+ -DTRACECMD_EXECUTABLE=/usr/bin/trace-cmd -DCMAKE_SKIP_RPATH=ON"
+hostmakedepends="qt5-qmake qt5-host-tools pkg-config"
+makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
+ libtraceevent-devel libtracefs-devel libtracecmd-devel"
+depends="freefont-ttf trace-cmd"
+short_desc="Front end reader of trace-cmd(1) output"
+maintainer="Leah Neukirchen <leah@vuxu.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.kernelshark.org"
+distfiles="https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/snapshot/kernel-shark-kernelshark-v${version}.tar.gz"
+checksum=78a0cf28bc06d0e43cd5a2512f83c02b7b5c969a26a0d4b56338154d6cf6f7be
+# requires externally-downloaded data and segfaults on some gui tests
+make_check=no
+
+libkshark_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/libkshark.so.*"
+ }
+}
+
+libkshark-devel_package() {
+ depends="libkshark>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/kernelshark/update b/srcpkgs/kernelshark/update
new file mode 100644
index 000000000000..8b5f28fc01ca
--- /dev/null
+++ b/srcpkgs/kernelshark/update
@@ -0,0 +1 @@
+pkgname=kernel-shark-kernelshark
diff --git a/srcpkgs/libkshark b/srcpkgs/libkshark
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
diff --git a/srcpkgs/libkshark-devel b/srcpkgs/libkshark-devel
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark-devel
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR PATCH] [Updated] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (49 preceding siblings ...)
2022-11-24 20:08 ` classabbyamp
@ 2022-11-24 20:10 ` classabbyamp
2022-11-25 5:38 ` classabbyamp
` (3 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-11-24 20:10 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages update/trace-cmd-3.1.2
https://github.com/void-linux/void-packages/pull/38851
trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
- New package: libtraceevent-1.6.2
- New package: libtracefs-1.4.2
- trace-cmd: update to 3.1.2.
- kernelshark: split from trace-cmd, update to 2.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (builds & runs, but I'm not sure how to use this so I can't test further)
A patch file from https://github.com/void-linux/void-packages/pull/38851.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update/trace-cmd-3.1.2-38851.patch --]
[-- Type: text/x-diff, Size: 21648 bytes --]
From c079bedc7c7f7622f081b63dc855f7e1acc82878 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:37:06 -0400
Subject: [PATCH 1/4] New package: libtraceevent-1.6.3
---
common/shlibs | 1 +
srcpkgs/libtraceevent-devel | 1 +
srcpkgs/libtraceevent/template | 35 ++++++++++++++++++++++++++++++++++
3 files changed, 37 insertions(+)
create mode 120000 srcpkgs/libtraceevent-devel
create mode 100644 srcpkgs/libtraceevent/template
diff --git a/common/shlibs b/common/shlibs
index 61f21bc3b94e..f51bb7749dda 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4202,3 +4202,4 @@ libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1
libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
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
diff --git a/srcpkgs/libtraceevent-devel b/srcpkgs/libtraceevent-devel
new file mode 120000
index 000000000000..9ca91c55529f
--- /dev/null
+++ b/srcpkgs/libtraceevent-devel
@@ -0,0 +1 @@
+libtraceevent
\ No newline at end of file
diff --git a/srcpkgs/libtraceevent/template b/srcpkgs/libtraceevent/template
new file mode 100644
index 000000000000..62446037c09b
--- /dev/null
+++ b/srcpkgs/libtraceevent/template
@@ -0,0 +1,35 @@
+# Template file for 'libtraceevent'
+pkgname=libtraceevent
+version=1.6.3
+revision=1
+build_style=gnu-makefile
+make_build_args="libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install doc-install"
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace event library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/libtraceevent-${version}.tar.gz"
+checksum=031e4428586788bb835d894f7f11c54e482764063d96ead303c7f208fb59e353
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+libtraceevent-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/share/doc
+ }
+}
From edaf1c0b3435bf365ab1621106ce3778b36ff10d Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Mon, 22 Aug 2022 21:41:02 -0400
Subject: [PATCH 2/4] New package: libtracefs-1.6.1
---
common/shlibs | 1 +
srcpkgs/libtracefs-devel | 1 +
.../libtracefs/patches/musl-limits_h.patch | 10 +++++
srcpkgs/libtracefs/patches/musl.patch | 17 ++++++++
srcpkgs/libtracefs/template | 42 +++++++++++++++++++
5 files changed, 71 insertions(+)
create mode 120000 srcpkgs/libtracefs-devel
create mode 100644 srcpkgs/libtracefs/patches/musl-limits_h.patch
create mode 100644 srcpkgs/libtracefs/patches/musl.patch
create mode 100644 srcpkgs/libtracefs/template
diff --git a/common/shlibs b/common/shlibs
index f51bb7749dda..332e24e45a5c 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4203,3 +4203,4 @@ libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1
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
diff --git a/srcpkgs/libtracefs-devel b/srcpkgs/libtracefs-devel
new file mode 120000
index 000000000000..23466cce7993
--- /dev/null
+++ b/srcpkgs/libtracefs-devel
@@ -0,0 +1 @@
+libtracefs
\ No newline at end of file
diff --git a/srcpkgs/libtracefs/patches/musl-limits_h.patch b/srcpkgs/libtracefs/patches/musl-limits_h.patch
new file mode 100644
index 000000000000..e0cd38d5a7d8
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl-limits_h.patch
@@ -0,0 +1,10 @@
+--- a/utest/tracefs-utest.c
++++ b/utest/tracefs-utest.c
+@@ -11,6 +11,7 @@
+ #include <libgen.h>
+ #include <kbuffer.h>
+ #include <pthread.h>
++#include <limits.h>
+
+ #include <CUnit/CUnit.h>
+ #include <CUnit/Basic.h>
diff --git a/srcpkgs/libtracefs/patches/musl.patch b/srcpkgs/libtracefs/patches/musl.patch
new file mode 100644
index 000000000000..50ba010fe210
--- /dev/null
+++ b/srcpkgs/libtracefs/patches/musl.patch
@@ -0,0 +1,17 @@
+--- a/include/tracefs.h
++++ b/include/tracefs.h
+@@ -10,6 +10,14 @@
+ #include <sched.h>
+ #include <event-parse.h>
+
++#ifndef _GNU_SOURCE
++#if !__GLIBC__
++/* See CPU_SET(3) */
++struct cpu_set_t;
++typedef struct cpu_set_t cpu_set_t;
++#endif
++#endif
++
+ char *tracefs_get_tracing_file(const char *name);
+ void tracefs_put_tracing_file(char *name);
+
diff --git a/srcpkgs/libtracefs/template b/srcpkgs/libtracefs/template
new file mode 100644
index 000000000000..f7c1cb68f62f
--- /dev/null
+++ b/srcpkgs/libtracefs/template
@@ -0,0 +1,42 @@
+# Template file for 'libtracefs'
+pkgname=libtracefs
+version=1.6.1
+revision=1
+build_style=gnu-makefile
+make_build_args="libdir_relative=lib${XBPS_TARGET_WORDSIZE}"
+make_build_target="all doc"
+make_install_args="$make_build_args pkgconfig_dir=/usr/lib/pkgconfig"
+make_install_target="install install_doc"
+make_use_env=yes
+hostmakedepends="asciidoc xmlto source-highlight pkg-config"
+makedepends="libtraceevent-devel"
+checkdepends="CUnit-devel"
+short_desc="Linux kernel trace file system library"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-only, LGPL-2.1-only"
+homepage="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+distfiles="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-${version}.tar.gz"
+checksum=215a5182ee7d5a813ff84d290bb8988aa4c04cc16bb837780f61b0f5bf7494ab
+
+do_check() {
+ make ${makejobs} test
+ utest/trace-utest
+}
+
+post_install() {
+ # manpage for sample program
+ rm ${DESTDIR}/usr/share/man/man1/sqlhist.1
+}
+
+libtracefs-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/share/doc
+ vmove usr/share/man/man3
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From ecfba1d8c437f322c6cd5da9e3d000f173375aae Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 02:39:52 -0400
Subject: [PATCH 3/4] trace-cmd: update to 3.1.4.
---
common/shlibs | 1 +
srcpkgs/{kernelshark => libtracecmd} | 0
srcpkgs/libtracecmd-devel | 1 +
.../trace-cmd/patches/fix-program-name.patch | 23 ---------
srcpkgs/trace-cmd/patches/glut.patch | 12 -----
srcpkgs/trace-cmd/patches/musl-limits_h.patch | 44 +++++++++-------
.../musl-no_pthread_attr_setaffinity_np.patch | 24 ---------
.../trace-cmd/patches/musl-pthread_h.patch | 10 ----
srcpkgs/trace-cmd/patches/no-rpath.patch | 20 ++++++++
srcpkgs/trace-cmd/template | 51 +++++++++++--------
10 files changed, 78 insertions(+), 108 deletions(-)
rename srcpkgs/{kernelshark => libtracecmd} (100%)
create mode 120000 srcpkgs/libtracecmd-devel
delete mode 100644 srcpkgs/trace-cmd/patches/fix-program-name.patch
delete mode 100644 srcpkgs/trace-cmd/patches/glut.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
delete mode 100644 srcpkgs/trace-cmd/patches/musl-pthread_h.patch
create mode 100644 srcpkgs/trace-cmd/patches/no-rpath.patch
diff --git a/common/shlibs b/common/shlibs
index 332e24e45a5c..ddf961520ef5 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -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
diff --git a/srcpkgs/kernelshark b/srcpkgs/libtracecmd
similarity index 100%
rename from srcpkgs/kernelshark
rename to srcpkgs/libtracecmd
diff --git a/srcpkgs/libtracecmd-devel b/srcpkgs/libtracecmd-devel
new file mode 120000
index 000000000000..77b3407d0913
--- /dev/null
+++ b/srcpkgs/libtracecmd-devel
@@ -0,0 +1 @@
+trace-cmd
\ No newline at end of file
diff --git a/srcpkgs/trace-cmd/patches/fix-program-name.patch b/srcpkgs/trace-cmd/patches/fix-program-name.patch
deleted file mode 100644
index 970122246115..000000000000
--- a/srcpkgs/trace-cmd/patches/fix-program-name.patch
+++ /dev/null
@@ -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':
diff --git a/srcpkgs/trace-cmd/patches/glut.patch b/srcpkgs/trace-cmd/patches/glut.patch
deleted file mode 100644
index 5db232a21b38..000000000000
--- a/srcpkgs/trace-cmd/patches/glut.patch
+++ /dev/null
@@ -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)
diff --git a/srcpkgs/trace-cmd/patches/musl-limits_h.patch b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
index 83e278c8ab9e..af90e89b8d75 100644
--- a/srcpkgs/trace-cmd/patches/musl-limits_h.patch
+++ b/srcpkgs/trace-cmd/patches/musl-limits_h.patch
@@ -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>
diff --git a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch b/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
deleted file mode 100644
index 5203d3335c2b..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-no_pthread_attr_setaffinity_np.patch
+++ /dev/null
@@ -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);
-
diff --git a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch b/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
deleted file mode 100644
index 367588391845..000000000000
--- a/srcpkgs/trace-cmd/patches/musl-pthread_h.patch
+++ /dev/null
@@ -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 }
diff --git a/srcpkgs/trace-cmd/patches/no-rpath.patch b/srcpkgs/trace-cmd/patches/no-rpath.patch
new file mode 100644
index 000000000000..ff2fd9fe864e
--- /dev/null
+++ b/srcpkgs/trace-cmd/patches/no-rpath.patch
@@ -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) \
diff --git a/srcpkgs/trace-cmd/template b/srcpkgs/trace-cmd/template
index ecef9dad32e4..b41ef3950426 100644
--- a/srcpkgs/trace-cmd/template
+++ b/srcpkgs/trace-cmd/template
@@ -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
}
}
From bdaa1243b74e3ef933a00d2785f016b197f467ab Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 23 Aug 2022 03:07:55 -0400
Subject: [PATCH 4/4] kernelshark: split from trace-cmd, update to 2.1.1
---
common/shlibs | 1 +
srcpkgs/kernelshark/patches/musl.patch | 20 +++++++++++++
srcpkgs/kernelshark/template | 40 ++++++++++++++++++++++++++
srcpkgs/kernelshark/update | 1 +
srcpkgs/libkshark | 1 +
srcpkgs/libkshark-devel | 1 +
6 files changed, 64 insertions(+)
create mode 100644 srcpkgs/kernelshark/patches/musl.patch
create mode 100644 srcpkgs/kernelshark/template
create mode 100644 srcpkgs/kernelshark/update
create mode 120000 srcpkgs/libkshark
create mode 120000 srcpkgs/libkshark-devel
diff --git a/common/shlibs b/common/shlibs
index ddf961520ef5..5ca12d1a391f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4205,3 +4205,4 @@ 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
+libkshark.so.2 libkshark-2.1.1_1
diff --git a/srcpkgs/kernelshark/patches/musl.patch b/srcpkgs/kernelshark/patches/musl.patch
new file mode 100644
index 000000000000..e02fddb486c7
--- /dev/null
+++ b/srcpkgs/kernelshark/patches/musl.patch
@@ -0,0 +1,20 @@
+--- a/src/libkshark.h
++++ b/src/libkshark.h
+@@ -17,6 +17,7 @@
+ #include <string.h>
+ #include <pthread.h>
+ #include <errno.h>
++#include <sys/types.h>
+
+ // Json-C
+ #include <json-c/json.h>
+--- a/src/kernelshark.cpp
++++ b/src/kernelshark.cpp
+@@ -7,6 +7,7 @@
+ // C
+ #include <sys/stat.h>
+ #include <getopt.h>
++#include <libgen.h>
+
+ // Qt
+ #include <QApplication>
diff --git a/srcpkgs/kernelshark/template b/srcpkgs/kernelshark/template
new file mode 100644
index 000000000000..91ebad4dea7c
--- /dev/null
+++ b/srcpkgs/kernelshark/template
@@ -0,0 +1,40 @@
+# Template file for 'kernelshark'
+pkgname=kernelshark
+reverts="2.9.1_1 2.9_1 2.8.3_2 2.8.3_1 2.8.2_1 2.8.1_1 2.7_2 2.7_1 2.6.2_1 2.6.1_1
+ 2.6_1 2.5.3_3 2.5.3_2 2.5.3_1 2.5.1_1 2.5_1 2.4_1"
+version=2.1.1
+revision=1
+build_style=cmake
+# It's PKG_CONGIG_DIR not PKG_CONFIG_DIR
+configure_args="-D_INSTALL_PREFIX=/usr -D_LIBDIR=/usr/lib$XBPS_TARGET_WORDSIZE
+ -DPKG_CONGIG_DIR=/usr/lib/pkgconfig -DTT_FONT_FILE=/usr/share/fonts/TTF/FreeSans.ttf
+ -DTRACECMD_EXECUTABLE=/usr/bin/trace-cmd -DCMAKE_SKIP_RPATH=ON"
+hostmakedepends="qt5-qmake qt5-host-tools pkg-config"
+makedepends="libfreeglut-devel qt5-devel json-c-devel libXmu-devel libXi-devel
+ libtraceevent-devel libtracefs-devel libtracecmd-devel"
+depends="freefont-ttf trace-cmd"
+short_desc="Front end reader of trace-cmd(1) output"
+maintainer="Leah Neukirchen <leah@vuxu.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.kernelshark.org"
+distfiles="https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/snapshot/kernel-shark-kernelshark-v${version}.tar.gz"
+checksum=78a0cf28bc06d0e43cd5a2512f83c02b7b5c969a26a0d4b56338154d6cf6f7be
+# requires externally-downloaded data and segfaults on some gui tests
+make_check=no
+
+libkshark_package() {
+ short_desc+=" - library"
+ pkg_install() {
+ vmove "usr/lib/libkshark.so.*"
+ }
+}
+
+libkshark-devel_package() {
+ depends="libkshark>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/kernelshark/update b/srcpkgs/kernelshark/update
new file mode 100644
index 000000000000..8b5f28fc01ca
--- /dev/null
+++ b/srcpkgs/kernelshark/update
@@ -0,0 +1 @@
+pkgname=kernel-shark-kernelshark
diff --git a/srcpkgs/libkshark b/srcpkgs/libkshark
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
diff --git a/srcpkgs/libkshark-devel b/srcpkgs/libkshark-devel
new file mode 120000
index 000000000000..5e1b3a665844
--- /dev/null
+++ b/srcpkgs/libkshark-devel
@@ -0,0 +1 @@
+kernelshark
\ No newline at end of file
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (50 preceding siblings ...)
2022-11-24 20:10 ` classabbyamp
@ 2022-11-25 5:38 ` classabbyamp
2022-11-25 18:41 ` leahneukirchen
` (2 subsequent siblings)
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-11-25 5:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 416 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#issuecomment-1327040228
Comment:
@leahneukirchen can you test this? I haven't been able to get trace-cmd to record anything, even from the examples in the man page, and i'm not sure if i'm doing everything right.
```sh
$ trace-cmd record -e all ls
trace-cmd: Bad address
opening '(null)'
```
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (51 preceding siblings ...)
2022-11-25 5:38 ` classabbyamp
@ 2022-11-25 18:41 ` leahneukirchen
2022-11-26 0:35 ` classabbyamp
2022-11-26 0:35 ` [PR PATCH] [Merged]: " classabbyamp
54 siblings, 0 replies; 56+ messages in thread
From: leahneukirchen @ 2022-11-25 18:41 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 276 bytes --]
New comment by leahneukirchen on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#issuecomment-1327780055
Comment:
Here I get
```
trace-cmd: Permission denied
opening '/sys/kernel/debug/tracing/tracing_on'
```
But as root it works.
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (52 preceding siblings ...)
2022-11-25 18:41 ` leahneukirchen
@ 2022-11-26 0:35 ` classabbyamp
2022-11-26 0:35 ` [PR PATCH] [Merged]: " classabbyamp
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-11-26 0:35 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 235 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/38851#issuecomment-1327941604
Comment:
hm I don't have `/sys/kernel/debug/tracing/`, i must not have a kmod loaded or something
^ permalink raw reply [flat|nested] 56+ messages in thread
* Re: [PR PATCH] [Merged]: trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
2022-08-23 7:59 [PR PATCH] trace-cmd: update to 3.1.2, add new dependencies, split kernelshark classabbyamp
` (53 preceding siblings ...)
2022-11-26 0:35 ` classabbyamp
@ 2022-11-26 0:35 ` classabbyamp
54 siblings, 0 replies; 56+ messages in thread
From: classabbyamp @ 2022-11-26 0:35 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 581 bytes --]
There's a merged pull request on the void-packages repository
trace-cmd: update to 3.1.2, add new dependencies, split kernelshark
https://github.com/void-linux/void-packages/pull/38851
Description:
- New package: libtraceevent-1.6.2
- New package: libtracefs-1.4.2
- trace-cmd: update to 3.1.2.
- kernelshark: split from trace-cmd, update to 2.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly** (builds & runs, but I'm not sure how to use this so I can't test further)
^ permalink raw reply [flat|nested] 56+ messages in thread