NACK: [PATCH 1/1][SRU][Unstable] UBUNTU: SAUCE: [Packaging] include derived type in libcpupower versioned surffix

Dimitri John Ledkov dimitri.ledkov at canonical.com
Thu Oct 5 17:17:08 UTC 2023


On Thu, 5 Oct 2023 at 18:00, You-Sheng Yang <vicamo.yang at canonical.com> wrote:
>
> BugLink: https://bugs.launchpad.net/bugs/2035971
>
> libcpupower originally has versioned surffix $(abi_release), but when
> two derived kernel with same ABI, their linux-tools companion packages
> will conflict to each other as they all want to install libcpupower of
> the same filename.
>
> With this patch, it installs, e.g. libcpupower.so.6.5.0-1001-unstable, instead.
>
> Signed-off-by: You-Sheng Yang <vicamo.yang at canonical.com>
> ---
>  debian/rules.d/2-binary-arch.mk | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
> index 53fbb55c198a..72652b876592 100644
> --- a/debian/rules.d/2-binary-arch.mk
> +++ b/debian/rules.d/2-binary-arch.mk
> @@ -711,11 +711,13 @@ 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.
> +       # libcpupower.so.$(abi_release)$(patsubst linux%,%,$(src_pkg_name)) and

this works for 1 flavour per arch per source package. But for example
generic is called linux, and on arm64 it builds -generic and
-generic-64k flavours.

i believe inside this target, there is dynamic variable that is set to
exact flavour

```
$(stampdir)/stamp-install-%: target_flavour = $*
```

So i think to work correctly with multi-flavour packages, you should
use something like $(abi_release)-$(target_flavour)

But also something somewhere needs changing to correctly dlopen that
library by that name...... because it will not work at all at runtime,
right?

also questioning building any of these things out of src:linux ever.
because it is all just userspace stuff that happens to be in kernel
upstream source code by accident.


> +       # link cpupower with that.
>         make -C $(builddirpa)/tools/power/cpupower \
>                 CROSS_COMPILE=$(CROSS_COMPILE) \
>                 CROSS=$(CROSS_COMPILE) \
> -               LIB_MIN=$(abi_release) CPUFREQ_BENCH=false
> +               LIB_MIN=$(abi_release)$(patsubst linux%,%,$(src_pkg_name)) \
> +               CPUFREQ_BENCH=false
>  endif
>  ifeq ($(do_tools_perf),true)
>         cd $(builddirpa) && $(kmake) $(defconfig)
> @@ -765,9 +767,10 @@ 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
> +       # Install only the full versioned
> +       # libcpupower.so.$(abi_release)$(patsubst linux%,%,$(src_pkg_name)), not
>         # the usual symlinks to it.
> -       install -m644 $(builddirpa)/tools/power/cpupower/libcpupower.so.$(abi_release) \
> +       install -m644 $(builddirpa)/tools/power/cpupower/libcpupower.so.$(abi_release)$(patsubst linux%,%,$(src_pkg_name)) \
>                 $(toolspkgdir)/usr/lib/
>  endif
>  ifeq ($(do_tools_perf),true)
> --
> 2.40.1
>
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team



-- 
okurrr,

Dimitri



More information about the kernel-team mailing list