summaryrefslogtreecommitdiff
path: root/net-fs/ksmbd-tools
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-12-22 14:08:05 +0000
committerV3n3RiX <venerix@koprulu.sector>2021-12-22 14:08:05 +0000
commit93a93e9a3b53c1a73142a305ea1f8136846942ee (patch)
treeb9791a06ab3284e27b568412c59316c66240c682 /net-fs/ksmbd-tools
parent2771f79232c273bc2a57d23bf335dd81ccf6af28 (diff)
gentoo resync : 22.12.2021
Diffstat (limited to 'net-fs/ksmbd-tools')
-rw-r--r--net-fs/ksmbd-tools/Manifest8
-rw-r--r--net-fs/ksmbd-tools/files/confd5
-rw-r--r--net-fs/ksmbd-tools/files/initd32
-rw-r--r--net-fs/ksmbd-tools/ksmbd-tools-3.4.3.ebuild (renamed from net-fs/ksmbd-tools/ksmbd-tools-3.4.3_pre20212111.ebuild)21
-rw-r--r--net-fs/ksmbd-tools/metadata.xml8
5 files changed, 62 insertions, 12 deletions
diff --git a/net-fs/ksmbd-tools/Manifest b/net-fs/ksmbd-tools/Manifest
index 5ff56ee59b3c..0c2a090b1218 100644
--- a/net-fs/ksmbd-tools/Manifest
+++ b/net-fs/ksmbd-tools/Manifest
@@ -1,3 +1,5 @@
-DIST ksmbd-tools-7232230911c02f81cb50b38f47ccf7100dd066f9.tar.gz 75310 BLAKE2B c6b8809fd2c0edebb2f05661009f6eb65137af322ccb16aee3dfc58a21af21ebbbd2a13864d1225734dac51989e567792ea970c11957fd660dc5f3d0c15e6b81 SHA512 b36fd7b1a2c339e9f0b170608b4e9ad05ec1bef2c0c8cd45ea9be6b2b34470965bbb239bfaf12b6d969557bf59064ac7bc3f8c15ce147c89d5013be15dfce3f9
-EBUILD ksmbd-tools-3.4.3_pre20212111.ebuild 1243 BLAKE2B 2739910ef60197dc4815cb9bc2a458aea1a59b7ca8077a4b6f15e0e66f140d923b3034722ee302ad705d81ff297a6a1d508dbd8ee0eb21d388b8af5d25b2d79d SHA512 3d5832727245df3d9ab72e896466a6bb6c86cfd22d7efb7392a24bcbbbbf21c5e3df3799c523f070f67eda310c0d85486d5fe1a702e48af5986a03394a0c75d7
-MISC metadata.xml 252 BLAKE2B ed5f11ce8c4de4fde4020b83dc772d6b47192ea5617cacf05adf13ab5a29923858b2969ed9dc26e75194cb972d41ffceee40856e6f955f42039693af96ebb2e4 SHA512 7f9b5cf205b6500eb65742c67963c3c6c375fa05c7eb094037fb9950d9d2840930e8b4d3ef76c948ddf7f37005012be51c8217c758a615dd7e128c80b6b1db28
+AUX confd 163 BLAKE2B ea3a2a65e014d0d96bfb0789cd6756b44eeced76a0d295699d6e615ae0f9faca7d90d24d1834e63d0d3f0cd99eef35b43ff9f96182abbdf2a1b5d2bb15b6bdfc SHA512 52449136ba0c8b974602b235e7ed772050098b6b2535853e08fb4185bff808766c83667a551725bc2bf24c3922df3954d0a54382217c75d232107673d0dcacb3
+AUX initd 552 BLAKE2B 2357df024a9fd9b1334a41a6849fd3fd69f49676c3c4a9cf240a6181cb56c230b59afeadce2b37d84250d2e608e5e8109d8747f91449725ea517879d2e644683 SHA512 ae54b9cafee967fa3a5e313412725b91569c923e10b663bb7032cdc3401209e424d9e333e321ff1a8cb793aa545133e03978d8b5a4c8532836a861421ace7089
+DIST ksmbd-tools-3.4.3.tar.gz 75315 BLAKE2B 9b09abb1f7fdf529c1627b783083e21bf4de22c8f34bdcb22632c67400b55e747f3a464d87612eba961a44c66e3335178b11f9a30a2feb655899deeabef09a3b SHA512 bfc8d26ba471381c7281a3b926083194b74a85d6e4c3ad734ba77f4d5b2a7b462a2b7f3a80efceb5d4cce577d1e40b8600a1f9700e9a9b91fea5e229b15a545c
+EBUILD ksmbd-tools-3.4.3.ebuild 1420 BLAKE2B 1d50f1987875dd70d4283bbdaa2355b1bc87c04a11de39f300e6fd90ed9486e2adf4697f55ae8e1a05541e47e9c8a0802441d82bc0369313de39f524392f38ec SHA512 9a9435a26791cb62b3ed6b02272bbba52f52d246ca21665e63afd566baa9c46ea568bd2345f71add8050301fe8e4b5c7e25ab12dd7fdedae7ffd3217369e6a10
+MISC metadata.xml 735 BLAKE2B 14c21e5d73828d4678ab80dfe5adbdc3e279d49de7661693d591689038d930fb62272338a86e848273fc5ca56870d3117b34b150e7a8580d2740233ff27ecd3d SHA512 27293810ca5cc23858c98e1e482c5a45008a3614140f33598d969fc7460c0ad0e9d31ac22e2ccb694113474e8caa46a78059b066be00890a27cc600e51b171af
diff --git a/net-fs/ksmbd-tools/files/confd b/net-fs/ksmbd-tools/files/confd
new file mode 100644
index 000000000000..81248468d530
--- /dev/null
+++ b/net-fs/ksmbd-tools/files/confd
@@ -0,0 +1,5 @@
+# /etc/conf.d/ksmbd: config file for /etc/init.d/ksmbd
+#
+
+# Full path to config file. /etc/ksmbd/smb.conf is default if not set.
+#KSMBD_CONF="/etc/ksmbd/smb.conf"
diff --git a/net-fs/ksmbd-tools/files/initd b/net-fs/ksmbd-tools/files/initd
new file mode 100644
index 000000000000..f65770ed44c6
--- /dev/null
+++ b/net-fs/ksmbd-tools/files/initd
@@ -0,0 +1,32 @@
+#!/sbin/openrc-run
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+KSMBD_CONF="${KSMBD_CONF:-/etc/ksmbd/smb.conf}"
+
+depend() {
+ need localmount
+ use net
+}
+
+description="ksmbd userspace daemon"
+
+command="/sbin/ksmbd.mountd"
+command_control="/sbin/ksmbd.control"
+command_args="-s"
+
+required_files="${KSMBD_CONF}"
+
+start_pre() {
+ /sbin/modprobe ksmbd || return 1
+}
+
+stop() {
+ ebegin "Stopping ${RC_SVCNAME}"
+ "${command_control}" -s
+ eend $?
+}
+
+stop_post() {
+ /sbin/modprobe -r -q ksmbd || return 0
+}
diff --git a/net-fs/ksmbd-tools/ksmbd-tools-3.4.3_pre20212111.ebuild b/net-fs/ksmbd-tools/ksmbd-tools-3.4.3.ebuild
index db27ead43cd4..51892ca19003 100644
--- a/net-fs/ksmbd-tools/ksmbd-tools-3.4.3_pre20212111.ebuild
+++ b/net-fs/ksmbd-tools/ksmbd-tools-3.4.3.ebuild
@@ -3,17 +3,15 @@
EAPI=8
-EGIT_COMMIT="7232230911c02f81cb50b38f47ccf7100dd066f9"
inherit autotools linux-info systemd
DESCRIPTION="cifsd/ksmbd kernel server userspace utilities"
HOMEPAGE="https://github.com/cifsd-team/ksmbd-tools"
-SRC_URI="https://github.com/cifsd-team/${PN}/archive/${EGIT_COMMIT}.tar.gz -> ${PN}-${EGIT_COMMIT}.tar.gz"
+SRC_URI="https://github.com/cifsd-team/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2+"
SLOT="0"
-# no keywords for now, for testing.
-KEYWORDS=""
+KEYWORDS="~amd64 ~arm64 ~ppc64"
DEPEND="
dev-libs/glib:2
@@ -23,12 +21,11 @@ DEPEND="
RDEPEND="${DEPEND}"
BDEPEND="virtual/pkgconfig"
-S="${WORKDIR}/${PN}-${EGIT_COMMIT}"
-
pkg_setup() {
# we don't want to die() here to be able to build binpkgs
- kernel_is -lt 5 15 && eerror "kernel >=5.15 required for ${PN}"
+ kernel_is -lt 5 15 && eerror "kernel >= 5.15 required for ${PN}"
CONFIG_CHECK="~SMB_SERVER"
+ ERROR_SMB_SERVER="CONFIG_SMB_SERVER is not set: ksmbd is not enabled in kernel, ${PN} will not work"
# use krb5 && CONFIG_CHECK+=" ~SMB_SERVER_KERBEROS5"
linux-info_pkg_setup
}
@@ -40,7 +37,8 @@ src_prepare() {
src_configure() {
# TODO: add kerberos support, explicitly disable for now
- econf --enable-krb5=no
+ # tools are expected to recide in /sbin, not /usr/sbin
+ econf --prefix="${EPREFIX}/" --enable-krb5=no
}
src_install() {
@@ -52,6 +50,11 @@ src_install() {
insinto /etc/ksmbd
doins smb.conf.example
- # TODO: openrc service
+ newinitd "${FILESDIR}/initd" ksmbd
+ newconfd "${FILESDIR}/confd" ksmbd
+
+ dosym ksmbd.addshare /sbin/smbshareadd
+ dosym ksmbd.adduser /sbin/smbuseradd
+
systemd_dounit ksmbd.service
}
diff --git a/net-fs/ksmbd-tools/metadata.xml b/net-fs/ksmbd-tools/metadata.xml
index 2f82d0bb8eb7..191c21a4e986 100644
--- a/net-fs/ksmbd-tools/metadata.xml
+++ b/net-fs/ksmbd-tools/metadata.xml
@@ -5,4 +5,12 @@
<email>gyakovlev@gentoo.org</email>
<name>Georgy Yakovlev</name>
</maintainer>
+ <upstream>
+ <remote-id type="github">cifsd-team/ksmbd-tools</remote-id>
+ </upstream>
+ <longdescription lang="en">
+ KSMBD is a linux kernel server which implements SMB3 protocol in kernel space for sharing files over network.
+ ksmbd.mountd is userspace process to transfer user account and password that are registered using ksmbd.adduser (part of this package).
+ Further it allows sharing information parameters that parsed from smb.conf to ksmbd in kernel.
+ </longdescription>
</pkgmetadata>