From ab8844993caf795ba4691e194fd14932904f5c51 Mon Sep 17 00:00:00 2001 From: Juerg Haefliger Date: Wed, 7 Feb 2024 12:24:46 +0100 Subject: [PATCH] UBUNTU: [Packaging] Build linux-source package only for the main kernel BugLink: https://bugs.launchpad.net/bugs/2052439 The linux-source package only makes sense for the main linux kernel. Building it for derivatives is useless and just confuses users. By default it is enabled globally in 0-common-vars.mk so make sure it is turned off afterwards for non-linux source packages. Signed-off-by: Juerg Haefliger Signed-off-by: Paolo Pisati --- debian/rules | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/rules b/debian/rules index 2a105f94b907..29ff79fc9c16 100755 --- a/debian/rules +++ b/debian/rules @@ -55,6 +55,13 @@ ifeq ($(src_pkg_name),linux) do_tools_host = true endif +# The linux-source package may only be built for the linux source package +# We need to explicitly turn this off here to override any (incorrect) +# statement in any of the above included makefile snippets +ifneq ($(src_pkg_name),linux) + do_source_package = false +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)) \