gentree: mangle $(srctree)/$(src) directly
authorJohannes Berg <johannes.berg@intel.com>
Fri, 13 Oct 2017 12:27:32 +0000 (14:27 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 13 Oct 2017 13:29:52 +0000 (15:29 +0200)
We used to patch this, before with the genregdb and now with
the shipped-certs.c generation - just fix it in code instead
so we don't have to deal with different patches.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
gentree.py
patches/verify.patch

index a98aceb260e06a9b44012480e6223e287adb9440..91893ad0100aae9e60979ef0c01032cb0f53bcb8 100755 (executable)
@@ -1016,6 +1016,8 @@ def process(kerneldir, copy_list_file, git_revision=None,
             data = open(os.path.join(root, f), 'r').read()
             for r in regexes:
                 data = r.sub(r'' + bpid.full_prefix + '\\1', data)
+            # we have an absolue path in $(src) since we compile out of tree
+            data = re.sub(r'\$\(srctree\)/\$\(src\)', '$(src)', data)
             data = re.sub(r'\$\(srctree\)', '$(backport_srctree)', data)
             data = re.sub(r'-Idrivers', '-I$(backport_srctree)/drivers', data)
             if bpid.integrate:
index dbb5600ec74ed94eea792ddefda2dc57d0860d98..0fda8411e43af936673fe638be82aac7dbedcb88 100644 (file)
  struct x509_certificate {
        struct x509_certificate *next;
        struct x509_certificate *signer;        /* Certificate that signed this one */
---- a/net/wireless/Makefile
-+++ b/net/wireless/Makefile
-@@ -22,7 +22,7 @@ ifneq ($(CPTCFG_CFG80211_EXTRA_REGDB_KEYDIR),)
- cfg80211-y += extra-certs.o
- endif
--$(obj)/shipped-certs.c: $(wildcard $(srctree)/$(src)/certs/*.x509)
-+$(obj)/shipped-certs.c: $(wildcard $(src)/certs/*.x509)
-       @echo "  GEN     $@"
-       @echo '#include "reg.h"' > $@
-       @echo 'const u8 shipped_regdb_certs[] = {' >> $@
 --- a/compat/verification/pkcs7_verify.c
 +++ b/compat/verification/pkcs7_verify.c
 @@ -150,7 +150,7 @@