diff options
author | Sam James <sam@gentoo.org> | 2024-04-08 07:13:17 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-04-08 07:13:17 +0100 |
commit | e8573f42d190c6b05091800cfd27e8ba8f041531 (patch) | |
tree | 7a75b29b8bbadad96fef0a848583353e91cf4579 | |
parent | net-fs/ksmbd-tools: drop 3.4.4, 3.4.6-r1 (diff) | |
download | gentoo-e8573f42d190c6b05091800cfd27e8ba8f041531.tar.gz gentoo-e8573f42d190c6b05091800cfd27e8ba8f041531.tar.bz2 gentoo-e8573f42d190c6b05091800cfd27e8ba8f041531.zip |
net-fs/ksmbd-tools: add 3.5.2
Closes: https://bugs.gentoo.org/913384
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | net-fs/ksmbd-tools/Manifest | 1 | ||||
-rw-r--r-- | net-fs/ksmbd-tools/files/ksmbd.initd-r1 | 41 | ||||
-rw-r--r-- | net-fs/ksmbd-tools/ksmbd-tools-3.5.2.ebuild | 70 |
3 files changed, 112 insertions, 0 deletions
diff --git a/net-fs/ksmbd-tools/Manifest b/net-fs/ksmbd-tools/Manifest index a2c2cf2cd767..0f98fa9569f0 100644 --- a/net-fs/ksmbd-tools/Manifest +++ b/net-fs/ksmbd-tools/Manifest @@ -1 +1,2 @@ DIST ksmbd-tools-3.4.8.tar.gz 88898 BLAKE2B 4bd4fa77e7d89de4f48427e6867807b27a9be91e4f27079d4a5b231c4925aef73489bced1e4569361105fe7e04671fa8d6f3394154b36072f9d4ec77fded7466 SHA512 f5372ea7fd4b754482374cdeefa011bebe32c37a26acc180c34c61f37cf08125b5b4626128cae413cd517a74af326188f3f9e7cf459308e4305d86e7c6702436 +DIST ksmbd-tools-3.5.2.tar.gz 463604 BLAKE2B f54ff13719dd7e7167d065a7aaf5393fc18f67611be0a22fc4914e6d2afd25e751db85c27ff3adde482e1d9c4192161b76dc92f9c066dcc41cae7c820510483c SHA512 20035501e63798f5a23d3d9502ff4a50b04f74a03154bc4bfdfabb37dcf106410cd1355c2612cc46a0e52742f8e213dad4862790661781691e77760c56f40386 diff --git a/net-fs/ksmbd-tools/files/ksmbd.initd-r1 b/net-fs/ksmbd-tools/files/ksmbd.initd-r1 new file mode 100644 index 000000000000..82375f1ad8d3 --- /dev/null +++ b/net-fs/ksmbd-tools/files/ksmbd.initd-r1 @@ -0,0 +1,41 @@ +#!/sbin/openrc-run +# Copyright 2021-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +KSMBD_CONF="${KSMBD_CONF:-/etc/ksmbd/ksmbd.conf}" +KSMBD_OPTS="${KSMBD_OPTS:-}" + +depend() { + need localmount + use net +} + +description="ksmbd userspace daemon" + +command="/usr/sbin/ksmbd.mountd" +command_control="/usr/sbin/ksmbd.control" +command_args="--config=${KSMBD_CONF} ${KSMBD_OPTS}" + +extra_started_commands="reload" + +required_files="${KSMBD_CONF}" + +reload() { + ebegin "Reloading ${RC_SVCNAME}" + "${command_control}" --reload + eend $? +} + +start_pre() { + /sbin/modprobe -q ksmbd || return 0 +} + +stop() { + ebegin "Stopping ${RC_SVCNAME}" + "${command_control}" --shutdown + eend $? +} + +stop_post() { + /sbin/modprobe -r -q ksmbd || return 0 +} diff --git a/net-fs/ksmbd-tools/ksmbd-tools-3.5.2.ebuild b/net-fs/ksmbd-tools/ksmbd-tools-3.5.2.ebuild new file mode 100644 index 000000000000..c8ff8da17db4 --- /dev/null +++ b/net-fs/ksmbd-tools/ksmbd-tools-3.5.2.ebuild @@ -0,0 +1,70 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit linux-info meson systemd + +DESCRIPTION="cifsd/ksmbd kernel server userspace utilities" +HOMEPAGE="https://github.com/cifsd-team/ksmbd-tools" +SRC_URI="https://github.com/cifsd-team/ksmbd-tools/releases/download/${PV}/${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_configure() { + local emesonargs=( + -Drundir="${EPREFIX}"/run + -Dsystemdsystemunitdir="$(systemd_get_systemunitdir)" + # TODO: add kerberos support, explicitly disable for now + -Dkrb5=disabled + ) + + meson_src_configure +} + +src_install() { + meson_src_install + + local DOCS=( README.md ksmbd.conf.example ) + einstalldocs + + insinto /etc/ksmbd + doins ksmbd.conf.example + + newinitd "${FILESDIR}/ksmbd.initd-r1" ksmbd + newconfd "${FILESDIR}/ksmbd.confd" ksmbd + + dosym ksmbd.addshare /usr/sbin/smbshareadd + dosym ksmbd.adduser /usr/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 +} |