[Unstable][PATCH 2/4] UBUNTU: [Packaging] rules: Fold module signature check into stamp-install-% target

Juerg Haefliger juerg.haefliger at canonical.com
Mon Dec 16 13:11:01 UTC 2024


We currently have two phony targets checks-% and module-signature-check-%.
The first depends on the second and the second does nothing other than
checking the module signatures. With a dependency chain like:

binary-% <- checks-% <- module-signature-check-% <- stamps/stamp-install-%

This is a left-over from the days when we had multiple checks. We don't
need nor use these phony targets, they only add unnecessary complexity.
Just run the check in the install step and get rid of the phony targets.
This simplifies the chain to:

binary-% <- stamps/stamp-install-%

Signed-off-by: Juerg Haefliger <juerg.haefliger at canonical.com>
---
 debian/rules.d/2-binary-arch.mk |  5 ++++-
 debian/rules.d/4-checks.mk      | 10 ----------
 2 files changed, 4 insertions(+), 11 deletions(-)
 delete mode 100644 debian/rules.d/4-checks.mk

diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index ed1c28ab3823..9ed5febda358 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -336,6 +336,9 @@ endif
 	 INSTALL_DIR="$(pkgdir)" SOURCE_DIR="$(CURDIR)"			\
 	 run-parts -v debian/tests-build
 
+	# Run the module signature check
+	debian/scripts/checks/module-signature-check "$*" "$(pkgdir)" "$(pkgdir_ex)" $(do_skip_checks)
+
 	#
 	# Remove files which are generated at installation by postinst,
 	# except for modules.order and modules.builtin
@@ -562,7 +565,7 @@ $(foreach _m,$(all_dkms_modules), \
 )
 binary-%: rprovides = $(foreach _m,$(all_built-in_dkms_modules),$(if $(enable_$(_m)),$(foreach _r,$(dkms_$(_m)_rprovides),$(_r)$(comma) )))
 binary-%: target_flavour = $*
-binary-%: checks-%
+binary-%: $(stampdir)/stamp-install-%
 	@echo Debug: $@
 	dh_testdir
 	dh_testroot
diff --git a/debian/rules.d/4-checks.mk b/debian/rules.d/4-checks.mk
deleted file mode 100644
index a2f0af1f9a21..000000000000
--- a/debian/rules.d/4-checks.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-# Check the signature of staging modules
-module-signature-check-%: $(stampdir)/stamp-install-%
-	@echo Debug: $@
-	debian/scripts/checks/module-signature-check "$*" \
-		"debian/$(mods_pkg_name)-$*" \
-		"debian/$(mods_extra_pkg_name)-$*" \
-		$(do_skip_checks)
-
-checks-%: module-signature-check-%
-	@echo Debug: $@
-- 
2.43.0




More information about the kernel-team mailing list