kernel: modules: fs: use ksmbd module from kernel
authorPetr Štetiar <ynezz@true.cz>
Wed, 27 Apr 2022 15:44:59 +0000 (17:44 +0200)
committerPetr Štetiar <ynezz@true.cz>
Thu, 25 Aug 2022 20:08:13 +0000 (22:08 +0200)
Since kernel version 5.15 it's available in kernel. Delete current ksmbd
package as we can't have two packages under same name.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
package/kernel/ksmbd/Makefile [deleted file]
package/kernel/ksmbd/patches/01-keep_kmod_metadata.patch [deleted file]
package/kernel/linux/modules/fs.mk

diff --git a/package/kernel/ksmbd/Makefile b/package/kernel/ksmbd/Makefile
deleted file mode 100644 (file)
index 0f79644..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=ksmbd
-PKG_VERSION:=3.4.5
-PKG_RELEASE:=$(AUTORELEASE)
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/cifsd-team/cifsd/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=2873c8ba1027fc5b04c5f5344804ef1469ad7019a033456c16ca4aa3f2c161f0
-
-PKG_LICENSE:=GPL-2.0-or-later
-PKG_LICENSE_FILES:=COPYING
-
-include $(INCLUDE_DIR)/kernel.mk
-include $(INCLUDE_DIR)/package.mk
-
-TAR_OPTIONS+= --strip-components 1
-TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
-
-define KernelPackage/fs-ksmbd
-       SUBMENU:=Filesystems
-       TITLE:=SMB kernel server support
-       URL:=https://github.com/cifsd-team/cifsd
-       FILES:=$(PKG_BUILD_DIR)/ksmbd.ko
-       DEPENDS:= \
-               +kmod-nls-base \
-               +kmod-nls-utf8 \
-               +kmod-crypto-md4 \
-               +kmod-crypto-md5 \
-               +kmod-crypto-hmac \
-               +kmod-crypto-ecb \
-               +kmod-crypto-des \
-               +kmod-crypto-sha256 \
-               +kmod-crypto-cmac \
-               +kmod-crypto-sha512 \
-               +kmod-crypto-aead \
-               +kmod-crypto-ccm \
-               +kmod-crypto-gcm \
-               +kmod-asn1-decoder \
-               +kmod-oid-registry
-endef
-
-# The last two DEPENDS are hacks in order to get CONFIG_ASN1 and CONFIG_OID_REGISTRY
-# which it seems can't be selected independently. Some bug in either base or upstream.
-
-define KernelPackage/fs-ksmbd/description
-  Ksmbd is an In-kernel SMBv(1)2/3 fileserver.
-  It's an implementation of the SMB protocol in kernel space for sharing files and IPC services over network.
-endef
-
-define KernelPackage/fs-ksmbd/config
-config KSMBD_SMB_INSECURE_SERVER
-       bool "Support for insecure SMB1/CIFS and SMB2.0 protocols"
-       depends on PACKAGE_kmod-fs-ksmbd
-       help
-               This enables deprecated insecure protocols dialects: SMB1/CIFS and SMB2.0.
-       default y
-endef
-
-ifeq ($(CONFIG_KSMBD_SMB_INSECURE_SERVER),y)
-PKG_EXTRA_KCONFIG:=CONFIG_SMB_INSECURE_SERVER=y
-EXTRA_CFLAGS += -DCONFIG_SMB_INSECURE_SERVER=1
-endif
-
-define Build/Compile
-       $(KERNEL_MAKE) M="$(PKG_BUILD_DIR)" \
-       EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
-       $(PKG_EXTRA_KCONFIG) \
-       CONFIG_SMB_SERVER=m \
-       modules
-endef
-
-$(eval $(call KernelPackage,fs-ksmbd))
diff --git a/package/kernel/ksmbd/patches/01-keep_kmod_metadata.patch b/package/kernel/ksmbd/patches/01-keep_kmod_metadata.patch
deleted file mode 100644 (file)
index b2c6687..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/glob.h
-+++ b/glob.h
-@@ -7,6 +7,8 @@
- #ifndef __KSMBD_GLOB_H
- #define __KSMBD_GLOB_H
-+#undef CONFIG_MODULE_STRIPPED
-+
- #include <linux/ctype.h>
- #include "unicode.h"
index 0e4c0c091a5ad637ee696e1485b579dfa934b503..1fd570b291cf86aa34eb068f9be1664591261755 100644 (file)
@@ -343,6 +343,37 @@ endef
 
 $(eval $(call KernelPackage,fs-jfs))
 
+
+define KernelPackage/fs-ksmbd
+  SUBMENU:=$(FS_MENU)
+  TITLE:=SMB3 server support (EXPERIMENTAL)
+  KCONFIG:= \
+         CONFIG_SMB_SERVER \
+         CONFIG_SMB_SERVER_CHECK_CAP_NET_ADMIN=y \
+         CONFIG_SMB_SERVER_KERBEROS5=y
+  FILES:=$(LINUX_DIR)/fs/ksmbd/ksmbd.ko
+  AUTOLOAD:=$(call AutoLoad,30,ksmbd,1)
+  DEPENDS:= \
+         @LINUX_5_15 \
+         +kmod-nls-base \
+         +kmod-nls-utf8 \
+         +kmod-crypto-md4 \
+         +kmod-crypto-md5 \
+         +kmod-crypto-hmac \
+         +kmod-crypto-ecb \
+         +kmod-crypto-des \
+         +kmod-crypto-sha256 \
+         +kmod-crypto-cmac \
+         +kmod-crypto-sha512 \
+         +kmod-crypto-aead \
+         +kmod-crypto-ccm \
+         +kmod-crypto-gcm \
+         +kmod-asn1-decoder \
+         +kmod-oid-registry
+endef
+
+$(eval $(call KernelPackage,fs-ksmbd))
+
 define KernelPackage/fs-minix
   SUBMENU:=$(FS_MENU)
   TITLE:=Minix filesystem support