]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
UBUNTU: SAUCE: Fix module signing exclusion in package builds
authorSeth Forshee <seth.forshee@canonical.com>
Fri, 12 May 2017 20:29:18 +0000 (15:29 -0500)
committerAndrea Righi <andrea.righi@canonical.com>
Mon, 15 Feb 2021 07:25:35 +0000 (08:25 +0100)
BugLink: http://bugs.launchpad.net/bugs/1690908
The current module signing exclusion implementation suffers from
two problems. First, it looks for the signed-inclusion file
relative to the path where make is executed and thus doesn't work
if the source and build directories are different. Second, the
signed-inclusion file lists only the module name, but the strings
searched for in the file include the path (and the path to the
module install location at that).

Fix these problems by updating scripts/Makefile.modinst to look
for signed-inclusion relative to the path of the source tree and
to use only the module name when matching against the contents of
that file.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
scripts/Makefile.modinst

index 7bd16fa9375824121c8fd7c8dd14c995a24c3b4d..c50c575e73b40f69df3ab2dfba4a84d7fdf0caab 100644 (file)
@@ -21,8 +21,8 @@ quiet_cmd_modules_install = INSTALL $@
     cp $@ $(2) ; \
     $(mod_strip_cmd) $(2)/$(notdir $@) ; \
     if (echo "$(2)/$(notdir $@)" | egrep -q "\/drivers\/staging\/") && \
-       [ -f $(CURDIR)/drivers/staging/signature-inclusion ] && \
-       (! egrep -x "$(2)/$(notdir $@)" $(CURDIR)/drivers/staging/signature-inclusion) ; \
+       [ -f $(srctree)/drivers/staging/signature-inclusion ] && \
+       (! egrep -x "$(notdir $@)" $(srctree)/drivers/staging/signature-inclusion) ; \
        then echo Not signing "$(2)/$(notdir $@)"; \
        else $(mod_sign_cmd) $(2)/$(notdir $@) $(patsubst %,|| true,$(KBUILD_EXTMOD)) ; \
                $(mod_compress_cmd) $(2)/$(notdir $@); fi