From 7fbdfbf31955c3c1c5547d8f4ee46c0fc0162135 Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Wed, 6 Dec 2023 00:00:24 +0000 Subject: [PATCH] UBUNTU: [Packaging] Statically link libcpupower into cpupower tool BugLink: https://bugs.launchpad.net/bugs/2035971 Currently we ship tools for every kernel flavour and backport, and each one of them may have new features in cpupower & libcpupower. Statically link those in, such that there are no installation conflicts. This resolves all current file conflicts between multiple kernel flavours in the Ubuntu Archive. Separately, a public libcpupower1 & libcpupower-dev for non-kernel / non-linux-tools use cases will be provided separately, under a stable soname (not flavour or kernel version specific). Signed-off-by: Dimitri John Ledkov Acked-by: You-Sheng Yang Acked-by: Manuel Diewald Signed-off-by: Dimitri John Ledkov --- debian/rules.d/2-binary-arch.mk | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index aaea57aacc48..f2c3ce046767 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -668,13 +668,11 @@ 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_cpupower),true) - # Allow for multiple installed versions of cpupower and libcpupower.so: - # Override LIB_MIN in order to to generate a versioned .so named - # libcpupower.so.$(abi_release) and link cpupower with that. make -C $(builddirpa)/tools/power/cpupower \ CROSS_COMPILE=$(CROSS_COMPILE) \ CROSS=$(CROSS_COMPILE) \ - LIB_MIN=$(abi_release) CPUFREQ_BENCH=false + STATIC=true \ + CPUFREQ_BENCH=false endif ifeq ($(do_tools_perf),true) cd $(builddirpa) && $(kmake) $(defconfig) @@ -724,10 +722,6 @@ endif ifeq ($(do_tools_cpupower),true) install -m755 $(builddirpa)/tools/power/cpupower/cpupower \ $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release) - # Install only the full versioned libcpupower.so.$(abi_release), not - # the usual symlinks to it. - install -m644 $(builddirpa)/tools/power/cpupower/libcpupower.so.$(abi_release) \ - $(toolspkgdir)/usr/lib/ endif ifeq ($(do_tools_perf),true) install -m755 $(builddirpa)/tools/perf/perf $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release)