[linux] 02/02: Kbuild.include: addtree: Remove quotes before matching path (regression in 4.8)

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Sat Mar 4 02:19:35 UTC 2017


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch sid
in repository linux.

commit 7513bdfe2b1128bad3a7ba25b51834a59e21fe46
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Sat Mar 4 02:19:07 2017 +0000

    Kbuild.include: addtree: Remove quotes before matching path (regression in 4.8)
    
    loses: #856474
---
 debian/changelog                                   |  2 ++
 ...ddtree-remove-quotes-before-matching-path.patch | 39 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 42 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index e0c3169..d894489 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ linux (4.9.13-2) UNRELEASED; urgency=medium
 
   * [media] dvb-usb: don't use stack for firmware load or reset
     (Closes: #853894)
+  * Kbuild.include: addtree: Remove quotes before matching path
+    (regression in 4.8) (Closes: #856474)
 
  -- Ben Hutchings <ben at decadent.org.uk>  Wed, 01 Mar 2017 15:42:54 +0000
 
diff --git a/debian/patches/bugfix/all/kbuild-include-addtree-remove-quotes-before-matching-path.patch b/debian/patches/bugfix/all/kbuild-include-addtree-remove-quotes-before-matching-path.patch
new file mode 100644
index 0000000..46d73f4
--- /dev/null
+++ b/debian/patches/bugfix/all/kbuild-include-addtree-remove-quotes-before-matching-path.patch
@@ -0,0 +1,39 @@
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Sat, 04 Mar 2017 01:44:15 +0000
+Subject: Kbuild.include: addtree: Remove quotes before matching path
+Bug-Debian: https://bugs.debian.org/856474
+
+systemtap currently fails to build modules when the kernel source and
+object trees are separate.
+
+systemtap adds something like -I"/usr/share/systemtap/runtime" to
+EXTRA_CFLAGS, and addtree should not adjust this as it's specifying an
+absolute directory.  But since make has no understanding of shell
+quoting, it does anyway.
+
+For a long time this didn't matter, because addtree would still emit
+the original -I option after the adjusted one.  However, commit
+db547ef19064 ("Kbuild: don't add obj tree in additional includes")
+changed it to remove the original -I option.
+
+Remove quotes (both double and single) before matching against the
+excluded patterns.
+
+References: https://bugs.debian.org/856474
+Reported-by: Jack Henschel <jackdev at mailbox.org>
+Reported-by: Ritesh Raj Sarraf <rrs at debian.org>
+Fixes: db547ef19064 ("Kbuild: don't add obj tree in additional includes")
+Cc: stable at vger.kernel.org # 4.8+
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+---
+--- a/scripts/Kbuild.include
++++ b/scripts/Kbuild.include
+@@ -207,7 +207,7 @@ hdr-inst := -f $(srctree)/scripts/Makefi
+ # Prefix -I with $(srctree) if it is not an absolute path.
+ # skip if -I has no parameter
+ addtree = $(if $(patsubst -I%,%,$(1)), \
+-$(if $(filter-out -I/% -I./% -I../%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1)),$(1)))
++$(if $(filter-out -I/% -I./% -I../%,$(subst $(quote),,$(subst $(squote),,$(1)))),$(patsubst -I%,-I$(srctree)/%,$(1)),$(1)))
+ 
+ # Find all -I options and call addtree
+ flags = $(foreach o,$($(1)),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o)))
diff --git a/debian/patches/series b/debian/patches/series
index e382e87..d627088 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -81,6 +81,7 @@ bugfix/all/net-ipv6-check-route-protocol-when-deleting-routes.patch
 bugfix/all/media-dvb-usb-dibusb-mc-common-add-module_license.patch
 bugfix/all/media-dvb-usb-don-t-use-stack-for-firmware-load.patch
 bugfix/all/media-dvb-usb-don-t-use-stack-for-reset-either.patch
+bugfix/all/kbuild-include-addtree-remove-quotes-before-matching-path.patch
 
 # Miscellaneous features
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list