Plugins are now provided by the separate libtraceevent.
ZSTD is the preferred trace compression format.
Build system switched over to meson.

Signed-off-by: Lucas Stach <[email protected]>
---
 ...-add-options-for-doc-and-utest-build.patch | 47 +++++++++++++++++++
 patches/trace-cmd-v3.3.1/series               |  4 ++
 rules/trace-cmd.in                            |  4 ++
 rules/trace-cmd.make                          | 39 ++++-----------
 4 files changed, 65 insertions(+), 29 deletions(-)
 create mode 100644 
patches/trace-cmd-v3.3.1/0001-trace-cmd-meson-add-options-for-doc-and-utest-build.patch
 create mode 100644 patches/trace-cmd-v3.3.1/series

diff --git 
a/patches/trace-cmd-v3.3.1/0001-trace-cmd-meson-add-options-for-doc-and-utest-build.patch
 
b/patches/trace-cmd-v3.3.1/0001-trace-cmd-meson-add-options-for-doc-and-utest-build.patch
new file mode 100644
index 000000000000..225b9c9f804f
--- /dev/null
+++ 
b/patches/trace-cmd-v3.3.1/0001-trace-cmd-meson-add-options-for-doc-and-utest-build.patch
@@ -0,0 +1,47 @@
+From: Lucas Stach <[email protected]>
+Date: Tue, 10 Dec 2024 11:45:33 +0100
+Subject: [PATCH] trace-cmd meson: add options for doc and utest build
+
+In some cases building documentation or utest is not desired.
+Add meson options to allow skipping those build targets.
+
+Signed-off-by: Lucas Stach <[email protected]>
+---
+ meson.build       | 5 ++++-
+ meson_options.txt | 4 ++++
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 4773f4a941b1..237d9b400ea5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -140,9 +140,11 @@ subdir('lib/trace-cmd')
+ # trace-cmd
+ subdir('tracecmd')
+ subdir('python')
+-if cunit_dep.found()
++if get_option('utest') and cunit_dep.found()
+     subdir('utest')
+ endif
++
++if get_option('doc')
+ subdir('Documentation/trace-cmd')
+ 
+ custom_target(
+@@ -150,3 +152,4 @@ custom_target(
+     output: 'docs',
+     depends: [html, man],
+     command: ['echo'])
++endif
+diff --git a/meson_options.txt b/meson_options.txt
+index 2d5d7457bed5..37d72ff29d87 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -21,3 +21,7 @@ option('docbook-suppress-sp', type : 'boolean', value : 
false,
+        description : 'docbook suppress sp')
+ option('python', type : 'combo', choices : ['auto', 'true', 'false'],
+        description : 'Generate trac-cmd Python bindings')
++option('doc', type : 'boolean', value: true,
++       description : 'produce documentation')
++option('utest', type : 'boolean', value: true,
++       description : 'build utest')
diff --git a/patches/trace-cmd-v3.3.1/series b/patches/trace-cmd-v3.3.1/series
new file mode 100644
index 000000000000..f1269bcee145
--- /dev/null
+++ b/patches/trace-cmd-v3.3.1/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-trace-cmd-meson-add-options-for-doc-and-utest-build.patch
+# 926286b131781d169c103dd559e50a8e  - git-ptx-patches magic
diff --git a/rules/trace-cmd.in b/rules/trace-cmd.in
index 5c1d37a8f2b6..891c1fd4068f 100644
--- a/rules/trace-cmd.in
+++ b/rules/trace-cmd.in
@@ -3,8 +3,12 @@
 config TRACE_CMD
        tristate
        prompt "trace-cmd"
+       select HOST_MESON
        select LIBC_DL
        select GCCLIBS_GCC_S
+       select LIBTRACEEVENT
+       select LIBTRACEFS
+       select ZSTD
        help
          The trace-cmd command interacts with the Ftrace tracer that
          is built inside the Linux kernel. It interfaces with the
diff --git a/rules/trace-cmd.make b/rules/trace-cmd.make
index a46b8dc44ce6..4453ec4bdb97 100644
--- a/rules/trace-cmd.make
+++ b/rules/trace-cmd.make
@@ -14,8 +14,8 @@ PACKAGES-$(PTXCONF_TRACE_CMD) += trace-cmd
 #
 # Paths and names
 #
-TRACE_CMD_VERSION      := 2.9.7
-TRACE_CMD_MD5          := 003988f6dd7cac3bf1da04af03d50b5b
+TRACE_CMD_VERSION      := 3.3.1
+TRACE_CMD_MD5          := 1164436073ca46527588c401856d94bd
 TRACE_CMD              := trace-cmd-v$(TRACE_CMD_VERSION)
 TRACE_CMD_SUFFIX       := tar.gz
 TRACE_CMD_URL          := 
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/$(TRACE_CMD).$(TRACE_CMD_SUFFIX)
@@ -27,35 +27,20 @@ TRACE_CMD_LICENSE   := GPL-2.0-only
 # Prepare
 # ----------------------------------------------------------------------------
 
-TRACE_CMD_CONF_TOOL    := NO
+TRACE_CMD_CONF_TOOL    := meson
 
-TRACE_CMD_MAKE_ENV     := \
-       $(CROSS_ENV) \
-       CROSS_COMPILE=$(COMPILER_PREFIX) \
-       NO_PYTHON=1 \
-       prefix=/usr \
-       libdir_relative=lib
+TRACE_CMD_CONF_OPT     := \
+       $(CROSS_MESON_USR) \
+       -Ddoc=false \
+       -Dptrace=false \
+       -Dpython=false \
+       -Dutest=false \
+       -Dvsock=false
 
 # ----------------------------------------------------------------------------
 # Target-Install
 # ----------------------------------------------------------------------------
 
-TRACE_CMD_PLUGINS      := \
-       blk \
-       cfg80211 \
-       futex \
-       function \
-       hrtimer \
-       jbd2 \
-       kmem \
-       kvm \
-       mac80211 \
-       sched_switch \
-       scsi \
-       tlb \
-       xen
-
-
 $(STATEDIR)/trace-cmd.targetinstall:
        @$(call targetinfo)
 
@@ -67,10 +52,6 @@ $(STATEDIR)/trace-cmd.targetinstall:
 
        @$(call install_copy, trace-cmd, 0, 0, 0755, -, /usr/bin/trace-cmd)
 
-       @$(foreach plugin, $(TRACE_CMD_PLUGINS), \
-               $(call install_lib, trace-cmd, 0, 0, 0644, \
-                       traceevent/plugins/plugin_$(plugin))$(ptx/nl))
-
        @$(call install_finish, trace-cmd)
 
        @$(call touch)
-- 
2.39.5


Reply via email to