[SRU][N][PATCH 1/2] UBUNTU: [Packaging] linux-tools: Link directories rather than individual files
Andy Whitcroft
apw at canonical.com
Wed Jan 22 11:24:42 UTC 2025
I do not see how this works in the face of installing both linux-tools and
linux-cloud-tools? Each would have a conflicting link to their contents?
-apw
On Tue, Jan 21, 2025 at 3:50 PM Juerg Haefliger <
juerg.haefliger at canonical.com> wrote:
> BugLink: https://bugs.launchpad.net/bugs/2089411
>
> We currently have individual links for every file provided by linux-tools:
> linux-tools/<abi>-<flavor>/foo -> ../../linux-tools-<abi>/foo
> linux-tools/<abi>-<flavor>/bar -> ../../linux-tools-<abi>/bar
> ...
>
> That's not really necessary, link the directory instead:
> linux-tools/<abi>-<flavor> -> ../linux-tools-<abi>
>
> Signed-off-by: Juerg Haefliger <juerg.haefliger at canonical.com>
> Acked-by: Agathe Porte <agathe.porte at canonical.com>
> Signed-off-by: Timo Aaltonen <timo.aaltonen at canonical.com>
> (backported from commit d79528bb27e98e8a75657eaff6697129bceddeae
> plucky:linux)
> [juergh: Changed $(DEB_SOURCE) -> $(src_pkg_name), context adjustments]
> Signed-off-by: Juerg Haefliger <juerg.haefliger at canonical.com>
> ---
> debian/rules.d/2-binary-arch.mk | 40 +++++----------------------------
> 1 file changed, 6 insertions(+), 34 deletions(-)
>
> diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/
> 2-binary-arch.mk
> index 6857a12a87e3..ba60cbd0ea74 100644
> --- a/debian/rules.d/2-binary-arch.mk
> +++ b/debian/rules.d/2-binary-arch.mk
> @@ -348,43 +348,15 @@ endif
> rmdir $(pkgdir)/lib/modules/$(abi_release)-$*/_
>
> ifeq ($(do_linux_tools),true)
> - # Create the linux-tools tool links
> - install -d $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
> -ifeq ($(do_tools_usbip),true)
> - $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/usbip
> $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
> - $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/usbipd
> $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
> -endif
> -ifeq ($(do_tools_acpidbg),true)
> - $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/acpidbg
> $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
> -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)
> - $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/libperf-jvmti.so
> $(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)-$*
> -endif
> -ifeq ($(do_tools_x86),true)
> - $(LN)
> ../../$(src_pkg_name)-tools-$(abi_release)/x86_energy_perf_policy
> $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
> - $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/turbostat
> $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
> -endif
> + # Create the linux-tools tool link
> + install -d $(toolspkgdir)/usr/lib/linux-tools
> + $(LN) ../$(src_pkg_name)-tools-$(abi_release)
> $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
> endif
> ifeq ($(do_cloud_tools),true)
> ifeq ($(do_tools_hyperv),true)
> - # Create the linux-hyperv tool links
> - install -d $(cloudpkgdir)/usr/lib/linux-tools/$(abi_release)-$*
> - $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/hv_kvp_daemon
> $(cloudpkgdir)/usr/lib/linux-tools/$(abi_release)-$*
> - $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/hv_vss_daemon
> $(cloudpkgdir)/usr/lib/linux-tools/$(abi_release)-$*
> - $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/hv_fcopy_daemon
> $(cloudpkgdir)/usr/lib/linux-tools/$(abi_release)-$*
> - $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/lsvmbus
> $(cloudpkgdir)/usr/lib/linux-tools/$(abi_release)-$*
> + # Create the linux-hyperv tool link
> + install -d $(cloudpkgdir)/usr/lib/linux-tools
> + $(LN) ../$(src_pkg_name)-tools-$(abi_release)
> $(cloudpkgdir)/usr/lib/linux-tools/$(abi_release)-$*
> endif
> endif
>
> --
> 2.43.0
>
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20250122/7fdc70ca/attachment-0001.html>
More information about the kernel-team
mailing list