zfsonlinux/spl-patches/0006-Linux-4.18-compat-Kconfig.patch
Thomas Lamprecht ea3522b2f7 update/rebase to spl-0.7.11 with patches from ZOL
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-09-17 11:39:40 +02:00

58 lines
1.5 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Brian Behlendorf <behlendorf1@llnl.gov>
Date: Wed, 12 Sep 2018 20:42:34 -0400
Subject: [PATCH] Linux 4.18 compat: Kconfig
The kernel's top level Kconfig was updated in 4.18 such that it
no longer matches the expected pattern preventing the spl source
from being inserted. Simplify the existing logic to always insert
the entry at the end of the file since an exact location is not
required, unlike in the Makefile.
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #7890
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
copy-builtin | 27 +--------------------------
1 file changed, 1 insertion(+), 26 deletions(-)
diff --git a/copy-builtin b/copy-builtin
index 34c482b..b8e3a08 100755
--- a/copy-builtin
+++ b/copy-builtin
@@ -88,32 +88,7 @@ EOF
done
} > "$KERNEL_DIR/spl/Kbuild"
-add_after()
-{
- local FILE="$1"
- local MARKER="$2"
- local NEW="$3"
- local LINE
-
- while IFS='' read -r LINE
- do
- echo "$LINE"
-
- if [ -n "$MARKER" -a "$LINE" = "$MARKER" ]
- then
- echo "$NEW"
- MARKER=''
- if IFS='' read -r LINE
- then
- [ "$LINE" != "$NEW" ] && echo "$LINE"
- fi
- fi
- done < "$FILE" > "$FILE.new"
-
- mv "$FILE.new" "$FILE"
-}
-
-add_after "$KERNEL_DIR/Kconfig" 'source "arch/$SRCARCH/Kconfig"' 'source "spl/Kconfig"'
+echo 'source "spl/Kconfig"' >>"$KERNEL_DIR/Kconfig"
# We must take care to build SPL before ZFS, otherwise the symbols required
# to link ZFS will not be available.
sed -i 's~mm/ fs/~mm/ spl/ fs/~' "$KERNEL_DIR/Makefile"