diff options
author | Georgy Yakovlev <gyakovlev@gentoo.org> | 2023-01-16 19:48:20 -0800 |
---|---|---|
committer | Georgy Yakovlev <gyakovlev@gentoo.org> | 2023-01-16 19:48:37 -0800 |
commit | 6d87b1fdb64218fee06486ec09639f1f80f3ce38 (patch) | |
tree | 2f994b2e56f6f3c1c26c99515b233d40726dfee6 /net-fs | |
parent | sys-process/numad: revbump 0.5_p20180531, add more patches (diff) | |
download | gentoo-6d87b1fdb64218fee06486ec09639f1f80f3ce38.tar.gz gentoo-6d87b1fdb64218fee06486ec09639f1f80f3ce38.tar.bz2 gentoo-6d87b1fdb64218fee06486ec09639f1f80f3ce38.zip |
net-fs/ksmbd-tools: add 3.4.6
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'net-fs')
-rw-r--r-- | net-fs/ksmbd-tools/Manifest | 1 | ||||
-rw-r--r-- | net-fs/ksmbd-tools/files/ksmbd.confd | 5 | ||||
-rw-r--r-- | net-fs/ksmbd-tools/files/ksmbd.initd | 32 | ||||
-rw-r--r-- | net-fs/ksmbd-tools/ksmbd-tools-3.4.6.ebuild | 74 |
4 files changed, 112 insertions, 0 deletions
diff --git a/net-fs/ksmbd-tools/Manifest b/net-fs/ksmbd-tools/Manifest index 9a76c1362099..659ef5c1c708 100644 --- a/net-fs/ksmbd-tools/Manifest +++ b/net-fs/ksmbd-tools/Manifest @@ -1 +1,2 @@ DIST ksmbd-tools-3.4.4.tar.gz 75481 BLAKE2B 84c215b0ccad01956185d42b858eb0de6a3407fc32c59628964ab38a2946fe5123fc73cc06cb04e8864199751f26e509ae5f6ebf6f5e7eb5f1fb8f21a4452a48 SHA512 b7be00e38eb126a0d5b8b3d9dde7c997b4012b29604d899a5f2fe3a77a3c30ac5d4bf00b7fc88d57150fd574af38bd2823c736d272a2cd596d40ccbe14a15320 +DIST ksmbd-tools-3.4.6.tar.gz 86976 BLAKE2B 2f18d41a5ef84d1d5293cab2dc51147649d723117f31b4a0360ff314d98544624c6c0280b11ec2df260514981995bdbac598347063fb6576447c511e88134c4e SHA512 396423a43ccb02fafb721717a36ea1efdc8449414cf9f7737cf44bafd991cde0a5d31689b5f43f96924357df058c1b5fbf90369b9aec2b293ae1a7b68c256d27 diff --git a/net-fs/ksmbd-tools/files/ksmbd.confd b/net-fs/ksmbd-tools/files/ksmbd.confd new file mode 100644 index 000000000000..cfe0fde01819 --- /dev/null +++ b/net-fs/ksmbd-tools/files/ksmbd.confd @@ -0,0 +1,5 @@ +# /etc/conf.d/ksmbd: config file for /etc/init.d/ksmbd +# + +# Full path to config file. /etc/ksmbd/ksmbd.conf is default if not set. +#KSMBD_CONF="/etc/ksmbd/ksmbd.conf" diff --git a/net-fs/ksmbd-tools/files/ksmbd.initd b/net-fs/ksmbd-tools/files/ksmbd.initd new file mode 100644 index 000000000000..744125c642dd --- /dev/null +++ b/net-fs/ksmbd-tools/files/ksmbd.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/ksmbd.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.6.ebuild b/net-fs/ksmbd-tools/ksmbd-tools-3.4.6.ebuild new file mode 100644 index 000000000000..3cc23c1bbc48 --- /dev/null +++ b/net-fs/ksmbd-tools/ksmbd-tools-3.4.6.ebuild @@ -0,0 +1,74 @@ +# Copyright 2022-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +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/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc64" + +DEPEND=" + dev-libs/glib:2 + dev-libs/libnl:3 +" + +RDEPEND="${DEPEND}" +BDEPEND="virtual/pkgconfig" + +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}" + 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 +} + +src_prepare() { + eautoreconf + default +} + +src_configure() { + # TODO: add kerberos support, explicitly disable for now + # tools are expected to reside in /sbin, not /usr/sbin + econf \ + --prefix="${EPREFIX:-}" \ + --enable-krb5=no \ + --with-rundir="${EPREFIX}/run" \ + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" +} + +src_install() { + default + + local DOCS=( README.md ksmbd.conf.example ) + einstalldocs + + insinto /etc/ksmbd + doins ksmbd.conf.example + + newinitd "${FILESDIR}/ksmbd.initd" ksmbd + newconfd "${FILESDIR}/ksmbd.confd" ksmbd + + dosym ksmbd.addshare /sbin/smbshareadd + dosym ksmbd.adduser /sbin/smbuseradd +} + +pkg_postinst() { + local ver + for ver in ${REPLACING_VERSIONS}; do + if ver_test ${ver} -lt 3.4.6; then + ewarn "Upgrade from version <${CATEGORY}/${PN}-3.4.6 detected" + ewarn "${PN} config file moved to ${EPREFIX}/etc/ksmbd/ksmbd.conf" + ewarn "Please migrate from old ${EPREFIX}/etc/ksmbd/smb.conf" + fi + done + unset ver +} |