[lunar:linux][SRU][PATCH] UBUNTU: [Packaging] FTBFS with different dkms or when makeflags are set

Dimitri John Ledkov dimitri.ledkov at canonical.com
Wed Apr 5 14:09:33 UTC 2023


BugLink: https://bugs.launchpad.net/bugs/2015361

dkms upstream, debian, lunar-proposed is changing return code for skip
from 9 to 77. To support either editions of the dkms, update
build_dkms invocation to support either return codes.

lunar kernel started to export MAKEFLAGS to speed up and optimize our
packaging builds. However, this can cause build_dkms to FTBFS if a
given dkms module uses submake and relies on built-in Make variables
to be set. Address this by unsetting MAKEFLAGS when invoking
build-dkms.

Signed-off-by: Dimitri John Ledkov <dimitri.ledkov at canonical.com>
---
 debian/rules.d/2-binary-arch.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 35661b61c9..dd3a95f16b 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -72,7 +72,7 @@ define build_dkms_sign =
 	)
 endef
 define build_dkms =
-	rc=0; ARCH=$(build_arch) CROSS_COMPILE=$(CROSS_COMPILE) $(SHELL) $(DROOT)/scripts/dkms-build $(dkms_dir) $(abi_release)-$* '$(call build_dkms_sign,$(builddir)/build-$*)' $(1) $(2) $(3) $(4) $(5) || rc=$$?; if [ "$$rc" = "9" ]; then echo do_$(4)_$*=false >> $(builddir)/skipped-dkms.mk; rc=0; fi; if [ "$$rc" != "0" ]; then exit $$rc; fi
+	rc=0; unset MAKEFLAGS; ARCH=$(build_arch) CROSS_COMPILE=$(CROSS_COMPILE) $(SHELL) $(DROOT)/scripts/dkms-build $(dkms_dir) $(abi_release)-$* '$(call build_dkms_sign,$(builddir)/build-$*)' $(1) $(2) $(3) $(4) $(5) || rc=$$?; if [ "$$rc" = "9" -o "$$rc" = "77" ]; then echo do_$(4)_$*=false >> $(builddir)/skipped-dkms.mk; rc=0; fi; if [ "$$rc" != "0" ]; then exit $$rc; fi
 endef
 
 define install_control =
-- 
2.34.1




More information about the kernel-team mailing list