diff mbox

[Xenial] UBUNTU: SAUCE: Fix module signing exclusion in package builds

Message ID 20170515203756.7580-2-seth.forshee@canonical.com
State New
Headers show

Commit Message

Seth Forshee May 15, 2017, 8:37 p.m. UTC
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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kleber Sacilotto de Souza June 7, 2017, 11:19 a.m. UTC | #1
Applied to xenial/master-next branch. Thank you.
diff mbox

Patch

diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst
index 0f7b7cb18122..3a182e91d5d6 100644
--- a/scripts/Makefile.modinst
+++ b/scripts/Makefile.modinst
@@ -23,7 +23,7 @@  quiet_cmd_modules_install = INSTALL $@
     cp $@ $(2) ; \
     $(mod_strip_cmd) $(2)/$(notdir $@) ; \
     if (echo "$(2)/$(notdir $@)" | egrep -q "\/drivers\/staging\/") && \
-	(! egrep -x "$(2)/$(notdir $@)" $(CURDIR)/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