diff mbox series

[Unstable/Noble,2/2] UBUNTU: [Packaging] Build indep tools packages only for the main kernel

Message ID 20240207111515.1984805-3-juerg.haefliger@canonical.com
State New
Headers show
Series Don't produce linux-*-cloud-tools-common, linux-*-tools-common and linux-*-tools-host binary packages (LP: #2048183) | expand

Commit Message

Juerg Haefliger Feb. 7, 2024, 11:15 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/2048183

The indep tools packages provide symlinks and other generic files and
as such may only be built for the main source package. Ensure that
by turning on the package build only for the main linux source package.

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
---
 debian.master/rules.d/amd64.mk |  2 --
 debian.master/rules.d/i386.mk  |  1 -
 debian/rules                   | 11 +++++++----
 3 files changed, 7 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/debian.master/rules.d/amd64.mk b/debian.master/rules.d/amd64.mk
index a005382134aa..06ebb024c646 100644
--- a/debian.master/rules.d/amd64.mk
+++ b/debian.master/rules.d/amd64.mk
@@ -15,9 +15,7 @@  do_tools_perf_jvmti = true
 do_tools_bpftool = true
 do_tools_x86	= true
 do_tools_hyperv	= true
-do_tools_host = true
 do_extras_package = true
-do_tools_common = true
 do_tools_acpidbg = true
 do_odm_drivers  = true
 do_lib_rust     = true
diff --git a/debian.master/rules.d/i386.mk b/debian.master/rules.d/i386.mk
index bdeb8bd9ba10..90f0de729ad4 100644
--- a/debian.master/rules.d/i386.mk
+++ b/debian.master/rules.d/i386.mk
@@ -9,7 +9,6 @@  vdso		= vdso_install
 no_dumpfile	= true
 do_flavour_image_package = false
 do_tools	= false
-do_tools_common	= false
 do_extras_package = false
 do_source_package = false
 do_flavour_header_package = false
diff --git a/debian/rules b/debian/rules
index eb2d9a82ffd6..1974ce518c50 100755
--- a/debian/rules
+++ b/debian/rules
@@ -39,8 +39,7 @@  include $(DROOT)/rules.d/0-common-vars.mk
 # Pull in some arch specific stuff
 -include $(DEBIAN)/rules.d/$(arch).mk
 
-# Pull in some branch specific stuff. Used by LTS backport
-# branches to override master branch settings such as do_tools_common.
+# Pull in some branch specific stuff
 -include $(DEBIAN)/rules.d/hooks.mk
 
 # Maintainer targets
@@ -48,10 +47,14 @@  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_common?=true
-do_tools_host?=false
 do_tools_perf_jvmti?=false
 
+# Indep tools packages may only be built for the main linux source package
+ifeq ($(src_pkg_name),linux)
+	do_tools_common = true
+	do_tools_host = true
+endif
+
 # Default settings for DKMS modules.
 $(foreach _m,$(all_dkms_modules), \
   $(eval do_$(_m) ?= $(if $(filter $(_m),$(filter-out $(dkms_exclude),$(dkms_include) $(subst any,$(_m),$(subst $(arch),$(_m),$(dkms_$(_m)_archs))))),true,false)) \