diff mbox series

trace-cmd: update to 2.9

Message ID 20200901215026.92841-1-rosenp@gmail.com
State New
Headers show
Series trace-cmd: update to 2.9 | expand

Commit Message

Rosen Penev Sept. 1, 2020, 9:50 p.m. UTC
Fixes compilation with GCC 10.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 package/devel/trace-cmd/Makefile              | 25 +++++++++++--------
 .../patches/110-mac80211_tracepoint.patch     | 10 ++++----
 .../devel/trace-cmd/patches/120-limits.patch  | 24 ------------------
 .../devel/trace-cmd/patches/120-pthread.patch | 11 ++++++++
 .../trace-cmd/patches/130-byteswap.patch      | 11 ++++++++
 5 files changed, 41 insertions(+), 40 deletions(-)
 delete mode 100644 package/devel/trace-cmd/patches/120-limits.patch
 create mode 100644 package/devel/trace-cmd/patches/120-pthread.patch
 create mode 100644 package/devel/trace-cmd/patches/130-byteswap.patch
diff mbox series

Patch

diff --git a/package/devel/trace-cmd/Makefile b/package/devel/trace-cmd/Makefile
index 25831d8b1b..31ffdb1edf 100644
--- a/package/devel/trace-cmd/Makefile
+++ b/package/devel/trace-cmd/Makefile
@@ -1,16 +1,18 @@ 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=trace-cmd
-PKG_VERSION:=v2.6.1
-PKG_RELEASE:=2
+PKG_VERSION:=v2.9
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git/snapshot/
-PKG_HASH:=4eb79001778a77c0ada10265e7f4b5515a3e21a46f0a15c2e8cc614efdf3f5df
+PKG_HASH:=53d1d1d6d67ae972086868293e98c61f133bbdc064b8d9d6aebcdcc7d1a5cc6d
+
+PKG_LICENSE:=GPL-2.0-only
+PKG_LICENSE_FILES:=COPYING
+
 PKG_INSTALL:=1
 PKG_USE_MIPS16:=0
-PKG_LICENSE:=GPL-2.0
-
 PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
@@ -30,30 +32,31 @@  define Package/trace-cmd-extra
 endef
 
 MAKE_FLAGS += \
+	NO_AUDIT=1 \
 	NO_PYTHON=1 \
 	prefix=/usr
 
-PLUGINS_DIR := $(PKG_INSTALL_DIR)/usr/lib/trace-cmd/plugins
+PLUGINS_DIR := $(PKG_INSTALL_DIR)/usr/lib/traceevent/plugins
 PLUGINS_MAIN := function hrtimer mac80211 sched_switch
 
-TARGET_CFLAGS += --std=gnu99 -D_GNU_SOURCE
+TARGET_CFLAGS += --std=gnu99 -D_GNU_SOURCE $(if $(CONFIG_USE_MUSL),-Dpthread_attr_setaffinity_np=pthread_setaffinity_np)
 
 define Package/trace-cmd/install
-	$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/trace-cmd/plugins
+	$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/traceevent/plugins
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/trace-cmd $(1)/usr/bin/
 	$(CP) \
 		$(patsubst %,$(PLUGINS_DIR)/plugin_%.so,$(PLUGINS_MAIN)) \
-		$(1)/usr/lib/trace-cmd/plugins
+		$(1)/usr/lib/traceevent/plugins
 endef
 
 define Package/trace-cmd-extra/install
-	$(INSTALL_DIR) $(1)/usr/lib/trace-cmd/plugins
+	$(INSTALL_DIR) $(1)/usr/lib/traceevent/plugins
 	$(CP) \
 		$$(patsubst %,$(PLUGINS_DIR)/plugin_%.so, \
 			$$(filter-out $(PLUGINS_MAIN), \
 				$$(patsubst $(PLUGINS_DIR)/plugin_%.so,%, \
 					$$(wildcard $(PLUGINS_DIR)/plugin_*.so)))) \
-		$(1)/usr/lib/trace-cmd/plugins
+		$(1)/usr/lib/traceevent/plugins
 endef
 
 $(eval $(call BuildPackage,trace-cmd))
diff --git a/package/devel/trace-cmd/patches/110-mac80211_tracepoint.patch b/package/devel/trace-cmd/patches/110-mac80211_tracepoint.patch
index e2a68972a3..7ad380c96b 100644
--- a/package/devel/trace-cmd/patches/110-mac80211_tracepoint.patch
+++ b/package/devel/trace-cmd/patches/110-mac80211_tracepoint.patch
@@ -1,16 +1,16 @@ 
---- a/plugin_mac80211.c
-+++ b/plugin_mac80211.c
-@@ -179,12 +179,15 @@ static int drv_config(struct trace_seq *
+--- a/lib/traceevent/plugins/plugin_mac80211.c
++++ b/lib/traceevent/plugins/plugin_mac80211.c
+@@ -165,12 +165,15 @@ static int drv_config(struct trace_seq *s, struct tep_record *record,
  		{ 2, "IDLE" },
  		{ 3, "QOS"},
  	);
--	pevent_print_num_field(s, " chan:%d/", event, "center_freq", record, 1);
+-	tep_print_num_field(s, " chan:%d/", event, "center_freq", record, 1);
 -	print_enum(s, event, "channel_type", data,
 -		{ 0, "noht" },
 -		{ 1, "ht20" },
 -		{ 2, "ht40-" },
 -		{ 3, "ht40+" });
-+	pevent_print_num_field(s, " chan:%d@", event, "control_freq", record, 1);
++	tep_print_num_field(s, " chan:%d@", event, "control_freq", record, 1);
 +	print_enum(s, event, "chan_width", data,
 +		{ 0, "20_noht" },
 +		{ 1, "20" },
diff --git a/package/devel/trace-cmd/patches/120-limits.patch b/package/devel/trace-cmd/patches/120-limits.patch
deleted file mode 100644
index b9d91cc03e..0000000000
--- a/package/devel/trace-cmd/patches/120-limits.patch
+++ /dev/null
@@ -1,24 +0,0 @@ 
-From 293ff6d5bc9d3b8bfbc3c57d20d3d2d00986c168 Mon Sep 17 00:00:00 2001
-From: Alexander Couzens <lynxis@fe80.eu>
-Date: Sun, 26 Nov 2017 05:22:51 +0100
-Subject: [PATCH] trace-cmd listen: Include limits.h to define PATH_MAX
-
-PATH_MAX is defined by limits.h. On some system it's also
-defined by dirent.h but not on musl.
-
-Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
-Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
----
- trace-listen.c | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/trace-listen.c
-+++ b/trace-listen.c
-@@ -23,6 +23,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include <getopt.h>
-+#include <limits.h>
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <sys/wait.h>
diff --git a/package/devel/trace-cmd/patches/120-pthread.patch b/package/devel/trace-cmd/patches/120-pthread.patch
new file mode 100644
index 0000000000..e3c61c643f
--- /dev/null
+++ b/package/devel/trace-cmd/patches/120-pthread.patch
@@ -0,0 +1,11 @@ 
+--- a/include/trace-cmd/trace-cmd.h
++++ b/include/trace-cmd/trace-cmd.h
+@@ -6,6 +6,8 @@
+ #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/package/devel/trace-cmd/patches/130-byteswap.patch b/package/devel/trace-cmd/patches/130-byteswap.patch
new file mode 100644
index 0000000000..892a11e17e
--- /dev/null
+++ b/package/devel/trace-cmd/patches/130-byteswap.patch
@@ -0,0 +1,11 @@ 
+--- a/lib/trace-cmd/include/trace-cmd-local.h
++++ b/lib/trace-cmd/include/trace-cmd-local.h
+@@ -6,6 +6,8 @@
+ #ifndef _TRACE_CMD_LOCAL_H
+ #define _TRACE_CMD_LOCAL_H
+ 
++#include <byteswap.h>
++
+ /* Can be overridden */
+ void warning(const char *fmt, ...);
+