[U/N][PATCH 1/2] UBUNTU: [Packaging] enable perf python module

Andrea Righi andrea.righi at canonical.com
Fri Mar 22 15:42:39 UTC 2024


BugLink: https://bugs.launchpad.net/bugs/2051560

The perf python module is required by some tools (e.g., tuned) and we
are not currently providing it.

Enable it to be able to support tools that require this module.

Signed-off-by: Andrea Righi <andrea.righi at canonical.com>
---
 debian.master/control.stub.in    | 1 +
 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/riscv64.mk | 1 +
 debian.master/rules.d/s390x.mk   | 3 ++-
 debian/rules                     | 1 +
 debian/rules.d/1-maintainer.mk   | 1 +
 debian/rules.d/2-binary-arch.mk  | 5 ++++-
 10 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/debian.master/control.stub.in b/debian.master/control.stub.in
index 303fb5b01b79..ab80b3853f64 100644
--- a/debian.master/control.stub.in
+++ b/debian.master/control.stub.in
@@ -21,6 +21,7 @@ Build-Depends:
  pkg-config <!stage1>,
  python3 <!stage1>,
  python3-dev <!stage1>,
+ python3-setuptools <!stage1>,
  flex <!stage1>,
  bison <!stage1>,
  libunwind8-dev [amd64 arm64 armhf ppc64el] <!stage1>,
diff --git a/debian.master/rules.d/amd64.mk b/debian.master/rules.d/amd64.mk
index 5e2c7cb1182b..8ac9044a7dc0 100644
--- a/debian.master/rules.d/amd64.mk
+++ b/debian.master/rules.d/amd64.mk
@@ -12,6 +12,7 @@ do_tools_usbip  = true
 do_tools_cpupower = true
 do_tools_perf   = true
 do_tools_perf_jvmti = true
+do_tools_perf_python = true
 do_tools_bpftool = true
 do_tools_x86	= true
 do_tools_hyperv	= true
diff --git a/debian.master/rules.d/arm64.mk b/debian.master/rules.d/arm64.mk
index 3306ccfce186..3049c4f910df 100644
--- a/debian.master/rules.d/arm64.mk
+++ b/debian.master/rules.d/arm64.mk
@@ -15,6 +15,7 @@ do_tools_usbip  = true
 do_tools_cpupower = true
 do_tools_perf   = true
 do_tools_perf_jvmti = true
+do_tools_perf_python = true
 do_tools_bpftool = true
 
 do_dtbs		= true
diff --git a/debian.master/rules.d/armhf.mk b/debian.master/rules.d/armhf.mk
index 3a1303c4f12a..21127fecc233 100644
--- a/debian.master/rules.d/armhf.mk
+++ b/debian.master/rules.d/armhf.mk
@@ -11,6 +11,7 @@ do_tools_usbip  = true
 do_tools_cpupower = true
 do_tools_perf	= true
 do_tools_perf_jvmti = true
+do_tools_perf_python = true
 do_tools_bpftool = true
 
 do_dtbs		= true
diff --git a/debian.master/rules.d/ppc64el.mk b/debian.master/rules.d/ppc64el.mk
index 2ceed4eaba9d..e85cf3d5b71f 100644
--- a/debian.master/rules.d/ppc64el.mk
+++ b/debian.master/rules.d/ppc64el.mk
@@ -12,6 +12,7 @@ do_tools_usbip    = true
 do_tools_cpupower = true
 do_tools_perf	  = true
 do_tools_perf_jvmti = true
+do_tools_perf_python = true
 do_tools_bpftool  = true
 
 #do_flavour_image_package = false
diff --git a/debian.master/rules.d/riscv64.mk b/debian.master/rules.d/riscv64.mk
index a90e9b99f6f0..d8d518f967e9 100644
--- a/debian.master/rules.d/riscv64.mk
+++ b/debian.master/rules.d/riscv64.mk
@@ -20,5 +20,6 @@ do_tools_usbip         = false
 do_tools_cpupower      = false
 do_tools_perf          = false
 do_tools_perf_jvmti    = false
+do_tools_perf_python = false
 do_tools_bpftool       = false
 do_dtbs                = false
diff --git a/debian.master/rules.d/s390x.mk b/debian.master/rules.d/s390x.mk
index 27d3af23d1d0..af0b927e732a 100644
--- a/debian.master/rules.d/s390x.mk
+++ b/debian.master/rules.d/s390x.mk
@@ -14,5 +14,6 @@ sipl_signed       = true
 do_tools_usbip    = true
 do_tools_cpupower = true
 do_tools_perf     = true
-do_tools_perf_jvmti = true
+to_tools_perf_jvmti = true
+to_tools_perf_python = true
 do_tools_bpftool  = true
diff --git a/debian/rules b/debian/rules
index 48298523431c..43eae8d5aaa8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -48,6 +48,7 @@ include $(DROOT)/rules.d/1-maintainer.mk
 do_linux_tools=$(sort $(filter-out false,$(do_tools_usbip) $(do_tools_cpupower) $(do_tools_perf) $(do_tools_bpftool) $(do_tools_x86)))
 do_cloud_tools=$(sort $(filter-out false,$(do_tools_hyperv)))
 do_tools_perf_jvmti?=false
+do_tools_perf_python?=false
 
 # Indep tools packages may only be built for the main linux source package
 ifeq ($(src_pkg_name),linux)
diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/1-maintainer.mk
index 928343e3f7e0..c01db7582f1d 100644
--- a/debian/rules.d/1-maintainer.mk
+++ b/debian/rules.d/1-maintainer.mk
@@ -83,6 +83,7 @@ printenv:
 	@echo " do_tools_host            = $(do_tools_host)"
 	@echo " do_tools_perf            = $(do_tools_perf)"
 	@echo " do_tools_perf_jvmti      = $(do_tools_perf_jvmti)"
+	@echo " do_tools_perf_python     = $(do_tools_perf_python)"
 	@echo " do_tools_usbip           = $(do_tools_usbip)"
 	@echo " do_tools_x86             = $(do_tools_x86)"
 	@echo "do_cloud_tools            = $(do_cloud_tools)"
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index c03a76a391e8..0e9e389e57e3 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -657,7 +657,7 @@ ifeq ($(do_tools_perf),true)
 	cd $(builddirpa) && $(kmake) syncconfig
 	cd $(builddirpa) && $(kmake) prepare
 	cd $(builddirpa)/tools/perf && \
-		$(kmake) prefix=/usr NO_LIBTRACEEVENT=1 HAVE_NO_LIBBFD=1 HAVE_CPLUS_DEMANGLE_SUPPORT=1 CROSS_COMPILE=$(CROSS_COMPILE) NO_LIBPYTHON=1 NO_LIBPERL=1 WERROR=0
+		$(kmake) prefix=/usr NO_LIBTRACEEVENT=1 HAVE_CPLUS_DEMANGLE_SUPPORT=1 CROSS_COMPILE=$(CROSS_COMPILE) NO_LIBPERL=1 WERROR=0
 endif
 ifeq ($(do_tools_bpftool),true)
 	mv $(builddirpa)/tools/bpf/bpftool/vmlinux $(builddirpa)/vmlinux
@@ -702,6 +702,9 @@ ifeq ($(do_tools_perf),true)
 ifeq ($(do_tools_perf_jvmti),true)
 	install -m755 $(builddirpa)/tools/perf/libperf-jvmti.so $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release)
 endif
+ifeq ($(do_tools_perf_python),true)
+	install -m755 $(builddirpa)/tools/perf/python/perf*.so $(toolspkgdir)/usr/lib/python3/dist-packages
+endif
 endif
 ifeq ($(do_tools_bpftool),true)
 	install -m755 $(builddirpa)/tools/bpf/bpftool/bpftool $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release)
-- 
2.43.0




More information about the kernel-team mailing list