From 6d1e050a5ff7708799f79c53f71b9ce70bc2d5c5 Mon Sep 17 00:00:00 2001 From: Juerg Haefliger Date: Thu, 23 Jan 2025 17:06:33 +0100 Subject: [PATCH] UBUNTU: [Packaging] linux-tools: Add missing python perf symlink BugLink: https://bugs.launchpad.net/bugs/2089411 The python perf library needs a symlink from the unflavored to the flavored package directory, just like any of the other tools binaries. However, it's somewhat special in that the link target name cannot be determined easily and reliably (python-version- and host-architecture- specific). To work around that, link the subdirectory that contains it. Signed-off-by: Juerg Haefliger Acked-by: Kevin Becker Acked-by: Agathe Porte Signed-off-by: Koichiro Den --- debian/rules.d/2-binary-arch.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index dfc14333f2e4..25fec719e243 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -368,6 +368,11 @@ ifeq ($(do_tools_perf),true) ifeq ($(do_tools_perf_jvmti),true) $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/libperf-jvmti.so $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* endif +ifeq ($(do_tools_perf_python),true) + # Link the subdirectory that contains the .so rather than the file itself. Its name is + # pseudo-random and can't be determined easily and reliably. + $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/lib $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* +endif endif ifeq ($(do_tools_bpftool),true) $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/bpftool $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*