diff mbox series

[N/U,2/2] UBUNTU: [Packaging] add Real-time Linux Analysis tool (rtla) to linux-tools

Message ID 20240403051553.257864-3-andrea.righi@canonical.com
State New
Headers show
Series add Real-time Linux Analysis tool (rtla) to linux-tools | expand

Commit Message

Andrea Righi April 3, 2024, 5:13 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/2059080

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
---
 debian.master/control.stub.in    |  2 ++
 debian.master/rules.d/amd64.mk   |  1 +
 debian.master/rules.d/arm64.mk   |  1 +
 debian.master/rules.d/armhf.mk   |  1 +
 debian.master/rules.d/ppc64el.mk |  1 +
 debian.master/rules.d/s390x.mk   |  1 +
 debian/rules.d/2-binary-arch.mk  | 10 ++++++++++
 debian/rules.d/3-binary-indep.mk |  2 ++
 8 files changed, 19 insertions(+)
diff mbox series

Patch

diff --git a/debian.master/control.stub.in b/debian.master/control.stub.in
index ab80b3853f64..8ea81bcb4719 100644
--- a/debian.master/control.stub.in
+++ b/debian.master/control.stub.in
@@ -37,6 +37,8 @@  Build-Depends:
  libtool <!stage1>,
  uuid-dev <!stage1>,
  libnuma-dev [amd64 arm64 ppc64el s390x] <!stage1>,
+ libtraceevent-dev <!stage1>,
+ libtracefs-dev <!stage1>,
  dkms <!stage1>,
  curl <!stage1>,
  zstd <!stage1>,
diff --git a/debian.master/rules.d/amd64.mk b/debian.master/rules.d/amd64.mk
index 8ac9044a7dc0..668da4e33b9c 100644
--- a/debian.master/rules.d/amd64.mk
+++ b/debian.master/rules.d/amd64.mk
@@ -16,6 +16,7 @@  do_tools_perf_python = true
 do_tools_bpftool = true
 do_tools_x86	= true
 do_tools_hyperv	= true
+do_tools_rtla = true
 do_extras_package = true
 do_tools_acpidbg = true
 do_lib_rust     = true
diff --git a/debian.master/rules.d/arm64.mk b/debian.master/rules.d/arm64.mk
index 3049c4f910df..2f23ecddcea0 100644
--- a/debian.master/rules.d/arm64.mk
+++ b/debian.master/rules.d/arm64.mk
@@ -17,5 +17,6 @@  do_tools_perf   = true
 do_tools_perf_jvmti = true
 do_tools_perf_python = true
 do_tools_bpftool = true
+do_tools_rtla = true
 
 do_dtbs		= true
diff --git a/debian.master/rules.d/armhf.mk b/debian.master/rules.d/armhf.mk
index 21127fecc233..9036a5863606 100644
--- a/debian.master/rules.d/armhf.mk
+++ b/debian.master/rules.d/armhf.mk
@@ -13,5 +13,6 @@  do_tools_perf	= true
 do_tools_perf_jvmti = true
 do_tools_perf_python = true
 do_tools_bpftool = true
+do_tools_rtla = true
 
 do_dtbs		= true
diff --git a/debian.master/rules.d/ppc64el.mk b/debian.master/rules.d/ppc64el.mk
index e85cf3d5b71f..c49edccfb4e4 100644
--- a/debian.master/rules.d/ppc64el.mk
+++ b/debian.master/rules.d/ppc64el.mk
@@ -14,5 +14,6 @@  do_tools_perf	  = true
 do_tools_perf_jvmti = true
 do_tools_perf_python = true
 do_tools_bpftool  = true
+do_tools_rtla = true
 
 #do_flavour_image_package = false
diff --git a/debian.master/rules.d/s390x.mk b/debian.master/rules.d/s390x.mk
index 5b1682c786e6..e679eaa83cad 100644
--- a/debian.master/rules.d/s390x.mk
+++ b/debian.master/rules.d/s390x.mk
@@ -17,3 +17,4 @@  do_tools_perf     = true
 do_tools_perf_jvmti = true
 do_tools_perf_python = true
 do_tools_bpftool  = true
+do_tools_rtla = false
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 84c2e13bfb04..986a18d7abac 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -352,6 +352,9 @@  endif
 ifeq ($(do_tools_cpupower),true)
 	$(LN) ../../$(src_pkg_name)-tools-$(abi_release)/cpupower $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
 endif
+ifeq ($(do_tools_rtla),true)
+	$(LN) ../../$(src_pkg_name)-tools-$(abi_release)/rtla $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
+endif
 ifeq ($(do_tools_perf),true)
 	$(LN) ../../$(src_pkg_name)-tools-$(abi_release)/perf $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
 ifeq ($(do_tools_perf_jvmti),true)
@@ -641,6 +644,9 @@  endif
 ifeq ($(do_tools_acpidbg),true)
 	cd $(builddirpa)/tools/power/acpi && make clean && make CFLAGS="-g -O2 -static -I$(builddirpa)/include" CROSS_COMPILE=$(CROSS_COMPILE) acpidbg
 endif
+ifeq ($(do_tools_rtla),true)
+	cd $(builddirpa)/tools/tracing/rtla && make clean && make CFLAGS='-g -O -Wall -I/usr/include/tracefs -I/usr/include/traceevent -DVERSION="\"6.8.1\""' static
+endif
 ifeq ($(do_tools_cpupower),true)
 	make -C $(builddirpa)/tools/power/cpupower \
 		CROSS_COMPILE=$(CROSS_COMPILE) \
@@ -697,6 +703,10 @@  ifeq ($(do_tools_cpupower),true)
 	install -m755 $(builddirpa)/tools/power/cpupower/cpupower \
 		$(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release)
 endif
+ifeq ($(do_tools_rtla),true)
+	install -m755 $(builddirpa)/tools/tracing/rtla/rtla-static \
+		$(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release)/rtla
+endif
 ifeq ($(do_tools_perf),true)
 	install -m755 $(builddirpa)/tools/perf/perf $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release)
 ifeq ($(do_tools_perf_jvmti),true)
diff --git a/debian/rules.d/3-binary-indep.mk b/debian/rules.d/3-binary-indep.mk
index efe66df01d8b..5a3418cd66b0 100644
--- a/debian/rules.d/3-binary-indep.mk
+++ b/debian/rules.d/3-binary-indep.mk
@@ -89,6 +89,8 @@  ifeq ($(do_tools_common),true)
 	install -m755 debian/tools/generic $(toolsbin)/cpupower
 	install -m644 $(CURDIR)/tools/power/cpupower/man/*.1 $(toolsman)/man1/
 
+	install -m755 debian/tools/generic $(toolsbin)/rtla
+
 	install -m755 debian/tools/generic $(toolsbin)/perf
 
 	install -m755 debian/tools/generic $(toolssbin)/bpftool