diff mbox series

[SRU,J,6/6] UBUNTU: SAUCE: Switch to using debian/scripts/sign-module

Message ID 20221215072708.466941-7-juerg.haefliger@canonical.com
State New
Headers show
Series linux: Staging modules should be unsigned (LP: #1642368) | expand

Commit Message

Juerg Haefliger Dec. 15, 2022, 7:27 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1642368

Use the new script debian/scripts/sign-module to determine if a modules
needs to be signed.

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>

(backported from commit 13936fc24daeacee95346171ab8a28989f14c33a kinetic:linux)
[juergh: Adjust for missing $(sig-key) variable.]
Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
---
 scripts/Makefile.modinst | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst
index be46537e4cc8..a538b07317b2 100644
--- a/scripts/Makefile.modinst
+++ b/scripts/Makefile.modinst
@@ -67,12 +67,9 @@  endif
 #
 ifeq ($(CONFIG_MODULE_SIG_ALL),y)
 quiet_cmd_sign = SIGN    $@
-$(eval $(call config_filename,MODULE_SIG_KEY))
-      cmd_sign = if echo "$@" | grep -qF "/drivers/staging/" && \
-                    test -f $(srctree)/debian/signature-inclusion && \
-                    ! grep -qFx "$(notdir $@)" $(srctree)/debian/signature-inclusion ; \
-                 then echo "UBUNTU: Not signing $@" ; \
-                 else scripts/sign-file $(CONFIG_MODULE_SIG_HASH) $(MODULE_SIG_KEY_SRCPREFIX)$(CONFIG_MODULE_SIG_KEY) certs/signing_key.x509 $@ \
+      cmd_sign = if test -e $(srctree)/debian/scripts/sign-module && \
+                    $(srctree)/debian/scripts/sign-module $@ ; \
+                 then scripts/sign-file $(CONFIG_MODULE_SIG_HASH) $(MODULE_SIG_KEY_SRCPREFIX)$(CONFIG_MODULE_SIG_KEY) certs/signing_key.x509 $@ \
                       $(if $(KBUILD_EXTMOD),|| true) ; \
                  fi
 else